techfreakworm commited on
Commit
b2004e8
·
unverified ·
1 Parent(s): 342075f

fix: the desktop rail scrolls inside itself instead of wrapping off-screen, and Gradio's stock styling no longer leaks into the dark page

Browse files

Review round 2, F1 and F10-F14, with minors 14-24 that are CSS:

- F1: Gradio gives every Row child flex-wrap: wrap, so once the rail outgrew its
max-height its overflow wrapped into a second column off the right edge and the
report vanished after every run. The rail is nowrap, its children never shrink,
it is sized to fit the viewport from where it starts (the script measures the
offset), it scrolls with a real scrollbar in a gutter outside the aligned edge,
4 px of padding keep focus rings unclipped (and fix AC-31's 2 px inset), and
Generate is sticky at the rail's bottom so it never leaves the rail's view.
- F10: below 1024 px the slider's number strip grows to 46 px instead of
clipping a 44 px reset button to 24 px.
- F11: at 560 px and below a staged LoRA row stacks: name, strength, Remove; a
slider keeps its minimum and maximum labels (Gradio drops them at 480 px).
- F12: the footer rule no longer overrides Gradio's .hidden, so the inert "Stop
Recording" is gone; Gradio's run history link, which competes with Recent
runs, is hidden.
- F13: the wordmark and the cost title beat Gradio's heading reset (20 px and
16 px Chakra Petch).
- F14: slider tracks and thumbs are drawn from the tokens: paper fill against a
line-strong track (4.1:1), a paper thumb with an ink ring; no #e4e4e7, no #fff.
- Minors: Generate 48 px below 1024; the tagline shows at 834; an ink checkbox
tick and radio dot; input borders at 3.8:1 on the well; the Hub button level
with its box; the actions row closes the Done card; accordion chevrons instead
of Gradio's filled triangles, labels left-aligned; Check and add and Remove in
the small button size; help text capped at 70ch; inline figures in the body
face with tabular figures (Mono kept for inputs and the two tungsten figures);
a recent run's text on its own line on a phone; the monitor pillarbox in the
well tone; a quiet download button over the picture.

ltx25_studio/ui/chrome.py CHANGED
@@ -119,6 +119,8 @@ _TOKENS = """
119
  --mr-slate-2: #242d37;
120
  --mr-well: #0e1216;
121
  --mr-line: #39434f;
 
 
122
  --mr-paper: #e9ecef;
123
  --mr-dust: #9aa6b2;
124
  --mr-tungsten: #f2a33c;
@@ -131,9 +133,25 @@ _TOKENS = """
131
  --mr-mono: "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;
132
  --mr-gutter: 16px;
133
  --mr-bar-h: 104px;
 
 
 
134
  }
135
  """
136
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  #: Gradio's theme variables, pinned to the tokens in BOTH schemes. Gradio's own
138
  #: sheet loads after this one, hence ``!important`` on every declaration.
139
  _THEME_VARS = {
@@ -164,9 +182,9 @@ _THEME_VARS = {
164
  "input-background-fill": "var(--mr-well)",
165
  "input-background-fill-focus": "var(--mr-well)",
166
  "input-background-fill-hover": "var(--mr-well)",
167
- "input-border-color": "var(--mr-line)",
168
  "input-border-color-focus": "var(--mr-paper)",
169
- "input-border-color-hover": "var(--mr-line)",
170
  "input-border-width": "1px",
171
  "input-placeholder-color": "#8b97a3",
172
  "input-radius": "6px",
@@ -191,6 +209,8 @@ _THEME_VARS = {
191
  "checkbox-label-text-color": "var(--mr-paper)",
192
  "checkbox-label-text-color-selected": "var(--mr-paper)",
193
  "checkbox-label-shadow": "none",
 
 
194
  "slider-color": "var(--mr-paper)",
195
  "loader-color": "var(--mr-paper)",
196
  "button-primary-background-fill": "var(--mr-tungsten)",
@@ -271,11 +291,13 @@ body { color: var(--mr-paper); color-scheme: dark; }
271
  @media (min-width: 1024px) { :root { --mr-gutter: 32px; } }
272
  .gradio-container .contain { max-width: 1520px; margin: 0 auto; }
273
  footer { color: var(--mr-dust) !important; }
274
- footer a, footer button { color: var(--mr-dust) !important; }
275
  footer img, footer svg { filter: grayscale(1) brightness(1.5); }
276
  footer { flex-wrap: wrap !important; justify-content: center; gap: 4px 14px !important; }
277
- footer a, footer button { white-space: nowrap !important; }
278
- .mr-num { font-family: var(--mr-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
 
 
279
 
280
  /* one focus ring, everywhere */
281
  :is(button, a, input, textarea, select, summary, [tabindex]):focus-visible {
@@ -288,8 +310,9 @@ footer a, footer button { white-space: nowrap !important; }
288
  :is(#identity, #matrix-frame, #cost, #monitor-idle, #run-summary) .html-container { padding: 0 !important; }
289
  .mr-id { display: flex; align-items: center; gap: 16px; min-height: 56px; max-height: 64px;
290
  padding: 0; position: relative; }
291
- .mr-wordmark { font-family: var(--mr-display); font-weight: 600; font-size: 20px;
292
- letter-spacing: 0.02em; color: var(--mr-paper); margin: 0; white-space: nowrap; }
 
293
  .mr-tagline { color: var(--mr-dust); margin: 0; font-size: 14px; flex: 1 1 auto;
294
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
295
  .mr-quota { position: static; flex: 0 0 auto; }
@@ -313,10 +336,30 @@ footer a, footer button { white-space: nowrap !important; }
313
  #commission { flex: 1 1 auto !important; min-width: 0 !important; gap: 0 !important;
314
  background: var(--mr-slate); border: 1px solid var(--mr-line); border-radius: 10px;
315
  padding: 16px !important; }
316
- #rail { flex: 0 0 clamp(400px, 38vw, 560px) !important; min-width: 0 !important;
317
- position: sticky; top: 12px; align-self: flex-start; max-height: calc(100vh - 24px);
318
- overflow-y: auto; overscroll-behavior: contain; gap: 12px !important;
319
- scrollbar-width: thin; scrollbar-color: var(--mr-line) transparent; padding: 0 2px 4px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
320
  .mr-divide { border-top: 1px solid var(--mr-line) !important; margin-top: 14px !important;
321
  padding-top: 14px !important; }
322
 
@@ -335,13 +378,37 @@ footer a, footer button { white-space: nowrap !important; }
335
  #commission .info, #commission [data-testid="block-info"] + .info { color: var(--mr-dust) !important; }
336
  #commission textarea, #commission input[type="text"], #commission input[type="number"] {
337
  background: var(--mr-well) !important; color: var(--mr-paper) !important;
338
- border: 1px solid var(--mr-line) !important; border-radius: 6px !important; }
 
 
 
339
  #commission textarea::placeholder, #commission input::placeholder { color: #8b97a3 !important; }
340
  #commission textarea:focus, #commission input:focus { border-color: var(--mr-paper) !important; }
341
  input[type="number"] { font-family: var(--mr-mono) !important; font-variant-numeric: tabular-nums; }
342
  input:disabled, textarea:disabled { background: var(--mr-slate) !important; color: var(--mr-dust) !important;
343
  border-style: dashed !important; }
344
  input[type="range"] { accent-color: var(--mr-paper); }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
345
 
346
  /* == the matrix ========================================================== */
347
  #matrix { display: grid !important; grid-template-areas: "stack"; gap: 0 !important; }
@@ -447,13 +514,22 @@ button:disabled { cursor: not-allowed !important; }
447
  background: transparent !important; padding: 0 !important; margin-top: 4px; }
448
  #commission .mr-acc > button, #commission .mr-acc .label-wrap { padding: 12px 14px !important;
449
  min-height: 48px; font-family: var(--mr-body) !important; font-weight: 500; font-size: 14px;
450
- color: var(--mr-paper) !important; }
451
  #commission .mr-acc .label-wrap span { font-family: var(--mr-body) !important; font-size: 14px;
452
  letter-spacing: 0; text-transform: none; }
 
 
 
 
 
 
 
453
  #commission .mr-acc > div:not(.label-wrap) { padding: 0 14px 14px !important; }
454
  .mr-bay-head p { font-size: 13px; line-height: 19px; color: var(--mr-dust); margin: 0 0 10px; max-width: 70ch; }
 
 
455
  .mr-lora-row { align-items: center !important; gap: 10px !important; }
456
- .mr-lora-name p { margin: 0; font-size: 14px; color: var(--mr-paper); overflow-wrap: anywhere; }
457
  #commission .mr-drop.block .wrap, #commission .mr-drop.block button { min-height: 0 !important; }
458
  .mr-lora-name p::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
459
  background: var(--mr-roll); margin-right: 8px; vertical-align: middle; }
@@ -481,7 +557,7 @@ button:disabled { cursor: not-allowed !important; }
481
  border-radius: 10px; aspect-ratio: 16 / 9; overflow: hidden; gap: 0 !important; padding: 0 !important; }
482
  #monitor > * { position: absolute !important; inset: 0; margin: 0 !important; }
483
  #monitor .block { height: 100% !important; }
484
- #monitor video { width: 100%; height: 100%; object-fit: contain; background: #000; }
485
  #monitor [data-testid="video"], #monitor .video-container, #monitor .wrap { height: 100%; }
486
  #monitor #audio-out { display: flex !important; align-items: center; padding: 0 24px !important;
487
  background: var(--mr-well) !important; }
@@ -508,8 +584,8 @@ button:disabled { cursor: not-allowed !important; }
508
  padding: 14px 16px; }
509
  .mr-cost-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
510
  gap: 8px 12px; margin-bottom: 10px; }
511
- .mr-cost-title { font-family: var(--mr-display); font-weight: 600; font-size: 16px; margin: 0;
512
- color: var(--mr-paper); }
513
  .mr-lamps { display: flex; flex-wrap: wrap; gap: 6px; }
514
  .mr-lamp { font-family: var(--mr-display); font-weight: 600; font-size: 12px; line-height: 16px;
515
  letter-spacing: 0.02em; padding: 3px 7px; border-radius: 3px;
@@ -523,7 +599,8 @@ button:disabled { cursor: not-allowed !important; }
523
  .mr-cost-grid dt, .mr-done-grid dt { color: var(--mr-dust); font-size: 13px; line-height: 21px; }
524
  .mr-cost-grid dd, .mr-done-grid dd { margin: 0; color: var(--mr-paper); font-size: 14px; line-height: 21px; }
525
  .mr-cost-grid .mr-num { color: var(--mr-paper); }
526
- .mr-cost-grid dt:nth-of-type(3) + dd .mr-num, .mr-cost-grid dt:nth-of-type(4) + dd .mr-num { color: var(--mr-tungsten); }
 
527
  .mr-sub { color: var(--mr-dust); font-size: 13px; }
528
  .mr-cost-note { margin: 10px 0 0; font-size: 13px; line-height: 19px; color: var(--mr-dust); }
529
  .mr-cost-pending { display: none; margin: 10px 0 0; font-size: 13px; line-height: 19px; color: var(--mr-paper);
@@ -556,7 +633,13 @@ button:disabled { cursor: not-allowed !important; }
556
  .mr-prompt-sent blockquote { margin: 4px 0 0; padding: 8px 10px; border-left: 2px solid var(--mr-line);
557
  background: var(--mr-well); color: var(--mr-paper); font-size: 13px; line-height: 19px;
558
  user-select: text; white-space: pre-wrap; }
 
559
  #report-actions { gap: 8px !important; }
 
 
 
 
 
560
  #rail #run-status.block { border: 1px solid var(--mr-line) !important; border-radius: 10px !important;
561
  padding: 12px 14px !important; background: var(--mr-slate) !important; }
562
  #run-status p { font-size: 14px; line-height: 21px; color: var(--mr-paper); margin: 0 0 6px; max-width: 70ch; }
@@ -594,7 +677,6 @@ button:disabled { cursor: not-allowed !important; }
594
  @media (max-width: 1023px) {
595
  #shell { flex-direction: column !important; }
596
  #commission, #rail { flex: 1 1 auto !important; width: 100% !important; }
597
- #rail { position: static; max-height: none; overflow: visible; }
598
  #monitor { order: 2; } #monitor-caption { order: 3; } #cost { order: 1; }
599
  #run-summary { order: 4; } #report-actions { order: 5; } #run-status { order: 6; } #recent { order: 7; }
600
  #commit { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0 !important;
@@ -605,18 +687,31 @@ button:disabled { cursor: not-allowed !important; }
605
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
606
  #generate-reason { display: none !important; }
607
  .mr-cost-pending { display: block; }
608
- #generate-btn { min-height: 48px; }
609
  .gradio-container { padding-bottom: calc(var(--mr-bar-h) + env(safe-area-inset-bottom) + 16px) !important; }
610
- .mr-tagline { display: none; }
611
  .mr-id { justify-content: space-between; }
612
  #commission button, #rail button, #commission button.secondary, #rail button.secondary,
613
- #commission .mr-secondary, footer button, footer a { min-height: 44px !important; }
614
- #commission button.reset-button, #commission .reset-button { min-width: 44px !important; }
 
 
 
 
 
615
  #monitor button, #monitor a[download] { min-width: 44px !important; min-height: 44px !important;
616
  display: inline-flex; align-items: center; justify-content: center; }
617
- footer button, footer a { display: inline-flex !important; align-items: center; }
 
 
 
 
 
 
 
618
  .mr-chips label { min-height: 44px; }
 
 
619
  }
 
620
  @media (max-width: 560px) {
621
  #matrix-frame, #mode-matrix { --mx-head: 82px; --mx-cell: 46px; --mx-colhead: 44px; }
622
  .mx-col, .mx-row { font-size: 13px; line-height: 16px; }
@@ -626,6 +721,12 @@ button:disabled { cursor: not-allowed !important; }
626
  .mx-note-col { display: inline; color: var(--mr-paper); }
627
  #commission { padding: 12px !important; }
628
  .mr-cost-grid, .mr-done-grid { grid-template-columns: 70px minmax(0, 1fr); }
 
 
 
 
 
 
629
  }
630
 
631
  /* == restraint ============================================================ */
@@ -642,7 +743,19 @@ _SCRIPT = """
642
  obs.observe(document.body, { childList: true, subtree: true });
643
  run();
644
  };
 
 
 
 
 
 
 
 
 
 
 
645
  ready(() => {
 
646
  const status = document.getElementById('run-status');
647
  if (status && !status.dataset.mrLive) {
648
  status.dataset.mrLive = '1';
 
119
  --mr-slate-2: #242d37;
120
  --mr-well: #0e1216;
121
  --mr-line: #39434f;
122
+ /* control edges: 3.8:1 on the well, 3.2:1 on slate */
123
+ --mr-line-strong: #66727f;
124
  --mr-paper: #e9ecef;
125
  --mr-dust: #9aa6b2;
126
  --mr-tungsten: #f2a33c;
 
133
  --mr-mono: "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;
134
  --mr-gutter: 16px;
135
  --mr-bar-h: 104px;
136
+ /* the rail's top at scroll 0 plus its bottom margin; the script measures it */
137
+ --mr-rail-offset: 92px;
138
+ --mr-rail-gutter: 10px;
139
  }
140
  """
141
 
142
+ #: Gradio paints the checkbox tick and the radio dot white; on the paper fill
143
+ #: that is 1.1:1. These are the same glyphs in ink.
144
+ _INK_TICK = (
145
+ "url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='%2312161b' "
146
+ "xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 "
147
+ "0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e"
148
+ "%3c/svg%3e\")"
149
+ )
150
+ _INK_DOT = (
151
+ "url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='%2312161b' "
152
+ "xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e\")"
153
+ )
154
+
155
  #: Gradio's theme variables, pinned to the tokens in BOTH schemes. Gradio's own
156
  #: sheet loads after this one, hence ``!important`` on every declaration.
157
  _THEME_VARS = {
 
182
  "input-background-fill": "var(--mr-well)",
183
  "input-background-fill-focus": "var(--mr-well)",
184
  "input-background-fill-hover": "var(--mr-well)",
185
+ "input-border-color": "var(--mr-line-strong)",
186
  "input-border-color-focus": "var(--mr-paper)",
187
+ "input-border-color-hover": "var(--mr-dust)",
188
  "input-border-width": "1px",
189
  "input-placeholder-color": "#8b97a3",
190
  "input-radius": "6px",
 
209
  "checkbox-label-text-color": "var(--mr-paper)",
210
  "checkbox-label-text-color-selected": "var(--mr-paper)",
211
  "checkbox-label-shadow": "none",
212
+ "checkbox-check": _INK_TICK,
213
+ "radio-circle": _INK_DOT,
214
  "slider-color": "var(--mr-paper)",
215
  "loader-color": "var(--mr-paper)",
216
  "button-primary-background-fill": "var(--mr-tungsten)",
 
291
  @media (min-width: 1024px) { :root { --mr-gutter: 32px; } }
292
  .gradio-container .contain { max-width: 1520px; margin: 0 auto; }
293
  footer { color: var(--mr-dust) !important; }
294
+ footer :is(a, button):not(.hidden) { color: var(--mr-dust) !important; white-space: nowrap !important; }
295
  footer img, footer svg { filter: grayscale(1) brightness(1.5); }
296
  footer { flex-wrap: wrap !important; justify-content: center; gap: 4px 14px !important; }
297
+ /* Gradio's own run history competes with Recent runs */
298
+ footer .run-history, footer .run-history + .divider { display: none !important; }
299
+ /* inline figures: the body face with tabular figures; Mono stays for inputs */
300
+ .mr-num { font-family: var(--mr-body); font-weight: 500; font-variant-numeric: tabular-nums; }
301
 
302
  /* one focus ring, everywhere */
303
  :is(button, a, input, textarea, select, summary, [tabindex]):focus-visible {
 
310
  :is(#identity, #matrix-frame, #cost, #monitor-idle, #run-summary) .html-container { padding: 0 !important; }
311
  .mr-id { display: flex; align-items: center; gap: 16px; min-height: 56px; max-height: 64px;
312
  padding: 0; position: relative; }
313
+ /* Gradio's ".gradio-container-6-24-0 h1" reset (0,1,1) flattens a bare class */
314
+ #identity h1.mr-wordmark { font-family: var(--mr-display); font-weight: 600; font-size: 20px;
315
+ line-height: 28px; letter-spacing: 0.02em; color: var(--mr-paper); margin: 0; white-space: nowrap; }
316
  .mr-tagline { color: var(--mr-dust); margin: 0; font-size: 14px; flex: 1 1 auto;
317
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
318
  .mr-quota { position: static; flex: 0 0 auto; }
 
336
  #commission { flex: 1 1 auto !important; min-width: 0 !important; gap: 0 !important;
337
  background: var(--mr-slate); border: 1px solid var(--mr-line); border-radius: 10px;
338
  padding: 16px !important; }
339
+ /* Gradio gives every Row child flex-wrap: wrap; a column that wraps sends its
340
+ overflow into an off-screen second column instead of scrolling. */
341
+ #rail { min-width: 0 !important; gap: 12px !important; flex-wrap: nowrap !important; }
342
+ #rail > * { flex-shrink: 0 !important; }
343
+ @media (min-width: 1024px) {
344
+ /* Sized to fit the viewport from where it starts; scrolls inside itself with a
345
+ real scrollbar, in a gutter outside the aligned edge. The 4 px padding keeps
346
+ focus rings unclipped; the negative margins keep the content edges aligned. */
347
+ #rail { flex: 0 0 clamp(400px, 38vw, 560px) !important; position: sticky; top: 12px;
348
+ align-self: flex-start; max-height: calc(100vh - var(--mr-rail-offset));
349
+ overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
350
+ scrollbar-gutter: stable; padding: 4px !important;
351
+ margin: -4px calc(-4px - var(--mr-rail-gutter)) -4px -4px !important; }
352
+ #rail::-webkit-scrollbar { width: var(--mr-rail-gutter); }
353
+ #rail::-webkit-scrollbar-track { background: transparent; }
354
+ #rail::-webkit-scrollbar-thumb { background: var(--mr-line-strong); border-radius: 6px;
355
+ border: 2px solid var(--mr-ink); }
356
+ /* Generate never leaves the rail's visible area */
357
+ #rail > #commit { position: sticky; bottom: 0; z-index: 3; background: var(--mr-ink);
358
+ padding: 8px 0 4px !important; margin-top: -8px !important; }
359
+ }
360
+ @supports not selector(::-webkit-scrollbar) {
361
+ #rail { scrollbar-width: thin; scrollbar-color: var(--mr-line-strong) transparent; }
362
+ }
363
  .mr-divide { border-top: 1px solid var(--mr-line) !important; margin-top: 14px !important;
364
  padding-top: 14px !important; }
365
 
 
378
  #commission .info, #commission [data-testid="block-info"] + .info { color: var(--mr-dust) !important; }
379
  #commission textarea, #commission input[type="text"], #commission input[type="number"] {
380
  background: var(--mr-well) !important; color: var(--mr-paper) !important;
381
+ border: 1px solid var(--mr-line-strong) !important; border-radius: 6px !important; }
382
+ /* the slider's number box sits in a bordered strip of its own */
383
+ #commission .tab-like-container { border-color: var(--mr-line-strong) !important; }
384
+ #commission .tab-like-container input[type="number"] { border: none !important; border-radius: 0 !important; }
385
  #commission textarea::placeholder, #commission input::placeholder { color: #8b97a3 !important; }
386
  #commission textarea:focus, #commission input:focus { border-color: var(--mr-paper) !important; }
387
  input[type="number"] { font-family: var(--mr-mono) !important; font-variant-numeric: tabular-nums; }
388
  input:disabled, textarea:disabled { background: var(--mr-slate) !important; color: var(--mr-dust) !important;
389
  border-style: dashed !important; }
390
  input[type="range"] { accent-color: var(--mr-paper); }
391
+ /* The slider: Gradio paints a near-white bar (#e4e4e7 track, #fff thumb). Filled
392
+ paper against an unfilled line-strong track is 4.1:1; the track reads 3.2:1
393
+ on slate. */
394
+ #commission input[type="range"]::-webkit-slider-runnable-track { height: 4px !important;
395
+ border-radius: 2px !important; background: linear-gradient(to right, var(--mr-paper)
396
+ var(--range_progress, 0%), var(--mr-line-strong) var(--range_progress, 0%)) !important; }
397
+ #commission input[type="range"]::-webkit-slider-thumb { width: 16px !important; height: 16px !important;
398
+ margin-top: -6px !important; background-color: var(--mr-paper) !important;
399
+ box-shadow: 0 0 0 2px var(--mr-ink) !important; }
400
+ #commission input[type="range"]::-moz-range-track { height: 4px !important; border-radius: 2px;
401
+ background: var(--mr-line-strong) !important; }
402
+ #commission input[type="range"]::-moz-range-progress { height: 4px !important;
403
+ background-color: var(--mr-paper) !important; }
404
+ #commission input[type="range"]::-moz-range-thumb { background-color: var(--mr-paper) !important;
405
+ box-shadow: 0 0 0 2px var(--mr-ink) !important; }
406
+ #commission input[type="range"][disabled]::-webkit-slider-thumb { background-color: var(--mr-dust) !important; }
407
+ /* the radio chips' inner dot is white on paper in Gradio; ink here */
408
+ .gradio-container .gradio-style input[type="radio"]:checked::after { background-color: var(--mr-ink) !important; }
409
+ /* help text at a readable measure */
410
+ #commission .info-text, #commission .mr-caption p, #commission .mr-hint p, #commission .mr-line p,
411
+ #commission .mr-bay-head p, #commission #lora-verdict p { max-width: 70ch; }
412
 
413
  /* == the matrix ========================================================== */
414
  #matrix { display: grid !important; grid-template-areas: "stack"; gap: 0 !important; }
 
514
  background: transparent !important; padding: 0 !important; margin-top: 4px; }
515
  #commission .mr-acc > button, #commission .mr-acc .label-wrap { padding: 12px 14px !important;
516
  min-height: 48px; font-family: var(--mr-body) !important; font-weight: 500; font-size: 14px;
517
+ color: var(--mr-paper) !important; text-align: left !important; align-items: center; gap: 12px; }
518
  #commission .mr-acc .label-wrap span { font-family: var(--mr-body) !important; font-size: 14px;
519
  letter-spacing: 0; text-transform: none; }
520
+ /* Gradio's filled triangle becomes the same chevron as "How quota works" */
521
+ #commission .mr-acc .label-wrap .icon { font-size: 0 !important; flex: 0 0 16px; width: 16px; height: 16px;
522
+ display: inline-flex; align-items: center; justify-content: center; transform: none !important; }
523
+ #commission .mr-acc .label-wrap .icon::after { content: ""; width: 7px; height: 7px;
524
+ border-right: 1.5px solid var(--mr-dust); border-bottom: 1.5px solid var(--mr-dust);
525
+ transform: rotate(45deg) translateY(-2px); }
526
+ #commission .mr-acc .label-wrap.open .icon::after { transform: rotate(-135deg) translateY(-2px); }
527
  #commission .mr-acc > div:not(.label-wrap) { padding: 0 14px 14px !important; }
528
  .mr-bay-head p { font-size: 13px; line-height: 19px; color: var(--mr-dust); margin: 0 0 10px; max-width: 70ch; }
529
+ /* the Hub box and its button share a baseline: the button sits level with the input */
530
+ .mr-hub-row { align-items: flex-end !important; }
531
  .mr-lora-row { align-items: center !important; gap: 10px !important; }
532
+ .mr-lora-name p { margin: 0; font-size: 14px; color: var(--mr-paper); overflow-wrap: break-word; }
533
  #commission .mr-drop.block .wrap, #commission .mr-drop.block button { min-height: 0 !important; }
534
  .mr-lora-name p::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
535
  background: var(--mr-roll); margin-right: 8px; vertical-align: middle; }
 
557
  border-radius: 10px; aspect-ratio: 16 / 9; overflow: hidden; gap: 0 !important; padding: 0 !important; }
558
  #monitor > * { position: absolute !important; inset: 0; margin: 0 !important; }
559
  #monitor .block { height: 100% !important; }
560
+ #monitor video { width: 100%; height: 100%; object-fit: contain; background: var(--mr-well); }
561
  #monitor [data-testid="video"], #monitor .video-container, #monitor .wrap { height: 100%; }
562
  #monitor #audio-out { display: flex !important; align-items: center; padding: 0 24px !important;
563
  background: var(--mr-well) !important; }
 
584
  padding: 14px 16px; }
585
  .mr-cost-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
586
  gap: 8px 12px; margin-bottom: 10px; }
587
+ #cost h2.mr-cost-title { font-family: var(--mr-display); font-weight: 600; font-size: 16px;
588
+ line-height: 22px; margin: 0; color: var(--mr-paper); }
589
  .mr-lamps { display: flex; flex-wrap: wrap; gap: 6px; }
590
  .mr-lamp { font-family: var(--mr-display); font-weight: 600; font-size: 12px; line-height: 16px;
591
  letter-spacing: 0.02em; padding: 3px 7px; border-radius: 3px;
 
599
  .mr-cost-grid dt, .mr-done-grid dt { color: var(--mr-dust); font-size: 13px; line-height: 21px; }
600
  .mr-cost-grid dd, .mr-done-grid dd { margin: 0; color: var(--mr-paper); font-size: 14px; line-height: 21px; }
601
  .mr-cost-grid .mr-num { color: var(--mr-paper); }
602
+ .mr-cost-grid dt:nth-of-type(3) + dd .mr-num, .mr-cost-grid dt:nth-of-type(4) + dd .mr-num {
603
+ color: var(--mr-tungsten); font-family: var(--mr-mono); }
604
  .mr-sub { color: var(--mr-dust); font-size: 13px; }
605
  .mr-cost-note { margin: 10px 0 0; font-size: 13px; line-height: 19px; color: var(--mr-dust); }
606
  .mr-cost-pending { display: none; margin: 10px 0 0; font-size: 13px; line-height: 19px; color: var(--mr-paper);
 
633
  .mr-prompt-sent blockquote { margin: 4px 0 0; padding: 8px 10px; border-left: 2px solid var(--mr-line);
634
  background: var(--mr-well); color: var(--mr-paper); font-size: 13px; line-height: 19px;
635
  user-select: text; white-space: pre-wrap; }
636
+ /* Reuse seed and Use this prompt belong to the Done card: the actions row closes it */
637
  #report-actions { gap: 8px !important; }
638
+ #run-summary:has(+ #report-actions button:not(.hidden)) .mr-done {
639
+ border-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; padding-bottom: 4px; }
640
+ #report-actions:has(button:not(.hidden)) { margin-top: -12px !important; padding: 2px 8px 8px !important;
641
+ border: 1px solid var(--mr-line); border-top: 0; border-left: 4px solid var(--mr-roll);
642
+ border-radius: 0 0 10px 10px; background: var(--mr-slate); }
643
  #rail #run-status.block { border: 1px solid var(--mr-line) !important; border-radius: 10px !important;
644
  padding: 12px 14px !important; background: var(--mr-slate) !important; }
645
  #run-status p { font-size: 14px; line-height: 21px; color: var(--mr-paper); margin: 0 0 6px; max-width: 70ch; }
 
677
  @media (max-width: 1023px) {
678
  #shell { flex-direction: column !important; }
679
  #commission, #rail { flex: 1 1 auto !important; width: 100% !important; }
 
680
  #monitor { order: 2; } #monitor-caption { order: 3; } #cost { order: 1; }
681
  #run-summary { order: 4; } #report-actions { order: 5; } #run-status { order: 6; } #recent { order: 7; }
682
  #commit { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0 !important;
 
687
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
688
  #generate-reason { display: none !important; }
689
  .mr-cost-pending { display: block; }
 
690
  .gradio-container { padding-bottom: calc(var(--mr-bar-h) + env(safe-area-inset-bottom) + 16px) !important; }
 
691
  .mr-id { justify-content: space-between; }
692
  #commission button, #rail button, #commission button.secondary, #rail button.secondary,
693
+ #commission .mr-secondary { min-height: 44px !important; }
694
+ #rail #generate-btn { min-height: 48px !important; }
695
+ /* Gradio's slider number strip is 24 px tall with overflow hidden, which clipped a
696
+ 44 px reset button; the strip grows instead (46 = 44 + its two borders). */
697
+ #commission .tab-like-container { height: 46px !important; }
698
+ #commission button.reset-button { min-width: 44px !important; min-height: 44px !important;
699
+ height: 44px !important; }
700
  #monitor button, #monitor a[download] { min-width: 44px !important; min-height: 44px !important;
701
  display: inline-flex; align-items: center; justify-content: center; }
702
+ #monitor :is(.icon-button-wrapper, .icon-buttons) { background: transparent !important;
703
+ border: none !important; box-shadow: none !important; }
704
+ #monitor :is(.icon-button-wrapper, .icon-buttons) :is(button, a) { border: none !important;
705
+ background: rgba(14, 18, 22, 0.72) !important; border-radius: 6px !important;
706
+ color: var(--mr-paper) !important; box-shadow: none !important; }
707
+ footer :is(button, a):not(.hidden) { display: inline-flex !important; align-items: center;
708
+ min-height: 44px !important; }
709
+ footer .divider { display: none !important; }
710
  .mr-chips label { min-height: 44px; }
711
+ /* Gradio drops a slider's minimum and maximum labels at 480 px and below */
712
+ #commission .min_value, #commission .max_value { display: inline-block !important; }
713
  }
714
+ @media (max-width: 760px) { .mr-tagline { display: none; } }
715
  @media (max-width: 560px) {
716
  #matrix-frame, #mode-matrix { --mx-head: 82px; --mx-cell: 46px; --mx-colhead: 44px; }
717
  .mx-col, .mx-row { font-size: 13px; line-height: 16px; }
 
721
  .mx-note-col { display: inline; color: var(--mr-paper); }
722
  #commission { padding: 12px !important; }
723
  .mr-cost-grid, .mr-done-grid { grid-template-columns: 70px minmax(0, 1fr); }
724
+ /* a staged adapter stacks: its name on one line, the strength under it, then Remove */
725
+ .mr-lora-row { flex-wrap: wrap !important; row-gap: 4px !important; }
726
+ .mr-lora-row > * { flex: 1 1 100% !important; min-width: 0 !important; }
727
+ .mr-lora-row > button { flex: 0 0 auto !important; }
728
+ /* a recent run's line takes the full width, its buttons wrap under it */
729
+ .mr-recent-row > .mr-recent-text { flex: 1 1 100% !important; min-width: 0 !important; }
730
  }
731
 
732
  /* == restraint ============================================================ */
 
743
  obs.observe(document.body, { childList: true, subtree: true });
744
  run();
745
  };
746
+ // The rail fits the viewport from where the columns start: its height is the
747
+ // viewport less that offset (the CSS default is the offset measured at 1440).
748
+ const railOffset = () => {
749
+ const column = document.getElementById('commission');
750
+ if (!column) return false;
751
+ const top = Math.round(column.getBoundingClientRect().top + window.scrollY);
752
+ document.documentElement.style.setProperty('--mr-rail-offset', (top + 8) + 'px');
753
+ return true;
754
+ };
755
+ let railMeasured = false;
756
+ window.addEventListener('resize', railOffset);
757
  ready(() => {
758
+ if (!railMeasured) railMeasured = railOffset();
759
  const status = document.getElementById('run-status');
760
  if (status && !status.dataset.mrLive) {
761
  status.dataset.mrLive = '1';
ltx25_studio/ui/components.py CHANGED
@@ -137,6 +137,7 @@ def lora_bay(*, rows: int, cap: str, max_weight: float) -> dict[str, Any]:
137
  "Check and add",
138
  variant="secondary",
139
  elem_classes=["mr-secondary"],
 
140
  scale=1,
141
  min_width=140,
142
  )
@@ -165,7 +166,12 @@ def lora_bay(*, rows: int, cap: str, max_weight: float) -> dict[str, Any]:
165
  min_width=160,
166
  )
167
  remove = gr.Button(
168
- "Remove", visible=False, elem_classes=["mr-quiet"], scale=0, min_width=90
 
 
 
 
 
169
  )
170
  widgets["rows"].append({"name": name, "weight": weight, "remove": remove})
171
  widgets["clear"] = gr.Button("Remove all", elem_classes=["mr-quiet"], size="sm", visible=False)
 
137
  "Check and add",
138
  variant="secondary",
139
  elem_classes=["mr-secondary"],
140
+ size="sm",
141
  scale=1,
142
  min_width=140,
143
  )
 
166
  min_width=160,
167
  )
168
  remove = gr.Button(
169
+ "Remove",
170
+ visible=False,
171
+ elem_classes=["mr-quiet"],
172
+ size="sm",
173
+ scale=0,
174
+ min_width=90,
175
  )
176
  widgets["rows"].append({"name": name, "weight": weight, "remove": remove})
177
  widgets["clear"] = gr.Button("Remove all", elem_classes=["mr-quiet"], size="sm", visible=False)