/* Flat website layout: playlist panel + controls panel. */
body {
  padding: 0;
  background: #0b0d0f;
}

.discovery-machine {
  width: 100vw;
  height: 100vh;
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: 0;
  background: #0b0d0f;
  box-shadow: none;
}

.machine-header,
.song-deck,
.board-panel,
.command-row > button,
.quick-folders,
.scan-console {
  border-color: #2b3035;
  background: #121519;
  box-shadow: none;
}

.machine-header {
  grid-template-columns: minmax(210px, 22vw) minmax(0, 1fr) 112px;
  align-items: center;
  border-width: 0 0 1px;
  border-radius: 0;
}

.machine-brand {
  height: 100%;
  padding: 0 18px;
}

.machine-brand strong {
  font-size: 18px;
}

.now-display {
  display: block;
  padding: 0 18px;
  background: #08090a;
  text-align: center;
}

.now-display h1 {
  margin: 0;
  overflow: hidden;
  font: 700 clamp(16px, 1.35vw, 23px)/1.1 "Courier New", monospace;
  letter-spacing: .06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-count {
  display: grid;
  place-items: center;
  align-self: stretch;
  color: var(--orange);
  border-left: 1px solid #2b3035;
  font: 800 18px/1 "Courier New", monospace;
}

.machine-body {
  grid-template-columns: minmax(210px, 22vw) minmax(0, 1fr);
  gap: 0;
}

.song-deck {
  padding: 8px 7px;
  border-width: 0 1px 0 0;
  border-radius: 0;
}

.control-board {
  grid-template-rows: 132px 48px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  background: #0b0d0f;
}

.playback-strip,
.discovery-mode.active,
.discovery-controls,
.command-row {
  gap: 8px;
}

.board-panel,
.command-row > button,
.quick-folders {
  border-radius: 6px;
}

.playback-strip {
  grid-template-columns: minmax(150px, 190px) minmax(280px, 1fr) minmax(180px, 23%);
  padding: 9px;
}

.mini-screen,
.scan-readout {
  border-radius: 4px;
}

.scan-readout { gap: 7px; padding: 10px 12px; }

.transport-controls button,
.transport-controls .main-play {
  width: 58px;
  height: 38px;
  border-radius: 5px;
  background: #1b1f23;
  box-shadow: none;
}

.transport-controls .main-play { width: 76px; }

.song-progress::-webkit-slider-thumb {
  width: 14px;
  height: 20px;
  margin-top: -7px;
  border-radius: 3px;
  box-shadow: none;
}

.discovery-mode.active {
  grid-template-rows: 144px 76px;
  align-content: start;
}

.discovery-controls {
  grid-template-columns: 140px minmax(430px, 550px) minmax(350px, 440px) 140px;
  justify-content: start;
}

.control-module { padding: 10px; }

.control-module header span {
  width: auto;
  height: auto;
  padding: 0;
  color: var(--orange);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 8px;
}

.setting-options {
  justify-items: start;
  gap: 7px;
  padding: 8px 0 5px;
}

.setting-button,
.setting-button.active {
  width: 82px;
  height: 64px;
  aspect-ratio: auto;
  padding: 0;
  border-radius: 5px;
  background: #1b1f23;
  box-shadow: none;
  text-shadow: none;
}

.setting-button::before,
.setting-button.active::before { content: none; }

.setting-button.active {
  color: #111;
  border-color: #ffad54;
  background: var(--orange);
}

.setting-button:hover { transform: none; }

.mode-toggle,
.mode-toggle.active {
  display: grid;
  grid-template-columns: auto 1fr;
  place-items: center;
  gap: 8px;
  width: 112px;
  height: 54px;
  margin: auto;
  border-radius: 5px;
  background: #1b1f23;
  box-shadow: none;
}

.mode-toggle.active {
  color: #111;
  border-color: #ffad54;
  background: var(--orange);
}

.mode-toggle::after,
.mode-toggle.active::after { content: none; }

.mode-toggle span,
.mode-toggle.active span {
  color: inherit;
  font-size: 16px;
}

.switch-control,
.switch-control.active {
  display: grid;
  place-items: center;
  width: 112px;
  height: 54px;
  margin: auto;
  padding: 0;
  border-radius: 5px;
  background: #1b1f23;
  box-shadow: none;
}

.switch-control span { display: none; }

.switch-control.active {
  color: #111;
  border-color: #ffad54;
  background: var(--orange);
}

.switch-control.active strong { transform: none; }

.command-row {
  display: flex;
  justify-content: flex-start;
}

.command-row > button {
  width: 210px;
  flex: 0 0 210px;
  grid-template-columns: 34px 1fr;
  padding: 8px 12px;
  border-radius: 5px;
  background: #171b1f;
}

.command-row .start-scan { width: 230px; flex-basis: 230px; }
.command-row .command-button:last-child { width: 230px; flex-basis: 230px; }

.command-row > button::after { content: none; }

.command-row > button:hover {
  transform: none;
  background: #20252a;
}

.command-row .start-scan {
  color: #111;
  border-color: #ffad54;
  background: var(--orange);
}

.quick-folders { padding: 9px 10px 10px; }

.discovery-mode > .quick-folders { display: none; }

.quick-folder-buttons {
  grid-template-rows: repeat(2, 42px);
  gap: 6px;
}

.quick-folder,
.quick-folder-slot {
  border-radius: 5px;
  background: #181c20;
  box-shadow: none;
}

.scan-console {
  border-width: 1px 0 0;
  border-radius: 0;
}

.scan-step,
.scan-step.heard,
.scan-step.saved {
  border-radius: 3px;
  background: #1b1f23;
  box-shadow: none;
}

.scan-step.heard { background: #4a3c12; }
.scan-step.saved { background: #143824; }

.workspace-switch button,
#manageQuickFolders,
#addSkipRange,
.remove-skip,
.rule-toggle,
.repeat-option,
.quick-folder,
.quick-folder-slot,
.folder-choice,
.close-dialog {
  border-radius: 5px;
  box-shadow: none;
}

.song-list-heading,
.song-row .song-number,
.song-row .song-title {
  font-size: 8px;
}

.song-row .song-title { font-size: 9px; }

.song-list-heading span:last-child,
.song-row .song-views {
  font-size: 9px;
}

.rule-toggle span { display: none; }

.rule-toggle,
.rule-toggle.active {
  justify-content: center;
  padding: 0 12px;
}

.rule-toggle.active strong { transform: none; }

@media (max-width: 1200px), (max-height: 760px) {
  body { padding: 0; }
  .discovery-machine { width: 100vw; height: 100vh; padding: 0; border-radius: 0; }
  .control-board { padding: 6px; }
  .discovery-controls { grid-template-columns: 120px minmax(360px, 1fr) minmax(290px, .8fr) 120px; }
  .setting-button { width: 68px; height: 58px; }
}

/* V15 — cohesive professional right-side control console */
.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 6px 8px 6px 16px;
}

.panel-toolbar > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.panel-toolbar > div:first-child strong {
  color: #e7e8e6;
  font: 700 11px/1 "Arial", sans-serif;
  letter-spacing: .035em;
}

.panel-toolbar > div:first-child span {
  color: #747a80;
  font: 700 7px/1 "Courier New", monospace;
  letter-spacing: .08em;
}

.panel-toolbar .workspace-switch {
  display: grid;
  grid-template-columns: 108px 120px;
  gap: 3px;
  padding: 0;
}

.panel-toolbar .workspace-switch button {
  position: relative;
  height: 34px;
  color: #8e9499;
  background: transparent;
  border: 0;
  border-radius: 3px;
  font: 700 8px/1 "Courier New", monospace;
}

.panel-toolbar .workspace-switch button:hover {
  color: #d7d9da;
  background: #191d21;
}

.panel-toolbar .workspace-switch button.active {
  color: var(--orange);
  background: #191d21;
  box-shadow: inset 0 -2px var(--orange);
}

.discovery-mode.active {
  display: block;
  min-height: 0;
}

.discovery-console {
  width: 100%;
  overflow: hidden;
  padding: 0;
}

.control-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: center;
  min-height: 82px;
  padding: 10px 16px;
  border-bottom: 1px solid #2b3035;
}

.row-label {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.row-label > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--orange);
  background: #0c0e10;
  border: 1px solid #363b40;
  border-radius: 4px;
  font: 700 7px/1 "Courier New", monospace;
}

.now-display {
  background: transparent;
}

.discovery-console .command-row .start-scan > span {
  color: #ffffff !important;
}

/* V17 — full-height, balanced right-panel composition */
.control-board {
  grid-template-rows: minmax(250px, 42%) minmax(0, 1fr);
  min-height: 0;
}

.playback-strip {
  grid-template-columns: minmax(340px, 440px) minmax(0, 1fr);
  align-items: center;
  min-height: 0;
  padding: 18px;
}

.mini-screen {
  width: 100%;
  aspect-ratio: 16 / 9;
  align-self: center;
}

.transport-bank {
  align-self: stretch;
  align-content: center;
  padding: 22px 34px;
}

.transport-controls {
  margin-top: 12px;
}

.discovery-mode.active {
  min-height: 0;
}

.discovery-console {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  height: 100%;
  min-height: 0;
}

.control-row {
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  min-height: 0;
  padding: 20px 22px;
  border-bottom: 1px solid #2b3035;
}

.control-row:nth-child(odd) {
  border-right: 1px solid #2b3035;
}

.row-label {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.row-label > span {
  padding-top: 2px;
}

.row-label strong {
  font-size: 12px;
}

.row-label small {
  margin-top: 1px;
  font-size: 8px;
}

.control-row .setting-options,
.behavior-options {
  align-self: center;
  justify-content: center;
  width: 100%;
}

.control-row .setting-options {
  gap: 10px;
}

.control-row .setting-button,
.control-row .setting-button.active {
  width: 84px;
  height: 62px;
  flex-basis: 84px;
  font-size: 19px;
}

.behavior-options {
  gap: 10px;
}

.behavior-options .mode-toggle,
.behavior-options .mode-toggle.active,
.behavior-options .switch-control,
.behavior-options .switch-control.active {
  width: 190px;
  height: 54px;
}

.discovery-console .command-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 184px));
  align-content: center;
  justify-content: center;
  gap: 10px;
  min-height: 0;
  padding: 20px 22px;
  border-bottom: 1px solid #2b3035;
  background: #0f1215;
}

.discovery-console .command-row > button,
.discovery-console .command-row .start-scan,
.discovery-console .command-row .command-button:last-child {
  width: 100%;
  height: 62px;
  flex-basis: auto;
}

@media (max-width: 1250px) {
  .control-board { grid-template-rows: minmax(220px, 38%) minmax(0, 1fr); }
  .playback-strip { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); }
  .control-row { padding: 14px 16px; }
  .control-row .setting-button,
  .control-row .setting-button.active { width: 68px; height: 56px; flex-basis: 68px; }
  .behavior-options .mode-toggle,
  .behavior-options .mode-toggle.active,
  .behavior-options .switch-control,
  .behavior-options .switch-control.active { width: 160px; }
  .discovery-console .command-row { grid-template-columns: repeat(3, minmax(0, 150px)); padding: 14px 16px; }
}

.row-label > div {
  display: grid;
  gap: 5px;
}

.row-label strong {
  color: #dfe1e1;
  font: 700 10px/1 "Arial", sans-serif;
  letter-spacing: .025em;
}

.row-label small {
  color: #686e74;
  font: 700 7px/1 "Courier New", monospace;
  letter-spacing: .05em;
}

.control-row .setting-options {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
}

.control-row .setting-button,
.control-row .setting-button.active {
  width: 76px;
  height: 52px;
  flex: 0 0 76px;
  border-radius: 4px;
  font-size: 17px;
}

.control-row .setting-button {
  color: #c9cccf;
  background: #1a1e22;
  border-color: #3a4046;
}

.control-row .setting-button:hover {
  color: #fff;
  border-color: #697078;
  background: #22272c;
}

.control-row .setting-button.active {
  color: #111;
  border-color: #ffab59;
  background: var(--orange);
}

.behavior-options {
  display: flex;
  align-items: center;
  gap: 8px;
}

.behavior-options .mode-toggle,
.behavior-options .mode-toggle.active,
.behavior-options .switch-control,
.behavior-options .switch-control.active {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  width: 184px;
  height: 48px;
  margin: 0;
  padding: 0 14px;
  color: #b9bdc0;
  background: #1a1e22;
  border: 1px solid #3a4046;
  border-radius: 4px;
  box-shadow: none;
}

.behavior-options .mode-toggle span,
.behavior-options .switch-control span {
  display: block;
  width: auto;
  height: auto;
  color: inherit;
  background: transparent;
  border-radius: 0;
  font: 700 9px/1 "Arial", sans-serif;
  text-align: left;
  transform: none;
}

.behavior-options .switch-control.active span {
  background: transparent;
  transform: none;
}

.behavior-options .mode-toggle strong,
.behavior-options .switch-control strong {
  color: #777d83;
  font: 700 8px/1 "Courier New", monospace;
  transform: none;
}

.behavior-options .mode-toggle.active,
.behavior-options .switch-control.active {
  color: #f3f3f0;
  background: #24201c;
  border-color: #92501c;
}

.behavior-options .mode-toggle.active strong,
.behavior-options .switch-control.active strong {
  color: var(--orange);
}

.discovery-console .command-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 14px 206px;
  background: #0f1215;
}

.discovery-console .command-row > button,
.discovery-console .command-row .start-scan,
.discovery-console .command-row .command-button:last-child {
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  width: 184px;
  height: 58px;
  flex: 0 0 184px;
  padding: 9px 12px;
  border-radius: 4px;
}

.discovery-console .command-row .start-scan {
  color: #111;
  background: var(--orange);
  border-color: #ffad5c;
}

.discovery-console .command-row .command-button {
  color: #d9dbdc;
  background: #1a1e22;
  border-color: #3a4046;
}

.discovery-console .command-row .command-button:hover {
  background: #22272c;
  border-color: #697078;
}

@media (max-width: 1250px) {
  .control-row { grid-template-columns: 165px minmax(0, 1fr); }
  .discovery-console .command-row { padding-left: 181px; }
  .control-row .setting-button,
  .control-row .setting-button.active { width: 68px; flex-basis: 68px; }
}

/* V16 — remove redundant status and mode toolbar */
.scan-readout,
.panel-toolbar {
  display: none;
}

.control-board {
  grid-template-rows: 132px minmax(0, 1fr);
}

.playback-strip {
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
}

.discovery-console .command-row > button,
.discovery-console .command-row .start-scan,
.discovery-console .command-row .command-button:last-child {
  grid-template-columns: 30px 1fr;
  grid-template-rows: 1fr;
  column-gap: 14px;
}

.discovery-console .command-row button > span {
  grid-row: 1;
}

.discovery-console .command-row button > small {
  display: none;
}

.control-row .setting-button small {
  font-size: 8px;
}

.control-row .setting-button.active small {
  color: var(--orange);
  font-size: 9px;
  font-weight: 900;
}

.control-row .setting-button.active {
  color: #f3f3f0;
  background: #24201c;
  border-color: #92501c;
}

.discovery-console .command-row .start-scan {
  color: #f3f3f0;
  background: #24201c;
  border-color: #92501c;
}

.discovery-console .command-row .start-scan > span,
.discovery-console .command-row .start-scan > strong {
  color: var(--orange);
}

.row-label > span {
  width: 20px;
  height: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
}
