
:root {
  color-scheme: dark;
  --bg: #1b1b26;
  --side: #171720;
  --card: #1f1f2b;
  --card-line: #2c2c3b;
  --line: #292936;
  --field: #2a2a38;
  --field-hi: #34344a;
  --ink: #ececf3;
  --sub: #b9b9c9;
  --mut: #8a8aa0;
  --dim: #626278;
  --acc: #a970ff;
  --acc-ink: #b689ff;
  --acc-track: #8a5fd6;
  --acc-knob: #e3d3ff;
  --off-track: #2d2d3c;
  --off-knob: #45455a;
  --ok: #5fd38d;
  --warn: #e8b04a;
  --shadow: rgba(0, 0, 0, .55);
  --font: "Segoe UI", "Inter", system-ui, Arial, sans-serif;
  --mono: Consolas, "Cascadia Mono", monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f3f8; --side: #e9e9f1; --card: #ffffff; --card-line: #dcdce8; --line: #dcdce8;
  --field: #ececf4; --field-hi: #e1e1ee; --ink: #1d1d2a; --sub: #3d3d52; --mut: #6f6f88; --dim: #a4a4b8;
  --acc: #8a4fff; --acc-ink: #7a3ff0; --acc-track: #9a6ce8; --acc-knob: #ffffff; --off-track: #d4d4e2; --off-knob: #ffffff;
  --shadow: rgba(40, 40, 60, .25);
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body { font: 600 12.5px/1.4 var(--font); color: var(--ink); background: var(--bg); overflow: hidden; user-select: none; -webkit-user-select: none; border: 1px solid var(--card-line); border-radius: 10px; }
input { user-select: text; -webkit-user-select: text; }
button, input { font: inherit; color: inherit; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 1px solid var(--acc); outline-offset: 2px; }

.app { display: grid; grid-template-columns: 196px 1fr; height: 100%; }

/* sidebar */
.side { display: flex; flex-direction: column; padding: 22px 12px 12px; background: var(--side); border-right: 1px solid var(--line); border-radius: 10px 0 0 10px; min-height: 0; }
.side h4 { font-size: 12px; font-weight: 600; color: var(--mut); padding: 0 8px; margin: 2px 0 8px; }
.side h4:not(:first-child) { margin-top: 16px; }
.nav { display: flex; align-items: center; gap: 12px; width: 100%; height: 30px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--sub); text-align: left; cursor: pointer; font-weight: 600; }
.nav svg { width: 15px; height: 15px; color: var(--mut); }
.nav:hover { color: var(--ink); }
.nav[aria-current="true"], .nav[aria-current="true"] svg { color: var(--acc-ink); }
.side .sp { flex: 1; min-height: 12px; }
.chips { display: flex; flex-direction: column; gap: 5px; padding: 10px 8px 2px; border-top: 1px solid var(--line); font-size: 11px; font-weight: 500; color: var(--mut); }
.chips > span { display: flex; align-items: center; min-width: 0; }
.chips b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); margin-right: 8px; flex: none; }
.chips .on .dot { background: var(--ok); }

/* header */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.head { display: flex; align-items: flex-start; gap: 6px; padding: 12px 16px 10px; border-bottom: 1px solid var(--line); }
.crumb { flex: 1; min-width: 0; }
.crumb div { display: flex; align-items: center; gap: 9px; height: 17px; font-weight: 700; font-size: 12.5px; }
.crumb .c2 { position: relative; margin: 1px 0 0 22px; font-weight: 600; }
.crumb .c2::before { content: ""; position: absolute; left: -16px; top: -6px; width: 9px; height: 13px; border-left: 1px solid #4a4a5e; border-bottom: 1px solid #4a4a5e; border-bottom-left-radius: 2px; }
.ring { width: 11px; height: 11px; border-radius: 50%; border: 1.6px solid var(--acc); display: grid; place-items: center; flex: none; }
.ring::after { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--acc); }
.icon { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--sub); cursor: pointer; flex: none; }
.icon:hover, .icon[aria-expanded="true"] { background: var(--field); color: var(--ink); }

/* sub tabs */
.subs { display: flex; padding: 10px 14px 0; }
.subs .box { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--card-line); border-radius: 7px; }
.subs button { height: 26px; padding: 0 12px; border: 0; border-radius: 5px; background: none; color: var(--mut); cursor: pointer; font-weight: 600; white-space: nowrap; }
.subs button:hover { color: var(--ink); }
.subs button[aria-current="page"] { background: var(--field); color: var(--acc-ink); }

.scroll { flex: 1; overflow-y: auto; min-height: 0; padding: 10px 14px 14px; }
.scroll::-webkit-scrollbar, .console::-webkit-scrollbar, .sheet::-webkit-scrollbar { width: 8px; }
.scroll::-webkit-scrollbar-thumb, .console::-webkit-scrollbar-thumb, .sheet::-webkit-scrollbar-thumb { background: var(--field-hi); border-radius: 4px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card { border: 1px solid var(--card-line); border-radius: 7px; background: var(--card); padding: 7px 14px 9px; }
.card > h3 { font-size: 11px; font-weight: 600; color: var(--mut); text-transform: uppercase; letter-spacing: .05em; margin: 3px 0 3px; }
[hidden] { display: none !important; }

/* rows */
.row { display: flex; align-items: center; gap: 10px; min-height: 22.5px; }
.row > span:first-child { flex: 1; min-width: 0; }
.row.off > span:first-child, .row.off output { color: var(--dim); }
.sw { border: 0; background: none; padding: 0; cursor: pointer; display: flex; flex: none; }
.sw:disabled { cursor: default; }
.track { position: relative; width: 25px; height: 13px; border-radius: 7px; background: var(--off-track); flex: none; transition: background .12s; }
.track i { position: absolute; top: 2px; left: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--off-knob); transition: transform .12s, background .12s; }
.sw[aria-checked="true"] .track { background: var(--acc-track); }
.sw[aria-checked="true"] .track i { transform: translateX(12px); background: var(--acc-knob); }
.row.pending > span:first-child { color: var(--dim); }
.row.pending .sw, .row.pending .combo, .row.pending .swatch { opacity: .45; pointer-events: none; }
.row.hum { gap: 14px; min-height: 30px; }
.wide-card { margin-top: 12px; }
.wide-card .row.hum > span:first-child { flex: 0 0 220px; }
.wide-card .row.hum input[type=range] { max-width: 260px; margin-left: auto; }
.row.hum > span:first-child { flex: 0 0 150px; display: flex; align-items: center; gap: 6px; }
.row.hum input[type=range] { flex: 1; }
.tip { display: inline-grid; place-items: center; width: 13px; height: 13px; border-radius: 50%; background: var(--field-hi); color: var(--mut); font-size: 9px; cursor: help; }
.pill { flex: none; min-width: 52px; padding: 1px 8px; border-radius: 4px; background: var(--field); text-align: right; font-variant-numeric: tabular-nums; }
.gear { width: 16px; height: 16px; border: 0; padding: 0; background: none; color: var(--sub); cursor: pointer; display: grid; place-items: center; }
.gear:hover { color: var(--ink); }
.gear svg { width: 14px; height: 14px; }

/* slider: label and value on top, track below */
.sl { flex-wrap: wrap; row-gap: 1px; padding: 2px 0 3px; }
.sl > span:first-child { color: var(--mut); }
.sl output { color: var(--ink); font-variant-numeric: tabular-nums; }
.sl input[type=range] { flex: 0 0 100%; width: 100%; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 12px; background: none; cursor: pointer; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 5px; border-radius: 3px; background: linear-gradient(90deg, var(--acc-ink) var(--p, 0%), var(--off-track) var(--p, 0%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; margin-top: -2.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.row.off input[type=range] { pointer-events: none; }
.row.off input[type=range]::-webkit-slider-runnable-track { background: linear-gradient(90deg, #4c3a6e var(--p, 0%), var(--off-track) var(--p, 0%)); }

/* color dots */
.dots { display: flex; gap: 12px; align-items: center; flex: none; margin-right: 6px; }
.swatch { -webkit-appearance: none; appearance: none; width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; overflow: hidden; flex: none; }
.swatch::-webkit-color-swatch-wrapper { padding: 0; }
.swatch::-webkit-color-swatch { border: 0; border-radius: 50%; }

/* fields, combos, buttons */
.field { height: 26px; width: 100%; border: 1px solid transparent; border-radius: 5px; background: var(--field); padding: 0 10px; outline: none; font-size: 12px; font-weight: 600; }
.field::placeholder { color: var(--mut); }
.field:focus { border-color: #4b3a72; }
.row .field { width: 125px; flex: none; height: 20px; }
.combo { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 125px; flex: none; height: 20px; padding: 0 8px 0 10px; border: 0; border-radius: 4px; background: var(--field); cursor: pointer; text-align: left; font-size: 12px; font-weight: 600; }
.combo:hover, .combo[aria-expanded="true"] { background: var(--field-hi); }
.combo:disabled { color: var(--dim); cursor: default; }
.combo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo i { font-style: normal; color: var(--mut); letter-spacing: 1px; font-size: 11px; flex: none; }
.combo.listen { box-shadow: 0 0 0 1px var(--acc); color: #d6c2ff; animation: blink 1s ease-in-out infinite; }
.combo.warn { box-shadow: 0 0 0 1px #6b5420; color: var(--warn); }
.combo.wide { width: 170px; }
@keyframes blink { 50% { background: #2d2346; } }

.btn { display: block; width: 100%; height: 26px; margin: 0; border: 0; border-radius: 5px; background: var(--field); color: var(--sub); cursor: pointer; font-weight: 600; }
.btn:hover { background: var(--field-hi); color: var(--ink); }
.btn:disabled { color: var(--dim); pointer-events: none; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 2px; }
.stack { display: flex; flex-direction: column; gap: 9px; padding: 6px 0 4px; }

.console { height: 150px; margin: 6px 0 2px; padding: 8px 10px; overflow-y: auto; border-radius: 5px; background: var(--side); font: 500 11px/1.5 var(--mono); color: var(--mut); white-space: pre-wrap; word-break: break-word; user-select: text; -webkit-user-select: text; }
.curve-box { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 6px 0 4px; }
.curve { width: 100%; max-width: 320px; height: auto; aspect-ratio: 320 / 150; flex: 1 1 220px; background: var(--field); border: 1px solid var(--card-line); border-radius: 8px; stroke-width: 2; touch-action: none; }
.curve.off { opacity: .45; }
.curve .base { stroke: var(--dim); stroke-dasharray: 4 4; stroke-width: 1.2; }
.curve .path { stroke: var(--acc); stroke-width: 2.5; fill: none; }
.curve .sample { stroke: var(--acc); stroke-width: 1.2; fill: none; opacity: .3; }
.curve .end { fill: var(--sub); stroke: none; }
.curve .end.target { fill: var(--warn); }
.note { color: var(--dim); font-size: 11.5px; font-weight: 500; margin: 3px 0 4px; }
.status { margin: 5px 0 4px; padding: 5px 9px; border-radius: 5px; background: var(--side); color: var(--mut); font-weight: 500; word-break: break-word; }
.status.ok { color: var(--acc-ink); }
.status.bad { color: var(--warn); }
.path { font-family: var(--mono); font-weight: 500; font-size: 11px; color: var(--mut); word-break: break-all; }
.spin { display: inline-block; width: 11px; height: 11px; margin-right: 7px; vertical-align: -1px; border-radius: 50%; border: 2px solid var(--field-hi); border-top-color: var(--acc); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* config list */
.cfgs { display: flex; flex-direction: column; gap: 4px; }
.cfg { display: block; width: 100%; height: 22px; padding: 0 12px; border: 0; border-radius: 5px; background: none; color: var(--sub); text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cfg:hover { color: var(--ink); }
.cfg[aria-current="true"] { background: var(--field); color: var(--acc-ink); }


/* drop-down panels */
.pop { position: fixed; z-index: 50; min-width: 130px; padding: 4px; border: 1px solid var(--card-line); border-radius: 6px; background: var(--card); box-shadow: 0 8px 24px var(--shadow); }
.pop button { display: flex; align-items: center; gap: 10px; width: 100%; height: 25px; padding: 0 10px; border: 0; border-radius: 4px; background: none; text-align: left; cursor: pointer; font-weight: 600; }
.pop button:hover { background: var(--field); }
.pop button:disabled { color: var(--dim); cursor: default; background: none; }
.pop .box { width: 13px; height: 13px; border: 1px solid var(--dim); border-radius: 3px; display: grid; place-items: center; flex: none; }
.pop .box svg { width: 10px; height: 10px; stroke: #fff; stroke-width: 3; opacity: 0; }
.pop button[aria-checked="true"] .box { background: var(--acc-track); border-color: var(--acc-track); }
.pop button[aria-checked="true"] .box svg { opacity: 1; }
.pop .tick { width: 13px; height: 13px; stroke: var(--acc-ink); stroke-width: 2.5; opacity: 0; flex: none; }
.pop button[aria-checked="true"] .tick { opacity: 1; }

@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }

/* Grim browser shell; the product controls remain the original RobRun controls. */
:root{--bg:#0b0b0d;--side:#101012;--card:#141417;--card-line:#2b292c;--line:#292729;--field:#1d1c1f;--field-hi:#292629;--ink:#f5f2f2;--sub:#c8c1c2;--mut:#9b9294;--dim:#6f6668;--acc:#ef3340;--acc-ink:#ff4b57;--acc-track:#c92b36;--acc-knob:#fff;--off-track:#302d30;--off-knob:#5a5457;--font:Manrope,"Segoe UI",system-ui,Arial,sans-serif}
body{border:0;border-radius:0;background:var(--bg);padding-top:62px}
.web-head{position:fixed;z-index:40;inset:0 0 auto;height:62px;display:flex;align-items:center;gap:24px;padding:0 22px;border-bottom:1px solid var(--line);background:#0e0e10}
.web-brand{display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;letter-spacing:.15em}.web-brand img{width:24px;height:auto}.web-brand strong{font-size:16px}.web-brand>span{color:var(--dim);font-size:10px;font-weight:700}
.web-status{display:flex;align-items:center;gap:8px;margin-left:auto;color:var(--mut);font-size:11px}.web-status i{width:7px;height:7px;border-radius:50%;background:var(--dim)}.web-status.online i{background:var(--ok);box-shadow:0 0 12px #5fd38d66}.web-back{min-height:40px;display:flex;align-items:center;gap:8px;color:var(--mut);font-size:11px;text-decoration:none}.web-back:hover{color:var(--ink)}.web-back span{color:var(--acc)}
.app{height:calc(100dvh - 62px);grid-template-columns:210px 1fr}.side{border-radius:0;padding-top:16px}.side-product{display:flex;flex-direction:column;padding:0 10px 18px;color:var(--ink);font-size:15px;font-weight:800;letter-spacing:.12em}.side-product span{margin-top:3px;color:var(--acc);font-size:8px;letter-spacing:.15em}
.offline{position:fixed;z-index:30;inset:62px 0 0 210px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px;text-align:center;background:radial-gradient(circle at 50% 42%,#251216 0,var(--bg) 55%)}.offline img{width:58px;height:auto;margin-bottom:22px;filter:drop-shadow(0 0 30px #ef334022)}.offline h1{font-size:26px;letter-spacing:-.025em}.offline p{margin-top:12px;color:var(--mut);font-weight:500;line-height:1.8}.offline a{margin-top:24px;padding:11px 18px;border:1px solid var(--card-line);border-radius:6px;color:var(--ink);text-decoration:none}.offline a:hover{border-color:var(--acc)}
#theme{display:none}.card{background:var(--card)}.combo.listen{color:#ffd7da}.row.off input[type=range]::-webkit-slider-runnable-track{background:linear-gradient(90deg,#623238 var(--p,0%),var(--off-track) var(--p,0%))}.field:focus{border-color:#6f3036}
@media(max-width:760px){body{padding-top:56px;overflow:auto}.web-head{height:56px;padding:0 14px}.web-brand>span,.web-back{display:none}.web-status{font-size:10px}.app{height:calc(100dvh - 56px);grid-template-columns:64px 1fr}.side{padding:14px 7px}.side-product,.side h4,.nav span,.chips b{display:none}.nav{justify-content:center;padding:0;height:40px}.nav svg{width:18px;height:18px}.chips{padding-inline:0;align-items:center}.chips .dot{margin:0}.offline{inset:56px 0 0 64px}.head{padding-inline:10px}.subs{overflow-x:auto}.grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
