/* Daslight 5 console — Programs page (high-contrast) */
:root {
  --dl5-bg: #12100e;
  --dl5-panel: #2b2521;
  --dl5-card: #2a2420;
  --dl5-card-dark: #1e1a17;
  --dl5-yellow: #ffd400;
  --dl5-orange: #ff8c00;
  --dl5-pink: #ff2d6a;
  --dl5-magenta: #ff4bb3;
  --dl5-purple: #b88aff;
  --dl5-text: #ffffff;
  --dl5-muted: #c9bdb4;
  --dl5-dim: #8a7f76;
  --dl5-border: #6b5f56;
  --dl5-grid: #3d3630;
}

/* Programs page: flex chain from #console-main (display:flex on .page.active) */
#console-main #page-programs.page.active {
  background: var(--dl5-bg);
}

#page-programs > #dl5-console.dl5 {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.dl5 {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: var(--dl5-bg);
  color: var(--dl5-text);
  font-family: var(--font-mono, 'Consolas', monospace);
  font-size: 11px;
  -webkit-font-smoothing: antialiased;
}

/* ── Top nav ── */
.dl5-topnav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  height: 42px;
  background: #0c0a09;
  border-bottom: 1px solid var(--dl5-border);
  flex-shrink: 0;
}
.dl5-main-tabs { display: flex; gap: 0; }
.dl5-main-tab {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: var(--dl5-dim);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}
.dl5-main-tab.on {
  color: var(--dl5-text);
  background: #1a1614;
  border-bottom-color: var(--dl5-yellow);
}
.dl5-project-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--dl5-muted);
}
.dl5-topnav-right { display: flex; align-items: center; gap: 10px; }
.dl5-go-btn {
  padding: 8px 22px;
  border-radius: 4px;
  border: 2px solid #b89200;
  background: linear-gradient(180deg, #ffe566 0%, #ffd400 45%, #c9a000 100%);
  color: #1a1400;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.12em;
  cursor: pointer;
  box-shadow: 0 3px 0 #6a5200, inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.dl5-go-btn:active { transform: translateY(1px); box-shadow: 0 1px 0 #6a5200; }
.dl5-stop-btn {
  padding: 8px 18px;
  border-radius: 4px;
  border: 2px solid #8a1f33;
  background: linear-gradient(180deg, #ff5a78 0%, #e0263f 45%, #8a1320 100%);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.1em;
  cursor: pointer;
  box-shadow: 0 3px 0 #4d1320, inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.dl5-stop-btn:active { transform: translateY(1px); box-shadow: 0 1px 0 #4d1320; }
.dl5-stop-btn:hover { filter: brightness(1.08); }
.dl5-bpm-block { display: flex; align-items: center; gap: 6px; }
.dl5-bpm-lbl { font-size: 9px; font-weight: 800; color: var(--dl5-muted); letter-spacing: 0.08em; }
.dl5-bpm-input {
  width: 48px;
  background: #1a1614;
  border: 1px solid var(--dl5-border);
  color: var(--dl5-yellow);
  font-weight: 800;
  text-align: center;
  padding: 5px;
  font-size: 12px;
}
.dl5-icon-btn, .dl5-pulse-btn, .dl5-load-btn {
  padding: 6px 12px;
  border: 1px solid var(--dl5-border);
  background: #1a1614;
  color: var(--dl5-muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.dl5-icon-btn:hover, .dl5-load-btn:hover { border-color: var(--dl5-muted); color: #fff; }
.dl5-pulse-btn.on {
  background: var(--dl5-orange);
  border-color: #cc7000;
  color: #000;
  font-weight: 900;
}
.dl5-util-icons { font-size: 10px; color: var(--dl5-dim); letter-spacing: 0.05em; }

/* ── Bank strip (colored tabs) ── */
.dl5-bank-strip {
  display: flex;
  flex-shrink: 0;
  background: #0e0c0a;
  border-bottom: 2px solid #2a2420;
}
.dl5-bank-tab {
  padding: 9px 22px;
  border: none;
  border-right: 1px solid #3a3530;
  background: #161412;
  color: var(--dl5-dim);
  font-weight: 800;
  font-size: 11px;
  cursor: pointer;
  position: relative;
  --dl5-accent: var(--dl5-yellow);
}
.dl5-bank-tab::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--dl5-accent);
  opacity: 0.55;
}
.dl5-bank-tab:hover { color: var(--dl5-muted); background: #1e1a18; }
.dl5-bank-tab:hover::after { opacity: 0.85; }
.dl5-bank-tab.on {
  color: var(--dl5-accent);
  background: #252018;
  text-shadow: 0 0 20px color-mix(in srgb, var(--dl5-accent) 60%, transparent);
}
.dl5-bank-tab.on::after {
  opacity: 1;
  height: 5px;
  box-shadow: 0 0 12px var(--dl5-accent);
}
.dl5-bank-add { color: var(--dl5-dim); }
.dl5-bank-add::after { display: none; }
.dl5-bank-tab-label {
  pointer-events: none;
}
.dl5-bank-tab:not(.dl5-bank-add) {
  padding-right: 26px;
}
.dl5-bank-del {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  border-radius: 2px;
  background: transparent;
  color: var(--dl5-dim);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s, color 0.12s, background 0.12s;
}
.dl5-bank-tab:hover .dl5-bank-del,
.dl5-bank-tab.on .dl5-bank-del {
  opacity: 1;
}
.dl5-bank-del:hover {
  color: #ff6b6b;
  background: rgba(255, 80, 80, 0.15);
}

/* ── Upper workspace ── */
.dl5-upper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(320px, 32vw);
  flex: 1 1 42%;
  min-height: 200px;
  overflow: hidden;
}
.dl5-scenes-area {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 10px;
  background: #141210;
}
.dl5-bank-col {
  flex-shrink: 0;
  width: 152px;
  display: flex;
  flex-direction: column;
  border-radius: 3px;
  border: 1px solid #3a3530;
  border-top: 4px solid var(--dl5-accent, var(--dl5-yellow));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, #161412 48px, #12100e 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.dl5-col-head {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  font-weight: 900;
  font-size: 11px;
  color: var(--dl5-accent, var(--dl5-yellow));
  text-transform: capitalize;
  letter-spacing: 0.04em;
}
.dl5-col-arrow { font-size: 9px; opacity: 0.75; color: var(--dl5-muted); }
.dl5-col-transport {
  display: flex;
  justify-content: center;
  gap: 3px;
  padding: 5px 6px;
  border-bottom: 1px solid #3a3530;
  background: rgba(0, 0, 0, 0.25);
}
.dl5-ct {
  width: 28px;
  height: 22px;
  border: 1px solid var(--dl5-border);
  background: #1e1a18;
  color: var(--dl5-muted);
  font-size: 10px;
  cursor: pointer;
  border-radius: 2px;
}
.dl5-ct:hover { background: #2a2420; color: #fff; border-color: #888; }
.dl5-col-scenes {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.dl5-col-scenes::-webkit-scrollbar { width: 6px; }
.dl5-col-scenes::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--dl5-accent, #ffd400) 40%, #3a3530);
  border-radius: 3px;
}

/* ── Scene cards (bank-colored, always active) ── */
.dl5-bank-col.bank-tab-on {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--dl5-accent) 55%, transparent),
    inset 0 0 24px color-mix(in srgb, var(--dl5-accent) 8%, transparent);
}
.dl5-scene-card {
  position: relative;
  width: 100%;
  height: 52px;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--bank-accent, #ffd400) 30%, #2a2520);
  border-radius: 4px;
  background: #1a1714;
  cursor: pointer;
  text-align: left;
  padding: 0;
  color: var(--dl5-muted);
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s, height 0.12s;
  pointer-events: auto;
  overflow: hidden;
}
.dl5-scene-card.playing {
  height: 58px;
}
.dl5-scene-card:hover {
  border-color: var(--bank-accent, #ffd400);
  background: #221e1a;
}
.dl5-scene-card.selected:not(.playing) {
  border-color: var(--bank-accent, #ffd400);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--bank-accent) 60%, transparent);
}
.dl5-scene-card.playing {
  background: color-mix(in srgb, var(--bank-accent) 14%, #1a1714);
  border-color: var(--bank-accent, #ffd400);
  color: var(--dl5-text);
  box-shadow: 0 0 10px color-mix(in srgb, var(--bank-accent) 30%, transparent);
}
.dl5-card-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--bank-accent, var(--dl5-orange));
  border-radius: 4px 0 0 4px;
  pointer-events: none;
}
.dl5-card-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 0 0 2px 2px;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
}
.dl5-card-progress.on { opacity: 1; }
.dl5-card-progress > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--bank-accent) 60%, #1a1400),
    #1a1400);
  box-shadow: 0 0 6px color-mix(in srgb, var(--bank-accent) 70%, transparent);
  transition: width 0.12s linear;
}
.dl5-scene-card:not(.playing) .dl5-card-progress > i {
  background: var(--bank-accent, #ffd400);
}
.dl5-card-edit {
  position: absolute;
  bottom: 6px;
  right: 32px;
  width: 22px;
  height: 22px;
  border: 1px solid #5b514b;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--bank-accent, var(--dl5-yellow));
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.12s, border-color 0.12s, background 0.12s;
  z-index: 2;
}
.dl5-scene-card:hover .dl5-card-edit,
.dl5-scene-card.selected .dl5-card-edit,
.dl5-scene-card.playing .dl5-card-edit {
  opacity: 0.9;
}
.dl5-card-edit:hover {
  opacity: 1 !important;
  border-color: var(--bank-accent, #ffd400);
  background: color-mix(in srgb, var(--bank-accent) 22%, rgba(0, 0, 0, 0.5));
}
.dl5-scene-card.playing .dl5-card-edit {
  background: color-mix(in srgb, var(--bank-accent) 25%, #3d3200);
  border-color: color-mix(in srgb, var(--bank-accent) 50%, #1a1400);
  color: #1a1400;
}
.dl5-card-name {
  display: block;
  margin: 0;
  padding: 5px 46px 0 10px;
  font-size: 11px;
  font-weight: 800;
  color: var(--dl5-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.dl5-scene-card.playing .dl5-card-name {
  padding-right: 54px;
}
.dl5-card-type {
  display: block;
  padding: 1px 10px 0;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--bank-accent) 65%, var(--dl5-dim));
  line-height: 1.2;
}
.dl5-scene-card.playing .dl5-card-type {
  display: none;
}
.dl5-card-timer {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--bank-accent) 80%, var(--dl5-dim));
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  z-index: 1;
  line-height: 1.25;
}
/* Idle: total duration top-right */
.dl5-scene-card:not(.playing) .dl5-card-timer {
  position: absolute;
  top: 6px;
  right: 8px;
  left: auto;
  bottom: auto;
  font-size: 8px;
  opacity: 0.85;
}
/* Playing: elapsed / total on second line */
.dl5-scene-card.playing .dl5-card-timer {
  display: block;
  position: static;
  padding: 2px 10px 4px;
  font-size: 9px;
  color: var(--bank-accent, #ffd400);
  font-weight: 900;
}
.dl5-card-loop {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 11px;
  color: color-mix(in srgb, var(--bank-accent) 75%, var(--dl5-dim));
  font-weight: 900;
  pointer-events: none;
}
.dl5-scene-card.playing .dl5-card-loop { right: 8px; color: var(--bank-accent, #ffd400); }
.dl5-card-play,
.dl5-card-edit {
  position: absolute;
  top: 5px;
  width: 20px;
  height: 18px;
  border: 1px solid color-mix(in srgb, var(--bank-accent) 35%, #5b514b);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--bank-accent, var(--dl5-yellow));
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.12s, border-color 0.12s, background 0.12s;
  z-index: 3;
}
.dl5-card-play { right: 6px; }
.dl5-card-edit { right: 30px; }
.dl5-scene-card:hover .dl5-card-play,
.dl5-scene-card:hover .dl5-card-edit,
.dl5-scene-card.selected .dl5-card-play,
.dl5-scene-card.selected .dl5-card-edit,
.dl5-scene-card.playing .dl5-card-play {
  opacity: 1;
}
.dl5-card-play:hover,
.dl5-card-edit:hover {
  opacity: 1 !important;
  border-color: var(--bank-accent, #ffd400);
  background: color-mix(in srgb, var(--bank-accent) 25%, rgba(0, 0, 0, 0.6));
}
.dl5-scene-slot {
  height: 52px;
  flex: 0 0 auto;
  border: 1px dashed color-mix(in srgb, var(--bank-accent, #5b514b) 30%, #3a3530);
  background: color-mix(in srgb, var(--bank-accent) 3%, rgba(0, 0, 0, 0.3));
  border-radius: 3px;
  pointer-events: none;
}

/* ── FX panel ── */
.dl5-fx-panel {
  display: flex;
  flex-direction: column;
  background: var(--dl5-panel);
  border-left: 2px solid var(--dl5-border);
  min-height: 0;
  overflow: hidden;
}
.dl5-fx-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--dl5-border);
  background: #1e1a17;
  flex: 0 0 auto;
}
.dl5-fx-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.dl5-fx-body::-webkit-scrollbar { width: 6px; }
.dl5-fx-body::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--dl5-yellow) 35%, #3a3530);
  border-radius: 3px;
}
.dl5-fx-fixtures {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--dl5-border);
  background: rgba(0, 0, 0, 0.18);
}
.dl5-fx-fix-label { font-size: 11px; color: var(--dl5-muted); }
.dl5-fx-fix-label b { color: var(--dl5-yellow); font-weight: 800; }
.dl5-fx-fix-set {
  border: 1px solid var(--dl5-border);
  background: #1e1a18;
  color: var(--dl5-text);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
}
.dl5-fx-fix-set:hover { background: #2a2420; border-color: var(--dl5-yellow); }
.dl5-fx-play {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  border: 2px solid #2ecc71;
  background: linear-gradient(180deg, #3d5 0%, #1a8a4a 100%);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(46, 204, 113, 0.35);
}
.dl5-fx-scene-name {
  flex: 1;
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}
.dl5-fx-collapse { border: none; background: transparent; color: var(--dl5-muted); cursor: pointer; font-size: 14px; }
.dl5-fx-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 800;
  color: var(--dl5-orange);
  letter-spacing: 0.1em;
  border-bottom: 1px solid #3a3530;
  background: #1a1614;
}
.dl5-fx-close { border: none; background: transparent; color: var(--dl5-muted); cursor: pointer; font-size: 14px; }
.dl5-fx-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  font-size: 10px;
  background: #1e1a17;
}
.dl5-fx-row label {
  color: var(--dl5-muted);
  min-width: 58px;
  font-weight: 700;
}
.dl5-fx-row select,
.dl5-fx-select {
  flex: 1;
  background: #12100e;
  border: 1px solid var(--dl5-border);
  color: #fff;
  font-size: 11px;
  padding: 6px 8px;
  min-height: 28px;
  cursor: pointer;
}
.dl5-fx-select:focus {
  border-color: var(--dl5-yellow);
  outline: none;
}
.dl5-fx-opts {
  padding: 4px 10px 8px;
  border-bottom: 1px solid #3a3530;
  background: #141210;
}
.dl5-fx-opt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.dl5-fx-opt-lbl {
  font-size: 9px;
  font-weight: 800;
  color: var(--dl5-dim);
  min-width: 52px;
}
.dl5-fx-opt-val {
  font-size: 10px;
  color: var(--dl5-yellow);
  min-width: 36px;
}
.dl5-fx-chk {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--dl5-muted);
  cursor: pointer;
}
.dl5-fx-chk input { accent-color: var(--dl5-yellow); }
.dl5-fx-speed {
  flex: 1;
  accent-color: var(--dl5-yellow);
  min-width: 80px;
}
.dl5-fx-duration {
  flex: 1;
  background: #12100e;
  border: 1px solid var(--dl5-border);
  color: #fff;
  font-size: 10px;
  padding: 4px 8px;
  font-family: inherit;
  max-width: 100px;
}
.dl5-curve-tools button {
  font-size: 11px;
}
.dl5-curve-wrap {
  flex: 1;
  min-height: 160px;
  padding: 8px;
  background: #0a0908;
  border-top: 1px solid #3a3530;
  border-bottom: 1px solid #3a3530;
}
.dl5-curve-wrap canvas {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--dl5-grid);
  border-radius: 2px;
}
.dl5-curve-tools {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: #1a1614;
}
.dl5-curve-tools button {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--dl5-border);
  background: #2a2420;
  color: var(--dl5-muted);
  font-size: 12px;
  cursor: pointer;
  border-radius: 2px;
}
.dl5-curve-tools button:hover {
  border-color: var(--dl5-yellow);
  color: #fff;
  background: #33302c;
}

/* ── Groups ── */
.dl5-groups-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #0e0c0a;
  border-top: 1px solid var(--dl5-border);
  border-bottom: 1px solid var(--dl5-border);
  flex-shrink: 0;
}
.dl5-groups-lbl {
  font-size: 10px;
  font-weight: 900;
  color: var(--dl5-muted);
  letter-spacing: 0.14em;
}
.dl5-grp-btn {
  padding: 5px 14px;
  border: 1px solid var(--dl5-border);
  background: #1e1a17;
  color: var(--dl5-muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 2px;
}
.dl5-grp-btn:hover { color: #fff; border-color: #888; }
.dl5-grp-btn.on {
  border-color: #fff;
  color: #fff;
  background: #3a3530;
  box-shadow: 0 0 0 1px #fff;
}

/* ── Lower deck ── */
.dl5-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px minmax(300px, 38%);
  flex: 1 1 38%;
  min-height: 200px;
  max-height: 42vh;
  flex-shrink: 0;
  border-top: 2px solid #2a2420;
}
.dl5-map-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--dl5-border);
  min-width: 0;
  background: #141210;
}
.dl5-map-toolbar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: var(--dl5-panel);
  border-bottom: 1px solid var(--dl5-border);
}
.dl5-tb, .dl5-tb-v {
  width: 28px;
  height: 24px;
  border: 1px solid var(--dl5-border);
  background: #1e1a17;
  color: var(--dl5-muted);
  font-size: 11px;
  cursor: pointer;
  border-radius: 2px;
}
.dl5-tb:hover, .dl5-tb-v:hover { color: #fff; border-color: #888; }
.dl5-tb.on {
  background: #4a423c;
  color: #fff;
  border-color: var(--dl5-yellow);
}
.dl5-zoom {
  flex: 1;
  max-width: 100px;
  accent-color: var(--dl5-yellow);
}
.dl5-map-body { display: flex; flex: 1; min-height: 0; }
.dl5-map-rail {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 5px;
  background: #0e0c0a;
  border-right: 1px solid var(--dl5-border);
}
.dl5-map-canvas-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #0a0908;
}
.dl5-map-grid {
  position: absolute;
  inset: 8px;
  background-color: #0e0c0a;
  background-image:
    linear-gradient(var(--dl5-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--dl5-grid) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 1px solid var(--dl5-border);
  border-radius: 2px;
}
.dl5-map-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dl5-dim);
  font-size: 11px;
}
.dl5-fx-cell {
  position: absolute;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 2px solid #6b5f56;
  border-radius: 4px;
  background: rgba(var(--fx-rgb, 80, 80, 80), calc(var(--fx-a, 0.25) * 0.85));
  font-size: 10px;
  font-weight: 900;
  color: #fff;
  cursor: grab;
  padding: 0;
  touch-action: none;
  user-select: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}
.dl5-fx-cell.lit {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 14px rgba(var(--fx-rgb, 255, 255, 255), 0.45);
}
.dl5-fx-cell.selected {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--dl5-yellow), 0 0 16px rgba(255, 212, 0, 0.45);
}
.dl5-fx-cell:active {
  cursor: grabbing;
  z-index: 20;
}
.dl5-fx-cell-bar {
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 0;
  height: 4px;
  border-radius: 0 0 2px 2px;
  pointer-events: none;
}

.dl5-sel-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--dl5-border);
  background: var(--dl5-panel);
}
.dl5-sel-title {
  padding: 10px 6px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: center;
  color: var(--dl5-muted);
  border-bottom: 1px solid var(--dl5-border);
}
.dl5-sel-list {
  flex: 1;
  background: #141210;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 4px;
  overflow-y: auto;
}
.dl5-sel-item {
  width: 100%;
  padding: 6px 4px;
  border: 1px solid var(--dl5-border);
  background: #1e1a17;
  color: var(--dl5-muted);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  border-radius: 2px;
}
.dl5-sel-item:hover { border-color: var(--dl5-yellow); color: #fff; }
.dl5-sel-empty { display: block; text-align: center; color: var(--dl5-dim); font-size: 9px; padding: 8px 0; }
.dl5-sel-add {
  margin: 8px;
  padding: 10px;
  border: 1px dashed var(--dl5-border);
  background: transparent;
  color: var(--dl5-dim);
  cursor: pointer;
  font-size: 16px;
}
.dl5-sel-add:hover { border-color: var(--dl5-yellow); color: var(--dl5-yellow); }

.dl5-live-panel {
  display: flex;
  flex-direction: column;
  background: #1a1614;
  min-width: 0;
}
.dl5-live-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--dl5-border);
  background: #0e0c0a;
  font-size: 10px;
}
.dl5-live-mode, .dl5-live-tab {
  padding: 5px 12px;
  border: 1px solid var(--dl5-border);
  background: #1e1a17;
  color: var(--dl5-dim);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.06em;
  cursor: pointer;
  border-radius: 2px;
}
.dl5-live-mode.on, .dl5-live-tab.on {
  background: var(--dl5-yellow);
  color: #1a1400;
  border-color: #c9a000;
  box-shadow: 0 0 10px rgba(255, 212, 0, 0.25);
}
.dl5-live-tab:not(.on) { color: var(--dl5-muted); }
.dl5-live-tools {
  flex: 1;
  text-align: center;
  color: var(--dl5-dim);
  font-size: 9px;
  letter-spacing: 0.08em;
}
.dl5-live-body { display: flex; flex: 1; min-height: 0; overflow: hidden; }
.dl5-cat-menu {
  display: flex;
  flex-direction: column;
  width: 68px;
  border-right: 1px solid var(--dl5-border);
  background: #0e0c0a;
  overflow-y: auto;
}
.dl5-cat-btn {
  padding: 11px 4px;
  border: none;
  border-bottom: 1px solid #2a2420;
  background: transparent;
  color: var(--dl5-dim);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-align: center;
}
.dl5-cat-btn:hover { color: var(--dl5-muted); background: #1a1614; }
.dl5-cat-btn.on {
  background: #2a2430;
  color: var(--dl5-yellow);
  border-left: 3px solid var(--dl5-yellow);
  box-shadow: inset 0 0 24px rgba(255, 212, 0, 0.08);
}
.dl5-cat-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  background: #1e1a17;
}
.dl5-pos-head {
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--dl5-yellow);
  letter-spacing: 0.04em;
}
.dl5-pos-readout {
  font-size: 11px;
  margin-bottom: 10px;
  color: var(--dl5-muted);
  font-variant-numeric: tabular-nums;
}
.dl5-pos-readout span { color: #fff; font-weight: 800; }
.dl5-pos-row { display: flex; gap: 14px; align-items: flex-start; }
.dl5-pad-wrap canvas {
  border: 1px solid var(--dl5-border);
  background: #12100e;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px #0a0908;
}
.dl5-faders { display: flex; gap: 12px; }
.dl5-fader-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 800;
  color: var(--dl5-muted);
}
.dl5-fader-col span:last-of-type { color: var(--dl5-yellow); font-size: 10px; }
.dl5-vfader {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 32px;
  height: 130px;
  accent-color: var(--dl5-yellow);
}
.dl5-hint { font-size: 10px; color: var(--dl5-dim); margin-top: 10px; line-height: 1.4; }

/* Live attribute panels */
.dl5-live-panels { min-height: 0; }
.dl5-live-panel-pane[hidden] { display: none !important; }
.dl5-sliders { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.dl5-sl { display: flex; flex-direction: column; gap: 3px; }
.dl5-sl-head {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 800;
  color: var(--dl5-muted);
}
.dl5-range {
  width: 100%;
  accent-color: var(--dl5-yellow);
  height: 6px;
}
.dl5-range--dim { accent-color: #8f8; }
.dl5-range--str { accent-color: #f66; }
.dl5-sliders--rgb { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dl5-rgb-lbl { font-size: 9px; font-weight: 900; }
.dl5-rgb-lbl--r { color: #ff4466; }
.dl5-rgb-lbl--g { color: #44ff88; }
.dl5-rgb-lbl--b { color: #4488ff; }
.dl5-chip-row, .dl5-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.dl5-chip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 5px; }
.dl5-chip {
  padding: 5px 8px;
  border: 1px solid var(--dl5-border);
  background: #1e1a17;
  color: var(--dl5-muted);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
  border-radius: 2px;
}
.dl5-chip:hover { border-color: var(--dl5-yellow); color: #fff; }
.dl5-chip--hot { border-color: #a44; color: #f88; }
.dl5-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}
.dl5-color-swatch {
  width: 28px;
  height: 28px;
  border: 2px solid #555;
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
}
.dl5-color-swatch:hover { border-color: #fff; transform: scale(1.08); }
.dl5-rgbw-preview {
  height: 22px;
  border-radius: 3px;
  border: 1px solid var(--dl5-border);
  margin-bottom: 10px;
  background: #222;
}

/* In-page dialog + toast */
.dl5-dialog {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.dl5-dialog[hidden] { display: none !important; }
.dl5-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}
.dl5-dialog-box {
  position: relative;
  width: min(400px, 92vw);
  background: #2b2521;
  border: 1px solid #6b5f56;
  border-radius: 6px;
  padding: 18px 20px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
}
.dl5-dialog-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--dl5-yellow);
  text-transform: uppercase;
}
.dl5-dialog-msg {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--dl5-muted);
}
.dl5-dialog-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.dl5-dialog-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--dl5-dim);
  letter-spacing: 0.06em;
}
.dl5-dialog-input {
  width: 100%;
  padding: 10px 12px;
  background: #12100e;
  border: 1px solid var(--dl5-border);
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.dl5-dialog-input:focus {
  border-color: var(--dl5-yellow);
  box-shadow: 0 0 0 2px rgba(255, 212, 0, 0.25);
}
.dl5-dialog-btns {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.dl5-dialog-btn {
  padding: 8px 16px;
  border: 1px solid var(--dl5-border);
  background: #1e1a17;
  color: var(--dl5-muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  border-radius: 3px;
}
.dl5-dialog-btn:hover { color: #fff; border-color: #888; }
.dl5-dialog-btn--ok {
  background: linear-gradient(180deg, #ffe566 0%, #d4a800 100%);
  border-color: #b89200;
  color: #1a1400;
}
.dl5-dialog-btn--ok.dl5-dialog-btn--danger {
  background: linear-gradient(180deg, #ff6666 0%, #cc2222 100%);
  border-color: #aa1111;
  color: #fff;
}
.dl5-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 12100;
  padding: 12px 20px;
  background: #2b2521;
  border: 1px solid var(--dl5-yellow);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: min(480px, 90vw);
  text-align: center;
}
.dl5-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.dl5-toast[hidden] { display: none !important; }

/* ── New Scene picker (Daslight) ── */
.dl5-new-scene {
  position: fixed;
  inset: 0;
  z-index: 12050;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  pointer-events: none;
}
.dl5-new-scene[hidden] { display: none !important; }
.dl5-new-scene.show { pointer-events: auto; }
.dl5-new-scene-backdrop {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
}
.dl5-new-scene-panel {
  width: min(220px, 42vw);
  background: #12100e;
  border-left: 2px solid #3a3530;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dl5-new-scene-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #3a3530;
  background: #0e0c0a;
}
.dl5-new-scene-head h3 {
  flex: 1;
  margin: 0;
  font-size: 13px;
  font-weight: 900;
  color: #ff6b9d;
  letter-spacing: 0.04em;
}
.dl5-new-scene-play {
  width: 22px;
  height: 22px;
  border: 1px solid #5b514b;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--dl5-muted);
}
.dl5-new-scene-close {
  border: none;
  background: transparent;
  color: var(--dl5-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
}
.dl5-ns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px;
  overflow-y: auto;
  flex: 1;
}
.dl5-ns-type-hint,
.dl5-ns-preset-desc {
  margin: 8px 12px 0;
  font-size: 9px;
  color: var(--dl5-dim);
  line-height: 1.35;
}
.dl5-ns-type,
.dl5-ns-preset {
  min-height: 44px;
  padding: 8px 6px;
  border: 1px solid #5b514b;
  border-radius: 2px;
  background: #1a1714;
  color: #c9bdb4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.1s, background 0.1s, color 0.1s, box-shadow 0.1s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.dl5-ns-type {
  border-top: 3px solid var(--ns-accent, #ffd400);
}
.dl5-ns-type-icon {
  font-size: 14px;
  opacity: 0.85;
  line-height: 1;
}
.dl5-ns-type-label { line-height: 1.2; }
.dl5-ns-type:hover,
.dl5-ns-preset:hover {
  border-color: #ff6b9d;
  color: #fff;
  background: #252018;
  box-shadow: 0 0 12px rgba(255, 107, 157, 0.2);
}
.dl5-ns-type.wide {
  grid-column: 1 / -1;
  min-height: 40px;
  flex-direction: row;
  gap: 8px;
}
.dl5-ns-preset.has-swatch {
  flex-direction: row;
  justify-content: flex-start;
  text-align: left;
  padding-left: 8px;
  gap: 8px;
}
.dl5-ns-swatch {
  width: 22px;
  height: 22px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}
.dl5-ns-preset-hint {
  display: block;
  font-size: 8px;
  font-weight: 700;
  color: var(--dl5-dim);
  letter-spacing: 0.04em;
  text-transform: none;
}
.dl5-ns-back {
  margin: 8px 10px 0;
  padding: 4px 8px;
  border: none;
  background: transparent;
  color: var(--dl5-yellow);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.dl5-ns-preset-hd {
  margin: 4px 12px 0;
  font-size: 10px;
  font-weight: 800;
  color: var(--dl5-orange);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dl5-ns-grid-presets .dl5-ns-preset {
  min-height: 38px;
  font-size: 9px;
}
.dl5-ns-preset-name { display: block; line-height: 1.25; }

/* FX panel preset chips */
.dl5-fx-preset-block {
  padding: 6px 10px 4px;
  border-bottom: 1px solid #2a2420;
}
.dl5-fx-preset-block[hidden] { display: none !important; }
.dl5-fx-preset-lbl {
  font-size: 9px;
  font-weight: 800;
  color: var(--dl5-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.dl5-fx-preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.dl5-fx-preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px 4px 4px;
  border: 1px solid #5b514b;
  border-radius: 2px;
  background: #1a1714;
  color: #c9bdb4;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
}
.dl5-preset-swatch {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}
.dl5-preset-swatch--icon {
  background: linear-gradient(135deg, #ffd400, #ff8c00);
}
.dl5-preset-chip-label { line-height: 1.1; }
.dl5-fx-preset-chip:hover { border-color: var(--dl5-yellow); color: #fff; }
.dl5-fx-preset-chip.on {
  border-color: var(--dl5-yellow);
  background: #2a2418;
  color: var(--dl5-yellow);
}
#dl5-fx-move-block[hidden],
#dl5-curve-wrap[hidden],
#dl5-curve-tools[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .dl5-upper { grid-template-columns: 1fr; }
  .dl5-fx-panel {
    max-height: 240px;
    border-left: none;
    border-top: 2px solid var(--dl5-border);
  }
  .dl5-lower {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    max-height: none;
  }
}

/* ============================================================= *
 *  TOUCH view — touch-first live show-control surface           *
 *  (#dl5-touch, rendered by daslight-touch.js)                  *
 * ============================================================= */

/* Nav switching: show TOUCH, hide the CONTROL editor layout. */
.dl5.nav-touch .dl5-upper,
.dl5.nav-touch .dl5-groups-bar,
.dl5.nav-touch .dl5-lower,
.dl5.nav-touch .dl5-bank-strip { display: none !important; }

.dl5.nav-touch #dl5-touch {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.dl5-touch {
  gap: 12px;
  padding: 14px 16px 18px;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(184,138,255,.10), transparent 60%),
    var(--dl5-bg);
  overflow: hidden;
  position: relative;
}

/* ── Transport bar ── */
.dtouch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.dtouch-bar-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dtouch-bar-dot { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 12px currentColor; }
.dtouch-bar-bank { font-size: 18px; font-weight: 800; letter-spacing: .04em; color: var(--dl5-text); }
.dtouch-bar-count { font-size: 11px; color: var(--dl5-dim); text-transform: uppercase; letter-spacing: .08em; }
.dtouch-bar-actions { display: flex; gap: 10px; }
.dtouch-bar-actions button {
  font: inherit;
  font-weight: 800;
  letter-spacing: .06em;
  border: 1px solid var(--dl5-border);
  border-radius: 12px;
  padding: 12px 18px;
  min-height: 48px;
  color: var(--dl5-text);
  background: var(--dl5-panel);
  cursor: pointer;
  transition: transform .06s ease, filter .12s ease, background .12s ease;
}
.dtouch-bar-actions button:active { transform: translateY(1px) scale(.98); }
.dtouch-go { background: linear-gradient(180deg, #1c6b3a, #0f4a27) !important; border-color: #2ea35e !important; }
.dtouch-stop { background: linear-gradient(180deg, #7a1f33, #4d1320) !important; border-color: var(--dl5-pink) !important; }
.dtouch-black { background: #0c0a09 !important; }
.dtouch-bar-actions button:hover { filter: brightness(1.12); }

/* ── Bank rail ── */
.dtouch-banks {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.dtouch-bank {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--dl5-border);
  background: var(--dl5-card-dark);
  color: var(--dl5-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.dtouch-bank-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.dtouch-bank.on {
  color: var(--dl5-text);
  border-color: var(--accent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 22%, var(--dl5-card-dark)), var(--dl5-card-dark));
  box-shadow: 0 0 0 1px var(--accent) inset, 0 6px 18px rgba(0,0,0,.35);
}
.dtouch-bank-act {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 7px;
  background: rgba(255,255,255,.08); font-size: 13px; line-height: 1;
}
.dtouch-bank-act.danger { color: var(--dl5-pink); }
.dtouch-bank-act:hover { background: rgba(255,255,255,.18); }
.dtouch-bank-add { justify-content: center; font-size: 22px; font-weight: 800; padding: 0 18px; color: var(--dl5-dim); }

/* ── Program tile grid ── */
.dtouch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  overflow-y: auto;
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
  padding: 2px 2px 8px;
}
.dtouch-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 116px;
  padding: 12px 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--dl5-border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, var(--dl5-card)), var(--dl5-card-dark));
  color: var(--dl5-text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: transform .07s ease, box-shadow .15s ease, border-color .15s ease;
}
.dtouch-tile:active { transform: scale(.97); }
.dtouch-tile.selected { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent) inset; }
.dtouch-tile.playing {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent) inset, 0 0 26px color-mix(in srgb, var(--accent) 45%, transparent);
  animation: dtouch-pulse 1.4s ease-in-out infinite;
}
@keyframes dtouch-pulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--accent) inset, 0 0 18px color-mix(in srgb, var(--accent) 35%, transparent); }
  50% { box-shadow: 0 0 0 2px var(--accent) inset, 0 0 34px color-mix(in srgb, var(--accent) 65%, transparent); }
}
.dtouch-tile-head { display: flex; align-items: center; gap: 6px; }
.dtouch-type {
  font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 6px; background: rgba(0,0,0,.35); color: var(--accent);
}
.dtouch-loop { font-size: 13px; color: var(--accent); }
.dtouch-edit {
  margin-left: auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255,255,255,.08); font-size: 13px;
}
.dtouch-edit:hover { background: rgba(255,255,255,.2); }
.dtouch-name { font-size: 16px; font-weight: 800; line-height: 1.15; flex: 1 1 auto; }
.dtouch-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dtouch-timer { font-size: 11px; color: var(--dl5-muted); font-variant-numeric: tabular-nums; }
.dtouch-state { font-size: 11px; font-weight: 800; letter-spacing: .05em; color: var(--accent); }
.dtouch-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: rgba(255,255,255,.07); opacity: 0;
}
.dtouch-progress.on { opacity: 1; }
.dtouch-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }

.dtouch-add {
  align-items: center; justify-content: center; gap: 6px;
  border-style: dashed; background: transparent; color: var(--dl5-dim);
}
.dtouch-add:hover { color: var(--dl5-text); border-color: var(--dl5-muted); }
.dtouch-add-plus { font-size: 30px; font-weight: 300; line-height: 1; }
.dtouch-add-lbl { font-size: 12px; letter-spacing: .04em; }
.dtouch-empty { color: var(--dl5-dim); font-size: 12px; padding: 4px; }

/* ── Edit sheet ── */
.dtouch-sheet[hidden] { display: none; }
.dtouch-sheet {
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: min(440px, 96%);
  max-height: 86%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px 22px;
  background: var(--dl5-panel);
  border: 1px solid var(--dl5-border);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -16px 48px rgba(0,0,0,.55);
  z-index: 20;
  animation: dtouch-sheet-up .18s ease;
}
@keyframes dtouch-sheet-up { from { transform: translate(-50%, 30px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.dtouch-sheet-head { display: flex; align-items: center; justify-content: space-between; }
.dtouch-sheet-head h3 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: .03em; }
.dtouch-sheet-x {
  width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--dl5-border);
  background: var(--dl5-card-dark); color: var(--dl5-text); font-size: 18px; cursor: pointer;
}
.dtouch-field { display: flex; flex-direction: column; gap: 6px; }
.dtouch-field > span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dl5-dim); }
.dtouch-field.dtouch-row { flex-direction: row; align-items: center; justify-content: space-between; }
.dtouch-field input[type="text"], .dtouch-field select {
  font: inherit; font-size: 14px;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--dl5-border); background: var(--dl5-card-dark); color: var(--dl5-text);
}
.dtouch-field input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--dl5-yellow); }
.dtouch-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.dtouch-swatch { width: 34px; height: 34px; border-radius: 9px; border: 2px solid transparent; cursor: pointer; }
.dtouch-swatch.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.5); }
.dtouch-sheet-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }
.dtouch-mini {
  font: inherit; font-weight: 700; letter-spacing: .03em;
  padding: 11px 18px; min-height: 44px; border-radius: 11px;
  border: 1px solid var(--dl5-border); background: var(--dl5-card-dark); color: var(--dl5-text); cursor: pointer;
}
.dtouch-mini.primary { background: linear-gradient(180deg, #1c6b3a, #0f4a27); border-color: #2ea35e; }
.dtouch-mini.danger { color: var(--dl5-pink); border-color: color-mix(in srgb, var(--dl5-pink) 50%, var(--dl5-border)); }
.dtouch-mini:hover { filter: brightness(1.12); }

/* ── LIVE attribute panels (BEAM / FOCUS / OTHER / FADER) ── */
.dl5-attr-mount { display: flex; flex-direction: column; }
.dl5-attr-sliders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px 14px;
  margin-bottom: 10px;
}
.dl5-attr-sliders .dl5-sl { gap: 4px; }
.dl5-attr-val { color: var(--dl5-muted); font-variant-numeric: tabular-nums; }
