/* Alexandrit Studio - colours sampled from a lamp-lit alexandrite crystal.
   Flat surfaces, thin borders, one accent per action. No glow, no gradients. */
:root {
    --bg: #120d13;
    --bg-2: #171118;
    --card: #1a141b;
    --card-2: #211923;
    --line: #2b222d;
    --line-2: #382d3b;
    --text: #f1ecf2;
    --soft: #b9aebd;
    --mute: #8a7f8e;
    --mag: #b02660;
    --mag-t: #e0659b;
    --orc: #a72faa;
    --vio: #8a3fd8;
    --vio-t: #b18cf3;
    --ind: #5a32c2;
    --plum: #3a1532;
    --lil: #d6aef5;
    --crys: #5b7cf0;     /* Crystal: the blue side of the stone */
    --crys-t: #9db2ff;
    --prism: #d9468a;    /* Prism: the pink side */
    --prism-t: #f08bba;
    --obs: #8d90ab;      /* Obsidian: dark volcanic glass with a cold sheen */
    --obs-t: #c8cbe0;
    --ok: #4cc38a;
    --warn: #f0b44c;
    --sans: Geist, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'Geist Mono', ui-monospace, Consolas, monospace;
    --r: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { opacity: .45; cursor: default; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-feature-settings: 'tnum'; }
.grow { flex: 1; }
.hint { color: var(--mute); font-size: 13px; }
:focus-visible { outline: 2px solid var(--vio-t); outline-offset: 2px; }

/* ---------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 28px; height: 64px; padding: 0 28px; background: rgba(18,13,19,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.mark { width: 30px; height: 30px; display: block; }
.wm { font: 600 21px var(--sans); letter-spacing: -.03em; }
.nav { display: flex; gap: 4px; }
.nav button { padding: 7px 14px; border-radius: 8px; font-weight: 500; color: var(--soft); }
.nav button:hover { color: var(--text); background: var(--card); }
.nav button.on { color: var(--text); background: var(--card-2); }
.who { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 8px; font-weight: 500; color: var(--soft); }
.who:hover, .who.on { color: var(--text); background: var(--card-2); }
.who i { width: 8px; height: 8px; border-radius: 50%; }

/* ---------------------------------------------------------------- basics */
main { flex: 1; width: min(1280px, 100%); margin: 0 auto; padding: 40px 28px 64px; }
.view { display: none; }
.view.on { display: block; animation: in .3s ease both; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .view.on { animation: none; } }
h1, .h1 { font: 600 52px/1.05 var(--sans); letter-spacing: -.035em; }
h1 em { font-style: normal; color: var(--mag-t); }
h1 i { font-style: normal; color: var(--vio-t); }
.h1 { font-size: 40px; }
h2 { font: 600 20px var(--sans); letter-spacing: -.02em; }
h3 { font: 600 15px var(--sans); letter-spacing: -.01em; }
.lede { margin-top: 18px; font-size: 19px; color: var(--soft); max-width: 560px; }
.lede.sm { font-size: 16px; margin-top: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.card-h { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.lbl { display: block; margin: 18px 0 7px; font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.field { width: 100%; height: 42px; padding: 0 12px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 9px; color: var(--text); outline: 0; }
.field:focus { border-color: var(--vio); }
select.field { cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 9px; font-weight: 600; background: var(--card-2); border: 1px solid var(--line-2); color: var(--text); text-decoration: none; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--mute); }
.btn.primary { background: var(--vio); border-color: var(--vio); color: #fff; }
.btn.primary:hover:not(:disabled) { background: #9650e0; border-color: #9650e0; }
.btn.wide { width: 100%; height: 46px; margin-top: 20px; font-size: 16px; }
.btn.sm, .ghost.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.ghost { height: 36px; padding: 0 12px; border-radius: 8px; font-weight: 500; color: var(--soft); }
.ghost:hover { color: var(--text); background: var(--card-2); }
.seg { display: flex; padding: 3px; gap: 3px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; }
.seg button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; height: 34px; border-radius: 7px; font-weight: 500; font-size: 14px; color: var(--soft); }
.seg button.on { background: var(--card-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.rec { background: var(--mag); }
.msg { margin-top: 14px; padding: 10px 12px; border-radius: 9px; font-size: 14px; background: rgba(240,180,76,.08); border: 1px solid rgba(240,180,76,.3); color: #f6d39a; }
.warn { margin-top: 8px; font: 500 13px var(--mono); color: var(--mag-t); }
.empty { padding: 28px 0; color: var(--mute); }
.empty.sm { padding: 10px 0; font-size: 14px; }
.bar { height: 4px; margin-top: 14px; border-radius: 2px; background: var(--bg-2); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--vio); }

/* ---------------------------------------------------------------- login */
.hero { display: grid; grid-template-columns: 1.2fr 420px; gap: 64px; align-items: center; min-height: 60vh; }
.login h2 { margin-bottom: 4px; }
.login .hint { margin-top: 12px; }

/* ---------------------------------------------------------------- studio */
.cols { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 24px; align-items: start; }
.tabs { margin-bottom: 14px; }
.pane { display: none; } .pane.on { display: block; }
#wave { display: block; width: 100%; height: 112px; margin-top: 10px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--line); }
.meter { height: 4px; margin-top: 8px; border-radius: 2px; background: var(--bg-2); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--vio); transition: width .06s linear; }
.rec-row { display: flex; align-items: center; gap: 16px; margin: 18px 0 10px; }
.recbtn { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line-2); }
.recbtn span { width: 24px; height: 24px; border-radius: 50%; background: var(--mag); transition: border-radius .2s, transform .2s; }
.recbtn:hover { border-color: var(--mute); }
.recbtn.on { border-color: var(--mag); }
.recbtn.on span { border-radius: 5px; transform: scale(.8); }
.time { font-size: 30px; font-weight: 500; letter-spacing: -.02em; }
#take { width: 100%; height: 38px; margin-bottom: 8px; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 18px; text-align: center; border: 1px dashed var(--line-2); border-radius: 10px; cursor: pointer; color: var(--soft); }
.drop:hover, .drop.over { border-color: var(--vio); background: rgba(138,63,216,.06); }
.drop input { display: none; }
.drop b { font-weight: 600; color: var(--text); word-break: break-word; }
.presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.preset { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 11px 12px; text-align: left; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.preset b { font-weight: 600; font-size: 16px; }
.preset .mono { font-size: 12px; color: var(--mute); }
.preset small { font-size: 12px; line-height: 1.35; color: var(--mute); margin-top: 4px; }
.preset.on { border-color: var(--vio); background: rgba(138,63,216,.08); }
.preset.on .mono { color: var(--vio-t); }
.preset[data-p=studio] b { color: var(--crys-t); } .preset[data-p=em] b { color: var(--prism-t); } .preset[data-p=obsidian] b, .preset[data-p=deep] b { color: var(--obs-t); }
.preset[data-p=studio].on { border-color: var(--crys); background: rgba(91,124,240,.08); } .preset[data-p=studio].on .mono { color: var(--crys-t); }
.preset[data-p=em].on { border-color: var(--prism); background: rgba(217,70,138,.08); } .preset[data-p=em].on .mono { color: var(--prism-t); }
.preset[data-p=obsidian].on, .preset[data-p=deep].on { border-color: var(--obs); background: rgba(141,144,171,.09); } .preset[data-p=obsidian].on .mono, .preset[data-p=deep].on .mono { color: var(--obs-t); }
#limits { margin-top: 10px; }

.list-h { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 14px; }
#jobs { display: grid; gap: 10px; }
.job { padding: 14px 16px; }
.job-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tag { flex: none; padding: 2px 8px; border-radius: 6px; font: 500 12px var(--mono); background: rgba(91,124,240,.16); color: var(--crys-t); }
.tag.em { background: rgba(217,70,138,.16); color: var(--prism-t); }
.tag.obsidian, .tag.deep { background: rgba(141,144,171,.18); color: var(--obs-t); }
.tag.fx { background: rgba(90,50,194,.18); color: #a69af0; }
.tag.soft { background: var(--card-2); color: var(--soft); }
.jn { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; color: var(--mute); }
.icon:hover { color: var(--text); background: var(--card-2); }
.prog { position: relative; height: 26px; margin-top: 12px; border-radius: 7px; background: var(--bg-2); overflow: hidden; }
.prog i { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(138,63,216,.35); transition: width .4s; }
.prog span { position: relative; display: block; padding: 0 10px; font: 500 12px/26px var(--mono); color: var(--soft); }
.prog.err i { width: 100% !important; background: rgba(240,180,76,.15); }
.ab { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.play { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--text); color: var(--bg); }
.play .pa, .play.on .pl { display: none; } .play.on .pa { display: block; }
.seek { position: relative; flex: 1; height: 6px; border-radius: 3px; background: var(--bg-2); cursor: pointer; }
.seek i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; }
.seek .buf { background: var(--line-2); } .seek .pos { background: var(--vio-t); }
.tm { flex: none; min-width: 86px; text-align: right; font-size: 13px; color: var(--soft); }
.sw { flex: none; width: 170px; }
.sw button { height: 28px; font-size: 13px; }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.facts { margin-left: auto; font-size: 12px; }
.addwrap { position: relative; }
.menu { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; min-width: 190px; padding: 6px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line-2); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.menu a, .menu button { display: block; width: 100%; padding: 8px 10px; border-radius: 7px; text-align: left; font-size: 14px; color: var(--text); text-decoration: none; }
.menu a:hover, .menu button:hover { background: var(--card); }
.menu .grp { padding: 10px 10px 4px; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.fmt { left: 0; right: auto; min-width: 160px; }

/* ---------------------------------------------------------------- fx lab */
.fx-head { margin-bottom: 24px; }
.fx-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.takes { display: grid; gap: 6px; max-height: 460px; overflow: auto; }
.takes button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; text-align: left; border: 1px solid transparent; }
.takes button:hover { background: var(--card-2); }
.takes button.on { border-color: var(--vio); background: rgba(138,63,216,.08); }
.takes b { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--soft); }
.chip:hover { color: var(--text); border-color: var(--mute); }
.chain-h { margin-top: 24px; }
.chain { display: grid; gap: 10px; }
.fxc { border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); padding: 12px 14px 14px; }
.fxc-h { display: flex; align-items: center; gap: 10px; }
.fxc-h .n { font: 500 12px var(--mono); color: var(--mute); width: 18px; }
.fxc-h b { font-weight: 600; }
.fxc-h .cat { font-size: 12px; color: var(--mute); }
.fxc-h .icon { width: 28px; height: 28px; }
.params { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 22px; margin-top: 10px; }
.param { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; }
.param label { font-size: 13px; color: var(--soft); }
.param .v { font: 500 12px var(--mono); color: var(--text); }
.param input[type=range] { grid-column: 1 / -1; }
.param.toggle { grid-template-columns: 1fr auto; }
.param.toggle .seg { width: 150px; padding: 2px; } .param.toggle .seg button { height: 26px; font-size: 12px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--line-2); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--text); border: 0; }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line-2); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 0; }
.fx-foot { display: grid; grid-template-columns: 1fr 320px; gap: 28px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.pv-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.pv-row input[type=range] { flex: 1; }
#fx-audio { flex: 1; height: 38px; }
.rd .btn.wide { margin-top: 12px; }

/* ---------------------------------------------------------------- auth + account */
#auth-tabs { margin-bottom: 4px; }
.acc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 24px; align-items: start; }
.store { height: 8px; border-radius: 4px; background: var(--bg-2); overflow: hidden; margin-bottom: 10px; }
.store i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--crys), var(--vio) 60%, var(--prism)); transition: width .6s; }
.btn.del { background: rgba(217,70,138,.12); border-color: rgba(217,70,138,.4); color: var(--prism-t); }
.btn.del:hover:not(:disabled) { border-color: var(--prism); }
.msg.ok { background: rgba(76,195,138,.08); border-color: rgba(76,195,138,.3); color: #9be3c0; }
@media (max-width: 960px) { .acc-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- mic */
.micapp { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; padding: 32px; }
.steps { margin: 20px 0 0 20px; color: var(--soft); line-height: 1.8; }
.dl-box { display: flex; flex-direction: column; gap: 10px; }
.dl-box .btn.wide { margin: 0; }

.foot { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 18px 28px; border-top: 1px solid var(--line); color: var(--mute); font-size: 13px; }
.foot-brand { display: flex; align-items: center; gap: 8px; color: var(--soft); }
.foot-brand .wm { font-size: 15px; }
.mark.sm { width: 20px; height: 20px; }

/* language switch: the flags cut into a diamond (a square stood on its corner) */
.flags { display: inline-flex; gap: 2px; align-items: center; }
.flag { position: relative; width: 30px; height: 30px; padding: 0; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    opacity: .42; filter: saturate(.5); transition: opacity .15s, filter .15s, transform .15s; }
.flag svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.flag:hover { opacity: .8; filter: none; }
.flag.on { opacity: 1; filter: none; transform: scale(1.08); }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 960px) {
    .hero, .cols, .fx-grid, .micapp, .fx-foot { grid-template-columns: 1fr; }
    .hero { gap: 32px; min-height: 0; }
    h1 { font-size: 38px; }
    main { padding: 24px 16px 48px; }
    .top { padding: 0 16px; gap: 14px; }
    .who span { display: none; }
}
@media (max-width: 560px) {
    .wm { display: none; }
    .presets { grid-template-columns: 1fr; }
    .ab { flex-wrap: wrap; } .seek { order: 3; flex-basis: 100%; } .facts { margin-left: 0; flex-basis: 100%; }
}

/* ---------------------------------------------------------------- song */
.tag.song { background: rgba(167,47,170,.18); color: #e199e3; }
.drop.part { position: relative; padding: 20px 16px 18px; margin-top: 12px; gap: 4px; }
.drop.part .part-k { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.drop.part.done { border-style: solid; border-color: var(--line-2); background: var(--bg-2); }
.drop.part.done .part-k { color: var(--vio-t); }
.drop.part .bar { width: 100%; margin-top: 8px; }
.remix { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; }
.remix span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--soft); }
.song-params { margin: 6px 0 4px; }
#song-mode { margin-bottom: 4px; }
.song-segs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 22px; margin-top: 8px; }
.param .v.auto { color: var(--mute); }
.yt { display: flex; gap: 8px; margin-top: 8px; }
.refbox { margin-top: 14px; padding-top: 4px; border-top: 1px dashed var(--line-2); }
.drop.part[data-k=ref] .part-k { color: var(--lil); }
.yt .field { flex: 1; min-width: 0; margin: 0; height: 36px; font-size: 13px; }
.yt .btn { height: 36px; }
.tag.master { background: rgba(214,174,245,.14); color: var(--lil); }

/* mix & master stages */
.stage + .stage { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.stage-p { margin: 2px 0 10px; }
.autotune { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 4px 22px; margin-top: 12px; }
.autotune .field { margin: 0; height: 42px; }
@media (max-width: 700px) { .autotune { grid-template-columns: 1fr; } }
#st-master.by-ref #master-presets { opacity: .45; }
#master-ref { margin: 0 0 10px; }
.mode-p { margin: 8px 0 0; }
.pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pgrid .preset { min-height: 86px; }
.pgrid .preset .mono { color: var(--vio-t); }
.pgrid .preset.on { border-color: var(--vio); background: rgba(138,63,216,.1); }
.tune { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; background: var(--bg-2); }
.tune summary { cursor: pointer; padding: 10px 0; font-size: 13px; font-weight: 500; color: var(--soft); list-style: none; display: flex; align-items: center; gap: 8px; }
.tune summary::-webkit-details-marker { display: none; }
.tune summary::before { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.tune[open] summary::before { transform: rotate(45deg); }
.tune[open] { padding-bottom: 14px; }
.tune .song-params { margin-top: 0; }
@media (max-width: 700px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* mix & master versions */
.mm-col { display: grid; gap: 24px; min-width: 0; }
.vers-list { display: grid; gap: 10px; }
.vers .job { background: var(--bg-2); }
.job .ver { flex: none; font: 600 12px var(--mono); color: var(--vio-t); }
.job.fresh { animation: fresh 1.6s ease; }
@keyframes fresh { 0% { box-shadow: 0 0 0 1px var(--vio); } 100% { box-shadow: 0 0 0 1px transparent; } }

/* ---------------------------------------------------------------- mix & master: app layout
   transport bar on top, three panes below: files | stages | versions */
main:has(#v-song.on) { width: min(1720px, 100%); }
.mm-bar { display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.mm-ttl h1 { font: 600 22px/1.15 var(--sans); letter-spacing: -.02em; }
.mm-ttl p { margin: 2px 0 0; font-size: 13px; }
.mm-bar .seg { flex: none; }
.mm-bar .seg button { flex: none; padding: 0 14px; }
.seg button { white-space: nowrap; }
@media (max-width: 1560px) { .mm-ttl p { display: none; } }
.readout { display: flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; font-size: 12px; background: var(--bg-2); }
.readout span { padding: 9px 12px; color: var(--soft); white-space: nowrap; }
.readout span + span { border-left: 1px solid var(--line-2); }
.readout span:empty { display: none; }
#song-name { width: 190px; height: 40px; }
#v-song > .msg { margin: -6px 0 16px; }
.mm-ws { display: grid; grid-template-columns: 300px minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.mm-pane { padding: 18px; min-width: 0; }
.pane-h { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; min-width: 0; }
.pane-h .hint { font-size: 12px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pane-h .num { font-size: 12px; color: var(--vio-t); }
.mm-pane .drop.part:first-of-type { margin-top: 0; }
.mm-pane .mode-p { margin: 0 0 4px; }
.mm-pane .sync { margin: 10px 0 0; font-size: 12px; }
.mm-stages .stage + .stage { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.pv-line { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; }
.pv-scrub { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 6px; }
.pv-scrub .lbl { margin: 0; }
#song-audio { width: 100%; margin-top: 12px; }
.vers.mm-pane { position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow: hidden auto; }
.vers .stage-p { margin: 0; }
@media (max-width: 1440px) {
    .mm-ws { grid-template-columns: 280px minmax(0, 1fr); }
    .vers.mm-pane { grid-column: 1 / -1; position: static; max-height: none; }
}
@media (max-width: 860px) {
    .mm-ws { grid-template-columns: minmax(0, 1fr); }
    .mm-bar .grow { display: none; }
    #song-name { flex: 1; width: auto; min-width: 0; }
    .readout { order: 5; width: 100%; }
    .pane-h .hint { display: none; }
}

/* header on narrow screens (five tabs): the nav gets its own scrollable row */
@media (max-width: 1000px) {
    .top { height: auto; flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px; }
    .top .grow { display: none; }
    .top .flags { margin-left: auto; }
    .nav { order: 3; width: 100%; overflow-x: auto; }
    .nav button { white-space: nowrap; padding: 6px 10px; }
    .who #who-name { display: inline-block; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
}

/* ---------------------------------------------------------------- instruments */
main:has(#v-inst.on) { width: min(1720px, 100%); }
.in-ws { grid-template-columns: 260px minmax(0, 1fr) 320px; }
.in-list { max-height: calc(100vh - 190px); overflow: hidden auto; }
.in-search { margin: 0 0 10px; height: 38px; }
.in-cat { margin-top: 12px; }
.in-cat .lbl { display: block; margin: 0 0 4px; }
.in-it { display: block; width: 100%; text-align: left; padding: 7px 10px; border-radius: 8px; color: var(--soft); font-size: 14px; }
.in-it:hover { background: var(--card-2); color: var(--text); }
.in-it.on { background: rgba(138,63,216,.14); color: var(--text); box-shadow: inset 2px 0 0 var(--vio); }
.in-credit { margin: 14px 0 0; font-size: 11px; }
.in-ctl { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; }
.in-ctl .param { width: 150px; }
.in-oct .seg { align-items: center; }
.in-oct .seg button { flex: none; width: 36px; }
.in-oct b { min-width: 28px; text-align: center; }
.in-load { margin-top: 14px; display: flex; align-items: center; gap: 12px; }
.in-load .bar { flex: 1; margin: 0; }
.in-help { margin: 12px 0 0; font-size: 12px; }
.mm-bar .in-rec i { width: 9px; height: 9px; border-radius: 50%; background: #fff; }
.mm-bar .in-rec.on { background: #c0392b; border-color: #c0392b; }
.mm-bar .in-rec.on i { animation: recblink 1s steps(2) infinite; }
@keyframes recblink { 50% { opacity: .2; } }

/* the keyboard: white keys share the width, black keys sit on the seams */
.kb-wrap { margin-top: 18px; overflow-x: auto; padding-bottom: 4px; }
.kb { --kw: calc(100% / var(--w)); --bw: calc(var(--kw) * .6); position: relative; height: 230px; min-width: 640px; display: flex; user-select: none; touch-action: none; }
.key { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; padding-bottom: 10px; cursor: pointer; font: 500 11px var(--mono); }
.key.wht { flex: 1; background: linear-gradient(#ece6ef, #f7f3f8); border: 1px solid #2a222c; border-top: 0; border-radius: 0 0 7px 7px; color: #6b5f70; }
.key.wht.on { background: linear-gradient(#cdb7ea, #dccbf2); }
.key.blk { position: absolute; top: 0; width: var(--bw); height: 62%; z-index: 2; background: linear-gradient(#1c171e, #2c2430); border: 1px solid #0d0a0e; border-top: 0; border-radius: 0 0 5px 5px; color: #9d8fa3; padding-bottom: 8px; }
.key.blk.on { background: linear-gradient(#5a32c2, #8a3fd8); color: #fff; }
.key .kn { color: #a395a8; font-size: 10px; }
.key.blk .kn { display: none; }

.in-take { padding: 12px 0; border-top: 1px solid var(--line); }
.in-take:first-child { border-top: 0; }
.it-h { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.it-h b { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it-a { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.it-a .x { margin-left: auto; }
@media (max-width: 1440px) {
    .in-ws { grid-template-columns: 240px minmax(0, 1fr); }
    .in-recs { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
    .in-ws { grid-template-columns: minmax(0, 1fr); }
    .in-list { position: static; max-height: 300px; }
    .kb { height: 190px; }
}

/* drum pads */
.pads { margin-top: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; user-select: none; touch-action: none; }
.pad { position: relative; aspect-ratio: 1.35; min-height: 74px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 12px; border-radius: 12px; background: linear-gradient(#2a2130, #211a26); border: 1px solid var(--line-2); text-align: left; cursor: pointer; transition: background .25s, border-color .25s, transform .05s; }
.pad b { font-weight: 600; font-size: 14px; line-height: 1.2; }
.pad span { font-size: 12px; color: var(--mute); }
.pad:hover { border-color: var(--vio); }
.pad:active { transform: scale(.98); }
.pad.hit { animation: padhit .35s ease-out; }
@keyframes padhit { 0% { background: linear-gradient(#8a3fd8, #5a32c2); border-color: var(--lil); } 100% { background: linear-gradient(#2a2130, #211a26); } }
@media (max-width: 860px) { .pads { gap: 6px; } .pad { padding: 8px; min-height: 64px; } .pad b { font-size: 12px; } }

/* voice -> notes */
.in-voice { margin: 0 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.in-voice .lbl { margin: 0 0 8px; display: block; }
.iv-row { display: flex; flex-wrap: wrap; gap: 6px; }
.iv-row .btn.on { background: #c0392b; border-color: #c0392b; color: #fff; }
.iv-file { cursor: pointer; }
.iv-detect { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--soft); cursor: pointer; }
.iv-detect input { accent-color: var(--vio); }
#in-vst { margin: 8px 0 0; font-size: 12px; }
.it-b { margin-top: 4px; }
.it-b .ghost.sm { height: 28px; font-size: 12px; }

/* own samples (admin) */
.in-own { width: 100%; margin: 0 0 6px; }
.in-it.own { display: flex; align-items: center; gap: 6px; }
.in-it.own span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.in-it.own i { font-style: normal; color: var(--mute); padding: 0 4px; border-radius: 4px; }
.in-it.own i.del:hover { color: #f08b8b; background: rgba(192,57,43,.15); }
.in-it.own i.full { color: var(--warn); }
.in-it.own i.full.has { color: var(--mute); }
.in-it.own i.full:hover { color: var(--text); background: var(--card-2); }
.smp { margin-top: 4px; }
.smp-drop { padding: 22px 16px; }
.smp-tools { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; margin-bottom: 10px; }
.smp-tools .param { width: 180px; }
.smp-wave { overflow-x: auto; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); }
.smp-wave canvas { display: block; height: 150px; cursor: crosshair; touch-action: none; }
.smp-hint { margin: 8px 0 0; font-size: 12px; }
.smp-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.smp-row .seg { flex: none; }
.smp-row .field { margin: 0; height: 36px; width: auto; }
.smp-row select.field { width: 120px; }
.smp-slices { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.smp-sl { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 8px; border-radius: 8px; background: var(--card-2); border: 1px solid var(--line-2); font-size: 12px; position: relative; }
.smp-sl b { font: 600 13px var(--mono); }
.smp-sl span { color: var(--mute); font: 11px var(--mono); }
.smp-sl i { position: absolute; top: 2px; right: 6px; font-style: normal; color: var(--mute); cursor: pointer; }
.smp-sl i:hover { color: #f08b8b; }
.smp-save .field { flex: 1; min-width: 160px; }
@media (max-width: 860px) { .smp-slices { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* ---------------------------------------------------------------- Stúdió (daw): one workspace */
main:has(#v-daw.on) { width: 100%; padding: 8px 10px 0; }
body:has(#v-daw.on) .foot { display: none; }
#v-daw.on { animation: none; }
.dw-app { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - 82px); min-height: 520px; background: #120d13; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; user-select: none; }
.dw-app svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* toolbar */
.dw-tb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 6px 10px; background: linear-gradient(#1d161f, #19131a); border-bottom: 1px solid var(--line-2); }
.dw-grp { display: flex; align-items: center; gap: 4px; padding-right: 10px; border-right: 1px solid var(--line); }
.dw-grp:last-child { border-right: 0; padding-right: 0; }
.dw-tbtn { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 6px; color: var(--soft); cursor: pointer; }
.dw-tbtn:hover { color: var(--text); background: var(--card-2); }
.dw-tbtn.dw-txt { padding: 0 10px; font-size: 12px; font-weight: 600; border: 1px solid var(--line-2); }
.dw-tbtn.dw-acc { background: var(--vio); border-color: var(--vio); color: #fff; }
.dw-tbtn.dw-acc:hover { background: #9650e0; }
.dw-tog.on { color: var(--vio-t); background: rgba(138,63,216,.16); }
.dw-pname { width: 120px; height: 30px; padding: 0 8px; border-radius: 6px; background: #120d13; border: 1px solid var(--line); color: var(--text); font-size: 13px; outline: 0; }
.dw-pname:focus { border-color: var(--vio); }
.dw-ps { display: flex; padding: 2px; gap: 2px; background: #120d13; border: 1px solid var(--line); border-radius: 7px; }
.dw-ps button { height: 24px; padding: 0 9px; border-radius: 5px; font-size: 12px; font-weight: 500; color: var(--mute); }
.dw-ps button.on { color: var(--text); background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.dw-tr { display: grid; place-items: center; width: 32px; height: 30px; border-radius: 6px; color: var(--soft); background: #120d13; border: 1px solid var(--line); }
.dw-tr:hover { color: var(--text); border-color: var(--line-2); }
.dw-tr svg { fill: currentColor; stroke: none; }
.dw-playb .pa { display: none; }
.dw-playb.on { color: #fff; background: var(--vio); border-color: var(--vio); }
.dw-playb.on .pl { display: none; } .dw-playb.on .pa { display: inline; }
.dw-recb { color: var(--mag-t); }
.dw-recb.on { color: #fff; background: #c0392b; border-color: #c0392b; animation: recblink 1s steps(2) infinite; }
.dw-lcd { display: flex; flex-direction: column; justify-content: center; min-width: 108px; height: 34px; padding: 0 10px; border-radius: 6px; background: #0c080d; border: 1px solid var(--line); line-height: 1.05; }
.dw-lcd b { font-size: 16px; font-weight: 500; color: var(--lil); letter-spacing: .02em; }
.dw-lcd span { font-size: 10px; color: var(--mute); }
.dw-field { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; font-family: var(--mono); }
.dw-field input[type=number] { width: 56px; height: 28px; padding: 0 6px; border-radius: 6px; background: #0c080d; border: 1px solid var(--line); color: var(--lil); font-size: 14px; outline: 0; }
.dw-field select { height: 28px; max-width: 130px; padding: 0 6px; border-radius: 6px; background: #120d13; border: 1px solid var(--line); color: var(--text); font: 13px var(--sans); text-transform: none; letter-spacing: 0; outline: 0; }
.dw-swf input { width: 56px; }
.dw-st { max-width: 300px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-wbtn { height: 28px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--mute); border: 1px solid transparent; }
.dw-wbtn:hover { color: var(--text); }
.dw-wbtn.on { color: var(--text); background: var(--card-2); border-color: var(--line-2); }
.dw-out input { width: 64px; }
#dw-meter { width: 70px; height: 10px; border-radius: 2px; }

/* body: browser | workspace */
.dw-body { display: flex; min-height: 0; }
.dw-browser { width: 220px; flex: none; display: flex; flex-direction: column; min-height: 0; background: #161017; border-right: 1px solid var(--line-2); }
.dw-ph-h { display: flex; align-items: baseline; gap: 12px; padding: 7px 10px; font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); background: #1a141b; border-bottom: 1px solid var(--line); }
.dw-ph-h .hint { font: 400 11px var(--sans); letter-spacing: 0; text-transform: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-search { margin: 8px; height: 30px; padding: 0 8px; border-radius: 6px; background: #120d13; border: 1px solid var(--line); color: var(--text); font-size: 13px; outline: 0; }
.dw-cats { flex: 1; min-height: 0; overflow: auto; padding: 0 4px 8px; }
.dw-cat-h { padding: 8px 8px 3px; font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.dw-it { display: block; width: 100%; padding: 4px 8px 4px 16px; text-align: left; font-size: 13px; color: var(--soft); border-radius: 5px; position: relative; }
.dw-it::before { content: ''; position: absolute; left: 6px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 1px; background: var(--line-2); }
.dw-it:hover { color: var(--text); background: var(--card-2); }
.dw-it.kit::before { width: 0; height: 0; border-left: 4px solid var(--soft); border-top: 3px solid transparent; border-bottom: 3px solid transparent; background: none; border-radius: 0; }
.dw-it.kit.open::before { transform: rotate(90deg); }
.dw-it.pad { padding-left: 28px; font-size: 12px; }
.dw-it.pad::before { left: 18px; background: var(--mag); }
.dw-help { padding: 8px 10px; font-size: 11px; color: var(--mute); border-top: 1px solid var(--line); }

.dw-space { position: relative; flex: 1; min-width: 0; overflow: hidden; }
.dw-playlist { position: absolute; inset: 0; display: flex; flex-direction: column; }
.dw-pl-body { flex: 1; min-height: 0; display: flex; }
.dw-picker { width: 120px; flex: none; overflow: auto; padding: 6px; display: flex; flex-direction: column; gap: 3px; background: #161017; border-right: 1px solid var(--line); }
.dw-pick { padding: 5px 8px; border-radius: 5px; text-align: left; font-size: 12px; color: var(--soft); background: #1a141b; border-left: 3px solid var(--c, var(--vio)); }
.dw-pick:hover { color: var(--text); }
.dw-pick.on { color: #fff; background: color-mix(in srgb, var(--c) 35%, #1a141b); }
.dw-pick.add { border-left-color: transparent; text-align: center; color: var(--mute); }
.dw-song-wrap { position: relative; flex: 1; min-width: 0; overflow: auto; }
.dw-song-wrap canvas, .dw-roll-wrap canvas { display: block; touch-action: none; }
.dw-head { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--lil); pointer-events: none; z-index: 2; }

/* floating windows */
.dw-win { position: absolute; display: flex; flex-direction: column; min-width: 280px; min-height: 160px; background: #1a141b; border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 18px 50px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.4); overflow: hidden; z-index: 5; }
.dw-wh { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 6px 0 10px; background: linear-gradient(#251c27, #1f1721); border-bottom: 1px solid var(--line-2); cursor: move; flex-wrap: wrap; }
.dw-wh b { font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); white-space: nowrap; }
.dw-wsel { height: 24px; max-width: 150px; padding: 0 6px; border-radius: 5px; background: #120d13; border: 1px solid var(--line); font: 600 12px var(--sans); outline: 0; cursor: pointer; }
.dw-plus:hover { background: var(--card-2); color: var(--text); }
.dw-wx { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 5px; color: var(--mute); }
.dw-wx:hover { color: #fff; background: #c0392b; }
.dw-wx svg { width: 13px; height: 13px; }
.dw-wtools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; cursor: default; }
.dw-sbtn { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 5px; font-size: 12px; color: var(--soft); background: #120d13; border: 1px solid var(--line); cursor: pointer; }
.dw-sbtn:hover { color: var(--text); border-color: var(--line-2); }
.dw-rec i { width: 7px; height: 7px; border-radius: 50%; background: var(--mag-t); }
.dw-rec.on { background: #c0392b; border-color: #c0392b; color: #fff; }
.dw-rec.on i { background: #fff; animation: recblink 1s steps(2) infinite; }
.dw-wb { flex: 1; min-height: 0; overflow: auto; padding: 8px; }
.dw-rz { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, var(--line-2) 50%, var(--line-2) 60%, transparent 60%, transparent 70%, var(--line-2) 70%, var(--line-2) 80%, transparent 80%); }
.dw-empty { padding: 10px 4px; }

/* channel rack */
.dw-rows { display: grid; gap: 3px; }
.dw-row { display: grid; grid-template-columns: 12px 22px 22px 132px minmax(0, 1fr) 20px; align-items: center; gap: 6px; }
.dw-led { width: 10px; height: 10px; border-radius: 2px; background: #3a2f3d; }
.dw-led.on { background: var(--ok); box-shadow: 0 0 0 1px rgba(76,195,138,.25); }
.dw-knob { width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #3b2f3e, #1d161f); border: 1px solid #0c080d; position: relative; cursor: ns-resize; touch-action: none; }
.dw-knob::after { content: ''; position: absolute; left: 50%; top: 2px; width: 2px; height: 7px; margin-left: -1px; border-radius: 1px; background: var(--lil); transform-origin: 50% 8px; transform: rotate(var(--a, 0deg)); }
.dw-name { display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 4px; background: #2a212c; border: 1px solid #0c080d; color: var(--text); font-size: 12px; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dw-name i { margin-left: auto; font: 500 10px var(--mono); font-style: normal; color: var(--vio-t); }
.dw-name:hover { background: #33283a; }
.dw-row.sel .dw-name { background: #3a2a4c; border-color: var(--vio); }
.dw-row.err .dw-name { color: var(--mute); text-decoration: line-through; }
.dw-steps { display: grid; grid-template-columns: repeat(var(--n), minmax(14px, 1fr)); gap: 2px; }
.dw-step { height: 24px; border-radius: 3px; background: #2b222d; border: 1px solid #0c080d; touch-action: none; }
.dw-step.alt { background: #3a2f3d; }
.dw-step:hover { filter: brightness(1.2); }
.dw-step.on { background: var(--lil); border-color: #0c080d; box-shadow: inset 0 -6px 0 rgba(138,63,216,.55); }
.dw-step.now { outline: 1px solid var(--vio-t); outline-offset: -1px; }
.dw-x { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; color: var(--mute); }
.dw-x:hover { color: #fff; background: #c0392b; }
.dw-x svg { width: 11px; height: 11px; }
.dw-len button { padding: 0 8px; }

/* piano roll */
.dw-rollb { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.dw-roll-wrap { position: relative; flex: 1; min-height: 0; overflow: auto; }
.dw-vel { display: block; width: 100%; flex: none; border-top: 1px solid var(--line-2); touch-action: none; cursor: ns-resize; }

/* mixer */
.dw-mixb { padding: 8px 8px 10px; }
.dw-mix { display: flex; gap: 4px; height: 100%; min-height: 230px; }
.dw-strip { flex: none; width: 70px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 4px; border-radius: 6px; background: #211923; border: 1px solid #0c080d; border-top: 3px solid var(--c, #4a3d4e); }
.dw-strip.master { width: 78px; background: #261d29; border-top-color: var(--vio); margin-right: 6px; }
.dw-strip.sel { background: #2c2134; }
.dw-sn { width: 100%; font-size: 11px; font-weight: 600; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--soft); cursor: pointer; }
.dw-strip.sel .dw-sn { color: var(--vio-t); }
.dw-knobs { display: flex; gap: 8px; }
.dw-fd { flex: 1; display: flex; gap: 6px; align-items: stretch; min-height: 110px; }
.dw-fd input { writing-mode: vertical-lr; direction: rtl; width: 22px; height: 100%; margin: 0; accent-color: var(--vio); }
.dw-sm { width: 8px; height: 100%; border-radius: 2px; }
.dw-msb { display: flex; gap: 4px; }
.dw-ms { width: 26px; height: 20px; border-radius: 4px; font: 600 10px var(--mono); color: var(--mute); background: #120d13; border: 1px solid var(--line); }
.dw-ms.m.on { color: #fff; background: #c0392b; border-color: #c0392b; }
.dw-ms.s.on { color: #1a141b; background: var(--warn); border-color: var(--warn); }

/* narrow screens: no floating, everything stacks */
@media (max-width: 900px) {
    .dw-app { height: auto !important; overflow: visible; }
    .dw-body { flex-direction: column; }
    .dw-browser { width: auto; max-height: 240px; border-right: 0; border-bottom: 1px solid var(--line-2); }
    .dw-space { overflow: visible; display: flex; flex-direction: column; gap: 8px; padding: 8px; }
    .dw-space > * { min-width: 0; }
    .dw-playlist { position: static; height: 300px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
    .dw-win { position: static; width: auto !important; height: auto !important; min-height: 0; }
    .dw-win .dw-rz { display: none; }
    .dw-roll-wrap { height: 300px; flex: none; }
    .dw-wh { cursor: default; }
    .dw-row { grid-template-columns: 12px 22px 22px 90px minmax(0, 1fr) 20px; }
    .dw-pname { width: 120px; }
}

/* ---------------------------------------------------------------- Hangjavító: narráció (prompter) */
.nar-drop { min-height: 120px; }
.nar-paste { margin-top: 10px; }
.nar-paste-box { margin-top: 10px; }
.nar-ta { height: auto; padding: 10px 12px; resize: vertical; font: 14px/1.5 var(--sans); }
.nar-pb { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.nar-rh { margin: 12px 0 4px; font-size: 12px; }
.nar-card { padding: 16px 18px; margin-bottom: 24px; }
.nar-h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.nar-h h2 { margin-right: 4px; }
.nar-h .lbl.nar-l { margin: 0; }
.nar-h .seg { flex: none; } .nar-h .seg button { flex: none; padding: 0 12px; height: 30px; font-size: 13px; }
.nar-size { display: flex; align-items: center; gap: 6px; color: var(--mute); font-size: 12px; }
.nar-size .big { font-size: 17px; } .nar-size input { width: 90px; }
.nar-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; } .nar-row input { width: 220px; }
.nar-vn { margin-top: 10px; font-size: 12px; } .nar-vs { margin-top: 4px; font-size: 12px; color: var(--ok); }
.nar-vs:empty { display: none; }
.nar-view { position: relative; margin-top: 12px; }
.nar-scroll { position: relative; height: 56vh; min-height: 300px; overflow: auto; padding: 19vh 28px 0; border-radius: 10px; background: #0f0b10; border: 1px solid var(--line); scroll-behavior: auto; }
.nar-pad { height: 40vh; }
.nar-line { position: absolute; left: 0; width: 0; top: 35%; height: 0; pointer-events: none; z-index: 1; }   /* only the small marker on the left edge, no line across the text */
.nar-line::before { content: ''; position: absolute; left: 0; top: -6px; border-left: 9px solid var(--lil); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.nar-view::before, .nar-view::after { content: ''; position: absolute; left: 1px; right: 1px; height: 18%; pointer-events: none; z-index: 1; }
.nar-view::before { top: 1px; border-radius: 10px 10px 0 0; background: linear-gradient(#0f0b10, rgba(15,11,16,0)); }
.nar-view::after { bottom: 1px; border-radius: 0 0 10px 10px; background: linear-gradient(rgba(15,11,16,0), #0f0b10); }
.nar-empty { color: var(--mute); font-size: 15px; text-align: center; }
.nar-text { font-weight: 500; line-height: 1.55; color: #e9e2ec; max-width: 34em; margin: 0 auto; }
.nar-text p { margin: 0 0 .8em; }
.nar-text span { border-radius: 4px; cursor: pointer; transition: color .15s, background .15s; }
.nar-text span:hover { background: rgba(138,63,216,.18); }
.nar-text span.done { color: #8a7f8e; }
.nar-text span.now { color: #fff; background: rgba(138,63,216,.45); box-shadow: 0 0 0 3px rgba(138,63,216,.45); }
.nar-fullbar { display: none; }
/* full screen prompter */
body.nar-full { overflow: hidden; }
.nar-card.full { position: fixed; inset: 0; z-index: 100; margin: 0; border-radius: 0; display: flex; flex-direction: column; background: #0f0b10; border: 0; }
.nar-card.full .nar-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.nar-card.full .nar-scroll { flex: 1; height: auto; border: 0; }
.nar-card.full #nar-full { display: none; }
.nar-card.full .nar-fullbar { display: flex; align-items: center; gap: 16px; padding: 12px 6px 0; }
.nar-card.full .nar-fullbar b { font-size: 20px; color: var(--lil); }
.nar-card.full .recbtn.on { border-color: var(--mag); }

/* ---------------------------------------------------------------- Hangjavító: autocut */
.ac { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.ac-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ac-h b { font: 600 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.ac-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.ac-row .iv-detect { margin: 0; }
.ac-row input[type=range] { flex: 1; min-width: 90px; }
.ac-row b { font-size: 12px; min-width: 52px; text-align: right; }
.ac-l { font-size: 13px; color: var(--soft); }
.ac-row .seg { flex: none; padding: 2px; } .ac-row .seg button { flex: none; height: 26px; padding: 0 10px; font-size: 12px; }
.ac-rs { display: block; margin: 6px 0 10px; }
#ac-tl { display: block; width: 100%; height: 30px; border-radius: 6px; }
/* Autocut analysis: what was cut, listen, restore */
.ac-an { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.ac-an-h { display: block; font-size: 13px; margin-bottom: 2px; }
.ac-an .hint { margin: 0 0 8px; }
.ac-an-k { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ac-an-k button { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; border: 1px solid var(--line); background: transparent; color: var(--soft); font-size: 12px; cursor: pointer; opacity: .55; }
.ac-an-k button.on { opacity: 1; color: var(--text); border-color: var(--line-2); }
.ac-an-k b { font-weight: 600; }
.ac-an-l { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.ac-it { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 7px; background: var(--card-2); font-size: 13px; }
.ac-it.off { opacity: .55; }
.ac-it .ac-k { flex: 1; min-width: 0; }
.ac-it .mono { font-size: 12px; color: var(--soft); }
.ac-it .ac-len { min-width: 52px; text-align: right; }
.ac-it .tg { height: 26px; min-width: 96px; font-size: 12px; }
.ac-it.off .tg { color: var(--lil); }
.ac-an i[class^="k"] { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.ac-an i.k1 { background: #8a7f8e; } .ac-an i.k2 { background: #f0b44c; } .ac-an i.k3 { background: #c0392b; } .ac-an i.k4 { background: #e0659b; }
@media (max-width: 480px) { .ac-it .ac-len { display: none; } .ac-it .tg { min-width: 0; } }
.ac-sum { margin-top: 8px; font-size: 12px; }
.ac-sum:empty { display: none; }

/* ---------------------------------------------------------------- vágó (editor) */
.ed { max-width: 1180px; margin: 0 auto; }
.ed-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ed-top .btn.sm, .ed-bar .btn.sm { height: 34px; padding: 0 12px; font-size: 14px; }
.ed-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }
.ed-msg { min-height: 1.5em; margin: 8px 0 4px; }
.ed-empty .drop { min-height: 180px; }
.ed-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ed-play { width: 40px; height: 40px; border-radius: 50%; background: var(--vio); display: grid; place-items: center; }
.ed-play svg { width: 16px; height: 16px; fill: #fff; }
.ed-play.on svg path { d: path("M5 4h4v12H5zM11 4h4v12h-4z"); }
.ed-time { font-size: 15px; min-width: 9ch; }
.ed-sep { width: 1px; height: 24px; background: var(--line-2); margin: 0 4px; }
.ed-ov { display: block; width: 100%; height: 40px; border-radius: 8px 8px 0 0; cursor: pointer; border: 1px solid var(--line); border-bottom: 0; }
.ed-wave-wrap { border: 1px solid var(--line); border-radius: 0 0 8px 8px; overflow: hidden; }
.ed-wave { display: block; width: 100%; height: 210px; cursor: crosshair; touch-action: none; }
.ed-keys { margin: 8px 0 14px; font-size: 12px; }
.ed-marks { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.ed-k { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--soft); cursor: pointer; }
.ed-k i { width: 12px; height: 12px; border-radius: 3px; }
.ed-k.br i { background: #f0b44c; } .ed-k.st i { background: #e0659b; } .ed-k.pa i { background: #8a7f8e; }
.ed-k input:disabled + i, .ed-k input:disabled ~ span { opacity: .45; }
.ed-out { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .ed-sep { display: none; } .ed-out .btn { flex: 1; } }

/* download icon in front of every format name on a take card (MP3, WAV and the ··· menu) */
.job .dl::before, .fmt a::before, .dli::before {
    content: ''; display: inline-block; width: 13px; height: 13px; margin-right: 6px; vertical-align: -1px; flex: none;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v8M4.5 6.5 8 10l3.5-3.5M2.5 13.5h11'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v8M4.5 6.5 8 10l3.5-3.5M2.5 13.5h11'/%3E%3C/svg%3E") center / contain no-repeat;
}
.job .dl { gap: 0; }
.ed-loop.on { background: var(--vio); border-color: var(--vio); color: #fff; }
.ed-selt { font-size: 12px; min-width: 0; }
.ed-grip { height: 10px; cursor: ns-resize; background: var(--card-2); border-top: 1px solid var(--line); touch-action: none; position: relative; }
.ed-grip::after { content: ''; position: absolute; left: 50%; top: 3px; width: 36px; height: 3px; margin-left: -18px; border-radius: 2px; background: var(--line-2); }
.ed-grip:hover::after { background: var(--lil); }
.ed-ov { touch-action: none; }

/* ---------------------------------------------------------------- vágó v4: multitrack timeline (Vegas-like) */
.ed { max-width: none; }
.ed-stop { width: 34px; height: 34px; border-radius: 50%; background: var(--card-2); border: 1px solid var(--line-2); display: grid; place-items: center; }
.ed-stop svg { width: 12px; height: 12px; fill: var(--text); }
.ghost.tg.on { background: rgba(138,63,216,.22); color: var(--lil); box-shadow: inset 0 0 0 1px var(--vio); }
.tl { display: grid; grid-template-columns: 190px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #171118; user-select: none; }
.tl-corner { background: var(--card); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 10px; min-width: 0; }
.tl-corner .hint { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-lanel { font: 500 11px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
.tl-ov { display: block; width: 100%; height: 34px; border-bottom: 1px solid var(--line); touch-action: none; cursor: pointer; }
.tl-ruler { display: block; width: 100%; height: 42px; border-bottom: 1px solid var(--line); touch-action: none; }
.tl-lane { display: block; width: 100%; height: 20px; border-bottom: 1px solid var(--line); touch-action: none; }
.tl-body { grid-column: 1 / -1; display: grid; grid-template-columns: 190px minmax(0, 1fr); max-height: 62vh; overflow-y: auto; position: relative; }
.tl-heads { border-right: 1px solid var(--line); background: var(--card); }
.tl-tracks { display: block; width: 100%; touch-action: none; }
.tl-addtrack { grid-column: 1 / -1; justify-self: start; margin: 6px; }
.th { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 6px 8px 8px 12px; border-bottom: 1px solid var(--line); box-sizing: border-box; overflow: hidden; }
.th.sel { background: var(--card-2); }
.th::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tc, var(--vio)); }
.th-r { display: flex; align-items: center; gap: 4px; min-width: 0; }
.th-name { flex: 1; min-width: 0; height: 22px; padding: 0 4px; background: transparent; border: 1px solid transparent; border-radius: 4px; color: var(--text); font-size: 13px; font-weight: 600; }
.th-name:focus { border-color: var(--line-2); background: var(--bg-2); outline: 0; }
.th-b { width: 22px; height: 22px; border-radius: 4px; font: 600 11px var(--mono); color: var(--mute); background: var(--bg-2); border: 1px solid var(--line-2); flex: none; }
.th-b.on.m { background: #c0392b; border-color: #c0392b; color: #fff; }
.th-b.on.s { background: #f0b44c; border-color: #f0b44c; color: #120d13; }
.th-b.on.v { background: var(--vio); border-color: var(--vio); color: #fff; }
.th-l { font: 500 10px var(--mono); color: var(--mute); width: 30px; flex: none; }
.th-v { font: 500 10px var(--mono); color: var(--soft); width: 44px; text-align: right; flex: none; }
.th input[type=range] { flex: 1; min-width: 0; height: 14px; accent-color: var(--vio); }
.th-size { position: absolute; left: 0; right: 0; bottom: -3px; height: 7px; cursor: ns-resize; z-index: 2; }
.ed-menu { position: fixed; z-index: 60; min-width: 200px; }
.ed-menu button[disabled] { opacity: .4; }
.ed-menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 4px 2px; }
@media (max-width: 700px) {
    .tl, .tl-body { grid-template-columns: 120px minmax(0, 1fr); }
    .th input[type=range], .th-l, .th-v { display: none; }
}
.ed-projs { display: grid; gap: 6px; margin: 4px 0 12px; }
.ed-projs .h { font: 500 11px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
.ed-proj { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); }
.ed-proj b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.ed-proj .hint { font-size: 12px; white-space: nowrap; }
.ed-proj.cur { border-color: var(--vio); }

/* sampler: stem split (heavy, orange warning) */
.stm { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.stm-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.stm-h .hint { font-size: 12px; }
.warn-load { padding: 10px 12px; border-radius: 9px; border: 1px solid #f08c2e; background: rgba(240,140,46,.12); color: #ffb26b; font-size: 13px; line-height: 1.45; }
.warn-load::before { content: '⚠ '; font-weight: 700; }
.stm-go { background: #b85f12; border-color: #f08c2e; color: #fff; }
.stm-go:hover:not(:disabled) { background: #d06d17 !important; border-color: #f08c2e !important; }
#stm-ep { width: auto; height: 32px; font-size: 13px; }
.stm-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); }
.stm-row b { flex: 1; font-size: 14px; }
.stm-go.stop { background: var(--card-2); border-color: #f08c2e; color: #ffb26b; }

/* ---------------------------------------------------------------- undub */
.ub-src { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ub-yt { display: flex; gap: 8px; flex: 1 1 360px; min-width: 0; }
.ub-yt .field { flex: 1; min-width: 0; }
.ub-or { color: var(--mute); font-size: 13px; }
.ub-msg { min-height: 1.4em; margin: 8px 0; }
.ub-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ub-title { font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ub-main { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.ub-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.ub-frame iframe, .ub-frame video, #ub-yt-player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ub-sub { position: absolute; left: 6%; right: 6%; bottom: 7%; text-align: center; font: 600 clamp(14px, 2.2vw, 22px)/1.3 var(--sans); color: #fff; text-shadow: 0 1px 3px #000, 0 0 8px rgba(0,0,0,.8); pointer-events: none; }
.ub-bar { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.ub-bar #ub-seek { flex: 1 1 200px; accent-color: var(--vio); }
.ub-vol { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--soft); }
.ub-vol input { width: 90px; accent-color: var(--vio); }
.ub-step { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.ub-side .ub-step:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.ub-sel { width: auto; min-width: max-content; flex: none; height: 32px; font-size: 13px; padding: 0 8px; }
.ub-wh summary { cursor: pointer; font-size: 14px; color: var(--soft); margin-bottom: 8px; }
.ub-wh { display: grid; gap: 8px; }
.ub-lines-h { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.ub-lines { display: grid; gap: 6px; max-height: 58vh; overflow-y: auto; padding-right: 4px; margin-top: 8px; }
.ub-ln { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); }
.ub-ln.cur { border-color: var(--vio); background: rgba(138,63,216,.08); }
.ub-ln.has { box-shadow: inset 3px 0 0 var(--ok); }
.ub-ln .tm { font: 500 11px var(--mono); color: var(--mute); grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ub-ln .tm button { font: 500 11px var(--mono); color: var(--soft); border: 1px solid var(--line-2); border-radius: 5px; padding: 0 5px; }
.ub-ln textarea { grid-column: 1 / -1; width: 100%; min-height: 38px; resize: vertical; background: transparent; border: 1px solid transparent; border-radius: 6px; color: var(--text); font: 14px/1.4 var(--sans); padding: 4px 6px; }
.ub-ln textarea:focus { border-color: var(--line-2); outline: 0; background: var(--card); }
.ub-ln .act { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ub-ln .rec { color: #fff; background: var(--mag); border-color: var(--mag); }
.ub-ln .rec.on { background: #c0392b; }
.ub-ln .tk { font: 500 11px var(--mono); color: var(--soft); }
.ub-ln .tk.long { color: #ffb26b; }
.ub-ln label { font-size: 12px; color: var(--soft); display: inline-flex; gap: 4px; align-items: center; }
@media (max-width: 980px) { .ub-main { grid-template-columns: 1fr; } .ub-lines { max-height: none; } }

/* live monitoring under the recorder's meter */
.mon-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.mon-row .lbl { margin: 0; }
.mon-row .seg { flex: 1 1 100%; }
.mon-row .seg button { flex: 1 1 auto; width: auto; min-width: 0; padding: 0 8px; }
.mon-vol { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--mute); }
.mon-vol input { width: 120px; }
.mon-hint { margin: 6px 0 0; font-size: 12px; }
