/* Compact primary actions; advanced controls remain in accessible disclosures. */
.composer{position:relative}
.composer-toolbar{position:static;align-items:center;gap:8px}
.composer-disclosure{min-width:0}
.composer-disclosure>summary{list-style:none;cursor:pointer;padding:9px 12px;border:1px solid var(--line);border-radius:10px;font-size:12px;min-height:40px;display:flex;align-items:center;gap:8px}
.composer-disclosure>summary::-webkit-details-marker{display:none}
.composer-disclosure>summary::after{content:'⌃';transform:rotate(180deg)}
.composer-disclosure[open]>summary::after{transform:none}
.composer-disclosure[open]>summary{background:var(--background)}
.composer-options-panel{position:absolute;bottom:calc(100% + 8px);left:0;z-index:6;width:min(320px,calc(100vw - 48px));max-height:min(55dvh,420px);overflow:auto;overscroll-behavior:contain;padding:12px;display:grid;gap:10px;background:var(--surface);color:var(--surface-ink,var(--ink));border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 24px #0002}
.composer-options-heading{margin:0;font-weight:600;font-size:13px}
#composer-images .composer-options-panel,#composer-documents .composer-options-panel{left:auto;right:0}
.composer-options-panel label{font-size:12px;gap:7px;flex-direction:column;align-items:stretch;white-space:normal}
.composer-options-panel select,.composer-options-panel input:not([type=checkbox]){width:100%;max-width:none;min-height:36px;border:1px solid var(--line);padding:6px 8px;border-radius:8px}
.composer-options-panel .tool-option{display:flex;flex-direction:row;align-items:center;min-height:40px}
.composer-launchers{display:flex;gap:8px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:10px}
.composer-launchers button{min-height:40px}
.composer-active-options{display:flex;gap:6px;flex-wrap:wrap;padding:0 0 10px}
.composer-chip{display:inline-flex;align-items:center;font-size:11px;border:1px solid color-mix(in srgb,var(--accent) 25%,var(--line));background:color-mix(in srgb,var(--accent) 6%,var(--surface));border-radius:20px;max-width:100%;overflow:hidden}
.composer-chip button{border:0;background:transparent;font-size:11px;min-height:34px;border-radius:0}
.composer-chip-edit{padding:6px 10px;min-width:0;overflow-wrap:anywhere}
.composer-chip-remove{padding:4px 10px;border-left:1px solid var(--line)!important;font-size:16px!important;flex:none}
.composer-icon{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.composer-toolbar>button:not(.send),.composer-launchers button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;font-size:12px}
.composer-toolbar>#attach{width:40px;padding:10px}
.composer-toolbar>#audio-open{width:40px;padding:9px;flex:none}
.composer-summary-label{max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.composer-help{font-size:11px;color:var(--muted)}
.composer-help>summary{cursor:pointer;padding:3px 0}
.composer-help[open]>summary{margin-bottom:6px}
.composer-disclosure>summary{background:var(--surface);transition:background-color .16s,border-color .16s}
.composer-disclosure>summary::after{content:'';width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin:0 2px 3px 4px}
.composer-disclosure[open]>summary::after{transform:rotate(225deg);margin-bottom:-3px}
.composer-disclosure.has-active-options>summary{border-color:color-mix(in srgb,var(--accent) 45%,var(--line));color:var(--accent)}
.composer-option-count{display:grid;place-items:center;min-width:17px;height:17px;border-radius:50%;background:var(--accent);color:var(--accent-ink);font-size:10px}
.composer-options-panel .tool-option{border:1px solid transparent;border-radius:8px;padding:6px;cursor:pointer;font-weight:500}
.composer-options-panel .tool-option:has(input:checked){background:color-mix(in srgb,var(--accent) 7%,var(--surface));border-color:var(--accent)}
.composer-options-panel .tool-option input{width:16px;height:16px;margin:0 3px 0 0;flex:none}
.composer-options-panel .hint{margin:0;line-height:1.6}
.image-unavailable{padding:20px;border:1px dashed var(--line);border-radius:14px;background:var(--surface);font-size:13px}
.image-unavailable p{margin:0 0 10px;color:var(--muted)}
.generated-figure.is-unavailable{width:440px}
@media(max-width:600px){.composer-toolbar{gap:5px}.composer-disclosure>summary{padding:8px;gap:5px}.composer-toolbar #prompts-open{width:36px;padding:8px}.composer-action-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.composer-toolbar>.send{margin-left:auto}}
@media(prefers-reduced-motion:reduce){.composer-disclosure>summary{transition:none}}
.composer-disclosure summary:focus-visible,.composer-chip:focus-visible,.history-search button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.composer-area.is-local .composer-active-options{display:none}
.history-search{padding:0 6px;flex:none}
.folder-row{position:relative;display:flex;align-items:center;min-width:0;border-radius:10px}
.folder-row>button:first-child{padding-right:40px;min-height:34px}
.folder-list .folder-row>.folder-settings{position:absolute;right:3px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:30px;height:30px;min-height:30px;padding:6px;border-radius:8px;opacity:0;pointer-events:none;transition:opacity .15s ease,background-color .15s ease}
.folder-settings svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.folder-row:hover>.folder-settings,.folder-row:focus-within>.folder-settings{opacity:1;pointer-events:auto}
.folder-list .folder-settings:hover{background:color-mix(in srgb,var(--accent) 14%,var(--surface))}
.folder-settings:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
@media(hover:none),(pointer:coarse){.folder-list .folder-row>.folder-settings{opacity:1;pointer-events:auto;width:36px;height:34px}.folder-row>button:first-child{min-height:38px;padding-right:42px}}
@media(prefers-reduced-motion:reduce){.folder-list .folder-row>.folder-settings{transition:none}}
.history-search>label{font-size:11px;color:var(--muted);margin-bottom:6px}
.history-search-input{position:relative}
.history-search input{width:100%;min-width:0;padding:10px 32px 10px 10px;border-radius:10px;font-size:12px;background:var(--surface)}
.history-search input::-webkit-search-cancel-button{display:none}
.history-search button{position:absolute;right:2px;top:2px;bottom:2px;width:30px;padding:0;font-size:18px}
.history-search-status{min-height:16px;margin:6px 8px;font-size:10px;color:var(--muted);flex:none}
.history button .history-title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.history-title-text{display:inline-block;min-width:100%;vertical-align:top}
.history button .history-title.is-scrolling{text-overflow:clip}
@media(prefers-reduced-motion:reduce){.history-title-text{transform:none!important}}
.history button .history-excerpt{display:block;font-size:11px;line-height:1.5;color:var(--muted);white-space:normal;overflow-wrap:anywhere;margin-top:5px}
.history .empty-history{padding:8px;font-size:12px;line-height:1.6;color:var(--muted)}
.history-item{position:relative;border-radius:10px}
.history .history-open{padding-right:42px}
.history .history-more{position:absolute;right:4px;top:5px;width:32px;height:32px;padding:0;text-align:center;font-size:22px;line-height:1;border-radius:8px;opacity:0;pointer-events:none}
.history-item:hover .history-more,.history-item:focus-within .history-more,.history .history-more[aria-expanded=true]{opacity:1;pointer-events:auto}
.history .history-more:hover,.history .history-more[aria-expanded=true]{background:var(--surface)}
.history .history-more:disabled{opacity:0;pointer-events:none}
.history .history-more:focus-visible,.history-actions-menu button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.history-actions-menu{position:fixed;z-index:20;width:180px;max-width:calc(100vw - 16px);padding:6px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);box-shadow:0 8px 28px #0002}
.history-actions-menu button{display:flex;align-items:center;gap:10px;width:100%;min-height:40px;padding:9px 12px;border:0;text-align:left;background:transparent;font-size:13px}
.history-actions-menu button:hover,.history-actions-menu button:focus-visible{background:var(--background)}
.history-actions-menu svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.history-actions-menu [data-history-action=delete]{color:#ba3636}
@media(hover:none),(pointer:coarse),(max-width:760px){.history .history-more:not(:disabled){opacity:1;pointer-events:auto}}
.sidebar-heading{display:flex;align-items:center;gap:8px;flex:none;min-width:0;margin-bottom:12px}
.sidebar-heading .brand{flex:1;min-width:0;gap:8px;padding:0 0 0 10px}
.sidebar-heading .brand-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-heading .new-chat{display:grid;place-items:center;flex:none;width:40px;height:40px;padding:0;color:var(--accent);border-color:color-mix(in srgb,var(--accent) 45%,var(--line));background:color-mix(in srgb,var(--accent) 10%,var(--surface));border-radius:50%}
.sidebar-heading .new-chat svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.sidebar-heading .new-chat:hover{background:color-mix(in srgb,var(--accent) 20%,var(--surface));border-color:var(--accent);transform:none}
.sidebar-heading .new-chat:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.folder-heading #folder-create{display:grid;place-items:center;width:36px;height:36px;padding:7px;color:var(--accent)}
.folder-heading #folder-create svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.folder-heading #folder-create:hover{background:var(--surface)}
@media(max-width:760px),(pointer:coarse){.sidebar-heading .new-chat{width:44px;height:44px}}
.sidebar :is(.new-chat,.history button,.sidebar-bottom>button,.sidebar-bottom>a){transition:transform 180ms ease,background-color 180ms ease}
@media(hover:hover){.sidebar :is(.new-chat,.history button,.sidebar-bottom>button,.sidebar-bottom>a):hover{transform:translateX(3px)}}
.sidebar .history-item button:hover{transform:none}
.sidebar .sidebar-heading .new-chat:hover{transform:none}
@media(prefers-reduced-motion:reduce){.sidebar :is(.new-chat,.history button,.sidebar-bottom>button,.sidebar-bottom>a){transition:none;transform:none!important}}
@media(max-width:760px){.composer-toolbar{gap:6px}.composer-disclosure{position:static}.composer-disclosure>summary{padding:8px 10px}.composer-options-panel{width:100%;padding:12px}.composer-active-options{max-height:84px;overflow:auto}.composer-toolbar>.send{margin-left:auto}.history-search input{font-size:16px}}
@media(max-width:480px){.composer-disclosure>summary>span:not(.composer-option-count):not(.composer-summary-label){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.composer-summary-label{max-width:105px;font-size:11px}.composer-disclosure>summary{padding:7px;gap:4px}.composer-toolbar{gap:5px}.composer-toolbar>#attach,.composer-toolbar>#audio-open{width:34px;padding:8px}.composer-toolbar .composer-icon{width:17px;height:17px}}
@media(max-width:480px){#composer-images:not(.has-active-options) .composer-summary-label{display:none}}
