/* The studio + library + settings screens */
.studio-scroll,.lib-scroll{height:100%;overflow-y:auto;padding:18px 16px 40px}
.studio-head{margin-bottom:16px}

.card{
  background:var(--ink-2);border:1px solid var(--line);border-radius:var(--radius);
  padding:16px;margin-bottom:14px;
}
.card-final{border-color:var(--gold);box-shadow:0 0 0 1px rgba(255,194,68,.12)}
.step{
  width:26px;height:26px;flex:0 0 26px;border-radius:50%;
  background:linear-gradient(135deg,var(--gold),var(--gold-2));color:#1a1206;
  display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:800;
}

.wave{width:100%;display:block;margin-top:12px;border-radius:10px;background:var(--ink-3);cursor:crosshair}
.beat-name{font-size:13px;color:var(--gold);margin-top:8px;min-height:18px;word-break:break-all}

/* ---- step 2: find your rhythm (map the man, then bend the beat) ---- */
.cadence-wrap{margin:8px 0 4px}
.cadence-wrap .btn{width:100%}
.cadence-live{display:flex;align-items:center;gap:12px;margin-top:10px}
.cadence-live .meter{flex:1;margin-top:0}
.cadence-time{font-size:18px;font-weight:800;font-variant-numeric:tabular-nums;min-width:52px;text-align:right}

.cadence-result{margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.cadence-numbers{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px;margin-bottom:14px}
.cnum{background:var(--ink-3);border:1px solid var(--line);border-radius:12px;padding:11px 13px}
.cnum b{display:block;font-size:23px;color:var(--gold);line-height:1.15;font-variant-numeric:tabular-nums}
.cnum span{font-size:12px;color:var(--text-dim);font-weight:600}
.cnum.hero{border-color:var(--gold);background:rgba(255,194,68,.07)}
.cnum.hero b{font-size:30px}

.cadence-view{
  background:var(--ink-3);border:1px solid var(--line);border-radius:12px;
  padding:12px 14px;margin-bottom:10px;overflow-x:auto;
}
.cad-row{display:flex;align-items:center;gap:5px;margin-bottom:7px;white-space:nowrap}
.cad-row:last-child{margin-bottom:0}
.cad-row i{width:13px;height:13px;border-radius:3px;background:var(--gold);flex:0 0 13px;display:block}
.cad-row u{width:11px;height:11px;border-radius:50%;border:1.5px solid var(--text-dim);flex:0 0 11px;display:block}
.cad-row em{font-style:normal;font-size:11.5px;color:var(--text-dim);margin-left:8px;font-variant-numeric:tabular-nums}
.hand-set{margin:16px 0 4px;font-weight:700;color:var(--text-dim)}

/* record button */
.rec-wrap{display:flex;align-items:center;gap:18px;margin:6px 0 4px}
.rec-btn{
  width:74px;height:74px;flex:0 0 74px;border-radius:50%;border:4px solid var(--line);
  background:var(--ink-3);display:flex;align-items:center;justify-content:center;cursor:pointer;
}
.rec-dot{width:34px;height:34px;border-radius:50%;background:var(--hot);transition:all .2s}
.rec-btn.armed{border-color:var(--gold);animation:pulse 1s infinite}
.rec-btn.live{border-color:var(--hot)}
.rec-btn.live .rec-dot{border-radius:6px;width:28px;height:28px}
@keyframes pulse{50%{box-shadow:0 0 0 12px rgba(255,194,68,.12)}}
.rec-meta{flex:1;min-width:0}
.rec-time{font-size:26px;font-weight:800;font-variant-numeric:tabular-nums}
.rec-state{font-size:13px;color:var(--text-dim);margin-top:4px}
.meter{height:8px;background:var(--ink-3);border-radius:99px;overflow:hidden;margin-top:6px}
.meter-fill{height:100%;width:0%;background:linear-gradient(90deg,var(--ok),var(--gold),var(--hot));transition:width .05s}
.take-row{margin-top:10px}

/* presets */
.preset-row{display:flex;gap:8px;overflow-x:auto;padding:4px 0 10px;scrollbar-width:none}
.preset-row::-webkit-scrollbar{display:none}
.chip{
  white-space:nowrap;padding:9px 15px;border-radius:99px;border:1px solid var(--line);
  background:var(--ink-3);color:var(--text);font-size:14px;font-weight:600;cursor:pointer;
}
.chip.on{background:linear-gradient(135deg,var(--gold),var(--gold-2));color:#1a1206;border-color:transparent}

/* fx grid */
.fx-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px 16px;margin-top:6px}
.fx{background:var(--ink-3);border:1px solid var(--line);border-radius:12px;padding:10px 12px}
.fx-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
.fx-head label{font-size:13.5px;font-weight:700}
.fx-head input[type=checkbox]{width:18px;height:18px;accent-color:var(--gold)}
.fx .slider{margin:8px 0 0}
.fx.off{opacity:.45}

.publish{border-top:1px solid var(--line);margin-top:16px;padding-top:16px;display:flex;flex-direction:column;gap:12px}
.swatches{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.swatch{width:34px;height:34px;border-radius:9px;border:2px solid transparent;cursor:pointer}
.swatch.on{border-color:#fff}

/* library */
.lib-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.lib-item{background:var(--ink-2);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.lib-art{aspect-ratio:9/12;background-size:cover;background-position:center;position:relative}
.lib-art b{position:absolute;left:8px;bottom:8px;right:8px;font-size:14px;text-shadow:0 2px 8px #000}
.lib-info{padding:9px 10px;font-size:12px;color:var(--text-dim);display:flex;justify-content:space-between;gap:6px}
.lib-actions{display:flex;border-top:1px solid var(--line)}
.lib-actions button{flex:1;background:none;border:0;border-right:1px solid var(--line);
  color:var(--text-dim);padding:9px 0;font-size:16px;cursor:pointer}
.lib-actions button:last-child{border-right:0}
.lib-item.archived{opacity:.45}

/* settings text editor */
.text-editor{display:flex;flex-direction:column;gap:10px;max-height:340px;overflow:auto;margin:10px 0}
.te-row{display:flex;flex-direction:column;gap:4px}
.te-row label{font-size:11.5px;color:var(--text-dim);font-family:monospace}
.plugin-list{display:flex;flex-direction:column;gap:8px;margin:8px 0}
.plugin{display:flex;justify-content:space-between;align-items:center;gap:10px;
  background:var(--ink-3);border:1px solid var(--line);border-radius:10px;padding:10px 12px;font-size:14px}
.plugin small{display:block;color:var(--text-dim);font-size:12px}

/* the house: a mic check before the red button */
.mic-check { margin: 0 0 12px; }

/* the house: the red button never leaves the screen */
.float-rec { position: fixed; right: 18px; bottom: 84px; z-index: 50; display: flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border: 0; border-radius: 30px; background: #1a1a1f; color: #fff; font: inherit; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.5); cursor: pointer; }
.float-rec .fr-dot { width: 16px; height: 16px; border-radius: 50%; background: #ff3b5c; box-shadow: 0 0 0 4px rgba(255,59,92,.25); }
.float-rec.live { background: #ff3b5c; }
.float-rec.live .fr-dot { background: #fff; box-shadow: none; animation: frblink 1s steps(1) infinite; }
@keyframes frblink { 50% { opacity: .3; } }
@media (min-width: 900px) { .float-rec { bottom: 28px; } }
