/* studio.css — the three.js step-sequencer surface (cosmetic). */
.st-root { min-height: 100vh; display: flex; flex-direction: column; }

/* ---- Transport ---- */
.tp {
  display: flex; align-items: center; gap: var(--space-5);
  height: var(--nav-h); padding: 0 var(--space-5);
  background: var(--nav-bg); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10;
}
.tp-brand { display: flex; align-items: baseline; gap: 8px; }
.tp-spiral { width: 22px; height: 22px; color: var(--accent); align-self: center; }
.tp-title { font-family: var(--font-mono); font-weight: 600; letter-spacing: 3px; color: var(--accent); font-size: 16px; }
.tp-sub { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.tp-controls { display: flex; align-items: center; gap: var(--space-4); margin-left: var(--space-4); }
.tp-play, .tp-btn {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--bg-elev); border: 1px solid var(--border-soft);
  color: var(--text); font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--dur-fast) var(--ease);
}
.tp-play:hover, .tp-btn:hover { border-color: var(--accent); color: var(--accent); }
.tp-play.on { background: var(--accent); color: #000; border-color: var(--accent); box-shadow: var(--glow-cyan); }
.tp-field { display: flex; align-items: center; gap: 8px; }
.tp-lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); }
.tp-stepper { display: flex; align-items: center; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); overflow: hidden; }
.tp-stepper button { width: 30px; height: 36px; background: var(--bg-elev); border: none; color: var(--text); font-size: 16px; cursor: pointer; }
.tp-stepper button:hover { color: var(--accent); }
.tp-val { font-family: var(--font-mono); font-size: 14px; min-width: 38px; text-align: center; color: var(--accent); }
.tp-val.sm { min-width: 34px; font-size: 12px; color: var(--text-dim); }
.tp-swing input { width: 90px; accent-color: var(--accent2); }
.tp-meta { margin-left: auto; }

/* ---- Body layout ---- */
.st-body { flex: 1; display: flex; gap: var(--space-5); padding: var(--space-6) var(--space-6); align-items: flex-start; }
.st-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-5); }

/* ---- Scope ---- */
.scope { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); position: relative; }
.scope-label { position: absolute; top: 10px; left: 14px; z-index: 1; }
.scope-canvas { width: 100%; height: 150px; display: block; }

/* ---- Sequencer ---- */
.sq { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); display: flex; flex-direction: column; gap: 7px; }
.sq-lane { display: flex; align-items: center; gap: var(--space-3); }
.sq-name { width: 92px; flex: none; font-family: var(--font-mono); font-size: 12px; color: var(--text); display: flex; align-items: center; gap: 7px; }
.sq-glyph { font-size: 14px; }
.sq-cells { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; flex: 1; }
.sq-cell {
  height: 28px; border-radius: 4px; position: relative;
  background: linear-gradient(180deg, #202329, #191b1f);
  border: 1px solid #25272d;
  cursor: pointer; padding: 0; transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease);
}
/* empty-cell legibility: clearer hairline, downbeats a touch lighter + accent tick */
.sq-cell.beat { background: linear-gradient(180deg, #262a31, #1d2026); border-left: 2px solid rgba(0,255,255,.22); }
.sq-cell:hover { border-color: var(--border-soft); filter: brightness(1.15); }

/* ACTIVE — inner bevel gradient (light top → saturated → dark base) + glow-bleed */
.sq-cell.on { border-color: transparent; }
.sq-cell.on.cell-cyan {
  background: linear-gradient(180deg, #7affff 0%, #00ffff 42%, #00b3b3 100%);
  box-shadow: 0 0 13px rgba(0,255,255,.5), 0 0 2px rgba(0,255,255,.9),
    inset 0 1px 0 rgba(255,255,255,.65), inset 0 -4px 6px rgba(0,70,70,.55);
}
.sq-cell.on.cell-magenta {
  background: linear-gradient(180deg, #ff7fcf 0%, #ff00aa 42%, #c00084 100%);
  box-shadow: 0 0 13px rgba(255,0,170,.46), 0 0 2px rgba(255,0,170,.9),
    inset 0 1px 0 rgba(255,255,255,.55), inset 0 -4px 6px rgba(110,0,65,.55);
}
.sq-cell.on.cell-orange {
  background: linear-gradient(180deg, #ffbd7a 0%, #ff7a00 42%, #c25e00 100%);
  box-shadow: 0 0 13px rgba(255,122,0,.42), 0 0 2px rgba(255,122,0,.9),
    inset 0 1px 0 rgba(255,255,255,.5), inset 0 -4px 6px rgba(110,52,0,.55);
}
/* velocity shading — loud = brighter + bigger bleed; ghost = recessed */
.sq-cell.on.loud { filter: brightness(1.18) saturate(1.05); }
.sq-cell.on.ghost { filter: brightness(.62) saturate(.85); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 -3px 5px rgba(0,0,0,.4); }
/* playhead — bright inset ring, doesn't clobber the glow */
.sq-cell.head { outline: 2px solid rgba(255,255,255,.92); outline-offset: -2px; z-index: 1; }
.sq-cell.on.head { filter: brightness(1.3); }
.sq-ruler { display: flex; align-items: center; gap: var(--space-3); margin-top: 2px; }
.sq-tick { text-align: center; font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }
.sq-tick.head { color: var(--accent); }
.st-hint { font-size: 12px; color: var(--text-dim); padding: 0 4px; }

/* ---- Mixer ---- */
.mx { width: 230px; flex: none; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); }
.mx-head { margin-bottom: var(--space-4); }
.mx-strips { display: flex; gap: 6px; justify-content: space-between; }
.mx-ch { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.mx-ch.muted { opacity: 0.45; }
.mx-name { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); height: 16px; }
.mx-master .mx-name { color: var(--accent); }
.mx-meter { width: 12px; height: 78px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-full); display: flex; align-items: flex-end; overflow: hidden; }
.mx-fill { width: 100%; transition: height var(--dur-base) var(--ease); border-radius: var(--radius-full); }
.fill-cyan { background: var(--accent); }
.fill-magenta { background: var(--accent2); }
.fill-orange { background: var(--accent3); }
.mx-fader { writing-mode: vertical-lr; direction: rtl; width: 22px; height: 70px; accent-color: var(--accent); }
.mx-mute { width: 26px; height: 26px; border-radius: var(--radius-sm); background: var(--bg-elev); border: 1px solid var(--border-soft); color: var(--text-dim); font-family: var(--font-mono); font-size: 12px; cursor: pointer; }
.mx-mute.on { background: var(--accent2); color: #000; border-color: var(--accent2); }

@media (max-width: 820px) {
  .st-body { flex-direction: column; }
  .mx { width: 100%; }
  .sq-name { width: 64px; font-size: 11px; }
  .mx-strips { justify-content: space-around; }
}
