/* One knob for Play, Biotron and TouchMe (Sergey 18.11, HT x PL 682): Play's round face with a mark that turns, the value below as
   TouchMe's editable field (click to type) or a list. Markup: core/knobs.mjs. */
.knob {display:grid;justify-items:center;align-content:start;gap:4px;min-width:0;text-align:center;}
.knob>label {font-size:14px;line-height:1.3;text-align:center;overflow-wrap:anywhere;}
.dial-control {position:relative;display:block;width:64px;height:64px;}
.dial-face {position:absolute;inset:0;display:block;border:0;background:none;}
.dial-face::before {content:none;}
.dial-face svg {display:block;width:100%;height:100%;overflow:visible;}
.dial-face circle {fill:#fafafa;stroke:#ccc;stroke-width:1.5;}
.dial-face path {stroke:#367887;stroke-width:3;stroke-linecap:round;transform-origin:32px 32px;transform:rotate(var(--turn,-135deg));}
.dial-control input {position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;padding:0;border:0;border-radius:50%;cursor:ns-resize;touch-action:none;}
/* Standard 9 edit (Sergey 18.11 16:13, approved): no outline when a knob is pressed; the keyboard focus ring stays for Tab users only.
   The label above a knob never moves the knob: the knob column is fixed, the label wraps inside it in a two-line box. */
.dial-control:has(:focus-visible) {outline:2px solid var(--focus,#367887);outline-offset:3px;border-radius:50%;}
.dial-control[data-pressed]:has(:focus-visible),.dial-control[data-pressed] input:focus-visible {outline:none;}
.knob {grid-template-columns:minmax(0,1fr);}
.knob>label {width:100%;min-height:calc(2 * 1.3em);display:flex;align-items:flex-end;justify-content:center;}
.knob .value-display,.knob>.value-editor {width:96px;max-width:100%;min-height:32px;padding:4px;font:inherit;font-size:14px;color:inherit;border:1px solid var(--line,#ccc);border-radius:6px;background:transparent;text-align:center;font-variant-numeric:tabular-nums;}
.knob .value-display {border-color:transparent;color:#666;text-decoration:underline;text-decoration-color:#a7b2a1;text-underline-offset:5px;cursor:text;}
.knob .value-display:hover {border-color:var(--line,#ccc);}
.cc-mapped .dial-face circle {stroke:#5357aa;}
/* Standard 15: the Bind button under every Sound knob and the Bind line (mountBind in core/knobs.mjs); a bound knob's Bind stays dark. */
.knob>.cc-assign {min-height:32px;min-width:48px;padding:4px 8px;border:1px solid transparent;border-radius:6px;background:transparent;color:#626b62;font:inherit;font-size:14px;cursor:pointer;}
.knob>.cc-assign[aria-pressed=true] {border-color:#b5b9dc;color:#454a9d;}
.core-bind-line {margin:0 0 8px;font-size:14px;line-height:1.5;color:#626b62;}
.knob .sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;}
/* Standard 15: Bind looks the same on every site — Play's general button frame does not apply to it. */
:root .playtron-root .knob>.cc-assign:not(#\#) {min-height:32px;height:auto;min-width:48px;padding:4px 8px;border:1px solid transparent;border-radius:6px;background:transparent;box-shadow:none;color:#626b62;font-size:14px;}
:root .playtron-root .knob>.cc-assign[aria-pressed=true]:not(#\#) {border-color:#b5b9dc;color:#454a9d;}
/* Standard 18 (Sergey 18.11 17:25 CET, HT x PL 682 п. 3): every description in a window — the grey line under the title, the Bind line,
   the hints under knobs and lists — in one font, one size, one colour and one indent: the UI font, 14 px on a 20 px line (4 px grid,
   standard 17), regular, grey #626b62, left-aligned at the window's 16 px padding, 8 px below what is above it.
   Play: .sound-desc, .hint, the knob hint, the settings intro; TouchMe: the Sound card description, #mapping-summary, .bank-help, the Visual lead;
   Biotron: .core-sound-desc, .knob-hint, .visual-lead, .light-status; all: .core-bind-line.
   TouchMe Sound → Advanced: the three hints of MIDI controllers («CC90: Bind a knob…», «Touch moves the mapped knob.», «Note Mute: CC still flows.»),
   16 px and black before (Sergey 18.11 21:47Z, HT x PL 682: «2. да» to 34852 п. 2). :not(#\#) lifts this over the sites' rules. */
:root :is(.core-bind-line,.playtron-root :is(.effects-panel,.visual-panel,.settings-panel) :is(.sound-desc,p.hint),.playtron-root .effects-panel>p:not([class]),.playtron-root .pad-settings>p:not([class]),.stage-first .play-card :is(.preset-description,#mapping-summary,.bank-help),.stage-first #sound-advanced #synth-panel p:is(:not([class]),.cc-explanation),.stage-first #visual-card>p:not([class]),dialog :is(.core-sound-desc,.knob-hint,.visual-lead,.light-status)):not(#\#) {
 margin:var(--space-8,8px) 0 0;padding:0;font-family:var(--font-ui);font-size:14px;line-height:20px;font-weight:400;font-style:normal;letter-spacing:normal;text-align:left;color:#626b62;
}
/* Standard 19 (Sergey 18.11 16:50Z, HT x PL 682: «Пройдись по окнам Sound, Settings, Visual … шрифты и расстояния» + «Да» to unifying the
   titles and knob labels): one type set inside the Sound, Visual and <device> settings windows ([data-core-panel] and TouchMe's .play-card, Help excluded) on every
   site — the UI font (system) for everything; title 20/26 semibold; × 22 grey; knob label 14/18 (two-line box 36); knob value and Bind 14/20;
   buttons, labels, checkboxes, statuses 14/20; fields (lists, text boxes) 16/24 — iPhone zooms the page into a field below 16 px;
   section headings (fold-outs) 16/24 semibold; the «i» buttons 12 semibold. Descriptions keep standard 18. :not(#\#) lifts this over id rules. */
:root :is([data-core-panel]:not([data-core-panel=wide]),.stage-first .play-card:not(#help)):not(#\#),:root :is([data-core-panel]:not([data-core-panel=wide]),.stage-first .play-card:not(#help)) :not(svg *):not(#\#) {font-family:var(--font-ui);}
:root :is([data-core-panel]:not([data-core-panel=wide]),.stage-first .play-card:not(#help)) :is(:is(.core-panel-head,.panel-heading) :is(h2,strong),h2:is(#sound-card-title,#visual-title,#device-card-title)):not(#\#) {font-size:20px;line-height:26px;font-weight:600;letter-spacing:0;color:var(--ink,#242a25);}
:root :is([data-core-panel]:not([data-core-panel=wide]),.stage-first .play-card:not(#help)) :is(.core-panel-close,.play-card-close):not(#\#) {font-size:22px;line-height:1;font-weight:400;color:#626b62;}
:root :is([data-core-panel]:not([data-core-panel=wide]),.stage-first .play-card:not(#help)) .knob>label:not(#\#) {font-size:14px;line-height:18px;font-weight:400;min-height:36px;color:var(--ink,#242a25);}
:root :is([data-core-panel]:not([data-core-panel=wide]),.stage-first .play-card:not(#help)) .knob :is(.value-display,.value-editor):not(#\#) {font-size:14px;line-height:20px;font-weight:400;min-height:32px;}
:root :is([data-core-panel]:not([data-core-panel=wide]),.stage-first .play-card:not(#help)) .knob .value-display:not(#\#) {color:#626b62;}
:root :is([data-core-panel]:not([data-core-panel=wide]),.stage-first .play-card:not(#help)) .knob>.cc-assign:not(#\#) {font-size:14px;line-height:20px;min-height:32px;}
:root :is([data-core-panel]:not([data-core-panel=wide]),.stage-first .play-card:not(#help)) :is(button,label,output,strong,span:not(.sr-only),p.small,[id$=-status],#calmer-play-help):not(.knob *,.core-panel-head *,.panel-heading *,.info-button,.setting-info-button,.core-panel-close,.play-card-close,.core-bind-line,.core-bind-line *):not(#\#) {font-size:14px;line-height:20px;}
:root :is([data-core-panel]:not([data-core-panel=wide]),.stage-first .play-card:not(#help)) :is(select,input:not([type=checkbox],[type=radio],[type=range]),textarea):not(.knob *):not(#\#) {font-size:16px;line-height:24px;}
:root :is([data-core-panel]:not([data-core-panel=wide]),.stage-first .play-card:not(#help)) summary:not(#\#) {font-size:16px;line-height:24px;font-weight:600;}
:root :is([data-core-panel]:not([data-core-panel=wide]),.stage-first .play-card:not(#help)) :is(.info-button,.setting-info-button):not(#\#) {font-size:12px;line-height:1;font-weight:600;}
/* Standard 19, distances: the knob grid starts 16 px below the line above it (description, Bind line or list); knobs stand in columns
   12 px apart (three 88 px columns in the 288 px window) and rows 16 px apart (scale of standard 17). */
:root :is([data-core-panel]:not([data-core-panel=wide]),.stage-first .play-card:not(#help)) :has(>.knob):not(#\#) {margin-top:16px;column-gap:12px;row-gap:16px;}
/* Standard 22 (Sergey 18.11 21:02Z, HT x PL 682: «во всех вкладках … выравнивание объектов. Крутилки в строке должны быть выравнены по одной
   линии. Сохрани правило 3 крутилки в ряд … шрифты и отступы … единообразно»): in the Sound, Visual and <device> settings windows every knob grid
   is three equal columns 12 px apart, rows 16 px apart, and the knobs of a row stand on one line — a label that wraps to a third line
   (Biotron settings «Note velocity · minimum») grows upwards and no longer pushes its knob down. Inside a knob 4 px between label, knob,
   value and Bind on every site (TouchMe had 0). Before: Biotron settings knobs of one row 18–36 px apart in height; Play's Sound knobs on a
   phone 131 px apart while every other window has 123. A knob grid inside a row of other controls (TouchMe Advanced «Map min/Map max»)
   takes the full window width, so its columns are the same as everywhere else. :not(#\#) lifts this over the sites' id rules. */
:root :is([data-core-panel]:not([data-core-panel=wide]),.stage-first .play-card:not(#help)) :has(>.knob):not(#\#) {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));min-width:100%;justify-content:stretch;align-items:end;column-gap:12px;row-gap:16px;}
:root :is([data-core-panel]:not([data-core-panel=wide]),.stage-first .play-card:not(#help)) .knob:not(#\#) {gap:4px;}
:root :is([data-core-panel]:not([data-core-panel=wide]),.stage-first .play-card:not(#help)) .knob>.setting-caption:not(#\#) {min-height:36px;align-items:flex-end;}
/* Standard 11 (Sergey 18.11 17:06Z, HT x PL 682, approved: «Зафиксируй как сейчас в Playtron»): the top of the ⚙ window is Play's on every
   site — «Help & settings», then Update firmware (when offered) and a borderless ×, all on one line. The head runs the full width of the
   window on white (#fff) with no line under it and no border around the window, as the Visual window (Sergey 18.11 19:36 CET, HT x PL 682:
   «сделай все шапки этого блока делиными [read: белыми, white] без обводки, убери обводку окна со всех окон Help & settings … как это сейчас сделано в Visual»;
   before: #fafbf9 with a #dce1d9 hairline and a 1 px #dce1d9 window border, and TouchMe drew a second line under its empty controls row);
   inside it 24 px left and right and 16 px top and bottom on a desktop, 16 px left and right, 12 top and 16 bottom on phones;
   8 px between Update and ×; content starts 16 px below the head.
   Measured on Play (LAN e105264): title x 24, Update 36 px tall, × 44 px. :not(#\#) lifts this over TouchMe's and Biotron's id rules.    Kept in knobs.css with standards 18–19: it is the one window stylesheet all three sites load (TouchMe has no panel.css). */
:root body :is([data-core-panel=wide],#help,.setup-hub):not(#\#) {background:#fff;padding:0 24px 32px;border:0;}
:root body #help .dialog-chrome:not(#\#) {padding:0;border:0;background:#fff;}
:root body #help #help-controls:empty:not(#\#) {display:none;}
:root body :is([data-core-panel=wide],#help,.setup-hub) :is(.core-panel-head,.core-hub-head):not(#\#) {display:flex;flex-wrap:nowrap;align-items:center;gap:8px;position:sticky;top:0;z-index:3;
  margin:0 -24px 16px;padding:16px 24px;border:0;background:#fff;}
:root body :is([data-core-panel=wide],#help,.setup-hub) :is(.core-panel-head,.core-hub-head) :is(h2,strong):not(#\#) {flex:0 1 auto;min-width:0;margin:0;white-space:nowrap;}
:root body :is([data-core-panel=wide],#help,.setup-hub) :is(.core-panel-head,.core-hub-head) .core-panel-update:not([hidden]):not(#\#) {display:inline-flex;align-items:center;min-height:36px;height:36px;margin:0 0 0 auto;padding:4px 14px;border:0;border-radius:18px;font-size:14px;line-height:1.2;white-space:nowrap;}
:root body :is([data-core-panel=wide],#help,.setup-hub) :is(.core-panel-head,.core-hub-head) .core-panel-update:not([hidden]) + :is(.core-panel-close,[data-setup-close],#help-close):not(#\#) {margin-left:0;}
:root body :is([data-core-panel=wide],#help,.setup-hub) :is(.core-panel-head,.core-hub-head) :is(.core-panel-close,[data-setup-close],#help-close):not(#\#) {flex:0 0 auto;width:44px;min-width:44px;height:44px;margin-left:auto;padding:0;border:0;border-radius:50%;background:transparent;box-shadow:none;font-size:22px;line-height:1;color:#626b62;}
@media(max-width:600px){
  :root body :is([data-core-panel=wide],#help,.setup-hub):not(#\#) {padding:0 max(16px,env(safe-area-inset-right,0px)) max(16px,env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));border:0;}
  :root body :is([data-core-panel=wide],#help,.setup-hub) :is(.core-panel-head,.core-hub-head):not(#\#) {margin:0 -16px 16px;padding:max(12px,env(safe-area-inset-top,0px)) 16px 16px;}
}
