/* fit-m.css: model settings (guidance, steps, variation...) in Studio > Sound. Loaded after fit-u.css.
   The group "Model settings" sits under Fast codec, folded like Delivery's "Pace and level" / "Recording" (fit-s.css S2
   styles h4.g-dh > button.g-dg for every #sidePanel group). Open: Delivery's compact slider rows (#sidePanel .sl, fit.css)
   with a faint tick at the default, the fixed seed field, a quiet "Reset to defaults". No fades, no transitions. */

/* the group: a rule above (Fast codec has none under it); folded it is the panel's last line, so no rule below */
#sidePanel .g-mgroup { display: flex; flex-direction: column; min-width: 0; margin-top: -6px; }
#sidePanel .g-mgroup > .g-dh-model { border-top: 1px solid var(--wash); }
#sidePanel .g-mgroup > .g-dh-model:has(> .g-dg[aria-expanded="false"]) { border-bottom: 0; }
#gMset:not([hidden]) { display: flex; flex-direction: column; min-width: 0; }

/* the sliders (+ the seed, last): one column; two to a row in a wide drawer (tablets, Duo, narrow windows), as Delivery;
   a row's parts sit at its top, so Guidance lines up with Steps when the training note makes Steps taller */
#sidePanel .g-mrows { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 28px; }
@container (min-width: 540px) { #sidePanel .g-mrows { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
#sidePanel .g-msl { align-content: start; }

/* the default: a faint tick on the track once a value is set (on Auto the ghost thumb itself sits at the default) */
#sidePanel .g-msl .trk { position: relative; }
#sidePanel .g-msl .trk > input[type="range"] { position: relative; z-index: 1; }
#sidePanel .g-mtick { position: absolute; z-index: 0; top: 50%; left: calc(9px + (100% - 18px) * var(--f, .5)); width: 2px; height: 12px; margin: -6px 0 0 -1px;
  border-radius: 1px; background: var(--g-text3); opacity: .6; pointer-events: none; }
#sidePanel .g-msl.off .g-mtick { display: none; }

/* steps while Grey trains (CPU mode): greyed, with the reason under it */
#sidePanel .g-msl.held :is(.sl-top label, .ends > span) { color: var(--g-text3); }
#sidePanel .g-msl.held input[type="range"] { opacity: .3; cursor: not-allowed; }
#sidePanel .g-msl.held .val { background: var(--g-soft); color: var(--g-text2); }
#sidePanel .g-msl > .g-mnote { grid-column: 1 / -1; grid-row: 3; margin: 2px 0 2px; font-size: 12.5px; line-height: 1.35; color: var(--g-text3); }

/* the fixed seed: name + hint on the left, a small number field on the right (16 real px: no iOS focus zoom) */
#sidePanel .g-row.g-mseed { padding: 10px 0; gap: 16px; border-bottom: 1px solid var(--wash); }
#sidePanel .g-mseed > label { display: flex; flex-direction: column; min-width: 0; cursor: pointer; }
#sidePanel .g-mseed > label b { font: 600 14px var(--body); }
#sidePanel .g-mseed > label small { font-size: 12px; color: var(--g-text3); }
#sidePanel .g-mseed > input { flex: none; width: 112px; height: 40px; padding: 0 12px; border: 1px solid var(--g-line); border-radius: 10px;
  background: var(--g-card); color: var(--ink); font: 400 16px var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
#sidePanel .g-mseed > input::placeholder { color: var(--g-text3); font-family: var(--body); }
#sidePanel .g-mseed > input:focus { outline: none; border-color: var(--ink); }
#sidePanel .g-mseed > input:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }

/* "Reset to defaults": a quiet link */
#sidePanel .g-mreset { align-self: flex-start; display: inline-flex; align-items: center; min-height: 32px; margin: 6px 0 2px; padding: 0; border: 0; background: none;
  color: var(--g-text2); font: 500 13px var(--body); text-decoration: underline; text-decoration-color: var(--g-line); text-underline-offset: 3px; cursor: pointer; }
@media (hover: hover) { #sidePanel .g-mreset:hover { color: var(--ink); text-decoration-color: currentColor; } }
#sidePanel .g-mreset:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }

/* touch: 40+ screen px targets (tablets: 44 page px; phones under the 80 % zoom: 52 page px) without bigger-looking rows */
@media (pointer: coarse) {
  #sidePanel .g-mseed > label { padding: 8px 0; margin: -8px 0; }
  #sidePanel .g-mseed > input { height: 44px; }
  #sidePanel .g-mreset { min-height: 44px; }
}
@media (pointer: coarse) and (max-width: 560px), (pointer: coarse) and (max-height: 500px) and (orientation: landscape) {
  #sidePanel .g-mseed > label small, #sidePanel .g-msl > .g-mnote { font-size: 14px; }
  #sidePanel .g-mseed > label b { font-size: 15px; }
  #sidePanel .g-mseed > input { width: 150px; height: 52px; }
  #sidePanel .g-mreset { min-height: 52px; margin: 2px 0 0; font-size: 15px; }
}

/* fix round (checkers' findings) ------------------------------------------------------------------------------------ */
/* a held row (Smol's voice hold, steps while Grey trains, on this device): the Auto chip only clears a saved value */
#sidePanel .g-msl.held .auto:disabled { opacity: .45; cursor: not-allowed; }
#sidePanel .g-mtick[hidden] { display: none; }
/* the big models on this device take only the seed: one note above the rows */
#sidePanel .g-mhere { margin: 8px 0 2px; font-size: 12.5px; line-height: 1.35; color: var(--g-text3); }
/* the long end words ("Closer to the text") only where the row has room: the 40-step tracks keep their length */
#sidePanel .g-msl { container-type: inline-size; }
@container (max-width: 400px) { #sidePanel .g-msl .g-mlong { display: none; } }
/* the seed field scrolled into view (keyboard up) keeps its focus ring off the drawer's edge; a refused paste is flagged */
#m_seed { scroll-margin: 8px 0; }
#sidePanel .g-mseed > input.g-bad { border-color: var(--red); }
/* nothing set: "Reset to defaults" is inert */
#sidePanel .g-mreset:disabled { color: var(--g-text3); text-decoration-color: transparent; cursor: default; opacity: .6; }
@media (hover: hover) { #sidePanel .g-mreset:disabled:hover { color: var(--g-text3); text-decoration-color: transparent; } }
/* the closed Sound row on small phones: "custom · v14.5 XL" (next.js data-sum-s), so the marker can be read */
@media (max-width: 400px) { #sidePanel[data-open="0"] .g-tabs.sseg button[data-sum-s]::after { content: attr(data-sum-s); } }
@media (pointer: coarse) and (max-width: 560px), (pointer: coarse) and (max-height: 500px) and (orientation: landscape) {
  #sidePanel .g-mhere { font-size: 14px; }
}
