okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge f-027-gh-app: GitHub app and Terminal items for 0.2.73cabb9e3f

main
23.6 KiB343 linesraw
1/* Strata web app - layout on top of tokens.css + components.css (the Strata UI kit). Colours, type, radii and
2   shadows come only from the kit's tokens. */
3[hidden] { display: none !important; }
4html, body { height: 100%; }
5body { display: flex; flex-direction: column; overflow: hidden; }
6main { flex: 1; min-height: 0; display: flex; }
7.view { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; }
8.view[hidden] { display: none; }
9.muted { color: var(--st-ink-muted); }
10.small { font-size: var(--st-fs-xs); }
11.card-title { font-weight: var(--st-fw-bold); font-size: var(--st-fs-base); color: var(--st-ink); }
12.st-header { position: relative; z-index: 2; flex: none; }
13.st-header .st-tabs { margin-left: var(--st-s-4); }
14#unload-btn { flex: none; height: 32px; padding: 0 12px; min-width: 7.75rem; }
15.st-header--clip #pill-text { display: none; }
16#drawer-close .st-icon { transform: rotate(-90deg); }
17
18/* ---------------------------------------------------------------- chat */
19.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; }
20.chat { max-width: min(100%, 1100px); margin: 0 auto; padding: var(--st-s-8) var(--st-s-6) var(--st-s-6); display: flex;
21        flex-direction: column; gap: var(--st-s-6); }
22.chat-empty { margin: 12vh auto 0; text-align: center; }
23.chat-empty__title { font-weight: var(--st-fw-black); font-size: var(--st-fs-display); line-height: var(--st-lh-tight);
24                     letter-spacing: -.02em; }
25.chat-empty__sub { overflow-wrap: anywhere; margin-top: var(--st-s-3); color: var(--st-ink-muted); }
26.st-msg { width: 100%; }
27.st-msg--assistant { align-self: flex-start; }
28.st-msg--assistant .st-bubble { width: 100%; overflow-wrap: anywhere; }
29.st-msg--user .st-bubble { white-space: pre-wrap; overflow-wrap: anywhere; }
30.st-bubble > :first-child { margin-top: 0; }
31.st-bubble > :last-child { margin-bottom: 0; }
32.st-bubble p, .st-bubble ul, .st-bubble ol { margin: 0 0 var(--st-s-3); }
33.st-bubble ul, .st-bubble ol { padding-left: var(--st-s-6); }
34.st-bubble li + li { margin-top: var(--st-s-1); }
35.st-bubble h3 { font-size: var(--st-fs-lg); margin: var(--st-s-4) 0 var(--st-s-2); color: var(--st-ink); }
36.st-bubble h4 { font-size: var(--st-fs-base); margin: var(--st-s-3) 0 var(--st-s-2); color: var(--st-ink); }
37.st-bubble code.inline { font: 400 .9em var(--st-font-mono); background: var(--st-surface-2); border: 1px solid var(--st-line-soft);
38                         border-radius: 6px; padding: 1px 5px; }
39.st-bubble .st-code { margin: var(--st-s-3) 0; }
40.st-bubble blockquote { margin: 0 0 var(--st-s-3); padding-left: var(--st-s-3); border-left: 3px solid var(--st-line);
41                        color: var(--st-ink-muted); }
42.st-bubble hr { border: 0; border-top: 1px solid var(--st-line); margin: var(--st-s-4) 0; }
43.st-bubble table { border-collapse: collapse; margin: 0 0 var(--st-s-3); font-size: var(--st-fs-md); display: block; max-width: 100%; overflow-x: auto; }
44.st-bubble th, .st-bubble td { border: 1px solid var(--st-line); padding: 6px 10px; text-align: left; }
45.msg-images { display: flex; flex-wrap: wrap; gap: var(--st-s-2); justify-content: flex-end; }
46.msg-images img { max-width: 220px; max-height: 180px; border-radius: var(--st-r-md); border: 1px solid var(--st-line); }
47.st-msg .st-collapse { width: 100%; }
48.st-collapse__body.thinking { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow-y: auto; }
49.st-msg { min-width: 0; }
50.st-msg__meta .st-btn--icon { width: 28px; height: 28px; }
51.st-msg__meta .st-btn--icon .st-icon { width: 16px; height: 16px; }
52.cursor::after { content: ""; display: inline-block; width: 8px; height: 1.1em; margin-left: 2px; vertical-align: -3px;
53                 border-radius: 2px; background: var(--st-accent); animation: blink 1s steps(2) infinite; }
54@keyframes blink { 50% { opacity: 0; } }
55.msg-error { color: var(--st-danger-text); background: var(--st-danger-tint); border-radius: var(--st-r-md); padding: 10px 14px;
56             font-size: var(--st-fs-md); }
57/* MCP tool calls inside an answer: one compact collapsible block per call */
58.st-bubble .tool-call { margin: var(--st-s-3) 0; }
59.tool-call > summary { min-width: 0; padding: 8px 12px; overflow: hidden; }
60.tool-call__name { font: 500 var(--st-fs-sm)/1.2 var(--st-font-mono); color: var(--st-ink); white-space: nowrap;
61                   min-width: 0; overflow: hidden; text-overflow: ellipsis; }
62.tool-call__preview { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--st-fs-xs); }
63.tool-call .st-badge, .tool-call summary .small { flex: none; }
64.tool-call[data-state="error"] { border-color: color-mix(in srgb, var(--st-danger) 35%, var(--st-line)); }
65.tool-call[data-state="running"] .st-badge::before, .tool-call[data-state="writing"] .st-badge::before { animation: blink 1s steps(2) infinite; }
66.tool-call__label { font-size: var(--st-fs-xs); font-weight: var(--st-fw-medium); color: var(--st-ink-muted); margin: var(--st-s-2) 0 var(--st-s-1); }
67.tool-call__pre { margin: 0; padding: 10px 12px; max-height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
68                  font: 400 12.5px/1.5 var(--st-font-mono); color: var(--st-ink-soft); background: var(--st-surface);
69                  border: 1px solid var(--st-line-soft); border-radius: var(--st-r-sm); }
70
71.composer-wrap { flex: none; padding: 0 var(--st-s-6) var(--st-s-6); }
72.st-composer { max-width: min(100%, 1100px); margin: 0 auto; }
73.st-composer textarea { max-height: 40vh; }
74.st-btn--send { width: 42px; padding: 0; }
75.composer-hint { font-size: var(--st-fs-xs); color: var(--st-ink-muted); margin-right: var(--st-s-2); font-variant-numeric: tabular-nums; }
76.attachments { display: flex; flex-wrap: wrap; gap: var(--st-s-2); padding: 2px 4px 0; }
77.st-composer.dragging { outline: 2px dashed var(--st-accent); outline-offset: 3px; }
78.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 10px; border-radius: var(--st-r-pill);
79        background: var(--st-surface-2); border: 1px solid var(--st-line); font-size: var(--st-fs-xs); color: var(--st-ink-soft); }
80.chip .st-btn--icon { width: 22px; height: 22px; border-radius: 50%; }
81.chip .st-btn--icon .st-icon { width: 14px; height: 14px; }
82
83/* ---------------------------------------------------------------- monitor */
84.view--monitor, .view--about { overflow-y: auto; }
85.monitor, .about { max-width: min(100%, 1920px); width: 100%; margin: 0 auto; padding: var(--st-s-6); display: flex; flex-direction: column;
86                   gap: var(--st-s-5); }
87.state-card { display: flex; flex-direction: column; gap: var(--st-s-3); }
88.state-card__head { display: flex; align-items: center; gap: var(--st-s-4); flex-wrap: wrap; }
89.state-card, .metric-card, .req-card, .ctx-card, .cc-card, .mcp-card { min-width: 0; }
90.badges { display: flex; gap: var(--st-s-2); flex-wrap: wrap; }
91.badges .st-badge { opacity: .38; transition: opacity var(--st-dur); }
92.badges .st-badge.on { opacity: 1; }
93.state-card__row { display: flex; justify-content: space-between; gap: var(--st-s-4); font-size: var(--st-fs-sm);
94                   font-weight: var(--st-fw-medium); font-variant-numeric: tabular-nums; }
95.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--st-s-4); }
96.metric-card { padding: var(--st-s-4) var(--st-s-5); }
97.st-metric__value small { font-size: var(--st-fs-md); font-weight: var(--st-fw-medium); color: var(--st-ink-muted); margin-left: 4px; }
98.st-metric__sub { font-size: var(--st-fs-xs); color: var(--st-ink-muted); font-variant-numeric: tabular-nums; min-height: 1em; }
99.st-metric__spark { display: block; overflow: visible; }
100.speed-values { display: flex; justify-content: space-between; gap: var(--st-s-3); }
101.speed-values > div { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
102.speed-values > div:last-child { text-align: right; }
103.speed-values .st-metric__value { font-size: clamp(20px, 2.2vw, var(--st-fs-stat)); }
104.st-metric__spark .speed-prefill { color: color-mix(in srgb, var(--st-accent) 65%, black); }
105.st-metric__spark[data-tone="warn"] { color: var(--st-warn); }
106.st-metric__spark[data-tone="info"] { color: var(--st-info); }
107.monitor-row { display: grid; grid-template-columns: minmax(min(260px, 100%), 1fr) minmax(0, 2.4fr); gap: var(--st-s-4); }
108.ctx-card { display: flex; flex-direction: column; gap: var(--st-s-2); }
109.ctx-gauge { position: relative; width: 150px; max-width: 100%; aspect-ratio: 1; height: auto; margin: var(--st-s-2) auto var(--st-s-3); }
110.ctx-gauge .st-gauge { width: 100%; height: 100%; }
111.ctx-gauge .st-gauge__fill { transition: stroke-dasharray 400ms var(--st-ease); }
112.ctx-gauge__label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
113                    font-size: var(--st-fs-xs); }
114.ctx-gauge__pct { font-weight: var(--st-fw-black); font-size: var(--st-fs-xl); line-height: 1.1; font-variant-numeric: tabular-nums; }
115.bar-row { display: flex; justify-content: space-between; font-size: var(--st-fs-sm); font-weight: var(--st-fw-medium);
116           margin-top: var(--st-s-2); font-variant-numeric: tabular-nums; }
117.req-card { display: flex; flex-direction: column; gap: var(--st-s-3); min-width: 0; }
118.table-wrap { overflow-x: auto; }
119/* Recent requests: keep headings, values and status badges on one line. */
120#req-wrap .st-table th,
121#req-wrap .st-table td {
122  white-space: nowrap;
123  padding-inline: 8px;
124}
125.req-head { display: flex; align-items: center; justify-content: space-between; gap: var(--st-s-2); }
126.table-wrap.all { max-height: 420px; overflow-y: auto; }
127.req-totals { margin: 0; font-size: var(--st-fs-sm); }
128.req-totals:empty { display: none; }
129.cc-card { display: flex; flex-direction: column; gap: var(--st-s-3); }
130.cc-bars { display: grid; grid-template-columns: 1fr 1fr; gap: var(--st-s-2) var(--st-s-6); }
131.cc-bars[hidden] { display: none; }
132.cc-note { margin: 0; }
133.cc-note:empty { display: none; }
134.mcp-card { display: flex; flex-direction: column; gap: var(--st-s-3); }
135.cfg-form { display: grid; grid-template-columns: minmax(min(180px, 100%), max-content) minmax(0, 1fr); gap: var(--st-s-3) var(--st-s-4);
136            align-items: center; }
137.cfg-form label { overflow-wrap: anywhere; font-size: var(--st-fs-sm); font-weight: var(--st-fw-medium); }
138.cfg-form label code { font: 400 12px var(--st-font-mono); color: var(--st-ink-muted); display: block; }
139.cfg-form .st-input { height: 38px; width: 100%; max-width: 360px; min-width: 0; }
140.cfg-actions { display: flex; align-items: center; gap: var(--st-s-3); }
141.mcp-server { display: flex; flex-direction: column; gap: var(--st-s-2); padding-top: var(--st-s-3); border-top: 1px solid var(--st-line-soft); }
142.mcp-server:first-child { padding-top: 0; border-top: 0; }
143.mcp-server__head { display: flex; align-items: center; gap: var(--st-s-2); flex-wrap: wrap; font-size: var(--st-fs-sm); }
144.mcp-server__tools { display: flex; flex-wrap: wrap; gap: 6px; }
145.mcp-server__tools .chip { height: 26px; padding: 0 10px; font-family: var(--st-font-mono); }
146.mcp-note { margin: 0; }
147
148/* ---------------------------------------------------------------- about */
149.about { max-width: min(100%, 1100px); }
150.about .st-card { display: flex; flex-direction: column; gap: var(--st-s-3); }
151.about p { margin: 0; }
152.facts { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: 10px var(--st-s-6); margin: 0; font-size: var(--st-fs-md); }
153.facts dt { color: var(--st-ink-muted); }
154.facts dd { margin: 0; color: var(--st-ink-soft); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px;
155            overflow-wrap: anywhere; }
156.facts dd code { font: 400 13px var(--st-font-mono); }
157.facts .st-btn--icon { width: 28px; height: 28px; }
158.facts .st-btn--icon .st-icon { width: 16px; height: 16px; }
159.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: var(--st-s-4); font-size: var(--st-fs-sm);
160              font-weight: var(--st-fw-medium); color: var(--st-ink-soft); }
161.toggle-row .st-toggle { flex: none; }   /* a long label must not squeeze the switch */
162
163/* ---------------------------------------------------------------- drawer */
164.st-drawer { z-index: 40; }
165.scrim { position: fixed; inset: 0; background: rgba(15, 23, 42, .18); z-index: 39; }
166.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; background: var(--st-surface-2);
167       border: 1px solid var(--st-line); border-radius: var(--st-r-md); }
168.seg button { height: 32px; border: 0; border-radius: 10px; background: transparent; color: var(--st-ink-muted);
169              font: 500 var(--st-fs-sm)/1 var(--st-font); cursor: pointer; }
170.seg button[aria-checked="true"] { background: var(--st-surface); color: var(--st-ink); font-weight: var(--st-fw-bold);
171                                   box-shadow: var(--st-sh-card); }
172.drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--st-s-3); margin-top: var(--st-s-2); }
173.st-toast { animation: toast-in 180ms var(--st-ease); }
174@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }
175
176/* ---------------------------------------------------------------- narrow screens */
177@media (max-width: 1000px) {
178  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
179  .cc-bars { grid-template-columns: 1fr; }
180  .cfg-form { grid-template-columns: 1fr; gap: 4px; }
181  .cfg-form .st-input { margin-bottom: var(--st-s-2); }
182}
183@media (max-width: 900px) {
184  .monitor-row { grid-template-columns: minmax(0, 1fr); }
185}
186/* The tab strip keeps a width it can scroll. The pill's text hides only when the header row overflows (fitHeader in app.js).
187   Load / Unload (PR #3550) sits in the row: 9rem of tabs plus its 7.75rem fit from 458px; below that the tighter floors keep
188   it and the theme button in the viewport. */
189@media (max-width: 955px) {
190  .st-header { padding: 0 var(--st-s-3); gap: var(--st-s-2); }
191  .st-header__brand, #theme-btn, #pill, #unload-btn { flex: none; }
192  .st-header .st-tabs { margin-left: 0; flex: 1 1 auto; min-width: 9rem; overflow-x: auto; }
193  .st-tab { padding: 0 10px; }
194  .st-tab .st-icon { display: none; }
195}
196@media (max-width: 457px) {
197  #unload-btn { min-width: 0; padding: 0 8px; }
198  .st-header .st-tabs { min-width: 5.5rem; }
199}
200/* the name plus "Unloading…" still overflows at 374px in Firefox 158 */
201@media (max-width: 382px) {
202  .st-header__brand { display: none; }
203  .st-header .st-tabs { min-width: 4.75rem; }
204}
205@media (max-width: 640px) {
206  .chat { padding: var(--st-s-5) var(--st-s-4); }
207  .composer-wrap { padding: 0 var(--st-s-3) var(--st-s-3); }
208  .monitor, .about { padding: var(--st-s-4); }
209  .facts { grid-template-columns: 1fr; gap: 2px; }
210  .facts dd { margin-bottom: var(--st-s-2); }
211  .cfg-form .st-input { max-width: none; }
212  .st-btn, .st-input, .seg button, .st-tab { min-height: 40px; }
213  .st-btn--icon, .st-composer__bar .st-btn--icon { width: 40px; height: 40px; }
214  .st-btn--send { width: 44px; }
215  .st-msg__meta .st-btn--icon, .facts .st-btn--icon { width: 40px; height: 40px; }
216  .st-composer__bar { flex-wrap: wrap; }
217  .tool-call__pre, .st-code pre, .table-wrap { max-width: 100%; }
218}
219@media (max-width: 560px) {
220  .metrics { grid-template-columns: minmax(0, 1fr); }
221}
222@media (max-width: 480px) {
223  .st-header { padding: 0 var(--st-s-2); gap: 6px; }
224  .st-header__brand { font-size: var(--st-fs-md); }
225  .st-tabs { gap: 2px; padding: 3px; }
226  .st-tab { padding: 0 8px; }
227  .composer-hint { display: none; }
228  .chat { padding: var(--st-s-4) var(--st-s-3); }
229  .monitor, .about { padding: var(--st-s-3); }
230  .st-bubble { padding: 10px 12px; }
231}
232/* Images tab (POST /v1/images/generations) */
233.img-form{display:flex;flex-direction:column;gap:12px}
234.img-prompt{height:auto;padding:10px 14px;resize:vertical}
235.img-row{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}
236.img-results{display:flex;flex-direction:column;gap:12px}
237.img-results figure{margin:0}
238.img-results img{max-width:100%;border-radius:var(--st-r-lg);display:block}
239.img-results figcaption{font-size:var(--st-fs-sm, 13px);color:var(--st-ink-2, inherit);margin-top:4px}
240
241/* Raster MCP results remain visible outside the collapsed tool details. */
242.tool-image { margin: 16px 0; max-width: 100%; }
243.tool-image img { display: block; width: 100%; max-width: 640px; height: auto; border-radius: var(--st-r-md); }
244.tool-image figcaption { margin-top: 10px; }
245.tool-image a:not([href]) { opacity: .5; pointer-events: none; }
246
247/* Math (serve/web/math.js): a formula never widens the chat; a long display formula scrolls inside its own box. */
248.chat-math { overflow-wrap: normal; }
249.chat-math--display { display: block; text-align: center; overflow-x: auto; max-width: 100%; margin: .6em 0; padding: .25em 0; }
250.chat-math--display > * { margin: 0 !important; }
251.chat-math[data-math-error] { white-space: pre-wrap; }
252.chat-math .katex { font-size: 1.08em; }
253
254/* svg/html preview (serve/web/preview.js): the frame is sandboxed and carries the page's colours, so it is transparent on the
255   theme's surface; the code and the preview swap places inside the same box. */
256.st-code__btns { display: flex; gap: 4px; }
257.st-code .st-btn--icon[aria-pressed="true"] { background: rgba(255, 255, 255, .12); color: #fff; }
258.st-code__preview { display: none; }
259.st-code[data-preview="true"] > pre { display: none; }
260.st-code[data-preview="true"] .st-code__preview { display: block; height: min(340px, 60vh); background: var(--st-surface-2); }
261.st-code [data-preview-scripts] { display: none; }
262.st-code[data-preview="true"] [data-preview-scripts] { display: inline-flex; }
263.st-code .st-btn--icon[data-preview-scripts][aria-pressed="true"] { background: var(--st-warn-tint); color: var(--st-warn-text); }
264.st-code--run .st-code__preview { outline: 2px solid var(--st-warn-text); outline-offset: -2px; }
265.st-code__preview iframe { display: block; width: 100%; height: 100%; border: 0; background: transparent; }
266
267/* ---------------------------------------------------------------- chat history (chats-ui.js)
268   The saved-chats list (PR #1787 by Scotty-Hudson), edit / regenerate / rewind (PR #2615 by uppet) and the Chat settings button. */
269.view--chat { flex-direction: row; }
270.chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
271.chat-sidebar { flex: none; width: 260px; display: flex; flex-direction: column; gap: var(--st-s-3);
272                padding: var(--st-s-4); background: var(--st-surface); border-right: 1px solid var(--st-line); }
273.sidebar-head { display: flex; align-items: center; gap: var(--st-s-2); }
274.sidebar-head .card-title { flex: 1; }
275#sidebar-toggle .st-icon { transform: rotate(90deg); transition: transform var(--st-dur) var(--st-ease); }
276.chat-sidebar[data-open="false"] { width: 60px; }
277.chat-sidebar[data-open="false"] .sidebar-head { flex-direction: column; }
278.chat-sidebar[data-open="false"] #sidebar-toggle .st-icon { transform: rotate(-90deg); }
279.chat-sidebar[data-open="false"] .sidebar-title, .chat-sidebar[data-open="false"] .sidebar-search,
280.chat-sidebar[data-open="false"] .sidebar-list, .chat-sidebar[data-open="false"] .sidebar-foot { display: none; }
281.sidebar-search { height: 36px; font-size: var(--st-fs-sm); }
282.sidebar-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
283.sidebar-group { margin: 0; padding: var(--st-s-3) 8px var(--st-s-1); font-size: var(--st-fs-xs);
284                 font-weight: var(--st-fw-bold); letter-spacing: .04em; text-transform: uppercase; color: var(--st-ink-muted); }
285.chat-item { display: flex; align-items: center; gap: 2px; border-radius: var(--st-r-md); }
286.chat-item.on { background: var(--st-surface-2); }
287.chat-item__title { flex: 1; min-width: 0; border: 0; background: transparent; cursor: pointer; text-align: left;
288                    padding: 8px; color: var(--st-ink-soft); font: 500 var(--st-fs-sm)/1.35 var(--st-font);
289                    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
290.chat-item:hover .chat-item__title { color: var(--st-ink); }
291.chat-item.on .chat-item__title { color: var(--st-ink); font-weight: var(--st-fw-bold); }
292.chat-item__actions { display: flex; gap: 2px; flex: none; opacity: 0; }          /* the buttons come up on hover or focus */
293.chat-item:hover .chat-item__actions, .chat-item:focus-within .chat-item__actions { opacity: 1; }
294.chat-item__actions .st-btn--icon { width: 30px; height: 30px; }
295.chat-item__actions .st-btn--icon .st-icon { width: 16px; height: 16px; }
296.chat-item__input { flex: 1; min-width: 0; height: 34px; font-size: var(--st-fs-sm); }
297.sidebar-empty { margin: 0; padding: var(--st-s-2) 8px; }
298.sidebar-foot { margin: 0; }
299.chat-parent { display: flex; align-items: center; justify-content: center; gap: var(--st-s-3); flex-wrap: wrap; padding: var(--st-s-2) var(--st-s-4);
300               border-bottom: 1px solid var(--st-line-soft); font-size: var(--st-fs-sm); }
301.chat-parent .st-btn { height: 30px; padding: 0 12px; font-size: var(--st-fs-xs); }
302
303/* the buttons under a message, the open panel / editor, and the bars above the box (Undo, a waiting message) */
304.history-actions, .history-editor__actions, .history-undo, .pending { display: flex; flex-wrap: wrap; gap: var(--st-s-2); align-items: center; }
305.history-actions .st-btn, .history-undo .st-btn, .pending .st-btn, .history-panel .st-btn { height: 30px; padding: 0 10px; font-size: var(--st-fs-xs); }
306.history-actions { margin-top: var(--st-s-1); }
307.st-msg--user .history-actions { justify-content: flex-end; }
308.history-panel, .history-editor { width: 100%; display: flex; flex-direction: column; gap: var(--st-s-2); padding: var(--st-s-3);
309                                  border: 1px solid var(--st-line); border-radius: var(--st-r-md); background: var(--st-surface-2); }
310.history-choice { display: flex; align-items: center; gap: var(--st-s-3); flex-wrap: wrap; }
311.history-choice > .muted { flex: 1 1 14rem; min-width: 0; }
312.history-panel > .st-btn { align-self: flex-start; }
313.history-editor textarea { width: 100%; min-height: 140px; max-height: 50vh; resize: vertical; font: inherit; height: auto; padding: 10px 14px; }
314.history-editor p, .history-panel p { margin: 0; }
315.st-msg[data-editing="true"] > .st-bubble { display: none; }
316.history-undo, .pending { max-width: min(100%, 1100px); margin: 0 auto var(--st-s-2); color: var(--st-ink-muted); font-size: var(--st-fs-sm); }
317.pending { justify-content: space-between; padding: 6px 10px; border: 1px solid var(--st-line); border-radius: var(--st-r-md); background: var(--st-surface); }
318.pending__text { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; color: var(--st-ink-soft); }
319.pending__actions { display: flex; gap: var(--st-s-2); }
320
321/* Chat settings: the button says what it is, and the drawer groups the chat switches */
322.chat-settings-button { height: 36px; padding: 0 10px; gap: 6px; white-space: nowrap; font-size: var(--st-fs-sm); }
323.chat-settings-short { display: none; }
324.drawer-group { display: flex; flex-direction: column; gap: var(--st-s-4); padding-top: var(--st-s-4); border-top: 1px solid var(--st-line); }
325.drawer-group__title { margin: 0; font-size: var(--st-fs-base); font-weight: var(--st-fw-bold); color: var(--st-ink); }
326.seg--3 { grid-template-columns: repeat(3, 1fr); }
327.seg--3 button { padding: 0 4px; }
328#lang { width: 100%; }
329@media (max-width: 640px) {
330  .chat-settings-label, .composer-hint { display: none; }
331  .chat-settings-short { display: inline; }
332  .st-btn--send { margin-left: auto; }
333}
334@media (max-width: 760px) {
335  /* the list is an overlay here: the chat keeps the whole width when it is closed to its rail */
336  .view--chat { position: relative; }
337  .chat-sidebar[data-open="true"] { position: absolute; top: 0; left: 0; bottom: 0; z-index: 30; box-shadow: var(--st-sh-pop); }
338  .chat-sidebar { padding: var(--st-s-3); }
339}
340
341/* a message may use the room a wide window gives the chat column (#3176 widened the column; the kit's 720px kept the messages narrow in it) */
342.st-msg { max-width: min(100%, 900px); }
343.st-toast .st-btn { white-space: nowrap; }