/* YAGCC — instrument-panel theme. One loud thing (the edge-lit guitar stage); everything else is flat graphite. */
:root {
  --ink: #06080e;
  --panel: #0e121b;
  --raised: #151a26;
  --inset: #080b12;
  --line: #232a3b;
  --line-2: #313a50;
  --text: #e8ecf5;
  --dim: #8a93a8;
  --faint: #5c6479;
  --blue: #2f7bff;
  --blue-hi: #4a8dff;
  --cyan: #1cc6ff;
  --violet: #9a4dff;
  --edge: linear-gradient(90deg, #1cc6ff, #2f7bff 45%, #9a4dff);
  --ok: #34d399; --warn: #fbbf24; --bad: #ff5d73;
  --green: #22c55e; --red: #ef4444; --yellow: #facc15; --fblue: #3b82f6; --orange: #fb923c;
  --r: 6px;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans: Barlow, ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  /* legacy names still used by guitar.js / inline styles */
  --accent: var(--blue); --accent2: var(--cyan); --muted: var(--dim); --surface: var(--panel); --surface2: var(--raised);
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; min-height: 100vh; background: var(--ink); color: var(--text); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--cyan); text-underline-offset: 3px; }
code, kbd { font: 500 .88em var(--mono); background: var(--raised); border: 1px solid var(--line); padding: .05em .4em; border-radius: 4px; }
b, strong { font-weight: 600; color: var(--text); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

h1, h2, h3 { margin: 0; font-weight: 600; }
.display { font: 700 clamp(34px, 4.6vw, 52px)/1.02 var(--display); letter-spacing: -.005em; }
h2 { font: 700 23px/1.15 var(--display); margin-bottom: 6px; letter-spacing: .005em; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0 0 12px; }
.dim { color: var(--dim); }
.small { font-size: 14px; }
.lead { font-size: 19px; color: var(--dim); max-width: 34em; margin: 16px 0 26px; }

/* ---------- header ---------- */
header.top { position: sticky; top: 0; z-index: 30; background: rgba(6, 8, 14, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: italic 700 23px/1 var(--display); letter-spacing: .02em; flex: none; }
.brand img { width: 32px; height: 32px; border-radius: 7px; display: block; }
nav { display: flex; align-self: stretch; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; }
nav::-webkit-scrollbar { display: none; }
nav button { position: relative; background: none; border: 0; color: var(--dim); padding: 0 13px; font: 600 15px var(--sans); cursor: pointer; white-space: nowrap; }
nav button:hover { color: var(--text); }
nav button.active { color: var(--text); }
nav button.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--edge); border-radius: 2px; }
.conn { flex: none; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--dim); }
.conn .led { width: 9px; height: 9px; border-radius: 50%; background: #2a3142; box-shadow: inset 0 1px 1px rgba(0,0,0,.6); flex: none; }
.conn.on .led { background: var(--ok); box-shadow: 0 0 8px var(--ok), 0 0 2px #fff inset; }
.conn #connText { display: flex; align-items: center; gap: 10px; }
.conn .seg-item { color: var(--text); }
.conn .seg-item + .seg-item { padding-left: 10px; border-left: 1px solid var(--line-2); color: var(--dim); }
.conn .seg-item.mono { font: 500 13px var(--mono); }

/* ---------- layout ---------- */
main { max-width: 1200px; margin: 0 auto; padding: 36px 24px 40px; }
.view { display: none; }
.view.active { display: block; }
.page-head { margin-bottom: 22px; }
.page-head .display { font-size: clamp(34px, 4vw, 44px); margin-bottom: 6px; }
.page-head p { max-width: 40em; margin: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.stack { display: grid; gap: 16px; align-content: start; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }   /* used by generated markup */
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------- buttons & controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: var(--raised); color: var(--text); font: 600 15px var(--sans); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #46516b; background: #1a2030; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--blue); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 0 0 1px rgba(154,77,255,0); transition: box-shadow .15s, background .15s; }
.btn.primary:hover { background: var(--blue-hi); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 0 0 1px var(--violet), 0 0 18px rgba(154,77,255,.35); }
.btn.lg { height: 48px; padding: 0 22px; font-size: 16px; }
.btn.small { height: 32px; padding: 0 12px; font-size: 14px; }
.btn.quiet { background: none; border-color: transparent; }
.btn.quiet:hover { background: var(--raised); }
.btn.danger { color: var(--bad); }
.btn.ghost { background: none; }

select, input[type=number] { appearance: none; -webkit-appearance: none; height: 38px; min-width: 180px; padding: 0 34px 0 12px; border-radius: var(--r); border: 1px solid var(--line-2);
  color: var(--text); font: 500 15px var(--sans); cursor: pointer;
  background: var(--inset) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238a93a8' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center; }
select:hover { border-color: #46516b; }

.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 13px; background: var(--inset); border: 1px solid var(--line-2); transition: background .15s, border-color .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(180deg, #f4f6fb, #b9c0cf); box-shadow: 0 1px 2px rgba(0,0,0,.5); transition: transform .15s; }
.switch input:checked + i { background: var(--blue); border-color: var(--blue); box-shadow: 0 0 12px rgba(47,123,255,.45); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:disabled + i { opacity: .35; }
.switch input:focus-visible + i { outline: 2px solid var(--cyan); outline-offset: 2px; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: none; cursor: pointer; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--line-2); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line-2); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--blue); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: linear-gradient(180deg, #f4f6fb, #b9c0cf); border: 3px solid var(--blue); box-shadow: 0 0 10px rgba(47,123,255,.5); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #e8ecf5; border: 3px solid var(--blue); }

.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; margin: 6px 0 4px; }
.seg button, .seg .preset { background: var(--inset); border: 0; border-right: 1px solid var(--line-2); border-radius: 0; color: var(--dim); font: 600 14px var(--sans); padding: 8px 14px; cursor: pointer; }
.seg button:last-child, .seg .preset:last-child { border-right: 0; }
.seg button:hover, .seg .preset:hover { color: var(--text); background: var(--raised); }
.seg .on, .seg .preset.on { background: var(--raised); color: var(--text); box-shadow: inset 0 -2px 0 var(--blue); }

.opt { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.opt.first { border-top: 0; padding-top: 0; }
.opt p { margin: 2px 0 0; font-size: 14px; }
.opt h2 { margin: 0; }
.slider-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.slider-row label { font-weight: 600; }
.slider-row .val, .slider-row output { font: 700 15px var(--mono); color: var(--cyan); }
.slider-row input[type=range] { grid-column: 1 / -1; }

.notice { border: 1px solid var(--line); border-left: 3px solid var(--blue); background: var(--panel); border-radius: var(--r); padding: 12px 16px; font-size: 15px; color: var(--dim); margin: 0 0 18px; }
.notice b { color: var(--text); }
.notice.warn { border-left-color: var(--warn); }
.notice.bad { border-left-color: var(--bad); }
.notice.info { border-left-color: var(--blue); }

/* ---------- flash (landing) ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 8px 0 48px; border-bottom: 1px solid var(--line); }
.hero-copy .display { font-size: clamp(40px, 5.4vw, 64px); max-width: 11em; }
.hero-copy .notice { margin-top: 20px; }
.hero-logo { width: 100%; max-width: 400px; height: auto; justify-self: center; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } .hero-logo { max-width: 260px; order: -1; } }
.section-title { font: 700 30px var(--display); margin: 44px 0 18px; scroll-margin-top: 80px; }
.flow { list-style: none; margin: 0; padding: 0; counter-reset: f; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.flow li { counter-increment: f; padding: 22px 22px 24px; border-left: 1px solid var(--line); position: relative; display: flex; flex-direction: column; gap: 10px; }
.flow li:first-child { border-left: 0; }
.flow li::before { content: counter(f); font: 700 40px/1 var(--display); color: transparent; -webkit-text-stroke: 1px var(--line-2); }
.flow li:hover::before { -webkit-text-stroke-color: var(--blue); }
.flow h3 { font: 700 21px var(--display); }
.flow p { margin: 0; }
.flow select { width: 100%; min-width: 0; }
.flow .row { margin-top: auto; }
.flow li > .btn:last-child { margin-top: auto; align-self: flex-start; }
.more { margin-top: 4px; font-size: 14px; }
.more summary { color: var(--dim); cursor: pointer; }
.more summary:hover { color: var(--text); }
.more[open] summary { margin-bottom: 8px; }
@media (max-width: 980px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } .flow li:nth-child(3) { border-left: 0; } .flow li:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 560px) { .flow { grid-template-columns: 1fr; } .flow li { border-left: 0; } .flow li + li { border-top: 1px solid var(--line); } }
#flashMsg { margin-top: 14px; }

/* ---------- gates ---------- */
.gate { text-align: center; padding: 70px 20px; border: 1px dashed var(--line-2); border-radius: var(--r); }
.gate .display { font-size: 40px; margin-bottom: 10px; }
.gate p { max-width: 36em; margin: 0 auto 18px; }
.gate .small { margin-top: 22px; }
.small-gate { padding: 40px 20px; }
#otherMode { max-width: 600px; margin: 14px auto 0; text-align: left; }

/* ---------- the stage (the one loud element) ---------- */
.stage { position: relative; border-radius: 10px; padding: 18px 22px 16px; border: 1px solid #1b2337;
  background: radial-gradient(70% 90% at 50% 115%, rgba(47,123,255,.26), transparent 70%), radial-gradient(40% 60% at 85% -10%, rgba(154,77,255,.16), transparent 70%), #070a12;
  box-shadow: 0 0 0 1px rgba(28,198,255,.06), 0 24px 70px -30px rgba(47,123,255,.55); }
.stage::before { content: ""; position: absolute; left: 18px; right: 18px; top: -1px; height: 1px; background: var(--edge); opacity: .9; }
.stage::after { content: ""; position: absolute; left: 30%; right: 30%; top: -1px; height: 14px; background: var(--edge); filter: blur(14px); opacity: .45; pointer-events: none; }
.stage.compact { padding: 10px 18px 8px; }
.stage.compact svg.guitar { max-height: 230px; }
svg.guitar { width: 100%; height: auto; display: block; margin: 0 auto; }

/* Pico-style pin header under the guitar */
.pins { display: grid; grid-template-columns: repeat(23, minmax(0, 1fr)); gap: 4px; margin: 10px 0 2px; padding: 8px 10px 6px; border-top: 1px solid #1b2337; }
.pins div { display: flex; flex-direction: column; align-items: center; gap: 4px; font: 500 10px var(--mono); color: var(--faint); }
.pins div::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: radial-gradient(circle at 50% 50%, #06080e 0 2.4px, #8a7a4c 2.6px 4.4px, #2a2f3d 4.6px); border: 1px solid #39405a; }
.pins div.used { color: var(--dim); }
.pins div.used::before { border-color: var(--blue); }
.pins div.low { color: var(--cyan); }
.pins div.low::before { background: radial-gradient(circle, #fff 0 2.4px, var(--cyan) 2.6px 5px, var(--blue) 5.2px); border-color: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
@media (max-width: 760px) { .pins { grid-template-columns: repeat(8, minmax(0, 1fr)); row-gap: 8px; } }

/* ---------- setup ---------- */
.setup-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
@media (max-width: 860px) { .setup-grid { grid-template-columns: 1fr; } .step-list { order: 2; } }
.step-list { list-style: none; margin: 0; padding: 6px 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.step-list li button { width: 100%; display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 7px 14px; background: none; border: 0; color: var(--dim); font: 500 15px var(--sans); text-align: left; cursor: pointer; }
.step-list li button:hover { color: var(--text); background: var(--raised); }
.step-list .mark { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line-2); justify-self: center; }
.step-list li.done .mark { background: var(--ok); border-color: var(--ok); }
.step-list li.cur button { color: var(--text); background: var(--raised); box-shadow: inset 2px 0 0 var(--blue); }
.step-list li.cur .mark { border-color: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.step-list .v { font: 500 12px var(--mono); color: var(--faint); }
.step-list li.done .v { color: var(--dim); }
.step-list .sw { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 8px; vertical-align: 1px; }
.step-panel { min-height: 340px; }
.step-count { font: 500 13px var(--mono); color: var(--faint); margin-bottom: 6px; }
.step-title { font: 700 40px/1.05 var(--display); margin: 0 0 8px; }
.step-prompt { color: var(--dim); font-size: 18px; margin: 0 0 22px; max-width: 32em; }
.step-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.result { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--inset); border: 1px solid var(--line); min-height: 56px; margin-bottom: 14px; font-size: 16px; }
.result.ok { border-color: rgba(52,211,153,.45); }
.result.ok::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); flex: none; }
.result.bad { border-color: rgba(255,93,115,.5); }
.result.bad::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); flex: none; }
.chip { font: 700 13px var(--mono); padding: 2px 8px; border-radius: 4px; background: var(--raised); border: 1px solid var(--line-2); color: var(--cyan); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); flex: none; animation: pulse 1.3s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(28,198,255,.6); } 100% { box-shadow: 0 0 0 12px rgba(28,198,255,0); } }
.manual { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--dim); font-size: 15px; }
.manual select { min-width: 140px; }
.bar { height: 10px; background: var(--inset); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--edge); transition: width .06s linear; }
.adc-row { display: grid; grid-template-columns: 56px 1fr 46px auto; gap: 12px; align-items: center; margin-bottom: 8px; opacity: .6; }
.adc-row.sel { opacity: 1; }
.adc-row .val { font: 500 13px var(--mono); color: var(--dim); text-align: right; }
.adc-row .bar { height: 6px; }
.adcs-note { font-size: 14px; color: var(--dim); margin: 18px 0 8px; }
table.sum { width: 100%; border-collapse: collapse; font-size: 15px; }
table.sum td { padding: 8px 0; border-bottom: 1px solid var(--line); }
table.sum td:last-child { text-align: right; font: 500 14px var(--mono); color: var(--cyan); }
table.sum td .dim { font-family: var(--sans); }
.led-test { display: flex; gap: 12px; margin: 4px 0 16px; }
.led-test i { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--inset); transition: .1s; }
.led-test i.lit { background: #fff; box-shadow: 0 0 18px #fff; border-color: #fff; }
.led-test i.done { background: var(--c); border-color: var(--c); }

/* ---------- guitar svg parts ---------- */
.g-label { fill: #6b7694; font: 600 10px var(--sans); letter-spacing: .14em; text-anchor: middle; text-transform: uppercase; }
.g-label.body { fill: #f3ead0; opacity: .8; font-size: 9px; }
.g-logo { fill: #e9d9a8; font: italic 700 18px var(--display); letter-spacing: .04em; }
.part { transition: opacity .08s, filter .08s; opacity: .62; }
.part.mapped { opacity: .88; }
.part.on { opacity: 1; filter: drop-shadow(0 0 9px var(--c, #2f7bff)); }
.fretcap { transition: filter .08s; filter: brightness(.62) saturate(.85); }
.part.mapped .fretcap { filter: brightness(.85); }
.part.on .fretcap { filter: brightness(1.18) saturate(1.1); }
.litcap { fill: var(--c); opacity: 0; transition: opacity .08s; }
.part.on .litcap { opacity: .9; }
.glyph { fill: none; stroke: #20263a; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .08s, fill .08s; }
.glyph.fill { fill: #20263a; stroke: none; }
.glyph.light { stroke: #e9edf7; }
.glyph.light.fill { fill: #e9edf7; stroke: none; }
.part.on .glyph.light { stroke: #10131c; }
.part.on .glyph.light.fill { fill: #10131c; stroke: none; }
.focus-ring { fill: none; stroke: var(--cyan); stroke-width: 2.5; stroke-dasharray: 6 5; opacity: 0; pointer-events: none; }
.focus .focus-ring { opacity: 1; animation: dash .7s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -22; } }
.wh-track, .wh-fill { fill: none; stroke-width: 5; stroke-linecap: round; }
.wh-track { stroke: rgba(0,0,0,.45); }
.wh-fill { stroke: var(--cyan); filter: drop-shadow(0 0 4px var(--cyan)); }
.needle { transition: transform .15s ease-out; }
.part.on .needle line { filter: drop-shadow(0 0 3px var(--cyan)); }

/* ---------- save bar ---------- */
.savebar { position: sticky; bottom: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 16px; padding: 12px 16px; background: rgba(14,18,27,.94); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: var(--r); }
.savebar::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--edge); opacity: .5; border-radius: var(--r) var(--r) 0 0; }

/* ---------- lights ---------- */
.col-row { display: grid; grid-template-columns: 1fr 46px 76px; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.col-row:first-child { border-top: 0; }
.col-row input[type=color] { width: 46px; height: 30px; padding: 0; border: 1px solid var(--line-2); border-radius: 4px; background: none; cursor: pointer; }
.col-row .hex { font: 500 13px var(--mono); color: var(--dim); text-align: right; }
.fretdot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-right: 10px; vertical-align: -1px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.preset { display: inline-flex; gap: 3px; align-items: center; padding: 6px 10px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--inset); color: var(--text); cursor: pointer; font: 600 14px var(--sans); }
.preset:hover { border-color: var(--blue); }
.preset.on { border-color: var(--blue); }
.preset i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.preset span { margin-left: 7px; }
.choice-list { display: grid; margin: 8px 0 4px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.choice-list label { display: grid; grid-template-columns: 16px 1fr; gap: 12px; align-items: start; padding: 10px 14px; cursor: pointer; border-top: 1px solid var(--line); background: var(--inset); }
.choice-list label:first-child { border-top: 0; }
.choice-list label:hover { background: var(--raised); }
.choice-list input { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 3px 0 0; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--ink); }
.choice-list input:checked { border-color: var(--blue); background: radial-gradient(circle, var(--cyan) 0 3.5px, var(--ink) 4px); box-shadow: 0 0 8px rgba(28,198,255,.5); }
.choice-list label:has(input:checked) { background: var(--raised); }
.choice-list b { display: block; font-weight: 600; }
.choice-list .dim { font-size: 14px; }
.ledmap { display: flex; gap: 6px; align-items: flex-end; margin: 12px 0 16px; flex-wrap: wrap; }
.ledmap .led { text-align: center; font: 500 13px var(--sans); color: var(--dim); }
.ledmap .led b { display: block; width: 32px; height: 32px; border-radius: 50%; margin: 0 auto 6px; border: 1px solid rgba(255,255,255,.15); opacity: .6; transition: opacity .08s, box-shadow .08s; }
.ledmap .led.on b { opacity: 1; box-shadow: 0 0 16px var(--c); }
.ledmap .arrow { align-self: center; color: var(--faint); margin-bottom: 26px; }
.rgb-disabled { opacity: .4; pointer-events: none; }

/* ---------- modes ---------- */
.modes-cols { margin-top: 0; }
.fret-map { display: grid; gap: 0; margin: 12px 0 18px; }
.fret-row { display: grid; grid-template-columns: 34px 90px minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.fret-row:first-child { border-top: 0; }
.fret-key { width: 34px; height: 22px; border-radius: 5px; background: var(--c); box-shadow: inset 0 -4px 0 rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.35), 0 0 12px color-mix(in srgb, var(--c) 45%, transparent); }
.fret-row label { font-weight: 600; }
.fret-row select { width: 100%; min-width: 0; }
.always { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; }
.always dt { font-weight: 600; }
.always dd { margin: 0; color: var(--dim); }
.mode-list { display: grid; margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.mode-row { display: grid; grid-template-columns: 16px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--inset); cursor: pointer; }
.mode-row:first-child { border-top: 0; }
.mode-row:hover { background: var(--raised); }
.mode-row .radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.mode-row.sel { background: var(--raised); }
.mode-row.sel .radio { border-color: var(--blue); background: radial-gradient(circle, var(--cyan) 0 3.5px, transparent 4px); box-shadow: 0 0 8px rgba(28,198,255,.5); }
.mode-row b { font-weight: 600; }
.mode-row .dim { font-size: 14px; }
.tag { font: 600 12px var(--sans); padding: 2px 8px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--dim); white-space: nowrap; }
.tag.live { color: var(--ok); border-color: rgba(52,211,153,.4); }
.keymap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; align-items: center; margin-top: 12px; }
.keymap label { color: var(--dim); font-size: 15px; }
.keymap select { width: 100%; min-width: 0; height: 34px; }

/* ---------- hardware / compatibility ---------- */
.badge { display: inline-flex; align-items: center; gap: 7px; font: 600 13px var(--sans); white-space: nowrap; color: var(--dim); }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.ok { color: var(--ok); } .badge.warn { color: var(--warn); } .badge.plan { color: #8ea8ff; } .badge.no { color: var(--bad); }
.filters { margin-bottom: 16px; }
.compat { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.compat-head, .compat-row { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.4fr) minmax(0, 1.2fr) 130px; gap: 18px; padding: 14px 20px; align-items: start; }
.compat-head { font-size: 13px; color: var(--faint); font-weight: 600; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.compat-row + .compat-row { border-top: 1px solid var(--line); }
.compat-row .console { font-size: 14px; color: var(--dim); }
.compat-row h3 { margin: 1px 0 0; }
.compat-row .notes { margin: 6px 0 0; font-size: 14px; color: var(--dim); }
.compat-row .lbl { display: none; }
@media (max-width: 820px) { .compat-head { display: none; } .compat-row { grid-template-columns: 1fr; gap: 6px; } .compat-row .lbl { display: inline; color: var(--faint); margin-right: 6px; } }
.hw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.hw { padding: 18px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.hw .meta { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--dim); }
.hw h3 { margin: 8px 0 4px; }
.hw .tag { display: inline-block; margin-top: 2px; }
.hw ul { margin: 10px 0 0; padding-left: 18px; color: var(--dim); font-size: 14px; }
.hw li { margin: 3px 0; }
.note-panel { margin-top: 16px; }
.note-panel ul { padding-left: 20px; }
.note-panel li { margin: 6px 0; }

/* ---------- toast & footer ---------- */
#toasts { position: fixed; right: 20px; bottom: 84px; display: grid; gap: 8px; z-index: 50; }
.toast { background: var(--raised); border: 1px solid var(--line-2); border-left: 3px solid var(--blue); padding: 10px 14px; border-radius: var(--r); box-shadow: 0 12px 30px rgba(0,0,0,.5); max-width: 360px; font-size: 15px; animation: toast .18s ease-out; }
.toast.bad { border-left-color: var(--bad); }
.toast.ok { border-left-color: var(--ok); }
@keyframes toast { from { opacity: 0; transform: translateY(6px); } }
footer { max-width: 1200px; margin: 0 auto; padding: 26px 24px 46px; border-top: 1px solid var(--line); display: flex; gap: 6px 18px; flex-wrap: wrap; color: var(--faint); font-size: 14px; }
footer a { color: var(--dim); }

@media (max-width: 760px) {
  .top-inner { gap: 14px; padding: 0 16px; }
  .brand span { display: none; }
  .conn #connText { display: none; }
  main { padding: 24px 16px 32px; }
  .panel { padding: 18px 16px; }
  .step-title { font-size: 32px; }
}
