/* ============================================================================
   LIVE mode — DJ / VJ console (2026-12-05, Claude)
   Same hardware language as the rack: aluminium module panels, dark anodised
   windows, phosphor green / VFD amber readouts, red tally for PROGRAM.
   ============================================================================ */
.led-red.active { background: #ff3b5c; box-shadow: 0 0 9px #ff3b5c; }
#live-view { display: grid; gap: 12px; padding: 0 0 12px; }
#live-view[hidden] { display: none; }
.live-loading { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.12em; color: var(--print-2); text-align: center; padding: 30px; }
.live-loading[hidden] { display: none; }
.lv-small { font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; color: inherit; opacity: 0.8; }

/* the dark inner face every live section sits on */
.live-vj, .live-dj, .live-crate { padding: 14px; }
.lv-vj-grid, .lv-dj-grid, .lv-crate-list, .lv-crate-head {
  --ink: #eef2f7; color: #eef2f7;
}
.lv-vj-grid, .lv-dj-grid {
  background: linear-gradient(180deg, var(--anod-1), var(--anod-2));
  border: 3px solid #0c0c0d; border-radius: 6px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.7);
  padding: 12px;
}

/* ------------------------------------------------------------- top bar */
.live-bar { display: flex; align-items: center; gap: 14px; padding: 10px 18px; flex-wrap: wrap; }
.live-bar-note { font-family: var(--font-mono); font-size: 12px; color: var(--print-2); flex: 1; min-width: 220px; }
.live-bar-btns { display: flex; gap: 8px; }
#lv-out2.active, #lv-map-b.active { color: #0b5a2b; background: linear-gradient(180deg, #d9fbe6, #a9edc4); border-color: #22a85a; box-shadow: inset 0 1px 0 #fff, 0 0 10px rgba(57, 255, 136, 0.35); }

/* ------------------------------------------------------------- buttons */
.lv-btn {
  appearance: none; border: 1px solid #3b4454; border-radius: 3px;
  background: linear-gradient(180deg, #2d3442, #1e232d); color: #eef2f7;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  padding: 6px 9px; cursor: pointer; line-height: 1.1;
}
.lv-btn:hover { border-color: #5b6576; }
.lv-btn:focus-visible, .lv-knob:focus-visible, .lv-clip:focus-visible { outline: 2px solid #ffd43b; outline-offset: 2px; }
.lv-btn.active { color: #111; background: linear-gradient(180deg, #ffd43b, #e7b512); border-color: #b68c00; }
.lv-auto.active { background: linear-gradient(180deg, #39ff88, #22c766); border-color: #149448; color: #062010; }
.lv-take { font-size: 14px; padding: 10px 0; width: 100%; }
#lv-cut { color: #ff5c77; }
#lv-fade { color: #ffb547; }

/* ------------------------------------------------------------- VJ */
.lv-vj-grid {
  display: grid; gap: 12px; align-items: start;
  grid-template-columns: minmax(220px, 1.1fr) minmax(0, 1.3fr) 96px minmax(0, 1.6fr);
  grid-template-areas: "bin pvw trans pgm" "bin clip clip clip" "bin fx fx fx";
}
.lv-bin { grid-area: bin; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lv-bin-head { display: flex; flex-direction: column; gap: 6px; }
.lv-bin-head .mod-code, .lv-fx .mod-code, .lv-crate-head .mod-code { color: #b8bec8; }
.lv-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.lv-tab { appearance: none; border: 1px solid #3b4454; background: #15181e; color: #b8bec8; font-family: var(--font-mono); font-size: 10px; font-weight: 700; padding: 4px 7px; border-radius: 2px; cursor: pointer; }
.lv-tab.active { color: #111; background: #ffb547; border-color: #ffb547; }
.lv-bin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; max-height: 380px; overflow-y: auto; padding-right: 2px; }
.lv-clip {
  position: relative; appearance: none; border: 2px solid #26282b; border-radius: 3px; background: #050608; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; text-align: left; color: #cfd5de; overflow: hidden;
}
.lv-clip img, .lv-clip-3d { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; display: block; background: #000; }
.lv-clip-3d { display: grid; place-items: center; font-family: var(--font-display); font-size: 18px; color: #ff6aa8; background: radial-gradient(circle, #1d3a2a, #0a1d14); }
.lv-clip span { font-family: var(--font-mono); font-size: 10px; line-height: 1.25; padding: 3px 5px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-clip i { position: absolute; top: 3px; right: 3px; font-style: normal; font-family: var(--font-mono); font-size: 9px; background: rgba(0, 0, 0, 0.75); color: #ffb547; padding: 1px 4px; }
.lv-clip.is-pvw { border-color: #39ff88; }
.lv-clip-x {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(0, 0, 0, 0.8); color: #ff6b7f; font: 700 11px/1 var(--font-mono); border: 1px solid #ff3b5c; cursor: pointer;
}
.lv-clip-x:hover { background: #ff3b5c; color: #fff; }
.lv-clip.is-pgm { border-color: #ff3b5c; }
.lv-bin-note, .lv-fx-note, .lv-mix-note { font-family: var(--font-mono); font-size: 10px; color: #9aa2ae; margin: 0; }
.lv-mix-note.hot { color: #ffb547; }

.lv-mon { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lv-pvw { grid-area: pvw; }
.lv-pgm { grid-area: pgm; }
.lv-mon-label { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; display: flex; align-items: center; gap: 7px; }
.lv-tally { width: 9px; height: 9px; border-radius: 50%; }
.lv-tally.pvw { background: #39ff88; box-shadow: 0 0 7px #39ff88; }
.lv-tally.pgm { background: #ff3b5c; box-shadow: 0 0 9px #ff3b5c; }
.lv-beat { margin-left: auto; width: 10px; height: 10px; border-radius: 2px; background: #3a2a10; }
.lv-beat.on { background: #ffb547; box-shadow: 0 0 8px #ffb547; }
.lv-screen { position: relative; aspect-ratio: 16 / 9; background: #000; border: 3px solid #0c0c0d; border-radius: 4px; overflow: hidden; }
.lv-pgm .lv-screen { border-color: #4a0f1a; box-shadow: 0 0 0 1px #ff3b5c55; }
.lv-pvw .lv-screen { border-color: #0f3a22; }
.lv-screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lv-pvw-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; opacity: 0.85; }
.lv-pvw-still[hidden] { display: none; }
.lv-embed { position: absolute; inset: 0; pointer-events: none; }
.lv-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lv-screen:fullscreen { border: 0; border-radius: 0; }
.lv-mon-name { font-family: var(--font-mono); font-size: 11px; color: #cfd5de; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-walker-host { position: absolute; left: -10000px; top: 0; width: 960px; height: 540px; }

.lv-trans { grid-area: trans; display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding-top: 22px; }
.lv-trans input[type="range"]:not(.lv-vfader) { width: 100%; }
.lv-tbar { height: 120px; align-self: center; }

.lv-fx { grid-area: fx; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 10px; }
.lv-fx-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.lv-fx .lv-fx-b.active { background: linear-gradient(180deg, #2ef2d6, #12b9a2); color: #032a25; border-color: #0b8b79; }
.lv-fx-note { flex-basis: 100%; }

/* vertical faders (tempo, channels, T-bar) */
.lv-vfader { writing-mode: vertical-lr; direction: rtl; width: 26px; height: 120px; accent-color: #ffb547; }

/* ------------------------------------------------------------- DJ */
.lv-dj-grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px minmax(0, 1fr); gap: 12px; }
.lv-deck { display: flex; flex-direction: column; gap: 10px; min-width: 0; border: 1px solid #2c3038; border-radius: 4px; padding: 10px; background: rgba(0, 0, 0, 0.18); }
.lv-deck.drop { outline: 2px dashed #39ff88; outline-offset: -4px; }
.lv-deck-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lv-deck-id { font-family: var(--font-display); font-size: 22px; color: #ffb547; width: 30px; text-align: center; }
#lv-deck-B .lv-deck-id { color: #2ef2d6; }
.lv-deck-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lv-deck-title b { font-family: var(--font-title); font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-deck-title span { font-family: var(--font-mono); font-size: 11px; color: #9aa2ae; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-src-badge { font-family: var(--font-mono); font-size: 10px; font-weight: 700; padding: 2px 6px; border: 1px solid #3b4454; border-radius: 2px; color: #b8bec8; }
.lv-deck-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 170px) 54px; gap: 10px; align-items: center; }
.lv-deck-media { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lv-yt { position: relative; aspect-ratio: 16 / 9; background: #050608; border: 2px solid #0c0c0d; border-radius: 3px; overflow: hidden; }
.lv-yt iframe, .lv-yt-host { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lv-deck.is-file .lv-yt { display: none; }
.lv-wave { width: 100%; height: 60px; background: #050608; border: 2px solid #0c0c0d; border-radius: 3px; display: none; }
.lv-deck.is-file .lv-wave { display: block; }
.lv-pos { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; color: #ffb547; }
.lv-bar { flex: 1; height: 5px; background: #0b0b0c; border-radius: 2px; overflow: hidden; }
.lv-bar i { display: block; height: 100%; width: 0; background: #ffb547; }
.lv-jog-wrap { display: grid; place-items: center; }
.lv-jog { width: 100%; max-width: 170px; aspect-ratio: 1; cursor: grab; touch-action: none; }
.lv-jog:active { cursor: grabbing; }
.lv-tempo { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lv-tempo-v { font-family: var(--font-mono); font-size: 10px; color: #ffb547; }
.lv-key { appearance: none; border: 1px solid #3b4454; background: #15181e; color: #9aa2ae; font-family: var(--font-mono); font-size: 10px; font-weight: 700; padding: 3px 6px; border-radius: 2px; cursor: pointer; }
.lv-key.active { color: #062010; background: #39ff88; border-color: #39ff88; }
.lv-deck.is-yt .lv-key { opacity: 0.5; pointer-events: none; }   /* YouTube always keeps the pitch */
.lv-deck-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lv-bpm { display: flex; flex-direction: column; align-items: flex-start; margin-right: 4px; min-width: 74px; background: var(--vfd-bg); border: 1px solid #2a1d08; border-radius: 3px; padding: 3px 7px; }
.lv-bpm-v { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--vfd); text-shadow: 0 0 6px rgba(255, 181, 71, 0.5); line-height: 1; }
.lv-bpm-k { color: var(--vfd-dim); font-size: 9px; }
.lv-play { min-width: 42px; font-size: 13px; }
.lv-play.active { color: #39ff88; border-color: #39ff88; }
.lv-file-btn { display: inline-block; }
.lv-url { display: flex; gap: 4px; flex: 1; min-width: 180px; }
.lv-url input, .lv-crate-head input, .lv-crate-head select {
  flex: 1; min-width: 0; background: #0b0d11; border: 1px solid #3b4454; border-radius: 3px; color: #eef2f7;
  font-family: var(--font-mono); font-size: 12px; padding: 6px 8px;
}
.lv-url input.bad { border-color: #ff3b5c; }

.lv-mixer { display: flex; flex-direction: column; align-items: center; gap: 10px; border: 1px solid #2c3038; border-radius: 4px; padding: 10px 8px; background: rgba(0, 0, 0, 0.25); }
.lv-mix-cols { display: flex; gap: 18px; }
.lv-ch { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lv-knob-u { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.lv-knob {
  --rot: 0deg; width: 34px; height: 34px; border-radius: 50%; cursor: ns-resize; touch-action: none; position: relative;
  background: radial-gradient(circle at 35% 30%, #4a4f58, #1b1d22 70%); border: 2px solid #0b0c0e; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}
.lv-knob::after { content: ''; position: absolute; left: 50%; top: 3px; width: 3px; height: 11px; margin-left: -1.5px; background: #ffb547; border-radius: 1px; transform-origin: 50% 14px; transform: rotate(var(--rot)); }
.lv-fader-row { display: flex; gap: 6px; align-items: flex-end; }
.lv-vu { width: 7px; height: 120px; background: #0b0b0c; border-radius: 2px; position: relative; overflow: hidden; }
.lv-vu i { position: absolute; left: 0; right: 0; bottom: 0; height: 2%; background: linear-gradient(0deg, #39ff88 0%, #ffd43b 70%, #ff4d4d 100%); }
.lv-master { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.lv-xf { display: flex; align-items: center; gap: 6px; width: 100%; font-family: var(--font-display); font-size: 12px; color: #b8bec8; }
.lv-xf input { flex: 1; accent-color: #ff3b5c; }
.lv-mix-note { text-align: center; }

/* ------------------------------------------------------------- crate */
.live-crate { display: flex; flex-direction: column; gap: 10px; }
.lv-crate-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--print); }
.lv-crate-head .mod-code { color: var(--print); }
.lv-auto-info { font-family: var(--font-mono); font-size: 11px; color: var(--print-2); flex: 1; min-width: 160px; }
.lv-crate-head input { flex: 0 1 240px; }
.lv-crate-head select { flex: 0 0 auto; }
.lv-crate-list {
  max-height: 300px; overflow-y: auto; background: linear-gradient(180deg, var(--anod-1), var(--anod-2));
  border: 3px solid #0c0c0d; border-radius: 6px; padding: 4px;
}
.lv-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) 44px auto auto; gap: 8px; align-items: center; padding: 5px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.lv-row:hover { background: rgba(255, 255, 255, 0.04); }
.lv-row-e { font-size: 9px; letter-spacing: 1px; color: #ffb547; }
.lv-row-t { min-width: 0; display: flex; flex-direction: column; }
.lv-row-t b { font-family: var(--font-body); font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-row-t small { font-family: var(--font-mono); font-size: 10px; color: #9aa2ae; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-row-d { font-family: var(--font-mono); font-size: 11px; color: #9aa2ae; text-align: right; }
.lv-row .lv-load { padding: 4px 8px; }
.lv-crate-note { font-family: var(--font-mono); font-size: 11px; color: var(--print-2); margin: 0; }
.lv-crate-list .lv-crate-note { color: #9aa2ae; padding: 10px; }

/* ------------------------------------------------------------- clip transport */
.lv-clipbar { grid-area: clip; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 10px; min-width: 0; }
.lv-cb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 11px; }
.lv-cb-head .mod-code { color: #b8bec8; }
.lv-cb-tgt { display: inline-flex; gap: 2px; }
.lv-cb-name { color: #39ff88; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }
.lv-cb-time { margin-left: auto; color: #cfd5de; font-variant-numeric: tabular-nums; white-space: pre; }
.lv-tl { position: relative; height: 34px; background: #050608; border: 1px solid #3b4454; border-radius: 3px; cursor: pointer; touch-action: none; margin: 0 8px; }
.lv-tl-range { position: absolute; top: 0; bottom: 0; background: rgba(57, 255, 136, 0.16); border-left: 2px solid #39ff88; border-right: 2px solid #ffb547; }
.lv-tl-head { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1.5px; background: #ff3b5c; box-shadow: 0 0 6px rgba(255, 59, 92, 0.8); outline: none; }
.lv-tl-head:focus-visible { box-shadow: 0 0 0 3px #ffd43b; }
.lv-tl-mk {
  position: absolute; top: 100%; transform: translateX(-50%); margin-top: 2px; padding: 1px 4px; border: 1px solid #39ff88; border-radius: 2px;
  background: #0b1310; color: #39ff88; font: 700 9px/1.2 var(--font-mono); cursor: ew-resize; touch-action: none;
}
.lv-tl-mk[data-mk="out"] { border-color: #ffb547; color: #ffb547; }
.lv-tl-mk:focus-visible { outline: 2px solid #ffd43b; outline-offset: 1px; }
.lv-cb-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.lv-cb-row input[type="range"] { width: 150px; accent-color: #39ff88; }
.lv-cb-sv { font: 700 11px var(--font-mono); color: #39ff88; min-width: 4.5em; }
.lv-cb-snd-row { margin-top: 0; }
#lv-cb-snd.active { color: #062010; background: linear-gradient(180deg, #7dffb3, #39d27a); border-color: #1d8a4a; }
.lv-cb-air { font: 600 10px var(--font-mono); color: #8a93a0; letter-spacing: 0.06em; }
.lv-cb-air.live { color: #ff3b5c; font-weight: 700; }
.lv-clipbar.off .lv-tl, .lv-clipbar.off .lv-cb-row { opacity: 0.35; pointer-events: none; }
.lv-clipbar.off .lv-cb-name { color: #8a93a0; font-weight: 600; }
.lv-lite .lv-clipbar { display: none; }

/* ------------------------------------------------------------- smaller screens */
@media (max-width: 1240px) {
  .lv-vj-grid { grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1.25fr); grid-template-areas: "pvw trans pgm" "clip clip clip" "fx fx fx" "bin bin bin"; }
  .lv-bin-grid { max-height: 240px; }
  .lv-dj-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .lv-mixer { grid-column: 1 / -1; grid-row: 2; flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .lv-xf { max-width: 360px; }
}
@media (max-width: 760px) {
  .lv-vj-grid { grid-template-columns: 1fr; grid-template-areas: "pgm" "pvw" "trans" "clip" "fx" "bin"; }
  .lv-trans { flex-direction: row; flex-wrap: wrap; padding-top: 0; }
  .lv-trans .lv-take { width: auto; flex: 1; }
  .lv-tbar { writing-mode: horizontal-tb; direction: ltr; width: 100%; height: 26px; }
  .lv-dj-grid { grid-template-columns: 1fr; }
  .lv-mixer { grid-row: auto; }
  .lv-deck-body { grid-template-columns: minmax(0, 1fr) 110px 46px; }
  .lv-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .lv-row-e, .lv-row-d { display: none; }
}

/* crate rows whose videos cannot be embedded */
.lv-row.is-blocked { opacity: 0.38; }
.lv-row.is-blocked .lv-row-t b::after { content: ' · no embed'; font-weight: 400; color: #ff3b5c; font-size: 0.85em; }

/* ------------------------------------------------------------- hot cues + loops */
.lv-pads { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.lv-pads .lv-small { margin-right: 2px; }
.lv-pads-gap { margin-left: 8px; }
.lv-pad { min-width: 34px; padding: 6px 7px; color: #9aa2ae; }
.lv-pad.set { color: #111; background: linear-gradient(180deg, #ff6aa8, #e0407f); border-color: #a3245a; }
.lv-loop { min-width: 30px; color: #2ef2d6; }
.lv-loop.active { color: #032a25; background: linear-gradient(180deg, #2ef2d6, #12b9a2); border-color: #0b8b79; animation: lv-loop-blink 0.9s steps(2) infinite; }
.lv-loop:disabled { opacity: 0.35; cursor: not-allowed; }
@keyframes lv-loop-blink { 50% { filter: brightness(0.78); } }

/* ------------------------------------------------------------- title / black */
.lv-title-b.active { color: #062010; background: linear-gradient(180deg, #39ff88, #22c766); border-color: #149448; }
.lv-black { color: #ff5c77; }
.lv-black.active { color: #fff; background: linear-gradient(180deg, #2a0006, #000); border-color: #ff3b5c; box-shadow: 0 0 0 1px #ff3b5c inset, 0 0 12px rgba(255, 59, 92, 0.45); }

/* ------------------------------------------------------------- my files */
.lv-tab b { font-weight: 700; }
.lv-clip video { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; display: block; background: #000; pointer-events: none; }
.lv-clip-add { border-style: dashed; border-color: #3b4454; color: #9aa2ae; }
.lv-clip-add:hover { border-color: #39ff88; color: #39ff88; }
.lv-clip-plus { display: grid !important; place-items: center; aspect-ratio: 16 / 9; font-family: var(--font-display) !important; font-size: 26px !important; padding: 0 !important; }
.lv-bin.drop .lv-bin-grid { outline: 2px dashed #39ff88; outline-offset: 2px; }

/* ------------------------------------------------------------- output map */
.lv-map {
  flex-basis: 100%; display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start;
  background: linear-gradient(180deg, var(--anod-1), var(--anod-2)); border: 3px solid #0c0c0d; border-radius: 6px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.8); padding: 14px; color: #eef2f7;
}
.lv-map[hidden] { display: none; }
.lv-map-sect { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lv-map-warp { flex: 0 1 640px; }
.lv-map-sect:not(.lv-map-warp) { flex: 1 1 300px; max-width: 420px; }
.lv-map-h4 { margin: 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: #39ff88; font-weight: 700; }
.lv-map-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; touch-action: none; border: 1px solid #3b4454; }
.lv-map-stage canvas { width: 100%; height: 100%; display: block; }
.lv-map-h {
  position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; cursor: grab; touch-action: none;
  border: 2px solid #ffb547; background: rgba(5, 7, 10, 0.8); color: #39ff88; font-family: var(--font-mono); font-size: 8px; font-weight: 700; padding: 0; line-height: 1;
}
.lv-map-h.corner { width: 28px; height: 28px; margin: -14px 0 0 -14px; border-color: #39ff88; }
.lv-map-h::after { content: ''; position: absolute; left: 50%; top: 50%; width: 2px; height: 2px; margin: -1px 0 0 -1px; background: currentColor; }
.lv-map-h.corner::after { display: none; }
.lv-map-h.bent { box-shadow: 0 0 0 2px rgba(255, 212, 59, 0.45); }
.lv-map-h.sel { background: #ffd43b; border-color: #fff; color: #111; z-index: 2; box-shadow: 0 0 0 3px rgba(255, 212, 59, 0.35); }
.lv-map-k {
  position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; padding: 0; transform: rotate(45deg); cursor: grab; touch-action: none; z-index: 3;
  border: 2px solid #ffd43b; background: #05070a;
}
.lv-map-k.sel { background: #ffd43b; border-color: #fff; }
.lv-map-h:focus-visible, .lv-map-k:focus-visible, .lv-in-k:focus-visible, .lv-in-rect:focus-visible { outline: 2px solid #ffd43b; outline-offset: 2px; }
.lv-map-h:active, .lv-map-k:active { cursor: grabbing; }
.lv-map-side { flex: 1 1 260px; min-width: 220px; display: flex; flex-direction: column; gap: 10px; padding-top: 22px; }
.lv-map-side p, .lv-map-sect p { margin: 0; font-family: var(--font-mono); font-size: 11px; line-height: 1.5; color: #b8bec8; }
.lv-map-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.lv-map-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.lv-map-step { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; }
.lv-map-step b { min-width: 1.4em; text-align: center; color: #39ff88; font-size: 14px; }
.lv-map-step i { font-style: normal; color: #8a93a0; letter-spacing: 0.08em; }
.lv-map-step .lv-btn { min-width: 28px; padding-left: 0; padding-right: 0; }
.lv-map-side p.lv-map-read { color: #ffd43b; font-size: 12px; min-height: 1.5em; }
#lv-map-grid.active, #lv-in-fill.active, #lv-flip-h.active, #lv-flip-v.active { color: #111; background: linear-gradient(180deg, #ffb547, #e08f1a); border-color: #a86400; }
.lv-in-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; border: 1px solid #3b4454; background: #000; touch-action: none; }
.lv-in-stage canvas { width: 100%; height: 100%; display: block; opacity: 0.55; }
.lv-in-rect { position: absolute; border: 2px solid #39ff88; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45); cursor: move; outline: none; }
.lv-in-stage { overflow: hidden; }
.lv-in-k { position: absolute; width: 14px; height: 14px; padding: 0; border: 2px solid #39ff88; background: #05070a; cursor: nwse-resize; }
.lv-in-k[data-c="tl"] { left: -8px; top: -8px; } .lv-in-k[data-c="tr"] { right: -8px; top: -8px; cursor: nesw-resize; }
.lv-in-k[data-c="br"] { right: -8px; bottom: -8px; } .lv-in-k[data-c="bl"] { left: -8px; bottom: -8px; cursor: nesw-resize; }
.lv-in-nums { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-family: var(--font-mono); font-size: 10px; color: #8a93a0; }
.lv-in-nums label { display: inline-flex; align-items: center; gap: 4px; }
.lv-in-nums input { width: 58px; background: #05070a; color: #eef2f7; border: 1px solid #3b4454; border-radius: 3px; font: 600 11px var(--font-mono); padding: 4px; }
.lv-col { display: flex; flex-direction: column; gap: 4px; }
.lv-col-row { display: grid; grid-template-columns: 84px 1fr 44px; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; color: #b8bec8; }
.lv-col-row input { width: 100%; accent-color: #39ff88; }
.lv-col-row output { text-align: right; color: #39ff88; font-weight: 700; }

#lv-cap-b.active { color: #062010; background: linear-gradient(180deg, #7dffb3, #39d27a); border-color: #1d8a4a; }
.lv-map-side p.lv-cap-note { color: #8fe9b4; min-height: 0; }
.lv-map-side p.lv-cap-note:empty { display: none; }
.lv-map-side p.lv-cap-note.warn { color: #ffb547; }
/* full-size copy of the YouTube / Vimeo layer, captured for the output mesh (sits behind the page) */
#lv-cap { position: fixed; left: 0; top: 0; width: 1280px; height: 720px; z-index: -1; isolation: isolate; pointer-events: none; background: #000; overflow: hidden; }
#lv-cap[hidden] { display: none; }
#lv-cap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ------------------------------------------------------------- keyboard list */
.lv-keys { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(0, 0, 0, 0.55); }
.lv-keys[hidden] { display: none; }
.lv-keys-box {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow-y: auto; color: #eef2f7;
  background: linear-gradient(180deg, var(--anod-1), var(--anod-2)); border: 3px solid #0c0c0d; border-radius: 6px; padding: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.lv-keys-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.lv-keys-head .mod-code { color: #b8bec8; }
.lv-keys dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; margin: 0; }
.lv-keys dt { margin: 0; text-align: right; }
.lv-keys dd { margin: 0; font-family: var(--font-mono); font-size: 12px; color: #b8bec8; align-self: center; }
.lv-keys kbd { display: inline-block; font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: #ffd43b; border: 1px solid #3b4454; border-bottom-width: 3px; border-radius: 3px; padding: 2px 7px; background: #15181e; }

/* ------------------------------------------------------------- simple view (phones) */
.lv-lite-b[hidden] { display: none; }
.lv-lite .lv-bin, .lv-lite .lv-pvw, .lv-lite .lv-fx-note,
.lv-lite #lv-cut, .lv-lite #lv-fade, .lv-lite .lv-trans label, .lv-lite #lv-fade-t, .lv-lite .lv-trans .lv-small, .lv-lite .lv-tbar,
.lv-lite #lv-out2, .lv-lite #lv-map-b, .lv-lite #lv-keys-b, .lv-lite #lv-map,
.lv-lite .lv-crate-list, .lv-lite .lv-crate-head input, .lv-lite .lv-crate-head select, .lv-lite .lv-crate-note { display: none !important; }
/* the decks keep running (YouTube players must stay in the page) but are moved out of sight */
.lv-lite #lv-dj { position: absolute !important; left: -9999px; top: 0; width: 900px; height: 600px; overflow: hidden; opacity: 0; pointer-events: none; }
.lv-lite .lv-vj-grid { grid-template-columns: 1fr; grid-template-areas: "pgm" "trans" "fx"; }
.lv-lite .lv-trans { flex-direction: row; flex-wrap: wrap; padding-top: 0; }
.lv-lite .lv-trans .lv-btn { flex: 1; padding: 12px 0; font-size: 13px; }
.lv-lite .lv-crate-head { gap: 10px; }
.lv-lite #lv-autodj, .lv-lite #lv-next { padding: 12px 16px; font-size: 13px; }
.lv-lite .lv-auto-info { flex-basis: 100%; font-size: 12px; }

/* ------------------------------------------------------------- YouTube search */
.lv-q-form { display: flex; gap: 4px; flex: 0 1 380px; min-width: 220px; }
.lv-q-form input { flex: 1; }
#lv-q-yt { color: #ff5c77; white-space: nowrap; }
.lv-url input.busy, .lv-q-form input.busy { border-color: #ffb547; }
.lv-web-head {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px; position: sticky; top: -4px; z-index: 1;
  background: #1a0d10; border-bottom: 1px solid #5a2330; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: #ff8fa3;
}
.lv-web-head span:nth-child(2) { flex: 1; font-weight: 500; color: #9aa2ae; }
.lv-web-head .lv-btn { padding: 2px 7px; }
.lv-web-head.lv-crate-sub { background: #12151a; border-bottom-color: #2c3038; color: #b8bec8; position: static; }
.lv-row.is-web .lv-row-e { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em; color: #ff5c77; }
.lv-lite .lv-q-form { display: none !important; }

/* ------------------------------------------------------------- deck video out */
.lv-vidout { color: #ff5c77; white-space: nowrap; padding: 4px 8px; font-size: 10px; }
.lv-vidout[hidden] { display: none; }
.lv-clip-deck { color: #ff5c77; background: radial-gradient(circle, #3a1d24, #140a0d); }
