/* VIBE FM Mk1 web: a dark product stage with the device scaled to fit. The device itself is drawn at 1600 x 860 px
   (4 px = 1 mm, same numbers as the 3D model) and scaled as one block, so every control keeps its real proportions. */
@font-face { font-family: 'Archivo'; font-weight: 400; font-display: swap; src: url(../fonts/archivo-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 600; font-display: swap; src: url(../fonts/archivo-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 800; font-display: swap; src: url(../fonts/archivo-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url(../fonts/jetbrains-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 700; font-display: swap; src: url(../fonts/jetbrains-mono-latin-700-normal.woff2) format('woff2'); }

:root {
  --accent: #FF6A1A; --bg: #0B0C0E; --fg: #E9E7E2; --muted: #8C8F96; --line: #2C2E33;
  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif; --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(120% 90% at 50% 35%, #1a1c21 0%, #0B0C0E 62%) fixed, var(--bg);
  color: var(--fg); font-family: var(--sans); overflow: hidden; -webkit-tap-highlight-color: transparent;
}

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(env(safe-area-inset-top, 0px) + 12px) 20px 6px; }
.brand { font-size: 20px; letter-spacing: -0.01em; white-space: nowrap; }
.brand b { font-weight: 800; } .brand em { font-style: normal; font-weight: 800; color: var(--accent); } .brand span { font-weight: 400; }
.brand small { font: 400 11px var(--mono); color: var(--muted); letter-spacing: 0.06em; margin-left: 10px; text-transform: uppercase; }
body.plugin .brand span { color: #FF60BE; font-weight: 800; }
.brand small.claim { font: 800 11px var(--sans); color: #FFFFFF; letter-spacing: 0.2em; } .brand small.claim i { font-style: normal; color: #FF60BE; }
.tools { display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 5px; border-radius: 12px; background: rgba(20, 21, 24, 0.8); border: 1px solid var(--line); }
.tools button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--fg); font: 600 12.5px var(--sans); letter-spacing: 0.03em; cursor: pointer; }
.tools button:hover { background: #26282D; }
.tools button.on { background: var(--accent); color: #111214; }
.tools button:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.tools button { white-space: nowrap; flex: none; }
.rear[hidden] { display: none; }
@media (max-width: 1100px) { .brand small:not(.claim) { display: none; } .tools .wide:not(#tb-rear) { display: none; } }
/* phones held sideways: every pixel of height goes to the device */
@media (max-height: 500px) {
  .topbar { padding: calc(env(safe-area-inset-top, 0px) + 4px) 10px 2px; } .brand { font-size: 15px; }
  .tools { padding: 3px; } .tools button, .tools select { min-height: 28px; font-size: 11.5px; }
  .status { display: none; } .stage { height: calc(100% - 40px); }
}
@media (max-width: 640px) { .brand { font-size: 17px; } .tools button { padding: 0 9px; font-size: 12px; } .tools select { max-width: 130px; } .topbar { padding-left: 10px; padding-right: 10px; } }

/* ---------- stage ---------- */
.stage { display: flex; flex-direction: column; align-items: center; justify-content: center; height: calc(100% - 60px); }
.bigdisp { display: none; position: fixed; inset: 0; top: 48px; z-index: 30; background: #050607; flex-direction: column; align-items: center; justify-content: center; cursor: zoom-out; }
.biglabels { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-top: 12px; font: 13px var(--mono); color: #8A93A6; max-width: 90vw; }
.biglabels b { color: #E6EAF2; margin-right: 4px; } .biglabels i { flex-basis: 100%; height: 0; }
.btn.free { font: 700 11px var(--sans); letter-spacing: 0.04em; }
.bigdisp.on { display: flex; }
.bigdisp canvas { image-rendering: pixelated; image-rendering: crisp-edges; border-radius: 6px; box-shadow: 0 0 60px #000; }
.stagewrap { position: relative; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.device {
  position: absolute; left: 0; top: 0; width: 1600px; height: 860px; transform-origin: 0 0;
  border-radius: 30px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  background: linear-gradient(180deg, #2a2c31 0%, #1b1d21 100%);
  box-shadow: 0 60px 90px -30px rgba(0, 0, 0, 0.85), 0 22px 40px rgba(0, 0, 0, 0.55), inset 0 2px 0 rgba(255, 255, 255, 0.07), inset 0 -3px 0 rgba(0, 0, 0, 0.4);
}
.plate {
  position: absolute; inset: 10px; border-radius: 22px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.016) 0 1px, transparent 1px 2px, rgba(255, 255, 255, 0.008) 2px 3px, transparent 3px 6px),
    linear-gradient(180deg, #26282d, #212328);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.plate > * { position: absolute; }
.print { transform: translate(-50%, 0) translate(-10px, -10px); color: #C9CBD0; font: 600 13px var(--sans); letter-spacing: 1px; white-space: nowrap; }
.print.knum { font-size: 15px; font-weight: 800; }
.print.small { font-size: 10px; color: #8d9097; letter-spacing: 1.2px; }
.print.left { transform: translate(-10px, -10px); color: #6F7279; }
.wordmark { left: 0; transform: translate(-10px, -10px); font: 800 46px/1 var(--sans); color: #EDEBE6; letter-spacing: -0.5px; white-space: nowrap; }
.wordmark b { color: var(--accent); font-weight: 800; }
.wordmark span { font-weight: 400; letter-spacing: 1px; }
.wordmark i { display: block; font: 800 15px var(--sans); letter-spacing: 3px; color: var(--accent); font-style: normal; margin-top: 10px; }
.wordmark i em { font-style: normal; }
/* the plugin: VIBE FM VST, the claim white and pink (the hub's colours) */
body.plugin .wordmark i { color: #FFFFFF; } body.plugin .wordmark i em { color: #FF60BE; }
body.plugin .wordmark span { color: #FF60BE; font-weight: 800; }
/* ---------- the box view: no keys, no pads, the display bigger (panel.js setBox) ---------- */
.device.boxview { height: 620px; }
.device.boxview .screen, .device.boxview .dispmenu { left: 6px; top: 7px; width: 648px; height: 432px; }
.device.boxview .wordmark { font-size: 36px; } .device.boxview .wordmark i { font-size: 13px; margin-top: 7px; }
.device.boxview .pad, .device.boxview .key, .device.boxview .keybed, .device.boxview .plate > .print { display: none; }
.boxprints { display: none; } .device.boxview .boxprints { display: block; }
.boxprints .print { position: absolute; transform: translate(-50%, 0); }
.playpanel { transform: translate(-10px, -10px); background: #1A1B1F; border: 1.5px solid #2E3036; border-radius: 14px; box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.35); }
.playpanel span { position: absolute; left: 18px; top: 14px; font: 800 12px var(--sans); letter-spacing: 2px; color: var(--accent); }
.keybed { transform: translate(-10px, -10px); background: #15161A; border-radius: 10px; box-shadow: inset 0 6px 14px rgba(0, 0, 0, 0.6); }

/* ---------- display ---------- */
.well { position: absolute; background: #111214; border-radius: 14px; box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.05); }
.screen { position: absolute; left: 4px; top: 17.7px; width: 352px; height: 234.7px; border-radius: 3px; image-rendering: auto; background: #0B1220; }
.dispmenu { position: absolute; left: 4px; top: 17.7px; width: 352px; height: 234.7px; border-radius: 3px; background: rgba(11, 18, 32, 0.97); color: #E6EAF2; font: 12px var(--mono); padding: 10px 12px; overflow: auto; display: none; }
.dispmenu.on { display: block; }
.dispmenu h4 { margin: 0 0 8px; font: 700 13px var(--mono); color: var(--accent); }
.dispmenu button { display: flex; width: 100%; justify-content: space-between; gap: 8px; text-align: left; margin: 0 0 5px; padding: 7px 9px; border: 0; border-radius: 4px; background: #18223A; color: #E6EAF2; font: 700 11.5px var(--mono); cursor: pointer; }
.dispmenu button small { font-weight: 400; color: #8A93A6; }
.dispmenu button:hover, .dispmenu button:focus-visible { background: #24314A; outline: none; }
.dispmenu button.cur { box-shadow: inset 3px 0 0 var(--accent); }
.glass { position: absolute; inset: 2px; border-radius: 8px; pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 32%, transparent 33%, transparent 100%); }

/* ---------- buttons ---------- */
.btn {
  position: absolute; border: 0; border-radius: 7px; cursor: pointer; padding: 0; touch-action: none;
  background: linear-gradient(180deg, #3b3d43, #2f3136); color: #C9CBD0; font: 600 13px var(--sans); letter-spacing: 0.04em;
  box-shadow: 0 4px 0 #15161a, 0 6px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  transition: transform 0.04s, box-shadow 0.04s, background 0.08s;
  display: flex; align-items: center; justify-content: center;
}
.btn.soft { font-size: 11px; border-radius: 5px; box-shadow: 0 3px 0 #15161a, 0 4px 8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.btn svg { width: 24px; height: 24px; }
.btn.icon.rec { color: #FF5A4D; } .btn.icon.play { color: #6EE7A8; }
.btn.down { transform: translateY(3px); box-shadow: 0 1px 0 #15161a, 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.btn.led { --led: var(--accent); --lvl: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--led) calc(var(--lvl) * 100%), #3b3d43), color-mix(in srgb, var(--led) calc(var(--lvl) * 92%), #2f3136));
  box-shadow: 0 4px 0 #15161a, 0 0 calc(var(--lvl) * 24px) color-mix(in srgb, var(--led) calc(var(--lvl) * 60%), transparent), inset 0 1px 0 rgba(255, 255, 255, 0.09); }
.btn.led.bright { color: #111214; }
.btn.led.down { box-shadow: 0 1px 0 #15161a, 0 0 calc(var(--lvl) * 18px) color-mix(in srgb, var(--led) calc(var(--lvl) * 60%), transparent); }
/* the six free keys: no print, a coloured light (dim = its colour, bright = active) */
.btn.free { border-radius: 8px; }
.btn:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; }

/* a key held by double click */
.btn.latched { outline: 2px dashed var(--fg); outline-offset: 3px; }

/* ---------- encoders ---------- */
.knobwrap { position: absolute; cursor: ns-resize; touch-action: none; border-radius: 50%; }
.knobwrap:focus-visible { outline: 3px solid var(--fg); outline-offset: 2px; }
.knob {
  position: absolute; left: 50%; top: 50%; border-radius: 50%;
  transform: translate(-50%, -50%) rotate(var(--a, -135deg));
  background: repeating-conic-gradient(from 0deg, #1d1f23 0deg 4deg, #62656d 4deg 6deg, #2a2c31 6deg 8deg);
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.65), 0 3px 0 #0b0c0e, inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.knob .cap { position: absolute; inset: 13%; border-radius: 50%; background: radial-gradient(circle at 40% 28%, #5d6068 0%, #3a3d43 45%, #26282d 100%); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 1px 2px rgba(0, 0, 0, 0.6); }
.knob .ind { position: absolute; left: calc(50% - 2px); top: 16%; width: 4px; height: 26%; border-radius: 2px; background: #ece9e2; box-shadow: 0 0 4px rgba(255, 255, 255, 0.25); }
.knobwrap.grab .knob { box-shadow: 0 8px 14px rgba(0, 0, 0, 0.65), 0 3px 0 #0b0c0e, 0 0 0 2px color-mix(in srgb, var(--accent) 50%, transparent); }
.jogwrap { cursor: grab; }
.knob.jog { left: 0; top: 0; transform: none; background: repeating-conic-gradient(from 0deg, #1d1f23 0deg 2.5deg, #555860 2.5deg 4deg, #2a2c31 4deg 5deg); }
.knob.jog .cap { inset: 9%; background: radial-gradient(circle at 42% 30%, #4a4d55 0%, #2e3036 50%, #222428 100%); }
.knob.jog .dimple { position: absolute; left: 62%; top: 22%; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 60% 65%, #2a2c31, #0c0d0f); box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.08); }

/* ---------- pads ---------- */
.pad {
  position: absolute; border-radius: 9px; cursor: pointer; touch-action: none;
  --l: 0; --c: #888;
  background:
    radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--c) calc(var(--l) * 100%), #3a3c42) 0%, color-mix(in srgb, var(--c) calc(var(--l) * 70%), #2a2c31) 75%);
  box-shadow: 0 0 calc(var(--l) * 42px) color-mix(in srgb, var(--c) calc(var(--l) * 85%), transparent),
    0 4px 0 #141518, 0 6px 10px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 -5px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.04s;
}
.pad.down { transform: translateY(3px) scale(0.985); box-shadow: 0 0 calc(var(--l) * 42px) color-mix(in srgb, var(--c) calc(var(--l) * 85%), transparent), 0 1px 0 #141518, inset 0 0 0 1px rgba(255, 255, 255, 0.05); }
.pad .pn { position: absolute; left: 10px; top: 7px; font: 700 12px var(--mono); color: rgba(220, 224, 232, 0.5); mix-blend-mode: luminosity; }

/* ---------- keys ---------- */
.key { position: absolute; cursor: pointer; touch-action: none; }
.key.white {
  border-radius: 0 0 7px 7px; background: linear-gradient(180deg, #e6e1d8 0%, #f5f2ec 12%, #efebe4 100%);
  box-shadow: inset 0 -12px 0 #d5cfc3, inset 0 1px 0 #fff, 0 2px 4px rgba(0, 0, 0, 0.55);
}
.key.white.down { background: linear-gradient(180deg, #d7d2c8 0%, #e9e5de 14%, #e4dfd7 100%); box-shadow: inset 0 -5px 0 #cfc8bb, inset 0 3px 0 var(--accent), 0 1px 2px rgba(0, 0, 0, 0.5); }
.key.black {
  z-index: 2; border-radius: 0 0 5px 5px; background: linear-gradient(180deg, #050506 0%, #1c1d21 70%, #2a2b30 100%);
  box-shadow: inset 0 -14px 0 #121316, inset 2px 0 0 rgba(255, 255, 255, 0.05), 0 5px 7px rgba(0, 0, 0, 0.6);
}
.key.black.down { background: linear-gradient(180deg, #050506 0%, #141518 100%); box-shadow: inset 0 -6px 0 #0d0e10, inset 0 3px 0 var(--accent), 0 2px 3px rgba(0, 0, 0, 0.6); }

/* ---------- rear panel (jacks) ---------- */
.rear { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 18px; margin-top: 12px; padding: 8px 14px;
  max-width: calc(100vw - 32px); border: 1px solid var(--line); border-radius: 12px; background: rgba(20, 21, 24, 0.8); font: 600 11px var(--sans); }
.rear .rlabel { font: 700 10px var(--mono); letter-spacing: 0.14em; color: var(--accent); }
.rgroup { display: flex; align-items: center; gap: 10px; }
.jack { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 52px; position: relative; }
.jack .hole { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle, #050506 0 38%, #8b8e95 40% 52%, #3a3c42 56%); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.jack b { font: 700 9.5px var(--sans); letter-spacing: 0.08em; color: #C9CBD0; white-space: nowrap; }
.jack small { font: 400 10px var(--mono); color: var(--muted); }
.jack .lvl { position: absolute; left: -6px; top: 2px; width: 3px; height: 20px; border-radius: 2px; background: #2c2e33; overflow: hidden; }
.jack .lvl::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--v, 0) * 100%); background: #6EE7A8; }
.jack .led { position: absolute; right: 2px; top: 0; width: 7px; height: 7px; border-radius: 50%; background: #2c2e33; }
.jack .led.on { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.rear .link { font: 700 9px var(--mono); letter-spacing: 0.1em; color: #4a4d55; }
.rear .link.on { color: #6EE7A8; }
.rear select, .rbtn { min-height: 30px; border: 0; border-radius: 7px; background: #26282D; color: var(--fg); font: 600 11.5px var(--sans); padding: 0 9px; cursor: pointer; }
.rbtn.on { background: var(--accent); color: #111214; }
.rear input[type=range] { width: 96px; accent-color: var(--accent); }
.rear [hidden] { display: none; }

/* ---------- power overlay = intro card ---------- */
.power {
  position: absolute; inset: 0; z-index: 10; border-radius: 30px; color: var(--fg); display: grid; place-items: center; padding: 16px;
  background: radial-gradient(70% 80% at 50% 50%, rgba(11, 12, 14, 0.62), rgba(11, 12, 14, 0.9));
  backdrop-filter: blur(4px) saturate(0.7); -webkit-backdrop-filter: blur(4px) saturate(0.7);
  transition: opacity 0.6s ease, visibility 0.6s; font-family: var(--sans);
}
.power.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.intro { max-width: 560px; text-align: center; }
.intro .kicker { margin: 0 0 6px; font: 400 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.intro h1 { margin: 0; font: 800 clamp(30px, 6vw, 56px)/1 var(--sans); letter-spacing: -0.01em; }
.intro h1 em { font-style: normal; color: var(--accent); } .intro h1 span { font-weight: 400; }
.intro .lead { margin: 12px auto 20px; max-width: 46ch; font-size: clamp(13px, 1.7vw, 16px); line-height: 1.5; color: #cfd1d6; }
.cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cta button { min-height: 48px; padding: 0 22px; border-radius: 999px; font: 800 16px var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: 10px; }
.cta .go { border: 0; background: var(--accent); color: #111214; box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 18%, transparent), 0 0 50px color-mix(in srgb, var(--accent) 45%, transparent); animation: pulse 2.2s ease-in-out infinite; }
.cta .go .pwr { font-size: 20px; }
.cta .demo { border: 1.5px solid #4a4d55; background: rgba(20, 21, 24, 0.7); color: var(--fg); }
.cta .demo:hover { border-color: var(--fg); }
.cta button:focus-visible { outline: 3px solid var(--fg); outline-offset: 4px; }
.hints { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin: 20px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.hints b { color: var(--fg); font-weight: 600; }
.intro .foot { margin: 14px 0 0; font: 400 11.5px var(--mono); color: var(--muted); letter-spacing: 0.03em; }
.intro .foot a { color: var(--fg); }
.intro .turn { display: none; margin: 14px 0 0; padding: 8px 14px; border-radius: 8px; background: #26282d; font: 700 13px var(--sans); }
@keyframes pulse { 50% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--accent) 8%, transparent), 0 0 70px color-mix(in srgb, var(--accent) 40%, transparent); } }
@media (prefers-reduced-motion: reduce) { .cta .go { animation: none; } }
/* small: the card covers the stage, not just the (tiny) device */
@media (max-width: 900px), (max-height: 560px) {
  .power { position: fixed; border-radius: 0; }
  .hints { font-size: 12px; margin-top: 14px; }
  .intro .lead { margin: 8px auto 14px; }
}
@media (max-height: 420px) { .intro .kicker, .hints { display: none; } .intro .lead { margin: 6px auto 10px; } }
@media (orientation: portrait) and (max-width: 700px) { .intro .turn { display: inline-block; } }
.stage .turnbar { display: none; }

/* ---------- cheat sheet: the running firmware's controls, right of the device ---------- */
.cheat { position: fixed; right: 12px; top: 64px; bottom: 12px; width: 340px; z-index: 5; overflow-y: auto; scrollbar-width: thin;
  padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(20, 21, 24, 0.94);
  font-size: 12.5px; line-height: 1.45; color: #cfd1d6; }
.cheat[hidden] { display: none; }
.cheat h2 { margin: 0 0 2px; font-size: 17px; font-weight: 800; color: var(--fg); }
.cheat h2 small { font: 400 11px var(--mono); color: var(--muted); margin-left: 6px; }
.cheat h3 { margin: 14px 0 6px; font: 700 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.cheat p { margin: 0 0 6px; } .cheat .none { color: var(--muted); }
.cheat table { width: 100%; border-collapse: collapse; }
.cheat td { padding: 3px 4px; border-bottom: 1px solid #222428; vertical-align: top; }
.cheat td:first-child { white-space: nowrap; width: 1%; }
.cheat .k { display: inline-block; min-width: 46px; padding: 2px 5px; border-radius: 4px; background: #26282d; color: var(--fg);
  font: 700 10px var(--mono); text-align: center; letter-spacing: 0.04em; }
.cheat .k.c { color: #111214; }
.cheat kbd { font: 700 10px var(--mono); padding: 0 5px; border-radius: 4px; background: #26282d; border: 1px solid #3a3c42; }
.cheat .pads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.cheat .pads div { padding: 5px 3px 4px 6px; border-radius: 5px; background: #1c1e22; border-left: 3px solid var(--c, #888);
  font: 700 9.5px var(--mono); color: var(--fg); line-height: 1.25; }
.cheat .pads div small { display: block; font-weight: 400; color: var(--muted); }
.cheat .dim { color: var(--muted); }
@media (max-width: 900px) { .cheat { left: 12px; width: auto; } }

/* ---------- help ---------- */
.help { max-width: min(760px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 16px; background: #141518; color: var(--fg); padding: 26px 28px 22px; }
.help::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(2px); }
/* 0.7.0: a controller profile saved after Setup / Learn */
.ctldlg { max-width: min(460px, calc(100vw - 32px)); }
.ctldlg label { display: grid; gap: 6px; font: 600 12px var(--sans); color: var(--muted); }
.ctldlg input { padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); background: #1c1f24; color: var(--fg); font: 600 14px var(--sans); }
.ctldlg-btns { display: flex; justify-content: flex-end; gap: 8px; margin: 14px 0 6px; }
.ctldlg-btns button { min-height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: #1c1f24; color: var(--fg); font: 600 13px var(--sans); cursor: pointer; }
.ctldlg-btns button.go { background: var(--accent); border-color: var(--accent); color: #111214; }
.help h2 { margin: 0 0 14px; font-size: 22px; font-weight: 800; }
.help h3 { margin: 0 0 8px; font: 700 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.help .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 640px) { .help .cols { grid-template-columns: 1fr; gap: 14px; } }
.help ul { margin: 0 0 14px; padding-left: 18px; font-size: 14px; line-height: 1.55; color: #cfd1d6; }
.help li { margin-bottom: 4px; }
.help kbd { font: 700 11px var(--mono); padding: 1px 6px; border-radius: 4px; background: #26282d; border: 1px solid #3a3c42; margin: 0 1px; }
.help .note { font-size: 12.5px; color: var(--muted); margin: 4px 0 16px; }
.help .close { min-height: 40px; padding: 0 18px; border: 0; border-radius: 9px; background: var(--accent); color: #111214; font: 700 14px var(--sans); cursor: pointer; }

/* the plugin: the firmware's captions on the keys (panel.js printLabels) */
.btn .lab { display: block; font: 800 12px/1.05 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; overflow: hidden;
            text-overflow: ellipsis; max-width: 100%; padding: 0 4px; color: #F4F2EF; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85); pointer-events: none; }
.btn.soft .lab { font-size: 10.5px; letter-spacing: 0.03em; }
.device.boxview .btn.soft .lab { font-size: 12px; }

/* the plugin's page before the plugin is there (window.__VIBE_PLUGIN): no power-on screen, nothing of the emulator */
html.plugin-wait #power, html.plugin-wait .topbar .tools { display: none !important; }

/* ---------- the plugin's Editor view (editor.js): every parameter at once ---------- */
body.editing .stage, body.editing #status, body.editing .cheat, body.editing #cheat { display: none !important; }
.editor { position: fixed; inset: 58px 0 0 0; display: grid; grid-template-columns: 300px 1fr; gap: 18px; padding: 8px 18px 18px; overflow: hidden; }
.editor[hidden] { display: none; }
.ed-side { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.ed-disp { width: 300px; height: 200px; border-radius: 10px; border: 1px solid var(--line); image-rendering: auto; background: #000; }
.ed-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-tab { flex: 1 0 44px; padding: 9px 0; border-radius: 8px; border: 1px solid var(--line); background: #17191d; color: var(--fg); font: 800 15px var(--sans); cursor: pointer; }
.ed-tab.on { background: var(--ed-acc, #FF60BE); border-color: var(--ed-acc, #FF60BE); color: #111; }
.ed-note { margin: 0; font: 400 12px/1.45 var(--sans); color: var(--muted); }
.ed-main { overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; align-content: start; padding-right: 4px; }
.ed-card { background: #15171b; border: 1px solid var(--line); border-top: 3px solid var(--ed-acc, #FF60BE); border-radius: 12px; padding: 10px 12px 12px; }
.ed-head { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 14px; padding: 2px 2px 4px; border-bottom: 2px solid var(--ed-acc, #FF60BE); }
.ed-head h2 { margin: 0; font: 900 28px var(--sans); letter-spacing: .04em; color: var(--ed-acc, #FF60BE); }
.ed-head span { font: 600 12px var(--mono); color: var(--muted); }
.ed-card h3 { margin: 0 0 8px; font: 800 12px var(--mono); letter-spacing: .08em; color: var(--ed-acc, #FF60BE); }
.ed-ctrls { display: flex; flex-wrap: wrap; gap: 6px 4px; }
.ed-ctl { width: 68px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.ed-ctl:has(.ed-seg), .ed-ctl:has(select) { width: 100%; align-items: stretch; text-align: left; }
.ed-knob { width: 52px; height: 52px; cursor: ns-resize; touch-action: none; }
.ed-knob .trk { fill: none; stroke: #2a2d33; stroke-width: 6; stroke-linecap: round; }
.ed-knob .val { fill: none; stroke: #40E0D0; stroke-width: 6; stroke-linecap: round; }
.ed-knob .ptr { stroke: #f2f2f2; stroke-width: 3; stroke-linecap: round; }
.ed-knob:hover .val { stroke: var(--ed-acc, #FF60BE); }
.ed-lab { font: 600 10px var(--sans); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; line-height: 1.15; }
.ed-val { font: 700 12px var(--mono); color: var(--fg); }
.ed-seg { display: flex; gap: 3px; margin-top: 3px; }
.ed-seg button { flex: 1; padding: 5px 2px; border-radius: 6px; border: 1px solid var(--line); background: #1c1f24; color: var(--fg); font: 700 10px var(--mono); cursor: pointer; }
.ed-seg button.on { background: #40E0D0; border-color: #40E0D0; color: #0d1012; }
.ed-ctl select { margin-top: 3px; padding: 5px; border-radius: 6px; background: #1c1f24; color: var(--fg); border: 1px solid var(--line); font: 700 11px var(--mono); }
.ed-nav { display: flex; gap: 3px; align-items: stretch; }   /* (31.10.) a menu with ◀ ▶ */
.ed-nav select { flex: 1; min-width: 0; }
.ed-navb { margin-top: 3px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line); background: #1c1f24; color: var(--fg); font: 700 10px var(--mono); cursor: pointer; }
.ed-navb:hover { border-color: var(--ed-acc, #FF60BE); }
.ed-curve.ed-draw { cursor: crosshair; touch-action: none; }   /* (SDK 15) a curve to draw */
.ed-page { width: 100%; height: 100%; min-height: 0; border: 0; border-radius: 10px; background: var(--bg); }   /* (SDK 16) the firmware's own page */
.ed-pagesw { display: flex; gap: 3px; }
.editor [hidden] { display: none !important; }   /* (the cards or the page – one of them) */
.ed-pagesw button { flex: 1; padding: 6px 4px; border-radius: 6px; border: 1px solid var(--line); background: #1c1f24; color: var(--fg); font: 700 10px var(--mono); cursor: pointer; letter-spacing: .06em; }
.ed-pagesw button.on { background: var(--ed-acc, #FF60BE); border-color: var(--ed-acc, #FF60BE); color: #0d1012; }
.ed-btns { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.ed-btn { padding: 5px 10px; border-radius: 6px; border: 1px solid var(--ed-acc, #FF60BE); background: #1c1f24; color: var(--fg); font: 700 10px var(--mono); cursor: pointer; }
.ed-btn:active { background: var(--ed-acc, #FF60BE); color: #0d1012; }
/* SDK 9 (28.10.): the Editor as the firmware describes it – a 12-column grid, notes, curves, sliders, toggles, XY pads */
.ed-main.ed-grid12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.ed-cnote { margin: -4px 0 8px; font: 400 11px/1.4 var(--sans); color: var(--muted); }
.ed-curve { width: 100%; height: 44px; display: block; border-radius: 6px; margin: 0 0 8px; background: #1c1f24; }
.ed-ctl-sl { width: 100%; align-items: stretch; text-align: left; }
.ed-slrow { display: flex; justify-content: space-between; align-items: baseline; }
.ed-slider { width: 100%; margin: 4px 0 2px; accent-color: var(--ed-acc, #FF60BE); cursor: ew-resize; }
.ed-tog { width: 100%; padding: 7px 4px; border-radius: 6px; border: 1px solid var(--line); background: #1c1f24; color: var(--fg); font: 700 10px var(--mono); cursor: pointer; text-transform: uppercase; }
.ed-tog.on { background: var(--ed-acc, #FF60BE); border-color: var(--ed-acc, #FF60BE); color: #0d1012; }
.ed-ctl:has(.ed-tog) { width: 100%; align-items: stretch; }
.ed-ctl-xy { width: 100%; align-items: stretch; }
.ed-xy { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 150px; border-radius: 8px; background: #1c1f24 radial-gradient(circle at center, #262a31 0, #1c1f24 70%); border: 1px solid var(--line); cursor: crosshair; touch-action: none; overflow: hidden; }
.ed-xy::before, .ed-xy::after { content: ''; position: absolute; background: #2a2d33; }
.ed-xy::before { left: 50%; top: 0; width: 1px; height: 100%; } .ed-xy::after { top: 50%; left: 0; height: 1px; width: 100%; }
.ed-dot { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--ed-acc, #FF60BE); box-shadow: 0 0 0 3px rgba(255,255,255,.12); pointer-events: none; }
@media (max-width: 760px) { .editor { grid-template-columns: 1fr; overflow-y: auto; } .ed-disp { width: 100%; height: auto; aspect-ratio: 3 / 2; } }

/* the View dropdown (27.10.): Editor · Full · Rack · Display */
.viewsel { display: inline-flex; align-items: center; gap: 4px; font: 600 11px var(--sans); color: var(--muted); padding: 0 2px 0 4px; flex: none; }
.tools .viewsel select { min-height: 28px; padding: 0 6px; font-size: 11.5px; max-width: 92px; }   /* (31.10.: right after the firmware, smaller) */
/* the plugin: View on the left, right after the name (31.10.) */
body.plugin .topbar { justify-content: flex-start; } body.plugin .topbar .tools { margin-left: auto; }
body.plugin .topbar > .viewsel { padding: 4px 4px 4px 9px; border-radius: 10px; background: rgba(20, 21, 24, 0.8); border: 1px solid var(--line); }
body.plugin .topbar > .viewsel select { min-height: 26px; padding: 0 6px; border-radius: 7px; background: #1c1f24; color: var(--fg); border: 1px solid var(--line); font: 600 11.5px var(--sans); max-width: 92px; }
@media (max-width: 1100px) { body.plugin .brand small.claim { display: none; } }
/* the plugin is an instrument, not a document: nothing to select (⌘A in the DAW's window blued the whole page – Mac, 31.10.)
   – but text in a field; the tools scroll without a bar (WebKit draws one); the controller's name kept short */
body.plugin, body.plugin * { -webkit-user-select: none; user-select: none; }
body.plugin input, body.plugin textarea { -webkit-user-select: text; user-select: text; }
.tools::-webkit-scrollbar { display: none; }
#ctlsel { max-width: 170px; text-overflow: ellipsis; }
/* the plugin's status line: readable (it says what Learn hears, what was loaded …) – and in the Editor too, at the bottom */
body.plugin .status { font: 600 13px var(--sans); color: #C9CCD3; letter-spacing: 0.01em; }
body.plugin.editing #status { display: block !important; position: fixed; left: 12px; right: 12px; bottom: 6px; z-index: 20; margin: 0;
  padding: 5px 10px; border-radius: 8px; background: rgba(20, 21, 24, 0.92); border: 1px solid var(--line); pointer-events: none; }
body.plugin.editing #status:empty { display: none !important; }
/* 0.7.0 – the controller in the Editor: the focused card (its parameters on the controller's encoders, each control
   marked 1 2 3 4 A B DATA), a dot on a learned control, the right click's menu */
.ed-card.ed-focus { box-shadow: 0 0 0 2px var(--ed-acc, #FF60BE), 0 0 22px rgba(255, 96, 190, 0.12); position: relative; }
.ed-ctl { position: relative; }
.ed-ctl[data-enc]::before { content: attr(data-enc); position: absolute; top: -2px; left: 2px; padding: 0 4px; border-radius: 4px; background: var(--ed-acc, #FF60BE); color: #111214; font: 800 9px var(--mono); line-height: 13px; }
.ed-ctl.ed-learned::after { content: ''; position: absolute; top: 2px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: #5FE3A1; box-shadow: 0 0 6px #5FE3A1; }
.ed-learnmenu { position: fixed; z-index: 60; display: grid; min-width: 220px; padding: 5px; border-radius: 10px; background: #1c1f24; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.ed-learnmenu button { text-align: left; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--fg); font: 600 12.5px var(--sans); cursor: pointer; }
.ed-learnmenu button:hover { background: #2a2d33; }
