/* ── Sliders: a 2-px line, the filled part in the accent, a flat square handle ──
   --p (0–100 %) is set by src/ui/sliderx.js. Double-click = default, right-click = menu. */
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; min-width: 50px; height: var(--row-h);
  margin: 0; background: transparent; cursor: pointer; --p: 50%;
}
input[type=range]:focus { outline: none; }
input[type=range]::-webkit-slider-runnable-track {
  height: 2px; border: 0;
  background: linear-gradient(to right, var(--accent) 0 var(--p), var(--line) var(--p) 100%);
}
input[type=range]::-moz-range-track { height: 2px; background: var(--line); border: 0; }
input[type=range]::-moz-range-progress { height: 2px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 8px; height: 16px; margin-top: -7px; border: 0; border-radius: 0;
  background: var(--text); transition: background .1s, transform .1s;
}
input[type=range]::-moz-range-thumb { width: 8px; height: 16px; border: 0; border-radius: 0; background: var(--text); }
input[type=range]:hover::-webkit-slider-thumb, input[type=range]:focus-visible::-webkit-slider-thumb { background: var(--accent); }
input[type=range]:hover::-moz-range-thumb { background: var(--accent); }
input[type=range]:active::-webkit-slider-thumb { transform: scaleY(1.15); }
input[type=range]:disabled { opacity: .4; cursor: default; }
/* phones: a bigger handle for fingers */
body.phone input[type=range]::-webkit-slider-thumb { width: 14px; height: 26px; margin-top: -12px; }
body.phone input[type=range]::-moz-range-thumb { width: 14px; height: 26px; }
body.phone input[type=range]::-webkit-slider-runnable-track { height: 3px; }

/* the value it has right now, when it follows a source */
.modmark { position: absolute; width: 2px; height: 14px; background: var(--accent-2); pointer-events: none; }

/* ∿ follow button (sliderx.js): hover-only with a mouse, always on touch, lit while following */
.slider .modbtn { width: 1.6em; flex: none; opacity: 0; font-size: .95em; color: var(--text-dim); padding: 0; }
.slider:hover .modbtn, .slider .modbtn.on { opacity: 1; }
.slider .modbtn.on { color: var(--accent-2); border-color: transparent; background: transparent; }
@media (pointer: coarse) { .slider .modbtn { opacity: .8; width: 2.2em; } }
body.phone .slider .modbtn { opacity: .8; width: 2.4em; font-size: 1.1em; }
.mini .modbtn { display: none; }

/* touch: the slider menu as a bottom sheet (sliderSheet.js) */
.sheet-veil { position: fixed; inset: 0; z-index: 1100; background: #0008; display: flex; align-items: flex-end; }
.sheet { width: 100%; max-height: 85vh; overflow-y: auto; background: var(--panel); border-top: 3px solid var(--accent);
  padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.sheet-head { display: flex; align-items: center; gap: 8px; font-size: 1.05em; }
.sheet .row button { min-height: 42px; }
.sheet-sec { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.sheet-grp { display: flex; flex-direction: column; gap: 4px; }
.sheet-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.chip-src { min-height: 42px; font-size: .95em; }
.chip-src.on { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
@media (pointer: fine) { .sheet { max-width: 620px; margin: 0 auto; border: 1px solid var(--line); border-top: 3px solid var(--accent); } }
