/* TryMastered Studio — dark cinematic pro layout */
.studio-body {
  margin: 0; min-height: 100vh;
  background: #f4f5f8; color: #0f172a; font-family: var(--font);
}
/* Fancy status bar above sticky studio chrome */
.studio-status-bar.topbar-promo {
  position: relative;
  z-index: 45;
}
.studio-status-bar .topbar-inner {
  width: min(1280px, 100%);
}
.studio-body.share-locked .studio-status-bar {
  background: linear-gradient(105deg, #7c2d12 0%, #b45309 45%, #6d28d9 100%) !important;
  animation: none !important;
}
.studio-top {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 18px; border-bottom: 1px solid rgba(15,23,42,0.08);
  background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 40;
  box-shadow: 0 8px 24px rgba(15,23,42,0.06);
  color: #0f172a;
}
.studio-top .brand { margin-right: auto; }
.studio-top-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-sm { padding: 8px 12px; font-size: 12px; }

/* SC-like step bar */
.steps {
  display: flex; align-items: center; gap: 0; flex-wrap: wrap;
}
.step {
  font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 6px 10px; border-radius: 999px; border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.step i {
  width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 800;
  background: rgba(255,255,255,0.06); color: var(--muted);
}
.step.on { color: #fff; background: rgba(139, 92, 246, 0.2); border-color: var(--purple); }
.step.on i { background: var(--grad); color: #fff; }
.step.done { color: var(--ok); }
.step.done i { background: rgba(52,211,153,0.2); color: var(--ok); }
.step-line {
  width: 18px; height: 1px; background: var(--line); margin: 0 2px;
}
@media (max-width: 900px) {
  .step span, .step { font-size: 11px; }
  .step-line { width: 8px; }
}

.layout {
  display: grid; grid-template-columns: 240px 1fr 320px;
  min-height: calc(100vh - 58px);
}
@media (max-width: 1100px) { .layout { grid-template-columns: 1fr; } }
.panel { padding: 16px; }
.library, .ab { background: rgba(8, 5, 16, 0.92); }
.library { border-right: 1px solid var(--line); }
.ab { border-left: 1px solid var(--line); }
.h2 {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 10px; font-weight: 700;
}
.hint { font-size: 12px; color: var(--muted); margin: 0 0 12px; }

.track-list {
  list-style: none; margin: 0; padding: 0;
  max-height: calc(100vh - 320px); overflow: auto;
}
.track-list li {
  padding: 11px; border-radius: 12px; cursor: pointer;
  border: 1px solid transparent; margin-bottom: 4px;
}
.track-list li:hover { background: rgba(255,255,255,0.04); }
.track-list li.on {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
}
.t-name { font-size: 13px; font-weight: 650; word-break: break-all; }
.t-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }

.upload-zone {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  width: 100%; margin-bottom: 10px; padding: 14px 10px;
  border: 1.5px dashed rgba(168, 85, 247, 0.4); border-radius: 12px;
  background: rgba(139, 92, 246, 0.08); cursor: pointer; color: var(--text);
  transition: 0.15s ease;
}
.upload-zone:hover, .upload-zone.drag {
  border-color: var(--purple2); background: rgba(139, 92, 246, 0.16);
}
.upload-ico {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  background: var(--grad); font-weight: 800; font-size: 16px; color: #fff;
}
.upload-zone strong { font-size: 13px; }
.upload-fmts { justify-content: center; margin-top: 4px; }
.upload-fmts .fmt-tag { font-size: 9px; padding: 3px 6px; }
.upload-progress { margin: 0 0 10px; }
.upload-progress.hidden { display: none; }

.upload-hero {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; align-items: center;
  padding: 22px; margin-bottom: 16px;
  border: 1.5px dashed rgba(168, 85, 247, 0.45); border-radius: 16px;
  background: linear-gradient(135deg, rgba(139,92,246,0.14), rgba(8,5,16,0.6));
}
.upload-hero.hidden { display: none; }
@media (max-width: 800px) { .upload-hero { grid-template-columns: 1fr; } }
.upload-hero-viz {
  border-radius: 12px; padding: 16px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #f5f3ff, #07040f);
}
.upload-hero-viz .mock-bars {
  display: flex; align-items: flex-end; gap: 3px; height: 80px;
}
.upload-hero-viz .mock-bars i {
  flex: 1; border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, #e9d5ff, #8b5cf6 45%, #4c1d95);
  height: var(--h, 50%);
}

.stage { position: relative; }
.stage-drop {
  position: absolute; inset: 8px; z-index: 30;
  border: 2px dashed var(--purple2); border-radius: 16px;
  background: rgba(10, 6, 22, 0.92); display: grid; place-items: center;
  pointer-events: none;
}
.stage-drop[hidden] { display: none !important; }
.stage-drop-inner {
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.stage-drop-inner .upload-ico { width: 48px; height: 48px; font-size: 22px; }
body.dragging-file .stage-drop { display: grid !important; }
body.dragging-file .upload-zone { border-color: var(--cyan); background: rgba(34,211,238,0.1); }

.stage-workspace { max-width: 920px; margin: 0 auto; }
.stage-heading {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.stage-h2 {
  margin: 0 0 4px; font-size: 1.45rem; letter-spacing: -0.03em; font-weight: 750;
}
.powered {
  font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap;
}

.title-row {
  display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap;
}
.title-row h1 {
  margin: 0; font-size: 18px; letter-spacing: -0.03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50vw;
}
.play {
  width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  font-size: 16px; flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(109, 40, 217, 0.4);
}
.play:disabled { opacity: 0.35; }

.callout {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(139, 92, 246, 0.1); margin-bottom: 12px;
}
.callout p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.wave-wrap {
  background: #07040f; border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; margin-bottom: 10px; position: relative;
}
.wave-label-float {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, 28px);
  z-index: 2; pointer-events: none;
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.75);
  background: rgba(10,6,20,0.75); padding: 3px 10px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
}
#waveform { min-height: 128px; }
.times {
  display: flex; justify-content: space-between; font-size: 11px; color: var(--muted);
  font-family: ui-monospace, monospace; padding-top: 6px;
}
#regionLabel { color: var(--purple2); font-weight: 650; }
.cand-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cand-row.hidden { display: none; }
.cand {
  font-size: 11px; font-family: ui-monospace, monospace; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: #f5f3ff; color: var(--muted); cursor: pointer;
}
.cand.on, .cand:hover { border-color: var(--purple); color: #fff; background: rgba(139,92,246,0.2); }

.region-row {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px;
}
.region-row label { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.region-row input {
  width: 72px; padding: 8px; border-radius: 10px; border: 1px solid var(--line);
  background: #f5f3ff; color: #fff; font-family: ui-monospace, monospace; font-size: 12px;
}

.opts-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  background: rgba(12, 8, 24, 0.8); margin-bottom: 16px;
}
.opts { display: grid; gap: 14px; }
.opt-label {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px; font-weight: 700;
}
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  background: rgba(255,255,255,0.04); border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; padding: 9px 14px; font-size: 12px; font-weight: 650;
  cursor: pointer; font-family: inherit; transition: 0.12s ease;
}
.seg button:hover { border-color: var(--purple); color: #fff; }
.seg button.on {
  background: rgba(139,92,246,0.28); border-color: var(--purple); color: #fff;
  box-shadow: 0 0 0 1px rgba(139,92,246,0.2);
}

.stage-footer {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line);
}
.stage-footer-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.progress.hidden { display: none; }
.bar { height: 5px; background: #1a1230; border-radius: 99px; overflow: hidden; }
.fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  transition: width 0.3s;
}
#progressMsg { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.scan.hidden { display: none; }
.scan {
  display: flex; gap: 10px; align-items: center; font-size: 12px;
  color: var(--muted); margin-bottom: 10px;
}
.scan .bar { flex: 1; }

/* A/B */
.ab-player {
  border: 1px solid var(--line); border-radius: 16px; padding: 14px;
  margin-bottom: 12px; background: #0c0818;
}
.ab-player.ready { border-color: rgba(34, 211, 238, 0.4); }
.ab-empty {
  font-size: 12px; color: var(--muted); margin: 0 0 10px; padding: 10px;
  border-radius: 10px; border: 1px dashed var(--line);
}
.ab-empty.hidden { display: none; }
.ab-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  background: rgba(0,0,0,0.35); border-radius: 8px; margin-bottom: 12px;
}
.ab-tabs button {
  border: none; background: transparent; color: var(--muted); font-weight: 800;
  font-size: 12px; padding: 10px; border-radius: 6px; cursor: pointer;
  font-family: inherit; text-transform: uppercase;
}
.ab-tabs button.on { background: var(--grad); color: #fff; }
.ab-now { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.ab-stats {
  font-size: 11px; color: var(--muted); margin-bottom: 10px;
  font-family: ui-monospace, monospace;
}
#audioAB { width: 100%; height: 38px; margin-bottom: 8px; }
.ab-tools {
  display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center;
}

/* Purchase card (SC style, VM theme) */
.purchase-card {
  border: 1px solid var(--line); border-radius: 16px; padding: 14px;
  background: linear-gradient(165deg, rgba(22,14,40,0.98), rgba(8,5,16,0.99));
  margin-bottom: 12px;
}
.purchase-card.hidden { display: none; }
.purchase-banner {
  padding: 10px; border-radius: 10px; margin-bottom: 12px;
  background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.2);
  color: var(--cyan);
}
.purchase-track {
  display: flex; gap: 12px; align-items: center; margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.purchase-art {
  width: 56px; height: 56px; border-radius: 10px; flex-shrink: 0;
  background: var(--grad); display: grid; place-items: center;
  font-weight: 800; font-size: 14px;
}
.purchase-choice { display: grid; gap: 8px; margin-bottom: 12px; }
.choice-btn {
  text-align: left; padding: 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(0,0,0,0.25); color: var(--text);
  font-family: inherit;
}
.choice-btn strong { display: block; font-size: 13px; margin-bottom: 3px; }
.choice-btn span { font-size: 11px; color: var(--muted); line-height: 1.35; }
.choice-btn.on {
  border-color: rgba(139, 92, 246, 0.55);
  background: rgba(139, 92, 246, 0.12);
  box-shadow: 0 0 0 1px rgba(139,92,246,0.15);
}
.purchase-price {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px; gap: 8px; flex-wrap: wrap;
}
.price-was { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.price-now { font-size: 15px; font-weight: 750; color: var(--cyan); }

.unlock {
  margin-top: 12px; padding: 14px; border-radius: 16px;
  border: 1px solid rgba(168, 85, 247, 0.45); background: rgba(139, 92, 246, 0.12);
}
.unlock.hidden { display: none; }
.unlock h3 { margin: 0 0 6px; font-size: 15px; }
.unlock p { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.result {
  margin-top: 12px; padding: 12px; border-radius: 14px;
  border: 1px solid rgba(34,211,238,0.3); background: rgba(34,211,238,0.08);
}
.result.hidden { display: none; }
.result a {
  display: block; color: var(--cyan); font-size: 12px; font-weight: 650; margin-top: 4px;
}
.paywall {
  margin-top: 12px; padding: 14px; border-radius: 14px;
  border: 1px solid rgba(168, 85, 247, 0.4); background: rgba(139, 92, 246, 0.1);
}
.paywall.hidden { display: none; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: #161022; border: 1px solid var(--line); padding: 12px 16px;
  border-radius: 14px; font-size: 13px; z-index: 100; max-width: 90vw;
}
.toast.hidden { display: none; }
.toast.err { border-color: #f87171; }

.diag {
  border: 1px solid var(--line); border-radius: 16px; padding: 12px;
  margin-bottom: 12px; background: #0c0818;
}
.diag.hidden { display: none; }
.diag-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.diag-grid div {
  background: rgba(0,0,0,0.3); border-radius: 10px; padding: 8px; border: 1px solid var(--line);
}
.diag-grid label { display: block; font-size: 9px; color: var(--muted); text-transform: uppercase; }
.diag-grid b { color: var(--cyan); font-size: 14px; }

/* ── Modals ─────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(4, 2, 10, 0.72); backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: 20px;
}
.modal-backdrop.hidden { display: none; }
.modal-card {
  width: min(440px, 100%);
  background: linear-gradient(165deg, rgba(24, 16, 42, 0.99), rgba(8, 5, 16, 0.99));
  border: 1px solid var(--line-strong); border-radius: 16px; padding: 28px 24px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.55), 0 0 60px rgba(124,58,237,0.12);
  text-align: center; position: relative;
}
.modal-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad);
  border-radius: 16px 16px 0 0;
}
.modal-card h2 {
  margin: 0 0 10px; font-size: 1.35rem; letter-spacing: -0.03em; font-weight: 750;
}
.modal-card p {
  margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.5;
}
.modal-card p strong { color: var(--text); }
.modal-wave-mini {
  height: 56px; border-radius: 10px; margin: 0 auto 18px; max-width: 280px;
  background:
    repeating-linear-gradient(90deg, #6d28d9 0 3px, transparent 3px 6px);
  opacity: 0.55; position: relative; overflow: hidden;
  border: 1px solid var(--line);
}
.mini-region {
  position: absolute; left: 28%; width: 36%; top: 8%; bottom: 8%;
  border: 1.5px solid rgba(255,255,255,0.6); border-radius: 6px;
  background: rgba(139, 92, 246, 0.25);
}
.modal-check {
  display: flex; gap: 8px; align-items: center; justify-content: center;
  font-size: 12px; color: var(--muted); margin-top: 14px; cursor: pointer;
}

.modal-gen { padding-top: 36px; }
.gen-anim {
  display: flex; gap: 6px; justify-content: center; align-items: flex-end;
  height: 48px; margin-bottom: 16px;
}
.gen-anim span {
  width: 6px; border-radius: 3px;
  background: linear-gradient(180deg, #e9d5ff, #8b5cf6);
  animation: genBounce 0.9s ease-in-out infinite alternate;
}
.gen-anim span:nth-child(1) { height: 18px; animation-delay: 0s; }
.gen-anim span:nth-child(2) { height: 32px; animation-delay: 0.1s; }
.gen-anim span:nth-child(3) { height: 44px; animation-delay: 0.2s; }
.gen-anim span:nth-child(4) { height: 28px; animation-delay: 0.3s; }
.gen-anim span:nth-child(5) { height: 40px; animation-delay: 0.15s; }
.gen-anim span:nth-child(6) { height: 22px; animation-delay: 0.25s; }
.gen-anim span:nth-child(7) { height: 36px; animation-delay: 0.05s; }
@keyframes genBounce {
  from { transform: scaleY(0.55); opacity: 0.6; }
  to { transform: scaleY(1.15); opacity: 1; }
}
.gen-brand {
  font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--purple2); margin: 0 0 8px !important;
}
.gen-bar {
  height: 6px; background: #1a1230; border-radius: 99px; overflow: hidden; margin: 16px 0 10px;
}
.gen-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  transition: width 0.25s ease;
}

.modal-ready { text-align: left; }
.ready-choices { display: grid; gap: 10px; }
.ready-card {
  text-align: left; padding: 16px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(0,0,0,0.3); color: var(--text);
  font-family: inherit; transition: 0.12s ease;
}
.ready-card:hover {
  border-color: var(--purple); background: rgba(139, 92, 246, 0.12);
}
.ready-card.alt:hover { border-color: var(--cyan); }
.ready-card strong { display: block; font-size: 14px; margin-bottom: 4px; }
.ready-card span { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ═══ SC mastering wizard (TryMastered theme) ═══ */
.sc-steps {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.sc-step {
  font-size: 12px; font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.sc-step .dot {
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 800;
  background: rgba(255,255,255,0.06); color: var(--muted);
  font-family: inherit;
}
.sc-step.on { color: var(--text); }
.sc-step.on .dot { background: var(--grad); color: #fff; }
.sc-step.done { color: var(--ok); }
.sc-step.done .dot { background: rgba(52,211,153,0.25); color: var(--ok); content: "✓"; }
.sc-line { width: 20px; height: 1px; background: var(--line); }
.layout-sc .stage-wide { padding: 20px 28px 32px; }
.wizard.hidden { display: none; }
.wiz-view { display: none; max-width: 860px; margin: 0 auto; }
.wiz-view.on { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.wiz-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.wiz-title { margin: 0 0 6px; font-size: 1.5rem; letter-spacing: -0.03em; font-weight: 750; }
.track-line {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap;
}
.play-orange {
  width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--grad); color: #fff; font-size: 16px;
  box-shadow: 0 8px 28px rgba(109,40,217,0.45); flex-shrink: 0;
}
.play-orange:disabled { opacity: 0.35; }
.track-line-meta { flex: 1; min-width: 0; }
.track-line-meta .artist { display: block; font-size: 13px; color: var(--muted); }
.track-line-meta strong {
  font-size: 17px; letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}
.wave-sc { position: relative; padding-bottom: 28px; }
.current-preview-label {
  text-align: center; font-size: 12px; color: var(--muted); margin-top: 4px;
  font-weight: 600;
}
.wiz-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--line);
}
.wiz-foot-right { display: flex; gap: 8px; flex-wrap: wrap; }

/* Style picker */
.ab-toggle {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
}
.ab-lab { font-size: 12px; color: var(--muted); font-weight: 600; }
.ab-lab.on { color: var(--text); }
.toggle-sw {
  width: 44px; height: 24px; border-radius: 99px; border: none; cursor: pointer;
  background: rgba(255,255,255,0.12); position: relative; padding: 0;
}
.toggle-sw::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #ffffff;
  transition: 0.15s ease;
}
.toggle-sw[aria-pressed="true"] { background: var(--purple); }
.toggle-sw[aria-pressed="true"]::after { left: 23px; }

.mini-wave { min-height: 80px; margin-bottom: 18px; }
.fake-wave {
  display: flex; align-items: flex-end; gap: 2px; height: 72px; padding: 8px 0;
}
.fake-wave i {
  flex: 1; border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, #6d28d9, #7c3aed 60%, #3b1d6e);
  height: var(--h, 40%); opacity: 0.85;
}
.fake-wave i.on-region {
  background: linear-gradient(180deg, #e9d5ff, #a855f7 50%, #6d28d9);
  opacity: 1;
}
.region-chip {
  display: inline-block; font-size: 11px; font-family: ui-monospace, monospace;
  color: var(--purple2); font-weight: 700; margin-top: 4px;
}

.intensity-row {
  display: flex; align-items: center; gap: 12px; margin: 8px 0 22px; flex-wrap: wrap;
}
.intensity-row label {
  font-size: 13px; color: var(--muted); font-weight: 600; min-width: 140px;
}
.intensity-row .q {
  display: inline-grid; place-items: center; width: 16px; height: 16px;
  border-radius: 50%; border: 1px solid var(--line); font-size: 10px; margin-left: 4px;
}
.intensity-row input[type="range"] {
  flex: 1; min-width: 140px; accent-color: var(--purple); height: 4px;
}
#intensityPct { font-size: 13px; font-weight: 700; color: var(--cyan); min-width: 40px; }

.style-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px;
}
@media (max-width: 700px) { .style-grid { grid-template-columns: 1fr 1fr; } }
.style-card {
  border: 2px solid transparent; border-radius: 14px; padding: 0;
  background: transparent; cursor: pointer; font-family: inherit; color: var(--text);
  overflow: hidden; transition: 0.15s ease;
}
.style-card:hover { transform: translateY(-2px); }
.style-card.on {
  border-color: var(--purple2);
  box-shadow: 0 0 0 2px rgba(139,92,246,0.25), 0 12px 32px rgba(109,40,217,0.2);
}
.style-art {
  height: 88px; display: grid; place-items: center; position: relative;
}
.style-art .ico { font-size: 28px; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3)); }
.style-art.thunder { background: linear-gradient(135deg, #7c3aed, #2563eb 60%, #06b6d4); }
.style-art.sunroof { background: linear-gradient(135deg, #3b82f6, #38bdf8 50%, #fbbf24); }
.style-art.aurora { background: linear-gradient(135deg, #db2777, #a855f7 50%, #6366f1); }
.style-art.clearsky { background: linear-gradient(135deg, #f472b6, #fb923c 55%, #fde68a); }
.style-name {
  display: block; padding: 8px 10px; font-size: 12px; font-weight: 700;
  background: rgba(0,0,0,0.35); text-align: left;
}
.loud-row { margin-bottom: 8px; }

/* Purchase */
.info-banner {
  padding: 12px 14px; border-radius: 10px; margin-bottom: 18px;
  background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.22);
  color: var(--cyan); font-size: 13px; line-height: 1.45;
}
.purchase-box {
  border: 1px solid var(--line); border-radius: 16px; padding: 20px;
  background: rgba(12, 8, 24, 0.85); max-width: 560px;
}
.purchase-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 10px;
}
.purchase-track-row {
  display: flex; gap: 14px; align-items: center; margin-bottom: 20px;
  padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.purchase-cover {
  width: 72px; height: 72px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #db2777, #7c3aed, #06b6d4);
  display: grid; place-items: center; font-weight: 800; font-size: 16px;
}
.vm-by { color: var(--purple2) !important; margin-top: 4px !important; }
.purchase-line {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px; font-size: 14px;
}
.purchase-prices { display: flex; align-items: baseline; gap: 8px; }
.price-was { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.price-now { color: var(--cyan); font-size: 16px; }
.btn-master-cta {
  margin-top: 8px;
  background: var(--grad) !important;
  font-size: 15px !important; padding: 16px !important;
}

.modal-white .btn-primary,
.modal-tip-pro .btn-primary {
  background: var(--grad);
}
.modal-tip-pro {
  text-align: center;
  max-width: 400px;
  padding: 28px 24px 22px;
  position: relative;
}
.modal-tip-pro h2 {
  font-size: 1.25rem;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.modal-tip-pro p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 18px;
  color: #64748b;
}
.modal-x {
  position: absolute; top: 10px; right: 12px;
  width: 32px; height: 32px; border: none; border-radius: 8px;
  background: transparent; color: #64748b; font-size: 22px;
  cursor: pointer; line-height: 1;
}
.modal-x:hover { background: rgba(124,58,237,0.08); color: #0f172a; }
.callout-compact {
  align-items: center;
}
.hidden { display: none !important; }
.dl-link {
  display: block; margin-top: 6px; padding: 10px 12px;
  border-radius: 10px; border: 1px solid rgba(99,70,180,0.18);
  background: #f8f7fc; color: #5b21b6 !important; font-weight: 650; font-size: 13px;
}
.dl-link:hover { background: rgba(124,58,237,0.1); }
#previewDownload:not(.hidden) { margin-top: 12px; }
.studio-upgrade-strip {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; border-bottom: 1px solid rgba(124,58,237,0.2);
  background: linear-gradient(90deg, rgba(124,58,237,0.1), rgba(14,165,233,0.06));
  font-size: 13px; color: #0f172a;
}
.studio-upgrade-strip strong { color: #5b21b6; }
@media (max-width: 700px) {
  .studio-upgrade-strip { flex-direction: column; align-items: stretch; text-align: center; }
}


/* ═══ Studio light theme (redesign) ═══ */
.studio-body { background: #f4f5f8 !important; color: #0f172a !important; }
.studio-top {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid rgba(15,23,42,0.08) !important;
  box-shadow: 0 8px 24px rgba(15,23,42,0.06);
  color: #0f172a !important;
}
.library, .ab {
  background: #f8fafc !important;
  border-color: rgba(167,139,250,0.12) !important;
}
.stage { background: #f4f5f8 !important; }
.wave-wrap, .ab-player, .opts-card, .purchase-box, .callout {
  background: #ffffff !important;
  border-color: rgba(167,139,250,0.16) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.callout { background: rgba(124,58,237,0.12) !important; }
.track-list li.on {
  background: rgba(124,58,237,0.18) !important;
  border-color: rgba(167,139,250,0.4) !important;
}
.track-list li:hover { background: rgba(124,58,237,0.1) !important; }
.t-name, .track-line-meta strong, .wiz-title, .stage-h2 { color: #0f172a !important; }
.t-meta, .hint, .powered, .artist { color: #64748b !important; }
.region-row input, .seg button {
  background: #f8fafc !important; color: #0f172a !important;
  border-color: rgba(167,139,250,0.22) !important;
}
.seg button.on {
  background: rgba(124,58,237,0.25) !important;
  border-color: #a78bfa !important; color: #fff !important;
}
.cand {
  background: #f1f5f9 !important; color: #6d28d9 !important;
  border-color: rgba(167,139,250,0.22) !important;
}
.cand.on {
  background: linear-gradient(135deg, #7c3aed, #6366f1) !important;
  color: #fff !important; border-color: transparent !important;
}
.ab-tabs { background: #f1f5f9 !important; }
.ab-tabs button { color: #64748b !important; }
.ab-tabs button.on { background: var(--grad) !important; color: #fff !important; }
.ab-empty { background: #ffffff !important; border-color: rgba(167,139,250,0.18) !important; }
.upload-zone {
  background: rgba(124,58,237,0.1) !important;
  border-color: rgba(167,139,250,0.35) !important;
  color: #0f172a !important;
}
.upload-hero {
  background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(6,182,212,0.08)) !important;
  border-color: rgba(167,139,250,0.28) !important;
}
.upload-hero-viz {
  background: linear-gradient(180deg, #1a1530, #f8fafc) !important;
}
.modal-backdrop { background: rgba(0, 0, 0, 0.65) !important; }
.modal-card {
  background: #ffffff !important;
  border-color: rgba(167,139,250,0.2) !important;
  color: #0f172a !important;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55) !important;
}
.modal-card p { color: #64748b !important; }
.modal-card h2 { color: #0f172a !important; }
.modal-wave-mini {
  background: repeating-linear-gradient(90deg, #7c3aed 0 3px, transparent 3px 6px) !important;
  border-color: rgba(167,139,250,0.2) !important;
}
.gen-bar, .bar { background: #f1f5f9 !important; }
.choice-btn, .ready-card, .style-card {
  background: #ffffff !important; color: #0f172a !important;
}
.choice-btn span, .ready-card span { color: #64748b !important; }
.choice-btn.on, .ready-card:hover {
  border-color: #a78bfa !important;
  background: rgba(124,58,237,0.15) !important;
}
.info-banner {
  background: rgba(34,211,238,0.1) !important; border-color: rgba(34,211,238,0.28) !important; color: #67e8f9 !important;
}
.purchase-cover {
  background: linear-gradient(135deg, #db2777, #7c3aed, #0ea5e9) !important;
}
.toast {
  background: #f1f5f9 !important; color: #0f172a !important;
  border-color: rgba(167,139,250,0.25) !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.45);
}
.sc-step { color: #64748b !important; }
.sc-step.on { color: #0f172a !important; }
.fake-wave i {
  background: linear-gradient(180deg, #6d28d9, #8b5cf6 60%, #6366f1) !important;
}
.diag, .result {
  background: #ffffff !important; border-color: rgba(167,139,250,0.16) !important;
}
.diag-grid div {
  background: #f1f5f9 !important; border-color: rgba(167,139,250,0.14) !important;
}
.diag-grid b { color: #a78bfa !important; }
.paywall, .unlock, .purchase-card {
  background: #ffffff !important;
  border-color: rgba(124,58,237,0.25) !important;
}

/* ═══ Studio mobile ═══ */
@media (max-width: 900px) {
  .layout, .layout-sc { grid-template-columns: 1fr !important; }
  .library { border-right: none; border-bottom: 1px solid rgba(99,70,180,0.12); max-height: 40vh; overflow: auto; }
  .ab { border-left: none; border-top: 1px solid rgba(99,70,180,0.12); }
  .studio-top {
    flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px;
  }
  .studio-top .brand { margin-right: 0; }
  .sc-steps { flex-wrap: wrap; font-size: 11px; gap: 2px; }
  .sc-line { display: none; }
  .sc-step { font-size: 11px; }
  .style-grid { grid-template-columns: 1fr 1fr !important; }
  .track-line { flex-wrap: wrap; }
  .track-line-meta strong { font-size: 15px; white-space: normal; }
  .wiz-title, .stage-h2 { font-size: 1.25rem !important; }
  .region-row { gap: 6px; }
  .wiz-foot { flex-direction: column; align-items: stretch; }
  .wiz-foot-right { width: 100%; flex-direction: column; }
  .wiz-foot-right .btn { width: 100%; }
  .demo-layout { grid-template-columns: 1fr !important; padding: 12px !important; }
  .modal-card { width: min(100%, 100%); margin: 12px; padding: 20px 16px !important; }
  .play-orange, .play { width: 48px; height: 48px; }
  .stage-wide { padding: 12px !important; }
  .intensity-row { flex-direction: column; align-items: stretch; }
  .intensity-row input[type="range"] { width: 100%; }
}

/* Demo pro refinements */
.sc-steps {
  display: flex; align-items: center; gap: 0; flex-wrap: wrap;
}
.sc-step {
  font-size: 12px; font-weight: 700; color: #64748b;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.sc-step .dot {
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 800;
  background: rgba(99,70,180,0.1); color: #64748b;
}
.sc-step.on { color: #0f172a; }
.sc-step.on .dot {
  background: linear-gradient(135deg, #7c3aed, #6366f1); color: #fff;
}
.sc-line { width: 16px; height: 2px; background: rgba(99,70,180,0.18); margin: 0 6px; border-radius: 2px; }
.play-orange {
  width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #f97316, #ea580c); color: #fff;
  font-size: 16px; font-weight: 800; box-shadow: 0 8px 20px rgba(234,88,12,0.35);
  flex-shrink: 0;
}
.play-orange:hover { filter: brightness(1.06); }
.track-line {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px; border-radius: 14px; background: rgba(124,58,237,0.04);
  border: 1px solid rgba(99,70,180,0.1);
}
.track-line-meta { flex: 1; min-width: 140px; }
.track-line-meta .artist { font-size: 11px; color: #64748b; font-weight: 600; }
.powered { font-size: 11px; font-weight: 700; color: #64748b; letter-spacing: 0.04em; text-transform: uppercase; }
.wiz-title { font-size: clamp(1.35rem, 3vw, 1.75rem); letter-spacing: -0.02em; margin: 0; }

/* Dark wave + sweet spot candidates */
.wave-sc, .wave-wrap {
  background: #f8fafc; border: 1px solid rgba(167,139,250,0.16);
  border-radius: 14px; padding: 12px; margin: 12px 0;
}
.current-preview-label {
  text-align: center; font-size: 12px; font-weight: 700; color: #a78bfa;
  margin: 6px 0 4px; letter-spacing: 0.02em;
}
.cand-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px;
}
.cand {
  border: 1px solid rgba(167,139,250,0.28); background: #f1f5f9; color: #6d28d9;
  border-radius: 999px; padding: 10px 14px; font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit; min-height: 40px;
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}
.cand:hover { border-color: rgba(167,139,250,0.55); color: #fff; transform: translateY(-1px); }
.cand.on {
  background: linear-gradient(135deg, #7c3aed, #6366f1); color: #fff; border-color: transparent;
  box-shadow: 0 8px 22px rgba(124,58,237,0.35);
}
.sweet-select-panel {
  margin: 12px 0 4px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(124,58,237,0.12), rgba(6,182,212,0.06));
  border: 1px solid rgba(167,139,250,0.24);
}
.sweet-select-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.auto-master-opt {
  display: flex; align-items: flex-start; gap: 12px;
  margin-top: 14px; padding: 12px 14px; border-radius: 14px;
  background: rgba(255,255,255,0.72); border: 1px solid rgba(124,58,237,0.18);
  cursor: pointer; user-select: none;
}
.auto-master-opt input {
  width: 18px; height: 18px; margin-top: 2px; accent-color: #7c3aed; flex-shrink: 0;
}
.auto-master-opt strong { display: block; font-size: 13px; color: #0f172a; }
.auto-master-opt em {
  display: block; font-style: normal; font-size: 12px; color: #64748b; line-height: 1.4; margin-top: 2px;
}
body.dark-ai .auto-master-opt,
.studio-dark .auto-master-opt {
  background: rgba(255,255,255,0.04); border-color: rgba(167,139,250,0.22);
}
body.dark-ai .auto-master-opt strong,
.studio-dark .auto-master-opt strong { color: #f4f2ff; }
.cpu-wave-status {
  position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%);
  font-size: 12px; font-weight: 700; color: #6d28d9;
  background: rgba(11,11,18,0.85); padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(167,139,250,0.3); pointer-events: none; z-index: 5;
  white-space: nowrap;
}
.wave-sc, .wave-wrap { position: relative; }

/* ═══ Stable Preview Deck (style step) ═══ */
.preview-deck {
  margin: 0 0 18px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(124,58,237,0.12), rgba(6,182,212,0.05));
  border: 1px solid rgba(167,139,250,0.28);
  box-shadow: 0 16px 40px rgba(0,0,0,0.28);
}
.preview-deck-pro {
  border-color: rgba(167,139,250,0.32);
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(124,58,237,0.16), transparent 55%),
    linear-gradient(165deg, #14141f 0%, #0e0e16 100%);
}
.style-section-label {
  font-size: 13px; font-weight: 700; color: #0f172a; margin: 4px 0 10px;
}
.style-grid-pro {
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 10px !important;
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .style-grid-pro { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 520px) {
  .style-grid-pro { grid-template-columns: repeat(2, 1fr) !important; }
}
.style-card.featured {
  position: relative;
  box-shadow: 0 0 0 1px rgba(167,139,250,0.35), 0 12px 32px rgba(124,58,237,0.2);
}
.style-badge {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  font-size: 9px; font-weight: 800; letter-spacing: 0.08em;
  padding: 3px 7px; border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed, #06b6d4); color: #fff;
}
.style-rec-tip {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 12px;
  background: rgba(124,58,237,0.1); border: 1px solid rgba(167,139,250,0.22);
  color: #6d28d9;
}
.style-rec-tip .linkish {
  border: none; background: none; color: #a78bfa; font-weight: 800;
  cursor: pointer; font-family: inherit; text-decoration: underline;
  padding: 0; font-size: inherit;
}
.style-card.on {
  outline: 2px solid rgba(167,139,250,0.65);
  outline-offset: 2px;
}
.preview-deck-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.ab-seg {
  display: inline-flex; padding: 4px; border-radius: 999px;
  background: #f8fafc; border: 1px solid rgba(167,139,250,0.22);
  gap: 2px;
}
.ab-seg-btn {
  border: none; background: transparent; color: #64748b;
  font-weight: 800; font-size: 12px; font-family: inherit;
  padding: 8px 16px; border-radius: 999px; cursor: pointer; min-height: 36px;
}
.ab-seg-btn.on {
  background: linear-gradient(135deg, #7c3aed, #06b6d4); color: #fff;
  box-shadow: 0 4px 16px rgba(124,58,237,0.35);
}
.preview-deck-player {
  display: flex; align-items: center; gap: 14px;
}
.preview-play {
  width: 64px; height: 64px; border-radius: 50%; border: none; cursor: pointer;
  flex-shrink: 0; font-size: 22px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow: 0 10px 28px rgba(234,88,12,0.4);
  font-family: inherit;
}
.preview-play:hover { filter: brightness(1.06); }
.preview-play:active { transform: scale(0.97); }
.preview-progress-wrap { flex: 1; min-width: 0; }
.fake-wave.mini {
  height: 48px; display: flex; align-items: flex-end; gap: 2px;
  margin-bottom: 6px; opacity: 0.9;
  background: #f4f5f8; border-radius: 10px; padding: 6px 8px;
  border: 1px solid rgba(167,139,250,0.12);
}
.fake-wave.mini i {
  flex: 1; border-radius: 2px; min-width: 2px;
  height: var(--h, 40%);
  background: linear-gradient(180deg, #6d28d9, #7c3aed 55%, #06b6d4);
  transform-origin: bottom center;
}
.fake-wave.mini i.on-region {
  background: linear-gradient(180deg, #6ee7b7, #34d399 60%, #06b6d4);
}
.fake-wave.mini.playing i {
  animation: barPulse 0.4s ease infinite alternate;
}
.fake-wave.mini.playing i:nth-child(odd) { animation-delay: 0.08s; }
.fake-wave.mini.playing i:nth-child(3n) { animation-delay: 0.16s; }
@keyframes barPulse {
  from { transform: scaleY(0.55); }
  to { transform: scaleY(1); }
}
#previewSeek {
  width: 100%; accent-color: #a78bfa; cursor: pointer;
}
.preview-times {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 11px; font-weight: 700; color: #8b839e; margin-top: 4px;
}
.preview-deck-status {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap;
}
.preview-deck-status .pill.master {
  background: rgba(52,211,153,0.15); color: #34d399; border-color: rgba(52,211,153,0.35);
}
.preview-deck-actions {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px;
}
.ab-dual-simple {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.ab-dual-simple .ab-mini-play { margin: 0; }

/* Pop-out floating player */
.pop-player {
  position: fixed; right: 18px; bottom: 18px; z-index: 80;
  width: min(320px, calc(100vw - 24px));
  padding: 16px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(167,139,250,0.35);
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
}
.pop-player-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.pop-play {
  display: block; margin: 14px auto 0; width: 56px; height: 56px;
}
@media (max-width: 700px) {
  .preview-deck-player { flex-direction: column; align-items: stretch; }
  .preview-play { width: 100%; height: 52px; border-radius: 14px; }
}
.region-row {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0;
}
.region-row label {
  font-size: 12px; color: #64748b; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.region-row input {
  width: 64px; padding: 8px 10px; border-radius: 10px;
  border: 1px solid rgba(167,139,250,0.2); background: #f8fafc; color: #0f172a;
  font-family: inherit; font-weight: 700;
}
.panel.library, .panel.stage, .panel.ab {
  background: #f8fafc;
}
.studio-upgrade-strip {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 18px; background: rgba(124,58,237,0.15); border-bottom: 1px solid rgba(167,139,250,0.18);
  font-size: 13px; color: #0f172a;
}
.demo-body .demo-main, .demo-body .demo-side {
  background: #ffffff !important; color: #0f172a;
}
.demo-body .ab-chip, .demo-body .int-chip {
  background: #f1f5f9; color: #6d28d9; border-color: rgba(167,139,250,0.25);
}
.demo-body .ab-chip.on, .demo-body .int-chip.on {
  background: linear-gradient(135deg, #7c3aed, #6366f1); color: #fff;
}
.demo-body .how-list { color: #64748b; }
.demo-body .how-list strong { color: #0f172a; }
.sc-step { color: #64748b; }
.sc-step.on { color: #0f172a; }
.track-line {
  background: rgba(124,58,237,0.1) !important;
  border-color: rgba(167,139,250,0.18) !important;
}
.style-card.mastering .style-art { animation: pulseGlow 0.9s ease infinite; }
@keyframes pulseGlow { 0%,100%{filter:brightness(1)} 50%{filter:brightness(1.25)} }
.style-name em { display:block; font-size:10px; opacity:0.7; font-style:normal; text-transform:uppercase; margin-top:2px; }
.int-chip {
  border:1px solid rgba(167,139,250,0.25); background:#f1f5f9; color:#6d28d9;
  padding:8px 14px; border-radius:999px; font-weight:700; font-size:12px; cursor:pointer; font-family:inherit;
}
.int-chip.on { background:linear-gradient(135deg,#7c3aed,#6366f1); color:#fff; border-color:transparent; }
.style-art.rage {
  background: linear-gradient(135deg, #7f1d1d, #dc2626 40%, #f97316 75%, #fbbf24);
}
.style-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important; }
.ab-dual { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ab-dual-col {
  background: #f4f5f8; border: 1px solid rgba(167,139,250,0.18);
  border-radius: 14px; padding: 12px 10px 14px; text-align: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.ab-dual-col.focus {
  border-color: rgba(167,139,250,0.55);
  box-shadow: 0 0 0 1px rgba(124,58,237,0.25), 0 12px 32px rgba(0,0,0,0.35);
}
.ab-dual-col.after-col.focus {
  border-color: rgba(52,211,153,0.5);
  box-shadow: 0 0 0 1px rgba(52,211,153,0.2), 0 12px 32px rgba(0,0,0,0.35);
}
.ab-dual-col audio {
  width: 100%; margin-top: 10px; height: 40px;
  border-radius: 10px; background: #f8fafc;
}
.ab-meter-mini {
  font-size: 11px; font-weight: 700; color: #8b839e; margin: 6px 0 10px; min-height: 1.2em;
}
.ab-meter-mini.hi { color: #34d399; }
.ab-mini-play {
  width: 100%; padding: 14px 10px; border-radius: 12px; border: none; cursor: pointer;
  background: #334155; color: #fff; font-weight: 800; font-family: inherit; font-size: 14px;
  min-height: 48px; transition: transform 0.12s ease, filter 0.12s ease;
}
.ab-mini-play:hover { filter: brightness(1.08); }
.ab-mini-play:active { transform: scale(0.98); }
.ab-mini-play.on { outline: 2px solid rgba(255,255,255,0.35); }
.ab-mini-play.master {
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  box-shadow: 0 8px 24px rgba(124,58,237,0.4);
}
.ab-head-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  margin-bottom: 4px;
}
.ab-live-badge {
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.06); color: #8b839e;
  border: 1px solid rgba(255,255,255,0.08); white-space: nowrap;
}
.ab-live-badge.on {
  background: rgba(52,211,153,0.15); color: #34d399;
  border-color: rgba(52,211,153,0.35);
}
.ab-now {
  margin-top: 10px; font-size: 13px; font-weight: 700; color: #0f172a;
  text-align: center; padding: 8px; border-radius: 10px;
  background: rgba(124,58,237,0.12); border: 1px solid rgba(167,139,250,0.2);
}
.ab-stats {
  text-align: center; font-size: 12px; color: #64748b; margin-top: 6px; font-weight: 600;
}
.ab-pro .ab-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.ab-pro .ab-tabs button {
  min-height: 44px; border-radius: 12px; border: 1px solid rgba(167,139,250,0.25);
  background: #f1f5f9; color: #6d28d9; font-weight: 800; font-family: inherit; cursor: pointer;
}
.ab-pro .ab-tabs button.on {
  background: linear-gradient(135deg, #7c3aed, #6366f1); color: #fff; border-color: transparent;
}
.ab-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; justify-content: center; }

/* Studio share earn + mobile polish */
.share-earn-box.panel {
  background: linear-gradient(135deg, rgba(124,58,237,0.16), rgba(6,182,212,0.1)) !important;
  border: 1px solid rgba(167,139,250,0.32) !important;
}
.promo-track-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 12px; border-radius: 12px;
  background: rgba(0,0,0,0.28); border: 1px solid rgba(167,139,250,0.22);
  margin-bottom: 4px;
}
.promo-track-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.promo-track-meta strong { font-size: 15px; color: #fff; letter-spacing: -0.02em; }
.promo-track-meta a { color: #a78bfa; font-weight: 600; font-size: 12px; }
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn {
  border: 1px solid rgba(167,139,250,0.28); background: #f1f5f9; color: #0f172a;
  border-radius: 999px; padding: 10px 14px; font-weight: 700; font-size: 12px;
  cursor: pointer; font-family: inherit; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
}
.share-btn:hover { border-color: #a78bfa; background: rgba(124,58,237,0.18); }
.share-btn.twitter { border-color: rgba(29,155,240,0.4); }
.share-btn.facebook { border-color: rgba(24,119,242,0.45); }
.share-btn.whatsapp { border-color: rgba(37,211,102,0.4); }

@media (max-width: 700px) {
  .ab-dual { grid-template-columns: 1fr !important; }
  .share-btn { flex: 1 1 calc(50% - 8px); }
  .studio-top .nav-links, .studio-top .sc-steps { width: 100%; }
  .choice-btn { min-height: 64px; text-align: left; }
  .btn-master-cta { min-height: 52px; font-size: 15px; }
  .wiz-view { padding-bottom: 24px; }
  .panel.ab { order: 3; }
  .layout-sc { gap: 12px; }
  /* larger touch targets for style cards */
  .style-card { min-height: 100px; }
  .int-chip { min-height: 44px; min-width: 72px; }
  .ab-mini-play { min-height: 48px; }
  #resultLinks .dl-link {
    display: block; width: 100%; margin-bottom: 8px;
    padding: 12px 14px; border-radius: 12px;
    background: #f1f5f9; border: 1px solid rgba(167,139,250,0.25);
    color: #0f172a; font-weight: 700; text-decoration: none;
  }
}

/* ═══ Light professional studio shell ═══ */
body.studio-body, .studio-body {
  background: #f4f5f8 !important;
  color: #0f172a !important;
}
.studio-body .studio-top {
  background: rgba(255,255,255,0.95) !important;
  border-bottom: 1px solid rgba(15,23,42,0.08) !important;
  color: #0f172a !important;
}
.studio-body .panel, .studio-body .library, .studio-body .stage, .studio-body .ab,
.studio-body .preview-deck, .studio-body .result, .studio-body .share-earn-box {
  background: #fff !important;
  border-color: rgba(15,23,42,0.1) !important;
  color: #0f172a !important;
}
.studio-body .hint, .studio-body .fine, .studio-body .artist { color: #64748b !important; }
.studio-body .wiz-title, .studio-body .h2, .studio-body strong { color: #0f172a !important; }
.studio-body .style-card {
  background: #fff !important;
  border: 1px solid rgba(15,23,42,0.1) !important;
  color: #0f172a !important;
}
.studio-body .style-card.on {
  outline: 2px solid #7c3aed;
  box-shadow: 0 8px 24px rgba(124,58,237,0.15);
}
.studio-body .style-name em { color: #64748b !important; }
.studio-body .wave-sc, .studio-body .wave-wrap, .studio-body .fake-wave.mini {
  background: #f8fafc !important;
  border-color: rgba(15,23,42,0.1) !important;
}
.studio-body .ab-seg { background: #f1f5f9 !important; border-color: rgba(15,23,42,0.1) !important; }
.studio-body .ab-seg-btn { color: #64748b !important; }
.studio-body .ab-seg-btn.on { color: #fff !important; }
.studio-body .btn-ghost {
  background: #fff !important;
  color: #0f172a !important;
  border: 1px solid rgba(15,23,42,0.14) !important;
}
.studio-body .int-chip, .studio-body .cand, .studio-body .seg button {
  background: #fff !important;
  color: #334155 !important;
  border: 1px solid rgba(15,23,42,0.12) !important;
}
.studio-body .int-chip.on, .studio-body .cand.on, .studio-body .seg button.on {
  background: linear-gradient(135deg, #7c3aed, #6366f1) !important;
  color: #fff !important;
  border-color: transparent !important;
}
.studio-body .library li, .studio-body .track-line {
  background: #f8fafc !important;
  border-color: rgba(15,23,42,0.08) !important;
  color: #0f172a !important;
}
.studio-body .sc-step { color: #94a3b8 !important; }
.studio-body .sc-step.on { color: #0f172a !important; }
.studio-body .user-chip, .studio-body .pill {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border-color: rgba(15,23,42,0.1) !important;
}
.studio-body .pill-plan, .studio-body .ab-live-badge.on {
  background: rgba(5,150,105,0.12) !important;
  color: #047857 !important;
}
.studio-body .promo-preview-text { color: #475569 !important; background: #f8fafc !important; }
.studio-body .preview-deck-pro {
  background: #fff !important;
  border: 1px solid rgba(15,23,42,0.1) !important;
}
.studio-body .dl-link, .studio-body #previewDownload, .studio-body a.btn {
  /* keep readable */
}
.studio-body .choice-btn {
  background: #f8fafc !important;
  border: 1px solid rgba(15,23,42,0.1) !important;
  color: #0f172a !important;
}
.studio-body .choice-btn.on {
  border-color: #7c3aed !important;
  background: #f5f3ff !important;
}
.demo-body {
  background: #f4f5f8 !important;
  color: #0f172a !important;
}
.demo-body .panel, .demo-body .demo-main, .demo-body .demo-side {
  background: #fff !important;
  color: #0f172a !important;
  border-color: rgba(15,23,42,0.1) !important;
}
.demo-body .ab-col {
  background: #f8fafc !important;
  border-color: rgba(15,23,42,0.1) !important;
}
.demo-body .think-card {
  background: #fff !important;
  color: #0f172a !important;
  border-color: rgba(124,58,237,0.25) !important;
}

/* Share lock + progress (studio light) */
.studio-body .share-lock-gate {
  background: linear-gradient(160deg, #fff7ed, #f5f3ff 55%, #ecfeff) !important;
  border: 2px solid rgba(109, 40, 217, 0.4) !important;
  color: #0f172a !important;
}
.studio-body .share-lock-gate strong { color: #5b21b6 !important; }
.studio-body .share-progress-bar { background: #e2e8f0 !important; }
.studio-body .share-btn {
  background: #fff !important;
  color: #0f172a !important;
  border: 1px solid rgba(15,23,42,0.12) !important;
}
.studio-body .share-btn.primary-share {
  background: linear-gradient(135deg, #7c3aed, #4f46e5) !important;
  color: #fff !important;
  border: none !important;
}
.studio-body .share-btn.facebook.primary-share {
  background: #1877f2 !important;
  color: #fff !important;
}
.studio-body .copied-flash {
  background: rgba(5,150,105,0.14) !important;
  color: #047857 !important;
  border-color: rgba(5,150,105,0.35) !important;
}
.studio-body .promo-track-card {
  background: #f8fafc !important;
  border: 1px solid rgba(15,23,42,0.08) !important;
}

/* ═══ Demo sticky CTA + mobile-first polish (redesign) ═══ */
.demo-promo.topbar-promo { z-index: 46; }
.demo-sticky-cta {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 -8px 28px rgba(15,23,42,0.08);
}
.demo-sticky-cta .btn { min-height: 48px; font-size: 15px; border-radius: 999px; }
@media (max-width: 700px) {
  .demo-sticky-cta { display: block; }
  .demo-body .demo-layout { padding-bottom: 96px; }
  .demo-body .studio-top-right .btn-ghost { display: none; }
  .demo-body .ab-side-by-side { grid-template-columns: 1fr !important; }
  .demo-body .ab-big-play { min-height: 56px; min-width: 56px; }
  .demo-body .style-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .demo-body #btnMaster { min-height: 48px; border-radius: 999px; }
}
.demo-body .demo-actions { display: grid; gap: 10px; }
.demo-body .demo-actions .btn { width: 100%; border-radius: 999px; min-height: 48px; }
.demo-body .auto-banner {
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(8,145,178,0.06)) !important;
  border: 1px solid rgba(109,40,217,0.18) !important;
  border-radius: 16px !important;
  color: #0f172a !important;
}
.demo-body .share-btn {
  min-height: 44px; border-radius: 999px;
  background: #fff !important; color: #0f172a !important;
  border: 1px solid rgba(15,23,42,0.12) !important;
}
.demo-body .demo-share-card {
  background: #f8fafc !important;
  border: 1px solid rgba(15,23,42,0.08) !important;
  border-radius: 16px; padding: 14px; margin-top: 14px;
}
.studio-body .purchase-box,
.studio-body .modal-card,
.studio-body .opts-card {
  background: #fff !important;
  color: #0f172a !important;
  border-color: rgba(15,23,42,0.1) !important;
}
.studio-body .modal-backdrop { background: rgba(15, 23, 42, 0.45) !important; }
.studio-body .toast {
  background: #0f172a !important; color: #fff !important;
}
.studio-body .sc-step.on .dot,
.studio-body .sc-step.on i.dot {
  background: linear-gradient(135deg, #7c3aed, #0891b2) !important;
  color: #fff !important;
}
.studio-upgrade-strip {
  background: linear-gradient(90deg, rgba(124,58,237,0.08), rgba(14,165,233,0.05)) !important;
  color: #0f172a !important;
  border-bottom: 1px solid rgba(15,23,42,0.08) !important;
}
.studio-upgrade-strip strong { color: #5b21b6 !important; }
/* Sticky master CTA on mobile studio purchase */
@media (max-width: 700px) {
  .studio-body .btn-master-cta {
    position: sticky; bottom: 12px; z-index: 30;
    min-height: 52px; border-radius: 999px; font-size: 15px;
    box-shadow: 0 12px 32px rgba(109,40,217,0.35);
  }
}

/* ── Mobile product polish v8 ── */
@media (max-width: 700px) {
  .studio-body,
  .demo-body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  .studio-top {
    padding: 10px 12px !important;
    gap: 8px !important;
  }
  .studio-top .sc-steps {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap !important;
    padding-bottom: 4px;
    font-size: 11px;
  }
  .studio-top .sc-step {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .studio-top-right .btn-ghost { display: none; }
  .studio-status-bar .topbar-msg { font-size: 11px; }
  .studio-status-bar .promo-cta { padding: 6px 10px; font-size: 11px; }
  .panel { padding: 12px !important; }
  .wiz-title { font-size: 1.25rem !important; }
  .btn, .btn-primary, .btn-ghost {
    min-height: 48px !important;
  }
  .btn-master-cta {
    position: sticky;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 25;
    min-height: 52px !important;
    border-radius: 999px !important;
    font-size: 15px !important;
    box-shadow: 0 12px 32px rgba(109,40,217,0.4) !important;
  }
  .share-btns {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .share-btn {
    min-height: 48px !important;
    width: 100%;
    justify-content: center;
  }
  .demo-layout {
    grid-template-columns: 1fr !important;
    padding: 12px 12px 100px !important;
  }
  .demo-sticky-cta { display: block !important; }
  .ab-side-by-side {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .style-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .style-card { min-height: 96px; }
  input, select, textarea, .btn {
    font-size: 16px !important; /* prevent iOS zoom */
  }
  .btn, .btn-sm { font-size: 14px !important; }
}

/* Mobile v9 studio/demo */
@media (max-width: 700px) {
  .layout, .layout-sc {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
  }
  .library {
    border-right: none !important;
    border-bottom: 1px solid rgba(15,23,42,0.08);
    max-height: 40vh;
    overflow: auto;
  }
  .ab { border-left: none !important; order: 3; }
  .stage { order: 2; }
  .studio-upgrade-strip {
    flex-direction: column;
    text-align: center;
    font-size: 12px;
    padding: 10px 12px !important;
  }
  .studio-upgrade-strip .btn { width: 100%; }
  .purchase-box, .share-earn-box, .share-lock-gate {
    padding: 14px !important;
  }
  .credits-bar {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .credits-copy { grid-column: 1 / -1; }
  .wiz-foot {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .wiz-foot .btn { width: 100%; }
  .demo-promo .topbar-msg { font-size: 11px; }
  .demo-sticky-cta {
    display: block !important;
    z-index: 80;
  }
  .ab-big-play {
    min-width: 56px !important;
    min-height: 56px !important;
  }
  audio { width: 100%; max-width: 100%; }
}
@media (max-width: 420px) {
  .studio-top .user-chip span:not(.av) { display: none; }
  .studio-top .pill { font-size: 10px; }
}
