/* Atomic Labs - Words-to-Synth. Prefix: ws-  (dark grey, lime / cyan / violet; mobile-first) */
.ws-app {
  --ws-bg: #15181c; --ws-panel: #1d2126; --ws-panel2: #242a31; --ws-line: #313840; --ws-line2: #3d4650;
  --ws-text: #e8ecf0; --ws-muted: #a3acb6; --ws-dim: #77818b;
  --ws-lime: #b8f03c; --ws-cyan: #3cf0c8; --ws-violet: #a07cf5; --ws-warn: #ffb23f;
  --ws-grad: linear-gradient(90deg, var(--ws-lime), var(--ws-cyan) 50%, var(--ws-violet));
  --ws-r: 14px;
  color: var(--ws-text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  max-width: 1180px; margin: 0 auto; padding: 16px 12px 40px; box-sizing: border-box;
}
.ws-app *, .ws-app *::before, .ws-app *::after { box-sizing: border-box; }
.ws-app :focus-visible { outline: 2px solid var(--ws-cyan); outline-offset: 2px; }

.ws-head { margin: 4px 0 14px; }
.ws-title { margin: 0; font-size: clamp(28px, 7vw, 46px); line-height: 1.05; letter-spacing: -0.02em;
  background: var(--ws-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ws-sub { margin: 6px 0 0; color: var(--ws-muted); max-width: 60ch; }

.ws-card { background: linear-gradient(180deg, var(--ws-panel), #1a1e23); border: 1px solid var(--ws-line); border-radius: var(--ws-r);
  padding: 14px; margin-bottom: 14px; box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px rgba(0,0,0,.25); }
.ws-h2 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--ws-lime); font-weight: 700; }

/* prompt */
.ws-label { display: block; font-size: 13px; color: var(--ws-muted); margin-bottom: 6px; }
.ws-text { width: 100%; min-height: 76px; resize: vertical; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--ws-line2);
  background: #111417; color: var(--ws-text); font: inherit; font-size: 16px; }
.ws-text:focus { border-color: var(--ws-lime); box-shadow: 0 0 0 3px rgba(184,240,60,.15); outline: none; }
.ws-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.ws-btn { appearance: none; border: 1px solid var(--ws-line2); background: var(--ws-panel2); color: var(--ws-text); font: inherit; font-weight: 600;
  padding: 9px 14px; border-radius: 10px; cursor: pointer; min-height: 40px; transition: border-color .15s, background .15s, transform .05s; }
.ws-btn:hover { border-color: var(--ws-cyan); }
.ws-btn:active { transform: translateY(1px); }
.ws-btn[disabled] { opacity: .5; cursor: default; }
.ws-btn-go { background: linear-gradient(180deg, #c9fb57, #9fd627); color: #18200a; border-color: #c9fb57; box-shadow: 0 0 18px rgba(184,240,60,.25); }
.ws-btn-go:hover { border-color: #e4ff9c; }
.ws-btn-alt { border-color: rgba(160,124,245,.6); }
.ws-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ws-chip { appearance: none; font: inherit; font-size: 13px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--ws-line2);
  background: #1a1e23; color: var(--ws-muted); cursor: pointer; min-height: 32px; }
.ws-chip:hover { color: var(--ws-text); border-color: var(--ws-lime); }
.ws-chip-genre { border-color: rgba(160,124,245,.45); }
.ws-heard { margin-top: 10px; font-size: 13px; color: var(--ws-dim); min-height: 20px; }
.ws-heard b { color: var(--ws-cyan); font-weight: 600; }
.ws-heard i { color: var(--ws-dim); }

/* ideas */
.ws-ideas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ws-idea { appearance: none; text-align: left; font: inherit; color: var(--ws-text); padding: 10px; border-radius: 12px; cursor: pointer;
  background: #1a1e23; border: 1px solid var(--ws-line); min-height: 76px; }
.ws-idea:hover { border-color: var(--ws-cyan); }
.ws-idea[aria-pressed="true"] { border-color: var(--ws-lime); box-shadow: 0 0 0 1px var(--ws-lime) inset, 0 0 16px rgba(184,240,60,.15); }
.ws-idea-n { font-size: 12px; color: var(--ws-lime); font-weight: 700; letter-spacing: .08em; }
.ws-idea-t { display: block; font-size: 13px; color: var(--ws-muted); margin-top: 2px; }

/* keyboard */
.ws-kbbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.ws-oct { min-width: 44px; }
.ws-octv { min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; color: var(--ws-cyan); font-weight: 700; }
.ws-kb { position: relative; height: 150px; display: flex; user-select: none; -webkit-user-select: none; touch-action: none;
  border-radius: 10px; overflow: hidden; border: 1px solid var(--ws-line2); background: #0f1214; }
.ws-key { position: relative; flex: 1 1 0; border: 0; padding: 0; margin: 0; cursor: pointer; font: inherit; }
.ws-key-w { background: linear-gradient(180deg, #d9dee3, #f2f5f7 80%, #c9cfd5); border-right: 1px solid #8a939c; color: #4a535c; }
.ws-key-b { position: absolute; top: 0; height: 60%; z-index: 2; background: linear-gradient(180deg, #2b3138, #3a424b 85%, #23282e);
  border: 1px solid #14171a; border-radius: 0 0 5px 5px; color: #8e98a2; }
.ws-key span { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font-size: 10px; pointer-events: none; }
.ws-key-w.ws-on { background: linear-gradient(180deg, #d7ff8a, var(--ws-lime)); box-shadow: 0 0 18px rgba(184,240,60,.5) inset; }
.ws-key-b.ws-on { background: linear-gradient(180deg, var(--ws-violet), #7a58d8); }
.ws-meter { flex: 1 1 140px; min-width: 120px; height: 10px; border-radius: 6px; background: #111417; border: 1px solid var(--ws-line); overflow: hidden; position: relative; }
.ws-meter-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ws-grad); transition: width .05s linear; }
.ws-meter-txt { font-size: 12px; color: var(--ws-dim); font-variant-numeric: tabular-nums; min-width: 92px; }
.ws-hint { font-size: 12px; color: var(--ws-dim); margin: 8px 0 0; }
.ws-hint kbd { font: 11px ui-monospace, Consolas, monospace; background: #262c33; border: 1px solid var(--ws-line2); border-radius: 4px; padding: 0 4px; color: var(--ws-muted); }

/* patch panel */
.ws-panel { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ws-mod { background: #191d22; border: 1px solid var(--ws-line); border-radius: 12px; padding: 10px; }
.ws-mod-h { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ws-cyan); margin: 0 0 8px; }
.ws-ctrls { display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: flex-start; }
.ws-knob { width: 70px; display: flex; flex-direction: column; align-items: center; cursor: ns-resize; touch-action: none; border-radius: 10px; padding: 2px 0; }
.ws-knob svg { width: 50px; height: 50px; display: block; }
.ws-knob-track { fill: none; stroke: #2e353d; stroke-width: 5; stroke-linecap: round; }
.ws-knob-val { fill: none; stroke: url(#ws-grad); stroke-width: 5; stroke-linecap: round; filter: drop-shadow(0 0 3px rgba(184,240,60,.45)); }
.ws-knob-cap { fill: #2a3037; stroke: #3d4650; }
.ws-knob-dot { stroke: var(--ws-lime); stroke-width: 2.5; stroke-linecap: round; }
.ws-knob-l { font-size: 11px; color: var(--ws-muted); margin-top: 1px; text-align: center; line-height: 1.2; }
.ws-knob-v { font-size: 11px; color: var(--ws-text); font-variant-numeric: tabular-nums; text-align: center; }
.ws-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--ws-line2); border-radius: 9px; overflow: hidden; margin: 0 6px 6px 0; }
.ws-seg-l { width: 100%; font-size: 11px; color: var(--ws-muted); margin: 0 0 3px; }
.ws-segwrap { display: flex; flex-direction: column; }
.ws-seg button { appearance: none; border: 0; border-right: 1px solid var(--ws-line2); background: #1f2429; color: var(--ws-muted); font: inherit; font-size: 12px;
  padding: 6px 8px; cursor: pointer; min-height: 32px; }
.ws-seg button:last-child { border-right: 0; }
.ws-seg button[aria-checked="true"] { background: linear-gradient(180deg, #2f3a1c, #263015); color: var(--ws-lime); }
.ws-toggle[aria-pressed="true"] { color: var(--ws-lime); border-color: var(--ws-lime); }

/* export */
.ws-status { font-size: 13px; color: var(--ws-muted); margin-top: 8px; min-height: 20px; }
.ws-status.ws-ok { color: var(--ws-lime); }
.ws-status.ws-err { color: var(--ws-warn); }
.ws-note { font-size: 12px; color: var(--ws-dim); margin: 10px 0 0; }

@media (min-width: 640px) {
  .ws-app { padding: 24px 20px 48px; }
  .ws-ideas { grid-template-columns: repeat(4, 1fr); }
  .ws-panel { grid-template-columns: repeat(2, 1fr); }
  .ws-kb { height: 170px; }
}
@media (min-width: 1000px) {
  .ws-panel { grid-template-columns: repeat(3, 1fr); }
  .ws-top { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; }
  .ws-top > .ws-card { margin-bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) { .ws-app * { transition: none !important; } }
