:root {
  color-scheme: dark;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --radius: 8px;
  --accent: #58d6f7;
  --accent-contrast: #06131a;
  --border: rgba(143, 160, 179, 0.18);
  --bg: #0a0c11;
  --bg-2: #0e1116;
  --panel: rgba(22, 27, 34, 0.92);
  --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: var(--border);
  --line-soft: var(--border);
  --gold: var(--accent);
  --gold-2: var(--accent);
  --green: #74d99f;
  --amber: #d8bd78;
  --red: #e67b72;
  --cyan: var(--accent);
  --violet: #a8a1cf;
  --focus: #7fd4ff;
  --shadow: none;
  --inner: none;
  --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;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: #0a0c11;
  color: var(--text);
  font-family: var(--font);
  font-feature-settings: "calt", "kern", "liga", "ss03";
  letter-spacing: 0;
}

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;
}

.account {
  text-decoration: none;
}

.account:hover {
  color: #d9f5ff;
}

.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 svg,
#setOpenTrack svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button svg path,
#setOpenTrack svg path {
  fill: none;
  stroke: currentColor;
}

.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);
}

.playlist-folder-button.midi-focus {
  border-color: rgba(79, 195, 255, 0.5);
  background: rgba(79, 195, 255, 0.085);
  box-shadow: inset 3px 0 0 var(--accent);
}

.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-entry.child {
  grid-template-columns: minmax(0, 1fr);
  padding-left: 10px;
}

.playlist-children .playlist-entry.child::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  width: 16px;
  border-top: 1px solid rgba(79, 195, 255, 0.22);
}

.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.midi-focus:not(.active) {
  border-color: rgba(79, 195, 255, 0.5);
  background: rgba(79, 195, 255, 0.085);
  box-shadow: inset 3px 0 0 var(--accent);
}

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

.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 {
  display: grid;
  gap: 2px;
  justify-items: end;
  color: #71818f;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-align: right;
}

.service-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #6a747e;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.service-dot.spotify {
  background: center / contain no-repeat url("/brand/spotify-primary-logo-green.png");
}

.service-dot.apple_music {
  border-radius: 5px;
  background: center / contain no-repeat url("/brand/apple-music-icon.png");
  box-shadow: none;
}

.service-dot.tidal {
  background: #dfe6ea;
}

.service-open-logo {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #6a747e;
}

.service-open-logo.spotify {
  background: center / contain no-repeat url("/brand/spotify-primary-logo-green.png");
}

.service-open-logo.apple_music {
  border-radius: 5px;
  background: center / contain no-repeat url("/brand/apple-music-icon.png");
}

.service-badge {
  align-self: center;
  justify-self: end;
  min-width: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  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::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #6a747e;
}

.service-badge.spotify::before {
  background: center / contain no-repeat url("/brand/spotify-primary-logo-green.png");
}

.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;
}

.service-badge.apple_music::before {
  border-radius: 3px;
  background: center / contain no-repeat url("/brand/apple-music-icon.png");
}

.service-mark {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #6a747e;
  vertical-align: -2px;
}

.service-mark.spotify {
  background: center / contain no-repeat url("/brand/spotify-primary-logo-green.png");
}

.service-mark.apple_music {
  border-radius: 4px;
  background: center / contain no-repeat url("/brand/apple-music-icon.png");
}

.service-mark.tidal { background: #dfe6ea; }

.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;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  font-weight: 820;
}

.transport button[hidden],
.detail-link[hidden] {
  display: none;
}

.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.crate-flow-dialog {
  width: min(720px, calc(100vw - 24px));
}

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

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

.crate-flow-panel {
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(79, 195, 255, 0.2);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(79, 195, 255, 0.11), transparent 30%),
    linear-gradient(180deg, #151d27, #080d13);
  box-shadow: inset 0 1px 0 rgba(230, 245, 255, 0.08);
}

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

.crate-dialog-head h2 {
  margin: 2px 0 6px;
  color: #edf6ff;
}

.crate-dialog-badge {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(79, 227, 156, 0.28);
  border-radius: 999px;
  background: rgba(42, 117, 82, 0.2);
  color: #baffde;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crate-flow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

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

.crate-flow-steps div {
  min-height: 86px;
  padding: 12px;
  border: 1px solid rgba(79, 195, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.crate-flow-steps strong,
.crate-flow-steps span,
.copy-target small {
  display: block;
}

.crate-flow-steps strong {
  color: #eef7ff;
  font-size: 0.86rem;
}

.crate-flow-steps span,
.copy-target small {
  margin-top: 5px;
  color: #8fa0b3;
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.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.05rem;
  letter-spacing: 0.04em;
}

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

#pinWrap[hidden] {
  display: none;
}

.ghost-button {
  width: 100%;
  min-height: 54px;
  margin-top: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-strong);
  font-weight: 700;
}

.text-button {
  margin-top: 10px;
  padding: 0;
  background: transparent;
  color: var(--gold-2);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
}

.forgot-password-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.forgot-password-form input,
.forgot-password-form button {
  min-height: 54px;
  border-radius: 8px;
}

.forgot-password-form input {
  padding: 0 14px;
}

.forgot-password-form button {
  border: 1px solid rgba(79, 195, 255, 0.42);
  background: linear-gradient(180deg, rgba(79, 195, 255, 0.28), rgba(79, 195, 255, 0.13));
  color: var(--gold-2);
  font-weight: 850;
}

.reset-panel {
  width: min(520px, 100%);
}

.reset-invalid {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 95, 87, 0.28);
  border-radius: 10px;
  background: rgba(255, 95, 87, 0.08);
}

.reset-invalid p {
  margin-bottom: 10px;
}

.reset-invalid a {
  color: var(--gold-2);
  font-weight: 700;
  text-decoration: none;
}

.reset-invalid a:hover,
.reset-invalid a:focus-visible {
  text-decoration: underline;
}

@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;
  }
}

/* Correction pass: page-specific operational depth for empty and waiting states. */
.empty-console-head { max-width: 680px; }
.empty-console-head h2 { margin: 4px 0 8px; }
.empty-console-head p:last-child { margin: 0; color: #9199a1; line-height: 1.55; }
.crates-workbench .crate-empty-state { min-height: 560px; align-content: start; justify-items: stretch; gap: 18px; padding: 28px; text-align: left; }
.empty-console-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.empty-console-grid article { min-height: 126px; display: grid; align-content: start; gap: 6px; padding: 15px; border: 1px solid rgba(255,255,255,.075); border-radius: 8px; background: rgba(0,0,0,.24); }
.empty-console-grid article > span { color: #3edc78; font: 700 10px/1 var(--mono); letter-spacing: .12em; }
.empty-console-grid article > strong { color: #e7ece8; font-size: 14px; }
.empty-console-grid article > small { color: #7e8991; font-size: 11px; line-height: 1.5; }
.empty-console-readout { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr; gap: 8px 14px; align-items: center; padding: 12px 14px; border: 1px solid rgba(62,220,120,.14); border-radius: 8px; background: rgba(62,220,120,.035); }
.empty-console-readout span { color: #68727a; font: 9px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.empty-console-readout strong { color: #bfc7c3; font: 700 11px/1 var(--mono); }
.analyze-brief { display: grid; gap: 10px; margin-top: 4px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.075); }
.analyze-brief-grid { display: grid; gap: 7px; }
.analyze-brief-grid div { display: grid; grid-template-columns: 24px 1fr; gap: 3px 8px; padding: 10px; border: 1px solid rgba(255,255,255,.065); border-radius: 7px; background: rgba(255,255,255,.018); }
.analyze-brief-grid span { grid-row: 1 / span 2; color: #3edc78; font: 700 9px/1.4 var(--mono); }
.analyze-brief-grid strong { color: #dce2df; font-size: 11px; }
.analyze-brief-grid small, .analyze-brief-note { color: #758087; font-size: 10px; line-height: 1.45; }
.analyze-brief-note { margin: 0; }
.history-signal-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #27313a; border-bottom: 1px solid #27313a; background: #090c0f; }
.history-signal-strip > div { display: grid; gap: 5px; padding: 11px 18px; border-right: 1px solid #27313a; }
.history-signal-strip > div:last-child { border-right: 0; }
.history-signal-strip span { color: #657078; font: 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.history-signal-strip strong { overflow: hidden; color: #c9d0cc; font: 600 11px/1.2 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.set-empty-console, .sync-empty-console { min-height: 180px; display: grid; align-content: center; justify-items: start; gap: 9px; padding: 20px; border: 1px dashed rgba(255,255,255,.11); border-radius: 8px; background: repeating-linear-gradient(135deg,rgba(255,255,255,.014) 0 1px,transparent 1px 10px); }
.set-empty-console.player { min-height: 330px; }
.set-empty-console strong, .sync-empty-console strong { color: #dce2df; font-size: 14px; }
.set-empty-console span, .set-empty-console small, .sync-empty-console span { max-width: 520px; color: #7d878e; font-size: 11px; line-height: 1.55; }
.set-empty-console a, .sync-empty-console a { color: #8ff8b5; font: 700 10px/1 var(--mono); text-decoration: none; text-transform: uppercase; }
.sync-operation-guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: auto 20px 20px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.07); }
.sync-operation-guide > div { display: grid; grid-template-columns: 9px 1fr; gap: 4px 8px; padding: 10px; border-radius: 7px; background: rgba(255,255,255,.018); }
.sync-operation-guide i { grid-row: 1 / span 2; width: 7px; height: 7px; margin-top: 3px; border-radius: 50%; background: #778087; }
.sync-operation-guide i.syncing, .sync-operation-guide i.done { background: #3edc78; }
.sync-operation-guide i.failed { background: #e67b72; }
.sync-operation-guide strong { color: #cfd5d2; font-size: 11px; }
.sync-operation-guide span { color: #707a82; font-size: 10px; line-height: 1.4; }
.sync-empty-console { min-height: 270px; }
.sync-empty-console.compact { min-height: 150px; }
.datacard-guidance { margin: 12px 0 0; color: #747f86; font-size: 10px; line-height: 1.55; }

@media (max-width: 720px) {
  .empty-console-grid, .history-signal-strip, .sync-operation-guide { grid-template-columns: 1fr; }
  .crates-workbench .crate-empty-state { min-height: 0; padding: 18px; }
  .empty-console-readout { grid-template-columns: auto 1fr; }
  .history-signal-strip > div { border-right: 0; border-bottom: 1px solid #27313a; }
  .history-signal-strip > div:last-child { border-bottom: 0; }
  .set-empty-console.player, .sync-empty-console { min-height: 220px; }
}

/* Authenticated core rebuild: bodies are workbenches, not stacked marketing bands. */
.core-workbench { margin-top: 12px; }
.core-workbench > .pane-title:first-child {
  margin: -16px -16px 16px; padding: 18px 20px; border-bottom: 1px solid #26303a;
  background: linear-gradient(90deg, rgba(62,220,120,.07), transparent 38%), #0a0d10;
}
.core-workbench > .pane-title:first-child h2 { font-size: clamp(1.45rem, 2.5vw, 2.2rem); }

.crates-workbench { grid-template-columns: minmax(280px, .72fr) minmax(0, 2fr); gap: 0; padding: 0; overflow: hidden; }
.crates-workbench .crates-sidebar { padding: 18px; background: #090c0f; border-right: 1px solid #27313a; }
.crates-workbench .crates-detail { padding: 18px 20px; background: radial-gradient(circle at 80% 0, rgba(77,181,255,.06), transparent 38%); }
.crates-workbench .crate-cards { display: grid; gap: 7px; }
.crates-workbench .crate-empty-state { min-height: 440px; display: grid; align-content: center; justify-items: center; text-align: center; background: repeating-linear-gradient(135deg, rgba(255,255,255,.014) 0 1px, transparent 1px 10px); }

.analyze-workbench { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); grid-template-areas: "title controls" "chat controls" "form controls" "result result" "status status"; gap: 12px; padding: 0; overflow: hidden; }
.analyze-workbench > .ai-title { grid-area: title; margin: 0; padding: 22px; background: linear-gradient(135deg, rgba(62,220,120,.09), transparent 55%); border-bottom: 1px solid #27313a; }
.analyze-workbench .ai-controls { grid-area: controls; display: grid; align-content: start; gap: 12px; padding: 20px; border-left: 1px solid #27313a; background: #090c0f; }
.analyze-workbench .ai-extend-panel { grid-area: controls; align-self: end; margin: 20px; z-index: 1; }
.analyze-workbench .ai-chat-shell { grid-area: chat; margin: 0 20px; min-height: 340px; }
.analyze-workbench .ai-form { grid-area: form; margin: 0 20px 20px; }
.analyze-workbench .ai-result { grid-area: result; margin: 0 20px; }
.analyze-workbench > .status { grid-area: status; margin: 0 20px 18px; }

.history-workbench { padding: 0; overflow: hidden; }
.history-workbench > .pane-title { margin: 0; padding: 18px 20px; }
.history-workbench .set-columns { grid-template-columns: minmax(240px, .65fr) minmax(0, 1.65fr); gap: 0; margin-top: 0; border-top: 1px solid #27313a; }
.history-workbench .set-col { padding: 18px; min-height: 560px; }
.history-workbench .set-col:first-child { background: #090c0f; border-right: 1px solid #27313a; }
.history-workbench .set-preview { position: sticky; top: 10px; z-index: 2; background: linear-gradient(135deg, rgba(62,220,120,.1), #0b1013 48%); }
.history-workbench > .status { padding: 0 20px 18px; }

.sync-workbench { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 12px; }
.sync-workbench .sync-queue-panel { grid-row: span 2; min-height: 650px; padding: 0; overflow: hidden; }
.sync-workbench .sync-queue-panel > .pane-title { padding: 20px; border-bottom: 1px solid #27313a; background: linear-gradient(90deg, rgba(62,220,120,.08), transparent); }
.sync-workbench .sync-summary { margin: 16px 20px 0; }
.sync-workbench .sync-list { padding: 12px 20px 20px; }
.sync-workbench .rt-datacard { margin: 0; padding: 18px; }

.studio-workbench { display: grid; grid-template-columns: 230px minmax(0, 1fr); padding: 0; overflow: hidden; }
.studio-workbench > .pane-title { grid-column: 1 / -1; margin: 0; padding: 18px 20px; border-bottom: 1px solid #27313a; }
.studio-workbench .studio-shell { display: contents; }
.studio-workbench .studio-tabs { flex-direction: column; align-items: stretch; gap: 4px; padding: 16px; border-right: 1px solid #27313a; background: #080b0e; }
.studio-workbench .studio-tab { width: 100%; justify-content: flex-start; min-height: 42px; border-left: 2px solid transparent; }
.studio-workbench .studio-tab.is-active { border-left-color: #3edc78; background: rgba(62,220,120,.08); }
.studio-workbench .studio-tab-content { min-width: 0; padding: 20px; }

.discover-workbench { display: grid; grid-template-columns: minmax(270px, .55fr) minmax(0, 1.65fr); gap: 12px; }
.discover-console { min-height: 720px; padding: 22px; display: flex; flex-direction: column; gap: 22px; background: linear-gradient(180deg, rgba(62,220,120,.075), transparent 28%), #090c0f; }
.discover-console h2 { margin: 4px 0 8px; font-size: 2rem; letter-spacing: -.04em; }
.discover-search { display: grid; gap: 7px; color: #8a949d; font: 700 .68rem var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.discover-search input { min-height: 46px; padding: 0 12px; }
.discover-filters { display: grid; gap: 6px; }
.discover-filters button, #discoverReload { min-height: 40px; border: 1px solid #29333d; border-radius: 6px; background: #0e1318; color: #aeb7bd; text-align: left; padding: 0 12px; }
.discover-filters button.is-active { border-color: rgba(62,220,120,.55); background: rgba(62,220,120,.09); color: #9af8bd; }
.discover-readouts { margin: auto 0 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #27313a; }
.discover-readouts div { padding: 10px; border-right: 1px solid #27313a; }.discover-readouts div:last-child { border: 0; }
.discover-readouts dt { color: #66717a; font: 600 .56rem var(--mono); text-transform: uppercase; }.discover-readouts dd { margin: 4px 0 0; color: #ecf4ef; font: 800 1.2rem var(--mono); }
.discover-library { padding: 20px; overflow: hidden; }
.discover-library-head, .discover-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.discover-library-head h2 { margin: 4px 0 0; font-size: 1.75rem; }.discover-section-head { margin: 22px 0 10px; border-bottom: 1px solid #27313a; padding-bottom: 8px; }.discover-section-head h3 { margin: 0; }
.discover-feature { min-height: 260px; margin-top: 18px; padding: 22px; display: grid; grid-template-columns: 1fr minmax(260px, .75fr); align-items: center; gap: 24px; border: 1px solid #29333d; background: radial-gradient(circle at 75% 30%, rgba(77,181,255,.15), transparent 38%), linear-gradient(135deg, #10181a, #0b0e12); }
.discover-feature > div:first-child h3 { margin: 8px 0; font-size: clamp(2rem, 4vw, 4rem); letter-spacing: -.055em; line-height: .95; }
.discover-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.discover-card { min-width: 0; border: 1px solid #27313a; background: #0b0f13; overflow: hidden; }.discover-art { aspect-ratio: 1; position: relative; overflow: hidden; background: linear-gradient(135deg,#173126,#0a0d10); }.discover-art img { width: 100%; height: 100%; object-fit: cover; }.tone-1 { background: linear-gradient(135deg,#37264b,#0b0d12); }.tone-2 { background: linear-gradient(135deg,#19394a,#0a0d10); }.tone-3 { background: linear-gradient(135deg,#4b321b,#0a0d10); }.tone-4 { background: linear-gradient(135deg,#3b1f2c,#0a0d10); }.tone-5 { background: linear-gradient(135deg,#25364c,#0a0d10); }
.discover-source { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; background: rgba(3,5,6,.85); color: #9cf8bd; font: 700 .55rem var(--mono); letter-spacing: .1em; }.discover-source .service-mark { width: 12px; height: 12px; vertical-align: 0; }.discover-card-copy { padding: 11px; }.discover-card-copy h3 { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.discover-card-copy p { margin: 5px 0 10px; color: #7f8991; font-size: .75rem; }.discover-card-copy a { color: #8ff8b5; font-size: .72rem; }
.discover-feature .discover-card { display: grid; grid-template-columns: 150px 1fr; }.discover-feature .discover-art { aspect-ratio: 1; }.discover-empty { grid-column: 1/-1; }

@media (max-width: 980px) {
  .analyze-workbench, .sync-workbench, .discover-workbench { grid-template-columns: 1fr; }
  .analyze-workbench { grid-template-areas: "title" "controls" "chat" "form" "result" "status"; }
  .analyze-workbench .ai-controls { border-left: 0; border-top: 1px solid #27313a; }
  .sync-workbench .sync-queue-panel { grid-row: auto; }
  .discover-console { min-height: 0; }.discover-readouts { margin-top: 0; }
  .discover-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .crates-workbench, .studio-workbench { display: block; }
  .crates-workbench .crates-sidebar { border-right: 0; border-bottom: 1px solid #27313a; }
  .history-workbench .set-columns { grid-template-columns: 1fr; }.history-workbench .set-col:first-child { border-right: 0; border-bottom: 1px solid #27313a; min-height: 320px; }
  .studio-workbench .studio-tabs { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid #27313a; padding: 10px; }.studio-workbench .studio-tab { width: auto; flex: 0 0 auto; }
  .discover-feature { grid-template-columns: 1fr; }.discover-feature .discover-card { display: none; }.discover-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.discover-library { padding: 14px; }.discover-console { padding: 16px; }
}

/* 2026-07-10 page-specific correction pass */
.surface-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 14px;
  padding: 18px 22px;
  border-left: 3px solid var(--accent, #45f0b0);
  background: linear-gradient(90deg, rgba(69, 240, 176, .07), rgba(7, 10, 14, .2) 48%);
}
.surface-command h2 { margin: 4px 0 0; max-width: 760px; font-size: clamp(1.05rem, 2vw, 1.55rem); }
.surface-command ol, .surface-command dl, .command-meter, .prompt-rack, .studio-signal, .midi-path { display: flex; align-items: center; gap: 8px; margin: 0; }
.surface-command ol { list-style: none; padding: 0; }
.surface-command li, .prompt-rack span, .command-meter span, .studio-signal span, .midi-path span { padding: 8px 10px; border: 1px solid #26313d; color: #c5ced8; font: 700 .68rem/1 var(--mono); letter-spacing: .08em; }
.surface-command li span { margin-right: 7px; color: var(--accent, #45f0b0); }
.surface-command dl div { min-width: 82px; padding-left: 10px; border-left: 1px solid #2b3741; }
.surface-command dt { color: #738091; font: .6rem var(--mono); text-transform: uppercase; }
.surface-command dd { margin: 3px 0 0; font-weight: 800; }
.command-meter i, .studio-signal i, .midi-path i { width: 28px; height: 1px; background: #45f0b0; box-shadow: 0 0 8px rgba(69,240,176,.55); }
.analyze-command { border-left-color: #b69cff; background: linear-gradient(90deg, rgba(182,156,255,.1), transparent 55%); }
.analyze-command .prompt-rack span { border-color: #554978; color: #d8ccff; }
.sync-command { border-left-color: #5bbcff; }
.history-command { border-left-color: #ffb74f; }
.midi-command { border-left-color: #ff5d92; }

.product-proof-strip, .policy-ledger { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; padding: 0; overflow: hidden; }
.product-proof-strip div, .policy-ledger div { display: grid; gap: 6px; min-height: 112px; padding: 22px; border-right: 1px solid #26303a; align-content: center; }
.product-proof-strip div:last-child, .policy-ledger div:last-child { border-right: 0; }
.product-proof-strip strong, .policy-ledger strong { color: #f1f6f4; font-size: 1.05rem; }
.product-proof-strip span, .policy-ledger span, .terms-scope span { color: #8f9baa; line-height: 1.55; }
.setup-progress-rail { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; padding: 18px; }
.setup-progress-rail span { color: #758293; font: 700 .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.setup-progress-rail span.is-active { color: #45f0b0; }
.setup-progress-rail i { width: 12vw; max-width: 160px; height: 1px; background: #2b3641; }
.terms-scope { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 24px; margin-top: 14px; padding: 20px 24px; border-left: 3px solid #ffb74f; }
.terms-scope div { display: flex; gap: 18px; align-items: baseline; }

.login-page .login-shell, .reset-page .login-shell { width: min(1040px, calc(100% - 32px)); grid-template-columns: 1.1fr .9fr; margin-inline: auto; padding: 0; overflow: hidden; border: 1px solid #26313d; background: #090d12; box-shadow: 0 30px 100px #000; }
.login-stage { display: flex; min-height: 620px; padding: 48px; flex-direction: column; justify-content: space-between; background: radial-gradient(circle at 18% 20%, rgba(69,240,176,.13), transparent 34%), #080c11; border-right: 1px solid #26313d; }
.login-stage h2 { max-width: 520px; margin: 12px 0 44px; font-size: clamp(2.3rem, 5vw, 4.6rem); line-height: .96; letter-spacing: -.055em; }
.login-stage ol { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid #27313b; }
.login-stage li { display: grid; grid-template-columns: 42px 1fr; padding: 15px 0; border-bottom: 1px solid #27313b; color: #c9d2dc; }
.login-stage li span { color: #45f0b0; font: .68rem var(--mono); }
.login-stage > small { color: #596574; font: .62rem var(--mono); letter-spacing: .12em; }
.login-page .login-panel, .reset-page .login-panel { align-self: center; width: auto; margin: 0; border: 0; box-shadow: none; }
.reset-stage { background: radial-gradient(circle at 18% 20%, rgba(91,188,255,.14), transparent 34%), #080c11; }
.recovery-signal { display: flex; align-items: center; gap: 10px; color: #9eabb8; }
.recovery-signal i { width: 9px; height: 9px; border-radius: 50%; background: #5bbcff; box-shadow: 0 0 18px #5bbcff; }

.onboarding-shell { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr); }
.onboarding-stage { grid-row: 1 / span 4; display: flex; padding: 34px; flex-direction: column; background: #080d12; border-right: 1px solid #27313b; }
.onboarding-stage h2 { margin: 10px 0 30px; font-size: clamp(1.7rem, 4vw, 3.2rem); line-height: 1; }
.onboarding-stage ol { display: grid; gap: 0; padding: 0; list-style: none; }
.onboarding-stage li { padding: 12px 0; border-bottom: 1px solid #27313b; font-weight: 750; }
.onboarding-stage li span { display: inline-block; width: 42px; color: #45f0b0; font: .65rem var(--mono); }
.onboarding-stage small { margin-top: auto; color: #758292; }

@media (max-width: 760px) {
  .surface-command { align-items: flex-start; flex-direction: column; padding: 14px; }
  .surface-command ol, .surface-command dl, .command-meter, .prompt-rack, .studio-signal, .midi-path { width: 100%; overflow-x: auto; }
  .surface-command li { flex: 0 0 auto; }
  .crates-command ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; }
  .crates-command li { min-width: 0; padding-inline: 7px; font-size: .58rem; white-space: nowrap; }
  .product-proof-strip, .policy-ledger { grid-template-columns: 1fr; }
  .product-proof-strip div, .policy-ledger div { min-height: 0; border-right: 0; border-bottom: 1px solid #26303a; }
  .terms-scope { grid-template-columns: 1fr; }
  .terms-scope div { align-items: flex-start; flex-direction: column; }
  .login-page .login-shell, .reset-page .login-shell { width: min(100% - 20px, 520px); grid-template-columns: 1fr; margin-block: 10px; }
  .login-stage { min-height: 210px; padding: 24px; border-right: 0; border-bottom: 1px solid #26313d; }
  .login-stage h2 { margin-bottom: 18px; font-size: 2.2rem; }
  .login-stage ol { grid-template-columns: repeat(3, 1fr); }
  .login-stage li { display: flex; gap: 4px; padding: 10px 5px; flex-direction: column; font-size: .72rem; }
  .onboarding-shell { grid-template-columns: 1fr; }
  .onboarding-stage { display: none; }
}

/* The new mockup is a document layout, not the old fixed-height console. */
@media (min-width: 921px) {
  body.console-page {
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.console-page .console-shell {
    height: auto;
    min-height: 100vh;
    display: block;
    overflow: visible;
  }

  body.console-page .console-shell > .rt-main.rt-unit,
  body.console-page .console-shell .rt-main .layout,
  body.console-page .console-shell .details-panel,
  body.console-page .console-shell .queue-panel {
    min-height: 0;
    overflow: visible;
  }

  body.console-page .console-shell .details-panel {
    display: grid;
    grid-template-rows: auto auto auto;
  }

  body.console-page .console-shell .status-console,
  body.console-page .console-shell .status-console .status-log,
  body.console-page .console-shell .rt-details,
  body.console-page .console-shell .rt-history {
    min-height: 0;
    overflow: visible;
  }

  body.console-page .console-shell .queue-panel .track-list {
    max-height: 360px;
    overflow-y: auto;
  }
}

@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: "";
  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;
  }
}

/* ============================================================
   Xfadr 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: "";
  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;
  }
}

/* ============================================================
   Xfadr 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; }

/* --- main unit --- */
.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;
}

.waveform-panel {
  position: relative;
  min-height: 74px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(143, 160, 179, 0.14);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(7, 10, 15, 0.58), rgba(7, 10, 15, 0.34));
  cursor: crosshair;
}

.waveform-panel:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.waveform-panel.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(88, 214, 247, 0.08), transparent);
  animation: waveformLoading 1100ms linear infinite;
}

.waveform-panel.unavailable {
  cursor: default;
}

.waveform-panel canvas {
  display: block;
  width: 100%;
  height: 74px;
}

.waveform-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 16px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
  pointer-events: none;
}

.waveform-panel.ready .waveform-state {
  opacity: 0;
}

@keyframes waveformLoading {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

.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;
}

/* --- details --- */
.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;
}

/* --- 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-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) {
  .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; }
}

/* Xfadr 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);
}

/* Xfadr wiring: status mirror */
.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;
}

/* Xfadr: 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; }
}

/* Xfadr 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 */
@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; }
}

/* Xfadr 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-shell {
  margin-top: 18px;
  display: grid;
  gap: 18px;
}

.studio-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(120, 171, 216, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
}

.studio-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(99, 148, 190, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: #92a9bb;
  font-size: 0.82rem;
  font-weight: 800;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.studio-tab:hover {
  color: #d8edf9;
  border-color: rgba(79, 195, 255, 0.34);
}

.studio-tab-admin {
  margin-top: 12px;
}

.studio-tab.is-active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(88, 214, 247, 0.1);
  box-shadow: inset 2px 0 0 var(--accent);
}

.studio-tab-content {
  display: grid;
  gap: 16px;
}

.studio-tab-content[hidden] {
  display: none;
}

.studio-tab-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

.studio-tab-head h3 {
  margin: 0 0 6px;
  color: #edf6ff;
  font-size: 1.45rem;
}

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

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

.profile-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(260px, 0.85fr);
  gap: 14px;
}

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

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

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

.studio-connections-grid {
  align-items: start;
}

.studio-card,
.studio-tab-content .rt-datacard {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(5, 9, 14, 0.9);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(79, 195, 255, 0.07), transparent 46%),
    linear-gradient(180deg, #151b23, #0d1218);
  box-shadow: inset 0 1px 0 rgba(190, 214, 235, 0.09);
}

.studio-card h3,
.studio-tab-content .rt-datacard h2 {
  margin: 0 0 8px;
  color: #d9e7f3;
}

.studio-card h3 {
  font-size: 1.12rem;
}

.profile-identity-card {
  display: grid;
  gap: 16px;
  border-color: rgba(79, 195, 255, 0.22);
  background:
    radial-gradient(circle at top right, rgba(79, 195, 255, 0.12), transparent 31%),
    linear-gradient(180deg, #141b23, #0c1016);
}

.profile-security-card,
.profile-plan-card {
  display: grid;
  gap: 14px;
}

.profile-security-card {
  grid-column: 1;
}

.profile-plan-card {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-content: start;
  border-color: rgba(214, 188, 141, 0.18);
  background:
    radial-gradient(circle at top right, rgba(214, 188, 141, 0.1), transparent 34%),
    linear-gradient(180deg, #151b23, #0c1016);
}

.profile-mark {
  background: linear-gradient(135deg, rgba(79, 195, 255, 0.24), rgba(14, 20, 28, 0.82));
  color: #d9f5ff;
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 950;
}

.profile-form,
.profile-plan-body {
  display: grid;
  gap: 12px;
}

.studio-card-head.compact {
  display: grid;
  gap: 4px;
}

.studio-card-head.compact .eyebrow {
  margin: 0;
}

.studio-field {
  display: grid;
  gap: 6px;
}

.studio-field span {
  color: #8fa0b3;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.studio-field input {
  min-height: 42px;
  width: 100%;
  border: 1px solid rgba(79, 195, 255, 0.2);
  border-radius: 8px;
  padding: 0 12px;
  background: linear-gradient(180deg, #111923, #070b10);
  color: #eaf5ff;
  font: inherit;
  outline: none;
}

.studio-field input:focus {
  border-color: rgba(79, 195, 255, 0.56);
  box-shadow: 0 0 0 3px rgba(79, 195, 255, 0.1);
}

.studio-action-btn,
.studio-link {
  min-height: 38px;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(79, 195, 255, 0.24);
  border-radius: 8px;
  padding: 0 14px;
  background: linear-gradient(180deg, #172230, #0a0f16);
  color: #cfefff;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.studio-action-btn:disabled {
  opacity: 0.55;
}

.studio-status {
  min-height: 20px;
  color: #8fa0b3;
  font-size: 0.82rem;
}

.studio-meta-row {
  color: #d9e7f3;
  line-height: 1.45;
}

.studio-meta-row strong {
  display: block;
  color: #edf6ff;
  font-size: 1.45rem;
  line-height: 1.05;
}

.studio-meta-row small {
  color: #8fa0b3;
}

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

.studio-copy {
  margin: 0;
}

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

.studio-tags .tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(79, 195, 255, 0.18);
  border-radius: 999px;
  background: rgba(79, 195, 255, 0.08);
  color: #bfe8ff;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

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

.studio-card-actions button,
.studio-card-actions a,
.studio-inline-controls button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(79, 195, 255, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, #172230, #0a0f16);
  color: #cfefff;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-transform: uppercase;
}

.connection-panel {
  padding: 18px;
  display: grid;
  gap: 12px;
  align-self: start;
  background:
    radial-gradient(circle at top right, rgba(58, 214, 136, 0.12), transparent 28%),
    linear-gradient(180deg, #141b23, #0c1016);
}

.connection-panel[data-connection-state="connected"] {
  border-color: rgba(79, 227, 156, 0.28);
  box-shadow: inset 0 1px 0 rgba(220, 255, 239, 0.09), 0 0 0 1px rgba(79, 227, 156, 0.08);
}

.connection-panel[data-connection-state="disconnected"] {
  border-color: rgba(146, 162, 178, 0.18);
}

.connection-panel-apple {
  background:
    radial-gradient(circle at top right, rgba(255, 109, 89, 0.1), transparent 30%),
    linear-gradient(180deg, #151b23, #0c1016);
}

.connection-panel-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.connection-service-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #ecf7ff;
  font-size: 1.7rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.connection-service-mark.spotify {
  background: linear-gradient(135deg, rgba(30, 215, 96, 0.25), rgba(14, 20, 28, 0.8));
  color: #8cffbd;
}

.connection-service-mark.apple {
  background: linear-gradient(135deg, rgba(255, 125, 109, 0.24), rgba(14, 20, 28, 0.8));
  color: #ffe5e0;
}

.connection-service-mark.collab {
  background: rgba(88, 214, 247, 0.1);
  color: var(--accent);
}

.connection-service-mark.brand-logo {
  background: transparent;
  box-shadow: none;
}

.connection-service-mark.brand-logo img {
  width: 38px;
  height: 38px;
  display: block;
  object-fit: contain;
}

.connection-service-copy .eyebrow {
  margin-bottom: 6px;
}

.connection-service-copy h3 {
  margin-bottom: 0;
  font-size: 1.3rem;
}

.connection-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(145, 163, 179, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: #a3b4c3;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.connection-status-badge::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #748392;
  box-shadow: 0 0 0 4px rgba(116, 131, 146, 0.18);
}

.connection-status-badge.is-connected {
  border-color: rgba(80, 242, 164, 0.34);
  background: rgba(18, 53, 38, 0.45);
  color: #baffde;
}

.connection-status-badge.is-connected::before {
  background: #50f2a4;
  box-shadow: 0 0 0 4px rgba(80, 242, 164, 0.16);
}

.connection-status-badge.is-disconnected {
  color: #9eb0bf;
}

.connection-actions {
  align-items: center;
  margin-top: 0;
}

.connection-summary {
  display: grid;
  gap: 8px;
}

.connection-summary .studio-statline {
  margin: 0;
  min-height: 0;
}

.connection-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 24px;
}

.connection-info-row:empty {
  display: none;
}

.connection-info-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid rgba(141, 162, 182, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #dce8f3;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.connection-info-pill strong {
  color: #f4fbff;
  font-weight: 850;
}

.connection-secondary-action {
  border-color: rgba(127, 150, 171, 0.16) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: #a9bfce !important;
}

.connection-settings-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.connection-settings-head h4 {
  margin: 4px 0 0;
  color: #eef7ff;
  font-size: 0.98rem;
}

.connection-mini-actions {
  margin-top: 0;
}

.studio-hidden-control {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.connection-detail-block {
  display: none;
}

.connection-detail-block h4 {
  margin: 0;
  color: #eef7ff;
  font-size: 1rem;
}

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

.apple-folder-settings[hidden] {
  display: none;
}

.apple-folder-settings label,
.billing-byo-block 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: 38px;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0 12px;
}

.studio-card-billing {
  padding: 22px;
  display: grid;
  gap: 16px;
  border-color: rgba(255, 204, 102, 0.22);
  background:
    radial-gradient(circle at top right, rgba(255, 186, 69, 0.16), transparent 24%),
    linear-gradient(180deg, #1b1711, #0e1116);
}

.billing-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.billing-plan-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f2b35f, #f6dc8a);
  color: #251200;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.billing-plan-badge[data-plan="free"] {
  background: linear-gradient(135deg, #7b8a97, #b7c2cc);
  color: #081018;
}

.billing-plan-badge[data-plan="hobby"] {
  background: linear-gradient(135deg, #74d6ff, #b6efff);
  color: #051018;
}

.billing-plan-badge[data-plan="professional"] {
  background: linear-gradient(135deg, #f0b454, #ffe08a);
  color: #241100;
}

.billing-credit-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(240, 194, 111, 0.16);
  border-radius: 12px;
  background: rgba(255, 222, 155, 0.04);
}

.billing-config-notice,
.billing-subscription-details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.billing-config-notice {
  padding: 12px 14px;
  border: 1px solid rgba(255, 95, 87, 0.28);
  border-radius: 12px;
  background: rgba(255, 95, 87, 0.08);
  color: #ffd3cf;
}

.billing-config-notice a {
  color: var(--gold-2);
  font-weight: 700;
}

.billing-detail-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #eadfc0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.billing-credit-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.billing-credit-topline strong {
  color: #f3e4c5;
  font-size: 0.85rem;
}

.billing-credit-topline span {
  color: #e5d5b1;
  font-family: var(--mono);
  font-size: 0.74rem;
}

.credit-bar {
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 215, 153, 0.14);
  background: rgba(10, 12, 16, 0.7);
  overflow: hidden;
}

.credit-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f0b454, #ffde8c);
}

.billing-cta-row button:first-child,
.billing-cta-row button:nth-child(2) {
  background: linear-gradient(135deg, #f0b454, #f6dc8a);
  color: #281100;
  border-color: rgba(255, 222, 140, 0.32);
}

.billing-byo-block {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(214, 188, 141, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.billing-comparison-card {
  display: grid;
  gap: 16px;
}

.billing-comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.billing-plan-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    rgba(10, 12, 17, 0.72);
}

.billing-plan-card.is-current {
  border-color: rgba(255, 186, 69, 0.44);
  box-shadow: inset 0 0 0 1px rgba(255, 186, 69, 0.14);
}

.billing-plan-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.billing-plan-card-head h4,
.billing-comparison-head h3 {
  margin: 0;
}

.billing-plan-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(79, 195, 255, 0.11);
  color: #c8f0ff;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.billing-plan-price {
  color: var(--text-strong);
  font-size: 1.85rem;
  font-weight: 720;
  letter-spacing: -0.04em;
}

.billing-plan-credits {
  color: #e4d7b7;
  font-size: 0.88rem;
}

.billing-plan-features,
.billing-feature-checks {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.billing-feature-checks {
  padding-left: 0;
  list-style: none;
}

.billing-feature-checks li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  font-size: 0.84rem;
}

.billing-feature-checks li.enabled {
  color: #c9f3d8;
}

.billing-feature-checks li.disabled {
  color: #a79a8d;
}

.billing-plan-cta {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.billing-plan-cta:not(:disabled) {
  background: linear-gradient(135deg, #f0b454, #f6dc8a);
  color: #281100;
}

.billing-comparison-empty {
  color: var(--muted);
}

.admin-toolbar {
  align-items: center;
  margin-top: 0;
}

.admin-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.022);
}

.admin-metrics {
  display: grid;
  gap: 12px;
}

.admin-hotspot-panel {
  gap: 16px;
}

.admin-hotspot-select {
  align-self: end;
}

.admin-hotspot-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 310px);
  gap: 14px;
  align-items: stretch;
}

.admin-hotspot-stage {
  min-height: 320px;
}

.admin-hotspot {
  touch-action: none;
  cursor: grab;
}

.admin-hotspot:active {
  cursor: grabbing;
}

.admin-hotspot-actions {
  margin-top: 0;
}

.admin-metric-grid,
.admin-config-grid,
.admin-detail-grid,
.admin-recent-grid,
.admin-stripe-grid {
  display: grid;
  gap: 14px;
}

.admin-metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.admin-config-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.admin-config-card {
  gap: 16px;
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.022);
  box-shadow: none;
}

.admin-card {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(11, 15, 22, 0.88);
  box-shadow: none;
}

.admin-card strong {
  color: var(--text-strong);
  font-size: clamp(1.35rem, 1.6vw, 1.9rem);
  line-height: 1;
}

.admin-card span,
.admin-meta,
.admin-empty,
.admin-table td small,
.admin-empty-detail {
  color: var(--muted);
}

.admin-card span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.admin-section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.admin-users-wrap,
.admin-plan-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(11, 15, 22, 0.88);
}

.admin-table,
.admin-plan-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table {
  min-width: 1040px;
}

.admin-plan-table {
  min-width: 980px;
}

.admin-table th,
.admin-table td,
.admin-plan-table th,
.admin-plan-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
}

.admin-table th,
.admin-plan-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(14, 18, 25, 0.98);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
}

.admin-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}

.admin-table code {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.admin-plan-badge,
.admin-bool,
.admin-stripe-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.admin-plan-badge[data-plan="free"] {
  background: rgba(143, 160, 179, 0.18);
  color: #b8c5d4;
}

.admin-plan-badge[data-plan="hobby"] {
  background: rgba(88, 214, 247, 0.18);
  color: #a7f0ff;
}

.admin-plan-badge[data-plan="professional"] {
  background: rgba(30, 215, 96, 0.16);
  color: #8ff2b2;
}

.admin-plan-badge[data-plan="admin"] {
  background: linear-gradient(180deg, rgba(255, 95, 87, 0.28), rgba(243, 185, 81, 0.24));
  color: #ffe59d;
}

.admin-bool.is-true,
.admin-stripe-state.is-configured {
  background: rgba(30, 215, 96, 0.16);
  color: #8ff2b2;
}

.admin-bool.is-false,
.admin-stripe-state {
  background: rgba(143, 160, 179, 0.14);
  color: #8898aa;
}

.admin-plan-select,
.admin-credits-input,
.admin-plan-input,
.admin-plan-table input,
.admin-field input {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  box-shadow: none;
}

.admin-plan-input.is-invalid {
  border-color: rgba(255, 95, 87, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 95, 87, 0.2);
}

.admin-stripe-price-cell {
  display: grid;
  gap: 8px;
}

.admin-price-test {
  min-height: 32px;
  border: 1px solid rgba(79, 195, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(79, 195, 255, 0.09);
  color: #cff2ff;
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.admin-price-result {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.admin-plan-table input[type="checkbox"] {
  width: 18px;
  min-height: auto;
  height: 18px;
  margin: 0;
  accent-color: var(--gold);
}

.admin-plan-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.admin-plan-feature {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: #d7d1c3;
  font-size: 0.77rem;
  font-weight: 700;
}

.admin-user-actions {
  display: grid;
  gap: 8px;
  min-width: 180px;
}

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

.admin-credit-actions button,
.admin-delete,
.admin-close,
.admin-user-action {
  min-height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: none;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.admin-user-action {
  background: rgba(255, 186, 69, 0.12);
  border-color: rgba(255, 186, 69, 0.24);
  color: #ffe0a9;
}

.admin-credit-actions button {
  padding: 0 14px;
  background: rgba(30, 215, 96, 0.12);
  border-color: rgba(30, 215, 96, 0.24);
  color: #9bf4bc;
}

.admin-delete {
  padding: 0 14px;
  background: rgba(255, 95, 87, 0.12);
  border-color: rgba(255, 95, 87, 0.24);
  color: #ffada8;
}

.admin-status {
  display: none;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.82rem;
  letter-spacing: 0;
}

.admin-status.is-visible {
  display: block;
}

.admin-status.is-error {
  border-color: rgba(255, 95, 87, 0.32);
  background: rgba(255, 95, 87, 0.08);
  color: #ffc2be;
}

.admin-status.is-success {
  border-color: rgba(30, 215, 96, 0.32);
  background: rgba(30, 215, 96, 0.08);
  color: #9df3bc;
}

.admin-field {
  display: grid;
  gap: 8px;
}

.admin-field span {
  color: #d7d1c3;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}

.admin-modal {
  width: min(880px, calc(100vw - 28px));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  background: rgba(10, 14, 21, 0.98);
  color: var(--text);
  box-shadow: var(--shadow);
}

.admin-modal::backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
}

.admin-modal-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.admin-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.admin-detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-detail-card,
.admin-recent {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.admin-detail-card strong,
.admin-recent strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text-strong);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: none;
}

.admin-recent-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.admin-recent ul {
  margin: 0;
  padding-left: 18px;
}

.admin-recent li {
  margin-bottom: 8px;
  color: var(--text);
}

.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;
}

#midiPresetMeta {
  white-space: pre-line;
}

.controller-supported-card {
  grid-column: 1 / -1;
}

.controller-supported-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.controller-supported-list span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(79, 195, 255, 0.22);
  border-radius: 6px;
  color: #bfe8ff;
  background: rgba(79, 195, 255, 0.08);
  font-size: 0.74rem;
  font-weight: 850;
  white-space: nowrap;
}

.controller-visual-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(79, 195, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(80, 242, 164, 0.06), transparent 38%),
    linear-gradient(180deg, rgba(20, 26, 34, 0.96), rgba(8, 12, 18, 0.98));
  box-shadow: inset 0 1px 0 rgba(220, 240, 255, 0.07);
}

.controller-visual-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.controller-visual-head h3,
.controller-visual-head p {
  margin: 0;
}

.controller-model-select {
  display: grid;
  gap: 6px;
  min-width: min(100%, 230px);
  color: #8fa0b3;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.controller-model-select select {
  min-height: 36px;
  border: 1px solid rgba(79, 195, 255, 0.24);
  border-radius: 6px;
  background: #090d13;
  color: #e8f5ff;
  font: inherit;
  text-transform: none;
}

.controller-visual-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 14px;
  align-items: stretch;
}

.controller-visual-stage {
  position: relative;
  min-width: 0;
  margin: 0;
  border: 1px solid #04060a;
  border-radius: 7px;
  background:
    radial-gradient(circle at 50% 0%, rgba(79, 195, 255, 0.12), transparent 38%),
    #05080d;
  overflow: hidden;
}

.controller-visual-stage img {
  display: block;
  width: 100%;
  min-height: 240px;
  max-height: 620px;
  object-fit: contain;
}

.controller-hotspot-layer {
  position: absolute;
  inset: 0;
}

.controller-hotspot {
  position: absolute;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  background: #50f2a4;
  box-shadow: 0 0 0 0 rgba(80, 242, 164, 0.55), 0 0 18px rgba(80, 242, 164, 0.5);
  transform: translate(-50%, -50%);
  cursor: pointer;
  animation: controllerPulse 1.8s ease-out infinite;
}

.controller-hotspot.right {
  background: #7fd4ff;
  box-shadow: 0 0 0 0 rgba(127, 212, 255, 0.55), 0 0 18px rgba(127, 212, 255, 0.5);
}

.controller-hotspot.global {
  background: #f8d56c;
  box-shadow: 0 0 0 0 rgba(248, 213, 108, 0.55), 0 0 18px rgba(248, 213, 108, 0.5);
}

.controller-hotspot:hover,
.controller-hotspot.is-active {
  z-index: 2;
  width: 24px;
  height: 24px;
  border-color: #ffffff;
  animation-duration: 1.1s;
}

@keyframes controllerPulse {
  0% { box-shadow: 0 0 0 0 rgba(80, 242, 164, 0.45), 0 0 18px rgba(80, 242, 164, 0.4); }
  72% { box-shadow: 0 0 0 13px rgba(80, 242, 164, 0), 0 0 20px rgba(80, 242, 164, 0.42); }
  100% { box-shadow: 0 0 0 0 rgba(80, 242, 164, 0), 0 0 18px rgba(80, 242, 164, 0.4); }
}

.controller-hotspot-detail {
  min-width: 0;
  padding: 16px;
  border: 1px solid #04060a;
  border-radius: 7px;
  background: linear-gradient(180deg, #111821, #080c12);
}

.controller-hotspot-detail h4 {
  margin: 0 0 8px;
  color: #e8f5ff;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.controller-hotspot-detail p {
  margin: 0 0 12px;
  color: #8fa0b3;
  line-height: 1.35;
}

.controller-hotspot-detail ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.controller-hotspot-detail li {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid rgba(79, 195, 255, 0.14);
  border-radius: 6px;
  background: rgba(79, 195, 255, 0.05);
}

.controller-hotspot-detail li strong {
  color: #dff5ff;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.controller-hotspot-detail li span {
  color: #8fa0b3;
  font-size: 0.78rem;
  line-height: 1.35;
}

.controller-map {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.022);
}

.controller-map-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.controller-map-head h3,
.controller-map-head p {
  margin: 0;
}

.controller-map-head button {
  min-height: 34px;
  white-space: nowrap;
}

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

.deck-side-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(8, 11, 17, 0.7);
}

.deck-side-toggle button {
  min-height: 28px;
  padding: 0 10px;
  border-color: transparent;
  background: transparent;
}

.deck-side-toggle button[aria-pressed="true"],
.deck-side-toggle button.is-active {
  border-color: rgba(79, 195, 255, 0.45);
  background: rgba(79, 195, 255, 0.14);
  color: var(--text-strong);
}

.controller-light-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.controller-light-actions button {
  min-height: 32px;
  padding: 0 11px;
}

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

.midi-map-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, auto) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(11, 15, 22, 0.88);
}

.midi-map-row.is-learning {
  border-color: rgba(79, 195, 255, 0.42);
  background: rgba(79, 195, 255, 0.08);
}

.midi-map-row div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.midi-map-row strong {
  color: var(--text-strong);
  font-size: 0.86rem;
}

.midi-map-row span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.midi-map-row code {
  color: #bfe8ff;
  font-family: var(--mono);
  font-size: 0.76rem;
  white-space: nowrap;
}

.midi-map-row button {
  min-height: 34px;
  padding: 0 13px;
  white-space: nowrap;
}

.midi-map-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 6px;
}

.midi-map-actions button.secondary {
  color: var(--muted);
  border-color: rgba(143, 160, 179, 0.3);
  background: rgba(255, 255, 255, 0.02);
}

.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: none;
}

.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: none;
}

.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-grid-ai,
  .studio-two,
  .studio-connections-grid,
  .billing-comparison-grid,
  .controller-grid,
  .controller-console,
  .controller-visual-shell,
  .admin-hotspot-editor {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-tab-head,
  .billing-panel-head,
  .billing-credit-topline,
  .billing-plan-card-head,
  .connection-panel-head {
    grid-template-columns: minmax(0, 1fr);
    display: grid;
  }

  .studio-tabs {
    gap: 8px;
  }

  .studio-tab {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }

  .studio-tab-admin {
    margin-left: 0;
  }

  .controller-map-head,
  .midi-map-row {
    grid-template-columns: minmax(0, 1fr);
    display: grid;
    align-items: start;
  }
  .health-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .health-score {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .studio-console {
    padding: 20px 18px 24px;
  }

  .studio-tabs {
    padding: 8px;
  }

  .studio-tab {
    flex-basis: 100%;
  }

  .controller-visual-head {
    display: grid;
    align-items: start;
  }

  .controller-visual-stage img {
    min-height: 190px;
  }

  .studio-tab-admin {
    margin-left: 0;
  }

  .studio-card,
  .studio-tab-content .rt-datacard,
  .connection-panel,
  .studio-card-billing {
    padding: 16px;
  }

  .billing-plan-price {
    font-size: 1.45rem;
  }

  .studio-inline-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .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;
  }
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .profile-security-card,
  .profile-plan-card {
    grid-column: auto;
    grid-row: auto;
  }
  .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;
}

.status-console {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(79, 195, 255, 0.18);
  border-radius: 8px;
  background: rgba(2, 5, 10, 0.42);
  box-shadow: var(--inner);
}

.details-panel > .status-console {
  margin-top: 0;
}

.status-console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 820;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-console-head span:last-child {
  overflow: hidden;
  max-width: 64%;
  color: var(--text);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-console-head .is-error {
  color: #ffb0aa;
}

.status-log {
  display: grid;
  gap: 0;
  max-height: 230px;
  margin-top: 0;
  overflow-y: auto;
  padding-right: 6px;
  color: #cfd8df;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.45;
}

.status-log-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  align-items: baseline;
  min-width: 0;
  padding: 7px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.status-log-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.status-log-row time,
.status-log-row strong {
  color: #6f8395;
  font-weight: 760;
}

.status-log-row strong {
  color: #8eb7c9;
  text-transform: uppercase;
}

.status-log-row span {
  flex: 1 0 100%;
  color: var(--text);
  overflow-wrap: break-word;
  word-break: normal;
}

.status-log-row.is-error strong,
.status-log-row.is-error span {
  color: #ffb0aa;
}

@media (max-width: 720px) {
  .status-console-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-console-head span:last-child {
    max-width: 100%;
    text-align: left;
  }

  .status-log {
    font-size: 0.78rem;
  }
}

/* 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);
}

.note-icon-button svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.note-icon-button svg path,
.note-icon-button svg circle {
  fill: none;
  stroke: currentColor;
}

.top-icon-action svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-icon-action svg path,
.top-icon-action svg circle {
  fill: none;
  stroke: currentColor;
}

.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;
}

.crates-shell {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.crates-sidebar,
.crates-detail {
  min-width: 0;
  border: 1px solid rgba(5, 9, 14, 0.9);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(79, 195, 255, 0.1), transparent 30%),
    linear-gradient(180deg, #141b23, #0c1016);
  box-shadow: inset 0 1px 0 rgba(190, 214, 235, 0.08);
}

.crates-sidebar {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.crates-detail {
  min-height: 620px;
  padding: 18px;
}

.crate-cards {
  display: grid;
  gap: 12px;
}

.crate-page-status {
  min-height: 20px;
}

.crate-card {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(79, 195, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(79, 195, 255, 0.07), transparent 44%),
    linear-gradient(180deg, #121923, #090d13);
  color: inherit;
  border-radius: 10px;
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(220, 240, 255, 0.06);
}

.crate-card.active {
  border-color: rgba(79, 227, 156, 0.5);
  background:
    radial-gradient(circle at top right, rgba(79, 227, 156, 0.12), transparent 34%),
    linear-gradient(180deg, #14201d, #0a1014);
  box-shadow: inset 0 0 0 1px rgba(79, 227, 156, 0.14);
}

.crate-card:hover {
  border-color: rgba(79, 195, 255, 0.34);
}

.crate-card-top,
.crate-card-meta,
.crate-member-row,
.crate-member-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crate-card h3,
.crate-empty-state h2 {
  margin: 8px 0 6px;
  color: #edf6ff;
}

.crate-card p,
.crate-empty-state p,
.crate-ratings-table td,
.crate-ratings-table th {
  color: #8fa0b3;
  line-height: 1.45;
}

.crate-card-meta {
  color: #a9b9c9;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.crate-role {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #8ff2c2;
}

.rt-details-card,
.crate-meta-grid {
  display: grid;
  gap: 16px;
}

.crate-empty-state {
  min-height: 420px;
  display: grid;
  place-content: center;
  text-align: center;
}

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

.crate-member-row {
  padding: 12px 0;
  border-bottom: 1px solid rgba(79, 195, 255, 0.1);
}

.crate-member-row strong {
  color: #edf6ff;
}

.crate-member-row span {
  color: #8fa0b3;
  font-size: 0.82rem;
}

.crate-invite-panel {
  border-color: rgba(79, 227, 156, 0.18);
  background:
    radial-gradient(circle at top right, rgba(79, 227, 156, 0.11), transparent 30%),
    linear-gradient(180deg, #121d1b, #0b1015);
}

.crate-invite-panel h3 {
  margin: 4px 0 6px;
  color: #edf6ff;
  font-size: 1.05rem;
}

.crate-invite-panel.is-disabled {
  border-color: rgba(142, 158, 175, 0.12);
  background: linear-gradient(180deg, #141b23, #0c1016);
  opacity: 0.82;
}

.studio-inline-controls input,
.studio-inline-controls select,
.crate-ratings-table select {
  min-height: 38px;
  border: 1px solid rgba(79, 195, 255, 0.2);
  border-radius: 8px;
  padding: 0 12px;
  background: linear-gradient(180deg, #111923, #070b10);
  color: #eaf5ff;
  font: inherit;
}

.crate-ratings-table {
  overflow-x: auto;
  border: 1px solid rgba(79, 195, 255, 0.1);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
}

.crate-tracks {
  display: grid;
  gap: 12px;
}

.crate-track-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(79, 195, 255, 0.1);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
}

.crate-track-art {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-2);
  font-size: 1.2rem;
}

.crate-track-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.crate-track-copy strong,
.crate-track-copy span,
.crate-track-meta {
  display: block;
  min-width: 0;
}

.crate-track-copy strong {
  color: #edf6ff;
}

.crate-track-copy span,
.crate-track-meta {
  color: #8fa0b3;
  font-size: 0.88rem;
}

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

.crate-ratings-table table {
  width: 100%;
  border-collapse: collapse;
}

.crate-ratings-table th,
.crate-ratings-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(79, 195, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

.crate-ratings-table th {
  color: #cfefff;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .crates-shell,
  .crate-meta-grid {
    grid-template-columns: 1fr;
  }

  .crates-sidebar {
    position: static;
  }

  .crate-track-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .crate-track-meta,
  .crate-track-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .crate-dialog-head,
  .crate-flow-steps,
  .crate-flow-steps-two {
    grid-template-columns: 1fr;
  }
}

body.onboarding-open {
  overflow: hidden;
}

.onboarding-root {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.onboarding-root[hidden] {
  display: none;
}

.onboarding-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 12, 0.78);
  backdrop-filter: blur(18px) saturate(125%);
}

.onboarding-shell {
  position: relative;
  width: min(920px, 100%);
  max-height: min(90vh, 920px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: #090b10;
  box-shadow: none;
  color: #f3f5f9;
}

.onboarding-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  gap: 10px;
  padding: 22px 26px 0;
  background: linear-gradient(180deg, rgba(10, 13, 20, 0.98), rgba(10, 13, 20, 0.82), transparent);
}

.onboarding-skip-link {
  justify-self: end;
  border: 0;
  background: transparent;
  color: #98a5bf;
  font: inherit;
  cursor: pointer;
}

.onboarding-skip-link:hover {
  color: #f3f5f9;
}

.onboarding-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.onboarding-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 180ms ease;
}

.onboarding-progress-label {
  color: #a2adc2;
  font-size: 0.82rem;
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.onboarding-steps li {
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.84rem;
}

.onboarding-steps li.complete,
.onboarding-steps li.active {
  border-color: rgba(88, 214, 247, 0.44);
  color: var(--text-strong);
}

.onboarding-steps li.active {
  background: rgba(88, 214, 247, 0.1);
}

.onboarding-flash {
  margin: 14px 26px 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(62, 224, 183, 0.28);
  background: rgba(62, 224, 183, 0.08);
  color: #d9fff4;
}

.onboarding-flash.error {
  border-color: rgba(255, 139, 132, 0.28);
  background: rgba(255, 139, 132, 0.08);
  color: #ffd3cf;
}

.onboarding-body {
  padding: 26px;
}

.onboarding-card {
  display: grid;
  gap: 18px;
  animation: onboardingFade 180ms ease;
}

.onboarding-card.onboarding-wide {
  gap: 20px;
}

.onboarding-eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.onboarding-card h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.02;
}

.onboarding-copy {
  color: #d2d8e4;
  font-size: 1rem;
  line-height: 1.65;
}

.onboarding-copy p {
  margin: 0;
}

.onboarding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.onboarding-button {
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-contrast);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, box-shadow 140ms ease;
  box-shadow: none;
}

.onboarding-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.onboarding-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.onboarding-button.ghost {
  background: rgba(255, 255, 255, 0.07);
  color: #f3f5f9;
  box-shadow: none;
}

.onboarding-footer {
  color: #98a5bf;
  font-size: 0.92rem;
}

.onboarding-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.onboarding-checklist span,
.onboarding-summary span {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.onboarding-track-grid {
  display: grid;
  gap: 16px;
}

.onboarding-track-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
}

.onboarding-track-meta {
  display: grid;
  gap: 4px;
}

.onboarding-track-meta strong {
  font-size: 1.05rem;
}

.onboarding-track-meta span,
.onboarding-track-meta small {
  color: #aab4c7;
}

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

.onboarding-rating-button {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 14px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(14, 18, 27, 0.92);
  color: #f3f5f9;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.onboarding-rating-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(88, 214, 247, 0.48);
  background: rgba(28, 34, 46, 0.96);
}

.onboarding-rating-button span {
  font-size: 1.35rem;
}

.onboarding-field {
  display: grid;
  gap: 8px;
}

.onboarding-field span {
  color: #b8c2d5;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.onboarding-field input,
.onboarding-field select {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #f3f5f9;
}

.onboarding-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.onboarding-confetti {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.onboarding-confetti-piece {
  position: absolute;
  top: 36%;
  color: var(--accent);
  font-size: 1.25rem;
  animation: onboardingConfetti linear forwards;
}

@keyframes onboardingFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes onboardingConfetti {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  to {
    opacity: 0;
    transform: translate3d(-10px, 180px, 0) rotate(240deg);
  }
}

@media (max-width: 820px) {
  .onboarding-shell {
    width: min(100%, 640px);
    border-radius: 24px;
  }

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

@media (max-width: 560px) {
  .onboarding-root {
    padding: 12px;
  }

  .onboarding-head,
  .onboarding-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .onboarding-flash {
    margin-left: 18px;
    margin-right: 18px;
  }

  .onboarding-actions {
    flex-direction: column;
  }

  .onboarding-button {
    width: 100%;
  }

  .onboarding-rating-grid {
    grid-template-columns: 1fr;
  }
}

/* Phase 1 visual normalization */
svg {
  width: 1.1em;
  height: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.topbar h1,
.login-panel h1 {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-strong);
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
}

.eyebrow {
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}

.brand-eyebrow {
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body,
body.driving-mode {
  background: var(--bg);
}

.topbar,
.topbar.rt-unit,
.rt-unit,
.sidebar,
.details-panel,
.queue-panel,
.sync-center,
.ai-builder,
.studio-console,
.studio-card,
.rt-details,
.copy-dialog-panel,
.login-panel,
.product-hero,
.product-grid .rt-unit,
.crates-shell,
.rt-details-card {
  border-color: var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: none;
  backdrop-filter: none;
}

.rt-unit::before,
.rt-unit::after,
.topbar::before,
.topbar::after,
.track-card::before,
.cover-wrap::before {
  content: none;
}

.rt-shell {
  gap: var(--space-2);
}

.shell {
  padding: var(--space-2);
}

.topbar.rt-unit,
.rt-main,
.studio-console,
.sync-center.rt-unit,
.ai-builder.rt-unit,
.rt-datacard,
.product-hero {
  padding: var(--space-2);
}

.rt-main .layout {
  gap: var(--space-2);
}

.rt-main .sidebar,
.rt-main .details-panel {
  border-color: var(--border);
}

.rt-nav {
  border-color: var(--border);
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: none;
}

.rt-nav a,
.studio-tab,
.sync-pill,
.rt-footer,
.rt-counter small,
.rt-padcounts,
.rt-details summary,
.rt-main .pane-title h2 {
  text-transform: none;
  letter-spacing: 0;
}

.rt-nav a[aria-current="page"],
.studio-tab.is-active,
.playlist-item.active,
.track-item.active,
.playlist-entry.selected .playlist-item {
  border-color: var(--accent);
  background: rgba(88, 214, 247, 0.1);
  color: var(--accent);
  box-shadow: inset 2px 0 0 var(--accent);
}

.track-card.rt-nowplate,
body.driving-mode .track-card.rt-nowplate {
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: var(--space-2);
  padding: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: none;
}

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

.playback-clock,
.rt-counter .playback-clock {
  color: var(--text-strong);
  text-shadow: none;
}

.ratings,
.ratings.rt-pads {
  gap: var(--space-1);
  background: transparent;
}

.rt-pads .rating,
.rating {
  min-height: 64px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-solid);
  color: var(--text);
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
}

.rt-pads .rating small,
.transport small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0;
}

.rt-pads .rating::after {
  left: var(--space-1);
  right: var(--space-1);
  bottom: 6px;
  height: 2px;
  opacity: 1;
}

.rt-pads .play-out::after { background: var(--green); }
.rt-pads .maybe::after { background: var(--amber); }
.rt-pads .hook::after { background: var(--cyan); }
.rt-pads .transition::after { background: var(--violet); }
.rt-pads .trash::after { background: var(--red); }

.transport {
  gap: var(--space-1);
}

.transport button,
.icon-button,
.top-icon-action,
.note-icon-button,
.combine-actions button,
.copy-actions button,
.sync-actions button,
.studio-action-btn,
.studio-card-actions button,
.studio-card-actions a,
.product-actions a,
.ai-form button,
.login-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-solid);
  color: var(--text);
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
}

.transport #playTrack,
.login-form button,
.combine-actions button:first-child,
.copy-actions button:first-child,
.ai-form button,
.product-actions a:first-child,
.studio-action-btn {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
}

.transport #playTrack svg,
.login-form button svg,
.studio-action-btn svg {
  color: currentColor;
}

.track-list,
.playlist-list,
.history-list,
.sync-list {
  display: grid;
  gap: var(--space-1);
}

.playlist-item,
.track-item,
.sync-item,
.set-preview-track,
.crate-card {
  border-color: var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
}

.folder-glyph svg,
.connection-service-mark svg {
  width: 18px;
  height: 18px;
}

.empty-state {
  display: grid;
  gap: var(--space-1);
  place-items: start;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
}

.empty-state strong {
  color: var(--text-strong);
  font-size: 0.95rem;
}

.empty-state p {
  margin: 0;
}

.empty-state button {
  min-height: 34px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 0 12px;
  background: transparent;
  color: var(--accent);
}

@media (min-width: 921px) {
  body.deck-page {
    overflow: hidden;
  }

  body.deck-page .rt-shell {
    height: 100vh;
    height: 100svh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  body.deck-page .topbar {
    min-height: 0;
  }

  body.deck-page .rt-main {
    min-height: 0;
    overflow: hidden;
  }

  body.deck-page .rt-main .layout {
    height: 100%;
    min-height: 0;
    align-items: stretch;
  }

  body.deck-page .sidebar,
  body.deck-page .details-panel {
    position: static;
    max-height: none;
    min-height: 0;
    overflow: auto;
  }

  body.deck-page .details-panel {
    display: grid;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: var(--space-2);
    overflow: hidden;
  }

  body.deck-page .details-panel > .status-console {
    min-height: 0;
    overflow: hidden;
    grid-template-rows: auto minmax(0, 1fr);
  }

  body.deck-page .details-panel > .status-console .status-log {
    max-height: none;
    min-height: 0;
  }

  body.deck-page .details-panel > .rt-details,
  body.deck-page .details-panel > .rt-history {
    min-height: 0;
    overflow: auto;
  }

  body.deck-page .player {
    min-height: 0;
    grid-template-rows: auto auto auto auto auto auto minmax(0, 1fr);
  }

  body.deck-page .queue-panel {
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    overflow: hidden;
  }

  body.deck-page .track-list {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    align-content: start;
    padding-right: 2px;
    overscroll-behavior: contain;
    scrollbar-color: rgba(143, 160, 179, 0.45) transparent;
  }
}

body.deck-page .transport {
  display: grid;
  grid-template-columns: 0.84fr 0.84fr 1.08fr 1.08fr 1.36fr 1.36fr 1.08fr 1.08fr 0.84fr 0.84fr;
  grid-template-areas:
    "prev prev back back play play forward forward next next"
    "share share share share share open open open open open";
  gap: var(--space-1);
  align-items: stretch;
}

body.deck-page .transport button {
  min-width: 0;
  min-height: 54px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 6px;
  line-height: 1;
}

body.deck-page .transport .transport-icon {
  display: grid;
  place-items: center;
  position: relative;
  width: 28px;
  height: 28px;
  color: currentColor;
}

body.deck-page .transport .transport-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

body.deck-page .transport .transport-icon path {
  fill: currentColor;
  stroke: none;
}

body.deck-page .transport .seek-label {
  width: 52px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 1.04rem;
  font-weight: 860;
  line-height: 1;
  letter-spacing: 0;
}

body.deck-page .transport small {
  display: block;
  margin-top: 0;
  font-size: 0.62rem;
  line-height: 1;
}

body.deck-page .transport #prevTrack { grid-area: prev; }
body.deck-page .transport #seekBack { grid-area: back; }
body.deck-page .transport #playTrack { grid-area: play; }
body.deck-page .transport #seekForward { grid-area: forward; }
body.deck-page .transport #nextTrack { grid-area: next; }
body.deck-page .transport #shareToCrate { grid-area: share; }
body.deck-page .transport #openTrack { grid-area: open; }

body.deck-page .transport #prevTrack,
body.deck-page .transport #nextTrack {
  min-height: 50px;
}

body.deck-page .transport #prevTrack .transport-icon,
body.deck-page .transport #nextTrack .transport-icon {
  width: 24px;
  height: 24px;
}

body.deck-page .transport #seekBack,
body.deck-page .transport #seekForward {
  min-height: 58px;
}

body.deck-page .transport #seekBack .transport-icon,
body.deck-page .transport #seekForward .transport-icon {
  width: 52px;
  height: 32px;
}

body.deck-page .transport #playTrack {
  min-height: 70px;
}

body.deck-page .transport #playTrack .transport-icon {
  width: 42px;
  height: 42px;
}

body.deck-page .transport #shareToCrate,
body.deck-page .transport #openTrack {
  min-height: 36px;
  flex-direction: row;
  gap: 6px;
}

body.deck-page .transport #shareToCrate small,
body.deck-page .transport #openTrack small {
  font-size: 0.72rem;
  font-weight: 780;
}

body.deck-page .transport #shareToCrate svg,
body.deck-page .transport #openTrack svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.deck-page .transport #shareToCrate svg path,
body.deck-page .transport #openTrack svg path {
  fill: none;
  stroke: currentColor;
}

@media (max-width: 720px) {
  body.deck-page .transport {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    grid-template-areas:
      "prev prev back back play play forward forward next next"
      "share share share share share open open open open open";
  }
}

.skeleton-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: var(--space-1);
  align-items: center;
  min-height: 52px;
  padding: var(--space-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.skeleton-row span,
.skeleton-row i,
.skeleton-row b {
  display: block;
  border-radius: 4px;
  background: rgba(143, 160, 179, 0.18);
}

.skeleton-row span {
  width: 40px;
  aspect-ratio: 1;
}

.skeleton-row i {
  width: 70%;
  height: 12px;
  margin-bottom: 8px;
}

.skeleton-row b {
  width: 44%;
  height: 10px;
}

.status,
.studio-status,
.admin-status {
  border-radius: var(--radius);
}

.xfadr-help-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(88, 214, 247, 0.42);
  border-radius: var(--radius);
  background: rgba(8, 11, 17, 0.92);
  color: var(--text);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
  font: 800 0.78rem/1 var(--mono);
  letter-spacing: 0;
  text-transform: none;
}

.xfadr-help-button:hover,
.xfadr-help-button[aria-pressed="true"] {
  border-color: rgba(88, 214, 247, 0.72);
  color: #dff8ff;
}

.xfadr-help-panel {
  position: fixed;
  right: 18px;
  bottom: 68px;
  z-index: 90;
  width: min(420px, calc(100vw - 36px));
  padding: var(--space-2);
  border: 1px solid rgba(88, 214, 247, 0.34);
  border-radius: var(--radius);
  background: rgba(8, 11, 17, 0.96);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(18px);
}

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

.xfadr-help-panel-head,
.xfadr-help-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
}

.xfadr-help-panel-head span {
  color: var(--accent);
  font: 800 0.72rem/1 var(--mono);
}

.xfadr-help-panel h2 {
  margin: var(--space-1) 0 6px;
  font-size: 1rem;
  letter-spacing: 0;
}

.xfadr-help-panel p {
  margin: 0 0 var(--space-1);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.xfadr-help-panel p[data-help-detail] {
  color: var(--subtle);
  font-size: 0.78rem;
}

.xfadr-help-panel button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-weight: 800;
}

.xfadr-help-panel button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.xfadr-help-actions button {
  flex: 1;
  display: grid;
  gap: 3px;
  justify-items: center;
  padding: 8px 10px;
}

.xfadr-help-actions small {
  color: var(--subtle);
  font: 700 0.58rem/1 var(--mono);
  text-transform: uppercase;
}

.xfadr-help-active {
  position: relative;
  z-index: 70;
  outline: 2px solid rgba(88, 214, 247, 0.92) !important;
  outline-offset: 4px;
  box-shadow: 0 0 0 8px rgba(88, 214, 247, 0.12) !important;
}

.xfadr-help-active::after {
  content: attr(data-help-step);
  position: absolute;
  top: -14px;
  right: -14px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(88, 214, 247, 0.85);
  border-radius: 50%;
  background: #071018;
  color: var(--accent);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.38);
  font: 900 0.72rem/1 var(--mono);
}

.product-workflow-preview {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-solid);
}

.preview-track-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: var(--space-1);
  align-items: center;
  padding: var(--space-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.preview-track-row.muted {
  opacity: 0.72;
}

.preview-art {
  width: 48px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: rgba(143, 160, 179, 0.16);
}

.preview-track-row strong,
.preview-track-row small {
  display: block;
}

.preview-track-row small {
  color: var(--muted);
}

.preview-track-row b {
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

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

.preview-pads span {
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  text-align: center;
  font-size: 0.78rem;
}

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

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

/* ============================================================
   Nightclub Console — approved one-deck visual system
   Keeps the existing DOM and behavior; changes the shell only.
   ============================================================ */
:root {
  --console-bg: #080a0d;
  --console-surface: #11151b;
  --console-surface-raised: #171d25;
  --console-surface-hover: #1c2430;
  --console-border: rgba(184, 205, 224, 0.13);
  --console-border-strong: rgba(184, 205, 224, 0.22);
  --console-text: #edf3f8;
  --console-muted: #8b9bab;
  --console-dim: #5d6c7c;
  --console-accent: #56d5f5;
  --console-accent-soft: rgba(86, 213, 245, 0.12);
  --console-radius: 9px;
}

body.deck-page {
  background:
    radial-gradient(circle at 50% -20%, rgba(73, 111, 137, 0.12), transparent 38rem),
    var(--console-bg);
}

.rt-shell {
  width: min(1680px, 100%);
  gap: 12px;
  padding: 16px;
}

.rt-unit,
.topbar,
.track-card,
.sidebar,
.details-panel,
.queue-panel,
.status-console,
.rt-details,
.rt-history {
  border: 1px solid var(--console-border);
  border-radius: var(--console-radius);
  background: var(--console-surface);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: none;
}

.rt-unit::before,
.rt-unit::after {
  display: none;
}

.topbar.rt-unit {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(360px, 1.4fr) minmax(260px, 0.9fr);
  align-items: center;
  gap: 24px;
  min-height: 78px;
  padding: 14px 20px;
  background: rgba(17, 21, 27, 0.94);
}

.rt-badge h1 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.5rem;
  letter-spacing: -0.045em;
}

.rt-badge .brand-mark {
  width: 24px;
  height: 24px;
  color: var(--console-accent);
}

.rt-badge .eyebrow,
.pane-title h2,
.rt-details summary,
.rt-history summary,
.rt-footer,
.rt-scribble-label {
  color: var(--console-dim);
  font-family: var(--mono);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.rt-badge .player-status {
  display: none;
}

.rt-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--console-border);
  border-radius: 8px;
  background: rgba(6, 9, 12, 0.68);
}

.rt-nav a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--console-muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.rt-nav a:hover,
.rt-nav a[aria-current="page"] {
  border-color: rgba(86, 213, 245, 0.62);
  background: var(--console-accent-soft);
  color: var(--console-accent);
}

.topbar-right {
  min-width: 0;
  justify-items: end;
}

.top-actions {
  gap: 6px;
}

.account {
  font-size: 0.76rem;
}

.top-icon-action,
.drive-toggle,
.sync-pill {
  min-height: 32px;
  border: 1px solid var(--console-border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--console-muted);
  box-shadow: none;
}

.drive-toggle[aria-pressed="true"] {
  border-color: rgba(86, 213, 245, 0.6);
  background: var(--console-accent);
  color: #061219;
}

.sync-pill {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 0.59rem;
}

.sync-pill.idle {
  display: inline-flex;
  border-color: rgba(124, 218, 150, 0.25);
  background: rgba(124, 218, 150, 0.07);
  color: #9ee8af;
}

.rt-main {
  display: grid;
  gap: 14px;
  padding: 16px 20px 20px;
  background: var(--console-surface);
}

.waveform-deck-band {
  display: grid;
  gap: 7px;
  padding: 12px 14px 14px;
  border: 1px solid var(--console-border);
  border-radius: var(--console-radius);
  background: #0b0f14;
}

.waveform-band-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
  color: var(--console-dim);
  font-family: var(--mono);
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.waveform-band-label span:last-child {
  color: var(--console-accent);
}

.waveform-band-panel {
  min-height: 88px;
  margin-top: 0;
  border-color: rgba(86, 213, 245, 0.18);
  border-radius: 6px;
  background: #05080b;
}

.waveform-band-panel canvas {
  height: 88px;
}

.rt-main .layout {
  grid-template-columns: minmax(220px, 258px) minmax(0, 1fr) minmax(250px, 286px);
  gap: 20px;
}

.rt-main .sidebar,
.rt-main .details-panel {
  min-height: 620px;
  padding: 2px 0;
}

.rt-main .sidebar {
  border-right: 1px solid var(--console-border);
  padding-right: 18px;
}

.rt-main .details-panel {
  border-left: 1px solid var(--console-border);
  padding-left: 18px;
}

.playlist-list,
.track-list {
  gap: 5px;
  margin-top: 12px;
}

.playlist-item,
.track-item {
  min-height: 48px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.playlist-item:hover,
.track-item:hover {
  border-color: var(--console-border-strong);
  background: var(--console-surface-hover);
}

.playlist-item.active,
.track-item.active,
.playlist-entry.selected .playlist-item {
  border-color: rgba(86, 213, 245, 0.46);
  background: var(--console-accent-soft);
  box-shadow: inset 2px 0 0 var(--console-accent);
}

.playlist-item img,
.track-item img {
  width: 36px;
  height: 36px;
  border-radius: 5px;
  box-shadow: none;
}

.item-title {
  font-size: 0.82rem;
  font-weight: 650;
}

.item-subtitle {
  font-size: 0.7rem;
}

.player {
  min-width: 0;
  gap: 12px;
}

.track-card.rt-nowplate {
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 16px;
  min-height: 148px;
  padding: 16px;
  border-color: var(--console-border-strong);
  background: linear-gradient(135deg, rgba(86, 213, 245, 0.09), transparent 42%), var(--console-surface-raised);
  box-shadow: none;
}

.rt-nowplate .cover-wrap {
  width: 96px;
  height: 96px;
  border-color: var(--console-border-strong);
  border-radius: 7px;
  box-shadow: none;
}

.rt-nowplate #trackTitle {
  margin-bottom: 5px;
  font-size: clamp(1.45rem, 2.8vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.rt-nowplate .waveform-panel {
  display: none;
}

.rt-nowplate #trackArtist {
  margin-bottom: 3px;
  color: var(--console-muted);
  font-size: 0.92rem;
}

.rt-nowplate .album {
  font-size: 0.75rem;
}

.waveform-panel {
  min-height: 58px;
  margin-top: 10px;
  border-color: var(--console-border);
  border-radius: 6px;
  background: rgba(5, 8, 11, 0.66);
}

.waveform-panel canvas {
  height: 58px;
}

.rt-counter .playback-clock {
  color: var(--console-accent);
  font-size: 1.25rem;
  text-shadow: none;
}

.rt-counter small {
  color: var(--console-dim);
  font-size: 0.52rem;
  letter-spacing: 0.18em;
}

.ratings.rt-pads {
  gap: 8px;
}

.rt-pads .rating {
  min-height: 94px;
  border: 1px solid var(--console-border-strong);
  border-radius: 7px;
  background: var(--console-surface-raised);
  box-shadow: none;
  color: var(--console-text);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.rt-pads .rating:hover {
  border-color: currentColor;
  background: var(--console-surface-hover);
}

.rt-pads .rating::after {
  left: 9px;
  right: 9px;
  bottom: 7px;
  height: 3px;
  opacity: 0.95;
}

.rt-pads .play-out,
.rt-pads .maybe,
.rt-pads .hook,
.rt-pads .transition,
.rt-pads .trash {
  border-color: var(--console-border-strong);
  background: var(--console-surface-raised);
  box-shadow: none;
}

.rt-pads .play-out { color: #7cda8c; }
.rt-pads .maybe { color: #e4c363; }
.rt-pads .hook { color: var(--console-accent); }
.rt-pads .transition { color: #c49ae9; }
.rt-pads .trash { color: #ed8c82; }

.rt-padcounts {
  min-height: 16px;
  margin-top: -1px;
  color: var(--console-dim);
  font-size: 0.59rem;
  letter-spacing: 0.1em;
}

.notes-row.rt-scribble {
  width: 100%;
  margin-top: 0;
  padding: 7px 9px;
  border-color: var(--console-border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
}

.rt-scribble input {
  color: var(--console-text);
  font-size: 0.8rem;
}

.rt-scribble button {
  min-height: 31px;
  padding: 0 10px;
  border-color: var(--console-border);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--console-muted);
  box-shadow: none;
  font-size: 0.63rem;
}

.rt-scribble #saveNote {
  border-color: rgba(86, 213, 245, 0.5);
  background: var(--console-accent-soft);
  color: var(--console-accent);
}

.transport {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.transport button {
  min-height: 52px;
  border-color: var(--console-border);
  border-radius: 6px;
  background: var(--console-surface-raised);
  box-shadow: none;
  color: var(--console-muted);
  font-size: 0.84rem;
}

.transport button:hover {
  border-color: var(--console-border-strong);
  background: var(--console-surface-hover);
  color: var(--console-text);
}

.transport #playTrack {
  border-color: rgba(86, 213, 245, 0.72);
  background: var(--console-accent);
  color: #061219;
  font-size: 1.55rem;
}

.transport button small {
  color: var(--console-dim);
  font-size: 0.56rem;
}

.transport #playTrack small {
  color: rgba(6, 18, 25, 0.68);
}

.next-up {
  min-height: 32px;
  border-color: var(--console-border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--console-muted);
  font-size: 0.76rem;
}

.queue-panel {
  padding: 12px;
  border-color: var(--console-border);
  background: rgba(255, 255, 255, 0.018);
  box-shadow: none;
}

.queue-panel .pane-title {
  padding-bottom: 2px;
}

.queue-panel .track-list {
  max-height: 300px;
  overflow: auto;
}

.status-console,
.rt-details,
.rt-history {
  border-color: var(--console-border);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
}

.status-console {
  min-height: 160px;
  padding: 12px;
}

.status-console-head {
  color: var(--console-dim);
  font-family: var(--mono);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.status-console-head #statusSummary {
  color: #9ee8af;
}

.status-log {
  max-height: 112px;
  margin-top: 10px;
  color: var(--console-muted);
  font-size: 0.72rem;
}

.rt-details,
.rt-history {
  margin: 0;
  padding: 12px;
}

.rt-details summary,
.rt-history summary {
  margin-bottom: 10px;
  color: var(--console-muted);
}

.detail-list dd {
  color: var(--console-text);
  font-size: 0.78rem;
}

.detail-list dt,
.reclassify-panel label {
  color: var(--console-dim);
  font-size: 0.58rem;
}

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

.reclassify-row button {
  border-color: rgba(86, 213, 245, 0.5);
  background: var(--console-accent-soft);
  color: var(--console-accent);
}

.history-list {
  font-size: 0.72rem;
}

.rt-footer {
  min-height: 38px;
  padding: 10px 20px;
  border-color: var(--console-border);
  background: rgba(17, 21, 27, 0.86);
  box-shadow: none;
}

@media (max-width: 1160px) {
  .topbar.rt-unit {
    grid-template-columns: minmax(180px, 0.8fr) minmax(300px, 1fr);
  }

  .rt-nav { justify-self: end; }
  .topbar-right { grid-column: 1 / -1; }
  .rt-main .layout { grid-template-columns: 220px minmax(0, 1fr); }
  .rt-main .details-panel { grid-column: 1 / -1; min-height: 0; }
}

@media (max-width: 720px) {
  .rt-shell { padding: 8px; }
  .topbar.rt-unit,
  .rt-main,
  .rt-footer { padding-left: 12px; padding-right: 12px; }
  .topbar.rt-unit { grid-template-columns: 1fr; gap: 10px; }
  .rt-nav { justify-self: stretch; overflow-x: auto; }
  .rt-nav a { flex: 1 0 auto; justify-content: center; padding: 0 12px; }
  .topbar-right { grid-column: auto; justify-items: stretch; }
  .top-actions { justify-content: flex-start; }
  .rt-main .layout { grid-template-columns: 1fr; gap: 12px; }
  .rt-main .sidebar,
  .rt-main .details-panel { grid-column: auto; min-height: 0; border: 0; padding: 0; }
  .rt-main .sidebar { order: 2; }
  .rt-main .details-panel { order: 3; }
  .rt-main .player { order: 1; }
  .track-card.rt-nowplate { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; }
  .rt-nowplate .cover-wrap { width: 76px; height: 76px; }
  .rt-counter { grid-column: 1 / -1; text-align: left; }
  .rt-counter .playback-clock { justify-content: flex-start; }
  .transport { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .transport #playTrack { order: -1; }
  .queue-panel .track-list { max-height: none; }
}

/* Keep the unauthenticated entry point in the same product language. */
body:not(.deck-page) {
  background:
    radial-gradient(circle at 50% 8%, rgba(73, 111, 137, 0.14), transparent 34rem),
    var(--console-bg, #080a0d);
}

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

.login-panel {
  width: min(440px, 100%);
  padding: 32px;
  border: 1px solid var(--console-border, rgba(184, 205, 224, 0.13));
  border-radius: 12px;
  background: var(--console-surface, #11151b);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.login-panel h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--console-text, #edf3f8);
  font-size: 2.15rem;
  letter-spacing: -0.05em;
}

.login-panel h1 .brand-mark {
  width: 30px;
  height: 30px;
  color: var(--console-accent, #56d5f5);
}

.login-panel p:not(.eyebrow) {
  max-width: 34rem;
  margin-bottom: 24px;
  color: var(--console-muted, #8b9bab);
  font-size: 0.95rem;
  line-height: 1.55;
}

.login-form {
  gap: 9px;
}

.login-form input,
.login-form button,
.forgot-password-form input,
.forgot-password-form button,
.ghost-button,
.text-button {
  min-height: 44px;
  border-radius: 7px;
}

.login-form input,
.forgot-password-form input {
  border-color: var(--console-border, rgba(184, 205, 224, 0.13));
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
}

.login-form button,
.forgot-password-form button {
  border: 1px solid rgba(86, 213, 245, 0.64);
  background: var(--console-accent, #56d5f5);
  color: #061219;
  box-shadow: none;
}

.ghost-button,
.text-button {
  border: 1px solid var(--console-border, rgba(184, 205, 224, 0.13));
  background: rgba(255, 255, 255, 0.035);
  color: var(--console-muted, #8b9bab);
}

.ghost-button:hover,
.text-button:hover {
  border-color: var(--console-border-strong, rgba(184, 205, 224, 0.22));
  background: var(--console-surface-hover, #1c2430);
  color: var(--console-text, #edf3f8);
}

/* Final console composition: this is the approved mockup structure. */
body.console-page {
  background: #090c10;
}

.console-shell {
  width: min(1440px, 100%);
  gap: 12px;
  padding: 18px;
}

.console-shell > .topbar.rt-unit,
.console-shell > .waveform-deck-band,
.console-shell > .rt-main.rt-unit,
.console-shell > .rt-footer.rt-unit {
  border: 1px solid #27313c;
  border-radius: 8px;
  box-shadow: none;
}

.console-shell > .topbar.rt-unit {
  min-height: 84px;
  padding: 14px 30px;
  background: #141a21;
}

.console-shell > .waveform-deck-band {
  padding: 13px 52px 14px;
  border-color: #27313c;
  background: #141a21;
}

.console-shell > .rt-main.rt-unit {
  display: block;
  padding: 16px 52px 20px;
  border-color: #27313c;
  background: #141a21;
}

.console-shell > .rt-footer.rt-unit {
  padding: 10px 52px;
  background: #141a21;
}

.console-shell .waveform-band-panel {
  min-height: 92px;
  border-color: #070a0d;
  background: #05080b;
}

.console-shell .waveform-band-panel canvas {
  height: 92px;
}

.console-shell .waveform-band-label {
  color: #8091a2;
}

.console-shell .rt-main .layout {
  grid-template-columns: minmax(230px, 250px) minmax(0, 1fr) minmax(250px, 270px);
  gap: 20px;
  align-items: stretch;
}

.console-shell .rt-main .sidebar,
.console-shell .rt-main .details-panel {
  min-height: 520px;
}

.console-shell .rt-main .sidebar {
  padding-right: 18px;
}

.console-shell .rt-main .details-panel {
  padding-left: 18px;
}

.console-shell .track-card.rt-nowplate {
  grid-template-columns: 92px minmax(0, 1fr) auto;
  min-height: 112px;
  gap: 16px;
  padding: 14px 16px;
  border-color: #293744;
  border-radius: 7px;
  background: #18202a;
}

.console-shell .rt-nowplate .cover-wrap {
  width: 92px;
  height: 92px;
  border-color: #2c3c4b;
}

.console-shell .rt-nowplate #trackTitle {
  margin-bottom: 4px;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1;
}

.console-shell .rt-nowplate #trackArtist {
  margin-bottom: 2px;
  font-size: 0.9rem;
}

.console-shell .rt-nowplate .album {
  font-size: 0.72rem;
}

.console-shell .rt-pads .rating {
  min-height: 92px;
  padding: 10px 6px;
  border-color: #2b3947;
  background: #18202a;
}

.console-shell .notes-row.rt-scribble {
  min-height: 48px;
}

.console-shell .transport button {
  min-height: 48px;
}

.console-shell .queue-panel {
  min-height: 170px;
  padding: 12px;
  background: transparent;
}

.console-shell .queue-panel .track-list {
  max-height: 220px;
}

.console-shell .status-console {
  min-height: 150px;
}

@media (max-width: 1160px) {
  .console-shell > .waveform-deck-band,
  .console-shell > .rt-main.rt-unit,
  .console-shell > .rt-footer.rt-unit { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 720px) {
  .console-shell { padding: 8px; }
  .console-shell > .topbar.rt-unit,
  .console-shell > .waveform-deck-band,
  .console-shell > .rt-main.rt-unit,
  .console-shell > .rt-footer.rt-unit { padding-left: 12px; padding-right: 12px; }
}

/* Approved mockup grid: deck hero above the library, independent details rail. */
.console-shell > .rt-main.rt-unit {
  padding: 0;
  border: 0;
  background: transparent;
}

.console-shell .rt-main .layout {
  display: grid;
  grid-template-columns: minmax(220px, 250px) minmax(0, 1fr) minmax(250px, 270px);
  grid-template-rows: auto auto auto auto auto auto minmax(300px, 1fr);
  grid-template-areas:
    "track track details"
    "ratings ratings details"
    "notes notes details"
    "counts counts details"
    "transport transport details"
    "next next details"
    "library queue details";
  gap: 12px 18px;
  align-items: stretch;
}

.console-shell .rt-main .player {
  display: contents;
}

.console-shell .rt-main .sidebar,
.console-shell .rt-main .details-panel,
.console-shell .rt-main .queue-panel,
.console-shell .rt-main .track-card,
.console-shell .rt-main .ratings,
.console-shell .rt-main .notes-row,
.console-shell .rt-main .rt-padcounts,
.console-shell .rt-main .transport,
.console-shell .rt-main .next-up {
  min-width: 0;
}

.console-shell .rt-main .track-card { grid-area: track; }
.console-shell .rt-main .ratings { grid-area: ratings; }
.console-shell .rt-main .notes-row { grid-area: notes; }
.console-shell .rt-main .rt-padcounts { grid-area: counts; }
.console-shell .rt-main .transport { grid-area: transport; }
.console-shell .rt-main .next-up { grid-area: next; }
.console-shell .rt-main .sidebar { grid-area: library; }
.console-shell .rt-main .queue-panel { grid-area: queue; }
.console-shell .rt-main .details-panel { grid-area: details; }

.console-shell .rt-main .sidebar,
.console-shell .rt-main .details-panel {
  position: static;
  max-height: none;
  overflow: visible;
  min-height: 0;
  padding-top: 0;
}

.console-shell .rt-main .sidebar {
  border-right: 1px solid #27313c;
  padding-right: 18px;
}

.console-shell .rt-main .details-panel {
  border-left: 1px solid #27313c;
  padding-left: 18px;
}

.console-shell .rt-main .track-card.rt-nowplate {
  grid-template-columns: 230px minmax(0, 1fr) auto;
  min-height: 330px;
  align-items: center;
  padding: 18px;
  border-color: #293744;
  background: #11171e;
}

.console-shell .rt-main .rt-nowplate .cover-wrap {
  width: 210px;
  height: 210px;
}

.console-shell .rt-main .rt-nowplate #trackTitle {
  font-size: clamp(1.8rem, 3.2vw, 3rem);
}

.console-shell .rt-main .rt-nowplate .waveform-panel {
  display: block;
  min-height: 94px;
  margin-top: 14px;
}

.console-shell .rt-main .rt-nowplate .waveform-panel canvas {
  height: 94px;
}

.console-shell .rt-main .rt-pads .rating {
  min-height: 84px;
}

.console-shell .rt-main .queue-panel {
  min-height: 300px;
  padding: 12px;
  border: 1px solid #27313c;
  background: #11171e;
}

.console-shell .rt-main .queue-panel .track-list {
  max-height: 360px;
}

.console-shell .rt-main .details-panel {
  display: grid;
  align-content: start;
  gap: 12px;
}

@media (max-width: 1160px) {
  .console-shell .rt-main .layout {
    grid-template-columns: 220px minmax(0, 1fr);
    grid-template-areas:
      "track track"
      "ratings ratings"
      "notes notes"
      "counts counts"
      "transport transport"
      "next next"
      "library queue"
      "details details";
  }

  .console-shell .rt-main .details-panel {
    border-left: 0;
    border-top: 1px solid #27313c;
    padding: 16px 0 0;
  }
}

@media (max-width: 720px) {
  .console-shell .rt-main .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "track"
      "ratings"
      "notes"
      "counts"
      "transport"
      "next"
      "library"
      "queue"
      "details";
  }

  .console-shell .rt-main .track-card.rt-nowplate {
    grid-template-columns: 76px minmax(0, 1fr);
    min-height: 220px;
  }

  .console-shell .rt-main .rt-nowplate .cover-wrap {
    width: 76px;
    height: 76px;
  }

  .console-shell .rt-main .rt-counter {
    grid-column: 1 / -1;
    text-align: left;
  }

  .console-shell .rt-main .sidebar {
    border-right: 0;
    border-bottom: 1px solid #27313c;
    padding: 0 0 12px;
  }
}

/* Deck rollout: shared pages aligned to the finished Deck shell */
body {
  background: #050608;
  color: #d7ddda;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(62, 220, 120, 0.08), transparent 32%),
    radial-gradient(circle at 78% 6%, rgba(77, 181, 255, 0.05), transparent 30%),
    linear-gradient(180deg, #07090b 0%, #050608 56%, #030405 100%);
}

.shell.rt-shell {
  width: min(1536px, 100%);
  margin: 0 auto;
  padding: 0 16px 24px;
}

.rt-unit,
.studio-card,
.copy-dialog-panel,
.login-panel,
.product-hero,
.product-grid .rt-unit,
.crates-shell,
.sync-center,
.ai-builder,
.set-builder {
  border: 1px solid #20262d;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 30%),
    linear-gradient(180deg, #101419, #0b0e12);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.032),
    0 1px 2px rgba(0, 0, 0, 0.5);
}

.rt-unit::before,
.rt-unit::after,
.topbar::before,
.topbar::after {
  content: none;
}

.topbar.rt-unit {
  display: grid;
  grid-template-columns: 152px minmax(380px, 1fr) auto;
  align-items: stretch;
  gap: 0;
  min-height: 56px;
  margin: 0 -16px;
  padding: 0 16px;
  border-width: 0 0 1px;
  border-radius: 0;
  background: rgba(4, 5, 7, 0.92);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.rt-badge {
  min-width: 0;
  display: grid;
  align-content: center;
  padding: 0 18px 0 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.035);
}

.rt-badge .eyebrow {
  margin: 0;
  color: #626b73;
  font-size: 9px;
  letter-spacing: 0.14em;
}

.topbar h1,
.rt-badge h1 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #e7ece8;
  font-size: 1.4rem;
  font-weight: 860;
  letter-spacing: -0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  fill: none;
  stroke: #3edc78;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.rt-nav {
  min-width: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.rt-nav a {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-bottom: 2px solid transparent;
  color: #9199a1;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.rt-nav a:hover {
  border-bottom-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.035);
  color: #c5cbc8;
}

.rt-nav a[aria-current="page"] {
  border-bottom-color: #3edc78;
  background: linear-gradient(180deg, rgba(62, 220, 120, 0.075), rgba(62, 220, 120, 0.025));
  color: #8ff8b5;
}

.topbar-right {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 12px;
}

.top-actions {
  align-items: center;
  gap: 8px;
}

.sync-pill {
  min-height: 24px;
  border-color: rgba(62, 220, 120, 0.18);
  border-radius: 8px;
  padding: 4px 8px;
  background: rgba(62, 220, 120, 0.06);
  color: #bffed6;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.top-icon-action,
.studio-card-actions button,
.studio-card-actions a,
.sync-actions button,
.product-actions a,
.copy-actions button,
.login-form button,
.forgot-password-form button,
.ghost-button,
.text-button,
.ai-form button,
.ai-extend-panel button,
.set-preview-controls button,
#setOpenTrack,
#connect {
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018));
  color: #d7ddda;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  text-decoration: none;
}

.top-icon-action:hover,
.studio-card-actions button:hover,
.studio-card-actions a:hover,
.sync-actions button:hover,
.product-actions a:hover,
.copy-actions button:hover,
.ghost-button:hover,
.text-button:hover,
.ai-extend-panel button:hover,
.set-preview-controls button:hover,
#setOpenTrack:hover,
#connect:hover {
  border-color: rgba(62, 220, 120, 0.26);
  background: rgba(255, 255, 255, 0.045);
  color: #e7ece8;
}

.login-form button,
.forgot-password-form button,
.product-actions a:first-child,
.copy-actions button:first-child,
.ai-form button,
#setPlayTrack {
  border-color: rgba(62, 220, 120, 0.54);
  background: linear-gradient(180deg, #53ef8b, #1db954);
  color: #031007;
  font-weight: 900;
}

input,
select,
textarea {
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.26);
  color: #eef4f0;
}

input::placeholder,
textarea::placeholder {
  color: rgba(215, 221, 218, 0.45);
}

.pane-title {
  align-items: center;
  gap: 14px;
}

.pane-title h2,
.pane-title h3,
.studio-card h3,
.product-grid h2 {
  color: #eef4f0;
  letter-spacing: -0.01em;
}

.eyebrow,
.pane-title .eyebrow,
.studio-card-head.compact .eyebrow {
  color: #8ff8b5;
  font-family: var(--mono);
  letter-spacing: 0.12em;
}

.ai-subtitle,
.studio-copy,
.product-hero p,
.product-grid p,
.status,
.studio-statline,
.account {
  color: #9199a1;
}

.crates-shell,
.studio-console,
.sync-center.rt-unit,
.set-builder.rt-unit,
.ai-builder.rt-unit,
.rt-datacard.rt-unit {
  padding: 16px;
}

.product-shell {
  gap: 12px;
}

.product-hero {
  padding: clamp(24px, 4vw, 48px);
}

.product-hero h1 {
  max-width: 860px;
  color: #eef4f0;
  font-size: clamp(2.15rem, 5vw, 5.4rem);
  letter-spacing: -0.055em;
}

.product-workflow-preview,
.ai-chat-shell,
.ai-form,
.ai-extend-panel,
.set-preview,
.sync-summary,
.snapshot-stats,
.crate-empty-state,
.crate-ratings-table,
.crate-tracks,
.controller-test-log {
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent 34%),
    rgba(0, 0, 0, 0.22);
}

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

.login-panel {
  width: min(460px, 100%);
  padding: 22px;
}

.login-panel h1 {
  color: #eef4f0;
  letter-spacing: -0.035em;
}

.login-panel h1 .brand-mark {
  width: 32px;
  height: 32px;
}

.login-panel p:not(.eyebrow) {
  color: #9199a1;
}

.forgot-password-form,
.reset-invalid {
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.rt-footer {
  min-height: 24px;
  padding: 0 16px;
  border-radius: 0;
  background: rgba(4, 5, 7, 0.94);
  color: #505961;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.controller-test-shell {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 0 16px 24px;
}

.controller-test-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.controller-test-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.controller-test-log {
  min-height: 280px;
  max-height: 60vh;
  margin: 0;
  padding: 12px;
  overflow: auto;
  color: #d7ddda;
  font-family: var(--mono);
  font-size: 0.78rem;
}

@media (max-width: 980px) {
  .topbar.rt-unit {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: 0;
    padding: 10px 16px 0;
  }

  .rt-badge {
    min-height: 44px;
    padding: 0;
    border-right: 0;
  }

  .rt-nav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .rt-nav a {
    min-height: 42px;
    flex: 0 0 auto;
    padding: 0 14px;
  }

  .topbar-right {
    min-height: 44px;
    padding: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .shell.rt-shell,
  .controller-test-shell {
    padding: 0 10px 18px;
  }

  .topbar.rt-unit {
    margin-inline: -10px;
  }

  .crates-shell,
  .studio-console,
  .sync-center.rt-unit,
  .set-builder.rt-unit,
  .ai-builder.rt-unit,
  .rt-datacard.rt-unit,
  .login-panel,
  .product-hero {
    padding: 12px;
  }

  .product-hero h1 {
    font-size: clamp(2rem, 12vw, 3.6rem);
  }

  .analyze-workbench > .ai-title {
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 16px;
  }

  .analyze-workbench .ai-controls {
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 16px;
  }
}

/* Build beacon: shows which styles.css a device actually loaded (stale-cache
   forensics). Bump the content string when bumping ?v=. */
.app-footer::after { content: "S85"; margin-left: 8px; opacity: .4; font-size: 9px; letter-spacing: .1em; }
