/* Adapted from CrateFlow v102 design tokens. Independent DJ application. */
:root{--bg:hsl(210 15% 5%);--panel:hsl(210 10% 7%);--a:hsl(39 88% 61%);--b:#dfc9a0;--accent:hsl(39 88% 61%);--primary:hsl(39 88% 61%)}
body{background:hsl(210 15% 5%);color:#fff}.topbar{background:#0e1114}.brand{color:#f3b844;font-size:24px}.deck{--accent:#f3b844!important;background:linear-gradient(145deg,#191b1e,#101214);border-top-color:#f3b844}.deck[data-deck="1"]{--accent:#dfc9a0!important;border-top-color:#dfc9a0}.next-guide,.primary-button{background:#f3b844;color:#211600;border-radius:9px;padding:10px 14px;font-weight:650}.next-guide{min-height:40px}.topactions{gap:8px}.guide-copy{font-size:16px;line-height:1.7;color:#c7c9cc;margin:22px 0}.preview-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 0;color:#aaa;font-size:11px}.preview-bar button,.preview-track{border:1px solid #515151;border-radius:7px;min-height:40px;padding:6px 10px;color:#f3b844}.preview-track{min-width:36px}.track-actions{gap:4px}.library-tabs button.active{color:#f3b844;border-color:#f3b844}.track-readiness.ready{color:#eac17b}
input[type=range]:not(#crossfader){writing-mode:vertical-lr;direction:rtl;appearance:auto!important;-webkit-appearance:auto!important;width:34px!important;height:110px!important;accent-color:#f3b844;touch-action:none}
.tempo-controls{justify-content:center;gap:12px}.eqs{display:flex;justify-content:space-around}.eq-control{display:flex;flex-direction:column;align-items:center;gap:8px}.master{display:flex!important;flex-direction:column;align-items:center;gap:5px}.master>div:first-child{display:flex;gap:8px}.mixer{grid-template-columns:1fr 2fr 65px}.master input{height:90px!important}.master .meter{width:55px}.brand-label{color:#a49b8b}.track-identity{min-width:0}
@media(max-width:700px){.brand{font-size:20px}.topbar{padding:0 13px}.record-button{padding:0 8px}.next-guide{padding:8px;font-size:11px}.tempo-controls{display:flex}.tempo-slider{height:75px!important}.mixer{grid-template-columns:1fr 65px}.crossfader-wrap{grid-column:1}.mix-mode{grid-column:1}.master{grid-column:2;grid-row:1/3}.platter-stage{max-width:138px}.deck{padding-left:9px;padding-right:9px}.track-actions{flex-wrap:wrap}.preview-track{width:100%;min-height:34px}.track-row{padding-top:10px;padding-bottom:10px}}
@media(min-width:640px) and (max-height:550px){.tempo-controls{position:absolute;right:5px;top:42px;width:34px;flex-direction:column}.tempo-controls input{height:90px!important}.deck{position:relative;padding-right:45px}.master input{height:45px!important}.mixer{grid-template-columns:160px 1fr 85px}.master{grid-column:auto;grid-row:auto}.platter-stage{max-width:120px}}
@media(max-width:700px){input.tempo-slider[type=range]{height:62px!important}.platter-stage{max-width:125px}.master input#master{height:72px!important}.mixer{padding-bottom:9px}.brand-label{display:none}}
@media(max-width:700px){body #decks input.tempo-slider[type=range]{height:62px!important}}
@media(min-width:640px) and (max-height:550px){body #decks input.tempo-slider[type=range]{height:70px!important}}
.next-guide{background:transparent;color:#e9bd68;border:1px solid #5b4930;min-height:32px;padding:5px 9px;font-size:11px;font-weight:500;border-radius:7px}.guide-copy{font-size:14px;line-height:1.6;margin:14px 0}.deck{box-shadow:none;background:#111417}.topbar{border-bottom:1px solid #ffffff12}.fader-scale{position:relative;display:flex;align-items:center;flex-direction:column;width:50px;flex:none}.fader-scale input{margin:0!important}.fader-neutral{position:absolute;left:3px;right:3px;top:calc(8px + (100% - 38px) * (1 - var(--neutral)));border-top:2px solid #f1bf63;pointer-events:none;z-index:2}.fader-reset{min-height:23px;padding:2px 3px;color:#e3c58c;font-size:9px;white-space:nowrap}.fader-scale.horizontal{width:100%;display:block}.horizontal .fader-neutral{left:50%;right:auto;top:6px;height:20px;border-top:0;border-left:1px solid #f1bf63}.horizontal .fader-reset{display:none}.filter-legend{font-size:8px;color:#bba77c;white-space:nowrap}.eq-control{gap:3px}.dj-faq details{border-bottom:1px solid #ffffff18;padding:12px 0}.dj-faq summary{cursor:pointer;color:#e9c782;font-size:14px}.dj-faq p{font-size:13px;line-height:1.6;color:#bfc3c7}.dj-faq a,.faq-link{color:#e6b85d;font-size:12px}.faq-link{min-height:40px}.library-footer{flex-wrap:wrap;gap:12px}
@media(max-width:700px){body #decks input.tempo-slider[type=range]{height:48px!important}.tempo-controls{gap:6px}.tempo-controls>.rate-label{display:none}.master input#master{height:57px!important}.master{gap:0}.master>div:first-child output{display:none}.platter-stage{max-width:120px}.eqs{gap:1px}.eq-control{min-width:0}.eq-control .fader-scale{width:30px}.eq-control input[type=range]{width:25px!important}.fader-neutral{left:0;right:0}}
/* Automix is the primary task, before the manual decks in document order. */
.automix-hero{border:1px solid #775c2b;border-radius:14px;background:linear-gradient(115deg,#282217,#131619 75%);padding:17px 19px;margin-bottom:18px}.hero-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.hero-heading h1{font-size:24px;letter-spacing:-.7px;margin:4px 0 12px}.hero-heading .eyebrow{font-size:9px;letter-spacing:1.8px;color:#e9bc66}.hero-heading>button{color:#e1c18b;font-size:11px;border:1px solid #635032;border-radius:7px;min-height:38px;padding:6px 10px}.automix-hero .mix-mode{display:block;min-width:0}.automix-hero .mix-mode>.small-label{display:none}.automix-hero .transition-actions{display:flex;gap:9px;margin:0}.automix-hero .transition-button{background:#f2b747;color:#241903;font-size:15px;font-weight:700;min-height:48px;flex:1;border:0;border-radius:8px}.automix-hero .transition-button.active{background:#ead4aa}.automix-hero select{width:85px;max-width:none;min-height:48px;font-size:12px}.automix-hero .automix-line{position:static;margin-top:5px;justify-content:flex-start;font-size:10px;min-height:23px}.automix-hero .automix-line>span{flex:1}.automix-hero .automix-line button{min-height:28px;min-width:28px}.automix-hero #mix-readiness{margin:0;font-size:10px;color:#cfbd99}.studio-heading h2{font-size:12px;font-weight:400;color:#aeb3b9;margin:0}.mixer{grid-template-columns:1fr 65px}.mixer .crossfader-wrap{grid-column:1;grid-row:1}.mixer .master{grid-column:2;grid-row:1}.studio-heading{display:none}
@media(max-width:700px){main{padding-top:10px}.automix-hero{padding:12px;margin-bottom:12px}.hero-heading h1{font-size:20px;margin-bottom:9px}.hero-heading>button{font-size:9px;padding:5px;min-height:34px}.automix-hero .transition-button{font-size:14px}.automix-hero select{font-size:11px}.jog-mode-bar{margin-bottom:10px}.platter-stage{max-width:105px}.mixer{padding:9px 12px}.mixer .master{grid-row:1}.mixer .crossfader-wrap{grid-row:1}.deck{padding-top:9px}.deck-top{gap:5px}}
@media(min-width:640px) and (max-height:550px){.automix-hero{padding:8px 12px;display:grid;grid-template-columns:1fr 1fr;gap:3px 18px;margin-bottom:8px}.hero-heading h1{font-size:19px;margin:2px 0}.hero-heading>button{min-height:30px}.automix-hero .transition-button,.automix-hero select{min-height:38px}.automix-hero #mix-readiness{grid-column:1/3}.mixer{grid-template-columns:1fr 85px}}
@media(max-width:700px){.hero-heading{align-items:flex-start}.hero-heading h1{font-size:18px;max-width:215px}.hero-heading>button{max-width:86px;flex-shrink:0}}
.cue-focus-note{border:1px solid #8f6b33;border-radius:9px;padding:12px;background:#302516;color:#f2ce8b;margin:12px 0}.cue-focus-note p{font-size:13px;line-height:1.5;margin:6px 0 0;color:#d2c4ad}.grid-audition button{min-height:48px}#modal-content>.secondary-button.modal-full{margin-top:12px}
#modal .modal-head{position:sticky;top:0;background:#182128;z-index:4;padding-bottom:10px}#tempo-form .grid-audition{margin:8px 0}#tempo-form .modal-note{font-size:11px;line-height:1.5}.cue-focus-note{padding:10px}
.safety-ceiling{font-size:8px;line-height:1.3;color:#dcc18d;white-space:nowrap;margin:3px 0}

.automix-hero .transition-start {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: #cfbd99;
  font-size: 12px;
}
.automix-hero .transition-start select {
  width: auto;
  min-height: 36px;
}

#transition-marker {
  color: #e1c18b;
  border: 1px solid #635032;
  border-radius: 7px;
  min-height: 38px;
  margin-top: 6px;
  padding: 6px 10px;
}
#transition-marker:disabled { opacity: .5; }
#transition-marker[aria-pressed="true"] { background: #46351a; }
.transition-point {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #f2b747;
  box-shadow: 0 0 5px #16110a;
  pointer-events: none;
}

.automix-hero {
  padding: 6px 8px;
  margin-bottom: 6px;
}
.automix-hero .hero-heading, .automix-hero #mix-readiness { display: none; }
#mix-settings:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding-top: 6px;
}
#mix-settings select { width: auto; min-height: 38px; }
.automix-hero .transition-start, #transition-marker { margin: 0; }
#mix-options, #mix-lock {
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid #635032;
  border-radius: 8px;
  color: #e1c18b;
}
#mix-options { font-size: 20px; }
#mix-lock[aria-pressed="true"] { background: #e1c18b; color: #21170a; }
.nudge-buttons { display: none; }
body[data-jog-mode="nudge"] .nudge-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(44px, 1fr));
  gap: 6px;
  margin-top: 4px;
}
.nudge-buttons button {
  min-height: 44px;
  font-size: 22px;
  touch-action: manipulation;
  border: 1px solid #49514d;
  border-radius: 8px;
  background: #202a27;
}
.nudge-buttons button:active { background: #b8e78b; color: #101812; }
.nudge-buttons button:disabled { opacity: .4; }

@media (orientation: landscape) and (min-width: 560px) and (max-height: 550px) {
  html.mix-locked, .mix-locked body {
    overflow: hidden;
    overscroll-behavior: none;
  }
  .mix-locked body { padding-bottom: 0; }
  .mix-locked main {
    padding: max(4px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(4px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }
  .mix-locked .topbar, .mix-locked .mobile-nav, .mix-locked .footer,
  .mix-locked .deck-tools, .mix-locked .tempo-controls,
  .mix-locked .wave-times, .mix-locked .jog-feedback,
  .mix-locked .jog-modes button span, .mix-locked .wheel-help {
    display: none;
  }
  .mix-locked #studio:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(100px, 17vw, 154px) minmax(0, 1fr);
    gap: 5px 7px;
    touch-action: none;
  }
  .mix-locked .automix-hero {
    grid-column: 1 / -1;
    display: flex;
    margin: 0;
    padding: 3px 5px;
  }
  .mix-locked .automix-hero .mix-mode {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 8px;
  }
  .mix-locked .automix-hero .transition-button {
    min-height: 44px;
    font-size: 13px;
  }
  .mix-locked .automix-hero .automix-line { margin: 0; flex: 1; min-width: 0; }
  .mix-locked .jog-mode-bar { grid-column: 1 / -1; margin: 0; }
  .mix-locked .jog-modes button { min-height: 32px; }
  .mix-locked #decks { display: contents; }
  .mix-locked .deck {
    grid-row: 3;
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    align-content: start;
    column-gap: 6px;
    padding: 5px;
    min-width: 0;
  }
  .mix-locked .deck[data-deck="0"] { grid-column: 1; }
  .mix-locked .deck[data-deck="1"] { grid-column: 3; }
  .mix-locked .deck-top { grid-column: 1 / -1; min-width: 0; }
  .mix-locked .waveform-wrap { grid-area: 2 / 2; height: 22px; margin-top: 3px; }
  .mix-locked .platter-stage {
    grid-area: 2 / 1 / 5 / 2;
    align-self: center;
    width: 100%;
    max-width: clamp(66px, 31dvh, 124px);
    margin: 0 auto;
  }
  .mix-locked .deck-performance { grid-area: 3 / 2; margin-top: 3px; gap: 3px; }
  .mix-locked .grid-status { grid-area: 4 / 2; margin-top: 3px; }
  .mix-locked .transport { gap: 3px; }
  .mix-locked .transport button { height: 44px; min-width: 0; }
  .mix-locked .transport .play { width: 44px; min-width: 44px; flex-basis: 44px; }
  .mix-locked .mixer {
    grid-area: 3 / 2;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin: 0;
    padding: 5px;
    min-width: 0;
  }
  .mix-locked .mixer .crossfader-wrap { order: 0; min-width: 0; }
  .mix-locked .crossfader-wrap input { width: 100%; height: 48px; display: block; }
  .mix-locked .fader-labels { gap: 2px; }
  .mix-locked #cross-label { display: none; }
  .mix-locked .mixer .master { order: 1; display: flex; align-items: center; }
  .mix-locked .master input#master { height: 46px !important; }
}
.transport .sync.sync-ready {
  border-color: var(--accent);
  color: var(--accent);
}

.mix-locked .waveform-wrap canvas { cursor: default; }

@media (orientation: landscape) and (min-width: 560px) and (max-height: 550px) {
  .mix-locked #studio:not([hidden]) {
    position: fixed;
    inset: var(--mix-top, 0px) 0 auto;
    z-index: 5;
    box-sizing: border-box;
    height: var(--mix-height, 100dvh);
    padding: max(2px, env(safe-area-inset-top))
      max(6px, env(safe-area-inset-right))
      max(2px, env(safe-area-inset-bottom))
      max(6px, env(safe-area-inset-left));
    background: #101113;
    grid-template-rows: auto auto minmax(min-content, 1fr);
    overflow: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  .mix-locked .short-mix .automix-hero .automix-line { max-width: 42%; }
  .mix-locked .short-mix .deck-top p,
  .mix-locked .short-mix .key-label,
  .mix-locked .short-mix .bpm-caption { display: none; }
  .mix-locked .short-mix .platter-stage { max-width: 90px; }
  .mix-locked .short-mix .nudge-buttons { gap: 2px; }
  .mix-locked .short-mix .waveform-wrap { height: 18px; }
  .mix-locked .short-mix .grid-status { min-height: 23px; }
  .mix-locked .short-mix .deck-performance { gap: 2px; }
  .mix-locked .short-mix .mixer { gap: 2px; }
}

#automix-test { min-height: 44px; padding: 0 10px; border: 1px solid #635032; border-radius: 7px; color: #e1c18b; }

#mix-series-status { margin: 4px 4px 0; color: #e1c18b; font-size: 11px; }
.mix-locked #mix-series-status { display: none; }

#window-test, #window-test-dnb, #window-mix, .track-cues {
  min-height: 44px;
  padding: 4px 8px;
  border: 1px solid #635032;
  border-radius: 7px;
  color: #e1c18b;
}
.track-identity .track-cues { flex: none; font-size: 10px; }
.cue-preview-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 4px 0;
}

.cue-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 8px;
}
.cue-pad {
  min-height: 52px;
  padding: 8px;
  color: #f9f8f5;
  background: color-mix(in srgb, var(--cue-color, #a88ee8) 24%, #16191d);
  border: 1px solid var(--cue-color, #a88ee8);
  border-radius: 8px;
  text-align: left;
}
.cue-pad[data-cue="mix_in"] { --cue-color: #a4d875; }
.cue-pad[data-cue="mix_out"] { --cue-color: #efab62; }
.cue-pad[data-cue="breakdown"] { --cue-color: #8cc4f5; }
.cue-pad[data-cue="drop"] { --cue-color: #f898a5; }
.cue-pad[data-cue="vocal"] { --cue-color: #c4a4f5; }
.cue-pad[aria-pressed="true"] { outline: 2px solid var(--cue-color); }
