/* Project organization, inline conversation actions and project references. */
.chat-view.is-empty:has(#generatedArtifacts:not([hidden]),.permission-card){justify-content:flex-start;padding-bottom:0;overflow:hidden}.chat-view.is-empty:has(#generatedArtifacts:not([hidden]),.permission-card) .message-scroll{flex:1;min-height:0;overflow-y:auto}.chat-view.is-empty:has(#generatedArtifacts:not([hidden]),.permission-card) .suggestions{display:none}.chat-view.is-empty:has(#generatedArtifacts:not([hidden]),.permission-card) #welcome{display:none}
.project-picker .project-color-button{display:grid;place-items:center;width:31px;flex:0 0 31px;padding:0;border:0;background:transparent}.project-color-button span{width:11px;height:11px;border-radius:4px;background:#b67d62;box-shadow:0 0 0 3px #ffffff65}.project-picker select{min-width:0}.conversation-group h3{font-size:10px;font-weight:500;letter-spacing:.04em;margin:16px 11px 6px;color:#ad9a7c}.conversation-group:first-child h3{margin-top:4px}.conversation-row{display:flex;align-items:center;position:relative;border-radius:8px;margin:2px 0;padding-right:3px}.conversation-row .chat-item{flex:1;min-width:0;margin:0;background:none!important;padding-right:4px}.conversation-row .chat-item strong{font-size:13px}.conversation-row.active{background:#e6dece}.conversation-row:hover{background:#eee7d9}.conversation-row.active:hover{background:#e6dece}.conversation-menu-button{flex:0 0 27px;width:27px;height:30px;line-height:1;background:transparent;color:#ac977b;border-radius:6px;font-size:17px;opacity:0}.conversation-row:hover .conversation-menu-button,.conversation-row:focus-within .conversation-menu-button,.conversation-menu-button[aria-expanded=true]{opacity:1}.conversation-menu-button:hover{background:#ddd2bf}.conversation-menu{position:fixed;z-index:85;background:#fffdf8;border:1px solid #e2d8c7;border-radius:10px;padding:5px;min-width:152px;box-shadow:0 10px 30px #44382621}.conversation-menu button{display:block;width:100%;padding:9px 13px;background:transparent;border-radius:6px;text-align:left;font-size:13px;color:#77664e}.conversation-menu button:hover,.conversation-menu button:focus{background:#f2ebdf;outline:0}.project-color-palette{display:flex;gap:10px;flex-wrap:wrap;margin:15px 0 20px}.project-swatch{position:relative;margin:0;display:block;width:32px;height:32px;cursor:pointer}.project-swatch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}.project-swatch span{display:block;width:32px;height:32px;border-radius:50%;background:var(--project-swatch);border:3px solid #fffdf7;box-shadow:0 0 0 1px transparent}.project-swatch input:checked+span{box-shadow:0 0 0 2px var(--project-swatch)}.project-swatch input:focus-visible+span{outline:3px solid #cfac83;outline-offset:4px}#projectAppearanceDialog{width:min(460px,calc(100vw - 32px))}.composer-wrap{position:relative}.composer{position:relative}.reference-button{font-size:19px!important;font-weight:400!important;padding:6px!important;color:#a68e6d!important}.reference-picker{position:absolute;left:30px;right:30px;bottom:calc(100% - 8px);z-index:40;background:#fffdf8;border:1px solid #ded4c2;border-radius:14px;box-shadow:0 14px 45px #53412b20;padding:13px;max-height:min(470px,65dvh);display:flex;flex-direction:column;gap:8px;min-height:0}.reference-heading{display:flex;justify-content:space-between;align-items:center;color:#827056}.reference-heading strong{font-size:13px;font-weight:550}.reference-heading .icon-button{font-size:19px;padding:2px 7px}.reference-picker>input{font-size:13px;padding:10px 12px;background:#f8f4ec;border-color:#e5dccd;flex-shrink:0}.reference-navigation{display:flex;align-items:center;gap:10px;flex-shrink:0}.reference-navigation button{font-size:11px;white-space:nowrap;padding:4px 0}.reference-navigation span{font-size:11px;color:#a49276;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#referenceList{overflow:auto;min-height:70px;flex:1;overscroll-behavior:contain}.reference-row{display:flex;align-items:center;border-radius:7px}.reference-row.selected,.reference-row:hover{background:#f0e9dc}.reference-item{display:flex;align-items:center;gap:10px;width:100%;min-width:0;padding:9px 10px;text-align:left;background:transparent;color:#8c795b}.reference-item>span:first-child{font-size:19px}.reference-item>span:nth-child(2){flex:1;min-width:0}.reference-item strong{font-size:13px;font-weight:450;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}.reference-item small{font-size:10px;color:#b39e7f;display:block;margin-top:3px}.reference-chevron{font-size:20px}.reference-insert-directory{flex-shrink:0;background:transparent;color:#a17f57;padding:7px 10px;font-size:17px;border-left:1px solid #e6dccb}.reference-empty{font-size:12px;color:#a28e72;padding:13px 8px;line-height:1.8}.reference-footer{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;border-top:1px solid #ece4d7;padding-top:9px;flex-shrink:0;font-size:10px;color:#b09b7b}.reference-picker>#referenceMore{font-size:11px;text-align:center;padding:5px;flex-shrink:0}.attachment-drop-hint{display:none;position:absolute;inset:0;z-index:50;border:2px dashed #b28a66;background:#fbf6eefa;border-radius:13px;align-items:center;justify-content:center;font-size:16px;color:#9c7652;pointer-events:none}.file-drag-active .attachment-drop-hint{display:flex}.file-drag-active .composer{border-color:#b28a66}.conversation-menu[hidden],.reference-picker[hidden]{display:none!important}@media(max-width:780px){.conversation-menu-button{opacity:1}.reference-picker{left:14px;right:14px;padding:11px;bottom:calc(100% - 4px);max-height:55dvh}.reference-footer{font-size:9px}.reference-navigation{gap:7px}.reference-button{font-size:18px!important}.reference-item{padding:8px}.reference-item strong{font-size:12px}}@media(max-height:650px){.reference-picker{max-height:45dvh}}

.permission-operation{padding:14px 18px 0}.permission-location{display:flex;gap:8px;flex-wrap:wrap;justify-content:space-between;color:#8d795e;font-size:12px;margin:0 0 12px}.permission-location span{color:#aa987d}.permission-card .permission-command{background:#efebe2;color:#655b4b;border:1px solid #e0d5c2;border-radius:8px;margin:0;padding:13px;font-size:13px;max-height:220px}.permission-command code{font:inherit}.permission-file-path{display:flex;align-items:flex-start;gap:12px;padding:11px 12px;background:#f2eee5;border:1px solid #e6dcc9;border-radius:8px;font-size:12px;color:#a28d6c}.permission-file-path code{color:#7d684b;overflow-wrap:anywhere;min-width:0;line-height:1.8}.permission-file-path span{flex-shrink:0;line-height:1.8}.permission-details{margin-top:11px;color:#a28e70;font-size:11px}.permission-details summary{cursor:pointer;padding:5px 0}.permission-card .permission-details pre{margin:8px 0 0;padding:12px;border-radius:7px;font-size:11px;background:#f0ece2;max-height:230px}.permission-card .permission-actions{padding-top:12px}.permission-title{font-weight:500}.permission-actions button{min-width:88px}@media(max-width:700px){.permission-operation{padding:12px 13px 0}.permission-location{font-size:11px}.permission-card .permission-command{font-size:12px;padding:11px}.permission-file-path{font-size:11px;gap:8px}}

.composer-add-menu{position:fixed;z-index:85;width:min(330px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;background:#fffdf8;border:1px solid #e0d7c7;border-radius:13px;padding:6px;box-shadow:0 12px 35px #4a3d2924}.composer-add-menu[hidden]{display:none!important}.composer-add-menu>button,.composer-add-menu #composerLocalWorkspaces>button{display:flex;align-items:center;gap:12px;background:transparent;width:100%;text-align:left;padding:11px 12px;border-radius:8px;color:#79674f;font-size:13px}.composer-add-menu button:hover,.composer-add-menu button:focus-visible{background:#f0e9dd}.composer-add-menu button>span:first-child{font-size:20px;flex:none}.composer-add-menu button>span:nth-child(2){min-width:0}.composer-add-menu small{display:block;font-size:10px;margin-top:4px;color:#a59071;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.composer-menu-divider{height:1px;background:#ece3d5;margin:4px 8px}.composer-menu-label{display:block;font-size:10px;color:#a79578;padding:8px 12px 2px}.composer-browser-hint{padding:10px 13px;background:#f5f0e7;border-radius:8px;margin:5px;color:#968366;font-size:11px;line-height:1.7}.composer-browser-hint p{margin:0 0 8px}.composer-browser-hint a{font-size:11px;display:inline-block;margin-right:15px}.project-settings-actions{justify-content:space-between}#projectAppearanceDialog{max-height:calc(100dvh - 28px);overflow:auto}#projectEditTarget{width:100%;background:#f4f0e8;border:1px solid #e0d7c7;border-radius:8px;padding:10px 12px;font-size:13px}#createFirstProject{margin-top:20px}#projectSelect:disabled{opacity:.65}

.project-swatch-0{--project-swatch:#b67d62}.project-swatch-1{--project-swatch:#6f8f72}.project-swatch-2{--project-swatch:#6489a6}.project-swatch-3{--project-swatch:#9b83b8}.project-swatch-4{--project-swatch:#c59850}.project-swatch-5{--project-swatch:#b97488}.project-swatch-6{--project-swatch:#5c9896}.project-swatch-7{--project-swatch:#8b8b86}

.reference-picker{overflow:hidden}#referenceList{min-height:0}

.side-label.history-heading>label{margin:0;font:inherit;color:inherit}.account-mac-permission{display:flex;gap:9px;align-items:center;font-size:13px}.account-mac-permission input{width:16px;height:16px;accent-color:#b67d62;margin:0}.project-lifecycle-actions{margin:16px 0 8px;padding-top:14px;border-top:1px solid #e5ddce}.project-lifecycle-actions button{font-size:12px}#projectArchivesDialog{width:min(610px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto}.archived-project-row{padding:15px 0;border-bottom:1px solid #e6decf;display:flex;gap:12px;align-items:center}.archived-project-row>div:first-child{flex:1;min-width:0}.archived-project-row strong{font-size:14px;font-weight:500;display:block;overflow-wrap:anywhere}.archived-project-row small{display:block;font-size:11px;color:#a49379;margin-top:5px}.archived-project-actions{display:flex;align-items:center;gap:12px}.archived-project-actions button{font-size:11px;white-space:nowrap}.composer-add-menu>button[hidden],.account-mac-permission[hidden]{display:none!important}@media(max-width:600px){.archived-project-row{align-items:flex-start;flex-direction:column}.archived-project-actions{width:100%;justify-content:space-between}}


/* Keep project context visible when the history spans every project. */
.conversation-row .chat-item .conversation-meta{display:flex;align-items:center;gap:7px;min-width:0;margin-top:5px;font-size:10px;line-height:1.5}
.conversation-project{display:flex;align-items:center;gap:5px;min-width:0;flex:1;color:#8f7c62}
.conversation-project>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.conversation-project-dot{display:block;width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:var(--project-swatch,#b67d62)}
.conversation-time{flex:none;font-size:9px;color:#ad9a7c;font-variant-numeric:tabular-nums}

/* The history switch shares the existing heading row. */
#sidebar .sidebar-history-view{display:flex;align-items:center;gap:2px;padding:2px;border-radius:7px;background:#e9e1d4}
#sidebar .sidebar-history-view button{min-width:44px;min-height:26px;padding:3px 9px;border:0;border-radius:5px;background:transparent;color:#99866b;font-size:11px;line-height:1.3}
#sidebar .sidebar-history-view button[aria-pressed=true]{background:#faf6ee;color:#705a40;box-shadow:0 1px 3px #59422410}
#sidebar .sidebar-history-view button:hover{color:#705a40}
#sidebar .sidebar-history-view button:focus-visible{outline:2px solid #b9946c;outline-offset:1px}
#sidebar #chatList .sidebar-time-heading{margin:10px 7px 4px;font-size:10px;font-weight:500;line-height:1.4;color:#9d886a;letter-spacing:0}
#sidebar #chatList .sidebar-project-group:first-child .sidebar-time-heading{margin-top:4px}

/* A compact, owner-scoped project tree. Keep the original warm sidebar palette. */
#sidebar #chatList .sidebar-project-group{margin:0 0 5px}
#sidebar #chatList .sidebar-group-heading{display:flex;align-items:center;gap:1px;min-width:0;min-height:30px}
#sidebar #chatList .sidebar-group-toggle{display:flex;align-items:center;gap:6px;flex:1;min-width:0;min-height:30px;padding:4px 5px;border:0;border-radius:6px;background:transparent;text-align:left;color:#81725c;font-size:12px;line-height:1.35}
#sidebar #chatList .sidebar-group-toggle:hover,#sidebar #chatList .sidebar-group-toggle:focus-visible{background:#e9e2d5;color:#63543f}
#sidebar #chatList .sidebar-group-chevron{flex:none;display:block;width:9px;font-size:17px;line-height:1;transform:rotate(0deg);text-align:center}
#sidebar #chatList .sidebar-group-toggle[aria-expanded=true] .sidebar-group-chevron{transform:rotate(90deg)}
#sidebar #chatList .sidebar-group-folder{width:15px;height:15px;flex:none;fill:none;stroke:var(--project-swatch,#b67d62);stroke-width:1.45;stroke-linejoin:round}
#sidebar #chatList .sidebar-group-symbol,#sidebar #chatList .sidebar-group-codex{flex:none;width:15px;text-align:center;color:#ac9472;font-size:15px}
#sidebar #chatList .sidebar-group-codex{font:600 10px/15px ui-monospace,monospace;border:1px solid #b8aa95;border-radius:4px;height:15px;line-height:13px}
#sidebar #chatList .sidebar-group-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:550}
#sidebar #chatList .sidebar-group-name small{display:inline;margin-left:5px;font-size:10px;font-weight:400;color:#a3937b}
#sidebar #chatList .sidebar-group-count{flex:none;color:#b09e83;font:10px/1.2 ui-sans-serif,system-ui;font-variant-numeric:tabular-nums}
#sidebar #chatList .sidebar-group-add{flex:none;width:27px;min-height:28px;padding:0;border-radius:6px;font-size:18px;background:transparent;color:#a28c6f;opacity:0}
#sidebar #chatList .sidebar-group-heading:hover .sidebar-group-add,#sidebar #chatList .sidebar-group-heading:focus-within .sidebar-group-add{opacity:1}
#sidebar #chatList .sidebar-group-add:hover{background:#e6ddce;color:#785e3f}
#sidebar #chatList .sidebar-group-add:disabled{opacity:.3;cursor:not-allowed}
#sidebar #chatList .sidebar-group-body{margin-left:10px;padding-left:6px;border-left:1px solid #e5ddcf}
#sidebar #chatList .sidebar-group-body[hidden]{display:none!important}
#sidebar #chatList .sidebar-project-group .conversation-row{min-height:32px;margin:0;padding-right:2px;border-radius:6px}
#sidebar #chatList .sidebar-project-group .chat-item{display:flex;align-items:center;gap:6px;min-height:32px;min-width:0;padding:5px 5px 5px 7px;margin:0;line-height:1.35}
#sidebar #chatList .sidebar-project-group .chat-item strong{flex:1;min-width:0;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:450;line-height:1.5}
#sidebar #chatList .sidebar-project-group .conversation-meta{flex:none;min-width:0;display:flex;align-items:center;gap:0;margin:0;font-size:10px;line-height:1.2}
#sidebar #chatList .sidebar-project-group .conversation-project{display:none}
#sidebar #chatList .sidebar-project-group .conversation-time{font-size:9px;white-space:nowrap}
#sidebar #chatList .sidebar-project-group .conversation-menu-button{width:24px;flex-basis:24px;height:28px;font-size:16px}
#sidebar #chatList :is([data-sidebar-group-kind=pinned],[data-sidebar-group-kind=codex-search],[data-sidebar-group-kind=recent]) .sidebar-group-body{margin-left:0;padding-left:0;border-left:0}
#sidebar #chatList :is([data-sidebar-group-kind=pinned],[data-sidebar-group-kind=codex-search],[data-sidebar-group-kind=recent]) .chat-item{flex-wrap:wrap;gap:1px 6px;padding-top:4px;padding-bottom:4px}
#sidebar #chatList :is([data-sidebar-group-kind=pinned],[data-sidebar-group-kind=codex-search],[data-sidebar-group-kind=recent]) .chat-item strong{flex-basis:100%}
#sidebar #chatList :is([data-sidebar-group-kind=pinned],[data-sidebar-group-kind=codex-search],[data-sidebar-group-kind=recent]) .conversation-meta{flex:1;justify-content:space-between;gap:5px}
#sidebar #chatList :is([data-sidebar-group-kind=pinned],[data-sidebar-group-kind=codex-search],[data-sidebar-group-kind=recent]) .conversation-project{display:flex;min-width:0;font-size:9px;line-height:1.3}
#sidebar #chatList :is([data-sidebar-group-kind=pinned],[data-sidebar-group-kind=codex-search],[data-sidebar-group-kind=recent]) .cx-codex-badge{font-size:8px;padding:0 3px}
#sidebar #chatList .sidebar-group-more{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;min-height:28px;padding:5px 7px;border:0;border-radius:6px;background:transparent;color:#9c8465;text-align:left;font-size:11px}
#sidebar #chatList .sidebar-group-more:hover,#sidebar #chatList .sidebar-group-empty-action:hover{background:#eee6d9}
#sidebar #chatList .sidebar-group-more span{font-size:9px;color:#b0a18b}
#sidebar #chatList .sidebar-group-empty{padding:7px;color:#b0a18b;font-size:11px;line-height:1.5}
#sidebar #chatList .sidebar-group-empty-action{display:block;margin:4px 0 0;padding:3px 0;min-height:24px;border:0;border-radius:4px;background:transparent;color:#92795a;font-size:11px}
#sidebar #chatList .sidebar-group-toggle:focus-visible,#sidebar #chatList .sidebar-group-add:focus-visible,#sidebar #chatList .sidebar-group-more:focus-visible,#sidebar #chatList .sidebar-group-empty-action:focus-visible{outline:2px solid #b9946c;outline-offset:-2px}
#sidebar .new-chat{margin-top:12px;margin-bottom:12px}
#sidebar .project-picker{margin-bottom:10px}
@media(max-width:780px),(pointer:coarse){
  #sidebar #chatList .sidebar-group-toggle,#sidebar #chatList .sidebar-group-add,#sidebar #chatList .sidebar-group-more,#sidebar #chatList .sidebar-group-empty-action{min-height:44px}
  #sidebar #chatList .sidebar-group-add{width:44px;opacity:1}
  #sidebar #chatList .sidebar-project-group .chat-item{min-height:44px;font-size:13px}
  #sidebar #chatList .sidebar-project-group .conversation-row{min-height:44px}
  #sidebar #chatList .sidebar-project-group .conversation-menu-button{width:44px;flex-basis:44px;height:44px;opacity:1}
  #sidebar .sidebar-history-view button{min-height:44px}
  #sidebar .project-picker{min-height:44px}
  #sidebar .project-picker>button,#sidebar .project-picker>select,#sidebar .side-label .side-link{min-height:44px}
  #sidebar .project-picker>button,#sidebar .side-label .side-link{min-width:44px}
  #sidebar #chatList .sidebar-project-group .chat-item strong{font-size:13px}
}
