/* Layer2D Studio — Exact obsidian-crimson design system matching layer2d.com & Studio concept mockups.
 * Zero indicator lights, zero subtitles, hairline borders, tabular monospace numerics. */

:root {
  --bg: #0c0d10;
  --surface: #13151b;
  --surface-2: #171a21;
  --surface-3: #1d212b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --tick: rgba(255, 255, 255, 0.55);
  --text: #f2f3f5;
  --muted: #a7abb4;
  --dim: #6b7079;
  --crimson: #be1e3c;
  --crimson-hover: #d22548;
  --crimson-tint: rgba(190, 30, 60, 0.24);
  --crimson-tint-soft: rgba(190, 30, 60, 0.14);
  --radius: 4px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 12.5px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.24); }

/* ---------- App Grid Shell ---------- */
.studio-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--bg);
}

/* ---------- Top Menu & Mode Bar (42px) ---------- */
.topbar {
  height: 42px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  gap: 12px;
  z-index: 40;
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: 7px; letter-spacing: -0.025em; }
.brand-mark { width: 20px; height: 20px; flex-shrink: 0; display: block; }
.brand-main { font-size: 15px; font-weight: 700; color: var(--text); }
.brand-2d { font-style: normal; color: #e32b4f; }
.brand-sub { font-size: 13.5px; font-weight: 400; color: var(--muted); }
.v-sep { width: 1px; height: 16px; background: var(--line-strong); flex-shrink: 0; }

.menubar { display: flex; align-items: center; gap: 2px; }
.menu-wrap { position: relative; }
.menu-btn {
  background: transparent;
  border: 0;
  padding: 5px 8px;
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  font-size: 12.5px;
}
.menu-btn:hover, .menu-btn.open { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.menu-pop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 224px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  z-index: 100;
}
.menu-pop button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 6px 10px;
  border-radius: 3px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font-size: 12px;
}
.menu-pop button:hover { background: var(--crimson-tint); }
.menu-pop kbd { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

.doc-badge {
  margin-left: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.mode-tabs {
  display: flex;
  align-items: stretch;
  height: 42px;
  gap: 4px;
}
.mode-tab {
  position: relative;
  background: transparent;
  border: 0;
  padding: 0 12px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 120ms ease;
}
.mode-tab:hover { color: var(--text); }
.mode-tab.active { color: var(--text); font-weight: 600; }
.mode-tab.active::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px; bottom: 0;
  height: 2px;
  background: var(--crimson);
}

.topbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.36); background: rgba(255, 255, 255, 0.04); }
.btn-primary { background: var(--crimson); color: #fff; }
.btn-primary:hover { background: var(--crimson-hover); }
.btn-xs {
  height: 24px;
  padding: 0 7px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.btn-xs:hover { border-color: rgba(255, 255, 255, 0.35); background: var(--surface-3); }
.btn-xs.active, .btn-xs.primary { background: var(--crimson); border-color: var(--crimson); color: #fff; }

/* ---------- Main Workspace ---------- */
.workspace {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 268px 1fr 280px;
  background: var(--bg);
}

/* ---------- Docks & Panels ---------- */
.dock {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--surface);
  overflow: hidden;
}
.dock-left { border-right: 1px solid var(--line); }
.dock-right { border-left: 1px solid var(--line); }

.dock-split {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.panel-layers { flex: 1 1 56%; border-bottom: 1px solid var(--line); }
.panel-params { flex: 1 1 44%; }
.panel-expr-cards { flex: 1 1 100%; }

.panel-head {
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.panel-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text);
}
.panel-actions { display: flex; align-items: center; gap: 2px; }
.icon-btn {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 3px;
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.icon-btn svg { width: 14px; height: 14px; }

/* ---------- Layer Tree Outliner ---------- */
.layer-search-wrap {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}
.field-input, .field-select {
  width: 100%;
  height: 26px;
  padding: 0 8px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--text);
  font-size: 12px;
  outline: none;
}
.field-input:focus, .field-select:focus { border-color: var(--crimson); }
.field-select.compact { width: auto; height: 24px; padding: 0 6px; font-size: 11.5px; }

.layer-tree {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 4px 0;
}
.folder-row, .layer-row {
  display: flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  gap: 6px;
  cursor: pointer;
  border-left: 2px solid transparent;
}
.folder-row { color: var(--muted); font-weight: 500; font-size: 12px; }
.folder-row:hover, .layer-row:hover { background: rgba(255, 255, 255, 0.04); }
.layer-row { padding-left: 22px; color: var(--text); font-size: 12px; }
.layer-row.selected {
  background: var(--crimson-tint);
  border-left-color: var(--crimson);
}
.layer-row.drag-over { border-top: 2px solid var(--crimson); }
.layer-row.is-hidden { opacity: 0.45; }
.tree-chev { width: 12px; height: 12px; color: var(--dim); flex-shrink: 0; transition: transform 100ms; }
.folder-row.collapsed .tree-chev { transform: rotate(-90deg); }
.tree-icon { width: 13px; height: 13px; color: var(--muted); flex-shrink: 0; }
.layer-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--dim);
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.eye-btn {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: var(--muted); cursor: pointer; padding: 0;
}
.eye-btn:hover { color: var(--text); }
.eye-btn svg { width: 13px; height: 13px; }
.layer-z {
  width: 24px;
  text-align: right;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  flex-shrink: 0;
}

/* ---------- Parameter Sliders with Cubism Diamond Keyforms ---------- */
.param-list {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.param-row {
  display: grid;
  grid-template-columns: 74px 1fr 52px;
  align-items: center;
  gap: 8px;
  padding: 2px 5px;
  margin: 0 -5px;
  border-radius: 3px;
  border: 1px solid transparent;
}
.param-name { font-size: 11.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.param-track-wrap { position: relative; padding: 9px 0 13px; cursor: ew-resize; touch-action: none; }
.param-track {
  position: relative;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
}
.param-track-wrap:hover .param-track,
.param-track-wrap.dragging .param-track {
  background: rgba(255, 255, 255, 0.34);
}
.param-fill {
  position: absolute;
  top: 0; height: 3px;
  border-radius: 2px;
  background: var(--crimson);
  pointer-events: none;
}
.param-diamond {
  position: absolute;
  top: 50%;
  width: 5px; height: 5px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: rgba(242, 243, 245, 0.72);
  border: 1px solid var(--bg);
  cursor: pointer;
  z-index: 2;
}
.param-diamond:hover {
  background: #ffffff;
  width: 7px; height: 7px;
  z-index: 4;
}
.param-diamond.active {
  width: 7px; height: 7px;
  background: var(--crimson);
  border-color: var(--text);
  z-index: 4;
}
.param-thumb {
  position: absolute;
  top: 50%;
  width: 11px; height: 11px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--crimson);
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 2px rgba(12, 13, 16, 0.55);
  pointer-events: none;
  z-index: 5;
}
.param-track-wrap.dragging .param-thumb {
  width: 13px; height: 13px;
  background: var(--crimson-hover);
}
.param-limits {
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--dim);
  pointer-events: none;
}
.param-val {
  width: 52px;
  height: 22px;
  padding: 0 4px;
  text-align: right;
  font-family: var(--mono);
  font-size: 11px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--text);
}
.vowel-bar { display: flex; gap: 3px; }
.vowel-chip {
  flex: 1;
  height: 22px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
}
.vowel-chip:hover { color: var(--text); border-color: rgba(255,255,255,0.3); }
.vowel-chip.active { background: var(--crimson); border-color: var(--crimson); color: #fff; }

/* ---------- Expressions & Toggles Left View (Animate / Expressions Mode) ---------- */
.expr-panel-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 10px;
}
.subhead {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 4px 0 8px;
}
.expr-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 12px;
  max-height: 48vh;
  overflow-y: auto;
  padding-right: 2px;
}
.expr-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  min-width: 0;
}
.expr-card:hover { border-color: var(--line-strong); }
.expr-card.active {
  background: var(--crimson-tint-soft);
  border-color: var(--crimson);
}
.expr-thumb {
  width: 44px; height: 32px;
  border-radius: 2px;
  object-fit: cover;
  background: var(--bg);
  flex-shrink: 0;
}
.expr-label {
  font-size: 11.5px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toggle-list { display: flex; flex-direction: column; gap: 2px; }
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line);
}
.toggle-name { font-size: 12px; color: var(--text); }
.switch {
  position: relative;
  width: 32px; height: 17px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  padding: 0;
  transition: background 120ms ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #f2f3f5;
  transition: transform 120ms ease;
}
.switch[aria-pressed="true"] { background: var(--crimson); border-color: var(--crimson); }
.switch[aria-pressed="true"]::after { transform: translateX(15px); }

/* ---------- Center Viewport ---------- */
.viewport-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg);
}
.stage-frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
}
#gl-canvas, #overlay-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#overlay-canvas { pointer-events: auto; }

.stage-crosshair-h {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.045);
  pointer-events: none;
}
.stage-crosshair-v {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.045);
  pointer-events: none;
}
.corner-tick {
  position: absolute;
  width: 14px; height: 14px;
  pointer-events: none;
  border-color: var(--tick);
  border-style: solid;
  border-width: 0;
}
.corner-tick.tl { top: 14px; left: 62px; border-top-width: 1.5px; border-left-width: 1.5px; }
.corner-tick.tr { top: 14px; right: 16px; border-top-width: 1.5px; border-right-width: 1.5px; }
.corner-tick.bl { bottom: 14px; left: 62px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.corner-tick.br { bottom: 14px; right: 16px; border-bottom-width: 1.5px; border-right-width: 1.5px; }

/* Floating vertical tool rail */
.tool-rail {
  position: absolute;
  top: 14px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px;
  background: rgba(19, 21, 27, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  z-index: 15;
}
.tool-btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 3px;
  color: var(--muted);
  cursor: pointer;
}
.tool-btn:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.tool-btn.active { background: var(--crimson); color: #fff; }
.tool-btn svg { width: 16px; height: 16px; }

.viewport-bar {
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.vp-group { display: flex; align-items: center; gap: 6px; }
.vp-btn {
  background: transparent;
  border: 0;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 11.5px;
  color: var(--dim);
  cursor: pointer;
}
.vp-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.vp-btn.active { color: var(--text); }
.vp-btn.live { color: #fff; background: var(--crimson); }
.vp-sep { width: 1px; height: 12px; background: var(--line); }
.vp-readout { font-size: 11.5px; color: var(--muted); }

/* ---------- Right Inspector Dock ---------- */
.inspector-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.insp-tab {
  height: 24px;
  background: transparent;
  border: 0;
  border-radius: 3px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}
.insp-tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.insp-tab.active { background: var(--crimson); color: #fff; }

.inspector-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 10px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prop-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.prop-group:last-child { border-bottom: 0; }
.prop-row {
  display: grid;
  grid-template-columns: 102px 1fr;
  align-items: center;
  gap: 8px;
}
.prop-lbl { font-size: 11.5px; color: var(--muted); }
.prop-btn-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.prop-btn-row.three { grid-template-columns: repeat(3, 1fr); }
.prop-slider-wrap { display: grid; grid-template-columns: 1fr 48px; align-items: center; gap: 6px; }
.prop-range {
  width: 100%;
  accent-color: var(--crimson);
  cursor: pointer;
}
.empty-note { color: var(--dim); font-size: 12px; padding: 12px 0; }

/* Bezier Curve Editor (Animate mode right panel) */
.bezier-box {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 8px;
}
#bezier-canvas { width: 100%; height: 180px; display: block; cursor: crosshair; }

/* ---------- Bottom Timeline Dock ---------- */
.timeline-dock {
  flex-shrink: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tl-collapsed-bar {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}
.tl-left-inline { display: flex; align-items: center; gap: 10px; }
.tl-play-mini {
  width: 24px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--text);
  cursor: pointer;
}
.tl-play-mini:hover { border-color: var(--crimson); }
.tl-play-mini svg { width: 11px; height: 11px; }
.tl-time-mini { font-size: 11.5px; color: var(--text); }
.tl-label { font-size: 12px; color: var(--muted); }

.tl-expanded {
  display: flex;
  flex-direction: column;
  height: 218px;
}
.tl-header {
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}
.tl-title-group, .tl-transport { display: flex; align-items: center; gap: 6px; }
.tl-tbtn {
  width: 26px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text);
  cursor: pointer;
}
.tl-tbtn:hover { border-color: var(--line-strong); }
.tl-tbtn.primary { background: var(--crimson); border-color: var(--crimson); width: 34px; }
.tl-tbtn svg { width: 13px; height: 13px; }
.tl-loop-lbl { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.tl-loop-lbl input { accent-color: var(--crimson); }

.tl-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 204px 1fr;
}
.tl-tracks-col {
  border-right: 1px solid var(--line);
  overflow-y: hidden;
  background: var(--surface);
}
.tl-track-head-spacer {
  height: 24px;
  display: grid;
  grid-template-columns: 1fr 64px;
  align-items: center;
  padding: 0 10px;
  font-size: 10.5px;
  color: var(--dim);
  border-bottom: 1px solid var(--line);
}
.tl-track-row {
  height: 22px;
  display: grid;
  grid-template-columns: 1fr 64px;
  align-items: center;
  padding: 0 10px;
  font-size: 11.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
}
.tl-track-row.selected { background: var(--crimson-tint-soft); }
.tl-track-val { text-align: right; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tl-dope-wrap { position: relative; min-width: 0; background: var(--bg); }
#tl-canvas { width: 100%; height: 100%; display: block; cursor: pointer; }

/* ---------- Toast & Drop Veil ---------- */
.toast {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 14px;
  background: rgba(19, 21, 27, 0.95);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--crimson);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--text);
  z-index: 60;
  pointer-events: none;
}
.drop-veil {
  position: absolute;
  inset: 0;
  background: rgba(12, 13, 16, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
}
.drop-box {
  padding: 28px 40px;
  border: 1.5px dashed var(--crimson);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

/* Scrollable checklists in Expressions Inspector */
.mini-checklist {
  max-height: 120px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mini-check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  padding: 2px 4px;
  cursor: pointer;
}
.mini-check-item:hover { background: rgba(255, 255, 255, 0.04); }
.mini-check-item input { accent-color: var(--crimson); }

/* ---------- Keyform CRUD, Blend Shapes, Rig Target HUD & Timeline Scroll ---------- */
.param-row.has-kf-btns {
  grid-template-columns: 80px 1fr 48px;
  gap: 6px;
}
.param-row.has-kf-btns .param-val {
  width: 48px;
}
.param-row.is-rig-target {
  background: rgba(190, 30, 60, 0.08);
  border-color: rgba(190, 30, 60, 0.25);
}
.param-row.is-blend-param .param-fill,
.param-row.is-blend-param .param-thumb,
.param-row.is-blend-param .param-diamond.active {
  background: #8b5cf6;
}
.param-row.is-blend-param .param-track-wrap.dragging .param-thumb {
  background: #a78bfa;
}
.param-row.is-blend-param.is-rig-target {
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(167, 139, 250, 0.42);
}
.param-name-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.kf-mini-btns {
  display: inline-flex;
  gap: 3px;
}
.kf-mini-btn {
  width: 17px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--bg);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
.kf-mini-btn:hover {
  color: var(--text);
  border-color: var(--crimson);
  background: rgba(190, 30, 60, 0.16);
}
.param-diamond.has-edits {
  background: #58b2ff;
  border-color: #ffffff;
}
.param-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.param-empty-note {
  font-size: 11px;
  line-height: 1.4;
  color: var(--dim);
}
.blend-edit-btn svg { width: 10px; height: 10px; }
.blend-edit-btn:hover { color: var(--text); border-color: rgba(176, 118, 255, 0.65); background: rgba(139, 92, 246, 0.16); }
.blend-edit-btn.active { background: #7c3aed; border-color: #b076ff; color: #fff; }

.rig-target-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 3px;
  font-size: 11px;
  background: rgba(190, 30, 60, 0.12);
  border: 1px solid rgba(190, 30, 60, 0.35);
  color: var(--text);
}
.rig-target-banner.pitch {
  background: rgba(60, 157, 255, 0.14);
  border-color: rgba(88, 178, 255, 0.42);
}
.rig-target-banner.blend {
  background: rgba(124, 58, 237, 0.18);
  border-color: rgba(176, 118, 255, 0.5);
}
.vp-target-pill {
  height: 20px;
  padding: 0 7px;
  border-radius: 3px;
  font-size: 10.5px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 18px;
  background: rgba(190, 30, 60, 0.16);
  border: 1px solid rgba(190, 30, 60, 0.45);
  color: var(--text);
  cursor: pointer;
}
.vp-target-pill.pitch {
  background: rgba(60, 157, 255, 0.16);
  border-color: rgba(88, 178, 255, 0.48);
}
.vp-target-pill.blend {
  background: rgba(124, 58, 237, 0.22);
  border-color: rgba(176, 118, 255, 0.55);
}
.btn-xs:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.tl-dope-wrap, .tl-tracks-col { overflow-y: auto; }
