:root {
  --bg: #060a10; --bg-panel: #0a1018; --line: #1c2a3a; --fg: #e4eef6; --dim: #6d8296; --dimmer: #3d4f61;
  --accent: #4fb4ff; --accent2: #ff8a3d; --cell: #0d1520;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg);
  font-family: "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, "Courier New", monospace; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; display: flex; justify-content: center; padding: 32px 16px 72px; overflow-x: hidden;
  padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
body::before { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(ellipse at 12% 8%, rgba(20, 60, 100, .35), transparent 55%), radial-gradient(ellipse at 88% 92%, rgba(80, 40, 10, .18), transparent 55%); }
main { width: 100%; max-width: 820px; min-width: 0; }
.labs-link { position: fixed; top: 10px; left: 14px; color: var(--dim); text-decoration: none; font-size: 12px; z-index: 5; }
.labs-link:hover { color: var(--accent); }
.head { text-align: center; }
.heron { color: var(--accent); font-size: 12px; line-height: 1.15; text-align: left; display: table; margin: 0 auto 6px;
  text-shadow: 0 0 12px rgba(79, 180, 255, .4); transition: text-shadow .08s, color .08s; max-width: 100%; overflow: hidden; }
.heron.hit { color: var(--accent2); text-shadow: 0 0 18px rgba(255, 138, 61, .65); }
.title { font-size: 28px; letter-spacing: 2px; margin: 0; }
.blink { animation: blink 1.1s steps(1) infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }
.tagline { color: var(--dim); margin: 6px 0 12px; font-size: 13px; }
.scope { display: block; width: 100%; max-width: 420px; height: 36px; margin: 8px auto 22px; }
.start { text-align: center; margin: 40px 0; }
.start-btn { background: var(--accent); color: #001424; border: none; font-family: inherit; font-weight: 700; font-size: 16px; padding: 16px 26px;
  border-radius: 6px; cursor: pointer; letter-spacing: .5px; box-shadow: 0 0 24px rgba(79, 180, 255, .35); }
.start-btn:hover { filter: brightness(1.08); } .start-btn:disabled { opacity: .6; }
.hint { color: var(--dim); font-size: 12px; margin: 12px 0 0; } #startErr { color: var(--accent2); }
.panel { border: 1px solid var(--line); background: var(--bg-panel); border-radius: 10px; padding: 18px; min-width: 0; }
.row { margin-bottom: 22px; min-width: 0; } .row:last-child { margin-bottom: 0; }
.dim { color: var(--dim); }
.small-note { font-size: 11.5px; margin: 6px 0 4px; line-height: 1.5; }
h3.sub { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--accent2); margin: 0 0 10px; font-weight: 700; }
h3.sub .dim { text-transform: none; letter-spacing: 0; font-weight: 400; }
.btn { background: var(--cell); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; font-family: inherit; font-size: 13px; font-weight: 700;
  padding: 10px 14px; cursor: pointer; letter-spacing: .3px; touch-action: manipulation; min-height: 40px; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn.small { padding: 6px 10px; font-size: 12px; min-height: 34px; }
.btn.big { font-size: 15px; padding: 14px 18px; min-width: 150px; }
.btn.on { background: var(--accent); border-color: var(--accent); color: #001424; }
.btn.rec.on { background: #ff0033; border-color: #ff0033; color: #fff; animation: pulse .9s ease-in-out infinite; }
.btn.rec.dub { background: var(--accent2); border-color: var(--accent2); color: #200a02; animation: pulse .9s ease-in-out infinite; }
.btn.danger:hover { border-color: #ff0033; color: #ff0033; }
.btn:disabled { opacity: .4; cursor: default; }
@keyframes pulse { 50% { filter: brightness(1.5); } }
select, input[type="number"] { background: var(--cell); color: var(--fg); border: 1px solid var(--line); border-radius: 5px; font-family: inherit;
  font-size: 13px; padding: 7px 8px; min-width: 0; max-width: 100%; min-height: 34px; }
select:focus, input:focus { outline: none; border-color: var(--accent); }
input[type="number"] { width: 72px; }
label.inline { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; min-width: 0; }
label.grow, .grow { flex: 1 1 200px; } label.grow select { flex: 1; width: 100%; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; background: var(--line); border-radius: 2px; outline: none; margin: 12px 0; touch-action: pan-y; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 0 8px rgba(79, 180, 255, .55); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; border: none; background: var(--accent); cursor: pointer; }
.knob-group { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.knob-group label, .field { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--dim); }
.knob-group .val { color: var(--fg); text-transform: none; letter-spacing: 0; margin-left: 4px; }
.knobs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 4px 20px; }
.field { display: flex; flex-direction: column; gap: 4px; } .field select { text-transform: none; width: 100%; }
.file-btn { display: inline-flex; align-items: center; } .file-btn input { display: none; }
.ed-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 18px; align-items: end; margin-top: 8px; }
.quick { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.oct-group { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }
.oct-btn { background: var(--cell); color: var(--fg); border: 1px solid var(--line); border-radius: 5px; width: 34px; height: 34px; font-family: inherit; font-size: 16px; cursor: pointer; }
.arts { display: flex; flex-wrap: wrap; gap: 8px; }
.art { background: var(--cell); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; font-family: inherit; font-size: 13px; font-weight: 700;
  padding: 10px 14px; cursor: pointer; min-height: 44px; touch-action: manipulation; }
.art:hover { border-color: var(--accent); } .art.on { background: var(--accent); border-color: var(--accent); color: #001424; }
.surface-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 8px; }
.fretboard { display: block; width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #0b1017; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; }
.pads { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 8px; }
.pad { background: linear-gradient(#12233a, #0c1725); color: var(--fg); border: 1px solid #23415f; border-radius: 8px; font-family: inherit; font-weight: 700;
  font-size: 14px; min-height: 64px; cursor: pointer; touch-action: manipulation; }
.pad:active { background: var(--accent); color: #001424; }
.loop-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.loopbar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; } .loopbar div { height: 100%; width: 0; background: var(--accent2); }
.ex-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.status { min-height: 1.4em; font-size: 12px; color: var(--accent2); margin: 10px 0 0; line-height: 1.5; }
.foot { text-align: center; color: var(--dimmer); font-size: 11px; margin-top: 28px; }
@media (max-width: 520px) { .title { font-size: 22px; } .heron { font-size: 9px; } .btn.big { min-width: 0; flex: 1 1 100%; } }
