:root {
  color-scheme: dark;
  --bg: #0a0c11;
  --bg-2: #0e1116;
  --panel: rgba(22, 27, 34, 0.88);
  --panel-solid: #151a22;
  --panel-2: rgba(255, 255, 255, 0.045);
  --panel-3: rgba(255, 255, 255, 0.075);
  --text: #dfe6ee;
  --text-strong: #eef4fa;
  --muted: #8fa0b3;
  --dim: #5b6a7a;
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.055);
  --gold: #4fc3ff;
  --gold-2: #8fd9ff;
  --green: #1ed760;
  --amber: #f3b951;
  --red: #ff5f57;
  --cyan: #58d6f7;
  --violet: #a995ff;
  --focus: #7fd4ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --inner: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 -1px 0 rgba(0, 0, 0, 0.42);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(79, 195, 255, 0.05), transparent 31%),
    linear-gradient(225deg, rgba(63, 182, 255, 0.03), transparent 28%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 80px),
    linear-gradient(180deg, #0c0f15 0%, #060810 100%);
  color: var(--text);
  font-family: var(--font);
  font-feature-settings: "calt", "kern", "liga", "ss03";
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 68%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  color: var(--text);
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease,
    opacity 150ms ease,
    box-shadow 150ms ease;
}

button:hover {
  transform: translateY(-1px);
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.shell {
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  box-shadow: var(--inner), 0 18px 50px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px) saturate(130%);
}

.topbar h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(1.7rem, 3vw, 2.65rem);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.topbar-right {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: min(330px, 46vw);
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold-2);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 10px;
  color: var(--text-strong);
  font-size: 1rem;
  font-weight: 640;
  letter-spacing: -0.01em;
}

.account,
.status,
.player-status {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.player-status {
  margin: 9px 0 0;
}

.drive-toggle,
.sync-pill,
.icon-button,
.combine-actions button,
.notes-row button,
.detail-link,
.sync-actions button,
.copy-actions button,
.ai-form button,
.ai-result-card a,
.playlist-menu-popover button,
.track-menu-popover button {
  box-shadow: var(--inner);
}

.drive-toggle {
  min-height: 38px;
  border: 1px solid rgba(79, 195, 255, 0.34);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(79, 195, 255, 0.09);
  color: var(--gold-2);
  font-size: 0.78rem;
  font-weight: 850;
}

.drive-toggle[aria-pressed="true"] {
  border-color: rgba(30, 215, 96, 0.62);
  background: var(--green);
  color: #031007;
}

.sync-pill {
  width: fit-content;
  min-height: 32px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(88, 214, 247, 0.25);
  border-radius: 9px;
  background: rgba(88, 214, 247, 0.08);
  color: #def7ff;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  opacity: 0.82;
}

.sync-pill.idle {
  display: none;
}

.sync-pill.queued {
  border-color: rgba(79, 195, 255, 0.42);
  background: rgba(79, 195, 255, 0.1);
  color: #ffe4ad;
}

.sync-pill.cooldown,
.sync-pill.failed {
  border-color: rgba(255, 106, 88, 0.55);
  background: linear-gradient(180deg, rgba(255, 106, 88, 0.13), rgba(35, 14, 13, 0.7));
  color: #ffb6aa;
}

.layout {
  display: grid;
  grid-template-columns: minmax(255px, 330px) minmax(0, 1fr) minmax(240px, 300px);
  gap: 14px;
  align-items: start;
}

.sidebar,
.details-panel,
.queue-panel,
.track-card,
.sync-center,
.ai-builder,
.copy-dialog,
.login-panel {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--inner), var(--shadow);
  backdrop-filter: blur(18px) saturate(130%);
}

.sidebar,
.details-panel {
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 14px;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.pane-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pane-title h2 {
  margin-bottom: 0;
}

.playlist-tools,
.sync-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 800;
}

.icon-button:hover,
.icon-button.active {
  border-color: rgba(79, 195, 255, 0.5);
  background: rgba(79, 195, 255, 0.12);
  color: var(--gold-2);
}

.combine-panel,
.ai-chat {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 10px rgba(0, 0, 0, 0.2);
}

.combine-panel[hidden] {
  display: none;
}

.combine-panel p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.combine-panel input,
.notes-row input,
.reclassify-row select,
.count-control input,
.ai-form textarea,
.copy-target select,
.login-form input {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.combine-panel input {
  min-height: 44px;
  padding: 0 11px;
}

.combine-delete-sources {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: #d7d1c3;
  font-size: 0.84rem;
  font-weight: 700;
}

.combine-delete-sources.disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.combine-delete-sources input {
  min-height: auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--gold);
}

.combine-actions,
.copy-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.combine-actions button,
.copy-actions button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  font-weight: 850;
}

.combine-actions button:first-child,
.copy-actions button:first-child,
.ai-form button,
.ai-result-card a {
  border-color: rgba(30, 215, 96, 0.55);
  background: linear-gradient(180deg, #32ef77, var(--green));
  color: #031007;
}

.playlist-list,
.track-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.playlist-group {
  display: grid;
  gap: 6px;
}

.playlist-group-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.playlist-group:not(.has-children) .playlist-group-row {
  grid-template-columns: minmax(0, 1fr);
}

.playlist-toggle,
.playlist-menu summary,
.track-menu summary {
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
  list-style: none;
  box-shadow: var(--inner);
}

.playlist-toggle {
  min-height: 64px;
  font-size: 1.2rem;
}

.playlist-group.expanded .playlist-toggle,
.playlist-menu[open] summary,
.track-menu[open] summary {
  border-color: rgba(79, 195, 255, 0.44);
  color: var(--gold-2);
}

.playlist-children {
  display: grid;
  gap: 6px;
  margin-left: 46px;
  padding-left: 10px;
  border-left: 1px solid rgba(79, 195, 255, 0.16);
}

.apple-folder {
  display: grid;
  gap: 6px;
}

.playlist-folder-button {
  width: 100%;
  display: grid;
  grid-template-columns: 20px 30px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid rgba(79, 195, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.032);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.playlist-folder-button:hover {
  border-color: rgba(79, 195, 255, 0.36);
  background: rgba(255, 255, 255, 0.055);
}

.folder-chevron {
  display: grid;
  place-items: center;
  color: var(--gold-2);
  font-size: 1rem;
  font-weight: 850;
}

.folder-glyph {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 1rem;
}

.playlist-children .playlist-children {
  margin-left: 20px;
}

.playlist-children .playlist-group {
  min-width: 0;
}

.playlist-children .playlist-entry {
  grid-template-columns: minmax(0, 1fr) 34px;
}

.playlist-children .playlist-menu summary {
  min-height: 48px;
  font-size: 1rem;
}

.playlist-children .playlist-item.child {
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 48px;
}

.playlist-children .playlist-item.child img {
  width: 28px;
  height: 28px;
}

.playlist-children .service-badge {
  display: none;
}

.playlist-entry,
.track-entry {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 6px;
  position: relative;
}

.track-entry {
  grid-template-columns: 28px minmax(0, 1fr) 38px;
}

.track-entry.selected .track-item {
  border-color: rgba(88, 214, 247, 0.5);
  background: rgba(88, 214, 247, 0.08);
}

.track-select-check {
  align-self: stretch;
  width: 100%;
  min-height: 54px;
  margin: 0;
  accent-color: var(--green);
  cursor: pointer;
}

.bulk-track-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto) auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid rgba(88, 214, 247, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.bulk-track-actions[hidden] {
  display: none;
}

.bulk-track-actions span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bulk-track-actions select,
.bulk-track-actions button {
  min-height: 36px;
}

.playlist-entry.combining {
  grid-template-columns: 30px minmax(0, 1fr) 38px;
}

.playlist-combine-check {
  align-self: stretch;
  width: 100%;
  min-height: 54px;
  margin: 0;
  accent-color: var(--gold);
  cursor: pointer;
}

.playlist-item,
.track-item {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.playlist-item:hover,
.track-item:hover,
.playlist-menu summary:hover,
.track-menu summary:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.065);
}

.playlist-item.active,
.track-item.active,
.playlist-entry.selected .playlist-item {
  border-color: rgba(30, 215, 96, 0.55);
  background: rgba(30, 215, 96, 0.105);
  box-shadow: inset 3px 0 0 var(--green);
}

.playlist-item.child {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  padding: 8px;
  background: rgba(255, 255, 255, 0.026);
}

.playlist-item.child img {
  width: 34px;
  height: 34px;
}

.playlist-menu,
.track-menu {
  position: relative;
}

.playlist-menu summary {
  min-height: 64px;
  font-size: 1.35rem;
}

.playlist-entry.child .playlist-menu summary {
  min-height: 52px;
}

.track-menu summary {
  min-height: 68px;
  font-size: 1.35rem;
}

.playlist-menu summary::-webkit-details-marker,
.track-menu summary::-webkit-details-marker {
  display: none;
}

.playlist-menu-popover,
.track-menu-popover {
  position: absolute;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 13, 15, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62);
}

.playlist-menu-popover {
  width: 196px;
}

.track-menu-popover {
  width: 220px;
}

.playlist-menu-popover button,
.track-menu-popover button {
  min-height: 42px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-2);
  text-align: left;
  padding: 0 10px;
  font-size: 0.86rem;
  font-weight: 780;
}

.set-context-menu,
.set-context-submenu {
  position: fixed;
  z-index: 80;
  display: grid;
  gap: 4px;
  width: 226px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 12, 17, 0.98);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.64);
}

.set-context-submenu-wrap {
  position: relative;
}

.set-context-submenu {
  position: absolute;
  top: -7px;
  left: calc(100% + 6px);
  display: none;
  max-height: min(420px, 74vh);
  overflow: auto;
}

.set-context-submenu-wrap:hover .set-context-submenu,
.set-context-submenu-wrap:focus-within .set-context-submenu {
  display: grid;
}

.set-context-item {
  width: 100%;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 10px;
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 760;
  text-align: left;
}

.set-context-item:hover,
.set-context-item:focus-visible {
  border-color: rgba(79, 195, 255, 0.26);
  background: rgba(79, 195, 255, 0.12);
  color: var(--text-strong);
}

.set-context-trigger::after {
  content: "›";
  float: right;
  color: var(--muted);
}

.set-context-divider {
  height: 1px;
  margin: 3px 2px;
  background: var(--line-soft);
}

.playlist-item img,
.track-item img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  background: #222326;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
}

.item-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-strong);
  font-weight: 680;
}

.item-subtitle {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.playlist-source-section {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.playlist-source-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(143, 160, 179, 0.14);
  border-radius: 6px;
  background: linear-gradient(180deg, #111720, #080b10);
  color: #d9e7f3;
  font-family: var(--mono);
  text-transform: uppercase;
}

.playlist-source-title strong {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.playlist-source-title small {
  color: #71818f;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

.service-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #1ed760;
  box-shadow: 0 0 12px rgba(30, 215, 96, 0.55);
}

.service-dot.apple_music {
  background: #fa586a;
  box-shadow: 0 0 12px rgba(250, 88, 106, 0.55);
}

.service-badge {
  align-self: center;
  justify-self: end;
  min-width: 52px;
  padding: 4px 6px;
  border: 1px solid rgba(30, 215, 96, 0.38);
  border-radius: 999px;
  background: rgba(30, 215, 96, 0.09);
  color: #8af6b6;
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.service-badge.apple_music {
  border-color: rgba(250, 88, 106, 0.46);
  background: linear-gradient(135deg, rgba(250, 88, 106, 0.16), rgba(161, 82, 255, 0.09));
  color: #ffc3ce;
}

.player {
  display: grid;
  gap: 14px;
}

.track-card {
  position: relative;
  min-height: 310px;
  display: grid;
  grid-template-columns: minmax(190px, 330px) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  overflow: hidden;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(79, 195, 255, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.024)),
    #0c0d10;
}

.track-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 195, 255, 0.6), transparent);
  opacity: 0.7;
}

.cover-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: linear-gradient(135deg, #25201a, #111319);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.38);
}

.cover-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), transparent 32%, rgba(0, 0, 0, 0.22));
}

#cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#cover:not([src]),
#cover[src=""] {
  visibility: hidden;
}

.track-meta {
  position: relative;
  min-width: 0;
  z-index: 1;
}

#trackTitle {
  margin-bottom: 10px;
  color: var(--text-strong);
  font-size: clamp(2.05rem, 4.7vw, 4.85rem);
  font-weight: 700;
  line-height: 0.93;
  letter-spacing: -0.052em;
  overflow-wrap: anywhere;
}

#trackArtist {
  margin-bottom: 11px;
  color: #ded8c9;
  font-size: clamp(1.05rem, 2vw, 1.48rem);
  font-weight: 530;
}

.album {
  color: var(--muted);
  line-height: 1.35;
}

.transport {
  display: grid;
  grid-template-columns: repeat(6, minmax(58px, 1fr));
  gap: 10px;
}

.transport button {
  min-height: 70px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035));
  color: var(--text-strong);
  box-shadow: var(--inner), 0 14px 36px rgba(0, 0, 0, 0.24);
  font-size: clamp(1rem, 2vw, 1.52rem);
  font-weight: 820;
  letter-spacing: -0.02em;
}

.transport #playTrack {
  border-color: rgba(30, 215, 96, 0.72);
  background: linear-gradient(180deg, #35ef78, var(--green));
  color: #031007;
  font-size: 2rem;
}

.transport #openTrack {
  color: var(--gold-2);
}

.playback-clock,
.next-up {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.19);
  color: #ded8c9;
  text-align: center;
}

.playback-clock {
  font-family: var(--mono);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  letter-spacing: 0.04em;
}

.next-up {
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 720;
  overflow-wrap: anywhere;
}

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

.rating {
  position: relative;
  min-height: 108px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 10px;
  box-shadow: var(--inner), 0 16px 42px rgba(0, 0, 0, 0.23);
  color: #050607;
  font-size: clamp(0.98rem, 1.62vw, 1.22rem);
  font-weight: 900;
  line-height: 1.02;
}

.rating::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.28), transparent 45%);
  mix-blend-mode: soft-light;
}

.play-out {
  background: linear-gradient(180deg, #43f280, var(--green));
}

.maybe {
  background: linear-gradient(180deg, #ffd27c, var(--amber));
}

.hook {
  background: linear-gradient(180deg, #c2b5ff, var(--violet));
}

.transition {
  background: linear-gradient(180deg, #8ce7ff, var(--cyan));
}

.trash {
  background: linear-gradient(180deg, #ff8a84, var(--red));
}

.notes-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
}

.notes-row input {
  min-height: 56px;
  padding: 0 14px;
}

.notes-row button,
.detail-link {
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  font-weight: 820;
}

.queue-panel {
  padding: 14px;
}

.track-item {
  grid-template-columns: 48px minmax(0, 1fr) auto;
}

.badge {
  min-width: 86px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #737883;
  color: #060708;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge.play_out {
  background: var(--green);
}

.badge.maybe {
  background: var(--amber);
}

.badge.hook {
  background: var(--violet);
}

.badge.transition {
  background: var(--cyan);
}

.badge.trash {
  background: var(--red);
}

.details-panel {
  display: grid;
  gap: 12px;
}

.detail-list {
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
  gap: 10px 12px;
  margin: 0;
}

.detail-list dt,
.reclassify-panel label,
.copy-target,
.count-control {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #d9d3c6;
  font-size: 0.9rem;
  font-weight: 680;
}

.detail-list a {
  color: var(--gold-2);
  text-decoration: none;
}

.detail-list a:hover,
.detail-list a:focus-visible {
  text-decoration: underline;
}

.detail-link {
  width: 100%;
  text-align: center;
  padding: 0 12px;
}

.reclassify-panel {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.reclassify-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 8px;
}

.reclassify-row select,
.reclassify-row button {
  min-height: 50px;
  border-radius: 8px;
}

.reclassify-row select {
  padding: 0 10px;
}

.reclassify-row button {
  border: 1px solid rgba(79, 195, 255, 0.42);
  background: linear-gradient(180deg, rgba(79, 195, 255, 0.26), rgba(79, 195, 255, 0.12));
  color: var(--gold-2);
  font-weight: 860;
}

.sync-center,
.ai-builder {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
}

.sync-actions button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel-2);
  font-weight: 820;
}

.sync-actions button:first-child {
  border-color: rgba(79, 195, 255, 0.42);
  background: rgba(79, 195, 255, 0.12);
  color: var(--gold-2);
}

.sync-summary {
  min-height: 34px;
  display: flex;
  align-items: center;
  color: #d9d3c6;
  font-size: 0.9rem;
  font-weight: 720;
}

.sync-list {
  display: grid;
  gap: 8px;
}

.sync-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.sync-item strong,
.sync-item span {
  display: block;
  overflow-wrap: anywhere;
}

.sync-item strong {
  color: var(--text-strong);
  font-size: 0.9rem;
}

.sync-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
}

.sync-item-side {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sync-state {
  min-width: 70px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(88, 214, 247, 0.12);
  color: #dff7ff;
  text-align: center;
  text-transform: uppercase;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.sync-item.queued .sync-state {
  border: 1px solid rgba(255, 210, 58, 0.92);
  background: linear-gradient(180deg, #ffe58a, #ffb31a);
  color: #140d03;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.sync-item.syncing .sync-state {
  border: 1px solid rgba(90, 208, 240, 0.72);
  background: linear-gradient(180deg, #92eaff, #2288b8);
  color: #031018;
}

.sync-item.failed .sync-state {
  border: 1px solid rgba(255, 106, 88, 0.82);
  background: linear-gradient(180deg, #ff9a88, #c8261d);
  color: #fff2ee;
}

.sync-item.done .sync-state {
  border: 1px solid rgba(60, 233, 127, 0.72);
  background: linear-gradient(180deg, #77f3a5, #169b45);
  color: #04140a;
}

.sync-item-side button {
  min-height: 36px;
  border: 1px solid rgba(255, 95, 87, 0.34);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(255, 95, 87, 0.09);
  color: #ffd3d0;
  font-weight: 850;
}

.count-control {
  display: inline-grid;
  grid-template-columns: auto 74px;
  gap: 8px;
  align-items: center;
}

.count-control input {
  min-height: 40px;
  width: 74px;
  padding: 0 8px;
}

.ai-chat {
  max-height: 260px;
  min-height: 96px;
  overflow: auto;
}

.ai-message {
  width: fit-content;
  max-width: min(760px, 86%);
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #d9d3c6;
  overflow-wrap: anywhere;
}

.ai-message.user {
  justify-self: end;
  border-color: rgba(79, 195, 255, 0.34);
  background: rgba(79, 195, 255, 0.13);
  color: var(--gold-2);
  font-weight: 760;
}

.ai-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 10px;
}

.ai-form textarea {
  min-height: 92px;
  resize: vertical;
  padding: 12px;
}

.ai-form button,
.ai-result-card a {
  min-height: 56px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-weight: 880;
  text-decoration: none;
}

.ai-form button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.ai-result {
  display: grid;
  gap: 10px;
}

.ai-result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 8px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.ai-result-card h3,
.ai-result-card p {
  margin: 0;
}

.ai-result-card p,
.ai-result details {
  color: var(--muted);
}

.ai-result-card a {
  grid-row: span 2;
}

.ai-result ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.copy-dialog {
  width: min(440px, calc(100vw - 24px));
  padding: 0;
  color: var(--text);
}

.copy-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(6px);
}

.copy-dialog-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.copy-target {
  display: grid;
  gap: 8px;
}

.copy-target select {
  min-height: 52px;
  padding: 0 10px;
}

body.driving-mode {
  background:
    linear-gradient(135deg, rgba(30, 215, 96, 0.045), transparent 34%),
    linear-gradient(180deg, #050607, #020304);
}

body.driving-mode .shell {
  max-width: 1040px;
}

body.driving-mode .layout {
  grid-template-columns: minmax(0, 1fr);
}

body.driving-mode .sidebar,
body.driving-mode .details-panel,
body.driving-mode .queue-panel,
body.driving-mode .sync-center,
body.driving-mode .ai-builder,
body.driving-mode .notes-row {
  display: none;
}

body.driving-mode .topbar {
  background: rgba(10, 11, 13, 0.88);
}

body.driving-mode .player {
  gap: 16px;
}

body.driving-mode .track-card {
  min-height: 48vh;
  grid-template-columns: minmax(180px, 36%) minmax(0, 1fr);
  background:
    linear-gradient(135deg, rgba(30, 215, 96, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.024)),
    #07090b;
}

body.driving-mode #trackTitle {
  font-size: clamp(2.25rem, 6vw, 5.7rem);
}

body.driving-mode #trackArtist {
  font-size: clamp(1.2rem, 2.8vw, 2rem);
}

body.driving-mode .transport button {
  min-height: 86px;
  font-size: 1.85rem;
}

body.driving-mode .transport #playTrack {
  font-size: 2.4rem;
}

body.driving-mode .playback-clock {
  min-height: 44px;
  font-size: 1.18rem;
}

body.driving-mode .next-up {
  min-height: 44px;
  color: #ded8c9;
  font-size: 1rem;
}

body.driving-mode .rating {
  min-height: 132px;
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.login-panel {
  width: min(460px, 100%);
  overflow: hidden;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(79, 195, 255, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.028)),
    #0d0e11;
}

.login-panel h1 {
  margin-bottom: 8px;
  color: var(--text-strong);
  font-size: clamp(2.2rem, 9vw, 4.2rem);
  font-weight: 720;
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.login-panel p:not(.eyebrow) {
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.login-form input,
.login-form button {
  min-height: 62px;
  border-radius: 8px;
}

.login-form input {
  padding: 0 14px;
  font-size: 1.35rem;
  letter-spacing: 0.14em;
}

.login-form button {
  border: 1px solid rgba(30, 215, 96, 0.56);
  background: linear-gradient(180deg, #35ef78, var(--green));
  color: #031007;
  font-weight: 900;
}

@media (max-width: 1160px) {
  .layout {
    grid-template-columns: minmax(230px, 310px) minmax(0, 1fr);
  }

  .details-panel {
    position: static;
    grid-column: 1 / -1;
    max-height: none;
  }
}

@media (max-width: 920px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .player {
    order: 1;
  }

  .sidebar {
    order: 2;
  }

  .details-panel {
    order: 3;
  }

  .sidebar,
  .details-panel {
    position: static;
    max-height: none;
  }

  .playlist-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .ai-result-card {
    grid-template-columns: 1fr;
  }

  .ai-result-card a {
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 10px 10px calc(18px + env(safe-area-inset-bottom));
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 13px;
  }

  .topbar-right {
    width: 100%;
    min-width: 0;
    justify-items: start;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .account,
  .status,
  .player-status {
    font-size: 0.82rem;
  }

  .track-card {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 14px;
    padding: 14px;
  }

  .cover-wrap {
    width: min(62vw, 260px);
    margin: 0 auto;
  }

  .ratings {
    grid-template-columns: 1fr 1fr;
  }

  .rating {
    min-height: 88px;
  }

  .rating.play-out {
    grid-column: span 2;
  }

  .transport {
    grid-template-columns: repeat(3, 1fr);
  }

  .transport button {
    min-height: 62px;
    font-size: 1.08rem;
  }

  .transport #playTrack {
    font-size: 1.85rem;
  }

  body.driving-mode .track-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  body.driving-mode .cover-wrap {
    width: min(64vw, 270px);
    margin: 0 auto;
  }

  body.driving-mode .rating {
    min-height: 98px;
  }

  .playlist-list,
  .track-list {
    max-height: 46vh;
    overflow: auto;
    padding-right: 2px;
  }

  .queue-panel,
  .sidebar,
  .details-panel,
  .sync-center,
  .ai-builder {
    padding: 12px;
  }

  .playlist-children {
    margin-left: 28px;
  }

  .ai-form {
    grid-template-columns: 1fr;
  }

  .ai-form textarea {
    min-height: 112px;
  }

  .sync-item {
    grid-template-columns: 1fr;
  }

  .sync-item-side {
    justify-content: space-between;
  }
}

@media (max-width: 540px) {
  .track-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .cover-wrap {
    width: auto;
    margin: 0;
  }

  #trackTitle {
    font-size: 1.48rem;
    line-height: 1.04;
    letter-spacing: -0.035em;
  }

  #trackArtist {
    margin-bottom: 6px;
    font-size: 0.96rem;
  }

  .album {
    margin-bottom: 0;
    font-size: 0.84rem;
  }

  .playback-clock {
    min-height: 30px;
  }

  .ratings {
    gap: 8px;
  }

  .rating {
    min-height: 78px;
    padding: 8px;
    font-size: 1rem;
  }

  .notes-row {
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 8px;
  }

  .notes-row input,
  .notes-row button,
  .detail-link {
    min-height: 50px;
  }

  .detail-list {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .detail-list dd {
    margin-bottom: 8px;
  }

  .ai-chat {
    max-height: 220px;
  }

  .ai-message {
    max-width: 94%;
  }

  .playlist-group-row {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 6px;
  }

  .playlist-toggle {
    min-height: 58px;
    font-size: 1.25rem;
  }

  .playlist-item,
  .track-item {
    gap: 8px;
    padding: 8px;
  }

  .track-item {
    grid-template-columns: 40px minmax(0, 1fr) minmax(64px, auto);
  }

  .playlist-item img,
  .track-item img {
    width: 40px;
    height: 40px;
  }

  .playlist-item.child img {
    width: 30px;
    height: 30px;
  }

  .badge {
    min-width: 64px;
    padding: 6px 7px;
    font-size: 0.62rem;
  }

  .item-title,
  .item-subtitle {
    white-space: normal;
  }

  .item-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .item-subtitle {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }
}

/* Black Booth Console + Energy Command Wall rollout */
body {
  background:
    linear-gradient(135deg, rgba(30, 215, 96, 0.06), transparent 26%),
    linear-gradient(225deg, rgba(88, 214, 247, 0.045), transparent 30%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 72px),
    linear-gradient(180deg, #050606 0%, #020303 100%);
}

.topbar {
  background:
    linear-gradient(135deg, rgba(30, 215, 96, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.02)),
    #0b0d0f;
}

.deck-strip {
  min-height: 42px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(30, 215, 96, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(30, 215, 96, 0.08), rgba(255, 255, 255, 0.018)),
    #070a08;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.58),
    0 18px 46px rgba(0, 0, 0, 0.24);
  color: #c4ffda;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.deck-strip span:nth-child(2) {
  justify-self: center;
  color: var(--gold-2);
}

.deck-strip span:nth-child(3) {
  justify-self: end;
  color: var(--muted);
}

.track-card {
  min-height: 360px;
  grid-template-columns: minmax(230px, 370px) minmax(0, 1fr);
  background:
    linear-gradient(135deg, rgba(30, 215, 96, 0.16), transparent 44%),
    linear-gradient(225deg, rgba(88, 214, 247, 0.06), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    #07090a;
}

.track-card::before {
  content: "DECK A";
  position: absolute;
  right: 18px;
  top: 16px;
  z-index: 1;
  color: rgba(196, 255, 218, 0.62);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.cover-wrap {
  display: grid;
  place-items: center;
  overflow: visible;
  border: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, #151719 0 10px, #08090a 10px 18px),
    #08090a;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.09),
    inset 0 0 0 18px rgba(0, 0, 0, 0.18),
    inset 0 0 0 42px rgba(255, 255, 255, 0.018),
    0 34px 90px rgba(0, 0, 0, 0.64);
}

.cover-wrap::before {
  content: "";
  position: absolute;
  inset: 9%;
  border: 1px solid rgba(30, 215, 96, 0.32);
  border-radius: 50%;
  box-shadow: 0 0 42px rgba(30, 215, 96, 0.1);
}

.cover-wrap::after {
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), transparent 34%, rgba(0, 0, 0, 0.34)),
    radial-gradient(circle at center, transparent 0 34%, rgba(0, 0, 0, 0.28) 35% 100%);
}

#cover {
  position: relative;
  z-index: 1;
  width: 48%;
  height: 48%;
  border-radius: 8px;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(255, 255, 255, 0.14);
}

#trackTitle {
  text-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
}

.energy-meter {
  height: 74px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(88, 214, 247, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(30, 215, 96, 0.08), rgba(88, 214, 247, 0.075), rgba(168, 149, 255, 0.065)),
    rgba(0, 0, 0, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.energy-meter span {
  flex: 1;
  min-width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), var(--green));
  box-shadow: 0 0 18px rgba(30, 215, 96, 0.18);
}

.energy-meter span:nth-child(1) { height: 28%; }
.energy-meter span:nth-child(2) { height: 62%; }
.energy-meter span:nth-child(3) { height: 42%; }
.energy-meter span:nth-child(4) { height: 86%; background: linear-gradient(180deg, #efffec, var(--green)); }
.energy-meter span:nth-child(5) { height: 38%; }
.energy-meter span:nth-child(6) { height: 74%; }
.energy-meter span:nth-child(7) { height: 48%; background: linear-gradient(180deg, #e9fbff, var(--cyan)); }
.energy-meter span:nth-child(8) { height: 92%; background: linear-gradient(180deg, #e9fbff, var(--cyan)); }
.energy-meter span:nth-child(9) { height: 56%; background: linear-gradient(180deg, #fff4cf, var(--amber)); }
.energy-meter span:nth-child(10) { height: 78%; background: linear-gradient(180deg, #fff4cf, var(--amber)); }
.energy-meter span:nth-child(11) { height: 46%; background: linear-gradient(180deg, #f4efff, var(--violet)); }
.energy-meter span:nth-child(12) { height: 66%; background: linear-gradient(180deg, #f4efff, var(--violet)); }

.transport button {
  min-height: 78px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.025)),
    #0b0d0f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -3px 0 rgba(0, 0, 0, 0.55),
    0 18px 44px rgba(0, 0, 0, 0.32);
}

.transport #playTrack {
  min-height: 82px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -3px 0 rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(30, 215, 96, 0.5),
    0 18px 52px rgba(30, 215, 96, 0.18);
}

.ratings {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.014)),
    rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.rating {
  min-height: 118px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -4px 0 rgba(0, 0, 0, 0.22),
    0 18px 42px rgba(0, 0, 0, 0.28);
}

.play-out {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -4px 0 rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(30, 215, 96, 0.45),
    0 18px 46px rgba(30, 215, 96, 0.16);
}

.sidebar,
.details-panel,
.queue-panel,
.sync-center,
.ai-builder {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.043), rgba(255, 255, 255, 0.016)),
    #090a0c;
}

body.driving-mode .deck-strip {
  min-height: 48px;
  font-size: 0.76rem;
}

body.driving-mode .track-card {
  min-height: 54vh;
}

body.driving-mode .energy-meter {
  height: 92px;
}

body.driving-mode .rating {
  min-height: 142px;
}

@media (max-width: 720px) {
  .deck-strip {
    grid-template-columns: 1fr;
    gap: 4px;
    align-items: start;
    padding: 10px 12px;
  }

  .deck-strip span:nth-child(2),
  .deck-strip span:nth-child(3) {
    justify-self: start;
  }

  .track-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .cover-wrap {
    width: min(68vw, 300px);
  }

  .energy-meter {
    height: 58px;
    gap: 5px;
    padding: 9px;
  }

  .transport button {
    min-height: 68px;
  }
}

@media (max-width: 540px) {
  .track-card {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .cover-wrap {
    width: 118px;
    height: 118px;
  }

  #cover {
    width: 52%;
    height: 52%;
  }

  .track-card::before {
    right: 12px;
    top: 10px;
    font-size: 0.58rem;
  }

  .ratings {
    padding: 8px;
  }

  body.driving-mode .cover-wrap {
    width: min(62vw, 240px);
    height: auto;
    aspect-ratio: 1;
    margin: 0 auto;
  }
}

/* AI Crate Chat upgrade */
.ai-builder {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(88, 214, 247, 0.085), transparent 34%),
    linear-gradient(225deg, rgba(30, 215, 96, 0.06), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.016)),
    #07090b;
}

.ai-builder::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 100% 42px, 64px 100%;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.82), transparent 78%);
}

.ai-builder > * {
  position: relative;
  z-index: 1;
}

.ai-title {
  align-items: start;
}

.ai-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.service-control {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(88, 214, 247, 0.16);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.2);
}

.service-control legend {
  padding: 0 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.service-control label {
  cursor: pointer;
}

.service-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.service-control span {
  min-width: 68px;
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #8fa1b3;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 840;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.service-control input:checked + span {
  border-color: rgba(88, 214, 247, 0.46);
  background: linear-gradient(180deg, rgba(88, 214, 247, 0.22), rgba(30, 215, 96, 0.08));
  color: #e7f8ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.ai-subtitle {
  max-width: 720px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 620;
  line-height: 1.35;
}

.ai-extend-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(88, 214, 247, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.ai-extend-panel[hidden] {
  display: none;
}

.ai-extend-panel label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ai-extend-panel select {
  min-width: 0;
}

.ai-extend-panel button {
  min-height: 42px;
  border: 1px solid rgba(88, 214, 247, 0.2);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font-weight: 820;
}

.ai-chat-shell {
  overflow: hidden;
  border: 1px solid rgba(88, 214, 247, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(0, 0, 0, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.ai-chat-topline {
  min-height: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(196, 255, 218, 0.78);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 840;
  letter-spacing: 0.12em;
}

.ai-chat-topline span:last-child {
  color: rgba(143, 217, 255, 0.72);
}

.ai-chat {
  max-height: 360px;
  min-height: 178px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ai-message {
  position: relative;
  width: fit-content;
  max-width: min(760px, 82%);
  padding: 12px 14px 12px 46px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    #101315;
  color: #ded8c9;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 46px rgba(0, 0, 0, 0.22);
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.ai-message::before {
  content: "AI";
  position: absolute;
  left: 12px;
  top: 12px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(88, 214, 247, 0.28), rgba(88, 214, 247, 0.12));
  color: #dff7ff;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 900;
}

.ai-message.user {
  align-self: flex-end;
  padding: 12px 46px 12px 14px;
  border-color: rgba(30, 215, 96, 0.22);
  background:
    linear-gradient(180deg, rgba(30, 215, 96, 0.16), rgba(30, 215, 96, 0.07)),
    #09100c;
  color: #e7ffef;
  font-weight: 700;
}

.ai-message.user::before {
  content: "YOU";
  right: 12px;
  left: auto;
  background: linear-gradient(180deg, rgba(30, 215, 96, 0.4), rgba(30, 215, 96, 0.18));
  color: #dfffe9;
  font-size: 0.52rem;
}

.ai-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 178px;
  gap: 10px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.ai-form textarea {
  min-height: 86px;
  resize: vertical;
  border-color: rgba(88, 214, 247, 0.12);
  background: rgba(0, 0, 0, 0.28);
  padding: 14px;
  line-height: 1.35;
}

.ai-form textarea::placeholder {
  color: rgba(222, 216, 201, 0.44);
}

.ai-form button {
  min-height: 86px;
  border: 1px solid rgba(30, 215, 96, 0.56);
  background:
    linear-gradient(180deg, #42f482, var(--green));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -3px 0 rgba(0, 0, 0, 0.25),
    0 18px 50px rgba(30, 215, 96, 0.15);
  color: #031007;
  font-weight: 950;
}

.ai-result {
  gap: 10px;
}

.ai-result-card {
  border-color: rgba(30, 215, 96, 0.22);
  background:
    linear-gradient(135deg, rgba(30, 215, 96, 0.105), transparent 40%),
    rgba(255, 255, 255, 0.04);
}

.ai-result-card h3 {
  color: var(--text-strong);
}

.ai-result-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-result-links a.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.ai-result details {
  padding: 10px 12px;
  border: 1px solid rgba(255, 95, 87, 0.18);
  border-radius: 8px;
  background: rgba(255, 95, 87, 0.06);
}

@media (max-width: 720px) {
  .ai-title {
    display: grid;
    align-items: start;
  }

  .ai-chat {
    min-height: 220px;
    max-height: 360px;
    padding: 12px;
  }

  .ai-message,
  .ai-message.user {
    max-width: 94%;
  }

  .ai-form {
    grid-template-columns: 1fr;
  }

  .ai-form textarea,
  .ai-form button {
    min-height: 72px;
  }
}

/* ============================================================
   RT-3000 Hybrid Console — 5A Gunmetal Ice rollout
   (CDJ Pro Booth x Analog Rack fusion; chassis + accents only,
   no sizing overrides so responsive/driving rules stay intact)
   ============================================================ */

body {
  background:
    linear-gradient(135deg, rgba(79, 195, 255, 0.055), transparent 30%),
    linear-gradient(225deg, rgba(63, 182, 255, 0.035), transparent 30%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.016) 0 1px, transparent 1px 72px),
    linear-gradient(180deg, #0c0f15 0%, #05070c 100%);
}

.topbar {
  position: relative;
  border-color: #05070a;
  background:
    linear-gradient(135deg, rgba(79, 195, 255, 0.06), transparent 40%),
    linear-gradient(180deg, #20262f, #151a22);
  box-shadow:
    inset 0 1px 0 rgba(190, 214, 235, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6),
    0 18px 50px rgba(0, 0, 0, 0.35);
}

.topbar::before,
.topbar::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #5f6b7c, #1b2028 70%);
  box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.9);
  transform: translateY(-50%);
}

.topbar::before { left: 9px; }
.topbar::after { right: 9px; }

.topbar h1 {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 4px;
  background: linear-gradient(180deg, #e3ebf4, #a9bacf);
  color: #141a22;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 #fff, 0 1px 3px rgba(0, 0, 0, 0.8);
}

.track-card::before {
  content: "RT-3000 · DECK A";
  color: rgba(143, 217, 255, 0.62);
}

.track-card {
  background:
    linear-gradient(135deg, rgba(79, 195, 255, 0.1), transparent 44%),
    linear-gradient(225deg, rgba(88, 214, 247, 0.05), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    #10141b;
}

.deck-strip {
  border-color: rgba(79, 195, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(79, 195, 255, 0.07), rgba(255, 255, 255, 0.015)),
    #0d2130;
  box-shadow:
    inset 0 2px 10px rgba(0, 0, 0, 0.7),
    inset 0 0 26px rgba(0, 0, 0, 0.45),
    0 14px 40px rgba(0, 0, 0, 0.3);
  color: #9fdcff;
  text-shadow: 0 0 8px rgba(127, 212, 255, 0.55);
}

.cover-wrap::before {
  border-color: rgba(79, 195, 255, 0.34);
  box-shadow: 0 0 42px rgba(79, 195, 255, 0.12);
}

.energy-meter {
  border: 2px solid #05070a;
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(79, 195, 255, 0.05), rgba(21, 131, 196, 0.05)),
    #05070a;
  box-shadow:
    inset 0 2px 12px rgba(0, 0, 0, 0.85),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.energy-meter span {
  border-radius: 2px;
  background: linear-gradient(180deg, #8fd9ff, #1583c4);
  box-shadow: 0 0 14px rgba(79, 195, 255, 0.28);
}

.energy-meter span:nth-child(1) { background: linear-gradient(180deg, #53616f, #303c4e); box-shadow: none; }
.energy-meter span:nth-child(3) { background: linear-gradient(180deg, #53616f, #303c4e); box-shadow: none; }
.energy-meter span:nth-child(4) { background: linear-gradient(180deg, #d5efff, #4fc3ff); }
.energy-meter span:nth-child(5) { background: linear-gradient(180deg, #53616f, #303c4e); box-shadow: none; }
.energy-meter span:nth-child(7) { background: linear-gradient(180deg, #8fd9ff, #1583c4); }
.energy-meter span:nth-child(8) { background: linear-gradient(180deg, #d5efff, #4fc3ff); }
.energy-meter span:nth-child(9) { background: linear-gradient(180deg, #8fd9ff, #1583c4); }
.energy-meter span:nth-child(10) { background: linear-gradient(180deg, #d5efff, #4fc3ff); }
.energy-meter span:nth-child(11) { background: linear-gradient(180deg, #53616f, #303c4e); box-shadow: none; }
.energy-meter span:nth-child(12) { background: linear-gradient(180deg, #8fd9ff, #1583c4); }

.transport button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02)),
    linear-gradient(180deg, #2b3440, #171c24);
  box-shadow:
    inset 0 1px 0 rgba(190, 214, 235, 0.16),
    inset 0 -3px 0 rgba(0, 0, 0, 0.6),
    0 3px 0 #07090c,
    0 16px 40px rgba(0, 0, 0, 0.3);
}

.transport #playTrack {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02)),
    linear-gradient(180deg, #4fc9ff, #1583c4);
  color: #03131e;
  box-shadow:
    inset 0 1px 0 #bfe8ff,
    inset 0 -3px 0 rgba(0, 0, 0, 0.3),
    0 3px 0 #0b3d5e,
    0 0 34px rgba(79, 195, 255, 0.32);
}

.playback-clock {
  color: #4fc3ff;
  font-family: var(--mono);
  text-shadow: 0 0 10px rgba(79, 195, 255, 0.5);
}

.sidebar,
.details-panel,
.queue-panel,
.sync-center,
.ai-builder {
  border-color: #05070a;
  background:
    linear-gradient(180deg, rgba(190, 214, 235, 0.045), rgba(255, 255, 255, 0.012)),
    linear-gradient(180deg, #171d26, #10141b);
  box-shadow:
    inset 0 1px 0 rgba(190, 214, 235, 0.09),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 20px 60px rgba(0, 0, 0, 0.38);
}

.sync-pill.queued {
  color: #d8f1ff;
}

/* 5A continued: primary actions + selection + driving chassis to ice */
.transport #playTrack {
  border-color: rgba(79, 195, 255, 0.72);
}

.combine-actions button:first-child,
.copy-actions button:first-child,
.ai-form button,
.ai-result-card a,
.login-form button {
  border-color: rgba(79, 195, 255, 0.6);
  background: linear-gradient(180deg, #7fd4ff, #1583c4);
  color: #03131e;
}

.playlist-item.active,
.track-item.active,
.playlist-entry.selected .playlist-item {
  border-color: rgba(79, 195, 255, 0.55);
  background: rgba(79, 195, 255, 0.1);
  box-shadow: inset 3px 0 0 var(--gold);
}

body.driving-mode {
  background:
    linear-gradient(135deg, rgba(79, 195, 255, 0.05), transparent 34%),
    linear-gradient(180deg, #0a0d12, #05070c);
}

body.driving-mode .track-card {
  background:
    linear-gradient(135deg, rgba(79, 195, 255, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    #0d1118;
}

@media (max-width: 720px) {
  .track-card::before {
    content: none;
  }
}

/* ============================================================
   RT-3000 TRUE LAYOUT — full structural rollout of sample 5A
   ============================================================ */

.rt-shell {
  display: grid;
  gap: 14px;
}

.rt-unit {
  position: relative;
  margin: 0;
  border: 1px solid #04060a;
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(190, 214, 235, 0.05), rgba(255, 255, 255, 0.01) 30%),
    linear-gradient(180deg, #20262f, #151a22);
  box-shadow:
    inset 0 1px 0 rgba(190, 214, 235, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.65),
    0 10px 34px rgba(0, 0, 0, 0.45);
}

.rt-unit::before,
.rt-unit::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #5f6b7c, #1b2028 70%);
  box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.9);
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
}

.rt-unit::before { left: 9px; }
.rt-unit::after { right: 9px; }

/* --- header unit --- */
.topbar.rt-unit {
  padding: 14px 34px;
  backdrop-filter: none;
}

.rt-badge .eyebrow {
  color: #71818f;
  letter-spacing: 0.3em;
}

.rt-lcd {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
  flex: 1;
  max-width: 620px;
  min-height: 46px;
  padding: 0 16px;
  border: 2px solid #04060a;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(79, 195, 255, 0.06), rgba(255, 255, 255, 0.01)),
    #0d2130;
  box-shadow:
    inset 0 2px 10px rgba(0, 0, 0, 0.75),
    inset 0 0 26px rgba(0, 0, 0, 0.4);
  color: #9fdcff;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-shadow: 0 0 8px rgba(127, 212, 255, 0.55);
  text-transform: uppercase;
}

.rt-lcd span:nth-child(2) { text-align: center; }
.rt-lcd span:nth-child(3) { text-align: right; color: #5b8aa6; }

/* --- waveform screen unit --- */
.rt-wavescreen {
  padding: 12px 34px 14px;
}

.rt-wavehead {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #71818f;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.rt-bezel {
  padding: 10px 14px 8px;
  border: 2px solid #04060a;
  border-radius: 6px;
  background: #05070a;
  box-shadow:
    inset 0 2px 12px rgba(0, 0, 0, 0.85),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.rt-wave {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1px;
  height: 74px;
}

.rt-wave i {
  flex: 1;
  min-width: 2px;
  border-radius: 1px;
  background: linear-gradient(180deg, #53616f, #303c4e);
  opacity: 0.85;
}

.rt-wave i.played {
  background: linear-gradient(180deg, #8fd9ff, #1583c4);
  box-shadow: 0 0 4px rgba(79, 195, 255, 0.35);
}

.rt-playhead {
  position: absolute;
  left: 37.5%;
  top: -6px;
  bottom: -6px;
  width: 2px;
  background: #eef4fa;
  box-shadow: 0 0 10px #4fc3ff, 0 0 24px #4fc3ff;
}

.rt-beatgrid {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}

.rt-beatgrid i {
  width: 1px;
  height: 5px;
  background: #303c4e;
}

.rt-beatgrid i:nth-child(4n + 1) {
  height: 9px;
  background: #4fc3ff;
}

/* --- main unit: flatten inner panels into one chassis --- */
.rt-main {
  padding: 16px 34px 20px;
}

.rt-main .layout {
  gap: 22px;
}

.rt-main .sidebar,
.rt-main .details-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  padding: 2px 0;
}

.rt-main .sidebar { border-right: 1px solid rgba(4, 6, 10, 0.9); padding-right: 18px; }
.rt-main .details-panel { border-left: 1px solid rgba(4, 6, 10, 0.9); padding-left: 18px; }

.rt-main .pane-title h2 {
  color: #71818f;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* --- now plate --- */
.track-card.rt-nowplate {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 0;
  padding: 18px 22px;
  border: 1px solid #04060a;
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(79, 195, 255, 0.07), transparent 46%),
    linear-gradient(180deg, #1a202a, #12161d);
  box-shadow:
    inset 0 1px 0 rgba(190, 214, 235, 0.09),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6);
}

.rt-nowplate .cover-wrap {
  width: 170px;
  height: 170px;
}

.rt-counter {
  text-align: right;
  align-self: center;
}

.rt-counter .playback-clock {
  margin: 0;
  color: #4fc3ff;
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(79, 195, 255, 0.55);
}

.rt-counter small {
  display: block;
  margin-top: 4px;
  color: #71818f;
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.3em;
}

/* --- rating pads: dark hardware pads with LED underline --- */
.ratings.rt-pads {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.rt-pads .rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #07090c;
  border-radius: 8px;
  background: linear-gradient(180deg, #1a202a, #12161d);
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rt-pads .rating small {
  color: #71818f;
  font-family: var(--mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.rt-pads .rating::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  top: auto;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  mix-blend-mode: normal;
  opacity: 0.9;
}

.rt-pads .play-out {
  color: #3ce97f;
  background: linear-gradient(180deg, #14251d, #0d1512);
  border-color: rgba(60, 233, 127, 0.4);
  box-shadow: inset 0 1px 0 rgba(190, 235, 214, 0.08), 0 3px 0 #07090c, 0 0 22px rgba(60, 233, 127, 0.14);
}

.rt-pads .maybe {
  color: #ffd23a;
  background: linear-gradient(180deg, #221e13, #14110d);
  border-color: rgba(255, 210, 58, 0.32);
  box-shadow: inset 0 1px 0 rgba(235, 224, 190, 0.08), 0 3px 0 #07090c;
}

.rt-pads .hook {
  color: #5ad0f0;
  background: linear-gradient(180deg, #14212a, #0d1418);
  border-color: rgba(90, 208, 240, 0.32);
  box-shadow: inset 0 1px 0 rgba(190, 224, 235, 0.08), 0 3px 0 #07090c;
}

.rt-pads .transition {
  color: #c99aee;
  background: linear-gradient(180deg, #1d1826, #131017);
  border-color: rgba(201, 154, 238, 0.32);
  box-shadow: inset 0 1px 0 rgba(214, 190, 235, 0.08), 0 3px 0 #07090c;
}

.rt-pads .trash {
  color: #ff6a58;
  background: linear-gradient(180deg, #251614, #150e0d);
  border-color: rgba(255, 106, 88, 0.32);
  box-shadow: inset 0 1px 0 rgba(235, 198, 190, 0.08), 0 3px 0 #07090c;
}

.rt-padcounts {
  min-height: 18px;
  margin-top: -2px;
  color: #71818f;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

/* --- VU meters (decorative) --- */
.rt-meters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.rt-meter {
  position: relative;
  height: 92px;
  overflow: hidden;
  border: 3px solid #04060a;
  border-radius: 6px;
  background: linear-gradient(180deg, #e6edf4, #bccadb);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.rt-needle {
  position: absolute;
  bottom: 20px;
  left: 50%;
  width: 2px;
  height: 56px;
  background: #b3231a;
  transform-origin: bottom center;
  transform: rotate(24deg);
}

.rt-meter-r .rt-needle { transform: rotate(-12deg); }

.rt-red {
  position: absolute;
  top: 6px;
  right: 10px;
  color: #b3231a;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 900;
}

.rt-meter-lbl {
  position: absolute;
  bottom: 3px;
  width: 100%;
  color: #41505f;
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-align: center;
}

/* --- details + tape log --- */
.rt-details {
  margin-bottom: 14px;
  border: 1px solid #04060a;
  border-radius: 7px;
  background: linear-gradient(180deg, #171d26, #10141b);
  padding: 12px 14px;
}

.rt-details summary {
  cursor: pointer;
  color: #71818f;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.rt-tapelog {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}

.rt-tapelog .track-list {
  border: 1px solid #04060a;
  border-radius: 7px;
  background: #0e1218;
  padding: 8px 10px;
}

.rt-tapelog .track-entry {
  margin: 0;
}

.rt-tapelog .track-item {
  border: 0;
  border-radius: 0;
  border-bottom: 1px dashed #242e3a;
  background: transparent;
  box-shadow: none;
}

.rt-tapelog .track-item.active {
  border-left: 0;
  background: rgba(79, 195, 255, 0.08);
  box-shadow: inset 3px 0 0 var(--gold);
}

/* --- footer rail --- */
.rt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 34px;
  color: #71818f;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* --- driving mode + responsive --- */
body.driving-mode .rt-wavescreen,
body.driving-mode .rt-meters,
body.driving-mode .rt-footer,
body.driving-mode .rt-lcd {
  display: none;
}

@media (max-width: 1160px) {
  .rt-lcd { display: none; }
  .rt-main .sidebar,
  .rt-main .details-panel {
    border-right: 0;
    border-left: 0;
    padding-right: 0;
    padding-left: 0;
  }
}

@media (max-width: 720px) {
  .rt-wavescreen { display: none; }
  .rt-meters { display: none; }
  .topbar.rt-unit,
  .rt-main,
  .rt-footer { padding-left: 20px; padding-right: 20px; }
  .track-card.rt-nowplate {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }
  .rt-counter { text-align: center; }
}

/* RT-3000 true layout: fit + padding fixes */
.rt-nowplate #trackTitle {
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  letter-spacing: -0.01em;
}

.rt-pads .rating {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding-left: 6px;
  padding-right: 6px;
}

.sync-center.rt-unit,
.ai-builder.rt-unit {
  padding-left: 34px;
  padding-right: 34px;
}

body.driving-mode .rt-nowplate #trackTitle {
  font-size: clamp(2.25rem, 6vw, 5.7rem);
}

/* RT-3000 wiring: needle rest ease + live playhead */
.rt-needle {
  transition: transform 700ms ease;
}

body.rt-playing .rt-needle {
  transition: transform 80ms linear;
}

.rt-lcd span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* RT-3000: note scribble strip — lives with the rating pads */
.notes-row.rt-scribble {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 94%;
  margin-top: 12px;
  padding: 8px 10px 8px 14px;
  border: 1px solid #04060a;
  border-radius: 7px;
  background: linear-gradient(180deg, #12161d, #0e1218);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55);
}

.rt-scribble-label {
  color: #71818f;
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  flex: none;
}

.rt-scribble input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #dfe6ee;
  caret-color: #4fc3ff;
}

.rt-scribble input:focus-visible {
  outline: none;
}

.notes-row.rt-scribble:focus-within {
  border-color: rgba(79, 195, 255, 0.45);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55), 0 0 16px rgba(79, 195, 255, 0.12);
}

.rt-scribble button {
  flex: none;
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid #04060a;
  border-radius: 5px;
  background: linear-gradient(180deg, #2b3440, #171c24);
  color: #c8d4e0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(190, 214, 235, 0.14), 0 2px 0 #07090c;
}

.rt-scribble #saveNote {
  border-color: rgba(79, 195, 255, 0.5);
  color: #7fd4ff;
}

body.driving-mode .notes-row.rt-scribble {
  display: none;
}

@media (max-width: 720px) {
  .rt-scribble-label { display: none; }
}

/* RT-3000 mobile: let the scribble strip wrap, keep pads shrinkable */
.rt-scribble input {
  flex: 1 1 60px;
}

.rt-pads .rating {
  min-width: 0;
}

@media (max-width: 720px) {
  .notes-row.rt-scribble {
    flex-wrap: wrap;
    width: 100%;
  }
  .rt-scribble input {
    flex: 1 1 100%;
  }
  .rt-pads .rating {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
  }
  .transport {
    flex-wrap: wrap;
  }
}

/* Feature pack: dupes, history, audition */
.dupe-flag {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid rgba(79, 195, 255, 0.4);
  border-radius: 4px;
  color: #7fd4ff;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.rt-history {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #04060a;
  border-radius: 7px;
  background: linear-gradient(180deg, #171d26, #10141b);
}

.rt-history summary {
  cursor: pointer;
  color: #71818f;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.history-list {
  display: grid;
  gap: 2px;
  margin-top: 10px;
  color: #8fa0b3;
  font-size: 0.78rem;
}

.history-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 6px 2px;
  border-bottom: 1px dashed #242e3a;
}

.history-row b {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

.history-label {
  flex: 0 0 auto;
  min-width: 74px;
  border: 1px solid rgba(143, 160, 179, 0.24);
  border-radius: 999px;
  padding: 4px 8px;
  color: #d8e6f4;
  text-align: center;
  text-shadow: none;
}

.history-label.play_out {
  border-color: rgba(60, 233, 127, 0.72);
  background: linear-gradient(180deg, #65ee99, #12883b);
  color: #031208;
}

.history-label.maybe {
  border-color: rgba(255, 210, 58, 0.9);
  background: linear-gradient(180deg, #ffd85b, #d68f00);
  color: #080500;
  text-shadow: none;
}

.history-label.hook {
  border-color: rgba(90, 208, 240, 0.72);
  background: linear-gradient(180deg, #9cecff, #207fa8);
  color: #031018;
}

.history-label.transition {
  border-color: rgba(201, 154, 238, 0.72);
  background: linear-gradient(180deg, #dbb7ff, #7543a5);
  color: #11051d;
}

.history-label.trash {
  border-color: rgba(255, 106, 88, 0.82);
  background: linear-gradient(180deg, #ff9a88, #ba241c);
  color: #fff2ee;
}

.history-label.clear {
  border-color: rgba(113, 129, 143, 0.72);
  background: linear-gradient(180deg, #8d9baa, #33404d);
  color: #f1f6fb;
}

.history-row span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #c8d4e0;
}

.history-row small { color: #53616f; font-family: var(--mono); }
.history-row i { flex-basis: 100%; color: #71818f; font-size: 0.72rem; }

.audition-toggle {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 800;
}

.audition-toggle.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02)),
    linear-gradient(180deg, #4fc9ff, #1583c4) !important;
  color: #03131e !important;
  box-shadow:
    inset 0 1px 0 #bfe8ff,
    0 3px 0 #0b3d5e,
    0 0 30px rgba(79, 195, 255, 0.4) !important;
}

/* Set Builder */
.set-builder.rt-unit {
  padding: 22px 34px 34px;
}

.set-builder .ai-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.set-columns {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(340px, 1.15fr);
  gap: 18px;
  margin-top: 14px;
  align-items: stretch;
}

.set-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.set-col-title {
  color: #71818f;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.set-list {
  flex: 1;
  display: grid;
  gap: 6px;
  min-height: clamp(430px, 58vh, 720px);
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
  border: 1px solid #04060a;
  border-radius: 7px;
  background: #0e1218;
  color: #71818f;
  font-size: 0.82rem;
}

.set-row {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid #04060a;
  border-radius: 5px;
  background: linear-gradient(180deg, #171d26, #10141b);
}

.set-playlist-group {
  display: grid;
  gap: 6px;
}

.set-playlist-group-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.set-playlist-group:not(.has-children) .set-playlist-group-row {
  grid-template-columns: minmax(0, 1fr);
}

.set-playlist-toggle {
  min-height: 58px;
  border: 1px solid #04060a;
  border-radius: 5px;
  background: linear-gradient(180deg, #2b3440, #171c24);
  color: #8fd9ff;
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(190, 214, 235, 0.12);
}

.set-playlist-group.expanded .set-playlist-toggle {
  border-color: rgba(79, 195, 255, 0.48);
  background: linear-gradient(180deg, #1d3445, #111e29);
  color: #d6f3ff;
}

.set-playlist-children {
  display: grid;
  gap: 6px;
  margin-left: 48px;
  padding-left: 10px;
  border-left: 1px solid rgba(79, 195, 255, 0.2);
}

.set-row.active {
  border-color: rgba(79, 195, 255, 0.54);
  background: linear-gradient(180deg, #1c2a36, #111d27);
  box-shadow: inset 3px 0 0 #4fc3ff, 0 0 16px rgba(79, 195, 255, 0.1);
}

.set-row.child {
  min-height: 48px;
  background: linear-gradient(180deg, #141a22, #0d1118);
}

.set-row.virtual-parent {
  opacity: 0.78;
  border-style: dashed;
  background: linear-gradient(180deg, #151b23, #0d1118);
}

.set-row:has(b) {
  grid-template-columns: auto minmax(0, 1fr) repeat(3, 28px);
}

.playlist-picker-row .service-badge {
  min-width: 52px;
}

.set-source-title {
  margin-top: 8px;
}

.set-row b {
  color: #4fc3ff;
  font-family: var(--mono);
  font-size: 0.68rem;
  min-width: 22px;
}

.set-row-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #c8d4e0;
}

.set-row-meta strong,
.set-row-meta small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.set-row-meta strong {
  color: #d9e7f3;
  font-size: 0.8rem;
  font-weight: 850;
}

.set-row-meta small {
  margin-top: 2px;
  color: #71818f;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
}

.set-row button {
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid #04060a;
  border-radius: 4px;
  background: linear-gradient(180deg, #2b3440, #171c24);
  color: #c8d4e0;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(190, 214, 235, 0.12);
}

.set-row button:disabled { opacity: 0.3; }

.set-preview {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #04060a;
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(79, 195, 255, 0.055), transparent 48%),
    linear-gradient(180deg, #141a22, #0b0f15);
  box-shadow: inset 0 1px 0 rgba(190, 214, 235, 0.08);
}

.set-preview.compact {
  margin-top: 0;
  margin-bottom: 10px;
  padding: 12px;
}

.set-preview.compact .set-preview-head {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
}

.set-preview.compact .set-preview-controls {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(64px, 1fr));
  justify-content: center;
  align-items: center;
}

.set-preview.compact .set-preview-controls button,
.set-preview.compact .set-preview-controls a {
  min-height: 58px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  text-align: center;
  font-size: 0.86rem;
  letter-spacing: 0.12em;
}

.set-preview.compact #setPlayTrack,
.set-preview.compact #setOpenTrack {
  font-size: 1.25rem;
  letter-spacing: 0;
}

.set-preview-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.set-preview-head h3 {
  margin: 0;
  color: #d9e7f3;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.set-preview-head p:last-child {
  margin: 4px 0 0;
  color: #71818f;
  font-size: 0.78rem;
}

.set-preview-controls {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.set-preview-controls button,
.set-preview-controls a {
  min-height: 34px;
  border: 1px solid #04060a;
  border-radius: 5px;
  padding: 0 10px;
  background: linear-gradient(180deg, #2b3440, #171c24);
  color: #c8d4e0;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(190, 214, 235, 0.12);
}

.set-preview-controls button:disabled,
.set-preview-controls a.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.set-now {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(79, 195, 255, 0.22);
  border-radius: 6px;
  background: rgba(79, 195, 255, 0.055);
  color: #bfe8ff;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.set-preview-tracks {
  display: grid;
  gap: 5px;
  max-height: 260px;
  margin-top: 10px;
  overflow: auto;
}

.set-preview-track {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  border: 1px solid #04060a;
  border-radius: 5px;
  padding: 7px 9px;
  background: linear-gradient(180deg, #151b23, #0f1319);
  color: #c8d4e0;
  text-align: left;
}

.playlist-picker-row {
  appearance: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.set-preview-track.active {
  border-color: rgba(79, 195, 255, 0.52);
  background: linear-gradient(180deg, #1a2833, #101c26);
  box-shadow: inset 3px 0 0 #4fc3ff;
}

.set-preview-track-index,
.set-preview-track-time {
  color: #71818f;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
}

.set-preview-track-main {
  min-width: 0;
}

.set-preview-track-main strong,
.set-preview-track-main small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.set-preview-track-main strong {
  color: #d9e7f3;
  font-size: 0.8rem;
}

.set-preview-track-main small {
  margin-top: 2px;
  color: #71818f;
  font-size: 0.68rem;
}

@media (max-width: 680px) {
  .set-columns { grid-template-columns: minmax(0, 1fr); }
  .set-preview-head { grid-template-columns: minmax(0, 1fr); }
  .set-preview-controls { justify-content: flex-start; }
  .set-list { min-height: 320px; }
}

/* Audition toggle as topbar pill (moved out of transport) */
.audition-toggle {
  min-height: 38px;
  border: 1px solid rgba(79, 195, 255, 0.34);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(79, 195, 255, 0.09);
  color: var(--gold-2);
  font-size: 0.78rem;
  font-weight: 850;
}

.audition-toggle.active {
  border-radius: 999px !important;
}

/* Mobile transport order: -30, Play, +30, Prev, Open, Next */
@media (max-width: 720px) {
  .transport #seekBack { order: 1; }
  .transport #playTrack { order: 2; }
  .transport #seekForward { order: 3; }
  .transport #prevTrack { order: 4; }
  .transport #openTrack { order: 5; }
  .transport #nextTrack { order: 6; }
}

/* RT-3000 page nav (rack switch strip) */
.rt-nav {
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid #04060a;
  border-radius: 7px;
  background: #0e1218;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.rt-nav a {
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #71818f;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
}

.rt-nav a:hover {
  color: #c8d4e0;
  background: rgba(255, 255, 255, 0.04);
}

.rt-nav a[aria-current="page"] {
  border-color: rgba(79, 195, 255, 0.5);
  background: linear-gradient(180deg, #1a2733, #12202c);
  color: #7fd4ff;
  box-shadow: inset 0 1px 0 rgba(127, 212, 255, 0.2), 0 0 14px rgba(79, 195, 255, 0.15);
}

.rt-datacard {
  padding: 18px 34px;
}

.snapshot-stats {
  color: #8fa0b3;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.studio-console {
  padding: 22px 34px 30px;
}

.studio-grid,
.studio-two {
  display: grid;
  gap: 14px;
}

.studio-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.studio-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  margin-left: -4px;
  margin-right: -4px;
  padding-top: 14px;
  border-top: 1px solid rgba(143, 160, 179, 0.12);
}

.studio-section-nav a {
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border: 1px solid rgba(79, 195, 255, 0.2);
  border-radius: 5px;
  background: linear-gradient(180deg, #151d27, #0a0e14);
  color: #9fdfff;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.studio-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.studio-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #04060a;
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(79, 195, 255, 0.07), transparent 48%),
    linear-gradient(180deg, #151b23, #0e1218);
  box-shadow: inset 0 1px 0 rgba(190, 214, 235, 0.09);
}

.studio-card.wide {
  grid-column: span 1;
}

.studio-card h3 {
  margin: 0 0 8px;
  color: #d9e7f3;
  font-size: 1.05rem;
}

.studio-statline,
.studio-copy,
.studio-list,
.health-list {
  color: #8fa0b3;
  font-size: 0.84rem;
  line-height: 1.4;
}

.studio-copy {
  margin: 0 0 12px;
}

.studio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.studio-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.studio-card-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(79, 195, 255, 0.22);
  border-radius: 5px;
  background: linear-gradient(180deg, #172230, #0a0f16);
  color: #cfefff;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.apple-folder-settings {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.apple-folder-settings label {
  color: #d7d1c3;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.studio-inline-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.studio-inline-controls select,
.studio-inline-controls input,
.studio-full-select {
  min-height: 34px;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0 10px;
}

.studio-inline-controls button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(79, 195, 255, 0.22);
  border-radius: 5px;
  background: linear-gradient(180deg, #172230, #0a0f16);
  color: #cfefff;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.studio-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid rgba(143, 160, 179, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #c8d4e0;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 850;
  text-transform: uppercase;
}

.studio-tag.good {
  border-color: rgba(79, 195, 255, 0.45);
  color: #bfe8ff;
}

.studio-tag.bad {
  border-color: rgba(255, 106, 88, 0.45);
  color: #ffb6aa;
}

.health-list,
.studio-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
}

.studio-crate-group {
  display: grid;
  gap: 8px;
}

.studio-crate-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.studio-crate-group:not(.has-children) .studio-crate-head {
  grid-template-columns: minmax(0, 1fr);
}

.studio-crate-toggle {
  width: 34px;
  min-height: 100%;
  border: 1px solid #04060a;
  border-radius: 6px;
  background: linear-gradient(180deg, #151d27, #0b1017);
  color: #7fd4ff;
  font-size: 1.2rem;
  font-weight: 900;
}

.studio-crate-group.expanded .studio-crate-toggle {
  color: #dff5ff;
  box-shadow: inset 0 0 0 1px rgba(79, 195, 255, 0.22), 0 0 14px rgba(79, 195, 255, 0.12);
}

.studio-crate-children {
  display: grid;
  gap: 6px;
  margin-left: 22px;
  padding-left: 10px;
  border-left: 1px solid rgba(79, 195, 255, 0.16);
}

.health-row,
.studio-issue {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #04060a;
  border-radius: 6px;
  background: linear-gradient(180deg, #141a22, #0d1118);
}

.health-row {
  grid-template-columns: minmax(0, 1fr) minmax(130px, 220px) 54px;
  align-items: center;
}

.health-row.child {
  background: linear-gradient(180deg, #111720, #0a0e14);
}

.health-row.virtual-parent {
  border-style: dashed;
}

.health-row[data-score="good"] .health-score {
  color: #50f2a4;
}

.health-row[data-score="warn"] .health-score {
  color: #f8d56c;
}

.health-row[data-score="bad"] .health-score {
  color: #ff8b84;
}

.health-row strong,
.studio-issue strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #d9e7f3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-row small,
.studio-issue span {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #71818f;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-meter {
  height: 9px;
  border: 1px solid #04060a;
  border-radius: 999px;
  background: #070a0f;
  overflow: hidden;
}

.health-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1583c4, #8fd9ff);
}

.health-score {
  color: #8fd9ff;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: right;
}

.studio-issue.actionable {
  gap: 10px;
}

.studio-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.studio-action-row.wrap {
  display: flex;
  flex-wrap: wrap;
}

.studio-action-row select,
.studio-action-row button {
  min-height: 34px;
  border: 1px solid rgba(79, 195, 255, 0.22);
  border-radius: 5px;
  background: linear-gradient(180deg, #151d27, #0a0e14);
  color: #d9e7f3;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.studio-action-row button {
  padding: 0 12px;
  color: #bfe8ff;
}

.controller-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.controller-console {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1fr);
  gap: 12px;
}

.controller-status-card,
.midi-event-log {
  min-width: 0;
  padding: 16px;
  border: 1px solid #04060a;
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(79, 195, 255, 0.08), transparent 42%),
    linear-gradient(180deg, #141a22, #0b1017);
  box-shadow: inset 0 1px 0 rgba(220, 240, 255, 0.08);
}

.controller-status-card.primary {
  border-color: rgba(79, 195, 255, 0.22);
}

.controller-status-card h3 {
  margin: 0 0 8px;
  color: #e8f5ff;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.controller-status-card p {
  margin: 0;
  color: #8fa0b3;
  line-height: 1.35;
}

.controller-map {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}

.controller-map article {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 10px;
  border: 1px solid #04060a;
  border-radius: 7px;
  background: linear-gradient(180deg, #171f2a, #0b1017);
  text-align: center;
}

.controller-map span {
  color: #7fd4ff;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.controller-map strong {
  color: #e8f5ff;
  font-size: 0.86rem;
  text-transform: uppercase;
}

.midi-event-log {
  grid-column: 1 / -1;
  color: #50f2a4;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 800;
  min-height: 54px;
}

.controller-grid article {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #04060a;
  border-radius: 7px;
  background: linear-gradient(180deg, #141a22, #0b1017);
}

.controller-grid span {
  color: #7fd4ff;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.controller-grid strong {
  color: #e8f5ff;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.controller-grid small {
  color: #8fa0b3;
  line-height: 1.35;
}

.product-shell {
  min-height: 100vh;
}

.product-hero {
  padding: clamp(28px, 6vw, 70px);
  overflow: hidden;
}

.product-hero h1 {
  max-width: 920px;
  margin: 0 0 18px;
  color: #e8f5ff;
  font-size: clamp(2.45rem, 6vw, 5.8rem);
  line-height: 0.88;
  letter-spacing: 0;
  text-transform: uppercase;
}

.product-hero p {
  max-width: 800px;
  color: #9dafc1;
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.35;
}

.product-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: clamp(20px, 5vw, 54px);
  align-items: center;
}

.product-deck-preview {
  min-height: 430px;
  display: grid;
  align-content: end;
  gap: 18px;
  padding: 22px;
  border: 1px solid #020409;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(79, 195, 255, 0.2), transparent 38%),
    radial-gradient(circle at 72% 22%, rgba(80, 242, 164, 0.18), transparent 34%),
    linear-gradient(180deg, #151b23, #07090d 70%);
  box-shadow: inset 0 1px 0 rgba(220, 240, 255, 0.12), 0 28px 70px rgba(0, 0, 0, 0.42);
}

.preview-screen {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(79, 195, 255, 0.22);
  border-radius: 8px;
  background: #04070b;
  color: #dff5ff;
  font-family: var(--mono);
  box-shadow: inset 0 0 30px rgba(79, 195, 255, 0.08);
}

.preview-screen span {
  color: #7fd4ff;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.preview-screen strong {
  font-size: 1.4rem;
  text-transform: uppercase;
}

.preview-screen i {
  height: 72px;
  border-radius: 5px;
  background:
    repeating-linear-gradient(90deg, rgba(127, 212, 255, 0.2) 0 2px, transparent 2px 9px),
    linear-gradient(90deg, transparent, rgba(80, 242, 164, 0.35), transparent);
}

.preview-pads {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.preview-pads span {
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid #020409;
  border-radius: 7px;
  background: linear-gradient(180deg, #1b2530, #0c1118);
  color: #f8d56c;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 950;
}

.product-actions,
.product-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.product-actions a,
.product-foot a {
  min-height: 46px;
  display: inline-grid;
  place-items: center;
  padding: 0 18px;
  border: 1px solid rgba(79, 195, 255, 0.32);
  border-radius: 6px;
  background: linear-gradient(180deg, #182430, #0e151d);
  color: #bfe8ff;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.product-grid-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-grid .rt-unit {
  min-height: 190px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(79, 195, 255, 0.08), transparent 40%),
    linear-gradient(180deg, #141a22, #0c1016);
}

.product-grid h2 {
  margin: 8px 0 10px;
  color: #e8f5ff;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  line-height: 1;
  text-transform: uppercase;
}

.product-grid p {
  color: #8fa0b3;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .product-hero-grid,
  .product-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-deck-preview {
    min-height: 300px;
  }
}

.history-page {
  max-height: 480px;
  overflow: auto;
}

body.driving-mode .rt-nav { display: none; }

@media (max-width: 900px) {
  .topbar .rt-nav { order: 3; flex-basis: 100%; justify-content: center; flex-wrap: wrap; }
  .topbar.rt-unit { flex-wrap: wrap; }
  .studio-grid,
  .studio-two,
  .controller-grid,
  .controller-console {
    grid-template-columns: minmax(0, 1fr);
  }

  .controller-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .health-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .health-score {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .rt-nav {
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
  }
  .rt-nav a {
    padding: 6px 9px;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }
}

@media (max-width: 720px) {
  /* topbar is flex-direction: column here — kill the row-wrap tricks */
  .topbar.rt-unit {
    flex-wrap: nowrap;
  }
  .topbar .rt-nav {
    order: 0;
    flex-basis: auto;
    align-self: stretch;
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .sync-center.rt-unit,
  .ai-builder.rt-unit,
  .set-builder.rt-unit,
  .studio-console.rt-unit,
  .rt-datacard {
    padding-left: 20px;
    padding-right: 20px;
  }
  .sync-center .pane-title,
  .set-builder .pane-title,
  .ai-builder .pane-title {
    flex-wrap: wrap;
  }
  .sync-summary,
  .snapshot-stats {
    overflow-wrap: anywhere;
  }
  .sync-item {
    min-width: 0;
  }
}

/* Seth punch list 2026-07-06 evening */

/* 2. Track Details spacing */
.rt-details {
  padding: 14px 16px;
}

.rt-details summary {
  margin-bottom: 12px;
}

.rt-details .detail-list {
  margin: 0 0 14px;
}

.reclassify-panel {
  margin: 14px 0;
}

.reclassify-panel label {
  display: block;
  margin-bottom: 8px;
}

.rt-details .detail-link {
  margin-top: 12px;
  width: 100%;
}

.rt-details .status {
  margin-top: 12px;
}

/* 3. Extend the note strip to full deck width */
.notes-row.rt-scribble {
  width: 100%;
}

/* 4. Set Builder: balanced bins + proper empty state */
.set-list {
  align-content: start;
}

.set-list.empty {
  display: grid;
  place-items: center;
  border-style: dashed;
  border-color: #242e3a;
  color: #53616f;
  font-style: italic;
}

/* 5. Yellow tags readable everywhere */
.badge {
  color: #0b0804;
  font-weight: 900;
}

.badge.maybe {
  background: #ffc93a;
  color: #080500;
}

.badge.hook {
  color: #120a1c;
}

.badge.transition {
  color: #04191f;
}

.history-label {
  font-size: 0.66rem;
}

.history-label.maybe,
.badge.maybe {
  color: #080500 !important;
  font-weight: 950;
  text-shadow: none !important;
}

/* Sticky rack header + icon-only controls */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar.rt-unit {
  position: sticky;
  top: 12px;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(140%);
}

.topbar.rt-unit::before,
.topbar.rt-unit::after {
  z-index: 101;
}

.top-icon-action {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
}

.settings-link.top-icon-action {
  border: 1px solid rgba(143, 160, 179, 0.26);
  background: linear-gradient(180deg, #171e28, #0b1017);
  color: #9dafc1;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(220, 240, 255, 0.08);
}

.settings-link.top-icon-action:hover,
.settings-link.top-icon-action.active {
  border-color: rgba(79, 195, 255, 0.55);
  color: #bfe8ff;
  box-shadow: inset 0 1px 0 rgba(127, 212, 255, 0.18), 0 0 18px rgba(79, 195, 255, 0.16);
}

.top-icon-action svg,
.note-icon-button svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

.note-icon-button svg {
  width: 14px;
  height: 14px;
}

.top-icon-action svg {
  width: 20px;
  height: 20px;
}

.drive-toggle[aria-pressed="true"].top-icon-action,
.audition-toggle.active.top-icon-action {
  color: #03131e !important;
}

.notes-row.rt-scribble {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) repeat(3, 36px);
}

.rt-scribble .note-icon-button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  letter-spacing: 0;
}

.rt-scribble #clearRating {
  color: #aab7c6;
}

@media (max-width: 720px) {
  .topbar.rt-unit {
    top: 8px;
  }

  .topbar .sync-pill {
    max-width: min(100%, 230px);
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 8px;
    font-size: 0.58rem;
    letter-spacing: 0.06em;
  }

  .top-icon-action {
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
  }

  .top-actions {
    justify-content: center;
  }

  .notes-row.rt-scribble {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rt-scribble input {
    grid-column: 1 / -1;
  }

  .rt-scribble .note-icon-button {
    width: 100%;
    min-width: 0;
  }

  .bulk-track-actions {
    grid-template-columns: 1fr 1fr;
  }
}

/* Keyboard shortcuts overlay */
.shortcuts-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.shortcuts-card {
  background: var(--surface, #141821);
  border: 1px solid var(--border, #2a3245);
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 480px;
  width: 90%;
}
.shortcuts-card h2 {
  margin: 0 0 16px;
  font-size: 18px;
}
.shortcuts-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shortcuts-grid > div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.shortcuts-grid kbd {
  display: inline-block;
  padding: 2px 8px;
  background: #1e2532;
  border: 1px solid #3a4256;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  min-width: 20px;
  text-align: center;
}
.shortcuts-grid span {
  color: var(--text-dim, #9aa6b8);
}
.shortcuts-hint {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--text-dim, #9aa6b8);
  text-align: center;
}

/* Set export buttons */
.set-export-buttons {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  flex-wrap: wrap;
}
.set-export-buttons button {
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid var(--border, #2a3245);
  background: var(--surface-2, #1a2030);
  color: var(--text, #e0e4ec);
  border-radius: 6px;
  cursor: pointer;
}
.set-export-buttons button:hover:not(:disabled) {
  border-color: var(--accent, #4a8cff);
  background: #1e2640;
}
.set-export-buttons button:disabled {
  opacity: 0.5;
  cursor: default;
}

/* BPM/Key badges in track details */
.detail-list dd {
  font-variant-numeric: tabular-nums;
}
