/* ==========================================================================
   HousePulse DJ console  (assets/deck.css, v5)
   One housing: two CDJ-style players either side of a two-channel mixer.
   Everything is scoped to .hp-deck (the fixed dock), .hp-deck-unit (the
   console, which moves between #hp-deck-stage and the dock), .hpd-sc-layer
   (the SoundCloud players, which never move in the DOM and are positioned
   over a slot by deck.js) and two helpers (.hp-deck-spacer, .hp-deck-sr).
   Site tokens are used when present, with matching fallbacks.
   ========================================================================== */
.hp-deck,
.hp-deck-unit {
  --hpd-a1: var(--accent-1, #3D8BFF);
  --hpd-a2: var(--accent-2, #8B5CF6);
  --hpd-a1-rgb: var(--accent-1-rgb, 61, 139, 255);
  --hpd-a2-rgb: var(--accent-2-rgb, 139, 92, 246);
  --hpd-glow: var(--accent-glow, rgba(61, 139, 255, .4));
  --hpd-grad: var(--accent-grad, linear-gradient(135deg, #3D8BFF 0%, #8B5CF6 100%));
  --hpd-ink: var(--accent-ink, #05060A);
  --hpd-a1-text: var(--accent-text, #8EBBFF);
  --hpd-text: var(--text, #F4F5F7);
  --hpd-muted: var(--muted, #A7ACB3);
  --hpd-line: var(--line, rgba(255, 255, 255, .12));
  --hpd-head: var(--head, "Unbounded", "Arial Black", "Helvetica Neue", Arial, system-ui, sans-serif);
  --hpd-body: var(--body, "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
  --hpd-ease: cubic-bezier(.2, .7, .2, 1);
  --hpd-play: #2BD67B;
  --hpd-cue: #FF9F1C;
  --hpd-loop: #FFB020;
  --hpd-metal: conic-gradient(from 210deg, #5E636B, #D9DCE0 10%, #7D828A 22%, #C9CDD2 36%, #6C7178 50%, #E3E6E9 63%, #7D828A 76%, #C3C7CC 89%, #5E636B);
  --hpd-cap: linear-gradient(180deg, #F2F4F6 0%, #C4C8CE 48%, #9097A0 52%, #D4D8DD 100%);
  --hpd-panel: linear-gradient(180deg, #1D2026 0%, #16191E 100%);
  --hpd-lcd: linear-gradient(180deg, #0B1222 0%, #070B14 100%);
}
.hp-deck *, .hp-deck *::before, .hp-deck *::after,
.hp-deck-unit, .hp-deck-unit *, .hp-deck-unit *::before, .hp-deck-unit *::after { box-sizing: border-box; }
.hp-deck button, .hp-deck-unit button, .hp-deck-unit select { font: inherit; margin: 0; }
.hp-deck img, .hp-deck-unit img, .hp-deck svg, .hp-deck-unit svg { display: block; max-width: 100%; }
.hp-deck p, .hp-deck-unit p { margin: 0; }
.hp-deck [hidden], .hp-deck-unit [hidden] { display: none !important; }

/* visually hidden helpers */
.hp-deck-sr,
.hp-deck .hpd-vh,
.hp-deck-unit .hpd-vh {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.hp-deck-spacer { display: block; height: 0; pointer-events: none; }

@keyframes hpd-blink { 50% { opacity: .3; } }
@keyframes hpd-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes hpd-flash { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } 30% { box-shadow: 0 0 0 6px rgba(255, 255, 255, .28); } }
@keyframes hpd-point { 50% { transform: translateY(3px); } }
@keyframes hpd-pulse { 50% { opacity: .45; } }

/* ---------- shared buttons ---------- */
.hp-deck .hpd-btn,
.hp-deck-unit .hpd-btn {
  -webkit-appearance: none; appearance: none; position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .14); color: var(--hpd-text);
  background: linear-gradient(180deg, #2A2E35 0%, #1E2127 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 2px 0 rgba(0, 0, 0, .55);
  font: 600 12px/1 var(--hpd-body); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .08s ease;
}
.hp-deck .hpd-btn:hover,
.hp-deck-unit .hpd-btn:hover { border-color: rgba(255, 255, 255, .32); }
.hp-deck .hpd-btn:active,
.hp-deck-unit .hpd-btn:active { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 1px 0 rgba(0, 0, 0, .55); }
.hp-deck .hpd-btn[disabled],
.hp-deck-unit .hpd-btn[disabled],
.hp-deck-unit .hpd-pad[disabled],
.hp-deck-unit select[disabled] { opacity: .38; cursor: not-allowed; transform: none; }
.hp-deck .hpd-ico,
.hp-deck-unit .hpd-ico { display: inline-flex; width: 18px; height: 18px; flex: none; }
.hp-deck .hpd-ico svg,
.hp-deck-unit .hpd-ico svg { width: 100%; height: 100%; }
.hp-deck .is-flash,
.hp-deck-unit .is-flash { animation: hpd-flash .9s ease-out 1; }
.hp-deck :focus-visible,
.hp-deck-unit :focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
.hp-deck :focus:not(:focus-visible),
.hp-deck-unit :focus:not(:focus-visible) { outline: none; }
.hp-deck-unit .hpd-btn--primary,
.hp-deck .hpd-mini-play[data-on="true"],
.hp-deck .hpd-pill-play[data-on="true"] {
  border-color: transparent; color: var(--hpd-ink); background: var(--hpd-grad);
  box-shadow: 0 8px 22px -10px var(--hpd-glow), inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 0 rgba(0, 0, 0, .55);
}
.hp-deck-unit .hpd-btn--primary:hover { filter: brightness(1.08); border-color: transparent; }
.hp-deck-unit .hpd-lbl { font: 600 10.5px/1.2 var(--hpd-body); letter-spacing: .16em; text-transform: uppercase; color: var(--hpd-muted); }

/* ==========================================================================
   The console housing
   ========================================================================== */
.hp-deck-unit {
  container: hpd / inline-size;
  position: relative; width: 100%; min-width: 0;
  color: var(--hpd-text); font: 400 14px/1.45 var(--hpd-body); text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.hp-deck-unit .hpd-chassis {
  position: relative; isolation: isolate; padding: 14px 18px 12px; border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 120px),
    linear-gradient(180deg, #1B1E24 0%, #121418 55%, #0E1013 100%);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 50px 110px -46px rgba(0, 0, 0, .95), 0 0 0 1px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 -2px 0 rgba(0, 0, 0, .5);
}
/* brushed-metal grain and corner screws */
.hp-deck-unit .hpd-chassis::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(circle at 11px 11px, #A9AEB5 0 1.6px, #50555C 2.2px 3.2px, rgba(0, 0, 0, .7) 3.6px, transparent 4.4px),
    radial-gradient(circle at calc(100% - 11px) 11px, #A9AEB5 0 1.6px, #50555C 2.2px 3.2px, rgba(0, 0, 0, .7) 3.6px, transparent 4.4px),
    radial-gradient(circle at 11px calc(100% - 11px), #A9AEB5 0 1.6px, #50555C 2.2px 3.2px, rgba(0, 0, 0, .7) 3.6px, transparent 4.4px),
    radial-gradient(circle at calc(100% - 11px) calc(100% - 11px), #A9AEB5 0 1.6px, #50555C 2.2px 3.2px, rgba(0, 0, 0, .7) 3.6px, transparent 4.4px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .014) 0 1px, transparent 1px 3px),
    radial-gradient(90% 60% at 20% 0%, rgba(var(--hpd-a1-rgb), .07), transparent 70%),
    radial-gradient(90% 60% at 80% 0%, rgba(var(--hpd-a2-rgb), .07), transparent 70%);
}

/* top bar: brand, crate, transport */
.hp-deck-unit .hpd-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 2px 6px 12px; }
.hp-deck-unit .hpd-brand { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.hp-deck-unit .hpd-brand-mark {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #23262C, #0B0C0F); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 0 0 3px rgba(0, 0, 0, .35);
}
.hp-deck-unit .hpd-brand-mark img { width: 22px; height: 22px; }
.hp-deck-unit .hpd-brand-txt { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex-wrap: wrap; }
.hp-deck-unit .hpd-brand-name { font: 600 15px/1.1 var(--hpd-head); letter-spacing: -.01em; }
.hp-deck-unit .hpd-brand-sub { font: 600 10.5px/1 var(--hpd-body); letter-spacing: .2em; text-transform: uppercase; color: var(--hpd-muted); }
.hp-deck-unit .hpd-crate { display: flex; align-items: center; gap: 10px; flex: none; }
.hp-deck-unit .hpd-seg { display: flex; padding: 3px; border-radius: 12px; background: #0A0B0E; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .06); }
.hp-deck-unit .hpd-seg-btn {
  min-height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--hpd-muted);
  font: 600 12.5px/1.1 var(--hpd-body); cursor: pointer; white-space: nowrap; transition: background-color .15s ease, color .15s ease;
}
.hp-deck-unit .hpd-seg-btn:hover { color: var(--hpd-text); }
.hp-deck-unit .hpd-seg-btn[aria-pressed="true"] { color: var(--hpd-text); background: linear-gradient(180deg, #30343C, #24272E); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 0 1px rgba(var(--hpd-a1-rgb), .55), 0 0 14px -4px var(--hpd-glow); }
.hp-deck-unit .hpd-transport-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; min-width: 0; }
.hp-deck-unit .hpd-transport { display: flex; gap: 8px; }
.hp-deck-unit .hpd-playall { min-width: 148px; min-height: 42px; border-radius: 12px; }
.hp-deck-unit .hpd-mute { min-height: 42px; border-radius: 12px; }
.hp-deck-unit .hpd-mute[aria-pressed="true"] { color: #FFD3A1; border-color: rgba(255, 159, 28, .6); }
.hp-deck-unit .hpd-consent { max-width: 40ch; font-size: 11.5px; line-height: 1.3; color: var(--hpd-muted); text-align: right; }

/* notes above the console */
.hp-deck-unit .hpd-tapnote,
.hp-deck-unit .hpd-notice {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 10px; padding: 8px 8px 8px 12px; border-radius: 12px;
  font: 500 13px/1.4 var(--hpd-body);
}
.hp-deck-unit .hpd-tapnote { background: #F4F5F7; color: #07080A; font-weight: 600; }
.hp-deck-unit .hpd-tapnote > .hpd-ico { width: 16px; height: 16px; animation: hpd-point 1s ease-in-out infinite; }
.hp-deck-unit .hpd-tapnote-txt,
.hp-deck-unit .hpd-notice-txt { flex: 1 1 22ch; min-width: 0; }
.hp-deck-unit .hpd-tapnote .hpd-tapnote-btn { min-height: 36px; padding: 0 12px; color: #07080A; background: transparent; border-color: rgba(7, 8, 10, .4); box-shadow: none; font-size: 11px; }
.hp-deck-unit .hpd-tapnote .hpd-tapnote-btn:focus-visible { outline-color: #07080A; }
.hp-deck-unit .hpd-notice { border: 1px solid rgba(var(--hpd-a1-rgb), .35); background: rgba(var(--hpd-a1-rgb), .08); }
.hp-deck-unit .hpd-notice::before {
  content: "i"; display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%;
  font: 700 11px/1 var(--hpd-head); color: var(--hpd-ink); background: var(--hpd-a1);
}
.hp-deck-unit .hpd-notice[data-kind="slow"]::before { content: "…"; line-height: .6; animation: hpd-blink 1.2s ease-in-out infinite; }
.hp-deck-unit .hpd-notice .hpd-notice-btn { min-height: 36px; padding: 0 12px; font-size: 11px; }
.hp-deck-unit .hpd-notice .hpd-notice-btn--hp { color: var(--hpd-ink); background: var(--hpd-grad); border-color: transparent; }
.hp-deck-unit .hpd-limits { margin: 0 4px 10px; font-size: 12.5px; line-height: 1.45; color: var(--hpd-muted); }
:is(.hp-deck, .hp-deck-unit) [data-on="tap"] .hpd-ico { animation: hpd-point 1s ease-in-out infinite; }

/* ---------- the console surface: player A | mixer | player B ---------- */
.hp-deck-unit .hpd-console {
  position: relative; display: grid; gap: 0;
  grid-template-columns: minmax(0, 1fr) minmax(272px, .74fr) minmax(0, 1fr);
  grid-template-areas: "a mix b";
  border-radius: 16px; overflow: hidden;
  background: #0A0B0D;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .05), 0 1px 0 rgba(255, 255, 255, .06);
}
.hp-deck-unit .hpd-player[data-deck="A"] { grid-area: a; }
.hp-deck-unit .hpd-player[data-deck="B"] { grid-area: b; }
.hp-deck-unit .hpd-mixer { grid-area: mix; }
.hp-deck-unit .hpd-player { --dk: var(--hpd-a1); --dk-rgb: var(--hpd-a1-rgb); }
.hp-deck-unit .hpd-player[data-deck="B"] { --dk: var(--hpd-a2); --dk-rgb: var(--hpd-a2-rgb); }

/* ---------- a player ---------- */
.hp-deck-unit .hpd-player {
  container: hpp / inline-size;
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px 14px 14px;
  background: var(--hpd-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.hp-deck-unit .hpd-pl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 16px; }
.hp-deck-unit .hpd-pl-name { font: 700 11px/1 var(--hpd-body); letter-spacing: .22em; text-transform: uppercase; color: #D9DCE1; }
.hp-deck-unit .hpd-pl-name::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; vertical-align: 1px; background: #2C3036; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6); transition: background-color .2s ease, box-shadow .2s ease; }
.hp-deck-unit .hpd-player.is-playing .hpd-pl-name::before { background: var(--dk); box-shadow: 0 0 8px var(--dk); }
.hp-deck-unit .hpd-pl-model { font: 600 10px/1 var(--hpd-head); letter-spacing: .08em; color: #6E747D; }

/* screen */
.hp-deck-unit .hpd-screen {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 9px 10px 10px; border-radius: 10px;
  background: var(--hpd-lcd);
  box-shadow: 0 0 0 1px #000, 0 0 0 3px #22262C, 0 0 0 4px rgba(255, 255, 255, .06), inset 0 0 0 1px rgba(var(--dk-rgb), .16), inset 0 10px 30px rgba(0, 0, 0, .55);
}
.hp-deck-unit .hpd-scr-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hp-deck-unit .hpd-scr-deck {
  display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 6px;
  font: 700 11px/1 var(--hpd-head); color: var(--hpd-ink); background: var(--dk);
}
.hp-deck-unit .hpd-scr-state { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 10.5px/1 var(--hpd-body); letter-spacing: .14em; text-transform: uppercase; color: #8C95A3; }
.hp-deck-unit .hpd-player[data-state="playing"] .hpd-scr-state,
.hp-deck-unit .hpd-player[data-state="looping"] .hpd-scr-state { color: var(--hpd-play); }
.hp-deck-unit .hpd-player[data-state="looping"] .hpd-scr-state { color: var(--hpd-loop); }
.hp-deck-unit .hpd-player[data-state="cued"] .hpd-scr-state { color: var(--hpd-cue); }
.hp-deck-unit .hpd-player[data-state="error"] .hpd-scr-state,
.hp-deck-unit .hpd-player[data-state="unavailable"] .hpd-scr-state { color: #FF7A8A; }
.hp-deck-unit .hpd-scr-bpm { display: flex; align-items: baseline; gap: 4px; flex: none; }
.hp-deck-unit .hpd-scr-bpmv { font: 700 20px/1 var(--hpd-body); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: #F2F6FF; }
.hp-deck-unit .hpd-scr-bpm small { font: 700 9px/1 var(--hpd-body); letter-spacing: .14em; color: #8C95A3; }
.hp-deck-unit .hpd-scr-trk { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hp-deck-unit .hpd-scr-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 14px/1.25 var(--hpd-body); color: #F2F6FF; }
.hp-deck-unit .hpd-scr-meta { min-width: 0; min-height: 1.3em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; line-height: 1.3; color: #8C95A3; }
.hp-deck-unit .hpd-scr-row { display: flex; justify-content: space-between; gap: 8px; min-width: 0; }
.hp-deck-unit .hpd-scr-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; font: 600 13px/1 var(--hpd-body); font-variant-numeric: tabular-nums; color: #DCE6F7; white-space: nowrap; }
.hp-deck-unit .hpd-scr-t small { font: 700 8.5px/1 var(--hpd-body); letter-spacing: .16em; text-transform: uppercase; color: #6E7887; }
.hp-deck-unit .hpd-scr-t--mid { align-items: center; }
.hp-deck-unit .hpd-scr-t--end { align-items: flex-end; }
.hp-deck-unit .hpd-scr-range { color: #6E7887; font-size: 11px; }
.hp-deck-unit .hpd-player.is-synced .hpd-scr-tempo { color: var(--dk); }
.hp-deck-unit .hpd-scr-wave { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.hp-deck-unit .hpd-zoom { display: block; width: 100%; height: 62px; border-radius: 4px; background: rgba(0, 0, 0, .35); }
.hp-deck-unit .hpd-ov { position: relative; height: 28px; border-radius: 4px; overflow: hidden; background: rgba(0, 0, 0, .35); cursor: pointer; touch-action: pan-y; }
.hp-deck-unit .hpd-ov[aria-disabled="true"] { cursor: default; }
.hp-deck-unit .hpd-ov-cv { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.hp-deck-unit .hpd-ov-played { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(0); background: rgba(5, 7, 12, .58); pointer-events: none; }
.hp-deck-unit .hpd-ov-head { position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: #FFFFFF; box-shadow: 0 0 6px rgba(255, 255, 255, .8); pointer-events: none; }
.hp-deck-unit .hpd-ov-load { display: none; }
.hp-deck-unit .hpd-ov:focus-visible { outline-offset: 1px; }

/* browse: previous, track list, next; load from the device */
.hp-deck-unit .hpd-browse { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; grid-template-areas: "prev sel next" "load load load"; gap: 6px; min-width: 0; }
.hp-deck-unit .hpd-browse > .hpd-btn:first-child { grid-area: prev; }
.hp-deck-unit .hpd-select-wrap { grid-area: sel; position: relative; min-width: 0; }
.hp-deck-unit .hpd-browse .hpd-sq + .hpd-select-wrap + .hpd-sq { grid-area: next; }
.hp-deck-unit .hpd-load { grid-area: load; }
.hp-deck-unit .hpd-sq { width: 40px; min-height: 40px; padding: 0; }
.hp-deck-unit .hpd-sq .hpd-ico { width: 16px; height: 16px; }
.hp-deck-unit .hpd-select-wrap::after {
  content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; margin-top: -6px; pointer-events: none;
  border-right: 1.6px solid #9BA2AC; border-bottom: 1.6px solid #9BA2AC; transform: rotate(45deg);
}
.hp-deck-unit .hpd-select {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; min-height: 40px; padding: 0 30px 0 10px;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; background: #0C0E12; color: var(--hpd-text);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .7);
  font: 500 13px/1.2 var(--hpd-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.hp-deck-unit .hpd-select:hover { border-color: rgba(255, 255, 255, .28); }
.hp-deck-unit .hpd-select option { background: #14161A; color: #F4F5F7; }
.hp-deck-unit .hpd-load {
  min-height: 36px; padding: 6px 12px; border-style: dashed; border-color: rgba(255, 255, 255, .22); background: transparent; box-shadow: none;
  font: 600 12px/1.25 var(--hpd-body); letter-spacing: 0; text-transform: none; white-space: normal; text-align: center; color: #C9CED6;
}
.hp-deck-unit .hpd-load:hover { border-style: solid; color: var(--hpd-text); }
.hp-deck-unit .hpd-load .hpd-ico { width: 16px; height: 16px; }
.hp-deck-unit .hpd-player.is-opening .hpd-load { animation: hpd-pulse 1.1s ease-in-out infinite; }

/* hot cues and loops */
.hp-deck-unit .hpd-perf { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 3fr); gap: 8px; min-width: 0; }
.hp-deck-unit .hpd-hots,
.hp-deck-unit .hpd-loops { display: grid; gap: 5px; min-width: 0; }
.hp-deck-unit .hpd-hots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hp-deck-unit .hpd-loops { grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr) minmax(0, .8fr); }
.hp-deck-unit .hpd-hot,
.hp-deck-unit .hpd-lp { min-width: 0; min-height: 36px; padding: 0 4px; border-radius: 8px; font-size: 11.5px; letter-spacing: .04em; }
.hp-deck-unit .hpd-hot { --hc: #22D3EE; flex-direction: column; gap: 3px; }
.hp-deck-unit .hpd-hot[data-hot="B"] { --hc: #A3E635; }
.hp-deck-unit .hpd-hot[data-hot="C"] { --hc: #FBBF24; }
.hp-deck-unit .hpd-hot[data-hot="D"] { --hc: #F472B6; }
.hp-deck-unit .hpd-hot::after { content: ""; display: block; width: 60%; max-width: 26px; height: 3px; border-radius: 2px; background: #33373E; }
.hp-deck-unit .hpd-hot[data-set="yes"] { color: #FFFFFF; border-color: color-mix(in srgb, var(--hc) 55%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--hc) 22%, #262A31), #1E2127); }
.hp-deck-unit .hpd-hot[data-set="yes"]::after { background: var(--hc); box-shadow: 0 0 8px var(--hc); }
.hp-deck-unit .hpd-lp--m { font-size: 11px; letter-spacing: .06em; }
.hp-deck-unit .hpd-lp[aria-pressed="true"] { color: #1A1203; background: linear-gradient(180deg, #FFD27A, var(--hpd-loop)); border-color: transparent; box-shadow: 0 0 14px -2px rgba(255, 176, 32, .65), inset 0 1px 0 rgba(255, 255, 255, .4); }

/* transport, jog wheel, tempo */
.hp-deck-unit .hpd-core { display: grid; grid-template-columns: 58px minmax(0, 1fr) 46px; grid-template-areas: "tp jog tcol"; gap: 10px; align-items: end; min-width: 0; }
.hp-deck-unit .hpd-tp { grid-area: tp; display: flex; flex-direction: column; gap: 12px; align-items: center; padding-bottom: 4px; }
.hp-deck-unit .hpd-round {
  position: relative; width: 54px; height: 54px; min-height: 0; padding: 0; border-radius: 50%;
  border: 0; background: radial-gradient(circle at 50% 35%, #30343B, #1A1D22 70%);
  box-shadow: 0 0 0 2px #0B0C0F, 0 0 0 4px var(--rc, #3A3E45), 0 4px 10px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .12);
  color: #E7EAEE;
}
.hp-deck-unit .hpd-round:hover { border: 0; }
.hp-deck-unit .hpd-round-txt { font: 700 11px/1 var(--hpd-body); letter-spacing: .12em; }
.hp-deck-unit .hpd-cue { --rc: #5A4320; color: #FFC77A; }
.hp-deck-unit .hpd-cue[data-at="true"],
.hp-deck-unit .hpd-cue.is-held { --rc: var(--hpd-cue); box-shadow: 0 0 0 2px #0B0C0F, 0 0 0 4px var(--hpd-cue), 0 0 18px rgba(255, 159, 28, .55), inset 0 1px 0 rgba(255, 255, 255, .12); color: #FFE2B8; }
.hp-deck-unit .hpd-play { --rc: #1F4A33; color: #8FE6B4; }
.hp-deck-unit .hpd-play .hpd-ico--pp { width: 26px; height: 20px; }
.hp-deck-unit .hpd-play[data-on="true"] { --rc: var(--hpd-play); box-shadow: 0 0 0 2px #0B0C0F, 0 0 0 4px var(--hpd-play), 0 0 20px rgba(43, 214, 123, .55), inset 0 1px 0 rgba(255, 255, 255, .12); color: #D9FFE9; }
.hp-deck-unit .hpd-play[data-on="tap"] { --rc: #FFFFFF; animation: hpd-blink 1s ease-in-out infinite; }
.hp-deck-unit .hpd-jog-wrap { grid-area: jog; display: grid; place-items: center; min-width: 0; }
.hp-deck-unit .hpd-jog {
  position: relative; width: 100%; max-width: 250px; aspect-ratio: 1; border-radius: 50%;
  cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; outline-offset: 4px;
}
.hp-deck-unit .hpd-jog.is-scratch, .hp-deck-unit .hpd-jog.is-nudge { cursor: grabbing; }
.hp-deck-unit .hpd-jog[aria-disabled="true"] { cursor: default; opacity: .55; }
.hp-deck-unit .hpd-jog-ring {
  position: absolute; inset: 0; border-radius: 50%; background: var(--hpd-metal);
  box-shadow: 0 18px 34px -12px rgba(0, 0, 0, .95), 0 0 0 1px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .3);
}
.hp-deck-unit .hpd-jog-led {
  position: absolute; inset: 4.5%; border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(var(--dk-rgb), .18), inset 0 0 0 2px rgba(var(--dk-rgb), .18);
  transition: box-shadow .3s ease;
}
.hp-deck-unit .hpd-player.is-playing .hpd-jog-led { box-shadow: 0 0 0 2px var(--dk), 0 0 16px 1px rgba(var(--dk-rgb), .7), inset 0 0 10px rgba(var(--dk-rgb), .5); }
.hp-deck-unit .hpd-jog-plate {
  position: absolute; inset: 7%; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle, #1B1E23 0 60%, #121418 61% 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .9), inset 0 6px 18px rgba(0, 0, 0, .7);
}
.hp-deck-unit .hpd-jog-spin {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .05) 0deg 1.2deg, transparent 1.2deg 6deg),
    radial-gradient(circle, transparent 0 56%, rgba(255, 255, 255, .05) 57% 58%, transparent 59%);
}
.hp-deck-unit .hpd-jog-mark { position: absolute; left: 50%; top: 3%; width: 4px; height: 14%; margin-left: -2px; border-radius: 2px; background: #F4F5F7; box-shadow: 0 0 6px rgba(255, 255, 255, .6); }
.hp-deck-unit .hpd-jog-disp {
  position: absolute; inset: 29%; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #121A2C, #070A12 75%);
  box-shadow: 0 0 0 3px #0B0C0F, 0 0 0 4px rgba(255, 255, 255, .1), inset 0 0 12px rgba(0, 0, 0, .8);
}
.hp-deck-unit .hpd-jog-prog {
  position: absolute; inset: 5%; border-radius: 50%;
  background: conic-gradient(var(--dk) calc(var(--pr, 0) * 360deg), rgba(255, 255, 255, .08) 0);
  -webkit-mask: radial-gradient(circle closest-side, transparent 84%, #000 86%); mask: radial-gradient(circle closest-side, transparent 84%, #000 86%);
}
.hp-deck-unit .hpd-jog-logo { width: 46%; opacity: .9; pointer-events: none; }
.hp-deck-unit .hpd-jog-logo img { width: 100%; height: auto; -webkit-user-drag: none; }
.hp-deck-unit .hpd-jog-hp { font: 700 15px/1 var(--hpd-head); color: #F4F5F7; }
.hp-deck-unit .hpd-tcol { grid-area: tcol; display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 0; height: 100%; }
.hp-deck-unit .hpd-tbtn { min-height: 30px; padding: 0 2px; border-radius: 7px; font-size: 10px; letter-spacing: .08em; }
.hp-deck-unit .hpd-range-btn { font-size: 10px; letter-spacing: 0; color: #B7BDC6; }
.hp-deck-unit .hpd-sync[aria-pressed="true"] { color: var(--hpd-ink); background: var(--dk); border-color: transparent; box-shadow: 0 0 14px -2px rgba(var(--dk-rgb), .8), inset 0 1px 0 rgba(255, 255, 255, .35); }
.hp-deck-unit .hpd-hint { font-size: 11.5px; line-height: 1.35; color: #7D848E; text-align: center; }

/* ---------- knobs and faders (native range inputs underneath, for the keyboard and screen readers) ---------- */
.hp-deck-unit .hpd-c,
.hp-deck .hpd-c { position: relative; min-width: 0; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.hp-deck-unit .hpd-in,
.hp-deck .hpd-in {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; pointer-events: none;
  -webkit-appearance: none; appearance: none; background: none; border: 0;
}
.hp-deck-unit .hpd-c.is-focus,
.hp-deck .hpd-c.is-focus { outline: 2px solid #FFFFFF; outline-offset: 3px; border-radius: 8px; }
.hp-deck-unit .hpd-c.is-disabled,
.hp-deck .hpd-c.is-disabled { opacity: .35; pointer-events: none; }
.hp-deck-unit .hpd-c-lbl { display: block; font: 700 9.5px/1 var(--hpd-body); letter-spacing: .14em; text-transform: uppercase; color: #9AA1AB; text-align: center; white-space: nowrap; }

/* knob */
.hp-deck-unit .hpd-c--knob { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: ns-resize; --hpd-arc: var(--hpd-a1); }
.hp-deck-unit .hpd-knob { position: relative; display: block; width: 40px; height: 40px; flex: none; }
.hp-deck-unit .hpd-knob-arc {
  position: absolute; inset: -4px; border-radius: 50%;
  background:
    conic-gradient(from -135deg, transparent 0 var(--s, 0deg), var(--hpd-arc) var(--s, 0deg) var(--e, 0deg), transparent var(--e, 0deg) 360deg),
    conic-gradient(from -135deg, rgba(255, 255, 255, .1) 0 270deg, transparent 270deg);
  -webkit-mask: radial-gradient(circle closest-side, transparent 82%, #000 84%); mask: radial-gradient(circle closest-side, transparent 82%, #000 84%);
}
.hp-deck-unit .hpd-c--knob:not(.is-off-centre) .hpd-knob-arc { background: conic-gradient(from -135deg, rgba(255, 255, 255, .1) 0 270deg, transparent 270deg); }
.hp-deck-unit .hpd-knob-cap {
  position: absolute; inset: 3px; border-radius: 50%; transform: rotate(var(--a, 0deg));
  background: radial-gradient(circle at 50% 30%, #3B4048, #1B1E23 70%);
  box-shadow: 0 3px 6px rgba(0, 0, 0, .7), 0 0 0 1px #090A0C, inset 0 1px 0 rgba(255, 255, 255, .16);
}
.hp-deck-unit .hpd-knob-cap::before { content: ""; position: absolute; inset: 18%; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 255, 255, .05) 0 6deg, transparent 6deg 12deg); }
.hp-deck-unit .hpd-knob-ind { position: absolute; left: 50%; top: 3px; width: 2px; height: 35%; margin-left: -1px; border-radius: 1px; background: #F4F5F7; }
.hp-deck-unit .hpd-c--knob.is-drag .hpd-knob-cap { box-shadow: 0 3px 6px rgba(0, 0, 0, .7), 0 0 0 1px #090A0C, 0 0 0 3px rgba(var(--hpd-a1-rgb), .35), inset 0 1px 0 rgba(255, 255, 255, .16); }
.hp-deck-unit .hpd-k--trim { --hpd-arc: #D9DCE1; }
.hp-deck-unit .hpd-k--filter { --hpd-arc: var(--hpd-a2); }
.hp-deck-unit .hpd-k--filter.is-on .hpd-c-lbl { color: #D3C2FF; }
.hp-deck-unit .hpd-k--master .hpd-knob { width: 46px; height: 46px; }

/* vertical fader (channel, tempo) */
.hp-deck-unit .hpd-c--v { display: flex; flex-direction: column; align-items: center; cursor: ns-resize; }
.hp-deck-unit .hpd-c--v .hpd-fd-track { position: relative; display: block; width: 100%; height: 100%; min-height: 80px; }
.hp-deck-unit .hpd-fd-slot { position: absolute; left: 50%; top: 10px; bottom: 10px; width: 4px; margin-left: -2px; border-radius: 2px; background: #050607; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), inset 0 1px 2px #000; }
.hp-deck-unit .hpd-fd-scale {
  position: absolute; left: 50%; top: 10px; bottom: 10px; width: 26px; margin-left: -13px; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .22) 0 1px, transparent 1px 10%) center / 100% 100% no-repeat;
  -webkit-mask: linear-gradient(90deg, #000 0 28%, transparent 28% 72%, #000 72%); mask: linear-gradient(90deg, #000 0 28%, transparent 28% 72%, #000 72%);
}
.hp-deck-unit .hpd-c--v .hpd-fd-cap {
  position: absolute; left: 50%; top: calc((1 - var(--p, .5)) * (100% - 20px)); width: 30px; height: 20px; margin-left: -15px; border-radius: 4px;
  background: var(--hpd-cap); box-shadow: 0 4px 8px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .8);
  cursor: grab;
}
.hp-deck-unit .hpd-c--v .hpd-fd-cap::after { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; height: 2px; margin-top: -1px; background: #0B0C0F; }
.hp-deck-unit .hpd-c--tempo { flex: 1 1 auto; min-height: 110px; }
.hp-deck-unit .hpd-c--tempo .hpd-fd-track { min-height: 0; }
.hp-deck-unit .hpd-c--tempo .hpd-fd-track::after { content: ""; position: absolute; left: 50%; top: 50%; width: 30px; height: 2px; margin: -1px 0 0 -15px; background: var(--hpd-play); opacity: .7; }
.hp-deck-unit .hpd-c--tempo .hpd-fd-cap { width: 34px; margin-left: -17px; }
.hp-deck-unit .hpd-fd-end { position: absolute; right: -2px; font: 700 10px/1 var(--hpd-body); color: #7D848E; pointer-events: none; }
.hp-deck-unit .hpd-fd-end--t { top: -2px; }
.hp-deck-unit .hpd-fd-end--b { bottom: -2px; }

/* horizontal fader (crossfader, mini volume) */
.hp-deck-unit .hpd-c--h,
.hp-deck .hpd-c--h { display: flex; align-items: center; gap: 8px; cursor: ew-resize; }
.hp-deck-unit .hpd-c--h .hpd-fd-track,
.hp-deck .hpd-c--h .hpd-fd-track { position: relative; display: block; flex: 1 1 auto; height: 40px; min-width: 60px; }
.hp-deck-unit .hpd-c--h .hpd-fd-slot,
.hp-deck .hpd-c--h .hpd-fd-slot { position: absolute; top: 50%; left: 12px; right: 12px; bottom: auto; width: auto; height: 4px; margin: -2px 0 0; border-radius: 2px; background: #050607; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), inset 0 1px 2px #000; }
.hp-deck-unit .hpd-c--h .hpd-fd-scale,
.hp-deck .hpd-c--h .hpd-fd-scale {
  position: absolute; left: 12px; right: 12px; top: 50%; width: auto; height: 26px; margin: -13px 0 0;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .2) 0 1px, transparent 1px 10%) center / 100% 100% no-repeat;
  -webkit-mask: linear-gradient(180deg, #000 0 26%, transparent 26% 74%, #000 74%); mask: linear-gradient(180deg, #000 0 26%, transparent 26% 74%, #000 74%);
}
.hp-deck-unit .hpd-c--h .hpd-fd-cap,
.hp-deck .hpd-c--h .hpd-fd-cap {
  position: absolute; top: 50%; left: calc(var(--p, .5) * (100% - 24px)); width: 24px; height: 34px; margin-top: -17px; border-radius: 5px;
  background: linear-gradient(90deg, #C4C8CE 0%, #F2F4F6 30%, #9097A0 48%, #0B0C0F 48% 52%, #9097A0 52%, #D4D8DD 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .7); cursor: grab;
}
.hp-deck-unit .hpd-xf-end { flex: none; width: 18px; font: 700 12px/1 var(--hpd-head); text-align: center; }
.hp-deck-unit .hpd-xf-end--a { order: -1; color: var(--hpd-a1-text); }
.hp-deck-unit .hpd-xf-end--b { color: #C7B5FF; }

/* VU meters: segmented, green to amber to red */
.hp-deck-unit .hpd-vu {
  position: relative; display: block; width: 8px; height: 100%; min-height: 60px; border-radius: 2px; overflow: hidden;
  background: rgba(255, 255, 255, .07);
  -webkit-mask: repeating-linear-gradient(0deg, #000 0 3px, transparent 3px 5px); mask: repeating-linear-gradient(0deg, #000 0 3px, transparent 3px 5px);
}
.hp-deck-unit .hpd-vu-fill { position: absolute; inset: 0; clip-path: inset(100% 0 0 0); background: linear-gradient(0deg, var(--hpd-a1) 0%, var(--hpd-a2) 66%, #FFB020 80%, #FF4D4D 92%); }
.hp-deck-unit .hpd-vu-peak { position: absolute; inset: 0; border-top: 3px solid #FFFFFF; opacity: 0; transform: translateY(100%); }
.hp-deck-unit .hpd-strip[data-meter="off"] .hpd-vu { opacity: .35; }

/* ---------- the mixer ---------- */
.hp-deck-unit .hpd-mixer {
  position: relative; display: grid; min-width: 0; padding: 12px 12px 10px; gap: 10px 8px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "head head head" "sa ctr sb" "xf xf xf";
  background: linear-gradient(180deg, #17191E 0%, #111317 100%);
  box-shadow: inset 1px 0 0 #050608, inset 2px 0 0 rgba(255, 255, 255, .05), inset -1px 0 0 #050608, inset -2px 0 0 rgba(255, 255, 255, .05), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.hp-deck-unit .hpd-mx-head { grid-area: head; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 16px; padding: 0 2px; }
.hp-deck-unit .hpd-mx-head > span:first-child { font: 600 10px/1 var(--hpd-head); letter-spacing: .08em; color: #6E747D; }
.hp-deck-unit .hpd-mx-sub { font: 700 9.5px/1 var(--hpd-body); letter-spacing: .2em; text-transform: uppercase; color: #6E747D; }
/* vents */
.hp-deck-unit .hpd-mx-head::after {
  content: ""; order: 0; flex: 1 1 auto; height: 8px; margin: 0 10px; border-radius: 2px; max-width: 120px;
  background: repeating-linear-gradient(90deg, #07080A 0 4px, transparent 4px 8px); box-shadow: inset 0 1px 0 rgba(0, 0, 0, .5); opacity: .9;
}
.hp-deck-unit .hpd-mx-head > .hpd-mx-sub { order: 1; }
.hp-deck-unit .hpd-strip { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; padding: 8px 2px; border-radius: 10px; background: rgba(0, 0, 0, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03); }
.hp-deck-unit .hpd-strip[data-ch="A"] { grid-area: sa; }
.hp-deck-unit .hpd-strip[data-ch="B"] { grid-area: sb; }
.hp-deck-unit .hpd-strip-id { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font: 700 11px/1 var(--hpd-head); color: var(--hpd-ink); background: var(--hpd-a1); }
.hp-deck-unit .hpd-strip[data-ch="B"] .hpd-strip-id { background: var(--hpd-a2); }
.hp-deck-unit .hpd-strip[data-ch="B"] .hpd-c--knob:not(.hpd-k--trim):not(.hpd-k--filter) { --hpd-arc: var(--hpd-a2); }
.hp-deck-unit .hpd-strip[data-ch="A"] .hpd-k--filter { --hpd-arc: var(--hpd-a1); }
.hp-deck-unit .hpd-strip-fd { display: flex; align-items: stretch; justify-content: center; gap: 6px; width: 100%; height: 150px; flex: 1 1 auto; min-height: 120px; }
.hp-deck-unit .hpd-c--ch { width: 34px; flex: none; }
.hp-deck-unit .hpd-c--ch .hpd-fd-track { min-height: 0; }
.hp-deck-unit .hpd-mx-centre { grid-area: ctr; display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; padding: 8px 2px; }
.hp-deck-unit .hpd-mx-tempo { display: flex; align-items: baseline; justify-content: center; gap: 5px; width: 100%; padding: 8px 6px; border-radius: 8px; background: var(--hpd-lcd); box-shadow: 0 0 0 1px #000, inset 0 6px 16px rgba(0, 0, 0, .6); }
.hp-deck-unit .hpd-mx-bpm { font: 700 22px/1 var(--hpd-body); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: #F2F6FF; }
.hp-deck-unit .hpd-mx-tempo small { font: 700 9px/1 var(--hpd-body); letter-spacing: .14em; color: #8C95A3; }
.hp-deck-unit .hpd-mx-vu { display: grid; grid-template-columns: 8px 8px; grid-template-rows: 120px auto; column-gap: 5px; row-gap: 4px; justify-items: center; }
.hp-deck-unit .hpd-mx-vu small { grid-column: 1 / -1; font: 700 9px/1 var(--hpd-body); letter-spacing: .3em; color: #6E747D; padding-left: .3em; }
.hp-deck-unit .hpd-vu--m { min-height: 0; }
.hp-deck-unit .hpd-pads-wrap { display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: 100%; margin-top: auto; }
.hp-deck-unit .hpd-pads-wrap .hpd-lbl { text-align: center; }
.hp-deck-unit .hpd-pads { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.hp-deck-unit .hpd-pad {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 2px;
  min-width: 0; min-height: 50px; padding: 8px; border-radius: 9px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1); background: linear-gradient(180deg, #24272D 0%, #1A1C21 100%); color: var(--hpd-text);
  text-align: left; cursor: pointer; touch-action: manipulation;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 3px 0 #050506;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .08s ease, color .15s ease;
}
.hp-deck-unit .hpd-pad::before { content: ""; position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: #3A3E45; }
.hp-deck-unit .hpd-pad:hover { border-color: rgba(255, 255, 255, .26); }
.hp-deck-unit .hpd-pad:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 1px 0 #050506; }
.hp-deck-unit .hpd-pad-name { max-width: 100%; font: 600 12.5px/1.1 var(--hpd-head); letter-spacing: -.01em; }
.hp-deck-unit .hpd-pad-sub { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; line-height: 1.2; color: var(--hpd-muted); }
.hp-deck-unit .hpd-pad.is-armed::before { background: var(--hpd-a1); box-shadow: 0 0 8px var(--hpd-a1); animation: hpd-blink .45s steps(2, start) infinite; }
.hp-deck-unit .hpd-pad.is-active { color: var(--hpd-ink); border-color: transparent; background: var(--hpd-grad); box-shadow: 0 0 22px -4px var(--hpd-glow), inset 0 1px 0 rgba(255, 255, 255, .4), 0 1px 0 #050506; }
.hp-deck-unit .hpd-pad.is-active .hpd-pad-sub { color: rgba(5, 6, 10, .75); }
.hp-deck-unit .hpd-pad.is-active::before { background: #FFFFFF; }
.hp-deck-unit .hpd-xf-row { grid-area: xf; display: flex; padding: 4px 6px 0; border-top: 1px solid rgba(0, 0, 0, .5); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.hp-deck-unit .hpd-c--xf { flex: 1 1 auto; }

/* what each kind of player offers: SoundCloud audio can't be processed by the page */
.hp-deck-unit .hpd-player[data-kind="sc"] .hpd-scr-trk,
.hp-deck-unit .hpd-player[data-kind="sc"] .hpd-scr-row,
.hp-deck-unit .hpd-player[data-kind="sc"] .hpd-scr-wave,
.hp-deck-unit .hpd-player[data-kind="sc"] .hpd-load,
.hp-deck-unit .hpd-player:not([data-kind="sc"]) .hpd-slot--screen,
.hp-deck-unit:not([data-crate="sc"]) .hpd-sc-strip { display: none; }
/* inside the player's screen the header already shows the deck letter and state: the caption keeps the track link */
.hp-deck-unit .hpd-slot--screen .hpd-slot-badge,
.hp-deck-unit .hpd-slot--screen .hpd-slot-state { display: none; }

/* ---------- "Now playing on SoundCloud": a slot per player, with the player over it ---------- */
.hp-deck-unit .hpd-sc-strip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 10px; }
:is(.hp-deck, .hp-deck-unit) .hpd-slot { display: flex; flex-direction: column; gap: 6px; min-width: 0; scroll-margin: calc(var(--hh, 72px) + 16px) 0 16px; }
:is(.hp-deck, .hp-deck-unit) .hpd-slot-cap { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 22px; }
:is(.hp-deck, .hp-deck-unit) .hpd-slot-badge {
  display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 6px;
  font: 700 10.5px/1 var(--hpd-head); color: var(--hpd-ink); background: var(--hpd-a1);
}
:is(.hp-deck, .hp-deck-unit) .hpd-slot[data-deck="B"] .hpd-slot-badge { background: var(--hpd-a2); }
:is(.hp-deck, .hp-deck-unit) .hpd-slot-state { display: inline-flex; align-items: center; gap: 6px; flex: none; font: 700 10px/1 var(--hpd-body); letter-spacing: .14em; text-transform: uppercase; color: var(--hpd-muted); white-space: nowrap; }
:is(.hp-deck, .hp-deck-unit) .hpd-slot[data-playing="true"] .hpd-slot-state { color: var(--hpd-play); }
:is(.hp-deck, .hp-deck-unit) .hpd-slot[data-playing="true"] .hpd-slot-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--hpd-play); box-shadow: 0 0 8px var(--hpd-play); animation: hpd-pulse 1.4s ease-in-out infinite; }
:is(.hp-deck, .hp-deck-unit) .hpd-slot-link { display: inline-flex; align-items: center; gap: 5px; min-width: 0; padding: 3px 0; color: #DCE6F7; text-decoration: none; font: 500 12.5px/1.25 var(--hpd-body); }
:is(.hp-deck, .hp-deck-unit) .hpd-slot-link:hover .hpd-slot-name { text-decoration: underline; text-underline-offset: 3px; }
:is(.hp-deck, .hp-deck-unit) .hpd-slot-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(.hp-deck, .hp-deck-unit) .hpd-slot-link .hpd-ico { width: 13px; height: 13px; color: var(--hpd-muted); }
:is(.hp-deck, .hp-deck-unit) .hpd-tap { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #F4F5F7; color: #07080A; font: 600 12.5px/1.25 var(--hpd-body); }
:is(.hp-deck, .hp-deck-unit) .hpd-tap .hpd-ico { width: 16px; height: 16px; animation: hpd-point 1s ease-in-out infinite; }
:is(.hp-deck, .hp-deck-unit) .hpd-slot-box {
  position: relative; display: grid; place-items: center; height: 120px; padding: 10px 14px; overflow: hidden;
  border: 1px dashed rgba(255, 255, 255, .17); border-radius: 10px; background: rgba(0, 0, 0, .3);
}
:is(.hp-deck, .hp-deck-unit) .hpd-slot-msg { position: relative; max-width: 40ch; font-size: 12px; line-height: 1.4; color: var(--hpd-muted); text-align: center; }
:is(.hp-deck, .hp-deck-unit) .hpd-slot-box .hpd-slot-retry { min-height: 34px; margin-top: 8px; padding: 0 12px; font-size: 11px; }
:is(.hp-deck, .hp-deck-unit) .hpd-slot[data-state="loading"] .hpd-slot-msg { animation: hpd-pulse 1.1s ease-in-out infinite; }
:is(.hp-deck, .hp-deck-unit) .hpd-slot[data-state="live"] .hpd-slot-box { border-style: solid; border-color: rgba(255, 255, 255, .08); }
:is(.hp-deck, .hp-deck-unit) .hpd-slot[data-state="blocked"] .hpd-slot-box,
:is(.hp-deck, .hp-deck-unit) .hpd-slot[data-state="failed"] .hpd-slot-box { height: auto; min-height: 0; place-items: start; border-style: solid; }
:is(.hp-deck, .hp-deck-unit) .hpd-slot[data-state="failed"] .hpd-slot-msg { text-align: left; max-width: none; }
:is(.hp-deck, .hp-deck-unit) .hpd-slot[data-state="blocked"] .hpd-slot-box { display: none; }

/* the players themselves (inserted once, never moved in the DOM; deck.js places them over a slot) */
.hpd-sc-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.hpd-sc-layer .hpd-scf { position: fixed; left: -12000px; top: 0; width: 360px; height: 120px; overflow: hidden; border-radius: 10px; background: #0B0C0F; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 18px 40px -18px rgba(0, 0, 0, .9); }
.hpd-sc-layer .hpd-scf iframe { display: block; width: 100%; height: 100%; border: 0; }
.hpd-sc-layer .hpd-fs { position: fixed; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; outline: none; }

/* footer: credits */
.hp-deck-unit .hpd-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; padding: 10px 6px 0; font-size: 11.5px; line-height: 1.4; color: #7D848E; }
.hp-deck-unit .hpd-credit-txt { flex: 1 1 30ch; min-width: 0; }
.hp-deck-unit .hpd-credit-link { flex: none; color: #B7BDC6; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.hp-deck-unit .hpd-credit-link:hover { color: #FFFFFF; }
.hp-deck-unit .hpd-note { margin-top: 12px; padding: 0 4px; font-size: 13px; line-height: 1.5; color: var(--hpd-muted); }

/* ---------- sizes ---------- */
/* the top bar on narrower consoles: brand and transport, then the crate across */
@container hpd (max-width: 1099px) {
  .hp-deck-unit .hpd-brand { flex: 1 1 0; }
  .hp-deck-unit .hpd-crate { flex: 1 1 100%; order: 3; }
  .hp-deck-unit .hpd-seg { flex: 1 1 auto; }
  .hp-deck-unit .hpd-seg-btn { flex: 1 1 0; min-width: 0; }
  .hp-deck-unit .hpd-consent { max-width: 30ch; }
}
/* 860-1099: three columns, a little tighter */
@container hpd (max-width: 1099px) and (min-width: 860px) {
  .hp-deck-unit .hpd-console { grid-template-columns: minmax(0, 1fr) minmax(250px, .8fr) minmax(0, 1fr); }
  .hp-deck-unit .hpd-player { padding: 12px 10px 12px; }
  .hp-deck-unit .hpd-core { grid-template-columns: 50px minmax(0, 1fr) 40px; gap: 8px; }
  .hp-deck-unit .hpd-round { width: 48px; height: 48px; }
  .hp-deck-unit .hpd-scr-t--mid small { display: none; }
  .hp-deck-unit .hpd-scr-range { display: none; }
  .hp-deck-unit .hpd-hint { display: none; }
  .hp-deck-unit .hpd-load .hpd-load-txt { font-size: 11.5px; }
  .hp-deck-unit .hpd-mx-tempo { flex-wrap: wrap; gap: 2px 4px; padding: 7px 4px; }
  .hp-deck-unit .hpd-mx-bpm { font-size: 18px; }
  .hp-deck-unit .hpd-mx-tempo small { font-size: 8px; letter-spacing: .1em; }
  .hp-deck-unit .hpd-pad-sub { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
/* mid widths (tablets, the dock panel): the players side by side, the mixer across the bottom */
@container hpd (max-width: 859px) {
  .hp-deck-unit .hpd-console { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "a b" "mix mix"; }
  .hp-deck-unit .hpd-player[data-deck="A"] { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset -1px 0 0 #050608; }
  .hp-deck-unit .hpd-player[data-deck="B"] { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 1px 0 0 rgba(255, 255, 255, .05); }
  .hp-deck-unit .hpd-mixer {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr);
    box-shadow: inset 0 1px 0 #050608, inset 0 2px 0 rgba(255, 255, 255, .05);
  }
  .hp-deck-unit .hpd-strip {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; justify-items: center; align-items: start; gap: 10px 4px; padding: 8px 6px;
    grid-template-areas: "id id fd" "trim hi fd" "mid low fd" "filter filter fd";
  }
  .hp-deck-unit .hpd-strip-id { grid-area: id; }
  .hp-deck-unit .hpd-k--trim { grid-area: trim; }
  .hp-deck-unit .hpd-k--hi { grid-area: hi; }
  .hp-deck-unit .hpd-k--mid { grid-area: mid; }
  .hp-deck-unit .hpd-k--low { grid-area: low; }
  .hp-deck-unit .hpd-k--filter { grid-area: filter; }
  .hp-deck-unit .hpd-strip-fd { grid-area: fd; width: auto; height: 100%; min-height: 0; padding-left: 4px; }
  .hp-deck-unit .hpd-mx-centre { display: grid; grid-template-columns: auto auto; grid-template-areas: "bpm bpm" "master vu" "pads pads"; align-items: center; justify-items: center; gap: 10px 18px; align-content: start; }
  .hp-deck-unit .hpd-mx-tempo { grid-area: bpm; }
  .hp-deck-unit .hpd-k--master { grid-area: master; }
  .hp-deck-unit .hpd-mx-vu { grid-area: vu; grid-template-rows: 84px auto; }
  .hp-deck-unit .hpd-pads-wrap { grid-area: pads; margin-top: 0; }
  .hp-deck-unit .hpd-pads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* phones: compact players */
@container hpd (max-width: 599px) {
  .hp-deck-unit .hpd-chassis { padding: 10px 8px 10px; border-radius: 18px; }
  .hp-deck-unit .hpd-chassis::before { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .014) 0 1px, transparent 1px 3px), radial-gradient(90% 60% at 20% 0%, rgba(var(--hpd-a1-rgb), .07), transparent 70%), radial-gradient(90% 60% at 80% 0%, rgba(var(--hpd-a2-rgb), .07), transparent 70%); }
  .hp-deck-unit .hpd-top { gap: 8px 10px; padding: 0 2px 10px; }
  .hp-deck-unit .hpd-brand { flex: 1 1 0; }
  .hp-deck-unit .hpd-brand-mark { width: 30px; height: 30px; }
  .hp-deck-unit .hpd-brand-mark img { width: 19px; height: 19px; }
  .hp-deck-unit .hpd-brand-txt { flex-direction: column; gap: 3px; }
  .hp-deck-unit .hpd-brand-name { font-size: 13px; }
  .hp-deck-unit .hpd-brand-sub { font-size: 9px; letter-spacing: .16em; }
  .hp-deck-unit .hpd-crate { flex: 1 1 100%; order: 3; }
  .hp-deck-unit .hpd-crate > .hpd-lbl { display: none; }
  .hp-deck-unit .hpd-seg { flex: 1 1 auto; }
  .hp-deck-unit .hpd-seg-btn { flex: 1 1 0; min-width: 0; padding: 0 6px; font-size: 12px; }
  .hp-deck-unit .hpd-seg-x { display: none; }
  .hp-deck-unit .hpd-transport-wrap { flex: none; }
  .hp-deck-unit .hpd-consent { flex: 1 1 100%; order: 4; max-width: none; text-align: left; }
  .hp-deck-unit .hpd-playall { min-width: 0; padding: 0 14px; }
  .hp-deck-unit .hpd-mute { width: 42px; padding: 0; }
  .hp-deck-unit .hpd-mute > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .hp-deck-unit .hpd-console { border-radius: 12px; }
  .hp-deck-unit .hpd-player { gap: 8px; padding: 8px 7px 10px; }
  .hp-deck-unit .hpd-pl-head, .hp-deck-unit .hpd-hint { display: none; }
  .hp-deck-unit .hpd-screen { gap: 5px; padding: 7px 7px 8px; border-radius: 8px; }
  .hp-deck-unit .hpd-scr-deck { width: 18px; height: 18px; font-size: 10px; border-radius: 5px; }
  .hp-deck-unit .hpd-scr-state { font-size: 9px; letter-spacing: .1em; }
  .hp-deck-unit .hpd-scr-bpmv { font-size: 15px; }
  .hp-deck-unit .hpd-scr-bpm small { display: none; }
  .hp-deck-unit .hpd-scr-title { font-size: 12px; }
  .hp-deck-unit .hpd-scr-meta { font-size: 10.5px; }
  .hp-deck-unit .hpd-scr-t { font-size: 11px; }
  .hp-deck-unit .hpd-scr-t small { font-size: 7.5px; letter-spacing: .12em; }
  .hp-deck-unit .hpd-scr-t--mid { display: none; }
  .hp-deck-unit .hpd-zoom { height: 40px; }
  .hp-deck-unit .hpd-ov { height: 22px; }
  .hp-deck-unit .hpd-browse { grid-template-columns: minmax(0, 1fr); grid-template-areas: "sel" "load"; gap: 5px; }
  .hp-deck-unit .hpd-browse > .hpd-sq { display: none; }
  .hp-deck-unit .hpd-select { min-height: 36px; padding: 0 24px 0 8px; font-size: 12px; border-radius: 8px; }
  .hp-deck-unit .hpd-select-wrap::after { right: 9px; }
  .hp-deck-unit .hpd-load { min-height: 34px; padding: 4px 6px; font-size: 11px; line-height: 1.2; gap: 5px; border-radius: 8px; }
  .hp-deck-unit .hpd-load .hpd-ico { width: 14px; height: 14px; }
  .hp-deck-unit .hpd-perf { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .hp-deck-unit .hpd-hots, .hp-deck-unit .hpd-loops { gap: 4px; }
  .hp-deck-unit .hpd-hot, .hp-deck-unit .hpd-lp { min-height: 32px; border-radius: 7px; font-size: 11px; padding: 0 2px; }
  .hp-deck-unit .hpd-hot { gap: 2px; }
  .hp-deck-unit .hpd-lp--m { font-size: 10px; letter-spacing: 0; }
  .hp-deck-unit .hpd-core { grid-template-columns: minmax(0, 1fr) 32px; grid-template-areas: "jog tcol" "tp tcol"; gap: 8px 6px; align-items: stretch; }
  .hp-deck-unit .hpd-jog { max-width: 180px; }
  .hp-deck-unit .hpd-tp { flex-direction: row; justify-content: space-around; gap: 8px; padding: 2px 0 0; }
  .hp-deck-unit .hpd-round { width: 46px; height: 46px; }
  .hp-deck-unit .hpd-round-txt { font-size: 10px; }
  .hp-deck-unit .hpd-play .hpd-ico--pp { width: 22px; height: 17px; }
  .hp-deck-unit .hpd-tcol { gap: 4px; }
  .hp-deck-unit .hpd-tbtn { min-height: 26px; font-size: 8.5px; letter-spacing: .02em; border-radius: 6px; }
  .hp-deck-unit .hpd-range-btn { font-size: 8.5px; }
  .hp-deck-unit .hpd-c--tempo { min-height: 60px; }
  .hp-deck-unit .hpd-c--tempo .hpd-fd-cap { width: 28px; margin-left: -14px; }
  .hp-deck-unit .hpd-c--tempo .hpd-fd-track::after { width: 24px; margin-left: -12px; }
  .hp-deck-unit .hpd-fd-end { display: none; }
  .hp-deck-unit .hpd-mixer { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); padding: 10px 6px 8px; gap: 8px 5px; }
  .hp-deck-unit .hpd-mx-head::after { max-width: 60px; margin: 0 6px; }
  .hp-deck-unit .hpd-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "id id" "trim hi" "mid low" "filter filter" "fd fd"; gap: 8px 2px; padding: 6px 0; }
  .hp-deck-unit .hpd-strip-fd { width: 100%; height: 110px; padding-left: 0; }
  .hp-deck-unit .hpd-knob { width: 34px; height: 34px; }
  .hp-deck-unit .hpd-k--master .hpd-knob { width: 40px; height: 40px; }
  .hp-deck-unit .hpd-c-lbl { font-size: 8.5px; letter-spacing: .1em; }
  .hp-deck-unit .hpd-c--ch { width: 30px; }
  .hp-deck-unit .hpd-c--v .hpd-fd-cap { width: 26px; margin-left: -13px; }
  .hp-deck-unit .hpd-mx-centre { grid-template-columns: auto auto; gap: 8px 12px; padding: 6px 0; }
  .hp-deck-unit .hpd-mx-bpm { font-size: 17px; }
  .hp-deck-unit .hpd-pads { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .hp-deck-unit .hpd-pad { min-height: 44px; padding: 6px; align-items: center; justify-content: center; }
  .hp-deck-unit .hpd-pad-sub { display: none; }
  .hp-deck-unit .hpd-pad-name { font-size: 11px; }
  .hp-deck-unit .hpd-pad::before { top: 5px; right: 5px; width: 5px; height: 5px; }
  .hp-deck-unit .hpd-player[data-kind="sc"] .hpd-slot--screen { display: none; }
  .hp-deck-unit .hpd-foot { padding: 8px 4px 0; font-size: 11px; }
  .hp-deck-unit .hpd-note { padding: 0 12px; font-size: 12.5px; }   /* lines up with the section's heading and copy */
}
@container hpd (min-width: 600px) {
  .hp-deck-unit .hpd-sc-strip { display: none; }
}
/* the narrowest phones */
@container hpd (max-width: 340px) {
  .hp-deck-unit .hpd-player { padding: 7px 5px 9px; }
  .hp-deck-unit .hpd-hot, .hp-deck-unit .hpd-lp { font-size: 10px; }
  .hp-deck-unit .hpd-round { width: 42px; height: 42px; }
  /* top bar: a smaller brand and tighter buttons, so "HousePulse" never runs under Play/Pause mix at 320px */
  .hp-deck-unit .hpd-top { column-gap: 8px; }
  .hp-deck-unit .hpd-brand { gap: 7px; }
  .hp-deck-unit .hpd-brand-mark { width: 26px; height: 26px; }
  .hp-deck-unit .hpd-brand-mark img { width: 17px; height: 17px; }
  .hp-deck-unit .hpd-brand-name { font-size: 11.5px; }
  .hp-deck-unit .hpd-brand-sub { font-size: 8px; letter-spacing: .12em; }
  .hp-deck-unit .hpd-playall { padding: 0 8px; gap: 6px; letter-spacing: .06em; }
  .hp-deck-unit .hpd-mute { width: 38px; }
}
/* wide players: room for a larger screen */
@container hpp (min-width: 380px) {
  .hp-deck-unit .hpd-zoom { height: 72px; }
  .hp-deck-unit .hpd-scr-bpmv { font-size: 24px; }
  .hp-deck-unit .hpd-scr-title { font-size: 15px; }
  .hp-deck-unit .hpd-core { grid-template-columns: 62px minmax(0, 1fr) 50px; }
  .hp-deck-unit .hpd-round { width: 58px; height: 58px; }
}

/* ==========================================================================
   The dock: mini player, expanded panel, collapsed pill
   ========================================================================== */
.hp-deck {
  position: fixed; z-index: var(--hp-deck-z, 50);
  right: 16px; bottom: 16px; bottom: max(16px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 10px;
  max-width: calc(100vw - 32px);
  color: var(--hpd-text); font: 400 14px/1.4 var(--hpd-body); text-align: left;
  pointer-events: none;
}
.hp-deck > * { pointer-events: auto; }
.hp-deck[data-state="off"],
.hp-deck:empty { display: none; }
.hp-deck .hpd-dock-bar,
.hp-deck .hpd-dock-panel,
.hp-deck .hpd-dock-pill,
.hp-deck .hpd-sc-tray,
.hp-deck .hpd-dock-note { display: none; }
.hp-deck[data-state="mini"] .hpd-sc-tray,
.hp-deck[data-state="pill"] .hpd-sc-tray { display: flex; }
.hp-deck[data-state="mini"] .hpd-dock-note,
.hp-deck[data-state="pill"] .hpd-dock-note { display: block; }
.hp-deck[data-state="mini"] .hpd-dock-bar,
.hp-deck[data-state="panel"] .hpd-dock-bar { display: flex; }
.hp-deck[data-state="panel"] .hpd-dock-panel { display: block; }
.hp-deck[data-state="pill"] .hpd-dock-pill { display: flex; }

.hp-deck .hpd-dock-bar,
.hp-deck .hpd-dock-pill {
  align-items: center; gap: 8px; padding: 6px 8px 6px 6px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(31, 34, 40, .97), rgba(18, 20, 24, .97));
  border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 22px 50px -14px rgba(0, 0, 0, .95), 0 0 0 1px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .08);
  animation: hpd-rise .4s var(--hpd-ease) 1;
}
.hp-deck .hpd-mini-jog {
  position: relative; display: block; flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: var(--hpd-metal); box-shadow: 0 0 0 1px rgba(0, 0, 0, .7), 0 3px 8px rgba(0, 0, 0, .6);
}
.hp-deck .hpd-mini-led { position: absolute; inset: 3px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(var(--hpd-a1-rgb), .25); transition: box-shadow .3s ease; }
.hp-deck.is-playing .hpd-mini-led { box-shadow: 0 0 0 1.5px var(--hpd-a1), 0 0 10px rgba(var(--hpd-a1-rgb), .7); }
.hp-deck .hpd-mini-spin {
  position: absolute; inset: 5px; border-radius: 50%;
  background: radial-gradient(circle, #0B0D12 0 34%, #1B1E23 36% 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .9);
}
.hp-deck .hpd-mini-spin .hpd-jog-mark { position: absolute; left: 50%; top: 2px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: #F4F5F7; }
.hp-deck .hpd-mini-play { gap: 10px; padding: 0 16px 0 5px; min-height: 48px; border-radius: 14px; }
.hp-deck .hpd-mini-play .hpd-ico { display: none; }
.hp-deck .hpd-mini-play-txt { min-width: 3.4em; text-align: left; }
.hp-deck .hpd-mini-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; max-width: 260px; padding: 0 6px 0 2px; }
.hp-deck .hpd-mini-title { font: 600 13px/1.1 var(--hpd-head); letter-spacing: -.01em; white-space: nowrap; }
.hp-deck .hpd-mini-sub { overflow: hidden; text-overflow: ellipsis; font-size: 12px; line-height: 1.2; color: var(--hpd-muted); white-space: nowrap; }
.hp-deck .hpd-c--mini { width: 160px; flex: none; padding: 0 4px; }
.hp-deck .hpd-c--mini .hpd-c-lbl { order: -1; font: 700 9.5px/1 var(--hpd-body); letter-spacing: .14em; text-transform: uppercase; color: #9AA1AB; }
.hp-deck .hpd-c--mini .hpd-fd-track { height: 40px; }
.hp-deck .hpd-c--mini .hpd-fd-cap { width: 20px; height: 26px; margin-top: -13px; left: calc(var(--p, .5) * (100% - 24px) + 2px); }
.hp-deck .hpd-mini-open { padding: 0 14px 0 10px; }
.hp-deck .hpd-mini-open[aria-expanded="true"] { color: var(--hpd-ink); background: var(--hpd-grad); border-color: transparent; }
.hp-deck .hpd-mini-hide { padding: 0 12px 0 8px; border-color: transparent; background: transparent; box-shadow: none; color: var(--hpd-muted); }
.hp-deck .hpd-mini-hide:hover { color: var(--hpd-text); border-color: transparent; }
.hp-deck .hpd-dock-pill { padding: 5px; gap: 5px; border-radius: 999px; }
.hp-deck .hpd-dock-pill .hpd-btn { width: 46px; height: 46px; min-height: 46px; padding: 0; border-radius: 50%; }
.hp-deck .hpd-pill-show .hpd-mini-jog { width: 40px; height: 40px; }
.hp-deck .is-muted .hpd-mini-sub, .hp-deck.is-muted .hpd-mini-sub { color: #FFC77A; }

/* the SoundCloud player of each playing deck, above the mini player (other pages, or Home scrolled away) */
.hp-deck .hpd-sc-tray { flex-wrap: wrap-reverse; justify-content: flex-end; align-items: flex-end; gap: 10px; max-width: 100%; }
.hp-deck .hpd-slot--tray {
  width: 380px; max-width: 100%; padding: 10px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(31, 34, 40, .97), rgba(18, 20, 24, .97)); border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 22px 50px -14px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .07);
  animation: hpd-rise .4s var(--hpd-ease) 1;
}
.hp-deck .hpd-slot--tray .hpd-slot-cap { padding: 0 4px; }
.hp-deck .hpd-dock-note {
  max-width: 340px; padding: 7px 14px; border-radius: 999px;
  background: rgba(18, 20, 24, .94); border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: 12px; line-height: 1.3; color: var(--hpd-muted);
}
.hp-deck .hpd-dock-panel {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - var(--hh, 72px) - 104px); max-height: calc(100dvh - var(--hh, 72px) - 104px);
  overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #3A3E45 transparent;
  border-radius: 22px; box-shadow: 0 34px 90px -20px rgba(0, 0, 0, .95);
  animation: hpd-rise .4s var(--hpd-ease) 1;
}
.hp-deck .hpd-dock-panel > .hp-deck-unit .hpd-hint,
.hp-deck .hpd-dock-panel > .hp-deck-unit .hpd-note { display: none; }
/* laptop-height screens: deck.js gives the console in the open panel a compact layout (data-compact) and, if that is
   not enough, scales it down (--hpd-fit, never below .72) so the whole console, crossfader included, fits unscrolled */
.hp-deck .hpd-dock-panel > .hp-deck-unit { zoom: var(--hpd-fit, 1); }
.hp-deck-unit[data-compact] .hpd-chassis { padding-top: 10px; padding-bottom: 10px; }
.hp-deck-unit[data-compact] .hpd-top { padding-bottom: 8px; }
.hp-deck-unit[data-compact] .hpd-player { gap: 8px; padding-top: 10px; padding-bottom: 10px; }
.hp-deck-unit[data-compact] .hpd-pl-head { display: none; }
.hp-deck-unit[data-compact] .hpd-screen { gap: 5px; padding-top: 8px; padding-bottom: 8px; }
.hp-deck-unit[data-compact] .hpd-zoom { height: 52px; }
.hp-deck-unit[data-compact] .hpd-ov { height: 24px; }
.hp-deck-unit[data-compact] .hpd-browse { grid-template-columns: 40px minmax(0, 1fr) 40px 40px; grid-template-areas: "prev sel next load"; }
.hp-deck-unit[data-compact] .hpd-load { width: 40px; min-height: 40px; padding: 0; border-radius: 10px; }
.hp-deck-unit[data-compact] .hpd-load .hpd-load-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.hp-deck-unit[data-compact] .hpd-core { gap: 8px; }
.hp-deck-unit[data-compact] .hpd-jog { max-width: 190px; }
.hp-deck-unit[data-compact] .hpd-tp { gap: 10px; }
.hp-deck-unit[data-compact] .hpd-mixer { padding-top: 10px; gap: 8px; }
.hp-deck-unit[data-compact] .hpd-strip { gap: 6px; padding-top: 6px; padding-bottom: 6px; }
.hp-deck-unit[data-compact] .hpd-knob { width: 34px; height: 34px; }
.hp-deck-unit[data-compact] .hpd-k--master .hpd-knob { width: 40px; height: 40px; }
.hp-deck-unit[data-compact] .hpd-strip-fd { min-height: 96px; }
.hp-deck-unit[data-compact] .hpd-mx-centre { gap: 8px; padding-top: 4px; padding-bottom: 4px; }
.hp-deck-unit[data-compact] .hpd-mx-vu { grid-template-rows: 96px auto; }
.hp-deck-unit[data-compact] .hpd-pad { min-height: 44px; padding: 6px 8px; }
.hp-deck-unit[data-compact] .hpd-foot { padding-top: 6px; }

@media (max-width: 640px) {
  .hp-deck { left: 8px; right: 8px; bottom: 8px; bottom: max(8px, env(safe-area-inset-bottom)); max-width: none; align-items: stretch; }
  .hp-deck[data-state="pill"] { left: auto; align-items: flex-end; }
  .hp-deck .hpd-dock-bar { gap: 4px; padding: 5px; border-radius: 18px; }
  .hp-deck .hpd-dock-bar .hpd-btn { padding: 0 10px; font-size: 11.5px; letter-spacing: .06em; }
  .hp-deck .hpd-dock-bar .hpd-mini-play { padding: 0 10px 0 4px; gap: 8px; }
  .hp-deck .hpd-dock-bar .hpd-mini-hide { padding: 0 8px; }
  .hp-deck .hpd-mini-jog { width: 36px; height: 36px; }
  .hp-deck .hpd-mini-meta { display: none; }
  .hp-deck .hpd-c--mini { flex: 1 1 auto; width: auto; min-width: 0; gap: 6px; padding: 0 2px; }
  .hp-deck .hpd-mini-open .hpd-ico,
  .hp-deck .hpd-mini-hide .hpd-ico { display: none; }
  .hp-deck .hpd-mini-open .hpd-verb { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .hp-deck .hpd-mini-open .hpd-noun { text-transform: uppercase; }
  .hp-deck .hpd-dock-panel { width: auto; max-height: calc(100vh - var(--hh, 68px) - 92px); max-height: calc(100dvh - var(--hh, 68px) - 92px); border-radius: 18px; }
  .hp-deck .hpd-sc-tray { flex-wrap: nowrap; gap: 8px; }
  .hp-deck[data-state="pill"] .hpd-sc-tray { width: calc(100vw - 16px); }
  .hp-deck .hpd-slot--tray { flex: 1 1 0; width: auto; min-width: 0; padding: 8px; border-radius: 14px; }
  .hp-deck .hpd-slot--tray .hpd-slot-state { display: none; }
  .hp-deck .hpd-dock-note { max-width: none; border-radius: 14px; text-align: center; }
  .hp-deck[data-state="pill"] .hpd-dock-note { max-width: calc(100vw - 16px); }
}
@media (min-width: 641px) and (max-width: 900px) {
  .hp-deck .hpd-mini-meta { display: none; }
}

/* ---------- forced colours (Windows High Contrast): keep states, controls and wheels visible ---------- */
@media (forced-colors: active) {
  .hp-deck-unit .hpd-chassis, .hp-deck-unit .hpd-console, .hp-deck-unit .hpd-player, .hp-deck-unit .hpd-mixer, .hp-deck-unit .hpd-screen { border: 1px solid CanvasText; }
  .hp-deck-unit .hpd-chassis::before { display: none; }
  .hp-deck-unit .hpd-seg-btn[aria-pressed="true"],
  .hp-deck-unit .hpd-sync[aria-pressed="true"],
  .hp-deck-unit .hpd-lp[aria-pressed="true"],
  .hp-deck-unit .hpd-mute[aria-pressed="true"],
  .hp-deck-unit .hpd-play[data-on="true"],
  .hp-deck-unit .hpd-cue[data-at="true"],
  .hp-deck-unit .hpd-cue.is-held,
  .hp-deck-unit .hpd-hot[data-set="yes"],
  .hp-deck-unit .hpd-pad.is-active,
  .hp-deck .hpd-mini-open[aria-expanded="true"],
  .hp-deck .hpd-mini-play[data-on="true"],
  .hp-deck .hpd-pill-play[data-on="true"] { forced-color-adjust: none; background: SelectedItem; color: SelectedItemText; border-color: SelectedItem; box-shadow: none; }
  .hp-deck-unit .hpd-pad.is-active .hpd-pad-sub { color: SelectedItemText; }
  .hp-deck-unit .hpd-round { border: 2px solid ButtonText; box-shadow: none; }
  .hp-deck-unit .hpd-knob-cap, .hp-deck-unit .hpd-fd-cap, .hp-deck .hpd-fd-cap { forced-color-adjust: none; background: ButtonFace; border: 2px solid ButtonText; box-shadow: none; }
  .hp-deck-unit .hpd-knob-ind, .hp-deck-unit .hpd-fd-cap::after { forced-color-adjust: none; background: ButtonText; }
  .hp-deck-unit .hpd-knob-arc { forced-color-adjust: none; background: conic-gradient(from -135deg, CanvasText 0 270deg, transparent 270deg) !important; }
  .hp-deck-unit .hpd-fd-slot, .hp-deck .hpd-fd-slot { forced-color-adjust: none; background: CanvasText; }
  .hp-deck-unit .hpd-jog { border: 2px solid CanvasText; }
  .hp-deck-unit .hpd-jog-ring, .hp-deck-unit .hpd-jog-plate, .hp-deck-unit .hpd-jog-spin, .hp-deck-unit .hpd-jog-disp, .hp-deck-unit .hpd-jog-prog, .hp-deck .hpd-mini-jog { forced-color-adjust: none; }
  .hp-deck-unit .hpd-jog-mark, .hp-deck .hpd-jog-mark { forced-color-adjust: none; background: #FFFFFF; }
  .hp-deck-unit .hpd-vu, .hp-deck-unit .hpd-vu-fill, .hp-deck-unit .hpd-vu-peak { forced-color-adjust: none; }
  .hp-deck-unit .hpd-zoom, .hp-deck-unit .hpd-ov { border: 1px solid CanvasText; }
  .hp-deck-unit .hpd-ov-head { forced-color-adjust: none; background: Highlight; }
  .hp-deck-unit .hpd-ov-played { forced-color-adjust: none; background: rgba(0, 0, 0, .35); }
  .hp-deck-unit .hpd-scr-deck, .hp-deck-unit .hpd-strip-id, :is(.hp-deck, .hp-deck-unit) .hpd-slot-badge, .hp-deck-unit .hpd-notice::before { forced-color-adjust: none; }
  .hp-deck-unit .hpd-brand-mark { forced-color-adjust: none; background: #0B0C0F; }
  .hp-deck-unit .hpd-select, .hp-deck-unit .hpd-notice, :is(.hp-deck, .hp-deck-unit) .hpd-slot-box { border-color: CanvasText; }
  .hp-deck-unit .hpd-tapnote, :is(.hp-deck, .hp-deck-unit) .hpd-tap { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .hp-deck-unit .hpd-c.is-focus, .hp-deck .hpd-c.is-focus { outline-color: Highlight; }
  .hp-deck .hpd-slot--tray, .hp-deck .hpd-dock-note, .hp-deck .hpd-dock-bar, .hp-deck .hpd-dock-pill { border-color: CanvasText; }
  .hpd-sc-layer .hpd-scf { outline: 1px solid CanvasText; }
  .hp-deck :focus-visible, .hp-deck-unit :focus-visible { outline-color: Highlight !important; }
}

/* ---------- spinning platters get their own layer only while they spin ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hp-deck-unit .hpd-player.is-playing .hpd-jog-spin,
  .hp-deck.is-playing .hpd-mini-spin { will-change: transform; }
}

/* ---------- reduced motion: no spinning, blinking or sliding (the wheels hold still; sound still works) ---------- */
@media (prefers-reduced-motion: reduce) {
  .hp-deck *, .hp-deck *::before, .hp-deck *::after,
  .hp-deck-unit, .hp-deck-unit *, .hp-deck-unit *::before, .hp-deck-unit *::after { animation: none !important; transition: none !important; }
}
