/* The Studio: a full-height panel over the app (js/studio.js). Prefix st-. */
.st-open, .st-open body { overflow: hidden; }
.st-wrap { position: fixed; inset: 0; z-index: 90; display: grid; place-items: end center; }
.st-scrim { position: absolute; inset: 0; background: rgba(46, 61, 68, 0.42); }
.st {
  position: relative; width: min(980px, 100%); max-height: min(94svh, 960px); overflow-y: auto; overscroll-behavior: contain;
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0;
  background: var(--mint); box-shadow: 0 -10px 40px rgba(46, 61, 68, 0.25);
}
@media (min-width: 760px) { .st-wrap { place-items: center; padding: 24px; } .st { border-radius: 20px; padding: 24px 28px 22px; } }
.st-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.st-head .eyebrow { margin-bottom: 4px; }
.st-head h2 { font-size: clamp(1.4rem, 4vw, 1.9rem); overflow-wrap: anywhere; }
.st-head h2:focus { outline: none; }

.st-transport { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: var(--white); box-shadow: var(--sh-card); }
.st-play {
  display: grid; place-items: center; width: 56px; height: 56px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--coral); color: var(--white); box-shadow: var(--sh-solid); transition: transform 90ms ease-out, box-shadow 90ms ease-out;
}
.st-play:active { transform: translateY(1px); box-shadow: var(--sh-press); }
.st-play.is-on { background: var(--ink); box-shadow: var(--sh-solid); }
.st-play .ic { width: 24px; height: 24px; }
.st-play .ic-fill { fill: currentColor; }
.st-wave { position: relative; height: 56px; cursor: pointer; }
.st-wave:focus-visible { outline: 3px solid var(--teal-deeper); outline-offset: 3px; border-radius: 8px; }
.st-wave canvas { width: 100%; height: 100%; }
.st-head-line { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--coral); border-radius: 2px; transform: translateX(-1px); pointer-events: none; }
.st-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-soft); font-size: 0.9rem; white-space: nowrap; }

.st-presets { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 14px -20px 0; padding: 2px 20px 6px; }
.st-presets::-webkit-scrollbar { display: none; }
.st-chip { flex: none; padding: 9px 16px; border: 2px solid transparent; border-radius: 99px; background: var(--white); font-weight: 700; cursor: pointer; box-shadow: var(--sh-card); transition: background-color 150ms ease, color 150ms ease, transform 90ms ease-out; }
.st-chip:active { transform: scale(0.96); }
.st-chip.is-on { background: var(--ink); color: var(--white); box-shadow: var(--sh-solid); }

.st-grid { display: grid; gap: 14px; margin-top: 12px; }
@media (min-width: 760px) { .st-grid { grid-template-columns: 1fr 1fr; align-items: start; } .st-presets { margin: 16px 0 0; padding: 2px 0 6px; flex-wrap: wrap; } }
.st-card { padding: 16px; border-radius: 16px; background: var(--white); box-shadow: var(--sh-card); }
.st-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.st-note { margin: 4px 0 12px; color: var(--ink-soft); font-size: 0.92rem; }
.st-strip { display: grid; grid-template-columns: 36px 1fr auto; align-items: end; gap: 10px; margin-bottom: 12px; }
.st-strip-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--belly); margin-bottom: 2px; }
.st-strip-ic .ic { width: 18px; height: 18px; }
.st-mute { padding: 7px 12px; border: 2px solid var(--belly); border-radius: 12px; background: var(--white); font-weight: 700; font-size: 0.8rem; cursor: pointer; color: var(--ink-soft); }
.st-mute.is-on { background: var(--coral); border-color: var(--coral); color: var(--white); }

.st-slider { display: grid; gap: 4px; margin-bottom: 10px; }
.st-strip .st-slider { margin-bottom: 0; }
.st-sl-head { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 0.9rem; }
.st-sl-head output { font-variant-numeric: tabular-nums; color: var(--ink-soft); font-weight: 600; }
.st-slider input[type="range"] { width: 100%; height: 28px; accent-color: var(--coral); cursor: pointer; }
.st-rooms { display: inline-flex; padding: 4px; gap: 2px; border-radius: 99px; background: var(--mint); margin-bottom: 12px; }
.st-room { border: 0; background: none; padding: 7px 14px; border-radius: 99px; font-weight: 700; font-size: 0.88rem; cursor: pointer; color: var(--ink-soft); }
.st-room.is-on { background: var(--ink); color: var(--white); }
.st-switch { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-weight: 700; cursor: pointer; }
.st-switch input { width: 20px; height: 20px; accent-color: var(--coral); }

.st-foot { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px -20px 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: var(--mint); box-shadow: 0 -16px 14px -8px var(--mint); }
@media (min-width: 760px) { .st-foot { position: static; margin: 16px 0 0; padding: 0; box-shadow: none; } }
.st-foot .btn .ic { width: 20px; height: 20px; }
.st-foot .btn.is-busy { opacity: 0.7; }
.st-foot .btn.is-busy .ic { animation: st-spin 1s linear infinite; }
@keyframes st-spin { to { transform: rotate(360deg); } }
.st-private { flex-basis: 100%; display: flex; gap: 8px; align-items: center; margin: 2px 0 0; color: var(--ink-soft); font-size: 0.82rem; }
.st-private .ic { width: 16px; height: 16px; flex: none; }
@media (max-width: 520px) { .st-foot .btn { flex: 1 1 100%; } }

/* The button that opens the Studio, wherever a take is played back */
.st-open-btn .ic { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { .st-foot .btn.is-busy .ic { animation: none; } }
.st-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.st-card-head h3 { margin-bottom: 0; }
.st-card-head .btn-link { font-size: 0.88rem; }
@media (max-width: 520px) {
  .st-foot { gap: 8px; padding-top: 10px; }
  .st-foot .btn { flex: 1 1 0; min-height: 48px; padding: 10px 14px; }
  .st-private { font-size: 0.76rem; margin: 0; }
  .st-presets { margin-top: 12px; }
}
