/* style -- ONE CONTROL FAMILY, EVERY ROOM.

   Simon, 2 Nov 2026: "Need you to go through the gui and ensure spacing,
   button styles and everything is more consistent, too much inconsistency
   throughout the app."

   Measured before this was written (_scratch/ui-audit/report.md): 90 kinds
   of text button, 22 kinds of crimson button for 26 buttons, 29 kinds of
   section label, selects from 18 to 34px tall. Create was the one place that
   already agreed with itself -- his "Generation Panel" design,
   31-generation-panel.css -- so its numbers became tokens (css/tokens.css,
   "The control family, read off Create"). The shared classes wear them in
   their own files (.btn in 14-buttons.css, the fields in 10-form.css, the
   toolbar pills in 11-toolbar.css, .sec-title in 08-settings.css); THIS sheet
   points each room's own spelling of the same control at the same tokens.

   HOW IT IS BUILT. The rooms draw their own markup and most carry a <style>
   of their own (storyboard.js, shot-builder.js, ask.js, nodes.js, ...),
   which lands in <head> AFTER every <link>. So each remap repeats the room's
   own selector with `html body` in front -- more specific than the rule it
   revises, never !important (32-create-rooms.css does the same with
   `html`) -- and sets only what makes the family: surface, edge, corner,
   height, the words' size and weight. Layouts, widths, wording and
   behaviour stay the rooms' own. The shapes:

     section label  10px / 500 / .13em / #8e8e8e, capitals   (Create's MODEL)
     panel title    11px / 700 / .12em / the text colour      (beside its x)
     segmented      a 34px dark well, 3px in, 26px tabs; the lit one in
                    Generate's gradient                       (Create's MODE row)
     primary        Generate's gradient, 6px corner           (Generate)
     secondary      #121212 / #272727 / 5px, 26px compact     (Ask)
     typing         #090909 / #232323 / 5px                    (the prompt) */

/* =====================================================================
   SECTION LABELS -- Create's .sec-title wherever a room spells it
   ===================================================================== */
html body .shb-h,
html body .shbt-top > b,
html body .sb-libh,
html body .sb-insp .lbl,
html body .sb-opbody .lbl,
html body .sb-screfs-h,
html body .sb-scenelab,
html body .insp-sp-head > span,
html body .nd-sp-head,
html body .acct-lab,
html body .dlg-field .dlg-head,
html body .bt-addrow-in > .t,
html body #bt-lim > .k,
html body .ln-mhead .ln-seclab {
  font-size: var(--label-fs); font-weight: var(--label-fw); letter-spacing: var(--label-ls);
  text-transform: uppercase; color: var(--label-color);
}
/* The Board's options column is narrow and its labels long ("Consistency
   -- written into every prompt"): at full tracking that one broke onto two
   lines. A touch less air there, the same face. */
html body .sb-opbody .lbl { letter-spacing: .07em; }
/* A label's aside stays a quiet sentence, not more capitals. */
html body .shb-h small, html body .sb-scenelab em, html body .sb-screfs-h em { letter-spacing: 0; text-transform: none; }

/* =====================================================================
   PANEL TITLES -- the name beside a panel's close cross
   ===================================================================== */
html body .sb-ophead > span:first-child {
  font-size: var(--head-fs); font-weight: var(--head-fw); letter-spacing: var(--head-ls); color: var(--text);
}

/* =====================================================================
   SEGMENTED CONTROLS -- Create's MODE row: a dark well, tabs inset
   ===================================================================== */
html body .shb-modes, html body .shb-modebar, html body .shb-segs,
html body .insp-mode, html body .uiscale-seg {
  background: var(--ctl-well); border: 1px solid var(--ctl-line-soft); border-radius: var(--ctl-r-lg);
  padding: 3px; gap: 3px; box-sizing: border-box;
}
/* Shot Builder's mode bar holds the Image/Video segment inside it: one well. */
html body .shb-modebar .shb-modes { background: none; border: 0; padding: 0; border-radius: 0; }
html body .shb-modes button, html body .shb-covtab, html body .shb-segs button,
html body .insp-mode button, html body .insp-hero-modes .insp-mode button, html body .uiscale-seg button {
  height: var(--ctl-h-sm); padding-top: 0; padding-bottom: 0; border: 0; border-radius: var(--ctl-r-sm);
  font-size: var(--ctl-fs); font-weight: var(--ctl-fw); box-sizing: border-box;
}
html body .shb-modes button.on, html body .shb-covtab.on,
html body .insp-mode button.on, html body .uiscale-seg button.on {
  background: var(--grad-primary); color: #fff;
}
/* The Board's two little in-cell switches keep their size (the table's
   widths are measured, tests/board-table.mjs); they take the family's edge,
   corner and lit colour. */
html body .sb-cbtog, html body .sb-sndby { border-color: var(--ctl-line); border-radius: var(--ctl-r-sm); }
html body .sb-cbtog button + button, html body .sb-sndby button + button { border-left-color: var(--ctl-line); }
html body .sb-cbtog button.on, html body .sb-sndby button.on { background: var(--grad-primary); color: #fff; }

/* =====================================================================
   PRIMARY -- every button that spends wears Generate
   ===================================================================== */
html body .sb-genshot,
html body .insp-go,
html body .rp-go {
  background: var(--grad-primary); border-color: transparent; color: #fff; border-radius: var(--ctl-r-lg);
}
html body .insp-go:not(.insp-go-big) { box-shadow: none; }
html body .sb-genshot { font-weight: 600; }
/* Ask's Send keeps its own shape: the Covert Composer redesign Simon drew
   for that room (an 8px crimson word at the right of a ruled-off foot,
   tests/ask-room.mjs) -- a design asked for by name, not drift. It takes
   only the gradient. */
html body #ask-go { background: var(--grad-primary); }

/* =====================================================================
   SECONDARY AND COMPACT BUTTONS -- Ask's face
   ===================================================================== */
html body .insp-tb, html body .insp-sp-new {
  background: var(--ctl-surface); border-color: var(--ctl-line); border-radius: var(--ctl-r);
  height: var(--ctl-h-sm); font-weight: var(--ctl-fw);
}
html body .insp-tb:hover:not(:disabled) { border-color: var(--ctl-line-hover); }
html body .insp-tb.on { background: var(--accent-soft); border-color: rgba(var(--accent-rgb), .55); }
html body #sb-allbtn, html body .sb-gpview, html body .lp-head .lp-x {
  min-height: var(--ctl-h-sm); background: var(--ctl-surface); border: 1px solid var(--ctl-line);
  border-radius: var(--ctl-r); color: var(--ctl-text); font-size: var(--ctl-fs-sm); font-weight: 600; padding: 0 10px;
}
/* The node space's corner bar: every button on it the compact height. */
html body .nd-zoombar .nd-lowres { height: var(--ctl-h-sm); }
/* Its spaces list's two icon buttons stay square at the compact height
   (they were 22 x 22; .btn.small's floor alone made them 22 x 26). */
html body .nd-sp-head .btn.small { width: var(--ctl-h-sm); height: var(--ctl-h-sm); }

/* =====================================================================
   TYPING -- the prompt's surface wherever there is a box to write in
   ===================================================================== */
html body #sb-scene, html body .sb-prompt, html body #shb-xprompt, html body #shb-prompt, html body .dlg-text {
  background: var(--ctl-input); border-color: var(--ctl-line-soft); border-radius: var(--ctl-r);
}
html body .shb-envtext, html body .lp-search {
  background: var(--ctl-well); border-color: var(--ctl-line-soft); border-radius: var(--ctl-r);
}

/* =====================================================================
   PICKERS -- a value you choose is a field pill, as in Create's #fields
   ===================================================================== */
/* The Board's options (model, resolution, ratio): 43px, 7px corners and the
   button surface -- Create's model button scaled down -- beside 39px field
   pills in Create doing the same job. They are field pills now: the well,
   the field's edge and corner, the row's height. */
html body .sb-ddbtn {
  min-height: var(--ctl-h-lg); background: var(--ctl-well); border-color: var(--ctl-line-soft); border-radius: var(--ctl-r-lg);
}
html body .sb-ddbtn:hover { background: #111111; border-color: var(--ctl-line-hover); }
/* ElevenLabs Dialogue's rows in Create: the speaker's name, how they say
   it, the voice and the line were 6px boxes on a third surface. */
html body .dlg-field .dlg-sname, html body .dlg-field .dlg-how, html body .dlg-field .dlg-who,
html body #fields .dlg-field input.dlg-sname, html body #fields .dlg-field input.dlg-how,
html body .dlg-field .vp-drop, html body .field.voicepick .vp-drop {
  background: var(--ctl-well); border-color: var(--ctl-line-soft); border-radius: var(--ctl-r);
}
html body .dlg-field .dlg-text { background: var(--ctl-input); border-color: var(--ctl-line-soft); border-radius: var(--ctl-r); }
html body .dlg-field .dlg-add, html body .dlg-field .dlg-addsp { border-radius: var(--ctl-r); }

/* =====================================================================
   THE EDIT TOOL'S CROPS AND EDITS -- one black for the controls
   ===================================================================== */
/* Simon, 3 Nov 2026: "Adjust the UI in the edit and crop tool. At the
   moment, it has a weird design ... there's also inconsistency: some things
   are black, and some things are a grey color. We need it so that where it
   says the word "model" and it's black, the surrounding area is black as
   well, as it's an unnatural design style."

   What it was: an Image edit's model block (Create's #model-section, lent
   into the keyframe's box) took the column's black behind it (#08080a,
   --model-stick-bg), and sat in a grey keyframe box; a crop's MODEL /
   Version / Res pills were #131315 on a #131315 card; an edit's settings
   were black pills inside #111113 cards (the references, the prompt, the
   Draft row), the keyframe boxes and the edit itself a white wash. Now the
   crop and edit cards, everything grouped inside them and every field pill
   are the one well black (--ctl-well, the colour of Create's field pills);
   the panel behind them keeps its own colour; inside, a box is drawn by its
   edge (--ctl-line), not by a second grey. A field pill is Create's exactly
   (#fields .field: the well, the field's edge, #111111 and the hover edge
   on hover), the model button Create's #model-dd-btn (already the same).
   The brand edges -- a selected crop's crimson, an edit's teal, a selected
   keyframe's crimson -- and Generate stay as they were. Colours only:
   nothing here moves or resizes anything. (And no blue on hover: the one
   blue was the browser's own list under the bare Edit / Change select,
   which opens the app's list now -- 19c-select-menu.js.) */
html body #cvmod #cv-rows-body .cv-row,
html body #cvmod #cv-rows-body .cv-erow,
html body #cvmod #cv-rows-body .kftw-it,
html body #cvmod #cv-rows-body #model-section,
html body #cvmod #cv-rows-body #inputs-section,
html body #cvmod #cv-rows-body #prompt-section,
html body #cvmod #cv-rows-body .toggle-row,
html body #cvmod #cv-rows-body .cv-row .cv-cc {
  background: var(--ctl-well);
}
html body #cvmod #cv-rows-body .kftw-it:not(.sel),
html body #cvmod #cv-rows-body .cv-erow .er-ed,
html body #cvmod #cv-rows-body #cv-kfp,
html body #cvmod #cv-rows-body #inputs-section,
html body #cvmod #cv-rows-body #prompt-section,
html body #cvmod #cv-rows-body .toggle-row,
html body #cvmod #cv-rows-body .cv-erow .vrf,
html body #cvmod #cv-rows-body .cv-row .cv-cc {
  border-color: var(--ctl-line);
}
/* (the takes strip fades into the card it sits on) */
html body #cvmod #cv-rows-body .cv-row .pictk > .tkw::after {
  background: linear-gradient(to bottom, rgba(12, 12, 12, 0), var(--ctl-well));
}
/* Field pills: a crop's MODEL, Version and Res (.sm-fld), an edit's card
   settings (.field.selwrap), the keyframe settings' pills, and an edit's
   Edit / Change select -- Create's field pill, its hover included. */
html body #cvmod #cv-rows-body .sm-fld.sel,
html body #cvmod #cv-rows-body .field.selwrap,
html body #cvmod #cv-rows-body .cv-ehd .cv-emsel {
  background-color: var(--ctl-well); border-color: var(--ctl-line-soft);
}
html body #cvmod #cv-rows-body .sm-fld.sel:hover,
html body #cvmod #cv-rows-body .field.selwrap:hover,
html body #cvmod #cv-rows-body .cv-ehd .cv-emsel:hover,
html body #cvmod #cv-rows-body .cv-ehd .cv-emsel.menu-open {
  background-color: #111111; border-color: var(--ctl-line-hover);
}
html body #cvmod #cv-rows-body .sm-fld.sel select,
html body #cvmod #cv-rows-body .field.selwrap select { background-color: var(--ctl-well); }
/* A keyboard focus is the brand's ring, never the browser's. */
html body #cvmod #cv-rows-body select:focus-visible,
html body #cvmod #cv-rows-body .cv-ehd .cv-emsel:focus { outline: none; border-color: var(--accent); }
