/* Desktop reference: Windows Codex, captured 2026-09-11 at 1280 × 800.
   Browser chrome and Windows title/task bars are intentionally outside this UI. */
:root {
  --sidebar: #131313;
  --bg-deep: #131313;
  --surface: #242424;
  --surface-2: #282828;
  --surface-3: #303030;
  --surface-hover: #303030;
  --text: #ececec;
  --text-soft: #cdcdcd;
  --muted: #969696;
  --faint: #737373;
  --text-muted: var(--muted);
  --accent: #ededed;
  --accent-ink: #171717;
  --sidebar-width: clamp(280px, 30vw, 384px);
  --topbar-height: 48px;
  --chat-width: 820px;
  --chat-gutter: clamp(24px, 6.25vw, 80px);
  font-family: "Segoe UI", "Microsoft YaHei UI", -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", sans-serif;
}
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline-color: #82b4ff; }
.workspace { background: var(--bg); }
.topbar { background: var(--bg); padding: 0 16px; backdrop-filter: none; }
.title-row h1 { font-size: 16px; font-weight: 600; margin: 0; }
.breadcrumb, .connection-chip, .build-tag, .brand-mark { display: none; }
.topbar .state-pill.idle, .topbar .state-pill.running, .topbar .state-pill.completed { display: none; }
.sidebar-head { padding: 0 12px 0 16px; flex-shrink: 0; }
.brand { font-size: 16px; font-weight: 600; letter-spacing: 0; }
.host-trigger { grid-template-columns: 22px minmax(0,1fr) 16px; min-height: 48px; gap: 8px; padding: 6px 10px; border-color: transparent; background: transparent; margin-bottom: 8px; }
.host-trigger .host-glyph { width: 22px; height: 22px; font-size: 11px; border: 0; background: #303030; color: #ccc; }
.host-copy strong { font-size: 14px; font-weight: 500; }
.host-copy small { font-size: 11px; }
.sidebar-utility { margin-bottom: 16px; }
.sidebar-utility .search-box, .sidebar-utility .nav-row { min-height: 34px; border-radius: 7px; }
.sidebar-utility .search-box input, .sidebar-utility .nav-row { font-size: 13px; }
.sidebar-utility .nav-row b { font-size: 10px; }
.sidebar-scroll { padding: 0 8px 12px; }
.section-heading { padding: 0 8px; height: 32px; min-height: 32px; font-size: 13px; color: var(--faint); }
.project-heading { border-radius: 7px; }
.project-heading:hover { background: #262626; }
.project-row { height: 31px; }
.project-row span { font-size: 14px; font-weight: 500; }
.project-row small { border: 0; font-size: 11px; font-weight: 400; }
.catalog { gap: 0; }
.thread-list { border-left: 0; padding-left: 0; margin: 1px 0 8px 18px; gap: 0; }
.thread-row { min-height: 31px; padding: 5px 9px; border-radius: 7px; color: #c8c8c8; }
.thread-row-copy strong { font-size: 14px; font-weight: 400; }
.thread-row.active { background: #303030; }
.sidebar-foot { padding: 6px 8px; background: var(--sidebar); }
.profile-row { min-height: 36px; padding: 4px 8px; }
.profile-avatar { width: 24px; height: 24px; border: 0; background: #354c60; color: #ddd; font-size: 10px; }
.profile-row strong { font-size: 14px; font-weight: 400; }
.profile-row small { display: none; }
.conversation { padding: 24px var(--chat-gutter) 24px; scroll-behavior: auto; }
.conversation-inner, .composer, .composer-lock, .question-requests, .message-queue { width: min(100%, var(--chat-width)); }
.composer-dock { padding: 8px var(--chat-gutter) calc(16px + env(safe-area-inset-bottom,0px)); }
.message-group { margin-bottom: 24px; }
.message-group.user { display: flex; margin: 8px 0 32px; }
.message-card.user { max-width: min(85%,680px); border-radius: 20px; background: #1b4075; padding: 12px 16px; font-size: 16px; line-height: 1.65; color: #ececec; }
.assistant-body, .markdown-body { font-size: 16px; line-height: 1.75; color: #ececec; }
.markdown-body p { margin-bottom: 16px; }
.markdown-body strong { color: inherit; font-weight: 650; }
.markdown-body ul, .markdown-body ol { padding-left: 27px; margin: 12px 0 20px; }
.markdown-body li { padding-left: 3px; margin: 4px 0; }
.markdown-body code { font-size: 13px; background: #303030; }
.code-block { background: #202020; border-color: #333; border-radius: 12px; }
.code-header { padding: 8px 12px; font-size: 12px; background: #282828; }
.response-meta { gap: 4px; margin-top: 10px; min-height: 28px; }
.response-meta button { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; padding: 4px; border-radius: 6px; font-size: 12px; color: #8b8b8b; }
.response-meta button:hover { background: #292929; }
.response-meta svg { width: 16px; height: 16px; }
.inline-activity { font-size: 14px; margin: 6px 0 18px; gap: 7px; }
.inline-activity svg { width: 16px; height: 16px; }
.client-activity { font-size: 14px; padding: 8px 0 16px; }
.client-activity small { font-size: 12px; }
.turn-divider { margin: 16px 0 28px; font-size: 13px; color: #8d8d8d; }
.turn-divider.completed { display: none; }
.process-toggle { font-size: 13px; }
.native-tool { background: #202020; border-color: #353535; border-radius: 10px; }
.native-tool .activity-title strong { font-size: 13px; font-weight: 500; }
.native-tool .activity-title small { font-size: 12px; }
#composer { min-height: 98px; border-radius: 18px; background: #2a2a2a; border-color: #333; padding: 12px 12px 8px; }
#messageInput { font-size: 16px; line-height: 1.5; }
.composer-tools-left { gap: 12px; }
.attach-button { display: inline-grid; }
.composer-tools-right, .model-controls { gap: 7px; }
.composer-tools-right .model-controls .setting-button { font-size: 14px; padding: 3px 2px; }
.composer-permission { font-size: 14px; color: #f58b42; }
.composer-tools-right #effortButton { color: #999; }
.send-button { width: 28px!important; height: 28px!important; min-width: 28px; background: #2965c9!important; }
.send-button.stop { background: #2965c9!important; }
.message-queue { background: #242424; border-radius: 16px 16px 8px 8px; font-size: 14px; margin-bottom: 4px; }
.queue-heading strong { font-size: 12px; }
.queue-heading .mini-button { min-height: 28px; padding: 2px 8px; font-size: 12px; border: 0; background: transparent; color: #aaa; }
.async-question-card { padding: 16px; border-radius: 18px; background: #2c2c2c; border-color: #414141; font-size: 14px; }
.async-question-card>p { font-size: 15px; line-height: 1.65; margin: 12px 0; }
.async-question-card textarea { min-height: 64px; font-size: 14px; background: transparent; }
.question-options .mini-button { border-radius: 8px; font-size: 13px; font-weight: 400; }
.question-actions .primary-button { min-height: 32px; border-radius: 18px; padding: 4px 14px; font-size: 14px; }
.question-dismiss { width: 24px; min-width: 24px; min-height: 24px; padding: 0; border: 0; background: transparent; }
.question-dismiss svg { width: 14px; height: 14px; }
[data-open-question] { border-radius: 18px; font-size: 13px; min-height: 28px; background: transparent; display: inline-flex; gap: 6px; align-items: center; }
[data-open-question] svg { width: 14px; height: 14px; }
.popover { background: #282828; border: 1px solid #3c3c3c; border-radius: 12px; padding: 6px; box-shadow: 0 10px 32px #0006; }
.popover button { font-size: 14px; min-height: 36px; padding: 8px 10px; border-radius: 7px; color: #ddd; }
.popover button:hover, .popover button.selected { background: #363636; }
.popover-label { font-size: 12px; text-transform: none; letter-spacing: 0; color: #969696; padding: 6px 10px; }
.popover-note { font-size: 12px; line-height: 1.5; color: #999; }
.popover button small { font-size: 12px; }
.mini-button, .secondary-button, .primary-button, .danger-button { font-size: 13px; font-weight: 500; }
.primary-button { background: #ededed; color: #171717; border-color: transparent; }
.primary-button:hover { background: #fff; }
.sheet-dialog { background: #242424; border-color: #3c3c3c; border-radius: 18px; }
.dialog-head h2 { font-size: 18px; }
.dialog-eyebrow { font-size: 11px; letter-spacing: 0; }
.dialog-intro, .form-field, .field-hint, .dialog-footnote, .form-callout { font-size: 13px; }
.form-field input, .form-field textarea, .form-field select { font-size: 14px; background: #202020; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: #82b4ff; }
.host-option-copy strong { font-size: 14px; }
.host-option-copy small, .host-option-state, .info-grid p { font-size: 12px; }
.host-option.selected { background: #303030; border-color: #555; }
.info-grid h3 { font-size: 14px; }
.connection-banner, .unknown-banner, .composer-lock { font-size: 12px; }
@media (max-width: 1100px) { :root { --sidebar-width: 280px; --chat-gutter: 24px; } }
@media (max-width: 820px) {
  :root { --chat-gutter: 16px; --topbar-height: 48px; }
  .sidebar { width: min(340px,80vw); max-width: min(340px,80vw); }
  .topbar { padding: 0 8px; }
  .title-row h1 { font-size: 15px; }
  .title-row .icon-button { display: inline-grid; }
  .conversation { padding: 20px var(--chat-gutter); }
  .composer-dock { padding: 8px 12px calc(16px + env(safe-area-inset-bottom,0px)); }
  .message-card.user { max-width: 90%; }
}
@media (max-width: 620px) {
  #composer { padding: 10px 10px 8px; gap: 14px; }
  .composer-tools { gap: 4px; flex-wrap: nowrap; }
  .composer-tools-left { gap: 4px; }
  .composer-tools-right, .model-controls { gap: 5px; }
  .composer-permission { font-size: 11px; gap: 3px; }
  .composer-tools-right .model-controls .setting-button { font-size: 11px; padding: 3px 1px; }
  #modelLabel { max-width: 104px; }
  #effortButton { max-width: 40px; }
  .composer-actions { gap: 3px; }
  .voice-input { width: 24px; }
  .message-group.user { margin-bottom: 28px; }
  .assistant-body, .markdown-body, .message-card.user { font-size: 16px; }
  .question-requests { max-height: 38dvh; }
}
@media (max-width: 360px) { #modelLabel { max-width: 68px; } .model-controls { gap: 3px; } }
@media (max-height: 520px) { #composer { min-height: 76px; gap: 4px; } .conversation { padding-top: 8px; padding-bottom: 8px; } }
/* Native menu and settings references, 2026-09-11. */
#taskMenu, #projectMenu { width: 224px; background: #202020; border-radius: 8px; }
/* Project and task menus use the shared native-action-menu rules below. */
#settingsPopover[data-kind="permissions"] { width: min(366px,calc(100vw - 16px)); border-radius: 18px; padding: 8px; background: #2c2c2c; }
#settingsPopover .permission-option { padding: 9px 10px; gap: 10px; }
#settingsPopover .permission-option strong { font-size: 14px; }
#settingsPopover .permission-option small { font-size: 13px; line-height: 1.4; }
#renameDialog { width: min(420px,calc(100vw - 32px)); padding: 22px 24px; }
#renameDialog h2 { font-size: 22px; }
.rename-description { color: var(--muted); margin: -4px 0 18px; font-size: 14px; }
.profile-menu { position: fixed; z-index: 110; padding: 8px; border-radius: 16px; }
/* Plain-text account actions must not inherit the popover's 18px icon column. */
.profile-menu > button { display: block; width: 100%; min-height: 44px; padding: 10px 12px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-menu-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-screen[open] { display: grid; grid-template-columns: var(--sidebar-width) minmax(0,1fr); }
.settings-screen { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: #181818; overflow: hidden; }
.settings-nav { background: #131313; padding: 12px 8px; overflow-y: auto; }
.settings-nav h2 { padding: 14px 12px 8px; margin: 0; font-size: 14px; color: #888; font-weight: 500; }
.settings-nav button { display: block; width: 100%; text-align: left; min-height: 36px; padding: 7px 12px; border: 0; background: transparent; border-radius: 7px; font-size: 16px; color: #bdbdbd; }
.settings-nav button:hover, .settings-nav button[aria-current] { background: #303030; color: #eee; }
.settings-nav .settings-back { margin-bottom: 10px; font-size: 14px; }
.settings-content { min-width: 0; padding: 76px clamp(24px,4.5vw,64px) 48px; overflow-y: auto; }
.settings-content > * { max-width: 768px; margin-left: auto; margin-right: auto; }
.settings-content > .dialog-head { margin-bottom: 24px; }
.settings-content .dialog-head h2 { font-size: 24px; font-weight: 600; }
.settings-content > .dialog-head > .icon-button { display: none; }
.settings-content .account-section, .settings-content .info-grid section { border: 0; border-radius: 18px; background: #242424; padding: 20px; margin-bottom: 20px; }
.settings-content h3 { font-size: 16px; }
.settings-content p, .settings-content .form-field { font-size: 14px; line-height: 1.6; }
.settings-content .info-grid { grid-template-columns: 1fr; gap: 0; }
.settings-content .info-grid p { font-size: 14px; }
.settings-content .form-field input, .settings-content .form-field select { min-height: 38px; }
@media(max-width:820px) {
  .settings-screen[open] { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); }
  .settings-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; }
  .settings-nav h2 { display: none; }
  .settings-nav button { width: auto; min-height: 36px; font-size: 13px; padding: 7px 9px; }
  .settings-nav .settings-back { flex-basis: 100%; margin: 0; }
  .settings-content { padding: 24px 16px; }
  .settings-content .account-section { padding: 16px; }
}
.search-box input[readonly] { cursor: pointer; }
.search-dialog { width: min(520px,calc(100vw - 24px)); padding: 0; margin-top: min(16dvh,124px); background: #2c2c2c; border-radius: 20px; max-height: 70dvh; }
.search-dialog-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #3b3b3b; }
.search-dialog-head>svg { width: 18px; height: 18px; color: #999; }
.search-dialog-head input { flex: 1; width: 0; border: 0; background: transparent; color: #eee; font-size: 16px; outline: none; }
.search-scope { margin: 12px 20px 6px; font-size: 12px; color: #999; }
.chat-search-results { padding: 0 8px 10px; max-height: 52dvh; overflow-y: auto; }
.chat-search-results button { display: flex; width: 100%; min-height: 36px; align-items: center; gap: 12px; border: 0; border-radius: 7px; background: transparent; color: #eee; padding: 8px 12px; text-align: left; font-size: 14px; }
.chat-search-results button:hover, .chat-search-results button:focus-visible { background: #3c3c3c; }
.chat-search-results button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-search-results button small { max-width: 34%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #999; font-size: 12px; }
.search-empty { padding: 16px 12px; color: #aaa; font-size: 14px; }
#settingsPopover[data-kind="effort"] { width: min(256px,calc(100vw - 16px)); padding: 14px; border-radius: 18px; }
.effort-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.effort-heading svg { width: 16px; height: 16px; }
.effort-heading div { flex: 1; text-align: right; }
.effort-heading output { color: #86b5ff; font-size: 15px; font-weight: 600; }
.effort-heading small { display: block; font-size: 12px; color: #bbb; margin-top: 2px; }
.effort-slider { width: 100%; margin: 0; accent-color: #83b5ff; cursor: pointer; }
.effort-endpoints { display: flex; justify-content: space-between; color: #999; font-size: 11px; margin-top: 5px; }
#accountDialog.settings-screen, #twoFactorDialog.settings-screen, #devicesDialog.settings-screen { max-height: none; overflow: hidden; }
.profile-menu-identity:not(:empty) { padding: 10px 12px 14px; margin-bottom: 6px; border-bottom: 1px solid #424242; }
.profile-menu-identity strong { display: block; font-size: 15px; }
.profile-menu-identity small { display: block; color: #aaa; margin-top: 4px; font-size: 12px; }
/* Host switch stays attached to the top-left trigger, including on phones. */
#hostMenu { position: fixed; z-index: 150; padding: 6px; border-radius: 12px; overflow-y: auto; }
#hostMenu .host-list { padding: 0; gap: 2px; }
#hostMenu .host-option { display: grid; grid-template-columns: 26px minmax(0,1fr) auto; width: 100%; min-height: 54px; padding: 8px; gap: 8px; border: 0; background: transparent; }
#hostMenu .host-option:hover, #hostMenu .host-option:focus-visible, #hostMenu .host-option.selected { background: #363636; }
#hostMenu .host-glyph { width: 26px; height: 26px; font-size: 11px; }
#hostMenu .host-option-copy strong { font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#hostMenu .host-option-copy small { font-size: 11px; }
#hostMenu .host-option-state { font-size: 11px; white-space: nowrap; }
#hostTrigger[aria-expanded="true"]>svg { transform: rotate(180deg); }
#hostMenu .host-option { grid-template-columns: 26px minmax(0,1fr) auto 14px; }
#hostMenu .host-option.selected::after { grid-column: 4; grid-row: 1; margin: 0; }
.composer-images { display: flex; gap: 8px; overflow-x: auto; padding: 2px; }
.composer-image { position: relative; flex: 0 0 72px; height: 72px; }
.composer-image img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.composer-image button { position: absolute; right: 1px; top: 1px; border: 0; background: #222c; color: white; border-radius: 50%; width: 24px; height: 24px; }
.composer-image small { position: absolute; bottom: 0; left: 0; right: 0; background: #222c; color: white; font-size: 10px; }
.composer-image small:empty { display: none; }
.inline-image .attachment-thumbnail { width: auto; height: auto; max-width: min(100%,420px); max-height: 340px; object-fit: contain; border-radius: 8px; }
/* Account menu and chat details matched against the native client, 2026-09-11. */
.profile-menu { padding: 6px 8px; border-radius: 16px; }
.profile-menu > button { display: grid; grid-template-columns: 18px minmax(0,1fr) auto; gap: 8px; min-height: 32px; padding: 5px 10px; font-size: 14px; }
.profile-menu > button > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu > button > svg { width: 16px; height: 16px; }
.profile-menu kbd { font: inherit; color: var(--muted); font-size: 12px; }
.profile-menu-identity:not(:empty) { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px; margin-bottom: 4px; }
.profile-menu-identity > div { min-width: 0; }
.profile-menu-identity .profile-avatar { flex-shrink: 0; width: 22px; height: 22px; font-size: 9px; border-radius: 50%; }
.profile-menu-identity strong { font-size: 14px; line-height: 1.3; font-weight: 500; }
.profile-menu-identity small { margin: 1px 0 0; font-size: 12px; line-height: 1.3; }
.message-card.user { max-width: min(70%,680px); }
.response-meta { margin-top: 4px; min-height: 24px; }
.response-meta button { min-width: 24px; min-height: 24px; }
.artifact-preview:has(img.preview-content) { height: fit-content; max-height: calc(100dvh - 32px); }
.artifact-preview > img.preview-content { height: auto; max-height: calc(100dvh - 88px); }
.preview-head { gap: 16px; border-color: var(--border-strong); }
.preview-head strong { min-width: 0; font-size: 14px; font-weight: 500; }
.preview-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.preview-actions a { color: var(--text-soft); font-size: 13px; text-decoration: none; }
.preview-actions a:hover { text-decoration: underline; }
.artifact-preview .preview-actions button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; font-size: 24px; background: transparent; color: var(--text-soft); border: 0; border-radius: 8px; }
.artifact-preview .preview-actions button:hover { background: var(--surface-hover); }
@media(hover:hover) and (pointer:fine) {
  .message-group.assistant .response-meta { opacity: 0; }
  .message-group.assistant:hover .response-meta, .message-group.assistant:focus-within .response-meta,
  .message-group.assistant:not(:has(~ .message-group.assistant)) .response-meta { opacity: 1; }
  .project-heading .project-actions { opacity: 0; }
  .project-heading:hover .project-actions, .project-heading:focus-within .project-actions,
  .project-heading:has([data-project-menu][aria-expanded="true"]) .project-actions { opacity: 1; }
}
@media(max-width:820px), (pointer:coarse) {
  .profile-menu > button { min-height: 44px; padding-top: 10px; padding-bottom: 10px; }
  .profile-menu kbd { display: none; }
  .message-card.user { max-width: 90%; }
  .preview-actions { gap: 12px; }
  .artifact-preview .preview-actions button { width: 40px; height: 40px; }
}
#usageMenuButton > small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.usage-bucket { border: 1px solid var(--border-strong); border-radius: 16px; padding: 20px; margin: 20px 0; }
.usage-bucket h3 { margin: 0 0 20px; font-size: 16px; }
.usage-window { margin-top: 20px; }
.usage-window-heading { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.usage-window progress { display: block; width: 100%; height: 6px; border: 0; border-radius: 8px; overflow: hidden; margin: 12px 0 8px; background: var(--surface-3); accent-color: var(--text); }
.usage-window progress::-webkit-progress-bar { background: var(--surface-3); }
.usage-window progress::-webkit-progress-value { background: var(--text); }
.usage-window small { color: var(--muted); font-size: 12px; }
#usageDialog .dialog-head { align-items: center; }
.client-activity > svg { width: 16px; height: 16px; flex-shrink: 0; }
.live-activity-label { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline-activity.is-running { min-width: 0; width: 100%; }
.inline-activity.is-running > svg { flex-shrink: 0; }
.inline-activity.is-running > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Desktop cadence: first sweep after 600 ms, 1 second sweep every 4 seconds. */
.activity-breathing { position: relative; display: inline-block; color: var(--muted); }
.activity-sweep { position: absolute; inset: 0; width: 100%; pointer-events: none; transform: translateX(-50%); overflow: hidden; mask-image: linear-gradient(90deg,transparent 0%,#000 20% 30%,transparent 50% 100%); animation: activity-sweep 4s steps(192,end) .6s infinite; }
.activity-sweep > span { display: block; width: 100%; transform: translateX(50%); color: var(--text); animation: activity-highlight 4s steps(192,end) .6s infinite; white-space: inherit; }
@keyframes activity-sweep { 0% { transform: translateX(-50%); opacity: 1; } 25% { transform: translateX(150%); opacity: 1; } 25.01%,100% { transform: translateX(150%); opacity: 0; } }
@keyframes activity-highlight { 0% { transform: translateX(50%); } 25%,100% { transform: translateX(-150%); } }
@media(prefers-reduced-motion:reduce) { .activity-sweep { display: none; animation: none; } .activity-sweep > span { animation: none; } }
#taskMenu button[data-task-action="archive"] { color: var(--text); }
/* Sidebar hierarchy and dark surfaces sampled again from the Windows client. */
:root { --bg: #181818; --sidebar: #141414; --bg-deep: #141414; --sidebar-selected: #262626; --user-bubble: #173e76; }
.sidebar-head { gap: 8px; padding: 0 8px; }
.sidebar-head .host-trigger { flex: 1; min-width: 0; width: auto; margin: 0; padding: 6px 8px; min-height: 32px; display: flex; gap: 6px; }
.sidebar-head .host-copy { flex: 0 1 auto; min-width: 0; }
.sidebar-head .host-copy strong { font-size: 17px; font-weight: 600; }
.sidebar-head .host-copy small, .sidebar-head .host-glyph { display: none; }
.sidebar-head .host-trigger > svg { flex-shrink: 0; width: 12px; height: 12px; }
.sidebar-header-actions { display: flex; align-items: center; flex-shrink: 0; gap: 2px; }
.sidebar-header-actions .icon-button { position: relative; width: 28px; height: 32px; color: var(--muted); }
.sidebar-header-actions svg { width: 16px; height: 16px; }
#attentionCount { position: absolute; right: 3px; top: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); font-size: 0; }
.sidebar-primary { display: grid; gap: 0; margin: 0 0 12px; }
.sidebar-primary button { display: flex; align-items: center; gap: 10px; min-height: 31px; width: 100%; padding: 5px 8px; border: 0; border-radius: 7px; background: transparent; color: var(--text-soft); text-align: left; font-size: 14px; }
.sidebar-primary svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-primary span { flex: 1; }
.sidebar-primary small { font-size: 11px; color: var(--faint); }
.sidebar-primary button:hover:not(:disabled), .sidebar-show-more:hover { background: var(--sidebar-selected); }
.sidebar-primary button:disabled { opacity: .6; cursor: default; }
.project-heading:hover, .thread-row.active { background: var(--sidebar-selected); }
.section-heading { font-weight: 400; }
#pinnedSection, .recent-section { margin-bottom: 12px; }
.recent-section { margin-top: 12px; }
.recent-list { display: grid; gap: 0; }
.recent-list .thread-row { width: 100%; }
.recent-list .thread-row-copy small { display: none; }
.sidebar-show-more { margin: 4px 0; padding: 5px 8px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 14px; text-align: left; }
.activity-dialog { width: min(480px,calc(100vw - 24px)); padding: 18px 12px 12px; max-height: 75dvh; }
.activity-dialog .dialog-head { padding: 0 8px; margin-bottom: 6px; }
.activity-dialog .search-scope { margin-left: 8px; }
.activity-results { max-height: 55dvh; overflow-y: auto; }
.activity-results .thread-row { width: 100%; }
.activity-results .thread-row-copy small { display: block; }
.activity-section-title { padding: 10px 8px 4px; }
.message-card.user { background: var(--user-bubble); }
.settings-nav { background: var(--sidebar); }
#composer { background: #2b2b2b; }
.app-shell.sidebar-collapsed #collapseSidebar { display: none; }
@media(max-width:820px), (pointer:coarse) {
  .sidebar-header-actions .icon-button { width: 40px; height: 40px; }
  .sidebar-primary button { min-height: 40px; }
  .sidebar-show-more { min-height: 40px; }
}
.sidebar-head .host-trigger, .sidebar-head .host-trigger:hover { border-color: transparent; }
.sidebar-head .host-trigger:hover { background: var(--sidebar-selected); }
/* Each native step keeps its position; elapsed time precedes the response. */
.turn-timing { color: var(--muted); font-size: 14px; line-height: 22px; padding: 0 0 10px; margin: 12px 0 16px; border-bottom: 1px solid var(--border-strong); }
.inline-activity { font-size: 14px; min-height: 24px; margin: 8px 0; padding: 4px 0; line-height: 1.6; }
.inline-activity > svg { width: 16px; height: 16px; flex-shrink: 0; }
.inline-activity > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.image-view-step > summary { cursor: pointer; list-style: none; }
.image-view-step > summary::-webkit-details-marker { display: none; }
.image-view-step > summary > svg:last-child { width: 12px; }
.viewed-images { display: flex; gap: 8px; padding: 2px 0 12px; }
.viewed-images .attachment-thumbnail, .user-attachments .attachment-thumbnail { width: 80px; height: 80px; object-fit: cover; border-radius: 10px; }
.user-attachments { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-bottom: 8px; }
#activityButton[aria-pressed="true"] { color: var(--blue); background: var(--sidebar-selected); border-radius: 8px; }
.sidebar-activity .activity-date-group { margin-bottom: 12px; }
.sidebar-activity .flat-thread-list { gap: 0; }
.sidebar-activity .thread-row { min-height: 54px; width: 100%; padding: 7px 8px; }
.sidebar-activity .thread-row-copy small { display: block; color: var(--muted); font-size: 12px; line-height: 18px; margin-top: 0; }
.sidebar-activity .thread-row-copy strong { font-size: 14px; line-height: 20px; }
.sidebar-activity .thread-update-label { margin-top: 2px; font-size: 11px; line-height: 16px; }
/* Interaction audit against the running Windows test project, 2026-09-12. */
.turn-timing { display: flex; align-items: center; gap: 4px; }
.turn-time-label { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; }
button.turn-time-label { cursor: pointer; }
.time-chevron { width: 12px; height: 12px; pointer-events: none; transform: rotate(-90deg); }
.turn-time-label[aria-expanded="true"] + .time-chevron { transform: none; }
.tool-step > summary { list-style: none; cursor: pointer; }
.tool-step > summary::-webkit-details-marker { display: none; }
.tool-step > summary > svg:last-child { width: 12px; }
.tool-output { margin: 12px 0; padding: 8px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 8px; color: var(--muted); }
.tool-output pre { margin: 12px 0; font: 13px/1.7 ui-monospace,Consolas,monospace; max-height: 280px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.tool-result { display: block; text-align: right; }
.message-group.assistant.commentary { position: relative; margin-bottom: 16px; }
.message-group.assistant.commentary .response-meta { position: absolute; left: 0; bottom: -20px; margin: 0; }
.combined-model-button { display: inline-flex; align-items: center; gap: 4px; border-radius: 12px; }
.combined-model-button #effortLabel { color: var(--muted); font-size: 13px; }
.combined-model-button .fast-mode-icon { width: 13px; color: var(--text); }
#settingsPopover[data-kind="effort"] { width: 256px; padding: 10px 12px 12px; }
.effort-heading { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
#settingsPopover .fast-toggle { display: grid; place-items: center; min-height: 28px; width: 28px; padding: 4px; border: 0; color: var(--muted); background: transparent; }
#settingsPopover .fast-toggle.selected { color: var(--blue); }
#settingsPopover .model-picker-link { display: flex; flex-direction: column; align-items: center; flex: 1; padding: 0 28px 0 0; min-height: 40px; background: transparent; }
.model-picker-link > span { display: flex; align-items: center; gap: 8px; }
.model-picker-link > span svg { width: 12px; transform: rotate(-90deg); }
.model-picker-link small { font-size: 12px; color: var(--muted); }
.effort-slider { appearance: none; height: 24px; background: var(--surface-3); border-radius: 16px; }
.effort-slider::-webkit-slider-thumb { appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 1px solid #ddd; box-shadow: 0 1px 4px #0003; }
.effort-slider::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 1px solid #ddd; }
#settingsPopover[data-kind="model"] { width: 256px; border-radius: 18px; }
#settingsPopover .settings-back-link { display: block; min-height: 28px; color: var(--muted); }
.attachment-menu { width: min(380px,calc(100vw - 24px)); }
.message-queue { width: calc(min(100%, var(--chat-width)) - 24px); margin: 0 auto -1px; border-radius: 16px 16px 0 0; padding: 0 8px; }
.message-queue ol { margin: 0; padding: 0; max-height: 140px; overflow-y: auto; }
.message-queue li { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 2px 4px; }
.message-queue li p { flex: 1; min-width: 0; max-height: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; font-size: 14px; }
.message-queue .queue-steer { flex-shrink: 0; padding: 2px 4px; border: 0; background: transparent; color: var(--muted); }
.message-queue li .icon-button { width: 24px; min-width: 24px; height: 28px; }
.message-queue li .icon-button svg { width: 14px; height: 14px; }
.search-quick-actions { padding: 0 8px 8px; }
.search-quick-actions button { display: flex; align-items: center; width: 100%; gap: 10px; padding: 8px 12px; background: transparent; border: 0; color: var(--text); border-radius: 7px; }
.search-quick-actions button:hover { background: var(--surface-hover); }
.search-quick-actions svg { width: 16px; height: 16px; }
.search-quick-actions span { flex: 1; text-align: left; }
.search-quick-actions kbd, .chat-search-results kbd { font: inherit; font-size: 12px; background: var(--surface-hover); color: var(--muted); border-radius: 6px; padding: 1px 5px; white-space: nowrap; }
.new-chat-screen { position: fixed; left: var(--sidebar-width); right: 0; top: var(--topbar-height); bottom: 0; width: auto; height: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--bg); color: var(--text); z-index: 20; }
.new-chat-screen[open] { display: flex; flex-direction: column; }
.new-chat-back { position: absolute; left: 12px; top: 12px; }
.new-chat-back svg { transform: rotate(90deg); }
.task-start-welcome { min-height: 0; overflow: auto; display: grid; justify-items: center; align-content: center; flex: 1; padding: 40px var(--chat-gutter); text-align: center; }
.task-start-welcome > svg { width: 48px; height: 48px; color: var(--faint); }
.task-start-welcome h2 { max-width: 780px; font-size: 28px; font-weight: 500; }
#taskForm { flex-shrink: 0; width: min(calc(100% - 2 * var(--chat-gutter)),var(--chat-width)); margin: 0 auto calc(16px + env(safe-area-inset-bottom,0px)); }
.task-project-choice { display: flex; align-items: center; gap: 6px; margin: 0 12px; padding: 8px 12px; background: var(--surface); border-radius: 16px 16px 0 0; }
.task-project-choice svg { width: 16px; height: 16px; }
.task-project-choice select { border: 0; background: transparent; color: var(--text); max-width: 100%; font-size: 14px; }
.task-project-choice option { background: var(--surface); }
.task-start-composer { background: #2b2b2b; border: 1px solid var(--border-strong); border-radius: 18px; padding: 12px; }
#taskPromptInput { display: block; width: 100%; resize: none; background: transparent; border: 0; color: var(--text); font: inherit; font-size: 16px; line-height: 1.5; min-height: 48px; }
.task-start-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.task-start-actions small { color: var(--muted); }
.creating-chat .composer-dock { visibility: hidden; }
.sidebar-collapsed .new-chat-screen { left: 0; }
@media(max-width:820px) { .new-chat-screen { left: 0; } .task-start-welcome h2 { font-size: 24px; } #taskForm { width: calc(100% - 24px); } .message-queue { width: calc(min(100%, var(--chat-width)) - 16px); } .search-quick-actions kbd,.chat-search-results kbd { display: none; } }
html[data-gpth-theme="light"] .task-start-composer { background: #fff; }

.jump-latest { display: grid; place-items: center; width: 32px; height: 32px; padding: 6px; background: var(--bg); box-shadow: none; }
.jump-latest svg { width: 20px; height: 20px; }
.settings-search { display: flex; align-items: center; gap: 8px; padding: 5px 9px; background: var(--surface); border-radius: 8px; }
.settings-search svg, .settings-nav button > svg { width: 16px; height: 16px; flex-shrink: 0; }
.settings-search input { width: 100%; min-width: 0; padding: 0; background: transparent; border: 0; color: var(--text); font: inherit; font-size: 14px; }
.settings-nav button[data-settings-page] { display: flex; align-items: center; gap: 8px; }
@media(max-width:820px) { .settings-search { flex-basis: 100%; } }

#settingsPopover .fast-toggle.selected::after { content: none; }

#modelButton svg { display: block; width: 12px; height: 12px; flex-shrink: 0; }

#taskMenu button { grid-template-columns: 18px minmax(0,1fr) auto; }
#taskMenu kbd { font: inherit; color: var(--muted); font-size: 11px; white-space: nowrap; }

.usage-window { display: grid; grid-template-columns: minmax(0,1fr) 96px auto; align-items: center; gap: 24px; padding: 16px; border: 1px solid var(--border-strong); border-radius: 18px; background: var(--surface); }
.usage-window-heading { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.usage-window-heading strong { font-size: 14px; }
.usage-window-heading small { color: var(--muted); }
.usage-window progress { height: 7px; margin: 0; width: 96px; }
.usage-window progress::-webkit-progress-value { background: var(--text); }
.usage-window progress::-moz-progress-bar { background: var(--text); }
.usage-remaining { color: var(--muted); font-size: 14px; white-space: nowrap; }
@media(max-width:620px) { .usage-window { grid-template-columns: minmax(0,1fr) auto; gap: 12px; } .usage-window-heading { grid-column: 1 / -1; } .usage-window progress { width: 100%; } }

.usage-bucket { border: 0; padding: 0; margin: 36px 0; background: transparent; }
.usage-bucket h3 { margin: 0 0 16px; font-size: 16px; }
/* Native side panel, audited in the authorized Windows test project. */
:root { --inspector-width: max(400px,calc((100vw - var(--sidebar-width)) / 2)); }
.native-side-panel { background: var(--bg); border-left: 1px solid var(--border-strong); min-width: 0; }
.side-panel-head { height: var(--topbar-height); min-height: var(--topbar-height); padding: 0 8px; gap: 4px; border-bottom: 0; }
.side-panel-head .icon-button { width: 28px; height: 28px; flex-shrink: 0; }
.inspector #closeInspector { display: inline-flex; }
.side-panel-tabs { display: flex; min-width: 0; overflow-x: auto; gap: 4px; scrollbar-width: thin; }
.side-panel-head-space { flex: 1; }
.side-file-tab { display: flex; align-items: center; border-radius: 9px; max-width: 180px; min-width: 100px; color: var(--muted); }
.side-file-tab.active { background: var(--surface); color: var(--text); }
.side-file-tab-label { display: flex; align-items: center; gap: 8px; min-width: 0; border: 0; background: transparent; padding: 5px 8px; font: inherit; font-size: 14px; color: inherit; }
.side-file-tab-label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-file-tab-label svg { width: 14px; height: 14px; flex-shrink: 0; }
.side-tab-close { border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; padding: 5px; margin-left: auto; }
.side-tab-close svg { width: 12px; height: 12px; }
.side-panel-content { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.side-panel-content.side-home { justify-content: center; align-items: center; }
.artifact-viewer { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
.artifact-viewer-actions { display: flex; align-items: center; gap: 14px; padding: 10px 12px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.artifact-viewer-actions a { color: var(--text-soft); font-size: 13px; text-decoration: none; }
.artifact-viewer-actions button { margin-left: auto; }
.artifact-media { display: flex; flex: 1; min-height: 0; min-width: 0; overflow: auto; align-items: center; justify-content: center; }
.artifact-media > img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.pdf-preview { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; }
.pdf-page-controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; padding: 10px; font-size: 13px; }
.pdf-page-surface { flex: 1; overflow: auto; min-height: 0; }
.pdf-page-surface canvas { display: block; margin: 0 auto 12px; max-width: 100%; background: white; }
.artifact-error { overflow-wrap: anywhere; }
.artifact-preview > .artifact-viewer { min-height: 160px; max-height: calc(100dvh - 100px); }
.side-launcher { display: grid; gap: 4px; width: calc(100% - 56px); max-width: 440px; padding-bottom: 0; }
.side-launcher-action { display: flex; align-items: center; gap: 10px; height: 40px; border: 0; border-radius: 8px; background: var(--surface); color: var(--text); padding: 8px 12px; text-align: left; }
.side-launcher-action svg { width: 16px; height: 16px; }
.side-launcher-action span { font-size: 16px; flex: 1; }
.side-launcher-action kbd { font: inherit; font-size: 12px; color: var(--muted); background: var(--surface-3); border-radius: 5px; padding: 0 5px; }
.file-toolbar { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--border); }
.file-toolbar .icon-button { width: 28px; height: 28px; }
.file-breadcrumb { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; overflow: hidden; font-size: 13px; white-space: nowrap; color: var(--muted); }
.file-breadcrumb strong { color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.file-panel-body { display: grid; grid-template-columns: minmax(0,1fr) min(240px,52%); flex: 1; min-height: 0; }
.file-panel-body.tree-hidden { grid-template-columns: minmax(0,1fr); }
.file-panel-body.tree-hidden .side-file-tree { display: none; }
.side-file-viewer { overflow: auto; min-width: 0; min-height: 0; }
.side-file-tree { border-left: 1px solid var(--border); padding: 8px; overflow-y: auto; min-width: 0; }
.file-filter { display: flex; align-items: center; gap: 5px; border: 1px solid var(--border-strong); border-radius: 9px; height: 28px; padding: 4px 8px; margin-bottom: 6px; }
.file-filter svg { width: 14px; height: 14px; flex-shrink: 0; }
.file-filter input { border: 0; background: transparent; padding: 0; min-width: 0; width: 100%; font: inherit; font-size: 14px; color: var(--text); }
.file-entry { display: flex; align-items: center; gap: 8px; padding: 4px 6px; min-height: 28px; width: 100%; border: 0; border-radius: 7px; background: transparent; color: var(--text); text-align: left; font: inherit; font-size: 13px; }
.file-entry svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.file-entry span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-entry:hover,.file-entry.active { background: var(--surface); }
.side-note { margin: 12px; font-size: 13px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.file-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 100%; padding: 20px; text-align: center; }
.file-empty svg { width: 28px; height: 28px; color: var(--muted); margin-bottom: 8px; }
.file-empty p { font-size: 14px; color: var(--muted); margin: 0; }
.file-source { margin: 0; padding: 3px 8px; font: 13px/1.7 Consolas,ui-monospace,monospace; tab-size: 4; }
.file-source-line { display: flex; min-height: 22px; }
.file-line-number { color: var(--muted); user-select: none; min-width: 28px; padding-right: 12px; text-align: right; flex-shrink: 0; }
.file-source code { font: inherit; white-space: pre; }
.side-file-image { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.file-open-link { display: inline-block; margin: 16px; color: var(--text); }
@media(min-width:1101px) {
 .app-shell:not(.inspector-closed) { --chat-gutter: 16px; }
 .app-shell.side-panel-expanded:not(.inspector-closed) { grid-template-columns: var(--sidebar-width) 0 minmax(0,1fr); }
 .side-panel-expanded .workspace { visibility: hidden; }
}
@media(max-width:1100px) {
 .native-side-panel { width: min(640px,100vw); top: 0; bottom: 0; height: 100dvh; max-height: none; border-radius: 0; }
 .side-panel-expanded .native-side-panel { width: 100vw; }
}

.file-directory > svg { transform: rotate(-90deg); width: 12px; }
.file-directory[aria-expanded="true"] > svg { transform: none; }
@media(min-width:1101px) { .app-shell:not(.inspector-closed) #inspectorButton { display: none; } }

/* Codex 26.903.9818.0 summary resources: 300px, bottom/end + 16px,
   24px corner, 10px body padding, 14px section inset and 28px rows.
   Browser viewport constraints and native host reads are handled in outputs.js. */
.outputs-panel { position: fixed; z-index: 75; width: 300px; margin: 0; padding: 10px 14px; border: 0; border-radius: 24px; background: var(--surface-3); color: var(--text); box-shadow: 0 8px 32px #0003; overflow: auto; overscroll-behavior: contain; outline: none; transform-origin: top right; animation: outputs-enter 150ms ease-out; }
:root[data-gpth-theme="light"] .outputs-panel { background: #fff; }
.outputs-heading { display: flex; align-items: center; gap: 6px; min-height: 28px; color: var(--muted); }
.outputs-heading h2 { margin: 0; padding: 0; font-size: 14px; line-height: 20px; font-weight: 600; }
.outputs-heading > span { font-size: 12px; }
.outputs-heading .icon-button { margin-left: auto; width: 24px; height: 24px; }
.outputs-heading .icon-button svg { width: 16px; height: 16px; }
.outputs-list { display: flex; flex-direction: column; gap: 2px; margin: 0 -8px; padding: 0 8px; }
.output-row { display: flex; position: relative; align-items: center; gap: 4px; width: 100%; min-width: 0; min-height: 28px; margin: 0; padding: 4px 0; border: 0; border-radius: 6px; background: transparent; color: var(--text); text-align: left; text-decoration: none; font: inherit; font-size: 14px; line-height: 20px; }
.output-row::before { content: ''; position: absolute; inset: 0 -8px; border-radius: 6px; pointer-events: none; }
.output-row:not(:disabled):hover::before { background: color-mix(in srgb,var(--text) 6%,transparent); }
.output-row:focus-visible { outline: 2px solid #82b4ff; outline-offset: 1px; }
.output-row:disabled { color: var(--muted); cursor: not-allowed; }
.output-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 18px; width: 18px; height: 18px; margin-right: 8px; position: relative; }
.output-icon svg { width: 16px; height: 16px; }
.output-icon img { width: 18px; height: 18px; border-radius: 3px; object-fit: cover; }
.output-label { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; position: relative; }
.outputs-status { margin: 4px 0; font-size: 13px; line-height: 20px; color: var(--muted); overflow-wrap: anywhere; }
.outputs-more { border: 0; border-radius: 6px; margin-top: 6px; padding: 4px 0; min-height: 28px; background: none; color: var(--muted); text-align: left; font: inherit; font-size: 13px; }
.outputs-more:hover { color: var(--text); }
#outputsButton { width: 28px; height: 28px; }
#outputsButton svg { width: 16px; height: 16px; stroke-width: 1.05; }
#outputsButton[aria-pressed=true] { background: var(--surface-3); color: var(--text); }
@keyframes outputs-enter { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 820px) { #outputsButton { width: 36px; height: 40px; } .output-row,.outputs-more { min-height: 36px; } }
@media (prefers-reduced-motion: reduce) { .outputs-panel { animation: none; } }

/* Composer geometry and context usage, verified against installed desktop resources. */
.send-button { display: inline-grid; place-items: center; grid-template-columns: minmax(0,1fr); flex: 0 0 28px; width: 28px!important; min-width: 28px; height: 28px!important; padding: 0; line-height: 1; box-sizing: border-box; }
.send-button svg, .send-button.stop svg { display: block; width: 20px; height: 20px; margin: 0; }
.send-button:not(.stop) svg { transform: none; }
.context-usage-button { display: inline-grid; place-items: center; width: 20px; height: 28px; min-width: 20px; flex: 0 0 20px; padding: 0; background: transparent; border: 0; color: var(--muted); border-radius: 6px; }
.context-usage-button:hover { color: var(--text); }
.context-usage-button svg { width: 12px; height: 12px; stroke-width: 2; }
.context-progress { transition: stroke-dashoffset 120ms ease-out,opacity 120ms ease-out; }
.context-usage-tooltip { position: fixed; z-index: 180; display: flex; flex-direction: column; gap: 2px; width: max-content; max-width: min(230px,calc(100vw - 16px)); padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface-2); color: var(--text); box-shadow: var(--shadow-lg); font-size: 12px; text-align: center; pointer-events: none; }
.context-usage-tooltip small { color: var(--muted); font-size: inherit; }
#settingsPopover[data-kind="effort"], #settingsPopover[data-kind="model"], #settingsPopover[data-kind="speed"] { width: 254px; max-width: calc(100vw - 16px); max-height: min(480px,calc(100dvh - 80px)); overflow-y: auto; transform-origin: bottom right; }
#settingsPopover button[data-setting-value] { display: flex; justify-content: space-between; align-items: center; }
.setting-check-space { width: 16px; flex: 0 0 16px; }
.settings-feedback { display: block; color: var(--muted); padding: 6px 0 0; font-size: 11px; }
.settings-feedback:empty { display: none; }
.effort-track { --effort-progress: 0%; position: relative; height: 28px; display: flex; align-items: center; }
.effort-track::before { content: ''; position: absolute; height: 24px; inset-inline: 0; border-radius: 14px; background: linear-gradient(to right,#3b82f6 var(--effort-progress),var(--surface-3) var(--effort-progress)); }
.effort-stops { position: absolute; display: flex; justify-content: space-between; inset-inline: 12px; pointer-events: none; }
.effort-stops i { height: 4px; width: 4px; border-radius: 50%; background: var(--text); opacity: .35; }
.effort-track .effort-slider { position: relative; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; z-index: 1; }
.effort-slider::-webkit-slider-runnable-track { background: transparent; height: 28px; }
.effort-slider::-moz-range-track { background: transparent; height: 28px; }
.effort-heading .model-picker-link { padding-inline: 0 28px; }
@media(prefers-reduced-motion:reduce) { .context-progress { transition: none; } }

#settingsPopover .effort-heading .fast-toggle { display: grid; place-items: center; flex: 0 0 28px; width: 28px; min-height: 28px; height: 28px; padding: 0; align-self: flex-start; }

#settingsPopover .effort-heading .model-picker-link { padding: 0; }
#settingsPopover .effort-heading .reset-model-button { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; min-height: 28px; padding: 0; background: transparent; color: var(--muted); align-self: flex-start; }
.reset-model-button svg { width: 14px; height: 14px; }

/* Composer popovers follow the inspected desktop hierarchy. */
.attachment-menu { max-width: calc(100vw - 16px); max-height: min(320px,calc(100dvh - 160px)); overflow-y: auto; padding: 4px; border-radius: 18px; background: var(--surface-2); }
.attachment-menu .popover-label { display: block; padding: 6px 8px; font-size: 14px; }
.attachment-menu button,.queue-menu button { display: flex; align-items: center; gap: 8px; min-height: 31px; width: 100%; border: 0; border-radius: 8px; padding: 5px 8px; background: transparent; text-align: left; color: var(--text); font-size: 14px; line-height: 21px; }
.attachment-menu button:not(:disabled):hover,.attachment-menu button:focus-visible,.queue-menu button:not(:disabled):hover,.queue-menu button:focus-visible { background: var(--surface-hover); }
.attachment-menu button svg,.queue-menu button svg { width: 16px; height: 16px; flex-shrink: 0; }
.attachment-menu button span,.queue-menu button span { flex-shrink: 0; }
.attachment-menu button small,.queue-menu button small { color: var(--muted); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.attachment-menu button:disabled,.queue-menu button:disabled { opacity: .6; cursor: default; }
.queue-menu { width: 242px; max-width: calc(100vw - 16px); padding: 4px; border-radius: 14px; }
.queue-menu button small { margin-left: auto; }
@media(max-width:620px) { .attachment-menu button,.queue-menu button { min-height: 36px; } .attachment-menu button small { font-size: 11px; } }

/* Completed actions collapse into adjacent groups, as in the desktop timeline. */
.activity-group { margin: 0; }
.activity-group > summary { list-style: none; cursor: pointer; }
.activity-group > summary::-webkit-details-marker { display: none; }
.activity-group > summary > svg:last-child { width: 12px; opacity: 0; transition: opacity .15s; }
.activity-group:hover > summary > svg:last-child,.activity-group[open] > summary > svg:last-child,.activity-group > summary:focus-visible > svg:last-child { opacity: 1; }
.activity-group:not([open]) > summary > svg:last-child { transform: rotate(-90deg); }
.activity-group-body { padding-left: 22px; }
.activity-group-body.viewed-images { flex-wrap: wrap; }
.conversation-inner > .activity-group > .inline-activity,.conversation-inner > .tool-step > .inline-activity,.conversation-inner > .inline-activity { min-height: 24px; padding: 2px 0; margin: 8px 0; line-height: 20px; }
.activity-group-body .inline-activity { margin: 4px 0; }

.turn-diff-indicator { width: min(100%,var(--chat-width)); margin: 0 auto 8px; display: flex; justify-content: center; }
.turn-diff-indicator[hidden] { display: none; }
.turn-diff-button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; border: 1px solid var(--border); border-radius: 14px; padding: 6px 12px; color: var(--muted); background: var(--surface-2); font-size: 14px; line-height: 20px; }
.turn-diff-button:hover { color: var(--text); background: var(--surface-hover); }
.diff-counts { display: inline-flex; gap: 4px; white-space: nowrap; font-size: 12px; font-variant-numeric: tabular-nums; }
.diff-added { color: #2bbf76; } .diff-deleted { color: #e45454; }
.diff-toolbar { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 12px; border-bottom: 1px solid var(--border); }
.diff-scope { border: 0; padding: 0; background: transparent; color: var(--text); font-size: 14px; opacity: 1; }
.diff-toolbar .mini-button { margin-left: auto; }
.diff-review-body { display: grid; grid-template-columns: minmax(0,1fr) minmax(130px,40%); min-height: 0; flex: 1; }
.diff-viewer { min-width: 0; overflow: auto; }
.diff-file-tree { padding: 8px; min-width: 0; overflow: auto; border-left: 1px solid var(--border); }
.diff-filter { width: 100%; padding: 4px 8px; min-width: 0; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); color: var(--text); }
.diff-file-entry { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30px; border: 0; border-radius: 6px; padding: 5px 7px; background: transparent; color: var(--text); text-align: left; }
.diff-file-entry[aria-pressed="true"],.diff-file-entry:hover { background: var(--surface-hover); }
.diff-file-entry > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.diff-file-heading { display: flex; gap: 8px; align-items: center; padding: 6px 12px; min-height: 33px; border-bottom: 1px solid var(--border); font-size: 12px; }
.diff-file-heading > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diff-source { margin: 0; padding: 0; width: max-content; min-width: 100%; font: 12px/24px ui-monospace,monospace; }
.diff-line { display: flex; min-height: 24px; padding-right: 12px; color: var(--text); }
.diff-line-number { display: inline-block; width: 44px; flex: 0 0 44px; padding-right: 10px; text-align: right; user-select: none; color: var(--muted); }
.diff-source .diff-added { background: rgb(43 191 118 / 13%); border-left: 3px solid #2bbf76; }
.diff-source .diff-deleted { background: rgb(228 84 84 / 13%); border-left: 3px solid #e45454; }
.diff-hunk,.diff-note { padding-left: 10px; color: var(--muted); background: var(--surface-2); }
.native-diff-card { display: flex; align-items: center; gap: 10px; min-height: 70px; margin: 12px 0; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.native-diff-description { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; }
.native-diff-description strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.native-diff-card .mini-button { flex-shrink: 0; }
.native-diff-icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: var(--bg); color: var(--muted); }
.native-diff-icon svg { width: 24px; height: 24px; }
/* Native prompt rail: 26px markers, 2px strokes, nearby markers follow hover. */
.workspace { grid-template-columns: minmax(0,1fr); }
.workspace > .conversation { grid-column: 1; }
.conversation-navigation { grid-column: 1; grid-row: 4; align-self: center; justify-self: start; position: relative; z-index: 4; width: 30px; height: 0; margin-left: 12px; }
.history-rail-track { transform: translateY(-50%); max-height: min(70vh,640px); display: flex; flex-direction: column; }
.history-rail-list { overflow: auto; overscroll-behavior: contain; scrollbar-width: none; min-height: 0; }
.history-rail-list::-webkit-scrollbar { display: none; }
.history-marker,.history-rail-more { display: flex; align-items: center; width: 30px; height: 10px; min-height: 10px; border: 0; padding: 4px 0; color: var(--muted); background: transparent; }
.history-marker-line { width: 26px; height: 2px; background: currentColor; transform-origin: left; transform: scaleX(calc(.2308 + .7692 * var(--rail-level,0))); opacity: calc(.4 + .6 * var(--rail-level,0)); transition: transform .16s,opacity .16s; pointer-events: none; }
.history-marker[data-current-highlight] { color: var(--text); background: transparent; }
.history-marker[data-current-highlight] .history-marker-line { opacity: .65; }
.history-marker:focus-visible { outline-offset: 3px; }
.history-rail-more { height: 22px; min-height: 22px; font-family: inherit; font-size: 12px; line-height: 14px; padding: 2px 0; }
.history-rail-more:not([data-loading="true"]) { font-size: 0; }
.history-rail-more:not([data-loading="true"])::before { content: ""; display: block; flex: none; width: 6px; height: 3px; background: currentColor; clip-path: polygon(0 70%,50% 0,100% 70%,100% 100%,50% 35%,0 100%); }
.history-rail-preview { position: fixed; z-index: 60; padding: 10px 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 14px; box-shadow: 0 8px 24px #0002; font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
.history-rail-preview strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.history-rail-preview p { margin: 4px 0 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; color: var(--muted); }
@media(max-width:820px) {
  .conversation-navigation { margin-left: max(10px, env(safe-area-inset-left, 0px)); width: 20px; }
  .history-marker { width: 20px; height: 8px; min-height: 8px; padding: 3px 0; }
  .history-rail-more { width: 20px; }
  .history-rail-more:not([data-loading="true"])::before { width: 2mm; height: 1mm; }
  .history-marker-line { width: 3.5mm; transform: scaleX(calc(.57142857 + .42857143 * var(--rail-level,0))); opacity: calc(.6 + .4 * var(--rail-level,0)); }
  .history-marker[data-current-highlight] { color: var(--text); background: transparent; }
  .history-marker[data-current-highlight] .history-marker-line { opacity: .8; }
  .conversation:has(+ .conversation-navigation:not([hidden])) { padding-left: calc(max(10px, env(safe-area-inset-left, 0px)) + 22px); }
  .history-rail-preview { max-width: calc(100vw - 16px); }
}
@media(prefers-reduced-motion:reduce) { .history-marker-line { transition: none; } }
/* Completed response resources, file list and actions follow desktop order. */
.native-diff-card { display: block; padding: 0; overflow: hidden; background: var(--bg); }
.native-diff-header { display: flex; align-items: center; gap: 10px; min-height: 70px; padding: 12px; background: var(--surface-2); }
.native-diff-files { border-top: 1px solid var(--border); }
.native-diff-file { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 36px; padding: 7px 12px; border: 0; background: transparent; color: var(--text); text-align: left; font-size: 14px; }
.native-diff-file:hover { background: var(--surface-hover); }
.native-diff-file > span:first-child { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.native-diff-more { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 36px; padding: 7px 12px; border: 0; border-top: 1px solid var(--border); background: var(--surface-2); color: var(--text); text-align: left; font-size: 14px; }
.native-diff-more svg { width: 12px; height: 12px; }
.native-diff-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.reply-output-cards { display: grid; gap: 8px; margin: 12px 0; }
.reply-output-card { display: flex; align-items: center; gap: 10px; min-height: 70px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text); }
.reply-output-icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; background: var(--bg); border-radius: 10px; }
.reply-output-icon svg { width: 22px; height: 22px; }
.reply-output-description { flex: 1; min-width: 0; font-size: 14px; }
.reply-output-description strong,.reply-output-description small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-output-description small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.reply-open-menu,.reply-feedback { position: relative; }
.reply-open-menu > summary { display: flex; align-items: center; gap: 4px; list-style: none; border: 1px solid var(--border); border-radius: 10px; padding: 3px 8px; font-size: 14px; white-space: nowrap; cursor: pointer; }
.reply-open-menu > summary svg { width: 12px; height: 12px; }
.reply-open-choices,.reply-feedback-choices { position: absolute; z-index: 12; min-width: 170px; max-width: calc(100vw - 32px); padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); box-shadow: 0 8px 24px #0002; }
.reply-open-choices { top: calc(100% + 4px); right: 0; }
.reply-feedback-choices { bottom: calc(100% + 4px); left: 0; }
.reply-open-choices a,.reply-open-choices button,.reply-feedback-choices button { display: block; width: 100%; min-height: 31px; border: 0; border-radius: 8px; background: transparent; color: var(--text); text-decoration: none; text-align: left; padding: 6px 8px; font-family: inherit; font-size: 13px; line-height: 20px; }
.reply-open-choices a:hover,.reply-open-choices button:not(:disabled):hover { background: var(--surface-hover); }
.completed-response-actions { display: flex; align-items: center; gap: 4px; margin: 12px 0 18px; color: var(--muted); }
.completed-response-actions > button,.reply-feedback > summary { display: grid; place-items: center; width: 24px; height: 24px; min-height: 24px; min-width: 24px; padding: 4px; border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; list-style: none; }
.completed-response-actions svg { width: 16px; height: 16px; }
.reply-completed-time { font-size: 12px; opacity: 1; }
.completed-response-actions:hover .reply-completed-time,.completed-response-actions:focus-within .reply-completed-time { opacity: 1; }
.reply-feedback > summary::-webkit-details-marker,.reply-open-menu > summary::-webkit-details-marker { display: none; }
.completed-response-actions > button:disabled { opacity: .55; cursor: default; }
/* 0.2.8: sampled native dark surfaces and shared sidebar interactions. */
:root:not([data-gpth-theme="light"]) { --sidebar: #121212; --bg-deep: #121212; --bg: #181818; --sidebar-selected: #242424; --composer-surface: #2a2a2a; --surface-2: #2b2b2b; }
:root[data-gpth-theme="light"] { --composer-surface: #fff; }
#composer,.task-start-composer { background: var(--composer-surface); }
#taskPromptInput:focus,#taskPromptInput:focus-visible { outline: none; box-shadow: none; }
.task-start-composer:focus-within { border-color: var(--border-strong); }
.section-toggle { display: inline-flex; align-items: center; gap: 6px; color: inherit; font: inherit; background: transparent; border: 0; padding: 0; min-height: 28px; cursor: pointer; }
.section-toggle svg { width: 12px; height: 12px; opacity: 0; }
.section-toggle:hover svg,.section-toggle:focus-visible svg,.section-toggle[aria-expanded="false"] svg { opacity: 1; }
.section-toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.sidebar-resize { position: absolute; z-index: 15; left: calc(var(--sidebar-width) - 3px); top: 0; bottom: 0; width: 6px; cursor: col-resize; touch-action: none; }
.sidebar-resize:hover,.sidebar-resize:focus-visible,.resizing-sidebar .sidebar-resize { background: color-mix(in srgb,var(--muted) 35%,transparent); }
.resizing-sidebar,.resizing-sidebar * { cursor: col-resize!important; user-select: none!important; }
.sidebar-collapsed .sidebar-resize { display: none; }
.sidebar-foot { display: flex; align-items: center; gap: 4px; }
.sidebar-foot .profile-row { flex: 1; min-width: 0; width: auto; grid-template-columns: 20px minmax(0,1fr); }
.sidebar-voice { display: inline-flex; align-items: center; gap: 4px; padding: 4px; min-height: 28px; border: 0; background: none; color: var(--muted); font-size: 14px; white-space: nowrap; }
.sidebar-voice svg,.sidebar-help svg { width: 16px; height: 16px; }
.sidebar-help { flex-shrink: 0; width: 28px; height: 28px; }
.history-rail-list { mask-image: linear-gradient(to bottom,transparent,#000 12px,#000 calc(100% - 12px),transparent); }
@media(max-width:820px) { .sidebar-resize { display: none; } }

/* Native project/task actions: compact rows; the row menu is separate from navigation. */
.thread-entry { position: relative; min-width: 0; width: 100%; }
.thread-entry > .thread-row { width: 100%; padding-right: 30px; }
.thread-more { position: absolute; right: 4px; top: 3px; width: 25px; height: 25px; padding: 5px; opacity: 0; color: var(--muted); border-radius: 5px; }
.thread-entry:has(:focus-visible) > .thread-more, .thread-more[aria-expanded="true"] { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .thread-entry:hover > .thread-more { opacity: 1; }
  .thread-entry:hover { background: var(--sidebar-selected); border-radius: 7px; }
}
.sidebar-activity .thread-more { top: 8px; }
.native-action-menu { padding: 7px 0; width: 238px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 24px); overflow-y: auto; }
.project-menu.native-action-menu { width: 230px; }
.native-action-menu > button, .native-action-menu summary, .action-submenu > div > button { display: flex; align-items: center; gap: 10px; width: calc(100% - 8px); min-height: 28px; margin: 0 4px; padding: 5px 10px; border-radius: 4px; font-size: 12px; text-align: left; white-space: nowrap; }
.native-action-menu button span, .native-action-menu summary span { min-width: 0; flex: 1; }
.native-action-menu svg { width: 14px; height: 14px; flex: 0 0 14px; }
.native-action-menu kbd, .native-action-menu small { margin: 0; font-size: 11px; color: var(--muted); font-weight: 400; }
.native-action-menu hr { border: 0; border-top: 1px solid var(--border); margin: 7px 0; }
.native-action-menu button[data-task-action="archive"], .native-action-menu button[data-project-action="remove"] { color: var(--text); }
.native-action-menu button:disabled { opacity: .55; }
.native-action-menu summary { cursor: pointer; list-style: none; }
.native-action-menu summary::-webkit-details-marker { display: none; }
.native-action-menu summary:hover { background: var(--surface-2); }
.native-action-menu summary b { font-size: 16px; font-weight: 400; }
.action-submenu[open] summary b { transform: rotate(90deg); }
.action-submenu > div { margin: 3px 8px 5px; padding: 4px 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; }
.action-submenu > div > button { gap: 6px; padding-left: 6px; padding-right: 6px; }
.project-edit-dialog { width: 520px; max-width: calc(100vw - 32px); border-radius: 18px; }
.project-edit-dialog form { padding: 22px; }
.project-edit-dialog h2 { margin: 0 0 18px; font-size: 18px; }
.project-edit-name { display: flex; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; }
.project-edit-name svg, .project-root-row > svg, #addProjectRoot svg { width: 16px; height: 16px; flex: 0 0 16px; }
.project-edit-name input, .project-root-row input { width: 100%; min-width: 0; height: 36px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; }
.project-edit-name:focus-within, .project-root-row:focus-within { outline: 1px solid var(--muted); }
.project-edit-name input:focus, .project-root-row input:focus { outline: none; }
.project-roots-label { display: block; font-size: 12px; color: var(--muted); margin: 18px 0 8px; }
.project-root-list { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.project-root-row { display: flex; gap: 8px; align-items: center; padding: 0 9px; border-bottom: 1px solid var(--border); }
.project-root-row button { flex: 0 0 24px; padding: 4px; background: transparent; color: var(--muted); }
.project-root-row button svg { width: 14px; height: 14px; }
#addProjectRoot { display: flex; align-items: center; gap: 8px; padding: 10px; width: 100%; font-size: 12px; color: var(--muted); background: transparent; text-align: left; }
.project-edit-dialog .dialog-actions { margin-top: 18px; gap: 8px; }
.project-remove-link { margin-right: auto; color: #dc6c6c; background: transparent; font-size: 12px; }
.project-edit-dialog .field-hint:empty { display: none; }
@media (max-width: 820px) { .thread-more { opacity: 1; } .native-action-menu > button, .native-action-menu summary { min-height: 36px; } .project-edit-dialog form { padding: 18px; } }
.task-start-left, .task-start-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.task-start-right { margin-left: auto; }
.task-start-actions .icon-button { width: 28px; height: 28px; padding: 5px; color: var(--muted); }
.task-start-permission { display: flex; align-items: center; gap: 5px; white-space: nowrap; padding: 0; background: transparent; color: var(--muted); font-size: 12px; }
.task-start-permission svg { width: 14px; height: 14px; }
#taskModelButton { color: var(--text); display: flex; gap: 5px; align-items: center; min-width: 0; max-width: 230px; }
#taskModelButton span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#taskModelButton svg { width: 10px; height: 10px; flex: 0 0 10px; }
.task-start-actions .send-button { width: 28px; height: 28px; padding: 6px; flex: 0 0 28px; display: grid; place-items: center; }
.task-start-actions .send-button svg { width: 16px; height: 16px; }
@media(max-width: 480px) { .task-start-left,.task-start-right { gap: 4px; } #taskModelButton { max-width: 150px; font-size: 12px; } .task-start-permission span { display: none; } }
.native-action-menu { backdrop-filter: none; }
.native-action-menu kbd { border: 0; background: none; padding: 0; }
.creating-chat .task-heading, .creating-chat #outputsButton { visibility: hidden; }
@media(min-width:821px) {
 .native-action-menu .action-submenu > div { position: fixed; width: 230px; max-height: calc(100dvh - 16px); overflow-y: auto; margin: 0; z-index: 91; box-shadow: var(--shadow-lg); background: var(--surface); }
 .action-submenu[open] summary b { transform: none; }
}

.conversation-timestamp { display: flex; justify-content: center; padding: 16px 0; color: var(--muted); font-size: 14px; line-height: 20px; user-select: none; }
.conversation-timestamp strong { font-weight: 500; }
.submitted-input-status { align-self: flex-end; color: var(--muted); font-size: 12px; margin-top: 4px; }

.thread-markers .status-dot.running { width: 12px; height: 12px; border: 1.5px solid color-mix(in srgb,var(--muted) 28%,transparent); border-top-color: var(--blue); border-right-color: var(--blue); background: transparent; box-shadow: none; animation: thread-progress-spin 1s linear infinite; }
@keyframes thread-progress-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .thread-markers .status-dot.running { animation: none; } }

.thread-entry > .thread-more { top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; }
.thread-row { align-items: center; }
.thread-markers { align-items: center; align-self: center; padding-top: 0; }
.thread-markers .status-dot { margin: 0; flex-shrink: 0; }

/* One compact project picker, with scrollable content and persistent actions. */
#addProjectDialog { width: min(520px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: min(720px, calc(100dvh - 32px)); margin: auto; padding: 0; border: 1px solid var(--border-strong); border-radius: 18px; overflow: hidden; }
#addProjectDialog[open] { display: flex; flex-direction: column; }
#addProjectDialog .dialog-head { flex: none; padding: 16px 16px 0; }
.project-mode-switch { display: flex; gap: 4px; flex: none; margin: 12px 16px 4px; padding: 3px; border-radius: 10px; background: var(--surface); }
.project-mode-switch button { flex: 1; min-height: 36px; padding: 6px 10px; border-radius: 7px; font-size: 13px; background: transparent; color: var(--muted); }
.project-mode-switch button[aria-pressed="true"] { background: var(--surface-hover); color: var(--text); }
#addProjectDialog form { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 0; }
#addProjectDialog .form-field { margin: 10px 16px; gap: 4px; }
#addProjectDialog :is(.field-hint,.form-callout,.existing-project-details,.add-project-result) { margin: 8px 16px; }
#addProjectDialog .form-callout { font-size: 12px; }
#existingProjectCandidateSelect { height: auto; min-height: 64px; max-height: 116px; font-size: 13px; }
#existingProjectCandidateSelect option { padding: 4px 6px; }
#addProjectDialog .dialog-actions { position: sticky; bottom: 0; margin: 10px 0 0; padding: 10px 16px; background: var(--surface); }
#addProjectDialog .dialog-actions button { min-height: 38px; }

/* Touch availability, rather than viewport width, includes wide iPads and hybrids. */
@media (hover: none), (any-pointer: coarse) {
  .thread-entry > .thread-more { opacity: 1; }
  .thread-entry:hover, .thread-row:not(.active):hover { background: transparent; }
  /* User requested two thirds of the previously verified touch bottom gap. */
  .composer-dock { padding-bottom: calc(max(8px, env(safe-area-inset-bottom, 0px)) * 2 / 3); }
}

/* Typography hierarchy: section > group > item > supporting metadata. */
:root {
  --type-page-title: 24px;
  --type-dialog-title: 20px;
  --type-content-heading: 18px;
  --type-section-title: 17px;
  --type-group-title: 15px;
  --type-item: 14px;
  --type-description: 13px;
  --type-caption: 12px;
}
.sidebar .section-heading { font-size: 16px; font-weight: 500; line-height: 24px; letter-spacing: 0; text-transform: none; color: var(--text-soft); }
.sidebar .project-row > span { font-size: var(--type-group-title); font-weight: 600; line-height: 21px; }
.sidebar .thread-row-copy strong { font-size: var(--type-item); font-weight: 400; line-height: 21px; }
.sidebar .project-row small { font-size: var(--type-caption); font-weight: 400; }
.title-row h1 { font-size: 16px; font-weight: 600; }
.dialog-head h2, #renameDialog h2, .project-edit-dialog h2 { font-size: var(--type-dialog-title); font-weight: 650; }
.form-field { font-size: var(--type-item); font-weight: 600; }
.dialog-intro { font-size: var(--type-description); }
.field-hint, .dialog-footnote, .form-callout { font-size: var(--type-caption); line-height: 1.5; }
.outputs-heading h2 { font-size: var(--type-section-title); line-height: 24px; color: var(--text); }
.popover-label, .attachment-menu .popover-label { font-size: var(--type-group-title); font-weight: 600; color: var(--text-soft); }
.queue-heading strong { font-size: var(--type-group-title); font-weight: 600; }
.native-diff-header .native-diff-description > strong, .reply-output-description strong { font-size: var(--type-group-title); font-weight: 600; }

.queue-edit-bar { font-size: 13px; color: var(--text-soft); margin-bottom: 6px; }
.queue-edit-bar > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.queue-edit-attachments { flex-wrap: wrap; justify-content: flex-start !important; }
.queue-edit-attachments > span { display: inline-flex; align-items: center; max-width: 100%; overflow-wrap: anywhere; background: var(--surface-3); border-radius: 8px; padding: 3px 6px; }
.queue-edit-attachments button { flex-shrink: 0; border: 0; background: transparent; color: inherit; padding: 2px 6px; }

/* Status and actions share one hit target, including on touch devices. */
.thread-more.has-status { opacity: 1; }
.thread-more > .thread-markers { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.thread-menu-glyph { display: flex; align-items: center; justify-content: center; }
.thread-more.has-status > .thread-menu-glyph { opacity: 0; }
.thread-entry:has(:focus-visible) > .thread-more > .thread-menu-glyph,
.thread-more[aria-expanded="true"] > .thread-menu-glyph { opacity: 1; }
.thread-entry:has(:focus-visible) > .thread-more > .thread-markers,
.thread-more[aria-expanded="true"] > .thread-markers { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .thread-entry:hover > .thread-more > .thread-menu-glyph { opacity: 1; }
  .thread-entry:hover > .thread-more > .thread-markers { opacity: 0; }
}
.thread-pin { display: inline-flex; flex-shrink: 0; align-items: center; color: var(--muted); }
.thread-pin svg { width: 12px; height: 12px; }

/* Stop confirmation overlays the composer and stays anchored above its stop button. */
.popover.stop-confirm { display: flex; align-items: center; flex-wrap: nowrap; gap: 8px; width: max-content; min-width: min(340px, var(--stop-max-width, calc(100vw - 16px))); max-width: var(--stop-max-width, calc(100vw - 16px)); padding: 4px 10px; border-radius: 10px; backdrop-filter: none; }
.stop-confirm[hidden] { display: none; }
.stop-confirm #stopConfirmTitle { flex: 1 0 auto; margin: 0 8px 0 2px; font-size: 14px; line-height: 22px; font-weight: 500; white-space: nowrap; }
.popover.stop-confirm button { display: block; flex: none; width: auto; min-width: 52px; height: clamp(24px, var(--stop-control-space, 36px), 36px); min-height: 0; padding: 0 12px; text-align: center; white-space: nowrap; line-height: 20px; font-size: 14px; }
.popover.stop-confirm .primary-button { background: var(--text); color: var(--bg); }
.popover.stop-confirm .primary-button:hover { background: var(--text-soft); color: var(--bg); }

/* Project readiness remains visible while host discovery is in progress. */
.project-load-status { display: flex; align-items: center; gap: 6px; padding: 4px 8px 10px; color: var(--text-soft); font-size: 12px; line-height: 1.5; }
.project-load-status > span:not(.project-load-spinner) { min-width: 0; }
.project-load-status button { flex: 0 0 auto; margin-left: auto; padding: 3px 6px; color: var(--blue); background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.project-load-spinner { flex: 0 0 12px; width: 12px; height: 12px; border: 1.5px solid var(--border-strong); border-top-color: var(--blue); border-radius: 50%; animation: thread-progress-spin .9s linear infinite; }
@media(prefers-reduced-motion: reduce) { .project-load-spinner { animation: none; } }
.add-project-result.loading, html[data-gpth-theme="light"] .add-project-result.loading { color: var(--text-soft); background: var(--surface); border-color: var(--border-strong); }

/* Task previews retain the existing panel and reading surface. */
.web-preview-media { flex: 1; min-height: 0; display: flex; }
.web-preview-frame { width: 100%; height: 100%; flex: 1; min-height: 0; border: 0; background: #fff; }
.preview-caption { margin: 6px 12px; font-size: 12px; }
.preview-resize { display: none; }
@media(min-width:1101px) {
 .native-side-panel { position: relative; }
 .preview-resize { display: block; position: absolute; z-index: 25; left: -5px; top: 0; bottom: 0; width: 10px; cursor: col-resize; touch-action: none; }
 .preview-resize:hover,.preview-resize:focus-visible { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: -3px; }
 .resizing-preview { cursor: col-resize; user-select: none; }
 .resizing-preview iframe { pointer-events: none; }
}
@media(max-width:620px) { .native-side-panel { width: 100vw; } .artifact-viewer-actions { gap: 10px; } .artifact-viewer-actions button { min-height: 36px; } }

/* A full-width phone preview has an explicit return action, in the same header. */
.preview-back-icon,.preview-back-label { display: none; }
@media(max-width:620px) {
 .side-panel-head .icon-button { width: 40px; height: 40px; }
 .side-panel-head #closeInspector { width: auto; min-width: 68px; padding: 0 8px; gap: 6px; }
 .preview-close-icon { display: none; }
 .preview-back-icon,.preview-back-label { display: inline; }
 .preview-back-label { font-size: 13px; white-space: nowrap; }
 .side-panel-tabs { flex: 1; }
 .side-panel-head-space { display: none; }
 .side-file-tab-label,.side-tab-close { min-height: 40px; }
 .side-tab-close { min-width: 40px; }
 .file-panel-body { grid-template-columns: minmax(0,1fr); }
 .file-panel-body:not(.tree-hidden) .side-file-viewer { display: none; }
 .side-file-tree { border-left: 0; }
 .file-toolbar .icon-button { min-width: 40px; min-height: 40px; }
 .file-toolbar .file-tree-toggle { width: auto; display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; font-size: 13px; }
 .file-entry { min-height: 40px; }
 .file-filter { height: 36px; }
}
@media(max-width:820px) {
 .project-actions .icon-button { width: 40px; height: 40px; }
 .project-row { min-height: 40px; }
 .thread-entry { display: grid; grid-template-columns: minmax(0,1fr) 40px; align-items: center; border-radius: 7px; }
 .thread-entry:has(.thread-row.active) { background: var(--sidebar-selected); }
 .thread-entry > .thread-row { min-height: 40px; padding-right: 9px; }
 .thread-entry > .thread-more { position: relative; inset: auto; transform: none; width: 40px; height: 40px; }
}

/* Connection details stay inside the existing host switcher. */
#hostMenu { overflow-y: auto; }
.host-connection-tools { border-top: 1px solid var(--border); padding: 10px 8px 4px; }
.host-connection-tools > button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 36px; white-space: nowrap; }
.host-connection-tools p { margin: 8px 0; font-size: 12px; line-height: 1.6; color: var(--text-muted); overflow-wrap: anywhere; }
.host-connection-tools summary { cursor: pointer; font-size: 12px; padding: 6px 0; }
.host-connection-tools button[aria-busy="true"] { cursor: progress; }

/* Global navigation stays within the existing total sidebar width. */
.sidebar { display: grid; grid-template-columns: 52px minmax(0, 1fr); }
.global-rail { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 0; padding: 8px 5px; border-right: 1px solid var(--border); background: var(--bg-deep); }
.rail-brand { display: block; flex-shrink: 0; margin: 1px 0 12px; border-radius: 8px; }
.global-rail .rail-action { position: relative; display: inline-grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; min-width: 0; min-height: 40px; padding: 0; margin: 0; border-radius: 9px; color: var(--muted); }
.global-rail .rail-action > svg { width: 19px; height: 19px; }
.global-rail .rail-action[aria-pressed="true"] { color: var(--text); background: var(--sidebar-selected); }
.global-rail .rail-action:not(:disabled):hover { color: var(--text); background: var(--sidebar-selected); }
.global-rail .rail-action:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.global-rail .rail-action:disabled { opacity: .5; cursor: default; }
.rail-spacer { flex: 1; }
.global-rail .profile-avatar { width: 26px; height: 26px; font-size: 10px; }
.rail-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.global-rail #attentionCount { position: absolute; right: 4px; top: 4px; width: 6px; min-width: 0; height: 6px; padding: 0; font-size: 0; line-height: 0; border-radius: 50%; background: var(--blue); }
.sidebar-workspace { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.sidebar-workspace .sidebar-head { flex-shrink: 0; }
.sidebar-workspace .sidebar-scroll { min-height: 0; }
.sidebar-secondary { flex-shrink: 0; margin: 4px 8px 8px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.sidebar-secondary > summary { padding: 10px 4px; cursor: pointer; }
.sidebar-secondary > summary > span { margin-left: 6px; opacity: .8; }
.sidebar-secondary .sidebar-primary { max-height: 210px; overflow-y: auto; margin-bottom: 0; }
.rail-tooltip { pointer-events: none; position: fixed; z-index: 100; width: max-content; max-width: min(260px, calc(100vw - 16px)); padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--sidebar); color: var(--text); box-shadow: 0 4px 16px #0003; font-size: 12px; line-height: 1.4; }
@media (min-width: 821px) {
  .sidebar-header-actions .mobile-only { display: none; }
  .app-shell.sidebar-collapsed { --sidebar-width: 52px; grid-template-columns: 52px minmax(0, 1fr) var(--inspector-width); }
  .app-shell.sidebar-collapsed.inspector-closed { grid-template-columns: 52px minmax(0, 1fr) 0; }
  .app-shell.sidebar-collapsed.side-panel-expanded:not(.inspector-closed) { grid-template-columns: 52px 0 minmax(0, 1fr); }
  .app-shell.sidebar-collapsed .sidebar { display: grid; grid-template-columns: 52px; }
  .app-shell.sidebar-collapsed .sidebar-workspace { display: none; }
  .app-shell.sidebar-collapsed ~ .new-chat-screen { left: 52px; }
}
@media (min-width: 821px) and (max-width: 1100px) {
  .app-shell.sidebar-collapsed { grid-template-columns: 52px minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .sidebar { grid-template-columns: minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr); }
  .global-rail { flex-direction: row; gap: 4px; padding: 7px 8px; border-right: 0; border-bottom: 1px solid var(--border); }
  .rail-brand { width: 28px; height: 28px; margin: 0 auto 0 0; }
  .rail-spacer { display: none; }
  .global-rail .rail-action { flex-basis: 40px; }
  .sidebar-secondary > summary { min-height: 40px; padding-top: 12px; }
}

/* Hidden navigation releases its width; mobile uses ordinary drawer menu rows. */
.nav-caption { display: none; }
.global-rail.as-menu { display: flex; flex-direction: column; align-items: stretch; gap: 0; border: 0; background: transparent; padding: 0; }
.global-rail.as-menu .rail-brand,.global-rail.as-menu .rail-spacer { display: none; }
.global-rail.as-menu .rail-action { display: flex; flex: none; justify-content: flex-start; gap: 10px; width: 100%; padding: 0 8px; }
.global-rail.as-menu .nav-caption { display: inline; font-size: 14px; }
.global-menu-details { max-height: 280px; overflow-y: auto; }
@media(min-width:821px){
 .app-shell.rail-hidden:not(.sidebar-collapsed) ~ .new-chat-screen { left: calc(var(--sidebar-width) - 52px); }
 .app-shell.rail-hidden .sidebar { grid-template-columns: minmax(0,1fr); }
 .app-shell.sidebar-collapsed.rail-hidden { grid-template-columns: 0 minmax(0,1fr) var(--inspector-width); }
 .app-shell.sidebar-collapsed.rail-hidden.inspector-closed { grid-template-columns: 0 minmax(0,1fr) 0; }
 .app-shell.sidebar-collapsed.rail-hidden.side-panel-expanded:not(.inspector-closed) { grid-template-columns: 0 0 minmax(0,1fr); }
 .app-shell.sidebar-collapsed.rail-hidden .sidebar { visibility: hidden; border: 0; }
 .app-shell.sidebar-collapsed.rail-hidden ~ .new-chat-screen { left: 0; }
}
@media(min-width:821px) and (max-width:1100px){.app-shell.sidebar-collapsed.rail-hidden { grid-template-columns: 0 minmax(0,1fr); }}
@media(max-width:820px){.sidebar { grid-template-rows: minmax(0,1fr); }.global-menu-details { margin-top: 0; }}

/* Image gestures are isolated from page scrolling and preview toolbar controls. */
.image-viewer { display:flex; flex-direction:column; flex:1; width:100%; height:100%; min-width:0; min-height:0; overflow:hidden; }
.image-viewport { position:relative; flex:1; min-width:0; min-height:0; overflow:hidden; touch-action:none; user-select:none; }
.image-viewport img { position:absolute; left:50%; top:50%; max-width:none; max-height:none; object-fit:contain; transform-origin:center; pointer-events:none; }
.image-viewport.zoomed { cursor:grab; }
.image-viewport.zoomed:active { cursor:grabbing; }
.image-controls { display:flex; justify-content:center; gap:8px; padding:4px 8px; border-top:1px solid var(--border); flex-shrink:0; }
.image-controls button { min-height:40px; min-width:56px; }
.image-viewport:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }

/* Chat refresh: a single open circular arrow, matching the adjacent toolbar. */
#refreshButton svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
#refreshButton[aria-busy="true"] svg { animation:thread-progress-spin 1s linear infinite; }
@media(prefers-reduced-motion:reduce) { #refreshButton[aria-busy="true"] svg { animation:none; } }

/* Sidebar: primary work above, secondary functions on demand, one account footer. */
.sidebar { grid-template-rows: minmax(0,1fr) auto; }
.sidebar-account-footer { grid-column: 1 / -1; min-width: 0; padding: 2px 8px; padding-bottom: max(2px, env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); background: var(--sidebar); }
.sidebar-account-footer .profile-row { min-height: 44px; grid-template-columns: 28px minmax(0,1fr) 18px; gap: 10px; padding: 4px 8px; }
.sidebar-account-footer .profile-avatar { width: 28px; height: 28px; }
.sidebar-account-footer .profile-copy { gap: 2px; }
.sidebar-account-footer .profile-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 18px; }
.sidebar-account-footer .profile-copy small { display: block; color: var(--muted); font-size: 12px; line-height: 16px; }
.sidebar-account-footer .profile-row > svg { width: 18px; height: 18px; color: var(--muted); }
.sidebar-account-footer .profile-row:hover { background: var(--sidebar-selected); }
.sidebar-account-footer .profile-row:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.sidebar-scroll > .sidebar-primary { margin-bottom: 0; }
.sidebar .global-menu-details { margin: 0 0 16px; max-height: none; overflow: visible; border: 0; }
.global-menu-details > summary { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 8px; border-radius: 7px; list-style: none; color: var(--muted); font-size: 14px; }
.global-menu-details > summary::-webkit-details-marker { display: none; }
.global-menu-details > summary > span { flex: 1; margin: 0; opacity: 1; }
.global-menu-details > summary > svg { width: 18px; height: 18px; flex-shrink: 0; }
.global-menu-details > summary > .menu-disclosure { width: 14px; height: 14px; transform: rotate(-90deg); }
.global-menu-details[open] > summary > .menu-disclosure { transform: none; }
.global-menu-details > summary:hover { background: var(--sidebar-selected); color: var(--text); }
.global-menu-details > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.secondary-menu-body { margin: 4px 0 8px 8px; padding: 0 0 0 8px; border-left: 1px solid var(--border); }
.sidebar .secondary-menu-body .sidebar-primary { max-height: none; overflow: visible; margin: 0; }
.secondary-menu-body .sidebar-primary > button { min-height: 40px; }
.secondary-menu-body .secondary-unavailable { border-top: 1px solid var(--border); padding-top: 4px; }
.sidebar .project-row { min-height: 36px; height: auto; }
.sidebar .project-row > span { font-size: 14px; font-weight: 600; }
.sidebar .thread-entry { display: grid; grid-template-columns: minmax(0,1fr) 32px; align-items: center; border-radius: 7px; }
.sidebar .thread-entry:has(.thread-row.active) { background: var(--sidebar-selected); }
.sidebar .thread-entry > .thread-row { min-height: 34px; padding-right: 6px; }
.sidebar .thread-entry > .thread-more { position: relative; inset: auto; transform: none; width: 32px; height: 32px; }
.sidebar .thread-list { margin-bottom: 12px; }
@media (min-width:821px) {
 .app-shell.sidebar-collapsed .sidebar-account-footer { padding: 2px 6px; padding-bottom: max(2px, env(safe-area-inset-bottom, 0px)); }
 .app-shell.sidebar-collapsed .sidebar-account-footer .profile-row { display: grid; place-items: center; grid-template-columns: 1fr; width: 40px; height: 40px; min-height: 40px; padding: 0; }
 .app-shell.sidebar-collapsed .sidebar-account-footer .profile-copy,
 .app-shell.sidebar-collapsed .sidebar-account-footer .profile-row > svg { display: none; }
}
@media (max-width:820px), (any-pointer:coarse) {
 .sidebar .global-menu-details > summary { min-height: 40px; padding: 8px; }
 .sidebar .project-row { min-height: 40px; }
 .sidebar .project-actions .icon-button { width: 40px; height: 40px; }
 .sidebar .thread-entry { grid-template-columns: minmax(0,1fr) 40px; }
 .sidebar .thread-entry > .thread-row { min-height: 40px; }
 .sidebar .thread-entry > .thread-more { width: 40px; height: 40px; }
}

.host-connection-tools > button + button { margin-top: 8px; }
#hostRenameDialog .rename-description { margin: 0 18px 12px; font-size: 13px; line-height: 1.5; }
#hostRenameError { margin: 12px 18px; font-size: 13px; color: var(--red, #d16b6b); }
#hostRenameError:empty { display: none; }

/* The single account entry belongs to the rail when that rail is visible. */
.global-rail > .rail-account { display: grid; place-items: center; grid-template-columns: 1fr; flex: 0 0 40px; width: 40px; height: 40px; min-height: 40px; padding: 0; margin-top: auto; gap: 0; }
.global-rail > .rail-account .profile-copy,
.global-rail > .rail-account > svg { display: none; }
.global-rail > .rail-account:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }

/* Balanced sidebar legibility and conversation density, 2026-10-28. */
.sidebar .project-row > span { font-size: 16px; }
.sidebar .thread-row-copy strong { font-size: 15px; }
.global-rail .rail-action > svg { width: 21px; height: 21px; flex-shrink: 0; }
.sidebar .project-row > svg { width: 18px; height: 18px; flex-shrink: 0; }
.assistant-body, .markdown-body, .message-card.user { font-size: 16px; line-height: 25px; }

/* Theme-aware project picker; compact bottom sheet on phones. */
.task-project-choice { padding: 4px 8px; }
#taskProjectButton { display:flex; align-items:center; gap:8px; width:100%; min-width:0; min-height:44px; border:0; background:transparent; color:var(--text); text-align:left; font:inherit; font-size:15px; cursor:pointer; }
#taskProjectButton span { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#taskProjectButton svg { flex:none; width:18px; height:18px; }
#taskProjectPicker { box-sizing:border-box; width:min(420px,calc(100vw - 24px)); max-width:none; max-height: min(560px,75dvh); padding:12px; color:var(--text); background:var(--surface); border:1px solid var(--border); border-radius:16px; overflow:hidden; }
#taskProjectPicker::backdrop { background:#0006; }
#taskProjectPicker header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 4px 8px 12px; }
#taskProjectPicker h2 { margin:0; font-size:16px; font-weight:600; }
#taskProjectPicker header button { width:44px; height:44px; }
#taskProjectOptions { max-height:min(460px,calc(75dvh - 90px)); overflow-y:auto; overscroll-behavior:contain; }
#taskProjectOptions button { display:flex; align-items:center; gap:12px; width:100%; min-height:48px; padding:12px; border:0; border-radius:8px; background:transparent; color:var(--text); font:inherit; font-size:15px; text-align:left; cursor:pointer; }
#taskProjectOptions button:hover, #taskProjectOptions button[aria-pressed="true"] { background:var(--surface-hover); }
#taskProjectOptions span { flex:1; min-width:0; overflow-wrap:anywhere; line-height:1.5; }
#taskProjectOptions svg { width:18px; height:18px; flex:none; }
#taskProjectOptions .project-choice-check { visibility:hidden; color:var(--blue); }
#taskProjectOptions [aria-pressed="true"] .project-choice-check { visibility:visible; }
@media(max-width:820px) { #taskProjectPicker { margin:auto auto max(12px,env(safe-area-inset-bottom)); } }

/* Compact host menu: status dots and per-device actions. */
#hostMenu .host-menu-heading { display:flex; align-items:center; gap:4px; padding:2px 2px 8px; }
#hostMenu .host-menu-heading .popover-label { flex:1; padding:4px; white-space:nowrap; }
#hostMenu .host-menu-heading button { width:auto; min-height:36px; padding:6px 8px; font-size:12px; border:1px solid var(--border); }
#hostMenu .host-entry { position:relative; }
#hostMenu .host-option { grid-template-columns:26px minmax(0,1fr) 8px; padding-right:40px; }
#hostMenu .host-option.selected::after { display:none; }
#hostMenu .host-option-state { display:flex; align-items:center; }
#hostMenu .host-more { position:absolute; right:4px; top:50%; transform:translateY(-50%); display:grid; place-items:center; width:32px; height:32px; min-height:32px; padding:0; opacity:0; pointer-events:none; }
#hostMenu .host-more svg { width:18px; height:18px; }
#hostMenu .host-entry:hover .host-more, #hostMenu .host-entry:focus-within .host-more { opacity:1; pointer-events:auto; }
#hostMenu .host-connection-tools { border:0; margin:0; padding:0 8px; }
#hostConnectionHelpBody { font-size:12px; line-height:1.6; color:var(--muted); }
@media(hover:none),(pointer:coarse) { #hostMenu .host-more { opacity:1; pointer-events:auto; width:40px; height:40px; } #hostMenu .host-option { padding-right:48px; } }
#hostMenu .host-menu-heading button { display:inline-flex; align-items:center; justify-content:center; flex:none; white-space:nowrap; }
#hostMenu .host-option-state .status-dot { flex:none; width:7px; height:7px; }

/* Keep status at the outer edge, with actions immediately before it. */
#hostMenu .host-option { padding-right:8px; column-gap:8px; }
#hostMenu .host-option-copy { padding-right:36px; min-width:0; }
#hostMenu .host-more { right:20px; }
@media(hover:none),(pointer:coarse) { #hostMenu .host-option { padding-right:8px; } #hostMenu .host-option-copy { padding-right:44px; } }

/* Region controls and header notifications. */
#activityButton { position:relative; flex:none; }
#activityButton .nav-caption { display:none; }
#activityButton #attentionCount { position:absolute; right:4px; top:4px; width:6px; min-width:0; height:6px; padding:0; font-size:0; line-height:0; border-radius:50%; background:var(--blue); }
.global-rail > #toggleGlobalNav { margin:0; flex:none; }
.sidebar-header-actions { flex-shrink:0; }
#projectsSection .section-actions #collapseSidebar { width:28px; min-width:28px; height:28px; padding:4px; }


/* The account footer is one continuous hit and highlight area. */
.sidebar-account-footer, .app-shell.sidebar-collapsed .sidebar-account-footer { padding:0; }
.sidebar-account-footer .profile-row { width:100%; margin:0; border:0; border-radius:0; min-height:48px; padding:6px 16px; padding-bottom:calc(4px + max(2px, env(safe-area-inset-bottom, 0px))); }
.sidebar-account-footer .profile-row:hover, .sidebar-account-footer .profile-row:active, .sidebar-account-footer .profile-row[aria-expanded="true"] { background:var(--sidebar-selected); }
.app-shell.sidebar-collapsed .sidebar-account-footer .profile-row { width:100%; height:auto; min-height:44px; }

/* Clearer sidebar entry points with a shared text alignment. */
.sidebar-header-actions #activityButton, .sidebar-header-actions #taskSearch { width:36px; height:36px; padding:6px; }
.sidebar-header-actions #activityButton svg, .sidebar-header-actions #taskSearch svg { width:21px; height:21px; }
#newConversationButton, .sidebar .global-menu-details > summary { font-size:16px; min-height:40px; padding:8px; gap:10px; }
#newConversationButton > svg, .sidebar .global-menu-details > summary > svg:first-child { width:20px; height:20px; flex:none; }
.sidebar .section-actions .project-add-action { min-height:32px; width:32px; height:32px; padding:0; }
.sidebar .section-actions .project-add-action svg { width:18px; height:18px; flex:none; stroke-width:2.5; }
@media(max-width:820px),(pointer:coarse) { .sidebar-header-actions #activityButton, .sidebar-header-actions #taskSearch { width:40px; height:40px; } .sidebar .section-actions .project-add-action { min-height:40px; width:40px; height:40px; } }

.reply-output-link { display:flex; align-items:center; gap:12px; flex:1; min-width:0; color:inherit; text-decoration:none; align-self:stretch; }
.reply-output-link:hover strong { text-decoration:underline; }
.side-preview-actions { display:flex; flex:none; align-items:center; }
.side-preview-actions .artifact-viewer-actions { display:flex; align-items:center; gap:2px; padding:0; border:0; min-height:0; }
.side-preview-actions .icon-button { display:inline-grid; place-items:center; width:32px; height:36px; min-width:32px; padding:6px; margin:0; }
.side-preview-actions svg { width:18px; height:18px; }
.side-panel-head:has(.side-preview-actions:not(:empty)) .side-panel-head-space { flex:0; }
@media(max-width:620px){.side-panel-head { gap:2px; padding-left:4px; padding-right:4px; }.side-panel-head:has(.side-preview-actions:not(:empty)) .preview-back-label { display:none; }.side-preview-actions .icon-button { width:30px; min-width:30px; }}

/* Compact sidebar actions remain readable and reachable with every input method. */
.native-action-menu { padding: 6px 0; }
.native-action-menu > button, .native-action-menu summary, .action-submenu > div > button {
  min-height: 36px; padding: 7px 12px; font-size: 14px; line-height: 20px;
}
.native-action-menu svg { width: 16px; height: 16px; flex-basis: 16px; }
.native-action-menu kbd, .native-action-menu small { font-size: 12px; }
.native-action-menu :is(button, summary):focus-visible,
.sidebar :is(button, summary):focus-visible {
  outline: 2px solid var(--blue); outline-offset: -2px;
}
.native-action-menu :is(button, summary):focus-visible { background: var(--sidebar-selected); }
@media (max-width: 820px), (any-pointer: coarse) {
  .native-action-menu > button, .native-action-menu summary, .action-submenu > div > button {
    min-height: 44px; padding-top: 11px; padding-bottom: 11px;
  }
}

.thread-markers .status-dot.unread { width: 7px; height: 7px; background: var(--blue); box-shadow: none; }

/* Keep the task title on one line without crowding the toolbar controls. */
.workspace { grid-template-rows: minmax(var(--topbar-height), max-content) auto auto minmax(0, 1fr) auto; }
.title-row h1 { max-width: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; line-height: 22px; }
.topbar { padding-top: 8px; padding-bottom: 8px; }
.topbar-actions, .title-row > .icon-button { flex-shrink: 0; }

/* B01 has a single navigation entry; per-region collapse controls stay in their sidebars. */
.topbar > #mobileMenuButton:not([hidden]) { display: inline-grid; flex-shrink: 0; }

/* Make the single restore entry easier to see and closer to the left edge. */
#mobileMenuButton { color: var(--text-soft); margin-left: -8px; }
#mobileMenuButton:hover { color: var(--text); }
@media (max-width: 820px) { #mobileMenuButton { margin-left: -4px; } }

.history-rail-preview strong { padding-right: 28px; }
.history-preview-close { position:absolute; right:4px; top:4px; width:28px; height:28px; padding:4px; border:0; background:transparent; color:var(--text-soft); display:grid; place-items:center; }
.history-preview-close svg { width:16px; height:16px; }

/* Mobile outputs share the right panel with previews. */
.side-outputs-button { display: none; }
@media(max-width:820px) {
  #outputsButton { display: none; }
  .side-outputs-button { display: inline-flex; flex: none; align-items: center; justify-content: center; min-height: 36px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; }
  .side-outputs-button:hover,.side-outputs-button[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
  .outputs-docked { position: static; z-index: auto; width: auto; min-height: 0; flex: 1; margin: 0; padding: 12px; border-radius: 0; box-shadow: none; background: var(--bg); animation: none; }
  :root[data-gpth-theme="light"] .outputs-docked { background: var(--bg); }
  .native-side-panel.outputs-open #inspectorContent,.native-side-panel.outputs-open #sidePreviewActions { display: none; }
  .native-side-panel:not(.outputs-open) .outputs-docked { display: none; }
}

@media(max-width:820px) {
  .topbar > .topbar-actions { display: none; }
  .topbar .task-heading { flex: 1; min-width: 0; }
  .topbar .title-row { width: 100%; }
  .topbar .title-row h1 { flex: 1; min-width: 0; }
  .topbar #titleMenuButton { margin-left: auto; }
}
@media(min-width:821px) { #taskMenu [data-mobile-tool],#taskMenu [data-mobile-tool-divider] { display: none; } }

@media(max-width:820px) { .topbar #titleMenuButton svg { width: 22px; height: 22px; fill: currentColor; stroke-width: 2; } }

.profile-menu .global-menu-details { margin: 0; border: 0; }
.profile-menu .global-menu-details > summary { min-height: 36px; padding: 5px 10px; font-size: 14px; }
.profile-menu .global-menu-details .secondary-menu-body { padding: 0 4px 6px; }
.profile-menu .global-menu-details .sidebar-primary { margin: 0; padding: 0; }
.profile-menu .global-menu-details .sidebar-primary button { min-height: 36px; font-size: 14px; }

#sidebarHelpMenu { z-index: 111; }

#hostMenu .host-entry { padding-left: 0; }
#hostMenu .host-sort-target { outline:1px solid var(--border-strong); border-radius:8px; }

#hostMenu .host-option { user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
#hostMenu .host-option.host-reordering { cursor:grabbing; }
#hostMenu .host-option { grid-template-columns:minmax(0,1fr) 8px; }

/* Account/menu glyphs keep a square viewport, independent of row contents. */
#profileMenu button > svg, #profileMenu summary > svg, .settings-screen .settings-nav button > svg, .settings-screen .settings-search > svg { width:18px; height:18px; min-width:18px; max-width:18px; aspect-ratio:1; flex:none; align-self:center; justify-self:center; }
#profileMenu > button { align-items:center; }
#prototypeInfoButton > svg { transform:rotate(180deg); }
#prototypeInfoButton[aria-expanded="true"] > svg { transform:none; }

/* Keep the composer reachable in a short browser window or landscape phone. */
@media (max-height: 540px) {
  .task-start-welcome { padding-block: 8px; }
  .task-start-welcome > svg { display: none; }
  .task-start-welcome h2 { font-size: 18px; line-height: 1.3; margin-block: 8px; }
  .new-chat-screen { overflow-y: auto; }
}

/* Keep host controls in one compact, aligned header. */
#hostMenu .host-menu-heading #hostConnectionHelp { width:32px; height:36px; padding:6px; border:0; }
#hostMenu #hostConnectionHelp svg { width:18px; height:18px; flex:none; }
#hostMenu .host-menu-heading [hidden] { display:none; }

/* Theme is one menu action; use the same grid as the surrounding rows. */
#profileMenu .profile-theme-row > svg { width:18px; height:18px; }
/* Choice rows already render an SVG check; suppress the generic fallback. */
.popover button[data-setting-value].selected::after { content:none; }

/* Compact composer model controls, matching the desktop's two-stage picker. */
#settingsPopover:is([data-kind="effort"],[data-kind="model"],[data-kind="speed"]) { width:256px; padding:10px 12px; border-radius:18px; background:var(--surface-2); backdrop-filter:none; }
#settingsPopover[data-kind="model"] { padding:8px; scrollbar-width:thin; overscroll-behavior:contain; }
#settingsPopover .model-list-heading { display:flex; align-items:center; justify-content:space-between; padding:0 4px 4px 8px; color:var(--muted); font-size:12px; }
#settingsPopover .model-list-heading .settings-back-link { display:grid; place-items:center; width:28px; height:28px; min-height:28px; padding:5px; }
#settingsPopover[data-kind="model"] button[data-setting-value] { min-height:31px; padding:5px 8px; font-size:14px; line-height:21px; gap:12px; }
#settingsPopover[data-kind="model"] button[data-setting-value] > span:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#settingsPopover[data-kind="model"] button[data-setting-value] > svg { width:16px; height:16px; flex:none; }
#settingsPopover[data-kind="model"] button.selected:not(:hover):not(:focus-visible) { background:transparent; }
#settingsPopover .effort-heading { margin-bottom:10px; gap:4px; }
#settingsPopover .model-picker-link { min-width:0; min-height:40px; gap:0; }
#settingsPopover .model-picker-link output { color:var(--blue); }
#settingsPopover .model-picker-link small { display:flex; align-items:center; justify-content:center; gap:2px; max-width:100%; font-size:12px; line-height:18px; margin:0; }
#settingsPopover .model-picker-link small svg { width:10px; height:10px; flex:none; transform:rotate(-90deg); }
@media(pointer:coarse) { #settingsPopover[data-kind="model"] button[data-setting-value] { min-height:36px; } }

/* Confirm Ultra against the actual permission mode without changing it. */
dialog.ultra-confirm { width:min(520px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); inset:0; margin:auto; padding:20px; border-radius:20px; overflow-y:auto; }
.ultra-confirm .dialog-head { align-items:flex-start; gap:12px; margin-bottom:10px; padding:0; }
.ultra-confirm .dialog-head h2 { font-size:19px; line-height:1.4; }
.ultra-confirm .dialog-head .icon-button { width:28px; height:28px; flex:none; }
.ultra-confirm > p { margin:0 0 16px; font-size:14px; line-height:1.6; color:var(--muted); }
.ultra-confirm-actions { display:flex; align-items:center; gap:12px; }
.ultra-confirm-actions > span { display:flex; justify-content:center; align-items:center; min-width:0; flex:1; padding:8px 10px; border-radius:24px; font-size:13px; line-height:20px; text-align:center; color:var(--muted); }
.ultra-confirm-actions > span.full-access { color:var(--red); background:color-mix(in srgb,var(--red) 12%,transparent); }
.ultra-confirm-actions > button { flex:1; min-height:36px; border-radius:24px; }
@media(max-width:380px) { dialog.ultra-confirm { padding:16px; } .ultra-confirm .dialog-head h2 { font-size:17px; } .ultra-confirm-actions { gap:8px; } .ultra-confirm-actions > span { padding-inline:4px; font-size:12px; } }
.ultra-confirm-actions > span > svg { width:14px; height:14px; flex:none; margin-right:4px; }
