/* Zema: a dark studio console. Warm graphite surfaces, ember accent, gold for "now". */
:root {
  --bg: #0e0d0c;
  --panel: #151311;
  --panel-2: #1c1916;
  --raise: #24201c;
  --line: #2a2622;
  --line-2: #3a342e;
  --text: #efe9df;
  --muted: #9a9185;
  --faint: #6c655c;
  --accent: #ff6a3d;
  --accent-2: #ff8a63;
  --accent-ink: #1b0c06;
  --gold: #f2c14e;
  --danger: #ff5c5c;
  --ok: #7bd389;
  --tl-bg: #110f0e;
  --tl-grid: #26221f;
  --tl-wave: #4b443d;
  --tl-played: #9a6b4f;
  --tl-block: #2e2925;
  --tl-block-line: #4d453d;
  --r: 8px;
  --r-sm: 6px;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ui: "Manrope", "Noto Sans Ethiopic", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 13px/1.45 var(--ui);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.4; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); }

.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.spacer { flex: 1; }
kbd {
  font: 500 11px/1 var(--mono);
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  background: var(--panel-2);
  color: var(--text);
  white-space: nowrap;
}
.fine { color: var(--faint); font-size: 12px; margin: 0; }
.hint { color: var(--faint); font-size: 12px; }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  font-weight: 700; font-size: 13px;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover:not(:disabled) { background: var(--raise); border-color: #4a423a; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; gap: 5px; }
.btn.sm .i { width: 15px; height: 15px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { color: var(--text); background: var(--panel-2); border-color: var(--line); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { background: var(--accent-2); border-color: var(--accent-2); }

.ib {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.ib:hover:not(:disabled) { background: var(--raise); color: var(--text); }
.ib.sm { width: 26px; height: 26px; }
.ib.sm .i { width: 15px; height: 15px; }
.ib.danger:hover:not(:disabled) { color: var(--danger); }

/* ── top bar ── */
.top {
  height: 52px;
  display: flex; align-items: center; gap: 6px;
  padding: 0 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; margin-right: 6px; }
.brand-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--accent); color: var(--accent-ink);
  font: 800 19px/1 "Noto Sans Ethiopic", sans-serif;
}
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.proj { display: flex; align-items: center; gap: 10px; min-width: 0; margin-left: 4px; }
.proj-name {
  width: clamp(120px, 22vw, 300px);
  height: 32px; padding: 0 9px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: transparent;
  font-weight: 700; font-size: 14px;
  text-overflow: ellipsis;
}
.proj-name:hover { border-color: var(--line); }
.proj-name:focus { border-color: var(--line-2); background: var(--bg); outline: none; }
.save-state { color: var(--faint); font-size: 12px; white-space: nowrap; }
.save-state.err { color: var(--danger); }
.tool-group { display: flex; gap: 2px; margin-right: 4px; }

.menu-wrap { position: relative; }
.menu, .popover {
  position: absolute; z-index: 50;
  min-width: 220px;
  padding: 5px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
.menu { right: 0; top: calc(100% + 6px); width: 270px; }
.menu button, .popover button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  width: 100%;
  padding: 7px 10px;
  border: 0; border-radius: 5px;
  background: transparent;
  text-align: left;
}
.menu button strong { font-weight: 700; font-size: 13px; }
.menu button span { color: var(--muted); font-size: 12px; }
.menu button:hover, .menu button:focus-visible, .popover button:hover:not(:disabled), .popover button:focus-visible { background: var(--raise); outline: none; }
.menu hr, .popover hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.popover { position: fixed; min-width: 210px; }
.popover button { font-size: 13px; font-weight: 600; }
.popover button.danger { color: var(--danger); }

/* ── studio grid ── */
.studio {
  height: calc(100dvh - 52px);
  display: grid;
  grid-template-columns: minmax(290px, 350px) minmax(0, 1fr) 300px;
  grid-template-rows: minmax(0, 1fr) clamp(170px, 26vh, 250px);
}
.pane { display: flex; flex-direction: column; min-height: 0; background: var(--panel); }
.pane-lyrics { border-right: 1px solid var(--line); }
.pane-style { border-left: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin; }

.pane-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 44px; padding: 0 10px 0 8px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.tabs { display: flex; gap: 2px; }
.tabs button {
  height: 30px; padding: 0 12px;
  border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--muted);
  font-weight: 700;
}
.tabs button[aria-selected="true"] { background: var(--raise); color: var(--text); }
.count { color: var(--muted); font: 500 11px var(--mono); }

.tab-body { flex: 1; min-height: 0; overflow-y: auto; position: relative; scrollbar-width: thin; }
.pane-foot {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 8px; border-top: 1px solid var(--line); flex: none;
}

/* lyric rows */
.lines { list-style: none; margin: 0; padding: 6px; }
.ln {
  padding: 6px 6px 7px 8px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  cursor: default;
}
.ln + .ln { margin-top: 2px; }
.ln:hover { background: var(--panel-2); }
.ln.sel { background: var(--panel-2); border-color: var(--line-2); border-left-color: var(--accent); }
.ln.active { border-left-color: var(--gold); }
.ln.active .ln-text { color: var(--gold); }
.ln-top { display: flex; align-items: center; gap: 4px; margin-bottom: 3px; }
.ln-n { width: 22px; color: var(--faint); font: 500 11px var(--mono); }
.ln-arrow { color: var(--faint); font-size: 11px; }
.tc {
  width: 76px; height: 24px; padding: 0 5px;
  border: 1px solid transparent; border-radius: 4px;
  background: transparent;
  font: 500 12px var(--mono);
  color: var(--text);
}
.tc::placeholder { color: var(--faint); }
.tc:hover { border-color: var(--line); }
.tc:focus { border-color: var(--accent); background: var(--bg); outline: none; }
.tc.wide { width: 100%; height: 34px; font-size: 14px; }
.ln.unsynced .tc[data-f="start"]::placeholder { color: var(--accent); opacity: .7; }
.ln-top .ib { opacity: 0; }
.ln:hover .ib, .ln.sel .ib, .ln-top .ib:focus-visible { opacity: 1; }
.badge {
  font: 700 9px/1 var(--ui); letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 5px; border-radius: 3px;
  background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold);
  margin-left: 6px;
}
.ln-text {
  width: 100%; height: 30px; padding: 0 6px 0 26px;
  border: 1px solid transparent; border-radius: 4px;
  background: transparent;
  font-size: 14px; font-weight: 600;
  text-overflow: ellipsis;
}
.ln-text:hover { border-color: var(--line); }
.ln-text:focus { border-color: var(--line-2); background: var(--bg); outline: none; }

.lines-empty { padding: 28px 22px; color: var(--muted); }
.lines-empty p { margin: 0 0 14px; }
.empty-title { color: var(--text); font-weight: 800; font-size: 15px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }

#tab-text { display: flex; flex-direction: column; overflow: hidden; }
#bulk {
  flex: 1; min-height: 0; width: 100%; resize: none;
  padding: 14px 16px; border: 0; background: var(--bg);
  font: 600 14px/1.75 var(--ui);
}
#bulk:focus { outline: none; }
.bulk-foot { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--line); }
.bulk-foot .hint { flex: 1; margin: 0; }

/* ── stage ── */
.stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.stage-view {
  position: relative; flex: 1; min-height: 0;
  display: grid; place-items: center;
  background:
    radial-gradient(ellipse at 50% 40%, #1a1714 0%, transparent 70%),
    var(--bg);
}
.canvas-wrap {
  position: relative;
  border-radius: 6px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(0, 0, 0, .6);
  background: #000;
}
.canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.canvas-wrap.dim { opacity: .25; }

.dropzone { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; }
.dz-card {
  max-width: 440px; padding: 30px 32px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--line-2); border-radius: 12px;
  backdrop-filter: blur(8px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.dz-icon { width: 34px; height: 34px; color: var(--accent); margin-bottom: 10px; }
.dz-card h1 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -0.015em; }
.dz-card p { margin: 0 0 18px; color: var(--muted); }
.dz-card .fine { margin: 16px 0 0; }

.transport {
  display: flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 14px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  flex: none;
}
.play {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: var(--text); color: var(--bg);
  transition: transform .1s, background .15s;
}
.play:hover { background: #fff; }
.play:active { transform: scale(.95); }
.play .i { width: 17px; height: 17px; }
.clock { font: 500 13px var(--mono); color: var(--text); display: flex; gap: 6px; }
.clock .sep, #clock-dur { color: var(--faint); }
.rate { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 600; }
select {
  height: 30px; padding: 0 28px 0 9px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--panel-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a9185' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 6px center / 16px;
  appearance: none;
  font-weight: 600; font-size: 12px;
}
.btn.tap kbd { margin-left: 2px; }
.btn.tap[aria-pressed="true"] { background: var(--danger); border-color: var(--danger); color: #1a0505; }
.btn.tap[aria-pressed="true"] kbd { background: rgba(0,0,0,.15); border-color: rgba(0,0,0,.25); color: inherit; }

/* tap sync overlay */
.sync-overlay {
  position: absolute; left: 10px; right: 10px; top: 10px;
  padding: 10px 12px 11px;
  background: rgba(10, 9, 8, .82);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  display: grid; gap: 7px;
}
.sync-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rec { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: var(--danger); }
.rec i { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.sync-progress { color: var(--muted); font: 500 11px var(--mono); }
.lat { margin-left: auto; color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 5px; }
.lat input { width: 56px; height: 24px; padding: 0 5px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--bg); font: 500 11px var(--mono); }
.sync-next { display: flex; gap: 10px; align-items: baseline; font-size: 17px; font-weight: 700; line-height: 1.35; }
.sync-next .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 800; flex: none; }
.sync-next .w { color: var(--muted); }
.sync-next .w.cur { color: #fff; text-decoration: underline 2px var(--accent); text-underline-offset: 5px; }
.sync-next .w.done { color: var(--gold); }
.sync-next .hint-play { color: var(--accent); font-size: 13px; font-weight: 600; }
.sync-keys { color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.sync-keys kbd { margin-left: 8px; }
.sync-keys kbd:first-child { margin-left: 0; }
.tap-flash {
  position: absolute; right: 12px; bottom: 12px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); opacity: 0;
}
.tap-flash.on { animation: tap .45s ease-out; }
.tap-flash.on.end { background: var(--gold); }
@keyframes tap { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }

/* ── style panel ── */
.sec { padding: 14px 14px 16px; border-bottom: 1px solid var(--line); }
.sec h3 { margin: 0 0 10px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.sec-body { display: grid; gap: 9px; }
.row { display: flex; align-items: center; gap: 10px; min-height: 30px; }
.row .rl { width: 74px; flex: none; color: var(--muted); font-size: 12px; font-weight: 600; }
.row .rl.wide { width: auto; flex: 1; }
.row select, .row .txt { flex: 1; min-width: 0; }
.row .txt { height: 30px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--bg); font-weight: 600; }
.row .txt:focus { border-color: var(--accent); outline: none; }
.row output { width: 42px; text-align: right; font: 500 11px var(--mono); color: var(--muted); }
.row .fine { flex-basis: 100%; }
.row:has(.fine) { flex-wrap: wrap; }
.row:has(.fine) .fine { margin-left: 84px; margin-top: -4px; }

input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); height: 18px; }
.color { display: flex; align-items: center; gap: 8px; flex: 1; }
.color input[type=color] {
  width: 30px; height: 26px; padding: 0;
  border: 1px solid var(--line-2); border-radius: 5px;
  background: none; cursor: pointer;
}
.color input[type=color]::-webkit-color-swatch-wrapper { padding: 2px; }
.color input[type=color]::-webkit-color-swatch { border: 0; border-radius: 3px; }
.color input[type=color]::-moz-color-swatch { border: 0; border-radius: 3px; }
.hex { font: 500 11px var(--mono); color: var(--muted); text-transform: uppercase; }

.toggle input[type=checkbox] {
  appearance: none; flex: none;
  width: 34px; height: 20px; border-radius: 10px;
  background: var(--line-2); position: relative; cursor: pointer;
  transition: background .15s;
}
.toggle input[type=checkbox]::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--text); transition: transform .15s;
}
.toggle input[type=checkbox]:checked { background: var(--accent); }
.toggle input[type=checkbox]:checked::after { transform: translateX(14px); background: var(--accent-ink); }

.seg { display: inline-flex; flex: 1; padding: 2px; gap: 2px; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--line); }
.seg button {
  flex: 1; height: 26px; padding: 0 8px;
  border: 0; border-radius: 4px;
  background: transparent; color: var(--muted);
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--raise); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset; }
.seg.sm { flex: none; }
.seg.sm button { height: 22px; font-size: 11px; }

.presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preset {
  padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  background: var(--bg); text-align: left;
  transition: border-color .15s, transform .15s;
}
.preset:hover { border-color: var(--line-2); transform: translateY(-1px); }
.preset[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.preset canvas { display: block; width: 100%; aspect-ratio: 16 / 9; }
.preset span { display: block; padding: 5px 8px 6px; font-size: 12px; font-weight: 700; }

.img-ctl { display: flex; align-items: center; gap: 8px; flex: 1; }
.thumb {
  width: 40px; height: 40px; border-radius: 5px; flex: none;
  background: center / cover no-repeat var(--bg);
  border: 1px solid var(--line-2);
  display: grid; place-items: center; color: var(--faint);
}

/* ── timeline ── */
.timeline { grid-column: 1 / -1; display: flex; flex-direction: column; min-height: 0; border-top: 1px solid var(--line); background: var(--tl-bg); }
.tl-bar { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-bottom: 1px solid var(--line); background: var(--panel); flex: none; }
.tl-title { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.tl-hint { margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#zoom { flex: none; width: 120px; }
.tl-canvas { position: relative; flex: 1; min-height: 0; }
.tl-canvas canvas { position: absolute; inset: 0; display: block; touch-action: none; }

/* ── dialogs ── */
.dlg {
  padding: 0; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--panel); color: var(--text);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .7);
  max-width: calc(100vw - 24px);
}
.dlg::backdrop { background: rgba(5, 4, 3, .66); backdrop-filter: blur(3px); }
.dlg-body { width: 560px; max-width: 100%; padding: 18px 20px 20px; display: grid; gap: 14px; }
.dlg-body.wide { width: 640px; }
.dlg-body.narrow { width: 380px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; }
.dlg-head h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.r-step { display: grid; gap: 14px; }
.field { display: flex; align-items: center; gap: 12px; }
.field.col { flex-direction: column; align-items: stretch; gap: 6px; }
.flabel { width: 90px; flex: none; color: var(--muted); font-weight: 600; font-size: 12px; }
.field.col .flabel { width: auto; }
.range-row { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.range-row .tc { border-color: var(--line-2); background: var(--bg); width: 92px; height: 30px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: 102px; }
.chip { height: 26px; padding: 0 10px; border-radius: 13px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; }
.chip:hover { color: var(--text); background: var(--raise); }
.check { display: flex; align-items: center; gap: 9px; color: var(--muted); font-weight: 600; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.note { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }
.r-preview { display: block; width: 100%; max-height: 50vh; border-radius: 6px; background: #000; object-fit: contain; }

.proj-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; }
.proj-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel-2); }
.proj-item.cur { border-color: var(--line-2); }
.swatch { width: 44px; height: 44px; border-radius: 6px; flex: none; }
.pi-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pi-main strong { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; }
.pi-act { display: flex; gap: 4px; align-items: center; }

.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); }
.steps strong { color: var(--text); }
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.keys div { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.keys span { margin-left: 4px; }

/* ── toast + drop ── */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100;
  transform: translate(-50%, 20px);
  max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: var(--r);
  background: var(--text); color: var(--bg);
  font-weight: 700; font-size: 13px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); color: #1a0505; }
.drop-hint {
  position: fixed; inset: 0; z-index: 90;
  display: none; place-items: center;
  background: rgba(14, 13, 12, .78);
  pointer-events: none;
}
.drop-hint div {
  display: grid; gap: 6px; text-align: center;
  padding: 36px 52px; border: 2px dashed var(--accent); border-radius: 16px;
  font-size: 22px; font-weight: 800;
}
.drop-hint span { font-size: 13px; color: var(--muted); font-weight: 600; }
body.dragging .drop-hint { display: grid; }
body.exporting .studio { pointer-events: none; }

/* ── smaller screens ── */
@media (max-width: 1180px) {
  .studio { grid-template-columns: minmax(270px, 310px) minmax(0, 1fr) 270px; }
  .tl-hint { display: none; }
}
@media (max-width: 960px) {
  body { overflow: auto; }
  .studio { height: auto; display: flex; flex-direction: column; }
  .stage { order: 1; }
  .stage-view { height: min(62vw, 56vh); flex: none; }
  .timeline { order: 2; height: 200px; flex: none; }
  .pane-lyrics { order: 3; height: 70vh; border-right: 0; border-top: 1px solid var(--line); }
  .pane-style { order: 4; border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .top { position: sticky; top: 0; z-index: 40; overflow-x: auto; scrollbar-width: none; }
  .top .lbl, .save-state { display: none; }
  .proj-name { width: 140px; }
  .ln-top .ib { opacity: 1; }
  .keys { grid-template-columns: 1fr; }
  .chips { margin-left: 0; }
}
@media (max-width: 560px) {
  .brand-name, .tool-group, #btn-help, #btn-render span { display: none; }
  .top { gap: 2px; padding: 0 8px; }
  .proj-name { width: 110px; }
  #btn-render { padding: 0 10px; }
  .transport { gap: 8px; padding: 0 10px; }
  .rate { display: none; }
  .sync-keys, .lat { display: none; }
  .field { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── v2: gallery, album cover, drag on preview ── */
.preset .pn { padding: 5px 8px 0; }
.preset .pt { padding: 0 8px 6px; font-size: 11px; font-weight: 600; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gtile {
  padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  background: var(--bg); text-align: left;
  transition: border-color .15s, transform .15s;
}
.gtile:hover { border-color: var(--line-2); transform: translateY(-1px); }
.gtile[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.gtile canvas { display: block; width: 100%; aspect-ratio: 16 / 9; }
.gtile span { display: block; padding: 4px 6px 5px; font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.sec-body > .fine { line-height: 1.5; }
.fine.warn { color: var(--gold); }
.img-row { align-items: flex-start; }
.img-row .rl { padding-top: 8px; }
.img-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.img-btns .fine { flex-basis: 100%; }
.thumb { cursor: pointer; }
.thumb.big { width: 64px; height: 64px; border-radius: 6px; }
.thumb:hover { border-color: var(--accent); }

.drag-box {
  position: absolute; pointer-events: none;
  border: 1.5px dashed rgba(255, 255, 255, .7);
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35);
}
.drag-box::after {
  content: attr(data-label);
  position: absolute; left: -1px; top: -24px;
  padding: 3px 7px; border-radius: 4px;
  background: rgba(14, 13, 12, .85); color: #fff;
  font: 700 11px/1.2 var(--ui); white-space: nowrap;
}
.guide { position: absolute; pointer-events: none; background: var(--accent); opacity: .8; }
.guide.v { left: 50%; top: 0; bottom: 0; width: 1px; }
.guide.h { top: 50%; left: 0; right: 0; height: 1px; }
body.playing .drag-box { opacity: .5; }

/* ── v3: collage + present ── */
.badge.big { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-2); text-transform: none; letter-spacing: 0; font-size: 10px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.present-hint {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  padding: 9px 16px; border-radius: 20px;
  background: rgba(10, 9, 8, .7); color: #fff; font-weight: 700; font-size: 13px;
  pointer-events: none; opacity: 0; transition: opacity .6s;
  white-space: nowrap;
}
body.presenting .present-hint { opacity: 1; }
body.presenting .present-hint.gone { opacity: 0; }
.stage-view:fullscreen { background: #000; }
.stage-view:fullscreen .canvas-wrap { border-radius: 0; box-shadow: none; }
body.presenting .sync-overlay, body.presenting .drag-box { display: none !important; }
body.presenting .stage-view { cursor: none; }

/* ── v4: auto-sync ── */
.badge.check { background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold); }
.ln:has(.badge.check:not([hidden])) { border-left-color: var(--gold); background: color-mix(in srgb, var(--gold) 5%, transparent); }
.radios { display: grid; gap: 6px; }
.note.privacy { padding: 9px 11px; border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--line); color: var(--text); }
.note.warn { color: var(--gold); }
.note.warn:empty { display: none; }
.auto-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.auto-steps li { display: flex; align-items: center; gap: 10px; color: var(--faint); font-weight: 600; }
.auto-steps li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; }
.auto-steps li.done { color: var(--muted); }
.auto-steps li.done::before { background: var(--ok); border-color: var(--ok); }
.auto-steps li.cur { color: var(--text); }
.auto-steps li.cur::before { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pane-foot #btn-auto { margin-right: auto; }
