okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
3cabb9e3f
main
1/* Strata web app - layout on top of tokens.css + components.css (the Strata UI kit). Colours, type, radii and 2shadows 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 : 32 px ; padding : 0 12 px ; min-width : 7.75 rem ; } 15. st-header--clip # pill-text { display : none; } 16# drawer-close . st-icon { transform : rotate ( -90 deg ); } 17 18/* ---------------------------------------------------------------- chat */ 19. chat-scroll { flex : 1 ; min-height : 0 ; overflow-y : auto; } 20. chat { max-width : min ( 100 % , 1100 px ); margin : 0 auto; padding : var ( --st-s-8 ) var ( --st-s-6 ) var ( --st-s-6 ); display : flex; 21flex-direction : column; gap : var ( --st-s-6 ); } 22. chat-empty { margin : 12 vh auto0 ; 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 ); 24letter-spacing : -.02 em ; } 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 .9 em var ( --st-font-mono ); background : var ( --st-surface-2 ); border : 1 px solidvar ( --st-line-soft ); 38border-radius : 6 px ; padding : 1 px 5 px ; } 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 : 3 px solidvar ( --st-line ); 41color : var ( --st-ink-muted ); } 42. st-bubble hr { border : 0 ; border-top : 1 px solidvar ( --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 : 1 px solidvar ( --st-line ); padding : 6 px 10 px ; 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 : 220 px ; max-height : 180 px ; border-radius : var ( --st-r-md ); border : 1 px solidvar ( --st-line ); } 47. st-msg . st-collapse { width : 100 % ; } 48. st-collapse__body . thinking { white-space : pre-wrap; overflow-wrap : anywhere; max-height : 420 px ; overflow-y : auto; } 49. st-msg { min-width : 0 ; } 50. st-msg__meta . st-btn--icon { width : 28 px ; height : 28 px ; } 51. st-msg__meta . st-btn--icon . st-icon { width : 16 px ; height : 16 px ; } 52. cursor :: after { content : "" ; display : inline-block; width : 8 px ; height : 1.1 em ; margin-left : 2 px ; vertical-align : -3 px ; 53border-radius : 2 px ; background : var ( --st-accent ); animation : blink1 s 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 : 10 px 14 px ; 56font-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 : 8 px 12 px ; 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; 61min-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 : blink1 s 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 : 10 px 12 px ; max-height : 320 px ; overflow : auto; white-space : pre-wrap; overflow-wrap : anywhere; 68font : 400 12.5 px/1.5var ( --st-font-mono ); color : var ( --st-ink-soft ); background : var ( --st-surface ); 69border : 1 px solidvar ( --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 % , 1100 px ); margin : 0 auto; } 73. st-composer textarea { max-height : 40 vh ; } 74. st-btn--send { width : 42 px ; 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 : 2 px 4 px 0 ; } 77. st-composer . dragging { outline : 2 px dashedvar ( --st-accent ); outline-offset : 3 px ; } 78. chip { display : inline-flex; align-items : center; gap : 6 px ; height : 30 px ; padding : 0 6 px 0 10 px ; border-radius : var ( --st-r-pill ); 79background : var ( --st-surface-2 ); border : 1 px solidvar ( --st-line ); font-size : var ( --st-fs-xs ); color : var ( --st-ink-soft ); } 80. chip . st-btn--icon { width : 22 px ; height : 22 px ; border-radius : 50 % ; } 81. chip . st-btn--icon . st-icon { width : 14 px ; height : 14 px ; } 82 83/* ---------------------------------------------------------------- monitor */ 84. view--monitor , . view--about { overflow-y : auto; } 85. monitor , . about { max-width : min ( 100 % , 1920 px ); width : 100 % ; margin : 0 auto; padding : var ( --st-s-6 ); display : flex; flex-direction : column; 86gap : 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 : opacityvar ( --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 ); 94font-weight : var ( --st-fw-medium ); font-variant-numeric : tabular-nums; } 95. metrics { display : grid; grid-template-columns : repeat ( auto-fit, minmax ( 280 px , 1 fr )); 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 : 4 px ; } 98. st-metric__sub { font-size : var ( --st-fs-xs ); color : var ( --st-ink-muted ); font-variant-numeric : tabular-nums; min-height : 1 em ; } 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 : 10 px ; min-width : 0 ; } 102. speed-values > div : last-child { text-align : right; } 103. speed-values . st-metric__value { font-size : clamp ( 20 px , 2.2 vw , 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 ( 260 px , 100 % ), 1 fr ) minmax ( 0 , 2.4 fr ); gap : var ( --st-s-4 ); } 108. ctx-card { display : flex; flex-direction : column; gap : var ( --st-s-2 ); } 109. ctx-gauge { position : relative; width : 150 px ; max-width : 100 % ; aspect-ratio : 1 ; height : auto; margin : var ( --st-s-2 ) autovar ( --st-s-3 ); } 110. ctx-gauge . st-gauge { width : 100 % ; height : 100 % ; } 111. ctx-gauge . st-gauge__fill { transition : stroke-dasharray400 ms var ( --st-ease ); } 112. ctx-gauge__label { position : absolute; inset : 0 ; display : flex; flex-direction : column; align-items : center; justify-content : center; 113font-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 ); 116margin-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 { 122white-space : nowrap; 123padding-inline : 8 px ; 124} 125. req-head { display : flex; align-items : center; justify-content : space-between; gap : var ( --st-s-2 ); } 126. table-wrap . all { max-height : 420 px ; 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 : 1 fr 1 fr ; 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 ( 180 px , 100 % ), max-content) minmax ( 0 , 1 fr ); gap : var ( --st-s-3 ) var ( --st-s-4 ); 136align-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 12 px var ( --st-font-mono ); color : var ( --st-ink-muted ); display : block; } 139. cfg-form . st-input { height : 38 px ; width : 100 % ; max-width : 360 px ; 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 : 1 px solidvar ( --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 : 6 px ; } 145. mcp-server__tools . chip { height : 26 px ; padding : 0 10 px ; font-family : var ( --st-font-mono ); } 146. mcp-note { margin : 0 ; } 147 148/* ---------------------------------------------------------------- about */ 149. about { max-width : min ( 100 % , 1100 px ); } 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 ( 140 px , max-content) 1 fr ; gap : 10 px 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 : 6 px ; 155overflow-wrap : anywhere; } 156. facts dd code { font : 400 13 px var ( --st-font-mono ); } 157. facts . st-btn--icon { width : 28 px ; height : 28 px ; } 158. facts . st-btn--icon . st-icon { width : 16 px ; height : 16 px ; } 159. toggle-row { display : flex; align-items : center; justify-content : space-between; gap : var ( --st-s-4 ); font-size : var ( --st-fs-sm ); 160font-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 , 1 fr ); gap : 4 px ; padding : 4 px ; background : var ( --st-surface-2 ); 167border : 1 px solidvar ( --st-line ); border-radius : var ( --st-r-md ); } 168. seg button { height : 32 px ; border : 0 ; border-radius : 10 px ; background : transparent; color : var ( --st-ink-muted ); 169font : 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 ); 171box-shadow : var ( --st-sh-card ); } 172. drawer-actions { display : grid; grid-template-columns : 1 fr 1 fr ; gap : var ( --st-s-3 ); margin-top : var ( --st-s-2 ); } 173. st-toast { animation : toast-in180 ms var ( --st-ease ); } 174@keyframes toast-in{ from { opacity : 0 ; transform : translateY ( 6 px ); } } 175 176/* ---------------------------------------------------------------- narrow screens */ 177@media ( max-width : 1000 px ) { 178. metrics { grid-template-columns : repeat ( 2 , minmax ( 0 , 1 fr )); } 179. cc-bars { grid-template-columns : 1 fr ; } 180. cfg-form { grid-template-columns : 1 fr ; gap : 4 px ; } 181. cfg-form . st-input { margin-bottom : var ( --st-s-2 ); } 182} 183@media ( max-width : 900 px ) { 184. monitor-row { grid-template-columns : minmax ( 0 , 1 fr ); } 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). 187Load / Unload (PR #3550) sits in the row: 9rem of tabs plus its 7.75rem fit from 458px; below that the tighter floors keep 188it and the theme button in the viewport. */ 189@media ( max-width : 955 px ) { 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 : 9 rem ; overflow-x : auto; } 193. st-tab { padding : 0 10 px ; } 194. st-tab . st-icon { display : none; } 195} 196@media ( max-width : 457 px ) { 197# unload-btn { min-width : 0 ; padding : 0 8 px ; } 198. st-header . st-tabs { min-width : 5.5 rem ; } 199} 200/* the name plus "Unloading…" still overflows at 374px in Firefox 158 */ 201@media ( max-width : 382 px ) { 202. st-header__brand { display : none; } 203. st-header . st-tabs { min-width : 4.75 rem ; } 204} 205@media ( max-width : 640 px ) { 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 : 1 fr ; gap : 2 px ; } 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 : 40 px ; } 213. st-btn--icon , . st-composer__bar . st-btn--icon { width : 40 px ; height : 40 px ; } 214. st-btn--send { width : 44 px ; } 215. st-msg__meta . st-btn--icon , . facts . st-btn--icon { width : 40 px ; height : 40 px ; } 216. st-composer__bar { flex-wrap : wrap; } 217. tool-call__pre , . st-code pre , . table-wrap { max-width : 100 % ; } 218} 219@media ( max-width : 560 px ) { 220. metrics { grid-template-columns : minmax ( 0 , 1 fr ); } 221} 222@media ( max-width : 480 px ) { 223. st-header { padding : 0 var ( --st-s-2 ); gap : 6 px ; } 224. st-header__brand { font-size : var ( --st-fs-md ); } 225. st-tabs { gap : 2 px ; padding : 3 px ; } 226. st-tab { padding : 0 8 px ; } 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 : 10 px 12 px ; } 231} 232/* Images tab (POST /v1/images/generations) */ 233. img-form { display : flex; flex-direction : column; gap : 12 px } 234. img-prompt { height : auto; padding : 10 px 14 px ; resize : vertical} 235. img-row { display : flex; gap : 12 px ; align-items : flex-end; flex-wrap : wrap} 236. img-results { display : flex; flex-direction : column; gap : 12 px } 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 , 13 px ); color : var ( --st-ink-2 , inherit); margin-top : 4 px } 240 241/* Raster MCP results remain visible outside the collapsed tool details. */ 242. tool-image { margin : 16 px 0 ; max-width : 100 % ; } 243. tool-image img { display : block; width : 100 % ; max-width : 640 px ; height : auto; border-radius : var ( --st-r-md ); } 244. tool-image figcaption { margin-top : 10 px ; } 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 : .6 em 0 ; padding : .25 em 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.08 em ; } 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 255theme's surface; the code and the preview swap places inside the same box. */ 256. st-code__btns { display : flex; gap : 4 px ; } 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 ( 340 px , 60 vh ); 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 : 2 px solidvar ( --st-warn-text ); outline-offset : -2 px ; } 265. st-code__preview iframe { display : block; width : 100 % ; height : 100 % ; border : 0 ; background : transparent; } 266 267/* ---------------------------------------------------------------- chat history (chats-ui.js) 268The 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 : 260 px ; display : flex; flex-direction : column; gap : var ( --st-s-3 ); 272padding : var ( --st-s-4 ); background : var ( --st-surface ); border-right : 1 px solidvar ( --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 ( 90 deg ); transition : transformvar ( --st-dur ) var ( --st-ease ); } 276. chat-sidebar [data-open = "false" ]{ width : 60 px ; } 277. chat-sidebar [data-open = "false" ]. sidebar-head { flex-direction : column; } 278. chat-sidebar [data-open = "false" ]# sidebar-toggle . st-icon { transform : rotate ( -90 deg ); } 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 : 36 px ; 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 ) 8 px var ( --st-s-1 ); font-size : var ( --st-fs-xs ); 284font-weight : var ( --st-fw-bold ); letter-spacing : .04 em ; text-transform : uppercase; color : var ( --st-ink-muted ); } 285. chat-item { display : flex; align-items : center; gap : 2 px ; 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; 288padding : 8 px ; color : var ( --st-ink-soft ); font : 500 var ( --st-fs-sm ) / 1.35 var ( --st-font ); 289white-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 : 2 px ; 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 : 30 px ; height : 30 px ; } 295. chat-item__actions . st-btn--icon . st-icon { width : 16 px ; height : 16 px ; } 296. chat-item__input { flex : 1 ; min-width : 0 ; height : 34 px ; font-size : var ( --st-fs-sm ); } 297. sidebar-empty { margin : 0 ; padding : var ( --st-s-2 ) 8 px ; } 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 ); 300border-bottom : 1 px solidvar ( --st-line-soft ); font-size : var ( --st-fs-sm ); } 301. chat-parent . st-btn { height : 30 px ; padding : 0 12 px ; 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 : 30 px ; padding : 0 10 px ; 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 ); 309border : 1 px solidvar ( --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 14 rem ; min-width : 0 ; } 312. history-panel > . st-btn { align-self : flex-start; } 313. history-editor textarea { width : 100 % ; min-height : 140 px ; max-height : 50 vh ; resize : vertical; font : inherit; height : auto; padding : 10 px 14 px ; } 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 % , 1100 px ); margin : 0 autovar ( --st-s-2 ); color : var ( --st-ink-muted ); font-size : var ( --st-fs-sm ); } 317. pending { justify-content : space-between; padding : 6 px 10 px ; border : 1 px solidvar ( --st-line ); border-radius : var ( --st-r-md ); background : var ( --st-surface ); } 318. pending__text { flex : 1 1 12 rem ; 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 : 36 px ; padding : 0 10 px ; gap : 6 px ; 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 : 1 px solidvar ( --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 , 1 fr ); } 327. seg--3 button { padding : 0 4 px ; } 328# lang { width : 100 % ; } 329@media ( max-width : 640 px ) { 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 : 760 px ) { 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 % , 900 px ); } 343. st-toast . st-btn { white-space : nowrap; }