:root {
  color-scheme: dark;
  --bg: oklch(13% 0.015 28); /* Velvet brown-black background */
  --surface: oklch(18% 0.02 28); /* Sleek card surface */
  --surface-strong: oklch(23% 0.025 28); /* High contrast inputs/panels */
  --ink: oklch(92% 0.01 28); /* Warm light gray text */
  --muted: oklch(64% 0.015 28); /* Muted subtitle text */
  --line: oklch(26% 0.02 28); /* Divider lines */
  --accent: oklch(46% 0.17 22); /* Elegant Crimson Red */
  --accent-ink: oklch(98% 0.005 28); /* High contrast white */
  --gold: oklch(76% 0.11 72); /* Vintage Antique Gold */
  --gold-dark: oklch(42% 0.06 72); /* Muted gold border/shadow */
  --focus: oklch(62% 0.13 72); /* Glowing gold focus ring */
  --danger: oklch(50% 0.18 24); /* Deep danger red */
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dark);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  min-height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

button:hover:not(:disabled) {
  border-color: var(--gold);
  background: var(--surface-strong);
  color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid color-mix(in oklch, var(--focus), transparent 75%);
  outline-offset: 2px;
}

button:disabled {
  color: color-mix(in oklch, var(--muted), transparent 45%);
  border-color: var(--line);
  background: color-mix(in oklch, var(--surface), transparent 30%);
  cursor: not-allowed;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 0 13px;
  transition: all 180ms ease;
}

input:focus,
select:focus {
  border-color: var(--gold);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--gold);
}

/* Header & Typography */
.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(18px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklch, var(--surface), transparent 10%);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--gold-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  object-fit: cover;
  background: var(--bg);
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--gold);
  font-family: 'Cinzel', Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0.02em;
}

h1 {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

h2 {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--gold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Mode Switch */
.mode-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  background: var(--surface-strong);
}

.mode-switch button {
  min-height: 34px;
  border: 0;
  background: transparent;
  padding: 0 14px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
}

.mode-switch button:hover:not(:disabled) {
  color: var(--ink);
  border-color: transparent;
  transform: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.05);
}

.mode-switch .is-active {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.mode-switch .is-active:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

/* Workspace Layout */
.workspace {
  height: calc(100svh - 76px);
  min-height: 600px;
  display: grid;
  grid-template-columns: minmax(310px, 380px) minmax(410px, 1fr) minmax(340px, 440px);
  gap: 0;
  overflow: hidden;
  background: var(--bg);
}

.search-pane,
.player-pane,
.set-pane {
  min-width: 0;
  padding: 24px;
  overflow-y: auto;
  overflow-x: hidden;
}

.search-pane,
.player-pane {
  border-right: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.text-button {
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.text-button:hover:not(:disabled) {
  color: var(--gold);
  background: transparent;
  transform: none;
  box-shadow: none;
}

/* Forms & Action Buttons */
.search-form,
.manual-play {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.search-form button,
.manual-play button,
.result-row .play,
.result-row .add,
#build-set {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.search-form button:hover:not(:disabled),
.manual-play button:hover:not(:disabled),
.result-row .play:hover:not(:disabled),
.result-row .add:hover:not(:disabled),
#build-set:hover:not(:disabled) {
  background: color-mix(in oklch, var(--accent), white 8%);
  border-color: color-mix(in oklch, var(--accent), white 8%);
  color: var(--accent-ink);
  box-shadow: 0 4px 14px rgba(180, 40, 40, 0.4);
}

.quick-search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 20px;
}

.quick-search button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--muted);
  border-color: var(--line);
  background: color-mix(in oklch, var(--surface), transparent 30%);
}

.quick-search button:hover {
  color: var(--gold);
  border-color: var(--gold-dark);
  background: var(--surface);
}

.source-panel {
  display: none;
}

.source-panel.is-active {
  display: block;
}

.upload-drop {
  min-height: 168px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 26px 18px;
  border: 1px dashed var(--gold-dark);
  border-radius: 8px;
  background: color-mix(in oklch, var(--surface), transparent 35%);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}

.upload-drop:hover,
.upload-drop.is-dragover {
  border-color: var(--gold);
  background: var(--surface);
}

.upload-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-drop strong {
  color: var(--gold);
  font-size: 16px;
}

.upload-drop span,
.upload-status {
  font-size: 12px;
}

.upload-status {
  min-height: 22px;
  margin-top: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* Results & Queue lists */
.results,
.queue,
.set-board {
  display: grid;
  gap: 12px;
}

.empty-state {
  display: grid;
  gap: 6px;
  color: var(--muted);
  padding: 24px 0;
  text-align: center;
  background: color-mix(in oklch, var(--surface), transparent 60%);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.empty-state strong {
  color: var(--gold);
  font-size: 14px;
}

.empty-state span {
  font-size: 12px;
}

.result-row,
.queue-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: all 200ms ease;
}

.result-row:hover,
.queue-row:hover {
  border-color: var(--gold-dark);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

.thumb {
  width: 84px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.result-main,
.queue-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.result-title,
.queue-title {
  display: block;
  border: 0;
  padding: 0;
  min-height: auto;
  width: 100%;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  text-align: left;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.25;
  transition: color 150ms ease;
}

.result-title:hover,
.queue-title:hover {
  color: var(--gold);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  column-gap: 12px;
  row-gap: 4px;
  color: var(--muted);
  font-size: 11px;
}

.meta span {
  white-space: nowrap;
}

.info-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface-strong);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.chip.genre {
  color: var(--gold);
  border-color: var(--gold-dark);
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
}

.chip.good {
  color: oklch(75% 0.12 140); /* Soft green-ish */
  border-color: oklch(35% 0.08 140);
  background: rgba(40, 80, 40, 0.1);
}

.chip.warn {
  color: var(--danger);
  border-color: color-mix(in oklch, var(--danger), transparent 45%);
  background: rgba(80, 30, 30, 0.1);
}

.chip.check {
  color: oklch(75% 0.08 76); /* Yellow-orange check state */
  border-color: oklch(42% 0.08 76);
  background: rgba(80, 60, 30, 0.1);
}

.result-actions,
.queue-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.result-row .play,
.result-row .add,
.queue-actions button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

/* Audio Player Section */
.player-pane {
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  align-content: start;
}

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(34svh, 292px);
  background: oklch(8% 0.015 28);
  border: 2px solid var(--gold-dark);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.player-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.youtube-player {
  width: 100%;
  height: 100%;
}

.audio-player {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.audio-player audio {
  width: min(100%, 520px);
}

.break-player {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px;
}

.break-player strong {
  color: var(--gold);
  font-family: 'Cinzel', Georgia, serif;
  font-size: 22px;
}

.break-player span {
  color: var(--ink);
  font-size: 34px;
  font-weight: 800;
}

.player-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
}

.manual-play {
  margin-top: 14px;
}

.playlist-controls {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--gold-dark), transparent 65%);
}

.playlist-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.playlist-buttons button {
  min-height: 38px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 800;
}

#play-set-list,
#play-queue-list {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.playlist-status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.now-playing {
  margin-top: 20px;
  display: grid;
  gap: 6px;
  padding: 16px;
  background: color-mix(in oklch, var(--surface), transparent 30%);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.now-playing span {
  color: var(--accent);
  font-family: 'Cinzel', Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.now-playing strong {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.now-playing small {
  color: var(--muted);
  font-size: 13px;
}

/* Track Panel Details */
.track-panel {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.track-panel summary {
  color: var(--gold);
  cursor: pointer;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  list-style-position: inside;
  text-transform: uppercase;
}

.track-panel[open] summary {
  margin-bottom: 12px;
}

.track-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.track-info div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px 10px;
  background: var(--surface);
}

.track-info dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.track-info dd {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
  font-size: 14px;
}

/* 4 Hours Set Planner Section */
.set-pane {
  display: grid;
  align-content: start;
}

.pattern {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.pattern span {
  display: grid;
  place-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 800;
  font-size: 14px;
  color: var(--gold);
}

.set-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.primary-action {
  min-height: 48px;
  width: 100%;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 800;
}

.secondary-action {
  min-height: 46px;
  width: 100%;
  border-color: var(--gold-dark);
  background: var(--surface-strong);
  color: var(--gold);
  font-size: 15px;
  font-weight: 800;
}

.secondary-action:hover:not(:disabled) {
  border-color: var(--gold);
  background: color-mix(in oklch, var(--gold), var(--surface-strong) 88%);
  color: var(--ink);
}

.rest-control {
  display: grid;
  grid-template-columns: auto 82px auto;
  gap: 8px;
  align-items: center;
  justify-content: start;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.rest-control input {
  min-height: 34px;
  padding: 0 8px;
  text-align: right;
}

.auto-status {
  min-height: 22px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.is-working {
  color: var(--gold);
}

.set-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  background: var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.set-summary div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px 8px;
  background: var(--surface-strong);
  text-align: center;
}

.set-summary strong {
  font-size: 16px;
  color: var(--gold);
  overflow-wrap: anywhere;
}

.set-summary span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.compact-head {
  margin-top: 14px;
}

.queue {
  list-style: decimal;
  padding-left: 20px;
  margin: 0;
}

.queue-row {
  grid-template-columns: 1fr;
  padding: 14px;
}

.queue-row.is-current {
  border-color: var(--gold);
  background: color-mix(in oklch, var(--gold), var(--surface) 92%);
}

.queue-line {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.queue-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.queue-brief {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.queue-brief span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.brief-good {
  color: oklch(75% 0.12 140);
}

.brief-warn {
  color: var(--danger);
}

.candidate-details {
  margin-top: 2px;
}

.candidate-details summary {
  width: fit-content;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.candidate-details[open] {
  display: grid;
  gap: 8px;
}

.candidate-details[open] summary {
  color: var(--gold);
}

.candidate-edit {
  display: grid;
  grid-template-columns: 95px 1fr;
  gap: 10px;
  margin: 4px 0 6px;
}

.candidate-edit label {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.candidate-edit input,
.candidate-edit select {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
  background: var(--bg);
}

.queue-actions .remove {
  color: var(--danger);
  border-color: transparent;
  background: transparent;
}

.queue-actions .remove:hover {
  background: rgba(180, 40, 40, 0.15);
  color: oklch(65% 0.18 20);
  border-color: rgba(180, 40, 40, 0.3);
}

.set-board {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.set-slot {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 8px;
  transition: all 180ms ease;
}

.set-slot.ready {
  border-left: 4px solid var(--gold);
}

.set-slot.ready:hover {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(190, 150, 80, 0.15);
}

.set-slot.missing {
  border-left: 4px solid var(--danger);
  background: color-mix(in oklch, var(--danger), var(--surface) 93%);
}

.break-slot {
  border-left: 4px solid var(--accent);
  background: color-mix(in oklch, var(--accent), var(--surface) 92%);
}

.slot-head {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
}

.slot-code {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--gold);
  border: 1px solid var(--gold-dark);
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 800;
  font-size: 14px;
}

.slot-head strong {
  font-size: 15px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.slot-head small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.set-slot ol {
  margin: 12px 0 0 42px;
  padding: 0;
  color: var(--ink);
  font-size: 13px;
  display: grid;
  gap: 6px;
}

.set-slot li {
  overflow-wrap: anywhere;
  font-weight: 500;
  list-style-type: decimal;
}

.set-track-button {
  min-height: auto;
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  overflow-wrap: anywhere;
}

.set-track-button:hover:not(:disabled),
.set-track-button.is-current {
  color: var(--gold);
  background: transparent;
  box-shadow: none;
  transform: none;
}

.break-button {
  min-height: 32px;
  margin: 10px 0 0 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.break-button:hover:not(:disabled),
.break-button.is-current {
  color: var(--gold);
  background: transparent;
  box-shadow: none;
  transform: none;
}

.missing-track {
  color: var(--danger);
  font-style: italic;
}

.loading {
  color: var(--gold);
  padding: 24px 0;
  text-align: center;
  font-weight: 600;
  font-family: 'Cinzel', Georgia, serif;
  letter-spacing: 0.05em;
}

/* Mobile Tabs Elements */
.mobile-tabs {
  display: none;
}

/* Responsive Breakpoints */
@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: minmax(290px, 360px) 1fr;
  }

  .set-pane {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .set-board {
    max-height: none;
  }
}

@media (max-width: 760px) {
  .topbar {
    height: auto;
    min-height: 70px;
    align-items: center;
    padding: 14px 16px;
    flex-direction: row;
    gap: 10px;
  }

  .brand-container {
    min-width: 0;
    gap: 8px;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .topbar h1 {
    font-size: 18px;
    line-height: 1;
    white-space: nowrap;
  }

  .eyebrow {
    font-size: 9px;
    line-height: 1.1;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  .mode-switch {
    flex-shrink: 0;
  }

  .mode-switch button {
    min-height: 30px;
    padding: 0 8px;
    font-size: 11px;
  }

  /* Bottom tab navigation setup */
  .mobile-tabs {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--surface-strong);
    border-top: 1px solid var(--line);
    z-index: 1000;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
  }

  .tab-button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    min-height: 100%;
    padding: 4px 0;
    border-radius: 0;
    color: var(--muted);
    gap: 2px;
    transition: all 150ms ease;
  }

  .tab-button:hover:not(:disabled) {
    color: var(--ink);
    background: transparent;
    transform: none;
    box-shadow: none;
  }

  .tab-button.is-active {
    color: var(--gold);
    border-bottom: 2px solid var(--gold);
  }

  .tab-icon {
    font-size: 18px;
  }

  .tab-label {
    font-size: 11px;
    font-weight: 600;
  }

  /* Workspace panel visibility */
  .workspace {
    display: block !important;
    height: calc(100svh - 70px - 64px) !important;
    min-height: auto;
    overflow: hidden;
    position: relative;
  }

  .search-pane,
  .player-pane,
  .set-pane {
    display: none !important;
    height: 100% !important;
    padding: 16px;
    border: 0 !important;
    overflow-y: auto;
    overflow-x: hidden;
  }

  body.show-search .search-pane {
    display: block !important;
  }

  body.show-player .player-pane {
    display: block !important;
  }

  body.show-set .set-pane {
    display: block !important;
  }

  /* Mobile compact overrides */
  .search-form,
  .manual-play {
    grid-template-columns: 1fr;
  }

  .player-pane {
    align-content: start;
  }

  .player-shell {
    height: clamp(140px, 22svh, 180px);
    aspect-ratio: auto;
  }

  .playlist-controls {
    position: sticky;
    top: 0;
    z-index: 20;
    margin-top: 10px;
    padding: 10px;
  }

  .result-row {
    grid-template-columns: 76px 1fr;
    padding: 12px;
  }

  .queue-row {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .playlist-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .playlist-buttons button {
    min-height: 40px;
    font-size: 13px;
  }

  .manual-play {
    margin-top: 10px;
  }

  .thumb {
    width: 76px;
  }

  .track-info,
  .set-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .candidate-edit {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
