:root {
  --bg: #0b0b12;
  --bg2: #14141f;
  --bg3: #1e1e2d;
  --line: #2a2a3d;
  --text: #f1f1f7;
  --muted: #9a9ab3;
  --accent: #2de2e6;
  --accent-ink: #00191a;
  --deck-a: #2de2e6;
  --deck-b: #ff3d9a;
  --glow: 0 0 18px rgba(45, 226, 230, .35);
  --danger: #ff6b6b;
  --radius: 10px;
  --bar-h: 88px;
  --tab-h: 0px;
  --side-w: 220px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1 { font-size: 2rem; line-height: 1.15; margin: 0 0 .25rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; margin: 1.75rem 0 .75rem; }
h3.disc { font-size: .9rem; color: var(--muted); margin: 1.25rem 0 .25rem; text-transform: uppercase; letter-spacing: .05em; }
.muted { color: var(--muted); margin: .2rem 0; }
.small { font-size: .85rem; }
.link:hover { text-decoration: underline; }
.hidden { display: none !important; }
.mobile-only { display: none !important; }

#app {
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  grid-template-rows: 1fr auto auto;
  grid-template-areas: "side view" "bar bar" "tab tab";
  height: 100%;
}
body.setup #app { grid-template-columns: 1fr; grid-template-areas: "view" "bar" "tab"; }
body.setup .sidebar, body.setup .tabbar { display: none; }

.sidebar { grid-area: side; background: #07070c; padding: 20px 12px; border-right: 1px solid var(--line); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; padding: 0 10px 20px; letter-spacing: .02em; }
.brand span, .login h1 { background: linear-gradient(90deg, var(--deck-a), var(--deck-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.navlink { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.navlink:hover { color: var(--text); background: var(--bg2); }
.navlink.active { color: var(--text); background: var(--bg3); }
.navlink.active .icon { color: var(--accent); }

#view { grid-area: view; overflow-y: auto; padding: 28px 32px 40px; outline: none; overscroll-behavior: contain; }

.icon { display: inline-flex; width: 24px; height: 24px; flex: none; }
.icon svg { width: 100%; height: 100%; fill: currentColor; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg3); font-weight: 600; cursor: pointer;
}
.btn .icon { width: 20px; height: 20px; }
.btn:hover { background: #303038; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.big { padding: 13px 28px; font-size: 1.05rem; }
.ibtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; flex: none;
}
.ibtn:hover { color: var(--text); background: var(--bg3); }
.ibtn.toggle.on { color: var(--accent); }
.ibtn.play { background: linear-gradient(135deg, var(--deck-a), var(--deck-b)); color: #07070c; }
.ibtn.play:hover { filter: brightness(1.1); transform: scale(1.04); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.select, .input, .searchbox {
  background: var(--bg2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 12px; font: inherit;
}
.searchbox { width: 100%; max-width: 560px; font-size: 1.1rem; padding: 12px 16px; border-radius: 999px; margin-bottom: 8px; }
.input { width: 100%; margin: 6px 0; }

.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.actions.center { justify-content: center; margin-top: 12px; }
.mb { margin-bottom: 8px; }

/* Kort */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 22px 18px; }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: 160px; gap: 18px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.row > * { scroll-snap-align: start; }
.shelfhead { display: flex; align-items: baseline; justify-content: space-between; }
.shelfhead .more { color: var(--muted); font-size: .9rem; font-weight: 600; }
.shelfhead .more:hover { color: var(--text); }
.card { display: block; min-width: 0; }
.cover { position: relative; }
.art { aspect-ratio: 1; background: var(--bg3); border-radius: 8px; overflow: hidden; }
.art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card.round .art, .art.round { border-radius: 50%; }
.ctitle { font-weight: 600; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csub { color: var(--muted); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.round .ctitle { text-align: center; }
.cardplay {
  position: absolute; right: 8px; bottom: 8px; width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center;
  opacity: 0; transform: translateY(6px); transition: .15s; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,.5);
}
.card:hover .cardplay, .cardplay:focus-visible { opacity: 1; transform: none; }
.card:hover .art { filter: brightness(1.08); }
@media (hover: none) { .cardplay { display: none; } }

/* Topp på album/artist */
.hero { display: flex; gap: 28px; align-items: flex-end; margin-bottom: 20px; }
.art.big { width: 232px; flex: none; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.heroinfo { min-width: 0; }
.heroinfo h1 { font-size: 2.6rem; overflow-wrap: anywhere; }
.heroinfo .actions { margin-top: 16px; }
.kicker { text-transform: uppercase; font-size: .75rem; font-weight: 700; letter-spacing: .08em; color: var(--muted); margin: 0 0 6px; }
.summary { color: var(--muted); max-width: 70ch; white-space: pre-line; margin-top: 24px; }

/* Sporlister */
.tracks { list-style: none; margin: 0; padding: 0; }
.track {
  display: grid; grid-template-columns: 36px 1fr auto 40px; gap: 12px; align-items: center;
  padding: 6px 8px; border-radius: 8px; cursor: pointer; min-height: 52px;
}
.track:hover, .track:focus-visible { background: var(--bg2); }
.track .num { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.track .art.sm { width: 40px; }
.track .meta { min-width: 0; }
.title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.sub { color: var(--muted); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dur { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; }
.track.current .title, .track.current .num { color: var(--accent); }
.track.past { opacity: .5; }
.queue .track { grid-template-columns: 40px 1fr auto auto; }

/* Spilles nå */
.np { display: grid; grid-template-columns: minmax(280px, 460px) 1fr; gap: 40px; align-items: start; }
.npmain { position: sticky; top: 0; }
.npart { width: 100%; box-shadow: 0 16px 60px rgba(0,0,0,.6); }
.npinfo { text-align: center; margin-top: 20px; }
.npinfo h1 { font-size: 1.6rem; }
.npinfo p { color: var(--muted); margin: 0 0 12px; }
.npqueue h2 { margin-top: 0; }

/* Spoleknapp */
.seekbar { display: flex; align-items: center; gap: 10px; width: 100%; }
.time { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; min-width: 38px; text-align: center; }
input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; height: 20px; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--text) var(--p, 0%), #4a4a52 var(--p, 0%)); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: #4a4a52; }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--text); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; margin-top: -4px; }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.seek { flex: 1; }
.vol { width: 100px; --p: 100%; }
.controls { display: flex; align-items: center; justify-content: center; gap: 6px; }
.controls.big { gap: 14px; margin-top: 8px; }
.controls.big .ibtn { width: 48px; height: 48px; }
.controls.big .ibtn.play { width: 64px; height: 64px; }
.controls.big .icon { width: 30px; height: 30px; }

/* Avspillerlinje */
.bar {
  grid-area: bar; display: grid; grid-template-columns: minmax(180px, 1fr) minmax(320px, 2fr) minmax(180px, 1fr);
  align-items: center; gap: 16px; height: var(--bar-h); padding: 0 16px; background: #07070c; border-top: 1px solid var(--line);
  position: relative;
}
.barinfo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.barinfo .art.sm { width: 56px; flex: none; border-radius: 6px; }
.barinfo .meta { min-width: 0; }
.barmid { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.barright { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.volwrap { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.miniprog { display: none; }

.tabbar { grid-area: tab; display: none; }

/* Meny */
.menu {
  position: fixed; z-index: 50; min-width: 200px; background: var(--bg3); border: 1px solid var(--line);
  border-radius: 10px; padding: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.55);
}
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 6px; cursor: pointer; }
.menu button:hover, .menu button:focus-visible { background: #34343c; outline: none; }

/* Diverse */
.loading { display: grid; place-items: center; padding: 48px; }
.spin { width: 30px; height: 30px; border: 3px solid var(--bg3); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { color: var(--muted); padding: 32px 0; text-align: center; }
.sentinel { min-height: 1px; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--bar-h) + var(--tab-h) + 16px + var(--safe-b)); transform: translate(-50%, 20px);
  background: var(--text); color: #000; padding: 10px 18px; border-radius: 999px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: .2s; z-index: 60; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.login { max-width: 420px; margin: 8vh auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.login .error { color: var(--danger); }
.manual { width: 100%; margin-top: 24px; text-align: left; }
.manual summary { cursor: pointer; color: var(--muted); text-align: center; }
.manual .btn { width: 100%; margin-top: 6px; }
.serverlist { display: flex; flex-direction: column; gap: 10px; width: 100%; }

.settings .panel { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px 18px; margin-bottom: 14px; max-width: 560px; }
.settings .panel h2 { margin-top: 14px; }

/* Mobil */
@media (max-width: 760px) {
  :root { --bar-h: 64px; --tab-h: 56px; }
  #app { grid-template-columns: 1fr; grid-template-areas: "view" "bar" "tab"; }
  .sidebar { display: none; }
  .mobile-only { display: inline-flex !important; }
  #view { padding: 20px 16px 24px; }
  h1 { font-size: 1.6rem; }
  .tabbar {
    display: flex; justify-content: space-around; background: #07070c; border-top: 1px solid var(--line);
    height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  }
  .tabbar .navlink { flex-direction: column; gap: 2px; font-size: .68rem; padding: 6px 4px; flex: 1; border-radius: 0; background: none; }
  .tabbar .navlink .icon { width: 22px; height: 22px; }
  .tabbar .navlink.active { background: none; }
  body.setup .bar { display: none; }
  .bar { grid-template-columns: 1fr auto; gap: 8px; padding: 0 8px 0 10px; border-top: 0; background: var(--bg3); }
  .barinfo .art.sm { width: 44px; }
  .barmid .seekbar, .barright .volwrap, .barright { display: none; }
  .barmid .controls .ibtn:not(.play) { display: none; }
  .barmid .controls .ibtn.play { background: none; color: var(--text); }
  .barmid .controls .ibtn:nth-child(4) { display: inline-flex; }
  .miniprog { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.12); }
  .miniprog .fill { height: 100%; width: 0; background: var(--text); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px 14px; }
  .row { grid-auto-columns: 140px; gap: 14px; }
  .hero { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
  .hero .actions { justify-content: center; }
  .art.big { width: min(64vw, 260px); }
  .heroinfo h1 { font-size: 1.7rem; }
  .np { grid-template-columns: 1fr; gap: 24px; }
  .npmain { position: static; max-width: 420px; margin: 0 auto; width: 100%; }
  .track { grid-template-columns: 28px 1fr auto 36px; gap: 10px; padding: 6px 4px; }
  .track .dur { display: none; }
  .queue .track { grid-template-columns: 40px 1fr auto auto; }
}

/* ================= Miksepult ================= */
body.dj-mode .bar { display: none; }
body.dj-mode .toast { bottom: calc(var(--tab-h) + 16px + var(--safe-b)); }
.dj { max-width: 1500px; margin: 0 auto; }
.fxnote:empty { display: none; }
.console { display: grid; grid-template-columns: 1fr minmax(300px, 360px) 1fr; gap: 14px; align-items: stretch; }
.deck, .mixer {
  background: linear-gradient(180deg, #161624, #10101a); border: 1px solid var(--line); border-radius: 16px; padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 10px 30px rgba(0,0,0,.35);
}
.deck { border-top: 3px solid var(--c); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dhead { display: flex; align-items: center; gap: 10px; min-width: 0; }
.badge { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; background: var(--c); color: #07070c; flex: none; }
.dinfo { min-width: 0; flex: 1; }
.dtitle { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsub { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dstats { text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.bpm { font-weight: 800; color: var(--c); font-size: 1.05rem; }
.dtime { color: var(--muted); font-size: .8rem; }
.dtime.warn { color: #ff4d6d; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .4; } }
.wave { width: 100%; height: 64px; background: rgba(0,0,0,.35); border-radius: 8px; cursor: pointer; display: block; }
.dbody { display: flex; align-items: center; justify-content: center; gap: 18px; }
.platter {
  --rot: 0deg; position: relative; width: min(100%, 230px); aspect-ratio: 1; border-radius: 50%; flex: none;
  background: #050508; box-shadow: 0 0 0 6px #1d1d2b, 0 0 0 7px var(--line), 0 12px 30px rgba(0,0,0,.6);
  cursor: grab; touch-action: none; user-select: none;
}
.platter.grab { cursor: grabbing; }
.deck.loaded .platter { box-shadow: 0 0 0 6px #1d1d2b, 0 0 0 7px var(--c), 0 0 24px color-mix(in srgb, var(--c) 35%, transparent); }
.grooves {
  position: absolute; inset: 0; border-radius: 50%; transform: rotate(var(--rot));
  background:
    conic-gradient(from 0deg, rgba(255,255,255,.08), transparent 12%, transparent 50%, rgba(255,255,255,.06) 62%, transparent 75%),
    repeating-radial-gradient(circle, #0b0b10 0 2px, #12121a 2px 3px);
}
.platter .label { position: absolute; inset: 31%; border-radius: 50%; overflow: hidden; transform: rotate(var(--rot)); box-shadow: 0 0 0 3px var(--c); }
.platter .label .art { width: 100%; height: 100%; aspect-ratio: auto; }
.spindle { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: #ccc; box-shadow: 0 0 0 2px #222; }
.pitchcol { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pitchval { font-variant-numeric: tabular-nums; font-size: .8rem; color: var(--c); min-width: 64px; text-align: center; }
.tiny { font-size: .7rem; letter-spacing: .08em; color: var(--muted); }
.dbtns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }

.djbtn {
  min-width: 46px; height: 38px; padding: 0 10px; border-radius: 8px; border: 1px solid #34344a;
  background: linear-gradient(180deg, #262638, #1a1a28); color: var(--text); font-weight: 800; font-size: .78rem;
  letter-spacing: .06em; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  box-shadow: 0 2px 0 #0a0a10; touch-action: manipulation; user-select: none;
}
.djbtn:active { transform: translateY(1px); box-shadow: none; }
.djbtn .icon { width: 22px; height: 22px; }
.djbtn.on { border-color: var(--c, var(--accent)); color: var(--c, var(--accent)); box-shadow: 0 0 12px color-mix(in srgb, var(--c, var(--accent)) 45%, transparent); }
.djbtn.play { min-width: 64px; }
.djbtn.play.on { background: var(--c); color: #07070c; }
.djbtn.cue { color: #ffd166; }
.djbtn.bend { min-width: 38px; font-size: 1.1rem; }
.djbtn.tiny { height: 30px; min-width: 34px; font-size: .72rem; }
.djbtn.a { color: var(--deck-a); }
.djbtn.b { color: var(--deck-b); }
.djbtn.auto.on { --c: var(--accent); background: linear-gradient(90deg, color-mix(in srgb, var(--deck-a) 25%, #1a1a28), color-mix(in srgb, var(--deck-b) 25%, #1a1a28)); }
.djbtn.rec.on { --c: #ff4d6d; background: #ff4d6d; color: #fff; animation: blink 1.2s steps(2) infinite; }

/* Dreieknapper */
.knob { position: relative; display: grid; justify-items: center; gap: 2px; width: 62px; }
.dial {
  --a: 0deg; position: relative; width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3a3a52, #16161f 70%); box-shadow: 0 3px 8px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.12);
  transform: rotate(var(--a)); cursor: ns-resize; touch-action: none;
}
.pointer { position: absolute; top: 4px; left: 50%; width: 3px; height: 11px; margin-left: -1.5px; border-radius: 2px; background: var(--c, #fff); }
.knob.off .pointer { background: #ffd166; }
.knobinput { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.knob:focus-within .dial { outline: 2px solid var(--accent); outline-offset: 2px; }
.knoblabel { font-size: .64rem; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.knobval { font-size: .66rem; color: var(--text); font-variant-numeric: tabular-nums; min-height: 1em; }

/* Mikser */
.mixer { display: flex; flex-direction: column; gap: 12px; }
.strips { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; }
.strip, .mastercol { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 2px; border-radius: 10px; background: rgba(0,0,0,.2); }
.strip-a, .deck-a { --c: var(--deck-a); }
.strip-b, .deck-b { --c: var(--deck-b); }
.mastercol { --c: #fff; padding: 6px 8px; }
.stripname { font-weight: 800; color: var(--c); font-size: .8rem; letter-spacing: .1em; }
.faderrow { display: flex; align-items: flex-end; gap: 8px; margin-top: 4px; }
.meter { width: 10px; height: 120px; display: block; }
.meter.master { height: 140px; }
.recinfo { font-size: .72rem; color: var(--muted); text-align: center; max-width: 90px; }

input[type=range].vfader { writing-mode: vertical-lr; direction: rtl; width: 30px; height: 120px; }
input[type=range].vfader.pitch { height: 170px; direction: ltr; }
input[type=range].vfader::-webkit-slider-runnable-track { width: 6px; height: 100%; background: #07070c; box-shadow: inset 0 0 0 1px #2c2c40; }
input[type=range].vfader::-moz-range-track { width: 6px; background: #07070c; }
input[type=range].vfader::-moz-range-progress { background: transparent; }
input[type=range].vfader::-webkit-slider-thumb { width: 28px; height: 14px; border-radius: 3px; margin: 0 0 0 -11px; background: linear-gradient(180deg, #e9e9f2, #9b9bb0); box-shadow: 0 2px 4px rgba(0,0,0,.6), inset 0 -2px 0 var(--c, #fff); }
input[type=range].vfader::-moz-range-thumb { width: 28px; height: 14px; border-radius: 3px; background: linear-gradient(180deg, #e9e9f2, #9b9bb0); }

.xfrow { display: flex; align-items: center; gap: 10px; padding: 8px 6px; background: rgba(0,0,0,.25); border-radius: 10px; }
.xa { color: var(--deck-a); font-weight: 800; }
.xb { color: var(--deck-b); font-weight: 800; }
input[type=range].xfader { flex: 1; height: 34px; }
input[type=range].xfader::-webkit-slider-runnable-track { height: 6px; background: linear-gradient(90deg, var(--deck-a), #333 50%, var(--deck-b)); }
input[type=range].xfader::-moz-range-track { height: 6px; background: linear-gradient(90deg, var(--deck-a), #333 50%, var(--deck-b)); }
input[type=range].xfader::-moz-range-progress { background: transparent; }
input[type=range].xfader::-webkit-slider-thumb { width: 20px; height: 32px; border-radius: 4px; margin-top: -13px; background: linear-gradient(90deg, #9b9bb0, #f4f4fa 45%, #9b9bb0); box-shadow: 0 2px 6px rgba(0,0,0,.6); }
input[type=range].xfader::-moz-range-thumb { width: 20px; height: 32px; border-radius: 4px; border: 0; background: linear-gradient(90deg, #9b9bb0, #f4f4fa 45%, #9b9bb0); }
.autorow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.select.tiny { padding: 6px 8px; font-size: .8rem; }
.chk { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--muted); cursor: pointer; }
.chk input { accent-color: var(--accent); }

/* DJ-kassen */
.cratewrap { margin-top: 24px; }
.cratewrap .phead { margin-bottom: 10px; align-items: center; }
.cratewrap h2 { margin: 0; }
.crate .track, .results .track { grid-template-columns: 40px 1fr auto auto; cursor: default; }
.loadbtns { display: flex; gap: 4px; align-items: center; }
.results:not(:empty) { margin-bottom: 18px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.crate .empty, .results .empty { list-style: none; }

@media (max-width: 1180px) {
  .console { grid-template-columns: 1fr 1fr; }
  .mixer { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 760px) {
  .console { grid-template-columns: 1fr; }
  .mixer { order: 0; grid-column: auto; }
  .deck-b { order: 1; }
  .platter { width: min(52vw, 190px); }
  input[type=range].vfader.pitch { height: 140px; }
  .knob { width: 52px; }
  .dial { width: 34px; height: 34px; }
  .crate .track, .results .track { grid-template-columns: 40px 1fr auto; }
  .crate .dur, .results .dur { display: none; }
}

/* ================= Scratch ================= */
.scratch { max-width: 1200px; margin: 0 auto; }
.tables { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.turntable { align-items: stretch; }
.turntable .platter { width: min(100%, 300px); align-self: center; }
.platter.scratchable { cursor: grab; }
.loadov { position: absolute; inset: 0; border-radius: 50%; display: none; place-items: center; background: rgba(0,0,0,.6); font-weight: 800; font-size: .9rem; }
.loadov.show { display: grid; }
.badge.wide { width: auto; padding: 0 10px; font-size: .72rem; letter-spacing: .1em; }
.dstats.left { text-align: left; color: var(--muted); font-size: .8rem; min-height: 1.2em; margin-top: -6px; }
.sliderrow { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 8px; }
.sliderrow .pitchval { min-width: 56px; text-align: right; }
input[type=range].hslider { width: 100%; height: 26px; }
input[type=range].hslider::-webkit-slider-runnable-track { height: 4px; background: #07070c; box-shadow: inset 0 0 0 1px #2c2c40; }
input[type=range].hslider::-webkit-slider-thumb { width: 14px; height: 22px; border-radius: 3px; margin-top: -9px; background: linear-gradient(90deg, #9b9bb0, #f4f4fa 45%, #9b9bb0); box-shadow: inset -2px 0 0 var(--c, #fff); }
input[type=range].hslider::-moz-range-track { height: 4px; background: #07070c; }
input[type=range].hslider::-moz-range-progress { background: var(--c); height: 4px; }
input[type=range].hslider::-moz-range-thumb { width: 14px; height: 22px; border-radius: 3px; border: 0; background: linear-gradient(90deg, #9b9bb0, #f4f4fa 45%, #9b9bb0); }
.qhead { margin: 6px 0 0; font-size: .8rem; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.tqueue { list-style: none; margin: 0; padding: 0; max-height: 190px; overflow-y: auto; }
.tqueue li { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 6px; align-items: center; padding: 2px 0; }
.tqueue .ibtn { width: 32px; height: 32px; }
.tqueue .icon { width: 18px; height: 18px; }
.qn { color: var(--c); font-weight: 800; font-size: .8rem; text-align: center; }
.qempty { color: var(--muted); font-size: .85rem; display: block !important; padding: 6px 0; }
.xfpanel { margin: 14px auto 0; max-width: 640px; display: flex; flex-direction: column; gap: 8px; }
.xfpanel .xfrow { padding: 12px 14px; background: linear-gradient(180deg, #161624, #10101a); border: 1px solid var(--line); }
input[type=range].xfader.big { height: 44px; }
input[type=range].xfader.big::-webkit-slider-thumb { width: 26px; height: 40px; margin-top: -17px; }
input[type=range].xfader.big::-moz-range-thumb { width: 26px; height: 40px; }
.xfpanel .xa, .xfpanel .xb { font-size: 1.2rem; }
.plpanel { margin-top: 22px; }
.plhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.plhead h2 { margin: 0; }
.plhead .select { flex: 1; min-width: 180px; max-width: 360px; }
.plhead .actions { margin-left: auto; }
.pl .track { grid-template-columns: 46px 40px 1fr 46px; cursor: default; }
.djbtn.side { min-width: 46px; height: 42px; font-size: 1rem; }
.djbtn:disabled { opacity: .4; cursor: default; }
.pl .empty { list-style: none; }

@media (max-width: 760px) {
  .tables { gap: 8px; }
  .turntable { padding: 10px 8px; gap: 8px; }
  .turntable .platter { width: 100%; }
  .turntable .dhead .dsub { display: none; }
  .turntable .dtitle { font-size: .85rem; }
  .turntable .dbtns .djbtn { min-width: 38px; height: 34px; padding: 0 6px; }
  .turntable .djbtn.play { min-width: 46px; }
  .sliderrow { grid-template-columns: 1fr; gap: 0; }
  .sliderrow .pitchval { text-align: left; }
  .tqueue li { grid-template-columns: 18px 1fr auto; }
  .tqueue li .ibtn:nth-last-child(2):not(:last-child) { display: none; }
  .plhead .actions { margin-left: 0; }
  .pl .track { grid-template-columns: 46px 1fr 46px; }
  .pl .track .art { display: none; }
}
