/* ============ Driftwave — styles ============ */
:root {
  --bg: #0b0716;
  --bg-2: #130c24;
  --card: rgba(255, 255, 255, 0.055);
  --card-brd: rgba(255, 255, 255, 0.09);
  --text: #f4efff;
  --muted: #a99cc6;
  --dim: #6f6390;
  --a1: #a78bfa; /* violet */
  --a2: #f472b6; /* pink */
  --a3: #fb923c; /* amber */
  --a4: #22d3ee; /* cyan */
  --grad: linear-gradient(110deg, var(--a1), var(--a2) 55%, var(--a3));
  --radius: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Outfit", system-ui, -apple-system, sans-serif;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.file-input { display: none; }
[hidden] { display: none !important; }

/* ---------- background ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(1200px 800px at 50% -10%, #241245 0%, var(--bg) 60%); }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; mix-blend-mode: screen; will-change: transform; }
.b1 { width: 52vmax; height: 52vmax; background: #6d28d9; top: -18vmax; left: -12vmax; animation: float1 22s ease-in-out infinite; }
.b2 { width: 42vmax; height: 42vmax; background: #db2777; bottom: -18vmax; right: -10vmax; animation: float2 26s ease-in-out infinite; opacity: .38; }
.b3 { width: 30vmax; height: 30vmax; background: #0891b2; top: 35%; left: 45%; animation: float3 30s ease-in-out infinite; opacity: .25; }
body.playing .blob { animation-duration: 9s, 9s; }
@keyframes float1 { 50% { transform: translate(12vmax, 8vmax) scale(1.1); } }
@keyframes float2 { 50% { transform: translate(-10vmax, -6vmax) scale(1.15); } }
@keyframes float3 { 50% { transform: translate(-14vmax, 10vmax) scale(.85); } }
.grain { position: absolute; inset: -50%; opacity: .07; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 20px 12px;
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: linear-gradient(to bottom, rgba(11, 7, 22, .75), rgba(11, 7, 22, .35));
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.brand-mark { display: flex; align-items: center; gap: 3px; height: 26px; }
.brand-mark i { width: 4px; border-radius: 4px; background: var(--grad); animation: bars 1.2s ease-in-out infinite; }
.brand-mark i:nth-child(1) { height: 40%; animation-delay: -.2s; }
.brand-mark i:nth-child(2) { height: 75%; animation-delay: -.5s; }
.brand-mark i:nth-child(3) { height: 100%; animation-delay: -.1s; }
.brand-mark i:nth-child(4) { height: 65%; animation-delay: -.7s; }
.brand-mark i:nth-child(5) { height: 35%; animation-delay: -.35s; }
body:not(.playing) .brand-mark i { animation-play-state: paused; }
@keyframes bars { 50% { transform: scaleY(.45); } }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav-btn { white-space: nowrap; background: none; border: 0; padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 500; transition: .25s var(--ease); }
.nav-btn:hover:not(:disabled) { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav-btn:disabled { opacity: .35; cursor: default; }
.nav-btn.active { color: var(--text); background: rgba(255, 255, 255, .09); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: rgba(167, 139, 250, .25); color: #e9e2ff; font-size: 12px; margin-left: 4px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 14px; padding: 12px 18px; font-weight: 600; transition: transform .2s var(--spring), box-shadow .3s, background .3s; }
.btn:active { transform: scale(.96); }
.btn-ghost { background: rgba(255, 255, 255, .07); border: 1px solid var(--card-brd); padding: 8px 14px; cursor: pointer; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-primary { background: var(--grad); background-size: 200% 100%; color: #1a0b2e; box-shadow: 0 8px 30px -8px rgba(244, 114, 182, .6); }
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 10px 40px -6px rgba(244, 114, 182, .8); }
.btn-primary:disabled { opacity: .5; cursor: progress; }
.link-btn { background: none; border: 0; color: var(--a1); font-weight: 600; font-size: 14px; cursor: pointer; padding: 4px; }
.link-btn:hover { color: var(--a2); }

/* ---------- landing ---------- */
.landing { min-height: calc(100dvh - 70px); display: grid; place-items: center; padding: 24px 16px 60px; }
.hero { max-width: 760px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 7px 14px; border: 1px solid var(--card-brd); border-radius: 99px; background: rgba(255, 255, 255, .04); animation: rise .8s var(--ease) both; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px #4ade80; }
.hero-title { font-size: clamp(44px, 10vw, 96px); line-height: .98; letter-spacing: -.045em; margin: 26px 0 30px; font-weight: 800; }
.hero-title .line { display: block; animation: rise 1s var(--ease) both; }
.hero-title .line:nth-child(2) { animation-delay: .12s; }
.grad { background: var(--grad); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: rise 1s var(--ease) .12s both, shimmer 6s linear infinite; }
@keyframes shimmer { to { background-position: 200% center; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(6px); } }

.demo-sliders { display: grid; gap: 14px; max-width: 440px; margin: 0 auto 30px; animation: rise 1s var(--ease) .25s both; }
.demo { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); text-align: right; }
.track { position: relative; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .15); }
.k { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px rgba(167, 139, 250, .25), 0 0 20px rgba(244, 114, 182, .7); }
.k::before { content: ""; position: absolute; right: 9px; top: 7px; height: 4px; width: 400px; border-radius: 4px; background: var(--grad); opacity: .9; clip-path: inset(0 0 0 0); }
.track { overflow: visible; clip-path: inset(-20px 0 -20px 0); }
.k1 { animation: slide1 7s ease-in-out infinite; }
.k2 { animation: slide2 9s ease-in-out infinite; }
.k3 { animation: slide3 8s ease-in-out infinite; }
@keyframes slide1 { 0%, 100% { left: 70%; } 40% { left: 28%; } 70% { left: 40%; } }
@keyframes slide2 { 0%, 100% { left: 15%; } 45% { left: 72%; } 75% { left: 55%; } }
@keyframes slide3 { 0%, 100% { left: 30%; } 35% { left: 85%; } 65% { left: 50%; } }

.hero-sub { font-size: clamp(17px, 2.4vw, 20px); color: var(--muted); line-height: 1.5; margin: 0 auto 34px; max-width: 560px; animation: rise 1s var(--ease) .35s both; }
.hero-sub em { color: var(--text); font-style: normal; }
.cta { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: min(100%, 440px); padding: 22px 30px; border-radius: 999px; font-size: 19px; font-weight: 700; color: #1a0b2e; background: var(--grad); background-size: 200% 100%; cursor: pointer; transition: transform .35s var(--spring), background-position .6s; animation: rise 1s var(--ease) .45s both; isolation: isolate; }
.cta:hover { transform: translateY(-3px) scale(1.02); background-position: 100% 0; }
.cta:active { transform: scale(.97); }
.cta svg { width: 24px; height: 24px; stroke-width: 2.4; }
.cta-glow { position: absolute; inset: -6px; border-radius: inherit; background: var(--grad); filter: blur(24px); opacity: .55; z-index: -1; animation: pulse 3s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .9; transform: scale(1.04); } }
.hint { color: var(--dim); font-size: 14px; margin: 16px 0 40px; animation: rise 1s var(--ease) .55s both; }
.features { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.features li { padding: 9px 15px; border-radius: 99px; background: var(--card); border: 1px solid var(--card-brd); color: var(--muted); font-size: 14px; animation: rise .8s var(--ease) both; }
.features li b { margin-right: 6px; font-weight: 400; }
.features li:nth-child(1) { animation-delay: .6s; } .features li:nth-child(2) { animation-delay: .66s; } .features li:nth-child(3) { animation-delay: .72s; }
.features li:nth-child(4) { animation-delay: .78s; } .features li:nth-child(5) { animation-delay: .84s; } .features li:nth-child(6) { animation-delay: .9s; }

/* ---------- studio layout ---------- */
.studio { padding: 20px 16px 40px; animation: fadeIn .6s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(16px); } }
.studio-grid { display: grid; gap: 18px; max-width: 1400px; margin: 0 auto; grid-template-columns: 1fr; grid-template-areas: "player" "fx" "queue"; }
.studio-grid > * { min-width: 0; }
.player { grid-area: player; } .fx { grid-area: fx; } .queue { grid-area: queue; }
@media (min-width: 900px) {
  .studio-grid { grid-template-columns: 1.15fr 1fr; grid-template-areas: "player fx" "queue fx"; align-items: start; }
}
@media (min-width: 1280px) {
  .studio-grid { grid-template-columns: 300px 1.2fr 1fr; grid-template-areas: "queue player fx"; }
  .queue { position: sticky; top: 90px; max-height: calc(100dvh - 110px); overflow: auto; }
}
.card { background: var(--card); border: 1px solid var(--card-brd); border-radius: var(--radius); padding: 22px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06); }
.card h2 { font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0; }

/* ---------- player ---------- */
.now { text-align: center; }
.now-title { font-size: clamp(18px, 2.4vw, 24px); font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-sub { color: var(--muted); font-size: 14px; margin-top: 4px; min-height: 1.2em; }
.viz-wrap { position: relative; width: min(100%, 360px); aspect-ratio: 1; margin: 6px auto 0; }
#viz { width: 100%; height: 100%; display: block; }
.disc { position: absolute; inset: 31%; border-radius: 50%; border: 0; background: radial-gradient(circle at 30% 25%, #ffffff33, transparent 50%), var(--grad); display: grid; place-items: center; color: #1a0b2e; box-shadow: 0 0 60px -10px rgba(244, 114, 182, .8), inset 0 -10px 30px rgba(0, 0, 0, .25); transition: transform .4s var(--spring); transform: scale(var(--pulse, 1)); }
.disc:hover { filter: brightness(1.08); }
.disc svg { width: 34%; height: 34%; fill: currentColor; stroke: none; }
.i-pause { display: none; }
body.playing .i-play { display: none; }
body.playing .i-pause { display: block; }

.wave-wrap { position: relative; height: 72px; margin-top: 14px; cursor: pointer; touch-action: none; }
#wave { width: 100%; height: 100%; display: block; }
.wave-hover { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255, 255, 255, .7); pointer-events: none; opacity: 0; transition: opacity .2s; }
.wave-hover span { position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -4px); font-size: 12px; background: #fff; color: #1a0b2e; padding: 2px 6px; border-radius: 6px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wave-wrap:hover .wave-hover { opacity: 1; }
.times { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 8px; }
.speed-tag { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: rgba(167, 139, 250, .16); color: #ddd2ff; }

.transport { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.icon-btn { width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .06); display: grid; place-items: center; transition: transform .25s var(--spring), background .2s; }
.icon-btn:hover { background: rgba(255, 255, 255, .12); }
.icon-btn:active { transform: scale(.88); }
.play-btn { width: 70px; height: 70px; border-radius: 50%; border: 0; background: #fff; color: #1a0b2e; display: grid; place-items: center; box-shadow: 0 10px 40px -8px rgba(255, 255, 255, .5); transition: transform .3s var(--spring); }
.play-btn:hover { transform: scale(1.06); }
.play-btn:active { transform: scale(.92); }
.play-btn svg { width: 30px; height: 30px; fill: currentColor; stroke: none; }
.sub-transport { display: flex; justify-content: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.chip-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--card-brd); background: rgba(255, 255, 255, .04); color: var(--muted); font-size: 14px; font-weight: 500; transition: .25s var(--ease); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.chip-toggle svg { width: 17px; height: 17px; }
.chip-toggle:hover { color: var(--text); }
.chip-toggle.on { color: #1a0b2e; background: var(--a1); border-color: transparent; }

/* ---------- presets & tabs ---------- */
.fx-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.presets { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -4px 14px; scrollbar-width: none; scroll-snap-type: x proximity; }
.presets::-webkit-scrollbar { display: none; }
.preset { position: relative; flex: none; scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 112px; padding: 11px 14px; border-radius: 16px; border: 1px solid var(--card-brd); background: rgba(255, 255, 255, .04); text-align: left; transition: transform .3s var(--spring), background .25s, border-color .25s; }
.preset:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .08); }
.preset:active { transform: scale(.95); }
.preset .p-emoji { font-size: 20px; }
.preset .p-name { font-weight: 600; font-size: 14px; }
.preset .p-desc { font-size: 11.5px; color: var(--dim); }
.preset.active { border-color: transparent; background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.preset .p-del { position: absolute; top: 4px; right: 6px; font-size: 14px; color: var(--dim); background: none; border: 0; padding: 2px 4px; }
.preset .p-del:hover { color: var(--a2); }

.tabs { position: relative; display: flex; gap: 2px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, .25); overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; z-index: 1; flex: 1; border: 0; background: none; padding: 9px 10px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: 14px; white-space: nowrap; transition: color .25s; }
.tab.active { color: #1a0b2e; }
.tab .tab-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--a2); margin-left: 5px; vertical-align: middle; }
.tab.active .tab-dot { background: #1a0b2e; }
.tab-ink { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 10px; background: #fff; transition: transform .45s var(--spring), width .45s var(--spring); }

.panels { position: relative; margin-top: 18px; min-height: 230px; }
.panel { display: grid; gap: 20px; animation: panelIn .45s var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: translateX(14px); } }

/* ---------- sliders ---------- */
.ctl-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.ctl-label { font-weight: 500; }
.ctl-label small { display: block; color: var(--dim); font-size: 12.5px; font-weight: 400; margin-top: 2px; }
.ctl-val { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; padding: 4px 10px; border-radius: 9px; background: rgba(255, 255, 255, .07); cursor: pointer; user-select: none; -webkit-user-select: none; transition: background .2s, transform .2s var(--spring); min-width: 66px; text-align: center; }
.ctl-val.changed { background: rgba(244, 114, 182, .18); color: #ffd6ea; }
.ctl-val.bump { transform: scale(1.12); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; cursor: pointer; touch-action: pan-y; --fill: 50%; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--a1), var(--a2) calc(var(--fill) * 1.2), var(--a3)) 0 / var(--fill) 100% no-repeat, rgba(255, 255, 255, .12); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .12); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--a1), var(--a2)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 5px rgba(167, 139, 250, .22), 0 4px 14px rgba(0, 0, 0, .4); transition: transform .2s var(--spring), box-shadow .2s; }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 5px rgba(167, 139, 250, .22); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.2); box-shadow: 0 0 0 9px rgba(244, 114, 182, .25), 0 0 24px rgba(244, 114, 182, .7); }
.ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); margin-top: 2px; padding: 0 4px; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--card-brd); cursor: pointer; }
.switch { position: relative; flex: none; width: 50px; height: 30px; border-radius: 99px; background: rgba(255, 255, 255, .15); transition: background .3s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .4s var(--spring); box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.toggle-row.on .switch { background: var(--grad); }
.toggle-row.on .switch::after { transform: translateX(20px); }

/* ---------- export ---------- */
.export { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--card-brd); }
.export-row { display: flex; gap: 10px; }
.export-row .btn-primary { flex: 1; justify-content: center; font-size: 17px; padding: 15px; }
.seg { display: flex; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, .25); }
.seg button { border: 0; background: none; padding: 0 14px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; transition: .25s; }
.seg button.on { background: rgba(255, 255, 255, .12); color: var(--text); }
.progress { position: relative; height: 34px; margin-top: 12px; border-radius: 10px; background: rgba(0, 0, 0, .3); overflow: hidden; display: grid; place-items: center; font-size: 13px; color: var(--muted); }
.progress i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, rgba(167, 139, 250, .5), rgba(244, 114, 182, .5)); transition: width .2s; }
.progress.indeterminate i { width: 35% !important; animation: indet 1.2s ease-in-out infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.progress span { position: relative; }

/* ---------- queue ---------- */
.queue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.q-item { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 14px; cursor: pointer; transition: background .2s, transform .3s var(--spring); animation: rise .5s var(--ease) both; }
.q-item:hover { background: rgba(255, 255, 255, .06); }
.q-item.current { background: rgba(167, 139, 250, .14); }
.q-art { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; background: linear-gradient(135deg, hsl(var(--h) 70% 55%), hsl(calc(var(--h) + 60) 70% 45%)); }
.q-item.current .q-art { box-shadow: 0 0 18px hsl(var(--h) 80% 60% / .6); }
.q-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-meta { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-del { border: 0; background: none; color: var(--dim); padding: 6px; border-radius: 8px; opacity: .6; }
.q-del:hover { color: var(--a2); opacity: 1; background: rgba(255, 255, 255, .06); }
.q-del svg { width: 16px; height: 16px; }
.queue-empty { color: var(--dim); font-size: 13px; margin: 14px 4px 0; }
.mini-eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.mini-eq i { width: 3px; background: #fff; border-radius: 2px; animation: bars .9s ease-in-out infinite; height: 100%; }
.mini-eq i:nth-child(2) { animation-delay: -.3s; } .mini-eq i:nth-child(3) { animation-delay: -.6s; }
body:not(.playing) .mini-eq i { animation-play-state: paused; }

/* ---------- overlays ---------- */
.drop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(11, 7, 22, .8); backdrop-filter: blur(10px); opacity: 0; pointer-events: none; transition: opacity .25s; font-size: 24px; font-weight: 700; }
.drop.show { opacity: 1; }
.drop-inner { display: grid; place-items: center; gap: 20px; }
.drop-ring { width: 120px; height: 120px; border-radius: 50%; border: 3px dashed var(--a1); animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; justify-items: center; gap: 18px; background: rgba(11, 7, 22, .7); backdrop-filter: blur(8px); color: var(--muted); }
.eq { display: flex; gap: 6px; align-items: flex-end; height: 48px; }
.eq i { width: 8px; height: 100%; border-radius: 6px; background: var(--grad); animation: bars .8s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.2s; } .eq i:nth-child(3) { animation-delay: -.4s; } .eq i:nth-child(4) { animation-delay: -.6s; } .eq i:nth-child(5) { animation-delay: -.1s; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 70; transform: translate(-50%, 140%); padding: 12px 20px; border-radius: 14px; background: #fff; color: #1a0b2e; font-weight: 600; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .6); transition: transform .5s var(--spring); max-width: calc(100% - 32px); text-align: center; }
.toast.show { transform: translate(-50%, 0); }

.modal { border: 1px solid var(--card-brd); border-radius: var(--radius); background: var(--bg-2); color: var(--text); padding: 26px; width: min(92vw, 420px); }
.modal::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); }
.modal[open] { animation: rise .4s var(--ease); }
.modal h3 { margin: 0 0 16px; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0 0 22px; color: var(--muted); }
.keys dt { color: var(--text); }
kbd { font-family: inherit; font-size: 13px; padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, .1); border-bottom: 2px solid rgba(255, 255, 255, .15); }

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  .topbar { padding-left: 16px; padding-right: 16px; }
  #navHelp { display: none; }
  .add-top span { display: none; }
  .nav-btn { padding: 8px 10px; }
  .card { padding: 18px; border-radius: 20px; }
  .studio { padding: 12px 12px 40px; }
  .viz-wrap { width: min(100%, 300px); }
  .transport { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
