/* ============================================================================
   A friend's panel: the toy cards, PiShock's shocker panel with Party Mode
   and the avatar board (assets/remote-toys.js, remote-shockers.js,
   remote-board.js). Shared by the web remote (remote.html) and the site's
   demo of the Friends page (demo-friends.js), so both stay one copy.

   Everything is scoped under .rpanel: the site has rules of its own for
   .btn and p, and tokens.css styles .small, .row, .card, .chip, .tile and
   every button -- the panel sets what it needs itself.

   The sizes and colours are the app's (src/ui/theme_friends.py and
   theme_params.py); colours are tokens, never a new hex.
   ========================================================================= */
.rpanel [hidden] { display: none !important; }
.rpanel .grow { flex: 1; }
.rpanel .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: normal; white-space: nowrap; cursor: pointer;
  font-size: 15px; font-weight: 650; padding: 8px 18px; border-radius: 10px; border: 1px solid var(--line); color: var(--txt);
  background: transparent;
}
.rpanel .btn.danger { background: var(--err-tint); border-color: var(--err-mid); color: var(--err); }
.rpanel .btn.danger:hover:not(:disabled) { background: var(--err-mid); border-color: var(--err); color: var(--txt); }
/* the app's small danger button (Stop all on the shockers); not .small, the panel greys those */
.rpanel .btn.danger.sm { font-size: 13px; font-weight: 700; padding: 4px 12px; min-height: 28px; border-radius: var(--r-btn);
  background: transparent; }
.rpanel .btn.secondary { font-size: 12px; font-weight: 500; padding: 4px 12px; border-radius: var(--r-btn); }

.rpanel { font-size: 13px; }
.rpanel .small { font-size: 12px; color: var(--muted); }
.rpanel p.small { margin: 2px 0; }
.rpanel .row { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: nowrap; }
.rpanel .val { min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--txt); }
.rpanel .val.w62 { min-width: 62px; }
/* a section in the hue of what it drives (QFrame#friendSection) */
.rpanel .friend-section { border: 1px solid var(--hue-mid); border-radius: var(--r-card); padding: 10px; margin-top: 12px;
  display: flex; flex-direction: column; gap: 8px; }
.rpanel .section-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--hue); min-height: 22px; }
.rpanel .micro { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--hue); }
.rpanel .section-h input.strength { flex: none; width: 150px; }
/* their strength: label, slider and value wrap as one, to the right */
.rpanel .strength-g { display: flex; align-items: center; gap: 6px; margin-left: auto; min-width: 0; }
.rpanel .section-b { display: flex; flex-direction: column; gap: 8px; }
.rpanel .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 8px; }
/* two shocker cards a row only when each gets its whole width */
.rpanel .grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }

/* a card on the panel (QFrame#friendCard): the well, no frame */
.rpanel .fcard { position: relative; background: var(--well); border: 1px solid var(--well); border-radius: var(--r-btn);
  padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rpanel .fcard.shocker { gap: 6px; container-type: inline-size; }
.rpanel .card-head { display: flex; align-items: center; gap: 4px 6px; min-height: 22px; flex-wrap: wrap; }  /* Higher | Override goes under a name it would cut */
.rpanel .card-name { font-weight: 700; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rpanel .battery.low { color: var(--warn); }

/* sliders: the app's groove + round handle, reaching both ends */
.rpanel input.hs {
  -webkit-appearance: none; appearance: none; background: transparent; margin: 0; padding: 0; flex: 1;
  min-width: 50px; height: 22px; cursor: pointer; border: none; border-radius: 0; outline: none; box-shadow: none; --v: 0%;
}
.rpanel input.hs::-webkit-slider-runnable-track { height: 6px; border: 1px solid var(--line); border-radius: 4px;
  background: linear-gradient(90deg, var(--fill) var(--v), var(--well) var(--v)); }
.rpanel input.hs::-moz-range-track { height: 6px; border: 1px solid var(--line); border-radius: 4px;
  background: linear-gradient(90deg, var(--fill) var(--v), var(--well) var(--v)); }
.rpanel input.hs::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 7px;
  margin-top: -5px; background: var(--fill); border: none; }
.rpanel input.hs::-moz-range-thumb { width: 14px; height: 14px; border-radius: 7px; background: var(--fill); border: none; }
.rpanel input.hs:focus-visible { outline: 2px solid var(--fill); outline-offset: 2px; border-radius: 6px; }
.rpanel input.hs:disabled { opacity: .45; cursor: default; }

/* Higher | Override (role seg) */
.rpanel .seg { display: inline-flex; flex: none; }
.rpanel .seg-b { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 0;
  padding: 1px 8px; min-height: 22px; font-size: 11px; line-height: 16px; }
.rpanel .seg-b:first-child { border-radius: 6px 0 0 6px; }
.rpanel .seg-b:last-child { border-radius: 0 6px 6px 0; }
.rpanel .seg-b + .seg-b { border-left-width: 0; }
.rpanel .seg-b:hover:not(:disabled) { background: var(--hover); color: var(--muted); border-color: var(--line); }
.rpanel .seg-b.on, .rpanel .seg-b.on:hover:not(:disabled) { background: var(--hue-tint); color: var(--hue); border-color: var(--hue-mid); }
/* the mode chips (role chip): grey until picked, their curves in the toy's pink */
.rpanel .chips { display: flex; flex-wrap: wrap; gap: 3px; }
.rpanel .mchip { display: inline-flex; align-items: center; gap: 4px; background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 4px; min-height: 24px; font-size: 11px; line-height: 14px; }
.rpanel .mchip.main { min-height: 32px; padding: 3px 10px; font-size: 12px; }
.rpanel .mchip svg { color: var(--pink); flex: none; }
.rpanel .mchip:hover:not(:disabled) { background: var(--hover); color: var(--muted); border-color: var(--line); }
.rpanel .mchip.on, .rpanel .mchip.on:hover:not(:disabled) { background: var(--pink-tint); color: var(--pink); border-color: var(--pink); }
/* the app's switch */
.rpanel label.sw { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; color: var(--txt); flex: none; }
.rpanel label.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.rpanel label.sw .knob { width: 32px; height: 16px; border-radius: 8px; background: var(--well); border: 1px solid var(--line);
  position: relative; flex: none; }
.rpanel label.sw .knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--dim); transition: left .12s; }
.rpanel label.sw input:checked + .knob { background: var(--accent); border-color: var(--accent); }
.rpanel label.sw input:checked + .knob::after { left: 18px; background: var(--ink); }
/* a box: the frame in the hue, a smaller square inside when ticked */
.rpanel input.ck { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; margin: 0; padding: 0; flex: none;
  border: 1px solid var(--hue-mid, var(--line)); border-radius: 4px; background: var(--well); cursor: pointer; }
.rpanel input.ck:checked { border-color: var(--hue, var(--accent)); background: var(--hue, var(--accent)); background-clip: content-box; padding: 3px; }
.rpanel .graph { width: 100%; height: 42px; background: var(--card); border-radius: 6px; display: block; }
.rpanel .meter { height: 4px; border-radius: 2px; background: var(--pink-mid); overflow: hidden; }
.rpanel .meter > span { display: block; height: 100%; width: 0; background: var(--pink); transition: width .1s linear; }

/* ---- shockers: PiShock's panel (shocker_card.py, shocker_parts.py) ---- */
.rpanel .shock-state { border: 1px solid var(--line); border-radius: var(--r-btn); padding: 6px 12px; color: var(--muted); }
.rpanel .shock-state b { color: var(--txt); margin-right: 6px; }
.rpanel .shock-state.armed { border-color: var(--warn-mid); background: var(--warn-tint); }
.rpanel .shock-state.armed b { color: var(--warn); }
.rpanel .fcard.shocker { --hue: var(--yellow); --hue-mid: var(--yellow-mid); }
.rpanel .partybox { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--txt); cursor: pointer; flex: none; }
.rpanel .partybox, .rpanel .party { --hue: var(--yellow); --hue-mid: var(--yellow-mid); }
.rpanel .sk-body { display: flex; justify-content: center; align-items: stretch; gap: 4px; }
.rpanel .opblock { background: var(--hue-tint); border: 1px solid var(--hue-mid); border-radius: var(--r-btn); padding: 6px;
  display: flex; flex-direction: column; gap: 4px; }
.rpanel .opblock-h { text-align: center; font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--hue); }
.rpanel .opblock-b { display: flex; gap: 6px; }
.rpanel .tiles { display: flex; flex-direction: column; gap: 6px; }
.rpanel .optile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  width: 62px; height: 58px; padding: 4px 2px 2px; flex: none; border: 1px solid var(--line); border-radius: var(--r-btn);
  background: transparent; color: var(--txt); font-size: 12px; line-height: 1.15; cursor: pointer;
  touch-action: none; user-select: none; -webkit-user-select: none; }
.rpanel .optile .tile-g { display: flex; height: 20px; align-items: center; color: var(--txt); }
.rpanel .optile.hued { border-color: var(--hue-mid); }
.rpanel .optile.hued .tile-g { color: var(--hue); }
.rpanel .optile .tile-v { font-size: 15px; font-weight: 700; color: var(--txt); white-space: nowrap; }
.rpanel .optile.hued .tile-v { color: var(--hue); }
.rpanel .optile .tile-l { font-size: 10px; color: var(--muted); white-space: nowrap; }
.rpanel .optile.filled { background: var(--hue); border: 2px solid var(--hue); }
.rpanel .optile.filled .tile-g, .rpanel .optile.filled .tile-v, .rpanel .optile.filled .tile-l { color: var(--ink); }
.rpanel .optile.wide { width: 76px; }
.rpanel .optile.plain .tile-v { font-size: 10px; }
.rpanel .optile.stop { background: var(--err-tint); border-color: var(--err-mid); color: var(--err); flex: 1 0 auto; height: auto; min-height: 78px; }
.rpanel .optile.stop .tile-g { color: var(--err); }
.rpanel .optile.stop .tile-l { color: var(--err); font-size: 12px; font-weight: 700; }
.rpanel .optile:hover:not(:disabled) { background: var(--hover); border-color: var(--line); color: var(--txt); }
.rpanel .optile.hued:hover:not(:disabled) { background: var(--hue-tint); border-color: var(--hue); }
.rpanel .optile.filled:hover:not(:disabled) { background: var(--hue); border-color: var(--txt); }
.rpanel .optile.stop:hover:not(:disabled) { background: var(--err-tint); border-color: var(--err); }
.rpanel .optile:active:not(:disabled) { transform: none; }
.rpanel .optile.hued:active:not(:disabled), .rpanel .optile.filled:active:not(:disabled) { background: var(--hue-mid); }
.rpanel .optile.stop:active:not(:disabled) { background: var(--err-mid); }
.rpanel .optile:disabled, .rpanel .optile.filled:disabled { opacity: 1; background: transparent; border: 1px solid var(--dim); }
.rpanel .optile:disabled .tile-g, .rpanel .optile:disabled .tile-v, .rpanel .optile:disabled .tile-l { color: var(--dim) !important; }
.rpanel .sk-center { display: flex; flex-direction: column; gap: 6px; }
.rpanel .nudges { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.rpanel .mini { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; min-width: 20px;
  padding: 0; border: 1px solid var(--line); border-radius: 5px; background: transparent; }
.rpanel .mini:hover:not(:disabled) { background: var(--hover); border-color: var(--line); }
.rpanel .mini.on, .rpanel .mini.on:hover:not(:disabled) { background: var(--hue-tint); border-color: var(--hue); }
.rpanel .mini:disabled { opacity: .4; }
.rpanel .vcol { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rpanel .vs-max { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.2; }
.rpanel .gauge { color: var(--muted); display: flex; }
/* the vertical slider (QSlider vertical): a 6 px groove, a 14 px handle, the hue below it */
.rpanel .vs { position: relative; width: 22px; flex: 1; min-height: 110px; touch-action: none; cursor: pointer; outline: none; }
.rpanel .vs.disabled { opacity: .45; cursor: default; }
.rpanel .vs-track { position: absolute; left: 50%; width: 8px; margin-left: -4px; top: 0; bottom: 0;
  border: 1px solid var(--line); border-radius: 4px; background: var(--well); }
.rpanel .vs-fill { position: absolute; left: 1px; right: 1px; background: var(--fill); border-radius: 3px;
  bottom: 1px; height: calc(var(--b) * (100% - 14px) + 6px); }
.rpanel .vs.range .vs-fill { bottom: calc(var(--a) * (100% - 14px) + 6px); height: calc((var(--b) - var(--a)) * (100% - 14px)); }
.rpanel .vs-knob { position: absolute; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: var(--fill); bottom: calc(var(--p) * (100% - 14px)); }
.rpanel .vs:focus-visible .vs-knob { outline: 2px solid var(--txt); }
/* a phone-narrow card: Use Mode, STOP and Beep go under the columns */
@container (max-width: 350px) {
  .rpanel .sk-body { flex-wrap: wrap; }
  .rpanel .sk-center { order: 10; flex-direction: row; flex-basis: 100%; justify-content: center; }
  .rpanel .optile.stop { flex: none; height: 58px; min-height: 58px; }
}
/* the narrowest phones (320 px): Shock and Vibrate still side by side */
@container (max-width: 262px) {
  .rpanel .opblock { padding: 4px; }
  .rpanel .opblock-b { gap: 4px; }
  .rpanel .optile:not(.wide) { width: 54px; }
}
/* the pickers, over the card (QFrame#picker): PiShock's round lengths, wide choices;
   the hued ones (Duration) fill their pick, the plain ones (Use Mode, Warning) tint it */
.rpanel .picker { position: absolute; z-index: 5; display: grid; grid-template-columns: repeat(var(--cols), auto); gap: 6px;
  padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card);
  box-shadow: var(--pop-shadow); }
.rpanel .picker.hued { border-color: var(--hue-mid); }
.rpanel .pick { background: var(--well); color: var(--txt); border: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.rpanel .picker.round .pick { width: 36px; height: 36px; border-radius: 18px; padding: 0; }
.rpanel .picker.wide .pick { min-width: 130px; height: 32px; border-radius: 10px; padding: 4px 14px; }
.rpanel .pick:hover:not(:disabled) { background: var(--hover); border-color: var(--accent); color: var(--txt); }
.rpanel .pick.on, .rpanel .pick.on:hover:not(:disabled) { background: var(--tint); color: var(--accent); border-color: var(--accent); }
.rpanel .picker.hued .pick:hover:not(:disabled) { border-color: var(--hue); }
.rpanel .picker.hued .pick.on, .rpanel .picker.hued .pick.on:hover:not(:disabled) { background: var(--hue); color: var(--ink); border-color: var(--hue); }
.rpanel .pick:disabled { opacity: 1; background: transparent; color: var(--dim); border-color: var(--dim); }
/* Party Mode (shock_party.py) */
.rpanel .party { display: flex; flex-direction: column; gap: 6px; }
.rpanel .party .fcard.shocker.disabled { opacity: .5; pointer-events: none; }
.rpanel .party-head { display: flex; justify-content: center; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.rpanel .center-row { display: flex; justify-content: center; }
.rpanel .party-list { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.rpanel .party-item { display: inline-flex; align-items: center; gap: 4px; }
.rpanel .party-item label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.rpanel .mini.next { width: 20px; font-size: 9px; color: var(--dim); }
.rpanel .mini.next.on { color: var(--yellow); border-color: var(--yellow); }

/* ---- their avatar: categories of cards (param_cards.py, theme_params.py) ---- */
/* the bar and frame: the app's bar pair is the hue's own, toned down -- mixed
   from the tokens here; pink has none there and wears its mid tone */
.rpanel .board { display: flex; flex-direction: column; gap: 10px; }
.rpanel .cat { --bar: color-mix(in srgb, var(--hue) 60%, var(--bg)); --frame: color-mix(in srgb, var(--hue) 68%, var(--bg));
  border: 1px solid var(--frame); border-radius: var(--r-card); padding: 6px 8px 10px;
  display: flex; flex-direction: column; gap: 8px; }
.rpanel .cat.pink { --bar: var(--pink-mid); --frame: var(--pink-mid); }
.rpanel .cat-head { display: flex; align-items: center; gap: 6px; background: var(--bar); border-radius: var(--r-btn);
  padding: 4px 10px; min-height: 30px; }
.rpanel .cat-name { flex: 1; min-width: 0; color: var(--txt); font-weight: 700; font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rpanel .cat-lock { color: var(--txt); font-weight: 700; font-size: 13px; white-space: nowrap; }
.rpanel .cat-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.rpanel .pcard { width: 210px; max-width: 100%; background: var(--well); border: 1px solid var(--hue-mid); border-radius: var(--r-btn);
  padding: 8px 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; }
.rpanel .pc-head { display: flex; gap: 4px; align-items: baseline; min-height: 18px; }
.rpanel .pc-label { flex: 1; min-width: 0; color: var(--txt); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rpanel .pmark { font-size: 13px; font-weight: 700; color: var(--warn); }
.rpanel .pval { font-size: 11px; color: var(--muted); }
.rpanel .pcard .row .pval { min-width: 36px; text-align: right; }
.rpanel .pswitch, .rpanel .phold { height: 32px; padding: 2px 8px; background: transparent; color: var(--muted); border: 1px solid var(--hue-mid);
  border-radius: var(--r-btn); font-weight: 700; font-size: 13px; touch-action: none; user-select: none; -webkit-user-select: none; }
.rpanel .phold { color: var(--hue); }
.rpanel .pswitch:hover:not(:disabled), .rpanel .phold:hover:not(:disabled) { background: var(--hue-tint); border-color: var(--hue-mid); color: var(--muted); }
.rpanel .phold:hover:not(:disabled) { color: var(--hue); }
.rpanel .pswitch.on, .rpanel .pswitch.on:hover:not(:disabled), .rpanel .phold.down, .rpanel .phold.down:hover:not(:disabled) {
  background: var(--hue); color: var(--ink); border-color: var(--hue); }
.rpanel .pswitch:active:not(:disabled), .rpanel .phold:active:not(:disabled) { transform: none; }
.rpanel .pswitch:disabled, .rpanel .phold:disabled { opacity: 1; color: var(--dim); border-color: var(--dim); background: transparent; }
.rpanel .cat.locked .pc-label { color: var(--dim); }
/* their Height box (param_height.py): their height in big numbers, a slider, three buttons */
.rpanel .hbox { max-width: 454px; }
.rpanel .hbody { display: flex; flex-direction: column; gap: 8px; padding: 0 4px; }
.rpanel .hnow { font-size: 20px; font-weight: 700; color: var(--txt); }
.rpanel .hbody .row .hs { flex: 1; min-width: 0; }
.rpanel .htarget { min-width: 52px; text-align: right; }
.rpanel .hbox.locked .hnow, .rpanel .hbody .hs:disabled { color: var(--dim); opacity: 0.6; }
.rpanel .pswitch.ysw { width: 60px; height: 24px; --hue: var(--accent); --hue-mid: var(--line); --hue-tint: var(--tint); }
.rpanel .stepper { display: flex; gap: 4px; align-items: center; }
.rpanel .stepper .mini { width: 32px; height: 32px; font-size: 14px; color: var(--txt); border-color: var(--hue-mid); }
.rpanel .stepper .mini:hover:not(:disabled) { background: var(--hue-tint); border-color: var(--hue); }
.rpanel .pnum { flex: 1; min-width: 0; height: 32px; text-align: center; font-size: 13px; padding: 4px 6px;
  border: 1px solid var(--hue-mid, var(--line)); border-radius: var(--r-in); }
.rpanel .yolo { align-self: flex-start; background: transparent; color: var(--warn); border: 1px solid var(--warn-mid);
  border-radius: var(--r-btn); padding: 3px 12px; font-weight: 700; font-size: 13px; }
.rpanel .yolo:hover:not(:disabled) { background: var(--warn-tint); color: var(--warn); border-color: var(--warn-mid); }
.rpanel .yolo-rows { display: flex; flex-direction: column; gap: 2px; }
.rpanel .yrow { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.rpanel .yname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rpanel .yrow .pnum { flex: none; width: 90px; height: 26px; }
.rpanel .yrow input.hs { flex: none; width: 180px; }
.rpanel .filter { width: 100%; font-size: 13px; padding: 6px 9px; }
/* the shocker buttons' switch in THEIR SHOCKERS' header (friends_shockers._layout_switch) */
.rpanel .layout-switch { display: inline-flex; align-items: center; gap: 6px; flex: none; }
/* OpenShock's card (openshock_card.py, remote-openshock.js): its limits line, two round
   dials, three wide buttons (lit while a press runs, or Live control's pick), the LIVE tag
   in its corner -- purple while on, as OpenShock's -- and Live control's pad */
.rpanel .live-tag { flex: none; background: transparent; color: var(--muted); border: 1px solid var(--line);
  border-radius: 3px; padding: 0 5px; min-height: 18px; font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.rpanel .live-tag:hover:not(:disabled) { background: transparent; color: var(--txt); border-color: var(--txt); }
.rpanel .live-tag.on, .rpanel .live-tag.on:hover:not(:disabled) { color: var(--purple); border-color: var(--purple);
  background: var(--purple-tint); }
.rpanel .live-tag:disabled { opacity: 1; color: var(--dim); border-color: var(--dim); }
.rpanel .os-limits { display: flex; justify-content: center; gap: 12px; }
.rpanel .os-lim { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.rpanel .os-classic, .rpanel .os-live { display: flex; flex-direction: column; gap: 6px; }
.rpanel .os-classic[hidden], .rpanel .os-live[hidden] { display: none; }
.rpanel .os-dials { display: flex; justify-content: center; gap: 8px; }
.rpanel .dial { position: relative; width: 104px; height: 104px; flex: none; touch-action: none; cursor: pointer;
  outline: none; --hue: var(--yellow); --hue-mid: var(--yellow-mid); }
.rpanel .dial-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rpanel .dial-track { fill: none; stroke: var(--hue-mid); stroke-width: 16; stroke-linecap: round; }
.rpanel .dial-fill { fill: none; stroke: var(--hue); stroke-width: 8; stroke-linecap: round; }
.rpanel .dial-knob { fill: var(--panel); stroke: var(--muted); stroke-width: 1.5; }
.rpanel .dial:focus-visible .dial-knob { stroke: var(--accent); stroke-width: 2.5; }
.rpanel .dial-v { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center;
  font-size: 20px; font-weight: 700; color: var(--txt); pointer-events: none; font-variant-numeric: tabular-nums; }
.rpanel .dial-l { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; font-size: 12px;
  color: var(--muted); pointer-events: none; }
.rpanel .dial.disabled { cursor: default; }
.rpanel .dial.disabled .dial-track { stroke: var(--grey-mid); }
.rpanel .dial.disabled .dial-fill { stroke: var(--dim); }
.rpanel .dial.disabled .dial-v, .rpanel .dial.disabled .dial-l { color: var(--dim); }
.rpanel .os-buttons { display: flex; gap: 8px; }
.rpanel .osb { flex: 1; display: inline-flex; align-items: center; justify-content: center; min-height: 36px;
  background: transparent; color: var(--txt); border: 2px solid var(--line); border-radius: var(--r-btn); padding: 2px 8px; }
.rpanel .osb[style*="--hue"] { color: var(--hue); border-color: var(--hue-mid); }
.rpanel .osb:hover:not(:disabled) { background: var(--hover); border-color: var(--line); }
.rpanel .osb[style*="--hue"]:hover:not(:disabled) { background: var(--hue-tint); border-color: var(--hue); color: var(--hue); }
.rpanel .osb.on, .rpanel .osb.on:hover:not(:disabled) { background: var(--hover); border-color: var(--txt); }
.rpanel .osb[style*="--hue"].on, .rpanel .osb[style*="--hue"].on:hover:not(:disabled) { background: var(--hue-tint);
  border-color: var(--hue); }
.rpanel .osb.running { color: var(--err); }
.rpanel .osb:disabled { opacity: 1; background: transparent; color: var(--dim); border-color: var(--dim); }
.rpanel .pad { position: relative; height: 200px; border: 1px solid var(--line); border-radius: 6px; background: var(--well);
  touch-action: none; cursor: pointer; outline: none; user-select: none; --y: 1; --hue: var(--pink); }
.rpanel .pad:focus-visible { border-color: var(--accent); }
.rpanel .pad-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rpanel .pad-h { position: absolute; left: 50%; top: calc(25px + var(--y) * (100% - 50px)); width: 40px; height: 40px;
  transform: translate(-50%, -50%); border-radius: 50%; background: var(--hue); color: var(--ink); font-size: 12px;
  font-weight: 700; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.rpanel .pad.held .pad-h { width: 48px; height: 48px; outline: 1.5px solid var(--txt); }
.rpanel .pad.disabled { cursor: default; }
.rpanel .pad.disabled .pad-h { background: var(--dim); }
