:root {
  color-scheme: dark;
  --ink: #f7f7f7;
  --muted: #a7a7a7;
  --line: #2a2a2a;
  --surface: #181818;
  --wash: #121212;
  --soft: #242424;
  --accent: #1ed760;
  --accent-strong: #20c95a;
  --accent-soft: rgba(30, 215, 96, 0.14);
  --blue: #6ab7ff;
  --blue-soft: rgba(80, 160, 255, 0.16);
  --warm: #ffb86b;
  --warm-soft: rgba(255, 184, 107, 0.14);
  --warn: #f6c453;
  --danger: #ff6b6b;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

/* Slice 2: practice-first home and queue-aware reader */
body[data-view="practice"] #practiceView .practice-log-strip .session-actions {
  grid-template-columns: repeat(3, minmax(0, auto));
}

body[data-view="practice"] #practiceView #openSessionReader {
  min-width: 132px;
  color: #062f2a;
  border-color: rgba(44, 190, 173, 0.4);
  background:
    linear-gradient(135deg, #8eeadb, #33c9b6),
    var(--ui-primary);
  box-shadow: 0 14px 28px rgba(21, 153, 135, 0.22);
}

body[data-view="practice"] #practiceView #openSessionReader:disabled {
  color: rgba(66, 85, 78, 0.62);
  border-color: rgba(22, 74, 65, 0.12);
  background: rgba(231, 226, 214, 0.76);
  box-shadow: none;
}

body[data-view="practice"] #practiceView .session-empty.now-playing-empty button {
  justify-self: center;
  min-height: 42px;
  margin-top: 6px;
  padding: 9px 16px;
}

body[data-view="practice"] #practiceView .session-card-played {
  border-color: rgba(40, 185, 167, 0.34);
  background:
    linear-gradient(135deg, rgba(40, 185, 167, 0.12), rgba(255, 253, 248, 0.94)),
    var(--ui-surface);
}

body[data-view="practice"] #practiceView .session-card-played .session-card-title h3::after {
  content: "Played";
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  padding: 2px 8px;
  color: #0b332d;
  border: 1px solid rgba(40, 185, 167, 0.28);
  border-radius: 999px;
  background: rgba(142, 234, 219, 0.42);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  vertical-align: middle;
}

.sheet-viewer-practice-controls {
  position: absolute;
  left: 50%;
  bottom: 62px;
  z-index: 7;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  max-width: min(760px, calc(100vw - 360px));
  padding: 7px;
  pointer-events: auto;
  border: 1px solid rgba(255, 248, 234, 0.16);
  border-radius: 999px;
  background: rgba(13, 44, 39, 0.34);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
  transform: translateX(-50%);
}

.sheet-viewer-practice-controls button {
  width: auto;
  min-width: 92px;
  min-height: 42px;
  padding: 9px 14px;
  color: rgba(255, 248, 234, 0.94);
  border-color: rgba(255, 248, 234, 0.14);
  border-radius: 999px;
  background: rgba(255, 248, 234, 0.1);
  box-shadow: none;
  font-size: 13px;
  font-weight: 850;
}

.sheet-viewer-practice-controls #sheetViewerPlayed,
.sheet-viewer-practice-controls #sheetViewerNextSong {
  color: #062f2a;
  border-color: rgba(142, 234, 219, 0.42);
  background: linear-gradient(135deg, #9af0e3, #36cbb8);
}

.sheet-viewer-practice-controls button:hover:not(:disabled) {
  color: #0b332d;
  background: rgba(255, 248, 234, 0.9);
}

.sheet-viewer-practice-controls button:disabled {
  color: rgba(255, 248, 234, 0.38);
  background: rgba(255, 248, 234, 0.06);
  opacity: 1;
}

.sheet-viewer-queue-panel {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 7;
  display: grid;
  gap: 8px;
  width: min(318px, 28vw);
  max-height: min(430px, calc(100vh - 132px));
  padding: 10px;
  overflow: hidden;
  pointer-events: auto;
  border: 1px solid rgba(255, 248, 234, 0.16);
  border-radius: 10px;
  color: rgba(255, 248, 234, 0.94);
  background: rgba(13, 44, 39, 0.52);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.sheet-viewer-queue-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sheet-viewer-queue-heading span {
  color: rgba(255, 248, 234, 0.62);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.sheet-viewer-queue-heading strong {
  color: rgba(255, 248, 234, 0.9);
  font-size: 12px;
}

.sheet-viewer-queue-list {
  display: grid;
  gap: 6px;
  overflow: auto;
}

.sheet-viewer-queue-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 7px 9px;
  color: rgba(255, 248, 234, 0.88);
  border: 1px solid rgba(255, 248, 234, 0.12);
  border-radius: 8px;
  background: rgba(255, 248, 234, 0.08);
  box-shadow: none;
  text-align: left;
}

.sheet-viewer-queue-item span {
  display: grid;
  place-items: center;
  width: 24px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: rgba(255, 248, 234, 0.12);
  font-size: 11px;
  font-weight: 900;
}

.sheet-viewer-queue-item strong,
.sheet-viewer-queue-item em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-viewer-queue-item strong {
  font-size: 12px;
}

.sheet-viewer-queue-item em {
  color: rgba(255, 248, 234, 0.62);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.sheet-viewer-queue-item.active {
  color: #0b332d;
  border-color: rgba(142, 234, 219, 0.36);
  background: rgba(164, 238, 226, 0.92);
}

.sheet-viewer-queue-item.active em {
  color: rgba(11, 51, 45, 0.68);
}

.sheet-viewer-queue-item.played:not(.active) {
  border-color: rgba(142, 234, 219, 0.28);
  background: rgba(142, 234, 219, 0.16);
}

.sheet-viewer-queue-empty {
  padding: 12px;
  color: rgba(255, 248, 234, 0.7);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.sheet-viewer-queue-panel > button {
  min-height: 38px;
  color: #062f2a;
  background: linear-gradient(135deg, #9af0e3, #36cbb8);
}

.sheet-viewer-notes-panel {
  position: absolute;
  top: 72px;
  right: 14px;
  bottom: 118px;
  z-index: 8;
  display: grid;
  grid-template-rows: auto minmax(108px, 0.8fr) auto minmax(92px, auto) auto auto;
  gap: 10px;
  width: min(360px, 32vw);
  padding: 12px;
  pointer-events: auto;
  border: 1px solid rgba(255, 248, 234, 0.16);
  border-radius: 10px;
  color: rgba(255, 248, 234, 0.94);
  background: rgba(13, 44, 39, 0.62);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.sheet-viewer-notes-panel[hidden] {
  display: none;
}

.sheet-viewer-notes-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.sheet-viewer-notes-header h3 {
  color: rgba(255, 248, 234, 0.94);
  font-size: 16px;
}

.sheet-viewer-notes-header .eyebrow {
  color: rgba(255, 248, 234, 0.58);
}

.sheet-viewer-notes-panel textarea {
  width: 100%;
  min-height: 116px;
  padding: 12px;
  color: #0b332d;
  border: 1px solid rgba(255, 248, 234, 0.2);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.94);
  font: inherit;
  font-size: 14px;
  resize: none;
}

.sheet-viewer-notes-save-status {
  min-height: 18px;
  margin: -2px 0 0;
  color: rgba(255, 248, 234, 0.72);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
}

.sheet-viewer-notes-history {
  display: grid;
  gap: 7px;
  min-height: 0;
  padding: 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 234, 0.12);
  border-radius: 8px;
  background: rgba(255, 248, 234, 0.08);
}

.sheet-viewer-notes-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sheet-viewer-notes-history-heading span,
.sheet-viewer-notes-history-heading strong {
  color: rgba(255, 248, 234, 0.72);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.sheet-viewer-notes-history-list {
  display: grid;
  gap: 6px;
  overflow: auto;
}

.sheet-viewer-notes-history-list article,
.sheet-viewer-notes-history-empty {
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(255, 248, 234, 0.1);
  border-radius: 7px;
  background: rgba(255, 248, 234, 0.07);
}

.sheet-viewer-notes-history-list article strong {
  display: block;
  color: rgba(255, 248, 234, 0.88);
  font-size: 11px;
  line-height: 1.15;
}

.sheet-viewer-notes-history-list article p,
.sheet-viewer-notes-history-empty {
  color: rgba(255, 248, 234, 0.66);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.3;
}

.sheet-viewer-notes-history-list article p {
  display: -webkit-box;
  overflow: hidden;
  margin: 3px 0 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sheet-viewer-practice-status {
  color: rgba(255, 248, 234, 0.7);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.sheet-viewer-notes-panel grammarly-extension,
.sheet-viewer-notes-panel grammarly-popups,
.sheet-viewer-notes-panel lt-highlighter,
.sheet-viewer-notes-panel .grammarly-desktop-integration {
  display: none !important;
}

@media (max-width: 1100px) {
  .sheet-viewer-practice-controls {
    left: 8px;
    right: 8px;
    bottom: 58px;
    max-width: none;
    flex-wrap: wrap;
    border-radius: 12px;
    transform: none;
  }

  .sheet-viewer-practice-controls button {
    flex: 1 1 132px;
  }

  .sheet-viewer-queue-panel {
    left: 8px;
    bottom: auto;
    top: 74px;
    width: min(300px, 42vw);
    max-height: 300px;
  }

  .sheet-viewer-notes-panel {
    top: 74px;
    right: 8px;
    bottom: 126px;
    width: min(360px, 48vw);
  }
}

@media (max-width: 720px) {
  body[data-view="practice"] #practiceView .practice-log-strip .session-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sheet-viewer-queue-panel {
    display: none;
  }

  .sheet-viewer-notes-panel {
    left: 8px;
    width: auto;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #eef5f2 0, #f6f8fb 240px),
    var(--wash);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 24px 36px 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(20, 32, 44, 0.02);
}

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

h1 {
  font-size: 28px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 15px;
}

p {
  color: var(--muted);
  line-height: 1.45;
}

main {
  padding: 22px 36px 44px;
}

button,
.file-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  border-radius: 7px;
  min-height: 38px;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

button:hover,
.file-button:hover {
  background: var(--accent-strong);
}

button:active,
.file-button:active {
  transform: translateY(1px);
}

button.secondary,
.file-button.secondary,
button.ghost {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}

button.danger {
  color: var(--danger);
  border-color: #e3b8b8;
}

button.choice {
  min-height: 48px;
  background: white;
  color: var(--ink);
  border-color: var(--line);
}

button.choice:hover,
button.choice.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.top-actions,
.upload-actions,
.toolbar-actions,
.button-row,
.choice-grid {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--warn);
  white-space: nowrap;
  background: #fffaf0;
}

.status-pill.connected {
  color: var(--accent);
  background: #eefaf4;
  border-color: #b7dfcf;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.step {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  background: white;
  color: var(--ink);
  border-color: var(--line);
  min-height: 46px;
  box-shadow: 0 1px 0 rgba(20, 32, 44, 0.02);
}

.step span {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.step.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.step.active span {
  background: var(--accent);
  color: white;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid,
.next-grid,
.playlist-grid,
.practice-dashboard {
  display: grid;
  gap: 14px;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  margin-bottom: 14px;
}

.metric,
.panel,
.library,
.queue-panel,
.focus-panel,
.action-panel,
.dashboard-card,
.playlist-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 24px rgba(24, 39, 75, 0.04);
}

.metric strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  margin-bottom: 6px;
}

.metric span {
  color: var(--muted);
}

.practice-dashboard {
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  margin-bottom: 18px;
}

.studio-dashboard {
  grid-template-columns: minmax(260px, 1.25fr) repeat(3, minmax(190px, 1fr));
  margin-bottom: 16px;
}

.session-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: 16px;
  margin-bottom: 18px;
  align-items: start;
}

.panel-lite,
.session-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.section-title div {
  display: grid;
  gap: 4px;
}

.song-search-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  padding: 14px 18px 10px;
}

.quick-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 18px 14px;
}

button.quick-filter {
  min-height: 32px;
  padding: 5px 10px;
  background: white;
  border-color: var(--line);
  color: var(--ink);
  font-size: 13px;
}

button.quick-filter.active,
button.quick-filter:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.song-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 10px;
  max-height: 560px;
  overflow: auto;
  padding: 0 18px 18px;
}

.results-heading {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.song-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.song-card.dragging {
  opacity: 0.58;
}

.song-card:hover {
  border-color: #b8c9d7;
  box-shadow: 0 10px 24px rgba(24, 39, 75, 0.07);
}

.song-card-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.song-card-main div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.song-card-main h3,
.session-card h3 {
  overflow-wrap: anywhere;
}

.drag-handle {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  background: white;
}

.song-card-meta,
.song-card-actions,
.session-card-actions,
.modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

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

.style-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
}

.style-chips span:nth-child(2n) {
  background: var(--warm-soft);
  color: var(--warm);
}

.style-helper {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.session-box {
  position: sticky;
  top: 14px;
  min-height: 360px;
  border-color: #bed4f4;
}

.session-box.drag-over {
  border-color: var(--accent);
  background: #f3fbf8;
}

.session-list {
  display: grid;
  gap: 10px;
  min-height: 190px;
  max-height: 520px;
  overflow: auto;
  padding: 14px;
}

.session-empty {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 190px;
  border: 1px dashed #b8c6d3;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.session-empty strong {
  color: var(--ink);
}

.session-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f7fbff);
}

.playthrough-control {
  grid-template-columns: 1fr 86px;
  align-items: center;
}

.playthrough-control input {
  text-align: center;
  font-weight: 700;
}

.session-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 14px 14px;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid #b9ded3;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(237, 248, 244, 0.94)),
    var(--surface);
  box-shadow: var(--shadow);
}

.profile-hero h2 {
  margin: 4px 0 8px;
  font-size: 28px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-score,
.profile-stat,
.profile-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.profile-score {
  display: grid;
  gap: 6px;
  align-content: center;
  padding: 18px;
  text-align: center;
}

.profile-score span,
.profile-stat span,
.insight-item span,
.style-row span {
  color: var(--muted);
  font-size: 13px;
}

.profile-score strong {
  color: var(--accent);
  font-size: 42px;
  line-height: 1;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.profile-stat {
  display: grid;
  gap: 6px;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(24, 39, 75, 0.05);
}

.profile-stat strong {
  font-size: 24px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  align-items: start;
}

.profile-main,
.profile-sidebar,
.profile-panel,
.profile-song-list,
.insight-list,
.style-breakdown {
  display: grid;
  gap: 12px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 16px;
}

.profile-panel {
  margin-bottom: 0;
}

.compact-heading {
  box-shadow: none;
  margin: -18px -18px 0;
}

.profile-section-title {
  display: grid;
  gap: 4px;
}

.consistency-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(54px, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 150px;
}

.consistency-day {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}

.bar-track {
  display: flex;
  align-items: end;
  justify-content: center;
  width: 100%;
  height: 96px;
  border-radius: 8px;
  background: #f2f6f8;
  overflow: hidden;
}

.bar-track span {
  display: block;
  width: 62%;
  min-height: 8px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--accent), #8dc8bb);
}

.consistency-day strong {
  font-size: 13px;
}

.consistency-day small {
  color: var(--muted);
  font-size: 12px;
}

.profile-song-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  text-align: left;
  white-space: normal;
  color: var(--ink);
  border-color: var(--line);
  background: #fbfcfe;
}

.profile-song-item:hover {
  border-color: #b7dfcf;
  background: var(--accent-soft);
}

.profile-song-item span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.profile-song-item strong,
.profile-song-item small {
  overflow-wrap: anywhere;
}

.profile-song-item small,
.profile-song-item em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.insight-item {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.insight-item strong {
  overflow-wrap: anywhere;
}

.style-row {
  display: grid;
  gap: 7px;
}

.style-row div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.style-meter {
  height: 8px;
  border-radius: 999px;
  background: var(--soft);
  overflow: hidden;
}

.style-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #8cb4de);
}

.dashboard-card {
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
  box-shadow: var(--shadow);
}

.studio-dashboard .dashboard-card {
  min-height: 178px;
  background: rgba(255, 255, 255, 0.94);
}

.studio-dashboard .focus-card {
  background: linear-gradient(135deg, #ffffff, #edf8f4);
  border-color: #b9ded3;
}

.mini-list {
  display: grid;
  gap: 6px;
}

.mini-item {
  display: grid;
  gap: 3px;
  min-height: auto;
  padding: 10px;
  text-align: left;
  white-space: normal;
  background: #fbfcfe;
  color: var(--ink);
  border-color: var(--line);
}

.mini-item:hover {
  background: var(--accent-soft);
  border-color: #b7dfcf;
}

.mini-item span {
  color: var(--muted);
  font-size: 13px;
}

.next-grid {
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
}

.action-panel,
.panel {
  padding: 18px;
}

.action-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.panel {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.upload-panel {
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
}

.quiet-panel {
  background: linear-gradient(135deg, #ffffff, #f5fbf8);
}

.library-tools {
  max-width: 520px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.library-tools summary {
  width: fit-content;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
}

.library-tools p {
  margin: 10px 0;
}

.music-library-panel {
  gap: 14px;
}

.music-library-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.music-library-header h2 {
  margin: 3px 0 4px;
  font-size: 24px;
}

.music-summary {
  padding: 10px 12px;
  border: 1px solid #b7dfcf;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  white-space: nowrap;
  font-weight: 700;
}

.music-table-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 190px) minmax(160px, 210px) minmax(130px, 170px) auto auto;
  gap: 10px;
  align-items: center;
}

.bulk-edit-bar {
  display: grid;
  grid-template-columns: auto minmax(150px, 190px) minmax(170px, 230px) minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.bulk-edit-bar strong {
  color: var(--accent);
  white-space: nowrap;
}

.bulk-edit-bar button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.music-table-wrap {
  max-height: 650px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.music-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.music-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfc;
  color: var(--muted);
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.music-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #edf1f4;
  vertical-align: middle;
}

.music-table tr:hover td {
  background: #fbfdfc;
}

.music-table tr.selected td {
  background: var(--accent-soft);
}

.select-col {
  width: 42px;
  text-align: center;
}

.song-title-cell {
  min-width: 240px;
}

.song-title-cell span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.table-inline-input,
.table-inline-select {
  min-height: 32px;
  padding: 5px 7px;
  border-color: transparent;
  background: transparent;
}

.table-inline-input:hover,
.table-inline-input:focus,
.table-inline-select:hover,
.table-inline-select:focus {
  border-color: var(--line);
  background: white;
}

.title-input {
  font-weight: 750;
}

.tags-input {
  min-width: 180px;
}

.plays-cell {
  display: flex;
  gap: 8px;
  align-items: center;
}

.plays-cell strong {
  min-width: 26px;
}

.date-cell {
  color: var(--muted);
  white-space: nowrap;
}

.table-actions-cell {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.file-button input {
  display: none;
}

.muted {
  align-self: end;
  font-size: 14px;
}

.spotify-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 10px;
}

.spotify-grid.compact {
  grid-template-columns: 1fr 1fr;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  background: white;
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 76px;
  resize: vertical;
}

.text-link {
  align-self: center;
  color: var(--accent);
  text-decoration: none;
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(420px, 1fr);
  gap: 16px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-header.standalone {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
}

.queue-list {
  max-height: calc(100vh - 250px);
  overflow: auto;
  padding: 8px;
}

.queue-item {
  width: 100%;
  display: grid;
  gap: 4px;
  text-align: left;
  background: white;
  color: var(--ink);
  border-color: transparent;
  white-space: normal;
}

.queue-item:hover,
.queue-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.queue-item small,
.meta,
.badge,
.library-header p {
  color: var(--muted);
}

.focus-panel {
  min-height: 430px;
  padding: 18px;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.span-2 {
  grid-column: 1 / -1;
}

.original-box {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 14px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  margin-top: 18px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 280px;
  color: var(--muted);
  text-align: center;
}

.match-list {
  display: grid;
  gap: 10px;
}

.match-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.match-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

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

.manual-search {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
}

.match-pairing {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.match-pairing.matched {
  background: var(--accent-soft);
  border-color: #b7dfcf;
}

.sheet-link-line {
  margin-top: 4px;
}

.badge.matched,
.spotify-cell.matched .badge {
  color: var(--accent);
  background: #eefaf4;
  border-color: #b7dfcf;
}

.badge.needs-match,
.spotify-cell.needs-match .badge {
  color: var(--warn);
  background: #fffaf0;
  border-color: #edd6a3;
}

.badge.no-match,
.spotify-cell.no-match .badge {
  color: var(--muted);
  background: #f2f4f7;
}

.candidate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.candidate-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  white-space: nowrap;
}

.playlist-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  margin: 6px 0 2px;
}

.playlist-card {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.progress-bar {
  height: 8px;
  background: var(--soft);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

.playlist-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.spotify-layout {
  display: grid;
  gap: 18px;
}

.spotify-setup,
.playlist-panel {
  align-items: start;
}

.match-section {
  display: grid;
  gap: 12px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.library-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.library-header div {
  display: grid;
  gap: 4px;
}

.library-tools {
  display: grid;
  justify-content: stretch;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  background: #fbfcfe;
  border-bottom: 1px solid var(--line);
}

.tool-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.library-tools label {
  min-width: 145px;
}

.library-tools [data-filter="search"] {
  min-width: 260px;
}

button.small {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 13px;
}

.song-detail {
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
  background: #ffffff;
}

.empty-state.compact {
  min-height: 70px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.detail-stat {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfe;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(17, 24, 39, 0.42);
}

.modal-backdrop[hidden] {
  display: none;
}

.song-modal {
  width: min(920px, 100%);
  max-height: min(820px, calc(100vh - 44px));
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 18px;
  background: white;
  border-bottom: 1px solid var(--line);
}

#songModalBody {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.playlist-confirm-modal {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: hidden auto;
  color: var(--earth-ink);
  border: 1px solid rgba(31, 111, 99, 0.18);
  border-radius: 10px;
  background: var(--sand-panel);
  box-shadow: 0 30px 90px rgba(21, 58, 52, 0.32);
}

.playlist-confirm-backdrop {
  background: rgba(18, 50, 46, 0.52);
  backdrop-filter: blur(5px);
}

.playlist-confirm-modal .modal-header {
  color: #fff8ea;
  border-bottom: 1px solid rgba(255, 248, 234, 0.16);
  background: linear-gradient(135deg, #153a34 0%, #1d665d 58%, #12322e 100%);
}

.playlist-confirm-modal .modal-header .eyebrow,
.playlist-confirm-modal .modal-header h2,
.playlist-confirm-modal .modal-header p {
  color: #fff8ea;
}

.playlist-confirm-modal .modal-header h2 {
  margin-top: 2px;
}

.playlist-confirm-modal .modal-header p:not(.eyebrow) {
  color: rgba(255, 248, 234, 0.76);
  font-weight: 700;
}

#playlistConfirmClose {
  color: #12322e;
  border-color: rgba(255, 248, 234, 0.36);
  background: rgba(255, 248, 234, 0.92);
  box-shadow: 0 10px 24px rgba(9, 35, 31, 0.18);
}

#playlistConfirmClose:hover {
  background: #fff8ea;
}

.playlist-confirm-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.playlist-confirm-warning {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(31, 111, 99, 0.16);
  border-radius: 8px;
  background: rgba(226, 248, 234, 0.72);
}

.playlist-confirm-warning strong {
  color: var(--earth-ink);
}

.playlist-confirm-warning span,
.playlist-confirm-summary {
  color: var(--earth-muted);
  font-size: 13px;
  font-weight: 700;
}

.playlist-confirm-summary.working,
.spotify-inline-status {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--tea-green);
}

.playlist-confirm-summary.error {
  color: #a44335;
}

.playlist-confirm-options {
  display: grid;
  gap: 9px;
}

.playlist-confirm-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(31, 111, 99, 0.13);
  border-radius: 8px;
  background: rgba(255, 250, 239, 0.9);
}

.playlist-confirm-option.disabled {
  opacity: 0.58;
}

.playlist-confirm-option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.playlist-confirm-option span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.playlist-confirm-option strong {
  color: var(--earth-ink);
  font-size: 15px;
}

.playlist-confirm-option small,
.playlist-confirm-option em {
  color: var(--earth-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.3;
}

.playlist-confirm-option em {
  color: var(--tea-green);
  font-weight: 850;
}

.playlist-confirm-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.playlist-confirm-actions button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

.practice-cell {
  display: grid;
  gap: 6px;
  min-width: 138px;
}

.sheet-cell {
  display: grid;
  gap: 8px;
  min-width: 280px;
}

.sheet-cell .title-input {
  font-weight: 700;
}

.row-links,
.inline-fields {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-fields input {
  min-width: 130px;
  flex: 1;
}

.label-cell {
  display: grid;
  gap: 8px;
  min-width: 310px;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 13px;
}

.count-pill strong {
  color: var(--ink);
}

.count-pill.play_by_heart {
  border-color: #b7dfcf;
  background: #eefaf4;
  color: var(--accent);
}

.count-pill.familiar {
  border-color: #bed4f4;
  background: #f0f6ff;
  color: #275c9b;
}

.count-pill.learning {
  border-color: #edd6a3;
  background: #fffaf0;
  color: var(--warn);
}

.count-pill.new {
  border-color: #d4c7ee;
  background: #f6f2ff;
  color: #6846a3;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
}

th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0;
  color: var(--muted);
  padding: 10px;
  background: #f8fafc;
}

td {
  border-top: 1px solid var(--line);
  padding: 10px;
  vertical-align: top;
}

.spotify-cell {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 140px;
}

.spotify-cell a {
  color: var(--accent);
}

.spotify-cell a:not([href]) {
  display: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 28px;
  padding: 3px 9px;
  background: white;
  font-size: 13px;
}

.familiarity-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(74px, 1fr));
  gap: 6px;
  min-width: 220px;
}

button.familiarity-chip {
  min-height: 30px;
  padding: 4px 8px;
  border-color: var(--line);
  background: white;
  color: var(--ink);
  font-size: 12px;
}

button.familiarity-chip:hover,
button.familiarity-chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

button.familiarity-chip.play_by_heart.active {
  background: #eefaf4;
}

button.familiarity-chip.familiar.active {
  border-color: #98bde8;
  background: #f0f6ff;
  color: var(--blue);
}

button.familiarity-chip.learning.active {
  border-color: #e0bd71;
  background: var(--warm-soft);
  color: var(--warn);
}

button.familiarity-chip.new.active {
  border-color: #c7d8e7;
  background: #f4f8fb;
  color: #4d6578;
}

button.familiarity-chip.unknown.active {
  color: var(--muted);
  background: #f2f4f7;
  border-color: #cfd6df;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: min(680px, calc(100vw - 32px));
  background: #111827;
  color: white;
  border-radius: 8px;
  padding: 10px 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

#toast.show {
  opacity: 1;
}

@media (max-width: 1100px) {
  .metric-grid,
  .playlist-grid,
  .practice-dashboard {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .next-grid,
  .review-layout,
  .upload-panel,
  .session-workspace,
  .profile-hero,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-stat-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .music-table-tools,
  .bulk-edit-bar {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .session-box {
    position: static;
  }
}

@media (max-width: 760px) {
  .topbar,
  .panel,
  .detail-header,
  .match-card-header {
    flex-direction: column;
    align-items: stretch;
  }

  main,
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .metric-grid,
  .playlist-grid,
  .practice-dashboard,
  .song-card-grid,
  .song-search-form,
  .detail-grid,
  .focus-grid,
    .choice-grid,
    .manual-search,
    .match-pairing,
    .spotify-grid,
    .spotify-grid.compact,
    .profile-stat-grid,
    .profile-grid,
    .music-table-tools,
    .bulk-edit-bar {
    grid-template-columns: 1fr;
  }

  .music-library-header {
    flex-direction: column;
  }

  .music-summary {
    width: fit-content;
  }

  .profile-hero {
    padding: 18px;
  }

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

  .consistency-bars {
    grid-template-columns: repeat(7, minmax(38px, 1fr));
    gap: 6px;
  }

  .bar-track {
    height: 74px;
  }

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

  .tool-group,
  .row-links,
  .inline-fields,
  .song-card-actions,
  .session-card-actions,
  .session-actions {
    align-items: stretch;
  }

  .section-title,
  .modal-header {
    flex-direction: column;
  }

  .song-card-actions > *,
  .session-card-actions > *,
  .modal-actions > * {
    width: 100%;
    justify-content: center;
  }
}

/* Music-app redesign */
body {
  min-height: 100vh;
  padding: 8px 8px 96px;
  color: var(--ink);
  background:
    radial-gradient(circle at 72% 0, rgba(30, 215, 96, 0.18), transparent 32vw),
    linear-gradient(180deg, #050505 0, #101010 48vh, #000 100%);
  overflow-x: hidden;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 8px;
  min-height: calc(100vh - 104px);
}

.left-rail,
.main-shell {
  border-radius: 8px;
  background: #121212;
}

.left-rail {
  position: sticky;
  top: 8px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
  height: calc(100vh - 112px);
  min-height: 620px;
  padding: 8px;
  align-self: start;
}

.main-shell {
  min-width: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(70, 88, 78, 0.92) 0, rgba(28, 30, 29, 0.98) 250px, #121212 420px),
    #121212;
}

.main-shell main {
  padding: 0 24px 32px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 24px;
  border: 0;
  background: linear-gradient(180deg, rgba(34, 42, 37, 0.96), rgba(24, 24, 24, 0.74));
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.topbar h2 {
  margin: 2px 0 4px;
  font-size: 32px;
  line-height: 1.05;
}

.page-kicker,
.eyebrow {
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: #121212;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #04140a;
  background: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.brand h1 {
  font-size: 17px;
  line-height: 1.1;
}

.brand p,
.rail-pill small,
p,
.meta {
  color: var(--muted);
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin: 0;
  overflow: visible;
}

.step,
.rail-pill {
  justify-content: flex-start;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.step {
  display: flex;
  gap: 14px;
}

.step strong {
  font-weight: 800;
}

.step:hover,
.rail-pill:hover {
  color: #ffffff;
  background: #1a1a1a;
}

.step.active {
  color: #ffffff;
  background: #232323;
  border: 0;
}

.step span {
  min-width: 22px;
  height: 22px;
  padding: 0;
  color: currentColor;
  background: transparent;
  font-size: 0;
}

.nav-icon {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 6px;
}

.nav-home::before {
  content: "";
  position: absolute;
  left: 4px;
  top: -5px;
  width: 10px;
  height: 10px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
  background: #121212;
}

.step.active .nav-home::before {
  background: #232323;
}

.nav-profile {
  border-radius: 999px;
}

.nav-profile::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 3px;
  height: 6px;
  border-radius: 999px 999px 5px 5px;
  background: currentColor;
}

.nav-library::before,
.nav-library::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.nav-library::before {
  top: 6px;
}

.nav-library::after {
  top: 12px;
}

.nav-spotify {
  border-radius: 999px;
}

.nav-spotify::before {
  content: "";
  position: absolute;
  inset: 5px 4px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 999px;
}

.rail-library {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  padding: 8px;
  border-radius: 8px;
  background: #161616;
  overflow: auto;
}

.rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 8px;
  color: var(--muted);
  font-weight: 800;
}

.rail-heading strong {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #ffffff;
  background: #242424;
}

.rail-pill {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.rail-pill span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.rail-pill strong,
.rail-pill small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-art {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.rail-art-green {
  background: linear-gradient(135deg, #1ed760, #146ef5);
}

.rail-art-blue {
  background: linear-gradient(135deg, #5b7cfa, #d65db1);
}

.rail-art-coral {
  background: linear-gradient(135deg, #ff8066, #ffd166);
}

button,
.file-button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #07120b;
  font-weight: 800;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease, opacity 140ms ease, box-shadow 140ms ease;
}

button:hover,
.file-button:hover {
  background: var(--accent-strong);
  box-shadow: 0 8px 22px rgba(30, 215, 96, 0.18);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  border: 1px solid #333333;
  color: #737373;
  background: #242424;
  box-shadow: none;
  opacity: 1;
  transform: none;
}

button.secondary,
.file-button.secondary,
button.ghost,
button.quick-filter,
button.choice,
button.familiarity-chip {
  border: 1px solid #333333;
  color: var(--ink);
  background: #242424;
}

button.secondary:hover,
.file-button.secondary:hover,
button.ghost:hover,
button.quick-filter:hover,
button.quick-filter.active,
button.choice:hover,
button.choice.active,
button.familiarity-chip:hover,
button.familiarity-chip.active {
  border-color: #3f3f3f;
  color: #ffffff;
  background: #333333;
  box-shadow: none;
}

input,
select,
textarea {
  border-color: #333333;
  color: var(--ink);
  background: #242424;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

option {
  color: var(--ink);
  background: #242424;
}

.status-pill,
.badge,
.count-pill,
.music-summary {
  border-color: #333333;
  color: var(--muted);
  background: #242424;
}

.topbar .status-pill {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  overflow: hidden;
  color: transparent;
  border-radius: 999px;
  white-space: nowrap;
}

.topbar .status-pill::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin: 11px auto;
  border-radius: 999px;
  background: var(--warn);
  box-shadow: 0 0 14px rgba(246, 196, 83, 0.5);
}

.topbar .status-pill.connected::before {
  background: var(--accent);
  box-shadow: 0 0 14px rgba(30, 215, 96, 0.6);
}

.status-pill.connected,
.badge.matched,
.spotify-cell.matched .badge,
.count-pill.play_by_heart {
  border-color: rgba(30, 215, 96, 0.42);
  color: var(--accent);
  background: var(--accent-soft);
}

.badge.needs-match,
.spotify-cell.needs-match .badge,
.count-pill.learning {
  border-color: rgba(246, 196, 83, 0.42);
  color: var(--warn);
  background: rgba(246, 196, 83, 0.12);
}

.badge.no-match,
.spotify-cell.no-match .badge {
  color: #cfcfcf;
  background: #2a2a2a;
}

.text-link,
.spotify-cell a {
  color: var(--accent);
  font-weight: 700;
}

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

.studio-dashboard {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.metric,
.panel,
.library,
.queue-panel,
.focus-panel,
.action-panel,
.dashboard-card,
.playlist-card,
.profile-score,
.profile-stat,
.profile-panel,
.panel-lite,
.session-box,
.section-heading,
.match-card,
.song-modal {
  border-color: var(--line);
  background: rgba(24, 24, 24, 0.94);
  box-shadow: none;
}

.metric {
  display: grid;
  gap: 4px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.metric strong {
  color: #ffffff;
}

.dashboard-card,
.studio-dashboard .dashboard-card,
.studio-dashboard .focus-card,
.profile-hero,
.quiet-panel,
.session-card,
.style-helper,
.detail-stat,
.bulk-edit-bar,
.match-pairing,
.match-pairing.matched,
.candidate,
.original-box,
.song-detail,
.music-table-wrap,
.session-empty,
.profile-song-item,
.mini-item {
  border-color: var(--line);
  background: #181818;
}

.studio-dashboard .focus-card {
  background:
    linear-gradient(135deg, rgba(30, 215, 96, 0.16), transparent 52%),
    #181818;
}

.dashboard-card h2,
.section-title h2,
.profile-section-title h2,
.music-library-header h2,
.match-card h3,
.playlist-card h3 {
  color: #ffffff;
}

.section-title,
.panel-header,
.library-header,
.modal-header {
  border-color: var(--line);
  background: transparent;
}

.section-title {
  padding: 18px 20px;
}

.session-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  gap: 8px;
}

.song-search-form {
  grid-template-columns: minmax(220px, 1fr) auto auto;
  padding: 14px 20px 10px;
}

.quick-filters {
  padding: 0 20px 16px;
}

.song-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  max-height: none;
  padding: 0 20px 20px;
}

.song-card {
  position: relative;
  gap: 12px;
  min-height: 285px;
  padding: 14px;
  border-color: transparent;
  background: #181818;
  box-shadow: none;
  overflow: hidden;
}

.song-card:hover {
  border-color: transparent;
  background: #282828;
  box-shadow: none;
  transform: translateY(-2px);
}

.song-card-main {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: start;
}

.song-card-main h3,
.session-card h3,
.profile-song-item strong,
.mini-item strong {
  color: #ffffff;
}

.drag-handle {
  border-color: #333333;
  background: #242424;
}

.style-chips span {
  color: #e8f4ff;
  background: rgba(80, 160, 255, 0.18);
}

.style-chips span:nth-child(2n) {
  color: #ffe2c7;
  background: rgba(255, 184, 107, 0.16);
}

.card-play-indicator {
  position: absolute;
  top: 78px;
  right: 18px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateY(8px) scale(0.94);
  transition: opacity 160ms ease, transform 160ms ease;
}

.card-play-indicator::before {
  content: "";
  margin-left: 3px;
  border-left: 13px solid #07120b;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.song-card:hover .card-play-indicator,
.song-card:focus-within .card-play-indicator {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.cover-art {
  position: relative;
  display: grid;
  align-content: space-between;
  flex: 0 0 auto;
  width: 72px;
  aspect-ratio: 1;
  padding: 8px;
  border-radius: 6px;
  overflow: hidden;
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
}

.cover-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.38), transparent 22%),
    linear-gradient(135deg, rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.42));
}

.cover-art::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 52%;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 9px 0 rgba(255, 255, 255, 0.35), 0 -9px 0 rgba(255, 255, 255, 0.28);
}

.cover-art span,
.cover-art i {
  position: relative;
  z-index: 1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cover-art span {
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
}

.cover-art i {
  align-self: end;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.cover-art-xs {
  width: 42px;
  padding: 6px;
  border-radius: 5px;
}

.cover-art-xs span {
  font-size: 12px;
}

.cover-art-xs i {
  display: none;
}

.cover-art-sm {
  width: 52px;
}

.cover-art-card {
  width: 92px;
}

.cover-art-playlist {
  width: 100%;
  max-width: 160px;
  justify-self: start;
}

.cover-art-player {
  width: 56px;
}

.cover-0 {
  background: linear-gradient(135deg, #1ed760, #127a3a);
}

.cover-1 {
  background: linear-gradient(135deg, #6a7cff, #1b3f85);
}

.cover-2 {
  background: linear-gradient(135deg, #ff7a59, #8b2434);
}

.cover-3 {
  background: linear-gradient(135deg, #ffd166, #9a6415);
}

.cover-4 {
  background: linear-gradient(135deg, #25ced1, #155a80);
}

.cover-5 {
  background: linear-gradient(135deg, #d65db1, #533483);
}

.cover-6 {
  background: linear-gradient(135deg, #9bc53d, #2d6a4f);
}

.cover-7 {
  background: linear-gradient(135deg, #f15bb5, #00bbf9);
}

.mini-item {
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  min-height: 58px;
  color: var(--ink);
}

.mini-item:hover,
.profile-song-item:hover {
  border-color: #333333;
  background: #282828;
}

.mini-item > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.mini-item > span small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-song-item {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.profile-hero {
  border: 0;
  background:
    linear-gradient(135deg, rgba(30, 215, 96, 0.18), rgba(37, 206, 209, 0.08)),
    #181818;
}

.profile-score strong {
  color: var(--accent);
}

.bar-track,
.style-meter,
.progress-bar {
  background: #2a2a2a;
}

.bar-track span,
.progress-bar span {
  background: var(--accent);
}

.style-meter span {
  background: linear-gradient(90deg, var(--accent), #25ced1);
}

.session-box {
  top: 12px;
}

.session-box.drag-over {
  border-color: var(--accent);
  background: rgba(30, 215, 96, 0.08);
}

.session-card-title {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.session-card-title > div {
  min-width: 0;
}

.session-empty {
  border-style: dashed;
}

.music-table th,
th {
  color: var(--muted);
  background: #202020;
}

.music-table td,
td {
  border-color: #252525;
}

.music-table tr:hover td {
  background: #202020;
}

.music-table tr.selected td {
  background: rgba(30, 215, 96, 0.08);
}

.table-inline-input,
.table-inline-select {
  color: var(--ink);
}

.table-inline-input:hover,
.table-inline-input:focus,
.table-inline-select:hover,
.table-inline-select:focus {
  border-color: #333333;
  background: #242424;
}

.song-title-cell span,
.date-cell {
  color: var(--muted);
}

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

.playlist-card {
  align-content: start;
  min-height: 250px;
  border-color: transparent;
  background: #181818;
}

.playlist-card:hover {
  background: #282828;
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.modal-header {
  background: rgba(24, 24, 24, 0.96);
  backdrop-filter: blur(14px);
}

#toast {
  background: #ffffff;
  color: #111111;
}

.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 560px) minmax(180px, 1fr);
  gap: 20px;
  align-items: center;
  min-height: 88px;
  padding: 12px 18px;
  border-top: 1px solid #282828;
  color: var(--ink);
  background: #000000;
}

.player-track,
.player-center,
.player-context {
  min-width: 0;
}

.player-track {
  display: flex;
  gap: 12px;
  align-items: center;
}

.player-track > div:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.player-track strong,
.player-track span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-track span,
.player-context {
  color: var(--muted);
  font-size: 13px;
}

.player-center {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.player-controls {
  display: flex;
  gap: 14px;
  align-items: center;
}

.player-icon,
.player-play {
  display: grid;
  place-items: center;
  padding: 0;
}

.player-icon {
  width: 34px;
  height: 34px;
  min-height: 34px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
}

.player-icon:hover {
  color: #ffffff;
  background: transparent;
  box-shadow: none;
}

.player-play {
  width: 42px;
  height: 42px;
  min-height: 42px;
  background: #ffffff;
}

.player-play:hover {
  background: #ffffff;
  box-shadow: none;
  transform: scale(1.04);
}

.player-play:disabled {
  border: 0;
  background: #3a3a3a;
}

.player-play:disabled span {
  border-left-color: #121212;
}

.player-play span {
  margin-left: 3px;
  border-left: 13px solid #000000;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.player-progress {
  display: grid;
  grid-template-columns: auto minmax(120px, 420px) auto;
  gap: 10px;
  align-items: center;
  width: min(100%, 520px);
  color: var(--muted);
  font-size: 12px;
}

.player-progress div {
  height: 4px;
  border-radius: 999px;
  background: #4d4d4d;
  overflow: hidden;
}

.player-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #ffffff;
  transition: width 180ms ease;
}

.player-context {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(30, 215, 96, 0.8);
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .left-rail {
    padding: 8px;
  }

  .brand {
    justify-content: center;
    padding: 8px;
  }

  .brand div:last-child,
  .rail-pill span:last-child,
  .rail-song span:last-child,
  .rail-filter-row,
  .rail-heading span,
  .step strong {
    display: none;
  }

  .step,
  .rail-pill {
    justify-content: center;
    grid-template-columns: 1fr;
  }

  .rail-heading {
    justify-content: center;
  }

  .session-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  body {
    padding: 0 0 96px;
  }

  .app-shell {
    display: block;
    min-height: auto;
  }

  .left-rail {
    position: sticky;
    top: 0;
    z-index: 25;
    display: block;
    height: auto;
    min-height: 0;
    padding: 8px;
    border-radius: 0;
    background: #000000;
  }

  .brand,
  .rail-library {
    display: none;
  }

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

  .step {
    justify-content: center;
    min-height: 54px;
    padding: 8px 6px;
  }

  .step strong {
    display: block;
    font-size: 12px;
  }

  .nav-icon {
    width: 18px;
    height: 18px;
  }

  .main-shell {
    border-radius: 0;
  }

  .main-shell main,
  main {
    padding: 0 14px 24px;
  }

  .topbar {
    padding: 18px 14px;
  }

  .topbar h2 {
    font-size: 27px;
  }

  .song-search-form,
  .music-table-tools,
  .bulk-edit-bar,
  .spotify-grid,
  .spotify-grid.compact {
    grid-template-columns: 1fr;
  }

  .song-card-main {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .song-card-main .drag-handle {
    display: none;
  }

  .cover-art-card {
    width: 72px;
  }

  .card-play-indicator {
    top: 58px;
  }

  .profile-song-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .profile-song-item em {
    grid-column: 2;
  }

  .player-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    min-height: 88px;
    padding: 10px 12px;
  }

  .player-center {
    justify-items: end;
  }

  .player-progress,
  .player-context {
    display: none;
  }

  .player-controls {
    gap: 8px;
  }

  .player-icon {
    display: none;
  }

  .player-icon[data-view-shortcut] {
    display: grid;
  }
}

/* Pass 2: Spotify-like shelves and mobile app chrome */
.studio-dashboard,
.practice-dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-bottom: 24px;
}

.dashboard-card,
.studio-dashboard .dashboard-card,
.studio-dashboard .focus-card {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-card h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.mini-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(148px, 172px);
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 0 2px 6px;
  scrollbar-width: thin;
}

.mini-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  min-height: 232px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: #181818;
  color: var(--ink);
  text-align: left;
  transition: background 160ms ease, transform 160ms ease;
}

.mini-item:hover,
.mini-item:focus-within {
  background: #282828;
  transform: translateY(-2px);
}

.mini-cover-button,
.mini-copy {
  width: 100%;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: inherit;
  background: transparent;
  box-shadow: none;
  text-align: left;
  white-space: normal;
}

.mini-cover-button:hover,
.mini-copy:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.mini-copy {
  display: grid;
  gap: 4px;
}

.mini-copy strong,
.mini-copy small,
.mini-copy em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-copy strong {
  color: #ffffff;
  font-size: 14px;
  line-height: 1.2;
}

.mini-copy small,
.mini-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.25;
}

.cover-art-shelf {
  width: 100%;
  min-width: 0;
  border-radius: 6px;
}

.mini-play-button,
.card-play-indicator {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateY(8px) scale(0.94);
  transition: opacity 160ms ease, transform 160ms ease, background 140ms ease;
}

.mini-play-button {
  top: 104px;
  right: 18px;
  width: 42px;
  height: 42px;
  min-height: 42px;
}

.mini-play-button span,
.card-play-indicator span {
  margin-left: 3px;
  border-left: 12px solid #07120b;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

.mini-item:hover .mini-play-button,
.mini-item:focus-within .mini-play-button,
.song-card:hover .card-play-indicator,
.song-card:focus-within .card-play-indicator {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.mini-play-button:hover,
.card-play-indicator:hover {
  background: #3be477;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.42);
  transform: translateY(0) scale(1.04);
}

.song-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.song-card {
  min-height: 244px;
}

.song-card-main {
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
}

.song-card-main .drag-handle {
  position: absolute;
  top: 14px;
  right: 14px;
}

.cover-art-card {
  width: 104px;
}

.card-play-indicator {
  top: 86px;
  right: 24px;
  width: 46px;
  height: 46px;
  min-height: 46px;
}

.card-play-indicator::before {
  display: none;
}

.song-card-actions {
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.song-card:hover .song-card-actions,
.song-card:focus-within .song-card-actions {
  opacity: 1;
  transform: translateY(0);
}

.session-empty.now-playing-empty {
  min-height: 240px;
  padding: 22px;
  border-style: solid;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    #181818;
}

.cover-art-session {
  width: min(170px, 72%);
  justify-self: center;
  margin-bottom: 6px;
}

.rail-filter-row {
  display: flex;
  gap: 6px;
  padding: 0 2px 4px;
  overflow: hidden;
}

.rail-filter-row span {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: #242424;
  font-size: 12px;
  font-weight: 800;
}

.rail-song-list {
  display: grid;
  gap: 4px;
  padding-top: 6px;
}

.rail-song,
.rail-empty {
  width: 100%;
}

.rail-song {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 6px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.rail-song:hover {
  background: #242424;
  box-shadow: none;
}

.rail-song span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.rail-song strong,
.rail-song small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-song strong {
  color: #ffffff;
  font-size: 13px;
}

.rail-song small,
.rail-empty {
  color: var(--muted);
  font-size: 12px;
}

.cover-art-rail {
  width: 42px;
  border-radius: 5px;
}

.cover-art-rail span {
  font-size: 12px;
}

.cover-art-rail i {
  display: none;
}

.cover-art-image {
  background: #282828;
}

.cover-art-image img {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-art-image.image-failed img {
  display: none;
}

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

.mini-placeholder {
  opacity: 0.9;
}

.mini-placeholder .placeholder-add::before,
.mini-placeholder .placeholder-add::after {
  width: 14px;
}

.rail-placeholder {
  opacity: 0.9;
}

.candidate-track {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.candidate-track img {
  width: 54px;
  height: 54px;
  border-radius: 5px;
}

.candidate-track span {
  min-width: 0;
}

.candidate-track strong,
.candidate-track p {
  overflow-wrap: anywhere;
}

.player-clear::before,
.player-clear::after,
.player-home::before,
.player-home::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: currentColor;
}

.player-icon {
  position: relative;
}

.player-clear::before,
.player-clear::after {
  width: 16px;
  height: 2px;
}

.player-clear::before {
  transform: rotate(45deg);
}

.player-clear::after {
  transform: rotate(-45deg);
}

.player-home::before {
  width: 18px;
  height: 14px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 3px;
  background: transparent;
}

.player-home::after {
  width: 12px;
  height: 12px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  border-radius: 2px 0 0 0;
  background: transparent;
  transform: translateY(-6px) rotate(45deg);
}

.insight-item,
.queue-item,
.song-detail,
.focus-panel,
.library-tools,
.panel-header.standalone,
.music-table th,
th {
  background: #181818;
}

.queue-item,
.insight-item,
.profile-song-item,
.candidate,
.match-card,
.playlist-card,
.music-table-wrap,
.bulk-edit-bar,
.detail-stat,
.style-helper,
.original-box {
  border-color: #2a2a2a;
}

@media (max-width: 820px) {
  body {
    padding-bottom: 138px;
  }

  .left-rail {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    display: block;
    height: 64px;
    min-height: 0;
    padding: 6px 8px;
    border-radius: 0;
    background: #000000;
  }

  .steps {
    height: 52px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .step {
    display: grid;
    justify-items: center;
    gap: 3px;
    min-height: 52px;
    padding: 6px 4px;
    border-radius: 6px;
  }

  .step strong {
    display: block;
    font-size: 11px;
  }

  .topbar {
    position: sticky;
    top: 0;
  }

  .mini-list {
    grid-auto-columns: minmax(136px, 154px);
    gap: 12px;
  }

  .mini-item {
    min-height: 210px;
    padding: 10px;
  }

  .mini-play-button {
    top: 92px;
    right: 16px;
    width: 40px;
    height: 40px;
    min-height: 40px;
    opacity: 1;
    transform: none;
  }

  .player-bar {
    bottom: 64px;
    min-height: 72px;
    padding: 8px 12px 12px;
  }

  .player-track .cover-art {
    width: 48px;
  }

  .player-play {
    width: 38px;
    height: 38px;
    min-height: 38px;
  }

  .player-progress {
    position: absolute;
    right: 12px;
    bottom: 5px;
    left: 12px;
    display: block;
    width: auto;
  }

  .player-progress span {
    display: none;
  }

  .player-progress div {
    height: 2px;
  }

  .player-icon[data-view-shortcut] {
    display: none;
  }

  .song-card-actions {
    opacity: 1;
    transform: none;
  }
}

/* Pass 3: clarify add vs play and improve player clearance */
.main-shell main {
  padding-bottom: 132px;
}

.topbar {
  padding: 16px 24px 18px;
}

.topbar h2 {
  font-size: 29px;
}

#flowSummary {
  max-width: 620px;
  font-size: 14px;
  line-height: 1.32;
}

.mini-add-button,
.card-add-indicator {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.94);
  transition: opacity 160ms ease, transform 160ms ease, background 140ms ease;
}

.mini-add-button {
  top: 104px;
  right: 18px;
  width: 42px;
  height: 42px;
  min-height: 42px;
}

.card-add-indicator {
  top: 86px;
  right: 24px;
  width: 46px;
  height: 46px;
  min-height: 46px;
}

.mini-add-button span,
.card-add-indicator span {
  display: none;
}

.mini-add-button::before,
.mini-add-button::after,
.card-add-indicator::before,
.card-add-indicator::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 3px;
  border-radius: 999px;
  background: #07120b;
}

.mini-add-button::after,
.card-add-indicator::after {
  transform: rotate(90deg);
}

.mini-item:hover .mini-add-button,
.mini-item:focus-within .mini-add-button,
.song-card:hover .card-add-indicator,
.song-card:focus-within .card-add-indicator {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.mini-add-button:hover,
.card-add-indicator:hover {
  background: #3be477;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.42);
  transform: translateY(0) scale(1.04);
}

.song-card {
  min-height: 218px;
}

.song-card .drag-handle {
  opacity: 0;
  pointer-events: none;
}

.song-card-status {
  margin-top: -2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.song-card-actions {
  gap: 6px;
}

.song-card-actions .text-link,
.song-card-actions button {
  min-height: 32px;
  font-size: 13px;
}

@media (max-width: 820px) {
  .main-shell main,
  main {
    padding-bottom: 100px;
  }

  .topbar {
    padding: 14px;
  }

  .topbar h2 {
    font-size: 27px;
  }

  #flowSummary {
    font-size: 14px;
  }

  .mini-add-button {
    top: 92px;
    right: 16px;
    width: 40px;
    height: 40px;
    min-height: 40px;
    opacity: 0;
    transform: translateY(6px) scale(0.94);
  }

  .mini-item:active .mini-add-button,
  .mini-item:focus-within .mini-add-button {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 820px) and (hover: hover) {
  .mini-item:hover .mini-add-button {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 820px) and (hover: none) {
  .mini-add-button {
    display: none;
  }
}

/* Component polish pass: Spotify-density spacing, fixed chrome, and consistent controls */
body {
  padding: 8px 8px 104px;
  background:
    linear-gradient(180deg, rgba(30, 215, 96, 0.11) 0, rgba(22, 32, 25, 0.78) 180px, #121212 430px),
    #000000;
}

.app-shell {
  min-height: calc(100vh - 112px);
}

.main-shell {
  background:
    linear-gradient(180deg, rgba(49, 65, 55, 0.88) 0, rgba(18, 18, 18, 0.98) 246px, #121212 520px),
    #121212;
}

.main-shell main {
  padding: 0 24px 136px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 104px;
  padding: 18px 24px 16px;
  background: linear-gradient(180deg, rgba(24, 32, 27, 0.96), rgba(18, 18, 18, 0.62));
}

.topbar h2 {
  margin: 2px 0 3px;
  font-size: 30px;
  line-height: 1.04;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.top-search-pill {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  width: min(34vw, 360px);
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #3b3b3b;
  border-radius: 999px;
  color: #d7d7d7;
  background: #242424;
  box-shadow: none;
  font-size: 14px;
  font-weight: 750;
  text-align: left;
}

.top-search-pill:hover,
.top-search-pill:focus-visible {
  color: #ffffff;
  background: #2f2f2f;
  box-shadow: none;
  transform: none;
}

.top-search-pill span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-search-icon {
  position: relative;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.top-search-icon::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
}

.topbar .status-pill {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border: 0;
  background: #0b0b0b;
}

.left-rail {
  gap: 6px;
  padding: 8px 8px 14px;
  height: calc(100vh - 112px);
  min-height: 600px;
}

.brand {
  min-height: 66px;
  padding: 10px 12px;
}

.steps {
  gap: 2px;
}

.step {
  gap: 13px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 6px;
}

.step strong {
  font-size: 15px;
  line-height: 1;
}

.step span {
  min-width: 20px;
  height: 20px;
}

.nav-icon {
  width: 20px;
  height: 20px;
  border-width: 2px;
  opacity: 0.78;
}

.step.active .nav-icon,
.step:hover .nav-icon {
  opacity: 1;
}

.step.active {
  background: #242424;
}

.rail-library {
  gap: 6px;
  padding: 8px 6px 20px;
  scrollbar-width: thin;
}

.rail-heading {
  padding: 2px 4px 6px;
  font-size: 13px;
}

.rail-heading strong {
  width: 28px;
  height: 28px;
}

.rail-filter-row {
  display: none;
}

.rail-pill,
.rail-song {
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  min-height: 50px;
  padding: 5px 6px;
  border-radius: 6px;
}

.rail-pill strong,
.rail-song strong {
  color: #ffffff;
  font-size: 13px;
  line-height: 1.12;
}

.rail-pill small,
.rail-song small {
  color: #a7a7a7;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.15;
}

.rail-song-list {
  gap: 2px;
  padding: 4px 0 10px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin: 2px 0 24px;
}

.metric {
  min-height: 76px;
  padding: 13px 14px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.metric strong {
  margin: 0 0 5px;
  font-size: 24px;
}

.metric span {
  font-size: 12px;
  font-weight: 700;
}

.studio-dashboard,
.practice-dashboard {
  gap: 24px;
  margin: 0 0 22px;
}

.dashboard-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.12;
}

.studio-dashboard .dashboard-card {
  position: relative;
}

.studio-dashboard .dashboard-card::after {
  content: "";
  position: absolute;
  top: 34px;
  right: 0;
  bottom: 4px;
  z-index: 3;
  width: 150px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(18, 18, 18, 0), rgba(18, 18, 18, 0.94) 58%, #121212 100%);
}

.mini-list {
  grid-auto-columns: 154px;
  gap: 12px;
  padding: 0 28px 8px 0;
  scroll-padding-inline: 0 28px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 34px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 34px), transparent 100%);
}

.mini-list::-webkit-scrollbar {
  display: none;
}

.mini-item {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  gap: 8px;
  min-height: 218px;
  padding: 10px;
  border-radius: 7px;
}

.cover-art-shelf {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 5px;
}

.mini-copy {
  gap: 2px;
  align-self: start;
}

.mini-copy strong {
  min-height: 34px;
  font-size: 14px;
  line-height: 1.18;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

.mini-copy small,
.mini-copy em {
  font-size: 12px;
  line-height: 1.16;
  white-space: nowrap;
}

.mini-play-button,
.mini-add-button {
  top: 100px;
  right: 16px;
  width: 40px;
  height: 40px;
  min-height: 40px;
}

.session-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  gap: 10px;
  margin-bottom: 24px;
}

.panel-lite,
.session-box,
.music-library-panel,
.upload-panel,
.quiet-panel,
.spotify-setup,
.playlist-panel,
.profile-panel,
.match-section {
  border: 0;
  background: rgba(24, 24, 24, 0.92);
  box-shadow: none;
}

.section-title,
.music-library-header,
.profile-section-title,
.section-heading {
  gap: 12px;
}

.section-title {
  padding: 16px 18px 12px;
}

.section-title p,
.music-library-header p,
.profile-section-title p,
.section-heading p {
  max-width: 620px;
  font-size: 13px;
  line-height: 1.32;
}

.song-search-form {
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 8px;
  padding: 12px 18px 9px;
}

.song-search-form input,
.music-table-tools input,
.music-table-tools select,
.bulk-edit-bar input,
.bulk-edit-bar select,
.spotify-grid input {
  min-height: 38px;
  border-radius: 999px;
}

.quick-filters {
  gap: 6px;
  padding: 0 18px 13px;
}

button.quick-filter {
  min-height: 30px;
  padding: 4px 11px;
  font-size: 12px;
}

.song-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.song-card {
  grid-template-rows: auto min-content auto;
  gap: 8px;
  min-height: 122px;
  padding: 12px;
  border-radius: 7px;
}

.song-card-main {
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 11px;
}

.cover-art-card {
  width: 88px;
}

.song-card-main h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 15px;
  line-height: 1.16;
}

.song-card-main p,
.song-card-status {
  overflow: hidden;
  color: #a7a7a7;
  font-size: 12px;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-card-actions {
  position: absolute;
  right: 12px;
  bottom: 12px;
  gap: 6px;
  margin-top: 0;
}

.song-card-actions .text-link,
.song-card-actions button {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}

.song-card-status {
  align-self: end;
  max-width: calc(100% - 108px);
}

.card-add-indicator,
.card-play-indicator {
  top: 72px;
  right: 18px;
  width: 40px;
  height: 40px;
  min-height: 40px;
}

.session-box {
  top: 12px;
  min-height: 0;
}

.session-list {
  gap: 8px;
  min-height: 164px;
  max-height: 428px;
  padding: 12px;
}

.session-empty.now-playing-empty {
  min-height: 210px;
  padding: 18px;
}

.session-card {
  gap: 8px;
  padding: 10px;
  background: #181818;
}

.session-actions {
  padding: 0 12px 12px;
}

.session-actions button {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 12px;
}

.player-bar {
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 540px) minmax(180px, 1fr);
  min-height: 88px;
  padding: 11px 18px;
  border-top-color: #242424;
}

.player-track {
  gap: 11px;
}

.cover-art-player {
  width: 52px;
  border-radius: 5px;
}

.player-icon[data-view-shortcut] {
  display: none;
}

.player-controls {
  gap: 12px;
}

.player-context {
  padding-right: 4px;
  font-size: 12px;
}

.profile-hero {
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  padding: 22px;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(30, 215, 96, 0.14), rgba(255, 255, 255, 0.035) 58%),
    #181818;
}

.profile-hero h2 {
  margin: 3px 0 6px;
  font-size: 30px;
}

.profile-score {
  min-height: 126px;
  padding: 18px;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.profile-score strong {
  font-size: 38px;
  line-height: 0.98;
}

.profile-stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.profile-stat {
  min-height: 76px;
  padding: 13px 14px;
  border: 0;
  background: rgba(255, 255, 255, 0.055);
}

.profile-stat span {
  font-size: 12px;
}

.profile-stat strong {
  font-size: 25px;
}

.profile-layout {
  gap: 14px;
}

.profile-main,
.profile-sidebar {
  gap: 14px;
  padding-bottom: 118px;
}

.profile-panel {
  gap: 12px;
  padding: 16px;
  border: 0;
  background: rgba(24, 24, 24, 0.92);
}

.consistency-bars {
  gap: 8px;
}

.bar-track {
  height: 92px;
  background: #242424;
}

.profile-song-item,
.insight-item {
  min-height: 52px;
  padding: 8px;
  border-radius: 7px;
  background: #181818;
}

.profile-song-item {
  grid-template-columns: 42px minmax(0, 1fr) minmax(116px, auto);
  gap: 10px;
}

.profile-song-item span {
  min-width: 0;
}

.profile-song-item strong,
.profile-song-item small,
.profile-song-item em {
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-song-item strong,
.profile-song-item small {
  white-space: nowrap;
}

.profile-song-item em {
  max-width: 190px;
  justify-self: end;
  white-space: nowrap;
}

.music-library-panel {
  gap: 12px;
  padding: 18px;
}

.music-library-header {
  align-items: center;
}

.music-library-header h2 {
  font-size: 25px;
}

.music-summary {
  align-self: center;
  min-height: 32px;
  padding: 6px 11px;
  font-size: 12px;
}

.music-table-tools {
  grid-template-columns: minmax(220px, 1fr) minmax(138px, 170px) minmax(160px, 200px) minmax(124px, 150px) auto auto;
  gap: 8px;
}

.bulk-edit-bar {
  grid-template-columns: auto minmax(140px, 170px) minmax(160px, 205px) minmax(170px, 1fr) auto auto;
  gap: 8px;
  padding: 10px;
  border: 0;
  background: #181818;
}

.music-table-wrap {
  position: relative;
  max-height: calc(100vh - 470px);
  min-height: 360px;
  border-color: #242424;
  background: #121212;
}

.music-table-wrap::after {
  content: "";
  position: sticky;
  right: 0;
  display: block;
  float: right;
  width: 10px;
  height: 100%;
  margin-top: -100%;
  background: #121212;
  pointer-events: none;
}

.music-table {
  min-width: 1480px;
  font-size: 13px;
}

.music-table th,
.music-table td {
  padding: 8px 10px;
}

.music-table th:nth-child(1),
.music-table td:nth-child(1) {
  width: 38px;
  min-width: 38px;
}

.music-table th:nth-child(2),
.music-table td:nth-child(2) {
  min-width: 280px;
}

.music-table th:nth-child(3),
.music-table td:nth-child(3) {
  min-width: 190px;
}

.music-table th:nth-child(4),
.music-table td:nth-child(4) {
  min-width: 190px;
}

.music-table th:nth-child(5),
.music-table td:nth-child(5) {
  min-width: 240px;
}

.music-table th:nth-child(6),
.music-table td:nth-child(6) {
  min-width: 210px;
}

.table-inline-input,
.table-inline-select {
  min-height: 30px;
  padding: 4px 6px;
  border-radius: 6px;
}

.badge,
.count-pill {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 12px;
}

.upload-panel {
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
}

.upload-actions {
  justify-content: flex-end;
  gap: 8px;
}

.upload-actions .file-button,
.upload-actions button {
  min-height: 36px;
  padding: 7px 12px;
}

.spotify-layout {
  gap: 14px;
}

.spotify-setup,
.playlist-panel {
  gap: 14px;
  padding: 18px;
}

.spotify-grid.compact {
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 10px;
}

.spotify-grid.compact label {
  min-width: 0;
}

#connectSpotify,
#createPlaylists {
  background: var(--accent);
  color: #07120b;
}

#saveClientId,
#refreshSpotifyStatus,
#createRecentPracticePlaylistSpotify,
#createAllPlaylist,
#createFamiliarityPlaylists,
#organizeFiles,
#exportButton {
  border: 1px solid #333333;
  color: var(--ink);
  background: #242424;
}

#saveClientId:hover,
#refreshSpotifyStatus:hover,
#createRecentPracticePlaylistSpotify:hover,
#createAllPlaylist:hover,
#createFamiliarityPlaylists:hover,
#organizeFiles:hover,
#exportButton:hover {
  background: #333333;
  box-shadow: none;
}

.spotify-grid.compact .text-link {
  min-height: 36px;
  padding: 8px 0;
  color: #d7d7d7;
  font-size: 13px;
}

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

.playlist-card {
  gap: 8px;
  min-height: 220px;
  padding: 12px;
  border: 0;
  border-radius: 7px;
}

.playlist-card h3 {
  font-size: 15px;
  line-height: 1.15;
}

.playlist-card p,
.playlist-card .badge {
  font-size: 12px;
}

.progress-bar {
  height: 5px;
}

.playlist-actions {
  gap: 8px;
  padding-bottom: 8px;
}

.match-section {
  padding: 0 0 18px;
}

.match-section .section-heading {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 0 2px;
}

.match-card,
.candidate,
.match-pairing,
.match-pairing.matched {
  border: 0;
  background: #181818;
}

.match-list {
  padding-bottom: 18px;
}

.match-card {
  padding-bottom: 18px;
}

.modal-backdrop {
  z-index: 100;
  padding: 28px;
  background: rgba(0, 0, 0, 0.78);
}

.song-modal {
  width: min(900px, calc(100vw - 32px));
  max-height: min(800px, calc(100vh - 56px));
  border: 0;
  background: #181818;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.modal-header {
  padding: 16px 18px;
  background: rgba(24, 24, 24, 0.96);
}

.modal-actions {
  gap: 8px;
}

.detail-grid {
  gap: 10px;
}

.detail-stat,
.style-helper,
.song-detail,
.original-box {
  border: 0;
  background: #202020;
}

html.component-capture-hide-fixed .player-bar {
  display: none !important;
}

@media (max-width: 820px) {
  html.component-capture-hide-fixed .left-rail {
    display: none !important;
  }
}

@media (max-width: 1100px) {
  .top-search-pill {
    width: min(40vw, 300px);
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .spotify-grid.compact {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 820px) {
  body {
    padding: 0 0 calc(154px + env(safe-area-inset-bottom));
  }

  .app-shell {
    min-height: auto;
  }

  .left-rail {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    display: block;
    height: calc(64px + env(safe-area-inset-bottom));
    min-height: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid #242424;
    border-radius: 0;
    background: #000000;
  }

  .brand,
  .rail-library {
    display: none;
  }

  .steps {
    display: grid;
    height: 52px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
  }

  .step {
    display: grid;
    justify-items: center;
    gap: 3px;
    min-height: 52px;
    padding: 5px 4px;
    border-radius: 6px;
  }

  .step.active {
    color: #ffffff;
    background: transparent;
  }

  .step strong {
    display: block;
    font-size: 11px;
    line-height: 1;
  }

  .nav-icon {
    width: 19px;
    height: 19px;
  }

  .main-shell {
    border-radius: 0;
  }

  .main-shell main,
  main {
    padding: 0 14px 174px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 132px;
    padding: 16px 14px 14px;
  }

  .topbar h2 {
    font-size: 28px;
  }

  #flowSummary {
    max-width: 290px;
    font-size: 13px;
  }

  .top-actions {
    display: contents;
  }

  .top-search-pill {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-height: 38px;
    padding: 0 14px;
    font-size: 13px;
  }

  .topbar .status-pill {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
  }

  .studio-dashboard,
  .practice-dashboard {
    gap: 22px;
    margin-bottom: 20px;
  }

  .dashboard-card h2 {
    font-size: 21px;
  }

  .mini-list {
    grid-auto-columns: clamp(140px, 42vw, 166px);
    gap: 12px;
    padding-right: 24px;
    scroll-padding-inline: 0 24px;
  }

  .mini-item {
    min-height: 206px;
    padding: 10px;
  }

  .mini-copy strong {
    min-height: 32px;
    font-size: 13px;
  }

  .mini-copy small,
  .mini-copy em {
    font-size: 11px;
  }

  .mini-add-button,
  .mini-play-button {
    top: calc(clamp(140px, 42vw, 166px) - 44px);
    right: 14px;
    width: 38px;
    height: 38px;
    min-height: 38px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 20px;
  }

  .session-workspace,
  .profile-hero,
  .profile-layout,
  .upload-panel,
  .spotify-grid.compact,
  .music-table-tools,
  .bulk-edit-bar {
    grid-template-columns: 1fr;
  }

  .session-workspace {
    gap: 14px;
  }

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

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

  .song-card {
    min-height: 118px;
  }

  .song-card-main {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .cover-art-card {
    width: 72px;
  }

  .card-add-indicator,
  .card-play-indicator {
    top: 56px;
    right: 16px;
  }

  .music-library-panel,
  .spotify-setup,
  .playlist-panel,
  .profile-panel,
  .upload-panel {
    padding: 14px;
  }

  .music-library-header {
    align-items: flex-start;
  }

  .music-summary {
    align-self: flex-start;
  }

  .music-table-wrap {
    max-height: calc(100vh - 650px);
    min-height: 150px;
    overflow: hidden auto;
  }

  .music-table-wrap::after {
    display: none;
  }

  .music-table-wrap::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    width: 18px;
    border-radius: 0 8px 8px 0;
    background: linear-gradient(90deg, rgba(18, 18, 18, 0), #121212 70%);
    pointer-events: none;
  }

  .bulk-edit-bar {
    display: block;
    min-height: 38px;
    padding: 8px 10px;
  }

  .bulk-edit-bar select,
  .bulk-edit-bar input,
  .bulk-edit-bar button {
    display: none;
  }

  .bulk-edit-bar strong {
    justify-self: start;
  }

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

  .profile-score {
    min-height: auto;
  }

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

  .player-bar {
    bottom: calc(64px + env(safe-area-inset-bottom));
    z-index: 70;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 82px;
    padding: 9px 12px 10px;
  }

  .player-track {
    gap: 10px;
  }

  .player-track .cover-art,
  .cover-art-player {
    width: 48px;
  }

  .player-track strong {
    max-width: min(46vw, 210px);
  }

  .player-track span {
    max-width: min(46vw, 210px);
    font-size: 12px;
  }

  .player-center {
    justify-items: end;
  }

  .player-controls {
    gap: 8px;
  }

  .player-clear {
    display: grid;
    width: 32px;
    height: 32px;
    min-height: 32px;
  }

  .player-play {
    width: 38px;
    height: 38px;
    min-height: 38px;
  }

  .player-progress,
  .player-context,
  .player-icon[data-view-shortcut] {
    display: none;
  }

  .modal-backdrop {
    padding: 14px;
  }

  .song-modal {
    width: 100%;
    max-height: calc(100vh - 28px);
  }
}

/* Practice tab workflow */
.nav-practice {
  border-radius: 999px;
}

.nav-practice::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 5px;
  border-left: 7px solid currentColor;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.nav-practice::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 5px;
  bottom: 5px;
  width: 2px;
  border-radius: 999px;
  background: currentColor;
}

.practice-session-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.16fr) minmax(320px, 0.84fr);
  gap: 14px;
  align-items: start;
}

.practice-session-box {
  position: sticky;
  top: 88px;
  min-height: min(760px, calc(100vh - 132px));
  background: rgba(24, 24, 24, 0.96);
}

.practice-session-title h2 {
  font-size: 26px;
  line-height: 1.05;
}

.practice-timer-panel {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #242424;
  background:
    linear-gradient(135deg, rgba(30, 215, 96, 0.1), rgba(37, 206, 209, 0.05)),
    #161616;
}

.practice-clock {
  display: grid;
  gap: 3px;
}

.practice-clock span,
.playthrough-count small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.practice-clock strong {
  color: #ffffff;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.practice-timer-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.practice-timer-actions button[aria-disabled="true"] {
  border: 1px solid #333333;
  color: #737373;
  background: #242424;
  box-shadow: none;
  opacity: 1;
}

.practice-timer-running .practice-clock strong {
  color: var(--accent);
}

.practice-picker {
  min-height: min(700px, calc(100vh - 132px));
}

.practice-picker .song-card-grid {
  max-height: calc(100vh - 330px);
  overflow: auto;
}

.practice-picker .card-add-indicator {
  top: 72px;
  right: 18px;
  z-index: 4;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.practice-picker .song-card {
  grid-template-rows: auto minmax(18px, auto) minmax(34px, auto);
  min-height: 174px;
  overflow: hidden;
}

.practice-picker .song-card-status {
  grid-row: 2;
  max-width: calc(100% - 58px);
  padding-right: 52px;
}

.practice-picker .song-card-actions {
  position: static;
  grid-row: 3;
  min-height: 34px;
  margin-top: 2px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
}

.practice-picker .song-card:hover .song-card-actions,
.practice-picker .song-card:focus-within .song-card-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.practice-picker .song-card-actions .text-link,
.practice-picker .song-card-actions button {
  position: relative;
  z-index: 3;
}

.practice-session-box .session-list {
  min-height: 340px;
  max-height: none;
  overflow: visible;
  padding: 14px 18px;
}

.practice-session-box .session-empty.now-playing-empty {
  min-height: 360px;
}

.practice-session-box .session-actions {
  padding: 0 18px 18px;
}

.session-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
}

.session-card-title {
  grid-column: 1;
}

.playthrough-stepper {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  grid-template-columns: 38px minmax(96px, 124px) 38px;
  gap: 8px;
  align-items: center;
  justify-self: end;
}

.stepper-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
  font-size: 23px;
  line-height: 1;
}

.playthrough-count {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 96px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #242424;
  font-variant-numeric: tabular-nums;
}

.playthrough-count strong {
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
}

.session-card-actions {
  grid-column: 1;
}

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

  .practice-session-box {
    position: static;
    min-height: 0;
  }

  .practice-picker .song-card-grid {
    max-height: none;
  }
}

@media (max-width: 820px) {
  .steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .practice-session-layout {
    gap: 14px;
  }

  .practice-timer-panel {
    grid-template-columns: 1fr;
  }

  .practice-timer-actions {
    justify-content: stretch;
  }

  .practice-timer-actions button {
    flex: 1 1 130px;
  }

  .practice-session-box .session-list {
    min-height: 240px;
    padding: 12px;
  }

  .practice-session-box .session-empty.now-playing-empty {
    min-height: 270px;
  }

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

  .playthrough-stepper {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    justify-self: stretch;
  }

  .stepper-button {
    width: 42px;
    height: 42px;
    min-height: 42px;
  }

  .session-card-actions {
    grid-column: 1;
  }
}

/* Practice refinement: resizable panes, softer sand palette, larger play cards */
:root {
  --sand-bg: #e8ddc9;
  --sand-panel: #f5ecd9;
  --sand-card: #fbf5e8;
  --sand-line: #d8cab1;
  --tea-green: #1f6f63;
  --tea-green-soft: #d7ebe2;
  --turquoise: #46b8a8;
  --turquoise-strong: #2f9d8e;
  --earth-ink: #18352f;
  --earth-muted: #6f746a;
}

body {
  color: var(--earth-ink);
  background:
    linear-gradient(180deg, rgba(31, 111, 99, 0.22) 0, rgba(232, 221, 201, 0.9) 280px, var(--sand-bg) 100%),
    var(--sand-bg);
}

.main-shell {
  background:
    linear-gradient(180deg, rgba(31, 111, 99, 0.2) 0, rgba(245, 236, 217, 0.94) 250px, var(--sand-panel) 520px),
    var(--sand-panel);
}

.topbar {
  color: var(--earth-ink);
  background: rgba(245, 236, 217, 0.88);
  border-bottom: 1px solid rgba(31, 111, 99, 0.12);
}

.topbar h2,
.page-kicker,
.practice-session-title h2,
.practice-picker .section-title h2,
.session-card h3,
.song-card-main h3,
.profile-song-item strong,
.mini-item strong {
  color: var(--earth-ink);
}

p,
.meta,
.practice-session-title p,
.practice-picker .section-title p,
.song-card-main p,
.song-card-status,
.session-card-title p,
.search-helper,
.badge {
  color: var(--earth-muted);
}

.left-rail {
  background: #153a34;
}

.left-rail h1,
.left-rail strong {
  color: #fff8ea;
}

.left-rail p,
.left-rail small,
.left-rail .rail-heading {
  color: rgba(255, 248, 234, 0.72);
}

.brand,
.rail-library {
  background: rgba(13, 42, 38, 0.66);
}

.step:hover,
.rail-pill:hover,
.rail-song:hover {
  background: rgba(255, 255, 255, 0.08);
}

.step.active {
  background: rgba(70, 184, 168, 0.22);
}

.brand-mark,
button,
.file-button,
.card-add-indicator,
.mini-add-button,
.stepper-button {
  color: #0f2f2a;
  background: var(--turquoise);
}

button:hover,
.file-button:hover,
.card-add-indicator:hover,
.mini-add-button:hover,
.stepper-button:hover {
  background: var(--turquoise-strong);
  box-shadow: 0 10px 26px rgba(47, 157, 142, 0.2);
}

button.secondary,
.file-button.secondary,
button.ghost,
button.quick-filter,
button.choice,
button.familiarity-chip {
  color: var(--earth-ink);
  background: #eadfc9;
  border-color: var(--sand-line);
}

button.secondary:hover,
.file-button.secondary:hover,
button.ghost:hover,
button.quick-filter:hover,
button.quick-filter.active,
button.choice:hover,
button.choice.active,
button.familiarity-chip:hover,
button.familiarity-chip.active {
  color: #0f2f2a;
  background: var(--tea-green-soft);
  border-color: rgba(31, 111, 99, 0.28);
}

.practice-session-layout {
  display: grid;
  grid-template-columns: minmax(430px, var(--practice-left, 58%)) 16px minmax(360px, 1fr);
  gap: 0;
  align-items: start;
}

.practice-session-box,
.practice-picker {
  border: 1px solid rgba(31, 111, 99, 0.14);
  background: rgba(251, 245, 232, 0.92);
  box-shadow: 0 18px 48px rgba(77, 63, 40, 0.1);
}

.practice-session-box {
  border-radius: 8px 0 0 8px;
}

.practice-picker {
  border-radius: 0 8px 8px 0;
}

.practice-splitter {
  position: sticky;
  top: 88px;
  z-index: 6;
  display: grid;
  place-items: center;
  height: min(760px, calc(100vh - 132px));
  min-height: 280px;
  cursor: col-resize;
  background: linear-gradient(180deg, rgba(31, 111, 99, 0.2), rgba(70, 184, 168, 0.14));
  border-block: 1px solid rgba(31, 111, 99, 0.14);
}

.practice-splitter span {
  width: 4px;
  height: 54px;
  border-radius: 999px;
  background: rgba(31, 111, 99, 0.42);
  box-shadow: 0 0 0 5px rgba(31, 111, 99, 0.08);
}

.practice-splitter:hover span,
.practice-splitter:focus-visible span,
.practice-resizing .practice-splitter span {
  background: var(--turquoise-strong);
  box-shadow: 0 0 0 7px rgba(70, 184, 168, 0.18);
}

.practice-resizing,
.practice-resizing * {
  cursor: col-resize !important;
  user-select: none;
}

.section-title,
.practice-timer-panel,
.modal-header,
.panel-header {
  border-color: rgba(31, 111, 99, 0.14);
}

.practice-timer-panel {
  background:
    linear-gradient(135deg, rgba(70, 184, 168, 0.22), rgba(245, 236, 217, 0.76)),
    #e9f0df;
}

.practice-clock strong {
  color: var(--tea-green);
}

.practice-timer-running .practice-clock strong {
  color: var(--turquoise-strong);
}

.practice-timer-actions button[aria-disabled="true"] {
  color: #9d9a8f;
  background: #ded3bd;
  border-color: #d0c2aa;
}

.practice-session-box .session-list {
  min-height: 390px;
  padding: 18px 20px;
  align-content: start;
  align-items: start;
}

.practice-session-box .session-empty.now-playing-empty {
  min-height: 390px;
  background:
    linear-gradient(180deg, rgba(70, 184, 168, 0.08), rgba(251, 245, 232, 0.82)),
    var(--sand-card);
}

.practice-session-box .session-empty strong {
  color: var(--earth-ink);
}

.practice-session-box .session-empty span {
  color: var(--earth-muted);
}

.session-card {
  min-height: 132px;
  padding: 16px;
  border: 1px solid rgba(31, 111, 99, 0.14);
  background: var(--sand-card);
  align-self: start;
}

.session-card-title {
  gap: 14px;
}

.session-card-title h3 {
  font-size: 18px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.session-card-title p {
  font-size: 15px;
}

.session-card .cover-art-sm {
  width: 64px;
  border-radius: 8px;
}

.playthrough-stepper {
  grid-template-columns: 44px minmax(116px, 144px) 44px;
  gap: 10px;
}

.stepper-button {
  width: 44px;
  height: 44px;
  min-height: 44px;
}

.playthrough-count {
  min-width: 116px;
  padding: 10px 12px;
  background: #eadfc9;
}

.playthrough-count strong {
  color: var(--earth-ink);
  font-size: 25px;
}

.session-card-actions button,
.session-card-actions .text-link {
  min-height: 36px;
  font-size: 14px;
}

.session-card-actions {
  grid-column: 1 / -1;
}

.practice-picker .section-title {
  background: rgba(245, 236, 217, 0.62);
}

.song-search-form {
  grid-template-columns: minmax(250px, 1fr) auto auto;
}

#songSearchInput,
.top-search-pill {
  color: var(--earth-ink);
  background: rgba(255, 250, 239, 0.9);
  border-color: rgba(31, 111, 99, 0.2);
}

#songSearchInput::placeholder {
  color: #8d8d82;
}

.search-helper {
  padding: 0 18px 10px;
  font-size: 13px;
  line-height: 1.3;
}

.practice-picker .song-card {
  min-height: 190px;
  border: 1px solid transparent;
  background: rgba(251, 245, 232, 0.82);
}

.practice-picker .song-card:hover,
.practice-picker .song-card:focus-within {
  border-color: rgba(31, 111, 99, 0.2);
  background: #fff8ea;
}

.practice-picker .song-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 16px;
}

.practice-picker .song-card-actions .text-link,
.text-link,
.spotify-cell a {
  color: var(--tea-green);
}

.badge,
.status-pill,
.count-pill,
.music-summary {
  color: var(--earth-muted);
  background: #eadfc9;
  border-color: var(--sand-line);
}

.player-bar {
  background: #153a34;
  border-top-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 1100px) {
  .practice-session-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .practice-splitter {
    display: none;
  }

  .practice-session-box,
  .practice-picker {
    border-radius: 8px;
  }
}

@media (max-width: 820px) {
  .practice-session-box .session-list {
    min-height: 280px;
    padding: 14px;
  }

  .session-card {
    min-height: 0;
  }

  .playthrough-stepper {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }
}

/* Practice Studio workbench */
#practiceView.view:not(.active) {
  display: none;
}

#practiceView.view.active {
  display: block;
}

#practiceView .practice-studio-workspace {
  display: grid;
  gap: 10px;
  padding-bottom: 126px;
}

#practiceView .practice-planner-workbench {
  overflow: hidden;
  color: #fff8ea;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #153a34 0%, #1d665d 58%, #12322e 100%);
  box-shadow: none;
}

#practiceView .practice-planner-summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 9px 14px;
  cursor: pointer;
  list-style: none;
}

#practiceView .practice-planner-summary::-webkit-details-marker {
  display: none;
}

#practiceView .practice-planner-copy {
  display: flex;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

#practiceView .practice-planner-copy .eyebrow,
#practiceView .practice-planner-copy strong,
#practiceView .practice-planner-copy small {
  color: #fff8ea;
}

#practiceView .practice-planner-copy .eyebrow {
  font-size: 11px;
}

#practiceView .practice-planner-copy strong {
  font-size: 16px;
  line-height: 1;
}

#practiceView .practice-planner-copy small {
  overflow: hidden;
  color: rgba(255, 248, 234, 0.72);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#practiceView .practice-planner-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 11px;
  color: #0f2f2a;
  border-radius: 999px;
  background: rgba(142, 228, 209, 0.92);
  font-size: 12px;
  font-weight: 900;
}

#practiceView .practice-planner-workbench[open] .closed-label,
#practiceView .practice-planner-workbench:not([open]) .open-label {
  display: none;
}

#practiceView .practice-planner-body {
  display: grid;
  grid-template-columns: minmax(220px, 0.44fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255, 248, 234, 0.16);
  background: rgba(9, 35, 31, 0.34);
}

#practiceView .practice-planner-body h2 {
  color: #fff8ea;
  font-size: 18px;
}

#practiceView .practice-planner-body p {
  max-width: 360px;
  color: rgba(255, 248, 234, 0.72);
}

#practiceView .practice-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

#practiceView .practice-preset-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 248, 234, 0.13);
  color: #fff8ea;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: none;
  text-align: left;
  white-space: normal;
}

#practiceView .practice-preset-card:hover {
  border-color: rgba(142, 228, 209, 0.32);
  background: rgba(142, 228, 209, 0.12);
  box-shadow: none;
}

#practiceView .practice-preset-card:disabled {
  color: rgba(255, 248, 234, 0.46);
  border-color: rgba(255, 248, 234, 0.08);
  background: rgba(0, 0, 0, 0.12);
  cursor: default;
}

#practiceView .practice-preset-card span {
  color: rgba(255, 248, 234, 0.8);
  font-size: 12px;
  font-weight: 900;
}

#practiceView .practice-preset-card strong {
  grid-row: span 2;
  align-self: center;
  color: #8ee4d1;
  font-size: 25px;
  line-height: 1;
}

#practiceView .practice-preset-card em {
  overflow: hidden;
  color: rgba(255, 248, 234, 0.62);
  font-size: 11px;
  font-style: normal;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#practiceView .practice-studio-pulse {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(31, 111, 99, 0.1);
  border-radius: 7px;
  background: rgba(255, 253, 247, 0.72);
}

#practiceView .practice-pulse-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--earth-ink);
  border: 0;
  border-right: 1px solid rgba(31, 111, 99, 0.1);
  border-radius: 0;
  background: rgba(255, 250, 239, 0.78);
  box-shadow: none;
  text-align: left;
  white-space: normal;
}

#practiceView .practice-pulse-card:last-child {
  border-right: 0;
}

#practiceView .practice-pulse-card:hover,
#practiceView .practice-pulse-card:focus-visible {
  background: rgba(226, 248, 234, 0.7);
  box-shadow: none;
  transform: none;
}

#practiceView .practice-pulse-card span {
  color: var(--earth-muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

#practiceView .practice-pulse-card strong {
  grid-row: span 2;
  align-self: center;
  color: var(--tea-green);
  font-size: 23px;
  line-height: 1;
}

#practiceView .practice-pulse-card em {
  overflow: hidden;
  color: var(--earth-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#practiceView .practice-session-layout {
  grid-template-columns: minmax(520px, var(--practice-left, 57%)) 14px minmax(360px, 1fr);
}

#practiceView .practice-side-column {
  display: grid;
  gap: 10px;
  min-width: 0;
}

#practiceView .practice-studio-session,
#practiceView .practice-studio-bench,
#practiceView .practice-picker {
  border-color: rgba(31, 111, 99, 0.14);
  background: rgba(251, 245, 232, 0.94);
}

#practiceView .practice-studio-bench {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 16px 44px rgba(77, 63, 40, 0.08);
}

#practiceView .practice-bench-heading {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

#practiceView .practice-bench-heading h2 {
  color: var(--earth-ink);
  font-size: 17px;
  line-height: 1.1;
}

#practiceView .practice-bench-heading .eyebrow {
  color: var(--earth-muted);
}

#practiceView .practice-bench-heading > span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  color: var(--tea-green);
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 999px;
  background: rgba(226, 248, 234, 0.64);
  font-size: 12px;
  font-weight: 900;
}

#practiceView .practice-now-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 8px;
  background: rgba(255, 250, 239, 0.88);
}

#practiceView .cover-art-bench {
  width: 54px;
  border-radius: 7px;
  box-shadow: 0 12px 24px rgba(13, 48, 42, 0.18);
}

#practiceView .practice-now-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--earth-ink);
  font-size: 16px;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#practiceView .practice-now-card p {
  overflow: hidden;
  color: var(--earth-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#practiceView .practice-now-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  font-size: 13px;
}

#practiceView .practice-now-actions button {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
}

#practiceView .practice-bench-counters,
#practiceView .practice-session-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#practiceView .practice-session-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 10px 16px;
  border-bottom: 1px solid rgba(31, 111, 99, 0.12);
  background: rgba(255, 250, 239, 0.52);
}

#practiceView .practice-bench-counters article,
#practiceView .practice-session-stat-grid article {
  display: grid;
  gap: 2px;
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid rgba(31, 111, 99, 0.11);
  border-radius: 7px;
  background: rgba(255, 250, 239, 0.78);
}

#practiceView .practice-bench-counters span,
#practiceView .practice-session-stat-grid span {
  color: var(--earth-muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

#practiceView .practice-bench-counters strong,
#practiceView .practice-session-stat-grid strong {
  overflow: hidden;
  color: var(--earth-ink);
  font-size: 20px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#practiceView .practice-bench-section {
  display: grid;
  gap: 8px;
}

#practiceView .practice-bench-subhead {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

#practiceView .practice-bench-subhead strong {
  color: var(--earth-ink);
  font-size: 13px;
}

#practiceView .practice-bench-subhead button {
  min-height: 28px;
  padding: 4px 9px;
  font-size: 12px;
}

#practiceView .practice-bench-list,
#practiceView .practice-log-list {
  display: grid;
  gap: 9px;
}

#practiceView .practice-bench-song {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 7px 10px;
  color: var(--earth-ink);
  border: 1px solid rgba(31, 111, 99, 0.11);
  border-radius: 8px;
  background: rgba(255, 250, 239, 0.82);
  box-shadow: none;
  text-align: left;
}

#practiceView .practice-bench-song:hover,
#practiceView .practice-bench-song:focus-visible {
  border-color: rgba(31, 111, 99, 0.22);
  background: rgba(226, 248, 234, 0.58);
  box-shadow: none;
  transform: none;
}

#practiceView .practice-bench-song strong,
#practiceView .practice-bench-song small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#practiceView .practice-bench-song strong {
  color: var(--earth-ink);
  font-size: 13px;
}

#practiceView .practice-bench-song small {
  color: var(--earth-muted);
  font-size: 12px;
  font-weight: 700;
}

#practiceView .practice-log-item {
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  border: 1px solid rgba(31, 111, 99, 0.1);
  border-radius: 7px;
  background: rgba(255, 250, 239, 0.72);
}

#practiceView .practice-log-item span,
#practiceView .practice-log-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#practiceView .practice-log-item span {
  color: var(--earth-ink);
  font-size: 13px;
  font-weight: 850;
}

#practiceView .practice-log-item strong {
  color: var(--earth-muted);
  font-size: 12px;
}

#practiceView .practice-bench-empty {
  padding: 13px;
  color: var(--earth-muted);
  border: 1px dashed rgba(31, 111, 99, 0.18);
  border-radius: 8px;
  background: rgba(255, 250, 239, 0.58);
  font-size: 13px;
  font-weight: 750;
}

#practiceView .practice-bench-empty.compact {
  padding: 9px;
  font-size: 12px;
}

#practiceView .practice-picker {
  border-radius: 0 8px 8px 0;
  box-shadow: 0 16px 44px rgba(77, 63, 40, 0.08);
}

#practiceView .practice-picker .section-title {
  gap: 12px;
  padding: 12px 16px;
}

#practiceView .practice-picker .section-title .eyebrow,
#practiceView .practice-picker .section-title p {
  display: none;
}

#practiceView .practice-picker .section-title h2 {
  font-size: 18px;
  line-height: 1.1;
}

#practiceView .practice-picker .section-title > p {
  display: block;
  color: var(--earth-muted);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

#practiceView .song-search-form {
  grid-template-columns: minmax(190px, 1fr) auto auto;
  gap: 7px;
  padding: 10px 16px 8px;
}

#practiceView #songSearchInput {
  min-height: 42px;
  padding: 7px 14px;
  border: 1px solid rgba(29, 102, 93, 0.28);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(142, 228, 209, 0.08);
  font-size: 15px;
  font-weight: 780;
}

#practiceView .song-search-form button {
  min-height: 42px;
  border-radius: 7px;
  font-size: 13px;
}

#practiceView .quick-filters {
  padding: 0 16px 10px;
}

#practiceView .search-helper {
  display: none;
}

#practiceView .practice-picker .song-card-grid {
  max-height: calc(100vh - 390px);
  padding: 0 12px 12px;
}

#practiceView .practice-picker .song-card {
  min-height: 166px;
}

@media (max-width: 1240px) {
  #practiceView .practice-planner-body,
  #practiceView .practice-session-layout {
    grid-template-columns: 1fr;
  }

  #practiceView .practice-splitter {
    display: none;
  }

  #practiceView .practice-studio-session,
  #practiceView .practice-studio-bench,
  #practiceView .practice-picker {
    border-radius: 8px;
  }

  #practiceView .practice-picker .song-card-grid {
    max-height: none;
  }
}

@media (max-width: 920px) {
  #practiceView .practice-preset-grid,
  #practiceView .practice-studio-pulse,
  #practiceView .practice-session-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #practiceView .practice-planner-copy {
    display: grid;
    gap: 2px;
  }
}

@media (max-width: 680px) {
  #practiceView .practice-preset-grid,
  #practiceView .practice-studio-pulse,
  #practiceView .practice-session-stat-grid,
  #practiceView .song-search-form {
    grid-template-columns: 1fr;
  }

  #practiceView .practice-now-actions {
    justify-content: flex-start;
  }
}

/* Practice Studio: wide room layout and drag-to-set interaction */
#practiceView .practice-studio-workspace {
  gap: 14px;
}

#practiceView .practice-session-layout {
  grid-template-columns: minmax(620px, var(--practice-left, 64%)) 14px minmax(300px, 1fr);
}

#practiceView .practice-side-column {
  display: block;
}

#practiceView .practice-studio-session {
  position: sticky;
  overflow: hidden;
  border-color: rgba(31, 111, 99, 0.18);
  background:
    linear-gradient(135deg, rgba(218, 239, 218, 0.96) 0%, rgba(251, 245, 232, 0.96) 48%, rgba(199, 229, 209, 0.94) 100%);
  box-shadow: 0 22px 56px rgba(75, 92, 66, 0.16);
}

#practiceView .practice-studio-session::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 62%, rgba(255, 250, 239, 0.42) 62% 63%, transparent 63%),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(31, 111, 99, 0.055) 22px 23px, transparent 23px 28px);
  opacity: 0.56;
}

#practiceView .practice-studio-session > * {
  position: relative;
  z-index: 1;
}

#practiceView .practice-studio-session.drag-over {
  border-color: rgba(70, 184, 168, 0.72);
  box-shadow: 0 26px 68px rgba(47, 157, 142, 0.24);
}

#practiceView .practice-session-title {
  background: rgba(255, 250, 239, 0.5);
}

#practiceView .practice-timer-panel {
  border-block: 1px solid rgba(31, 111, 99, 0.13);
  background:
    linear-gradient(135deg, rgba(190, 230, 202, 0.82), rgba(250, 244, 229, 0.88)),
    rgba(223, 238, 218, 0.92);
}

#practiceView .practice-clock strong {
  color: #1b7467;
}

#practiceView .practice-session-stat-grid {
  background: rgba(255, 250, 239, 0.58);
}

#practiceView .practice-session-box .session-list {
  min-height: 290px;
  padding-top: 12px;
  border-color: rgba(31, 111, 99, 0.16);
  background: rgba(255, 250, 239, 0.3);
}

#practiceView .studio-drop-hint {
  display: grid;
  max-height: 0;
  margin: 0 16px;
  overflow: hidden;
  opacity: 0;
  transition: max-height 180ms ease, opacity 160ms ease, margin 160ms ease;
}

#practiceView .studio-drop-hint span {
  display: block;
  padding: 10px 12px;
  color: var(--tea-green);
  border: 1px dashed rgba(31, 111, 99, 0.35);
  border-radius: 8px;
  background: rgba(255, 250, 239, 0.74);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

body.practice-card-dragging #practiceView .studio-drop-hint,
#practiceView .practice-studio-session.drag-over .studio-drop-hint {
  max-height: 58px;
  margin-top: 10px;
  margin-bottom: 2px;
  opacity: 1;
}

#practiceView .practice-studio-session.drag-over .studio-drop-hint span {
  color: #0f4f46;
  border-color: rgba(70, 184, 168, 0.82);
  background: rgba(226, 248, 234, 0.92);
}

#practiceView .practice-studio-bench {
  align-self: stretch;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 250, 239, 0.95), rgba(244, 235, 215, 0.92)),
    var(--sand-card);
}

#practiceView .practice-picker-wide {
  min-height: 0;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 239, 0.96), rgba(245, 236, 217, 0.94)),
    var(--sand-panel);
  box-shadow: 0 18px 46px rgba(77, 63, 40, 0.1);
}

#practiceView .practice-picker-wide .section-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(31, 111, 99, 0.1);
  background: rgba(255, 250, 239, 0.46);
}

#practiceView .practice-picker-wide .section-title > div {
  display: flex;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

#practiceView .practice-picker-wide .section-title .eyebrow,
#practiceView .practice-picker-wide .section-title div p {
  display: block;
}

#practiceView .practice-picker-wide .section-title .eyebrow {
  font-size: 11px;
  white-space: nowrap;
}

#practiceView .practice-picker-wide .section-title h2 {
  font-size: 20px;
  line-height: 1;
  white-space: nowrap;
}

#practiceView .practice-picker-wide .section-title div p {
  overflow: hidden;
  max-width: 420px;
  color: var(--earth-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#practiceView .practice-search-rail {
  display: grid;
  grid-template-columns: minmax(360px, 0.78fr) minmax(380px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 9px 16px;
}

#practiceView .practice-picker-wide .song-search-form {
  grid-template-columns: minmax(280px, 1fr) auto auto;
  gap: 8px;
  padding: 0;
}

#practiceView .practice-picker-wide #songSearchInput,
#practiceView .practice-picker-wide .song-search-form button {
  min-height: 36px;
}

#practiceView .practice-picker-wide .quick-filters {
  gap: 6px;
  align-content: start;
  padding: 0;
}

#practiceView .practice-picker-wide .quick-filter {
  min-height: 28px;
  padding: 4px 9px;
  font-size: 12px;
}

#practiceView .practice-results-layout {
  display: grid;
  grid-template-columns: minmax(220px, 268px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 0 16px 16px;
}

#practiceView .practice-results-layout > div {
  min-width: 0;
}

#practiceView .practice-picker-wide .search-helper {
  display: block;
  padding: 0 0 8px;
  color: var(--earth-muted);
  font-size: 11px;
  font-weight: 760;
}

#practiceView .practice-picker-wide .song-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-height: min(520px, calc(100vh - 360px));
  padding: 0;
}

#practiceView .practice-recent-panel {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(31, 111, 99, 0.13);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(226, 248, 234, 0.64), rgba(255, 250, 239, 0.78));
}

#practiceView .practice-recent-panel-head {
  display: block;
}

#practiceView .practice-recent-panel-head > div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

#practiceView .practice-recent-panel-head strong {
  overflow: hidden;
  color: var(--earth-ink);
  font-size: 14px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#practiceView .practice-recent-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

#practiceView .practice-recent-tabs button {
  min-height: 28px;
  padding: 4px 7px;
  color: var(--earth-muted);
  border-color: rgba(31, 111, 99, 0.14);
  background: rgba(255, 250, 239, 0.72);
  box-shadow: none;
  font-size: 11px;
}

#practiceView .practice-recent-tabs button.active,
#practiceView .practice-recent-tabs button:hover {
  color: var(--earth-ink);
  border-color: rgba(70, 184, 168, 0.42);
  background: rgba(142, 228, 209, 0.34);
  box-shadow: none;
}

#practiceView .practice-recent-song-list {
  display: grid;
  gap: 7px;
}

#practiceView .practice-recent-song {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 28px;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 7px 8px;
  color: var(--earth-ink);
  border: 1px solid rgba(31, 111, 99, 0.1);
  border-radius: 8px;
  background: rgba(255, 250, 239, 0.82);
  box-shadow: none;
  text-align: left;
}

#practiceView .practice-recent-song:hover,
#practiceView .practice-recent-song:focus-visible {
  border-color: rgba(31, 111, 99, 0.22);
  background: rgba(255, 250, 239, 0.96);
  box-shadow: none;
  transform: none;
}

#practiceView .practice-recent-song strong,
#practiceView .practice-recent-song small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#practiceView .practice-recent-song strong {
  color: var(--earth-ink);
  font-size: 12px;
}

#practiceView .practice-recent-song small {
  color: var(--earth-muted);
  font-size: 11px;
  font-weight: 760;
}

#practiceView .practice-recent-song i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #0f2f2a;
  border-radius: 999px;
  background: var(--turquoise);
  font-style: normal;
  font-size: 17px;
  font-weight: 900;
}

#practiceView .practice-recent-empty {
  display: grid;
  gap: 3px;
  padding: 9px;
  color: var(--earth-muted);
  border: 1px dashed rgba(31, 111, 99, 0.18);
  border-radius: 8px;
  background: rgba(255, 250, 239, 0.52);
  font-size: 12px;
}

#practiceView .practice-recent-empty strong {
  color: var(--earth-ink);
}

#practiceView .practice-picker-wide .song-card {
  position: relative;
  min-height: 154px;
  padding: 11px;
  border-color: rgba(31, 111, 99, 0.12);
  background: rgba(255, 250, 239, 0.86);
  cursor: grab;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

#practiceView .practice-picker-wide .song-card:active {
  cursor: grabbing;
}

#practiceView .practice-picker-wide .song-card.dragging {
  opacity: 0.62;
  border-color: rgba(70, 184, 168, 0.7);
  background: rgba(226, 248, 234, 0.86);
  box-shadow: 0 14px 34px rgba(47, 157, 142, 0.22);
  transform: scale(0.985);
}

body.practice-card-dragging #practiceView .practice-picker-wide .song-card:not(.dragging) {
  opacity: 0.72;
}

#practiceView .practice-picker-wide .song-card-main {
  padding-right: 48px;
}

#practiceView .practice-picker-wide .drag-handle {
  position: absolute;
  top: 56px;
  right: 12px;
  opacity: 1;
  pointer-events: none;
  align-self: start;
  padding: 4px 8px;
  color: var(--tea-green);
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 999px;
  background: rgba(226, 248, 234, 0.66);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

#practiceView .practice-picker-wide .card-add-indicator {
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  min-height: 38px;
  background: var(--turquoise);
  box-shadow: 0 10px 24px rgba(47, 157, 142, 0.24);
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

#practiceView .practice-picker-wide .song-card-status {
  max-width: none;
  padding-right: 0;
}

#practiceView .practice-picker-wide .song-card-actions {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

@media (max-width: 1240px) {
  #practiceView .practice-session-layout,
  #practiceView .practice-search-rail,
  #practiceView .practice-results-layout {
    grid-template-columns: 1fr;
  }

  #practiceView .practice-studio-session,
  #practiceView .practice-studio-bench {
    border-radius: 8px;
  }
}

@media (max-width: 920px) {
  #practiceView .practice-picker-wide .song-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    max-height: none;
  }
}

@media (max-width: 680px) {
  #practiceView .practice-picker-wide .section-title,
  #practiceView .practice-picker-wide .song-search-form {
    grid-template-columns: 1fr;
  }

  #practiceView .practice-picker-wide .section-title > div {
    display: grid;
    gap: 2px;
  }
}

/* Practice Studio: right-side song shelf and lower bench */
#practiceView .practice-session-layout {
  grid-template-columns: minmax(600px, var(--practice-left, 58%)) 14px minmax(360px, 1fr);
}

#practiceView .practice-side-column {
  min-width: 0;
}

#practiceView .practice-picker-side {
  position: sticky;
  top: 88px;
  align-self: start;
  min-height: min(760px, calc(100vh - 132px));
  border-radius: 0 8px 8px 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 250, 239, 0.98), rgba(245, 236, 217, 0.95)),
    var(--sand-panel);
  box-shadow: 0 18px 48px rgba(77, 63, 40, 0.1);
}

#practiceView .practice-picker-side .section-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(31, 111, 99, 0.1);
  background:
    linear-gradient(135deg, rgba(226, 248, 234, 0.62), rgba(255, 250, 239, 0.72)),
    rgba(255, 250, 239, 0.7);
}

#practiceView .practice-picker-side .section-title > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#practiceView .practice-picker-side .section-title .eyebrow {
  display: block;
  color: var(--earth-muted);
  font-size: 10px;
}

#practiceView .practice-picker-side .section-title h2 {
  color: var(--earth-ink);
  font-size: 20px;
}

#practiceView .practice-picker-side .section-title div p {
  display: block;
  overflow: hidden;
  color: var(--earth-muted);
  font-size: 11px;
  font-weight: 740;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#practiceView .practice-picker-side .section-title > p {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 999px;
  background: rgba(255, 250, 239, 0.74);
  color: var(--earth-muted);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

#practiceView .practice-picker-side .practice-search-rail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px 14px 8px;
}

#practiceView .practice-picker-side .song-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 7px;
  padding: 0;
}

#practiceView .practice-picker-side #songSearchInput,
#practiceView .practice-picker-side .song-search-form button {
  min-height: 36px;
}

#practiceView .practice-picker-side #songSearchInput {
  min-width: 0;
  padding-inline: 12px;
  font-size: 13px;
}

#practiceView .practice-picker-side .song-search-form button {
  padding-inline: 12px;
  font-size: 12px;
}

#practiceView .practice-picker-side .quick-filters {
  display: flex;
  gap: 6px;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

#practiceView .practice-picker-side .quick-filters::-webkit-scrollbar {
  display: none;
}

#practiceView .practice-picker-side .quick-filter {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 9px;
  font-size: 11px;
  white-space: nowrap;
}

#practiceView .practice-picker-side .search-helper {
  display: block;
  padding: 0 14px 8px;
  color: var(--earth-muted);
  font-size: 11px;
  font-weight: 760;
}

#practiceView .practice-picker-side .song-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(218px, 1fr));
  gap: 10px;
  max-height: calc(100vh - 338px);
  padding: 0 12px 12px;
  overflow: auto;
}

#practiceView .practice-picker-side .song-card {
  position: relative;
  min-height: 148px;
  padding: 10px;
  border-color: rgba(31, 111, 99, 0.12);
  background: rgba(255, 250, 239, 0.88);
  cursor: grab;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

#practiceView .practice-picker-side .song-card:active {
  cursor: grabbing;
}

#practiceView .practice-picker-side .song-card.dragging {
  opacity: 0.62;
  border-color: rgba(70, 184, 168, 0.7);
  background: rgba(226, 248, 234, 0.86);
  box-shadow: 0 14px 34px rgba(47, 157, 142, 0.22);
  transform: scale(0.985);
}

body.practice-card-dragging #practiceView .practice-picker-side .song-card:not(.dragging) {
  opacity: 0.72;
}

#practiceView .practice-picker-side .song-card-main {
  gap: 14px;
  padding-right: 44px;
}

#practiceView .practice-picker-side .cover-art-card {
  width: 72px;
}

#practiceView .practice-picker-side .card-add-indicator {
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  min-height: 36px;
  background: var(--turquoise);
  box-shadow: 0 10px 22px rgba(47, 157, 142, 0.22);
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

#practiceView .practice-picker-side .drag-handle {
  position: absolute;
  right: 10px;
  bottom: 44px;
  padding: 3px 7px;
  color: var(--tea-green);
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 999px;
  background: rgba(226, 248, 234, 0.66);
  font-size: 10px;
  font-weight: 900;
  pointer-events: none;
  white-space: nowrap;
}

#practiceView .practice-picker-side .song-card-status {
  max-width: none;
  padding-right: 0;
  font-size: 12px;
}

#practiceView .practice-picker-side .song-card-actions {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

#practiceView .practice-studio-bench-lower {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(150px, 0.45fr) minmax(250px, 1fr) minmax(250px, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 0;
  padding: 14px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(226, 248, 234, 0.48), rgba(255, 250, 239, 0.92) 46%, rgba(244, 235, 215, 0.9)),
    var(--sand-card);
  box-shadow: 0 18px 46px rgba(77, 63, 40, 0.1);
}

#practiceView .practice-studio-bench-lower .practice-bench-heading {
  grid-column: 1 / -1;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(31, 111, 99, 0.09);
}

#practiceView .practice-studio-bench-lower .practice-bench-counters {
  grid-template-columns: 1fr;
}

#practiceView .practice-studio-bench-lower .practice-now-card,
#practiceView .practice-studio-bench-lower .practice-bench-counters,
#practiceView .practice-studio-bench-lower .practice-bench-section {
  min-width: 0;
}

@media (max-width: 1240px) {
  #practiceView .practice-session-layout,
  #practiceView .practice-picker-side .song-search-form {
    grid-template-columns: 1fr;
  }

  #practiceView .practice-picker-side {
    position: static;
    border-radius: 8px;
    min-height: 0;
  }

  #practiceView .practice-picker-side .song-card-grid {
    max-height: none;
  }

  #practiceView .practice-studio-bench-lower {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #practiceView .practice-studio-bench-lower,
  #practiceView .practice-picker-side .song-card-grid {
    grid-template-columns: 1fr;
  }

  #practiceView .practice-picker-side .section-title {
    grid-template-columns: 1fr;
  }
}

/* Profile refinement: favorite-forward repertoire coaching */
#profileView {
  padding-bottom: 120px;
}

#profileView .profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 24px;
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 8px;
  color: var(--earth-ink);
  background:
    linear-gradient(135deg, rgba(70, 184, 168, 0.2), rgba(255, 250, 239, 0.75) 42%, rgba(234, 223, 201, 0.9)),
    var(--sand-panel);
  box-shadow: 0 18px 48px rgba(77, 63, 40, 0.12);
}

#profileView .profile-hero-copy {
  display: grid;
  gap: 8px;
  align-content: center;
}

#profileView .profile-hero h2 {
  color: var(--earth-ink);
  font-size: 34px;
  line-height: 1.04;
}

#profileView .profile-hero p {
  max-width: 760px;
  color: var(--earth-muted);
}

#profileView .profile-score {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 142px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #f8f1e4;
  background:
    linear-gradient(135deg, rgba(70, 184, 168, 0.18), rgba(20, 56, 50, 0.94)),
    #153a34;
  box-shadow: 0 16px 34px rgba(21, 58, 52, 0.22);
}

#profileView .profile-score span,
#profileView .profile-score p {
  color: rgba(248, 241, 228, 0.78);
}

#profileView .profile-score strong {
  color: #77dfbd;
  font-size: 44px;
}

#profileView .profile-stat-grid {
  gap: 12px;
  margin-bottom: 16px;
}

#profileView .profile-stat,
#profileView .profile-panel {
  border: 1px solid rgba(31, 111, 99, 0.14);
  color: var(--earth-ink);
  background: rgba(251, 245, 232, 0.92);
  box-shadow: 0 16px 42px rgba(77, 63, 40, 0.08);
}

#profileView .profile-stat {
  min-height: 82px;
}

#profileView .profile-stat span,
#profileView .insight-item span,
#profileView .style-row span,
#profileView .profile-song-item small,
#profileView .profile-song-item em {
  color: var(--earth-muted);
}

#profileView .profile-stat strong,
#profileView .profile-panel h2,
#profileView .profile-song-item strong,
#profileView .insight-item strong,
#profileView .style-row strong {
  color: var(--earth-ink);
}

#profileView .profile-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 16px;
}

#profileView .profile-main,
#profileView .profile-sidebar,
#profileView .profile-panel,
#profileView .profile-song-list,
#profileView .insight-list,
#profileView .style-breakdown {
  gap: 14px;
}

#profileView .profile-feature {
  overflow: hidden;
  margin-bottom: 16px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 250, 239, 0.96), rgba(245, 236, 217, 0.92)),
    var(--sand-card);
}

#profileView .profile-section-title {
  display: grid;
  gap: 5px;
}

#profileView .profile-section-title .eyebrow,
#profileView .eyebrow {
  color: var(--tea-green);
}

#profileView .profile-section-title p,
#profileView .section-heading p {
  color: var(--earth-muted);
}

.profile-carousel {
  display: grid;
  grid-auto-columns: minmax(330px, 390px);
  grid-auto-flow: column;
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 2px 2px 8px;
  scroll-snap-type: x mandatory;
  scrollbar-color: rgba(31, 111, 99, 0.38) transparent;
}

.favorite-song-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 12px 14px;
  min-height: 204px;
  padding: 14px;
  border: 1px solid rgba(31, 111, 99, 0.16);
  border-radius: 8px;
  color: var(--earth-ink);
  background:
    linear-gradient(180deg, #fffaf0, rgba(235, 243, 227, 0.92)),
    var(--sand-card);
  box-shadow: 0 14px 34px rgba(77, 63, 40, 0.12);
  scroll-snap-align: start;
}

.favorite-cover-button {
  grid-row: 1 / span 2;
  width: 140px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: inherit;
  background: transparent;
  white-space: normal;
}

.favorite-cover-button:hover,
.favorite-cover-button:focus-visible {
  background: transparent;
  transform: translateY(-1px);
}

.cover-art-favorite {
  width: 140px;
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(21, 58, 52, 0.2);
}

.cover-art-favorite span {
  font-size: 30px;
}

.cover-art-favorite i {
  font-size: 12px;
}

.favorite-song-copy {
  display: grid;
  gap: 4px;
  align-content: start;
  min-width: 0;
}

.favorite-song-copy span {
  color: var(--tea-green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.favorite-song-copy h3 {
  display: -webkit-box;
  overflow: hidden;
  color: var(--earth-ink);
  font-size: 19px;
  line-height: 1.12;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.favorite-song-copy p,
.favorite-song-copy small {
  overflow: hidden;
  color: var(--earth-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-song-copy small {
  font-size: 13px;
}

.favorite-actions {
  display: grid;
  grid-template-columns: auto auto;
  gap: 8px;
  align-self: end;
  justify-content: start;
}

.favorite-actions button {
  min-height: 38px;
}

.profile-empty-feature {
  display: grid;
  gap: 6px;
  min-height: 190px;
  place-content: center;
  border: 1px dashed rgba(31, 111, 99, 0.28);
  border-radius: 8px;
  color: var(--earth-ink);
  text-align: center;
  background: rgba(255, 250, 239, 0.64);
}

#profileView .compact-heading {
  margin: -16px -16px 0;
  background: rgba(245, 236, 217, 0.7);
  border-color: rgba(31, 111, 99, 0.12);
  box-shadow: none;
}

#profileView .consistency-bars {
  min-height: 138px;
}

#profileView .bar-track {
  background: #eadfc9;
}

#profileView .bar-track span {
  background: linear-gradient(180deg, #5ed56f, var(--turquoise));
}

#profileView .consistency-day strong {
  color: var(--earth-ink);
}

#profileView .consistency-day small {
  color: var(--earth-muted);
}

#profileView .profile-song-item,
#profileView .insight-item {
  border: 1px solid rgba(31, 111, 99, 0.12);
  background: #fffaf0;
}

#profileView .profile-song-item {
  grid-template-columns: 52px minmax(0, 1fr) minmax(118px, auto);
  min-height: 70px;
  padding: 10px;
  border-radius: 8px;
  color: var(--earth-ink);
}

#profileView .profile-song-item:hover,
#profileView .profile-song-item:focus-visible {
  border-color: rgba(47, 157, 142, 0.42);
  background: #f3f4df;
  transform: translateY(-1px);
}

#profileView .profile-song-item .cover-art-xs {
  width: 52px;
  border-radius: 7px;
}

#profileView .profile-song-item span {
  min-width: 0;
}

#profileView .profile-song-item em {
  max-width: 180px;
  justify-self: end;
  text-align: right;
}

#profileView .insight-item {
  gap: 6px;
  padding: 13px;
}

#profileView .style-row {
  padding: 10px 0;
  border-bottom: 1px solid rgba(31, 111, 99, 0.1);
}

#profileView .style-row:last-child {
  border-bottom: 0;
}

#profileView .style-meter {
  background: #eadfc9;
}

#profileView .style-meter span {
  background: linear-gradient(90deg, var(--tea-green), var(--turquoise));
}

@media (max-width: 1100px) {
  #profileView .profile-hero,
  #profileView .profile-layout {
    grid-template-columns: 1fr;
  }

  #profileView .profile-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  #profileView .profile-hero {
    padding: 18px;
  }

  #profileView .profile-hero h2 {
    font-size: 29px;
  }

  #profileView .profile-stat-grid,
  #profileView .profile-grid,
  #profileView .profile-sidebar {
    grid-template-columns: 1fr;
  }

  .profile-carousel {
    grid-auto-columns: minmax(282px, 84vw);
  }

  .favorite-song-card {
    grid-template-columns: 108px minmax(0, 1fr);
    min-height: 176px;
  }

  .favorite-cover-button,
  .cover-art-favorite {
    width: 108px;
  }

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

  #profileView .profile-song-item {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  #profileView .profile-song-item em {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }
}

/* Detail modal and carousel comfort pass */
.profile-carousel {
  grid-auto-columns: minmax(380px, 420px);
  gap: 16px;
  padding: 4px 4px 12px;
}

.favorite-song-card {
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 14px 18px;
  min-height: 194px;
  padding: 18px;
}

.favorite-cover-button,
.cover-art-favorite {
  width: 126px;
}

.favorite-song-copy {
  gap: 6px;
  padding-top: 2px;
}

.favorite-song-copy h3 {
  font-size: 18px;
}

.favorite-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-self: end;
}

.favorite-actions button {
  min-height: 38px;
  padding-inline: 15px;
}

#songModal.modal-backdrop {
  z-index: 100;
  place-items: center;
  padding: 32px;
  background: rgba(19, 42, 37, 0.58);
  backdrop-filter: blur(6px);
}

#songModal .song-modal {
  width: min(980px, calc(100vw - 40px));
  max-height: min(820px, calc(100vh - 48px));
  overflow: hidden auto;
  color: var(--earth-ink);
  border: 1px solid rgba(31, 111, 99, 0.18);
  border-radius: 10px;
  background: var(--sand-panel);
  box-shadow: 0 30px 90px rgba(21, 58, 52, 0.32);
}

#songModal .modal-header {
  padding: 20px 24px;
  color: var(--earth-ink);
  background:
    linear-gradient(135deg, rgba(70, 184, 168, 0.14), rgba(255, 250, 239, 0.96)),
    var(--sand-card);
  border-bottom: 1px solid rgba(31, 111, 99, 0.13);
}

#songModal .modal-header h2 {
  color: var(--earth-ink);
  font-size: 24px;
  line-height: 1.1;
}

#songModal .modal-header p {
  margin-top: 5px;
  color: var(--earth-muted);
}

#closeSongModal {
  min-height: 40px;
  padding-inline: 17px;
  color: var(--earth-ink);
  background: #efe4cf;
  border-color: var(--sand-line);
}

#songModalBody {
  display: grid;
  gap: 18px;
  padding: 22px 24px 24px;
}

.modal-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

#songModalBody .modal-actions,
.modal-resource-actions,
.modal-save-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

#songModalBody .modal-actions button,
.modal-save-row button {
  min-height: 42px;
  padding-inline: 16px;
}

.modal-resource-actions .text-link {
  min-height: 34px;
  color: var(--tea-green);
  font-weight: 800;
}

#songModalBody .style-helper {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  color: var(--earth-ink);
  background: #fffaf0;
}

#songModalBody .style-chips span {
  min-height: 26px;
  color: var(--tea-green);
  background: var(--tea-green-soft);
}

.detail-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#songModalBody .detail-stat {
  min-height: 78px;
  padding: 14px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  color: var(--earth-ink);
  background: #fffaf0;
}

#songModalBody .detail-stat strong {
  color: var(--tea-green);
  font-size: 17px;
}

#songModalBody .detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  padding: 18px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 10px;
  background: rgba(255, 250, 239, 0.72);
}

#songModalBody label {
  gap: 8px;
  color: var(--earth-muted);
  font-size: 13px;
  font-weight: 700;
}

#songModalBody input,
#songModalBody select,
#songModalBody textarea {
  min-height: 44px;
  padding: 10px 12px;
  color: var(--earth-ink);
  border-color: rgba(31, 111, 99, 0.18);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.96);
}

#songModalBody input:focus,
#songModalBody select:focus,
#songModalBody textarea:focus {
  outline: 2px solid rgba(70, 184, 168, 0.36);
  outline-offset: 1px;
}

#songModalBody textarea {
  min-height: 96px;
}

.modal-save-row {
  justify-content: flex-start;
  padding-top: 2px;
}

@media (max-width: 1100px) {
  .profile-carousel {
    grid-auto-columns: minmax(340px, 78vw);
  }

  .modal-toolbar {
    grid-template-columns: 1fr;
  }

  .modal-resource-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .profile-carousel {
    grid-auto-columns: minmax(286px, 84vw);
  }

  .favorite-song-card {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .favorite-cover-button,
  .cover-art-favorite {
    width: 104px;
  }

  #songModal.modal-backdrop {
    padding: 12px;
  }

  #songModal .song-modal {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 8px;
  }

  #songModal .modal-header,
  #songModalBody {
    padding-inline: 16px;
  }

  .detail-summary-grid,
  #songModalBody .detail-grid {
    grid-template-columns: 1fr;
  }

  #songModalBody .style-helper {
    grid-template-columns: 1fr;
  }
}

/* Library database refresh */
#uploadView {
  padding-bottom: 126px;
}

#uploadView .library-database-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  gap: 16px;
  align-items: start;
}

#uploadView .library-database-layout > *,
#uploadView .library-utility-grid > * {
  min-width: 0;
}

#uploadView .music-library-panel,
#uploadView .sheet-preview-panel,
#uploadView .upload-panel,
#uploadView .quiet-panel {
  color: var(--earth-ink);
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 239, 0.96), rgba(245, 236, 217, 0.9)),
    var(--sand-card);
  box-shadow: 0 16px 44px rgba(77, 63, 40, 0.1);
}

#uploadView .music-library-panel {
  gap: 0;
  overflow: hidden;
  padding: 0;
  min-width: 0;
}

#uploadView .library-search-dock {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(31, 111, 99, 0.12);
  background:
    linear-gradient(135deg, rgba(70, 184, 168, 0.18), rgba(255, 250, 239, 0.86)),
    rgba(255, 250, 239, 0.9);
}

#uploadView .music-library-header {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px 14px;
  border-bottom: 1px solid rgba(31, 111, 99, 0.12);
  background: rgba(255, 250, 239, 0.7);
}

#uploadView .music-library-header h2,
#uploadView .sheet-preview-header h2,
#uploadView .upload-panel h2,
#uploadView .quiet-panel h2 {
  color: var(--earth-ink);
}

#uploadView .music-library-header h2 {
  font-size: 24px;
  line-height: 1.04;
}

#uploadView .music-library-header p,
#uploadView .sheet-preview-header p,
#uploadView .upload-panel p,
#uploadView .quiet-panel p {
  color: var(--earth-muted);
}

#uploadView .music-summary {
  flex: 0 0 auto;
  min-height: 34px;
  color: var(--tea-green);
  background: var(--tea-green-soft);
  border-color: rgba(31, 111, 99, 0.16);
}

#uploadView .music-table-tools {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(150px, 200px) minmax(130px, 170px);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 0;
}

#uploadView #musicTableSearch {
  grid-column: 1;
  grid-row: 1;
}

#uploadView #musicTableFamiliarity {
  grid-column: 1;
  grid-row: 2;
}

#uploadView #musicTableStatus {
  grid-column: 2;
  grid-row: 2;
}

#uploadView #musicTableSort {
  grid-column: 3;
  grid-row: 2;
}

#uploadView .music-table-tools button[type="submit"] {
  grid-column: 2;
  grid-row: 1;
}

#uploadView #clearMusicTableFilters {
  grid-column: 3;
  grid-row: 1;
}

#uploadView .music-table-tools input,
#uploadView .music-table-tools select,
#uploadView .bulk-edit-bar input,
#uploadView .bulk-edit-bar select {
  min-height: 40px;
  color: var(--earth-ink);
  border: 1px solid rgba(31, 111, 99, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.92);
}

#uploadView #musicTableSearch {
  min-height: 52px;
  padding-inline: 16px;
  font-size: 17px;
  font-weight: 700;
}

#uploadView .music-table-tools input:focus,
#uploadView .music-table-tools select:focus,
#uploadView .bulk-edit-bar input:focus,
#uploadView .bulk-edit-bar select:focus,
#uploadView .table-inline-input:focus,
#uploadView .table-inline-select:focus {
  outline: 2px solid rgba(70, 184, 168, 0.34);
  outline-offset: 1px;
}

#uploadView .music-table-tools button,
#uploadView .bulk-edit-bar button,
#uploadView .sheet-preview-actions button,
#uploadView .sheet-viewer-header-actions button,
#uploadView .sheet-viewer-toolbar button,
#uploadView .button-link,
#uploadView .upload-actions button,
#uploadView .upload-actions .file-button {
  min-height: 40px;
  border-radius: 8px;
}

#uploadView .library-search-shortcuts {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

#uploadView .library-filter-chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 999px;
  color: var(--earth-ink);
  background: rgba(255, 253, 247, 0.78);
  font-size: 13px;
}

#uploadView .library-filter-chip strong {
  color: var(--tea-green);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

#uploadView .library-filter-chip:hover,
#uploadView .library-filter-chip.active {
  color: #0f2f2a;
  border-color: rgba(31, 111, 99, 0.26);
  background: var(--tea-green-soft);
  box-shadow: none;
}

#uploadView .upload-result-summary {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.78);
}

#uploadView .upload-result-summary[hidden] {
  display: none;
}

#uploadView .upload-result-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

#uploadView .upload-result-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 2px 0;
}

#uploadView .upload-result-actions button {
  min-height: 32px;
  padding: 6px 11px;
  font-size: 12px;
}

#uploadView .upload-result-actions small {
  min-width: 0;
  overflow: hidden;
  color: var(--earth-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#uploadView .upload-result-count {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 8px;
  background: rgba(245, 236, 217, 0.62);
}

#uploadView .upload-result-count strong {
  color: var(--tea-green);
  font-size: 18px;
  line-height: 1;
}

#uploadView .upload-result-count.failed strong,
#uploadView .upload-result-file.failed span {
  color: #a33a2a;
}

#uploadView .upload-result-count.duplicate strong,
#uploadView .upload-result-file.duplicate span {
  color: #8d641a;
}

#uploadView .upload-result-count small,
#uploadView .upload-result-file small {
  color: var(--earth-muted);
  font-size: 12px;
}

#uploadView .upload-result-files {
  display: grid;
  gap: 6px;
}

#uploadView .upload-result-file {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 7px;
  background: rgba(255, 250, 239, 0.72);
}

#uploadView .upload-result-file strong,
#uploadView .upload-result-file small {
  overflow-wrap: anywhere;
}

#uploadView .upload-result-file span {
  color: var(--tea-green);
  font-size: 12px;
  font-weight: 850;
}

#uploadView .upload-result-file small {
  grid-column: 1 / -1;
}

#uploadView .library-review-panel {
  margin: 14px 0 0;
  color: var(--earth-ink);
}

#uploadView .library-review-panel[hidden] {
  display: none;
}

#uploadView .library-review-drawer {
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.72);
}

#uploadView .library-review-drawer summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

#uploadView .library-review-drawer summary::-webkit-details-marker {
  display: none;
}

#uploadView .library-review-drawer summary > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#uploadView .library-review-drawer strong {
  color: var(--tea-green);
  font-size: 14px;
}

#uploadView .library-review-drawer small,
#uploadView .library-review-groups small,
#uploadView .library-review-strip small {
  color: var(--earth-muted);
  font-size: 12px;
}

#uploadView .library-review-action {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 999px;
  color: var(--tea-green);
  background: var(--tea-green-soft);
  font-size: 12px;
  font-weight: 850;
}

#uploadView .library-review-strip,
#uploadView .library-review-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

#uploadView .library-review-strip button,
#uploadView .library-review-groups article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  color: var(--earth-ink);
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 8px;
  background: rgba(255, 250, 239, 0.74);
  text-align: left;
}

#uploadView .library-review-strip strong,
#uploadView .library-review-groups strong {
  overflow-wrap: anywhere;
}

#uploadView .library-review-groups article > span {
  color: var(--tea-green);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

#uploadView .library-review-groups article div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

#uploadView .library-review-groups article button {
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
}

#uploadView .library-search-count {
  color: var(--earth-muted);
  font-size: 13px;
  font-weight: 750;
}

#uploadView .bulk-edit-bar {
  display: grid;
  grid-template-columns: auto minmax(148px, 178px) minmax(168px, 218px) minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin: 0 18px 14px;
  padding: 10px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 8px;
  background: rgba(234, 223, 201, 0.42);
}

#uploadView .bulk-edit-bar strong {
  color: var(--tea-green);
  font-size: 14px;
  white-space: nowrap;
}

#uploadView .bulk-edit-bar button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  box-shadow: none;
}

#uploadView .music-table-wrap {
  position: relative;
  min-height: 480px;
  max-height: calc(100vh - 380px);
  overflow: auto;
  border: 0;
  border-top: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 0;
  background: rgba(255, 250, 239, 0.62);
}

#uploadView .music-table-wrap::before,
#uploadView .music-table-wrap::after {
  display: none;
}

#uploadView .music-table {
  min-width: 1160px;
  color: var(--earth-ink);
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

#uploadView .music-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 11px 12px;
  color: #798074;
  border-bottom: 1px solid rgba(31, 111, 99, 0.12);
  background: rgba(245, 236, 217, 0.98);
  font-size: 11px;
  font-weight: 850;
  text-align: left;
  text-transform: uppercase;
}

#uploadView .music-table td {
  padding: 10px 12px;
  color: var(--earth-ink);
  border-bottom: 1px solid rgba(31, 111, 99, 0.1);
  background: rgba(255, 250, 239, 0.7);
  vertical-align: middle;
}

#uploadView .music-table tr:hover td {
  background: #fffaf0;
}

#uploadView .music-table tr.previewed td {
  background: rgba(215, 235, 226, 0.76);
}

#uploadView .music-table tr.selected td {
  background: rgba(70, 184, 168, 0.14);
}

#uploadView .music-table tr.previewed.selected td {
  background: rgba(70, 184, 168, 0.22);
}

#uploadView .select-col {
  width: 42px;
  min-width: 42px;
  text-align: center;
}

#uploadView .music-table th:nth-child(2),
#uploadView .music-table td:nth-child(2) {
  min-width: 260px;
}

#uploadView .music-table th:nth-child(3),
#uploadView .music-table td:nth-child(3) {
  min-width: 160px;
}

#uploadView .music-table th:nth-child(4),
#uploadView .music-table td:nth-child(4) {
  min-width: 160px;
}

#uploadView .music-table th:nth-child(5),
#uploadView .music-table td:nth-child(5) {
  min-width: 202px;
}

#uploadView .music-table th:nth-child(6),
#uploadView .music-table td:nth-child(6) {
  min-width: 206px;
}

#uploadView .song-title-cell {
  min-width: 260px;
}

#uploadView .song-title-stack {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#uploadView .song-title-cell span {
  color: var(--earth-muted);
  font-size: 12px;
  line-height: 1.24;
  overflow-wrap: anywhere;
}

#uploadView .song-title-stack .source-file-line {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  overflow-wrap: normal;
}

#uploadView .source-file-line .pdf-mini-label {
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 999px;
  color: var(--tea-green);
  background: rgba(226, 248, 234, 0.58);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

#uploadView .source-file-line .source-file-name {
  min-width: 0;
  overflow: hidden;
  color: var(--earth-muted);
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#uploadView .table-inline-input,
#uploadView .table-inline-select {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  color: var(--earth-ink);
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
}

#uploadView .table-inline-input:hover,
#uploadView .table-inline-select:hover {
  border-color: rgba(31, 111, 99, 0.14);
  background: rgba(255, 253, 247, 0.84);
}

#uploadView .title-input {
  color: var(--earth-ink);
  font-weight: 850;
}

#uploadView .tags-cell,
#uploadView .activity-cell,
#uploadView .spotify-cell,
#uploadView .table-actions-cell {
  display: table-cell;
}

#uploadView .tags-cell-inner {
  display: grid;
  gap: 6px;
}

#uploadView .row-chip-list {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

#uploadView .row-chip-list span {
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 999px;
  color: var(--tea-green);
  background: var(--tea-green-soft);
  font-size: 11px;
  font-weight: 750;
}

#uploadView .activity-cell-inner {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-width: 122px;
}

#uploadView .activity-cell-inner div {
  display: grid;
  gap: 2px;
}

#uploadView .activity-cell strong {
  color: var(--tea-green);
  font-size: 16px;
  line-height: 1;
}

#uploadView .activity-cell span {
  color: var(--earth-muted);
  font-size: 12px;
  white-space: nowrap;
}

#uploadView .activity-cell button,
#uploadView .table-actions-cell button {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 12px;
}

#uploadView .pdf-cell {
  min-width: 112px;
}

.pdf-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 999px;
  color: var(--tea-green);
  background: var(--tea-green-soft);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.pdf-status-pill.missing {
  color: #8d641a;
  border-color: rgba(141, 100, 26, 0.26);
  background: rgba(255, 236, 179, 0.68);
}

.pdf-status-pill.broken {
  color: #a33a2a;
  border-color: rgba(163, 58, 42, 0.24);
  background: rgba(255, 224, 216, 0.7);
}

.pdf-status-pill.replaced {
  color: #245c89;
  border-color: rgba(36, 92, 137, 0.24);
  background: rgba(221, 237, 251, 0.72);
}

#uploadView .spotify-cell .badge {
  min-height: 26px;
  border-radius: 999px;
  font-size: 12px;
}

#uploadView .table-actions-inner {
  display: flex;
  gap: 7px;
  align-items: center;
  white-space: nowrap;
}

#uploadView .table-actions-inner .text-link {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  color: var(--tea-green);
}

#uploadView .table-actions-inner .text-link.disabled,
.match-song-links .text-link.disabled {
  cursor: not-allowed;
  color: #a39b8c;
  text-decoration: none;
}

#uploadView .sheet-preview-panel {
  position: sticky;
  top: 88px;
  display: grid;
  grid-template-rows: auto auto minmax(360px, 1fr);
  gap: 12px;
  min-height: min(760px, calc(100vh - 132px));
  padding: 16px;
}

#uploadView .sheet-preview-header {
  display: grid;
  gap: 8px;
}

#uploadView .sheet-preview-header h2 {
  font-size: 22px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

#uploadView .sheet-preview-frame {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 8px;
  background: #efe4cf;
}

#uploadView .sheet-preview-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 520px;
  border: 0;
  background: #fffaf0;
}

#uploadView .sheet-preview-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--earth-muted);
  font-weight: 750;
}

#uploadView .sheet-preview-empty[hidden],
#uploadView .sheet-preview-frame iframe[hidden] {
  display: none;
}

#uploadView .sheet-preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

#uploadView .sheet-preview-actions .button-link {
  grid-column: 1 / -1;
}

#uploadView .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--turquoise);
  border-radius: 8px;
  color: #0f2f2a;
  background: var(--turquoise);
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

#uploadView .button-link:hover {
  background: var(--turquoise-strong);
  border-color: var(--turquoise-strong);
}

#uploadView .button-link.secondary {
  color: var(--earth-ink);
  background: #eadfc9;
  border-color: var(--sand-line);
}

#uploadView .button-link[aria-disabled="true"] {
  pointer-events: none;
  color: #969184;
  background: #e3d7c1;
  border-color: #d6c8ae;
}

.sheet-viewer .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--sand-line);
  border-radius: 8px;
  color: var(--earth-ink);
  background: #eadfc9;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.sheet-viewer .button-link:hover {
  color: #0f2f2a;
  background: var(--tea-green-soft);
  border-color: rgba(31, 111, 99, 0.28);
}

#uploadView .library-utility-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 16px;
  margin-top: 16px;
}

#uploadView .upload-panel,
#uploadView .quiet-panel {
  gap: 16px;
  padding: 18px;
}

#uploadView .upload-panel {
  grid-template-columns: minmax(240px, 1fr) auto;
}

#uploadView .upload-actions {
  justify-content: flex-end;
}

#uploadView .library-tools {
  border-color: rgba(31, 111, 99, 0.14);
}

#uploadView .library-tools summary {
  color: var(--tea-green);
  font-weight: 750;
}

.sheet-viewer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 0;
  background: #153a34;
}

.sheet-viewer-backdrop[hidden] {
  display: none;
}

.sheet-viewer {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  color: var(--earth-ink);
  border: 0;
  border-radius: 0;
  background: var(--sand-panel);
  box-shadow: none;
}

.sheet-viewer-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(31, 111, 99, 0.13);
  background:
    linear-gradient(135deg, rgba(70, 184, 168, 0.16), rgba(255, 250, 239, 0.94)),
    var(--sand-card);
}

.sheet-viewer-header h2 {
  color: var(--earth-ink);
  font-size: 18px;
  line-height: 1.1;
}

.sheet-viewer-header .eyebrow,
#sheetViewerMeta {
  display: none;
}

.sheet-viewer-header p {
  line-height: 1.2;
}

.sheet-viewer-header p,
.sheet-viewer-toolbar {
  color: var(--earth-muted);
}

.sheet-viewer-header-actions,
.sheet-viewer-toolbar {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}

.sheet-viewer-header-actions .button-link {
  min-height: 34px;
}

.sheet-viewer-header-actions button,
.sheet-viewer-header-actions .button-link,
.sheet-viewer-toolbar button {
  min-height: 34px;
  padding: 5px 10px;
}

.sheet-viewer-toolbar {
  justify-content: center;
  min-height: 36px;
  padding: 3px 6px;
  border-bottom: 1px solid rgba(31, 111, 99, 0.12);
  background: rgba(234, 223, 201, 0.46);
  font-weight: 800;
}

.sheet-spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  min-height: 0;
  padding: 2px;
  background: #153a34;
}

.sheet-page {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(255, 248, 234, 0.22);
  border-radius: 4px;
  background: #222725;
  overflow: hidden;
}

.sheet-page-label {
  position: absolute;
  top: 4px;
  left: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 9px;
  color: var(--earth-ink);
  border: 1px solid rgba(31, 111, 99, 0.16);
  border-radius: 999px;
  background: rgba(255, 250, 239, 0.9);
  box-shadow: 0 8px 20px rgba(21, 58, 52, 0.14);
  font-size: 12px;
  font-weight: 850;
  transform: translateX(-50%);
}

.sheet-page-canvas-wrap {
  position: relative;
  display: grid;
  align-items: center;
  justify-items: center;
  min-width: 0;
  min-height: 0;
  padding: 2px;
  overflow: auto;
}

#sheetViewerLeft .sheet-page-canvas-wrap {
  justify-items: end;
}

#sheetViewerRight .sheet-page-canvas-wrap {
  justify-items: start;
}

.sheet-page-canvas-wrap canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  background: #fff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.sheet-page-canvas-wrap canvas[hidden] {
  display: none;
}

.sheet-page-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: rgba(255, 250, 239, 0.76);
  font-weight: 800;
  text-align: center;
}

.sheet-page-placeholder[hidden] {
  display: none;
}

body.sheet-viewer-open {
  overflow: hidden;
}

@media (max-width: 1500px) {
  #uploadView .library-database-layout {
    grid-template-columns: 1fr;
  }

  #uploadView .sheet-preview-panel {
    position: static;
    min-height: 0;
    grid-template-rows: auto minmax(420px, 58vh) auto;
  }

  #uploadView .music-table-wrap {
    min-height: 420px;
    max-height: 560px;
  }
}

@media (max-width: 900px) {
  #uploadView .music-library-header,
  .sheet-viewer-header {
    align-items: flex-start;
    flex-direction: column;
  }

  #uploadView .music-table-tools,
  #uploadView .bulk-edit-bar,
  #uploadView .library-utility-grid,
  #uploadView .upload-panel {
    grid-template-columns: 1fr;
  }

  #uploadView .bulk-edit-bar {
    display: grid;
  }

  #uploadView .upload-result-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #uploadView .upload-result-actions {
    display: grid;
    justify-items: start;
  }

  #uploadView .bulk-edit-bar select,
  #uploadView .bulk-edit-bar input,
  #uploadView .bulk-edit-bar button {
    display: block;
    width: 100%;
  }

  #uploadView .upload-actions {
    justify-content: flex-start;
  }

  #uploadView .music-summary {
    align-self: flex-start;
  }

  #uploadView .music-table {
    min-width: 1020px;
  }

  #uploadView #musicTableSearch,
  #uploadView #musicTableFamiliarity,
  #uploadView #musicTableStatus,
  #uploadView #musicTableSort,
  #uploadView .music-table-tools button[type="submit"],
  #uploadView #clearMusicTableFilters {
    grid-column: auto;
    grid-row: auto;
  }

  .sheet-spread {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .sheet-page {
    min-height: 70vh;
  }
}

@media (max-width: 640px) {
  #uploadView {
    padding-bottom: 110px;
  }

  #uploadView .music-library-header,
  #uploadView .music-table-tools {
    padding-inline: 14px;
  }

  #uploadView .library-search-dock {
    padding-inline: 14px;
  }

  #uploadView .bulk-edit-bar {
    margin-inline: 14px;
  }

  #uploadView .sheet-preview-actions {
    grid-template-columns: 1fr;
  }

  #uploadView .sheet-preview-actions .button-link {
    grid-column: auto;
  }

  .sheet-viewer-backdrop {
    padding: 0;
  }

  .sheet-viewer {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
}

/* Product alignment pass: Practice, Sheet Music, and Spotify workflows */
.practice-focus-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.practice-focus-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 10px 12px;
  min-width: 0;
  min-height: 148px;
  padding: 12px;
  color: var(--earth-ink);
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 250, 239, 0.96), rgba(215, 235, 226, 0.72)),
    var(--sand-card);
  box-shadow: 0 12px 32px rgba(77, 63, 40, 0.08);
}

.practice-focus-placeholder {
  grid-template-rows: auto;
  align-items: center;
  width: 100%;
  text-align: left;
  white-space: normal;
}

.cover-art-focus {
  width: 74px;
  border-radius: 7px;
}

.practice-focus-card > .cover-art {
  grid-row: 1 / span 2;
}

.practice-focus-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.practice-focus-copy small,
.practice-focus-placeholder small {
  color: var(--tea-green);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.practice-focus-copy h3,
.practice-focus-placeholder strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--earth-ink);
  font-size: 16px;
  line-height: 1.14;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.practice-focus-copy p,
.practice-focus-placeholder em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--earth-muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.practice-focus-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-self: end;
}

.practice-focus-actions button {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 12px;
}

#practiceView .song-search-form {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

#practiceView .song-search-form input {
  min-width: 0;
}

#practiceView .song-search-form button {
  min-width: 0;
  padding-inline: 11px;
}

.sheet-music-pulse {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.sheet-pulse-card {
  display: grid;
  gap: 5px;
  min-height: 96px;
  padding: 14px;
  color: var(--earth-ink);
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 250, 239, 0.96), rgba(245, 236, 217, 0.76)),
    var(--sand-card);
  box-shadow: 0 12px 32px rgba(77, 63, 40, 0.08);
  text-align: left;
  white-space: normal;
}

.sheet-pulse-card:hover,
.sheet-pulse-card:focus-visible {
  border-color: rgba(47, 157, 142, 0.34);
  background:
    linear-gradient(135deg, rgba(215, 235, 226, 0.94), rgba(255, 250, 239, 0.88)),
    var(--sand-card);
  box-shadow: 0 14px 34px rgba(31, 111, 99, 0.12);
}

.sheet-pulse-card span {
  color: var(--earth-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sheet-pulse-card strong {
  color: var(--tea-green);
  font-size: 30px;
  line-height: 1;
}

.sheet-pulse-card em {
  color: var(--earth-muted);
  font-size: 13px;
  font-style: normal;
}

#spotifyView {
  padding-bottom: 126px;
}

#spotifyView .spotify-layout {
  gap: 16px;
}

.spotify-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: 18px;
  align-items: stretch;
  padding: 24px;
  color: #fff8ea;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(30, 215, 96, 0.22), rgba(21, 58, 52, 0.94) 52%, rgba(24, 24, 24, 0.96)),
    #153a34;
  box-shadow: 0 18px 48px rgba(21, 58, 52, 0.22);
}

.spotify-hero-copy {
  display: grid;
  gap: 8px;
  align-content: center;
}

.spotify-hero .eyebrow {
  color: #77dfbd;
}

.spotify-hero h2 {
  max-width: 760px;
  color: #fff8ea;
  font-size: 34px;
  line-height: 1.04;
}

.spotify-hero p {
  max-width: 760px;
  color: rgba(255, 248, 234, 0.78);
}

.spotify-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.spotify-hero-stats article {
  display: grid;
  gap: 5px;
  align-content: center;
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(255, 248, 234, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.spotify-hero-stats strong {
  color: #77dfbd;
  font-size: 28px;
  line-height: 1;
}

.spotify-hero-stats span {
  color: rgba(255, 248, 234, 0.74);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.spotify-quick-access {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

#spotifyView .spotify-workflow-panel,
#spotifyView .spotify-setup,
#spotifyView .playlist-panel {
  color: var(--earth-ink);
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 239, 0.96), rgba(245, 236, 217, 0.9)),
    var(--sand-card);
  box-shadow: 0 16px 44px rgba(77, 63, 40, 0.1);
}

#spotifyView .spotify-workflow-panel {
  gap: 14px;
  padding: 18px;
}

#spotifyView .spotify-workflow-panel h2,
#spotifyView .spotify-setup h2,
#spotifyView .playlist-panel h2,
#spotifyView .match-section h2,
#spotifyView .match-card h3 {
  color: var(--earth-ink);
}

#spotifyView .spotify-workflow-panel p,
#spotifyView .spotify-setup p,
#spotifyView .playlist-panel p,
#spotifyView .match-section p,
#spotifyView .match-card p {
  color: var(--earth-muted);
}

#spotifyView .progress-bar {
  background: #eadfc9;
}

#spotifyView .progress-bar span {
  background: linear-gradient(90deg, var(--tea-green), #1ed760);
}

#spotifyView .match-card {
  color: var(--earth-ink);
  border: 1px solid rgba(31, 111, 99, 0.14);
  background: rgba(251, 245, 232, 0.94);
}

#spotifyView .match-pairing,
#spotifyView .candidate {
  border: 1px solid rgba(31, 111, 99, 0.12);
  background: #fffaf0;
}

#spotifyView .manual-search input {
  color: var(--earth-ink);
  border-color: rgba(31, 111, 99, 0.16);
  background: rgba(255, 253, 247, 0.96);
}

@media (max-width: 1180px) {
  .practice-focus-grid,
  .sheet-music-pulse,
  .spotify-hero,
  .spotify-quick-access {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .practice-focus-grid,
  .sheet-music-pulse,
  .spotify-hero,
  .spotify-quick-access {
    grid-template-columns: 1fr;
  }

  .practice-focus-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .practice-focus-card > .cover-art {
    grid-row: auto;
  }

  .practice-focus-actions {
    grid-column: 1 / -1;
  }

  .spotify-hero {
    padding: 18px;
  }

  .spotify-hero h2 {
    font-size: 29px;
  }
}

/* Sheet Music importer flow refresh */
#uploadView {
  display: grid;
  gap: 16px;
  --import-ink: #12322e;
  --import-muted: #5d6965;
  --import-line: rgba(18, 50, 46, 0.13);
  --import-soft-line: rgba(18, 50, 46, 0.08);
  --import-card: #ffffff;
  --import-soft: #f4f8f6;
  --import-blue: #3f7ce8;
  --import-blue-soft: rgba(63, 124, 232, 0.11);
  --import-coral: #e86c4f;
  --import-coral-soft: rgba(232, 108, 79, 0.12);
}

#uploadView .importer-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 500px);
  gap: 20px;
  align-items: stretch;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #f8fffc;
  background:
    linear-gradient(135deg, rgba(63, 124, 232, 0.28), transparent 42%),
    linear-gradient(135deg, #12322e 0%, #1d665d 58%, #20443f 100%);
  box-shadow: 0 18px 48px rgba(18, 50, 46, 0.18);
}

#uploadView .importer-copy {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
}

#uploadView .importer-copy .eyebrow,
#uploadView .importer-copy p {
  color: rgba(248, 255, 252, 0.78);
}

#uploadView .importer-copy h2 {
  max-width: 780px;
  color: #ffffff;
  font-size: 34px;
  line-height: 1.06;
}

#uploadView .importer-copy > p {
  max-width: 680px;
  font-size: 15px;
}

#uploadView .importer-flow {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}

#uploadView .importer-flow span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: rgba(248, 255, 252, 0.88);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 800;
}

#uploadView .importer-flow strong {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 999px;
  color: #12322e;
  background: #8ee4d1;
  font-size: 12px;
}

#uploadView .importer-actions-panel {
  display: grid;
  gap: 14px;
  align-content: center;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  color: var(--import-ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

#uploadView .importer-actions-panel.drag-active {
  border-color: rgba(142, 228, 209, 0.9);
  box-shadow: 0 18px 48px rgba(63, 124, 232, 0.24);
  transform: translateY(-1px);
}

#uploadView .importer-action-header {
  display: grid;
  gap: 4px;
}

#uploadView .importer-action-header h3 {
  color: var(--import-ink);
  font-size: 18px;
}

#uploadView .importer-action-header p {
  color: var(--import-muted);
}

#uploadView .selected-file-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

#uploadView .selected-file-list[hidden] {
  display: none;
}

#uploadView .selected-file-list span,
#uploadView .selected-file-list strong {
  max-width: 100%;
  min-height: 28px;
  padding: 5px 9px;
  overflow: hidden;
  border: 1px solid var(--import-line);
  border-radius: 999px;
  color: var(--import-ink);
  background: var(--import-soft);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#uploadView .selected-file-list strong {
  color: #1d665d;
  background: rgba(142, 228, 209, 0.18);
}

#uploadView .importer-actions-panel .upload-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#uploadView .importer-actions-panel .upload-actions button,
#uploadView .importer-actions-panel .upload-actions .file-button {
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding-inline: 12px;
}

#uploadView .sheet-music-pulse {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

#uploadView .sheet-pulse-card {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  min-height: 76px;
  padding: 14px 16px;
  border-color: var(--import-line);
  color: var(--import-ink);
  background: var(--import-card);
  box-shadow: 0 10px 26px rgba(18, 50, 46, 0.07);
}

#uploadView .sheet-pulse-card span,
#uploadView .sheet-pulse-card em {
  color: var(--import-muted);
}

#uploadView .sheet-pulse-card strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: #1d665d;
  font-size: 28px;
}

#uploadView .sheet-pulse-card:hover,
#uploadView .sheet-pulse-card:focus-visible {
  border-color: rgba(63, 124, 232, 0.28);
  background: linear-gradient(135deg, #ffffff, var(--import-blue-soft));
  box-shadow: 0 14px 34px rgba(18, 50, 46, 0.1);
}

#uploadView .library-database-layout {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
  gap: 18px;
}

#uploadView .music-library-panel,
#uploadView .sheet-preview-panel,
#uploadView .quiet-panel {
  color: var(--import-ink);
  border-color: var(--import-line);
  background: var(--import-card);
  box-shadow: 0 14px 36px rgba(18, 50, 46, 0.08);
}

#uploadView .library-search-dock {
  gap: 10px;
  padding: 16px 18px;
  border-bottom-color: var(--import-soft-line);
  background: linear-gradient(180deg, #ffffff, #f8fbfa);
}

#uploadView .music-table-tools {
  grid-template-columns: minmax(250px, 2fr) repeat(3, minmax(132px, 1fr)) auto auto;
  gap: 8px;
}

#uploadView #musicTableSearch,
#uploadView #musicTableFamiliarity,
#uploadView #musicTableStatus,
#uploadView #musicTableSort,
#uploadView .music-table-tools button[type="submit"],
#uploadView #clearMusicTableFilters {
  grid-column: auto;
  grid-row: auto;
}

#uploadView #musicTableSearch {
  min-height: 44px;
  padding-inline: 14px;
  font-size: 15px;
}

#uploadView .music-table-tools input,
#uploadView .music-table-tools select,
#uploadView .bulk-edit-bar input,
#uploadView .bulk-edit-bar select,
#uploadView .table-inline-input,
#uploadView .table-inline-select {
  color: var(--import-ink);
  border-color: var(--import-line);
  background: var(--import-soft);
}

#uploadView .music-table-tools button,
#uploadView .bulk-edit-bar button,
#uploadView .sheet-preview-actions button,
#uploadView .button-link {
  min-height: 38px;
}

#uploadView .library-search-shortcuts {
  gap: 7px;
}

#uploadView .library-filter-chip {
  min-height: 30px;
  border-color: var(--import-line);
  color: var(--import-ink);
  background: #ffffff;
}

#uploadView .library-filter-chip strong {
  color: var(--import-blue);
}

#uploadView .library-filter-chip:hover,
#uploadView .library-filter-chip.active {
  border-color: rgba(63, 124, 232, 0.24);
  color: #18335f;
  background: var(--import-blue-soft);
}

#uploadView .music-library-header {
  padding: 16px 18px 12px;
  border-bottom-color: var(--import-soft-line);
  background: #ffffff;
}

#uploadView .music-library-header h2,
#uploadView .sheet-preview-header h2,
#uploadView .quiet-panel h2 {
  color: var(--import-ink);
}

#uploadView .music-library-header h2 {
  font-size: 22px;
}

#uploadView .music-library-header p,
#uploadView .sheet-preview-header p,
#uploadView .quiet-panel p,
#uploadView .library-search-count {
  color: var(--import-muted);
}

#uploadView .music-summary {
  color: #18335f;
  border-color: rgba(63, 124, 232, 0.16);
  background: var(--import-blue-soft);
}

#uploadView .bulk-edit-bar {
  grid-template-columns: auto minmax(132px, 164px) minmax(158px, 198px) minmax(160px, 1fr) auto auto;
  gap: 8px;
  margin: 0 18px 12px;
  border-color: var(--import-line);
  background: var(--import-soft);
}

#uploadView .bulk-edit-bar strong {
  color: #1d665d;
}

#uploadView .music-table-wrap {
  min-height: 500px;
  max-height: calc(100vh - 330px);
  border-top-color: var(--import-soft-line);
  background: #ffffff;
}

#uploadView .music-table {
  color: var(--import-ink);
}

#uploadView .music-table th {
  padding: 10px 12px;
  color: #60706b;
  border-bottom-color: var(--import-line);
  background: #f8fbfa;
  font-size: 11px;
}

#uploadView .music-table td {
  padding: 9px 12px;
  color: var(--import-ink);
  border-bottom-color: var(--import-soft-line);
  background: #ffffff;
}

#uploadView .music-table tr:hover td {
  background: #f8fbfa;
}

#uploadView .music-table tr.previewed td {
  background: rgba(63, 124, 232, 0.08);
}

#uploadView .music-table tr.selected td {
  background: rgba(142, 228, 209, 0.16);
}

#uploadView .music-table tr.previewed.selected td {
  background: rgba(63, 124, 232, 0.12);
}

#uploadView .song-title-cell span,
#uploadView .activity-cell span {
  color: var(--import-muted);
}

#uploadView .title-input,
#uploadView .activity-cell strong {
  color: var(--import-ink);
}

#uploadView .table-inline-input:hover,
#uploadView .table-inline-select:hover {
  border-color: rgba(63, 124, 232, 0.2);
  background: #ffffff;
}

#uploadView .row-chip-list span {
  border-color: rgba(63, 124, 232, 0.14);
  color: #18335f;
  background: var(--import-blue-soft);
}

#uploadView .activity-cell button,
#uploadView .table-actions-cell button {
  min-height: 30px;
  padding: 5px 9px;
}

#uploadView .sheet-preview-panel {
  top: 92px;
  gap: 14px;
  min-height: min(740px, calc(100vh - 132px));
  padding: 16px;
}

#uploadView .sheet-preview-header {
  padding-bottom: 2px;
}

#uploadView .sheet-preview-frame {
  border-color: var(--import-line);
  background: var(--import-soft);
}

#uploadView .sheet-preview-frame iframe {
  background: #ffffff;
}

#uploadView .sheet-preview-empty {
  color: var(--import-muted);
}

#uploadView .sheet-preview-actions {
  gap: 8px;
}

#uploadView .button-link {
  color: #ffffff;
  border-color: #1d665d;
  background: #1d665d;
}

#uploadView .button-link:hover {
  border-color: #12322e;
  background: #12322e;
}

#uploadView .button-link.secondary,
#uploadView .button-link[aria-disabled="true"] {
  color: var(--import-ink);
  border-color: var(--import-line);
  background: var(--import-soft);
}

#uploadView .library-utility-grid-compact {
  grid-template-columns: minmax(260px, 420px);
  justify-content: end;
}

#uploadView .quiet-panel {
  gap: 12px;
  padding: 16px 18px;
}

@media (max-width: 1280px) {
  #uploadView .importer-workbench,
  #uploadView .library-database-layout {
    grid-template-columns: 1fr;
  }

  #uploadView .sheet-preview-panel {
    position: static;
    min-height: 0;
    grid-template-rows: auto minmax(420px, 58vh) auto;
  }

  #uploadView .music-table-wrap {
    max-height: 560px;
  }
}

@media (max-width: 1080px) {
  #uploadView .music-table-tools,
  #uploadView .bulk-edit-bar,
  #uploadView .importer-actions-panel .upload-actions,
  #uploadView .library-utility-grid-compact {
    grid-template-columns: 1fr;
  }

  #uploadView .sheet-music-pulse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  #uploadView .importer-workbench {
    padding: 18px;
  }

  #uploadView .importer-copy h2 {
    font-size: 28px;
  }

  #uploadView .sheet-music-pulse {
    grid-template-columns: 1fr;
  }

  #uploadView .sheet-pulse-card {
    min-height: 68px;
  }

  #uploadView .music-library-header,
  #uploadView .bulk-edit-bar {
    margin-inline: 0;
  }
}

/* Adjustable side rails */
.app-shell {
  transition: grid-template-columns 180ms ease;
}

.rail-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  min-height: 32px;
  margin-left: auto;
  padding: 0;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  color: #ffffff;
  background: #1a1a1a;
  box-shadow: none;
}

.rail-toggle:hover {
  background: #242424;
  box-shadow: none;
}

.rail-toggle span {
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateX(2px) rotate(45deg);
  transition: transform 160ms ease;
}

.app-shell.rail-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.app-shell.rail-collapsed .brand {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 8px;
}

.app-shell.rail-collapsed .brand > div:not(.brand-mark),
.app-shell.rail-collapsed .step strong,
.app-shell.rail-collapsed .rail-library {
  display: none;
}

.app-shell.rail-collapsed .brand-mark {
  width: 38px;
  height: 38px;
}

.app-shell.rail-collapsed .rail-toggle {
  margin-left: 0;
}

.app-shell.rail-collapsed .rail-toggle span {
  transform: translateX(-2px) rotate(225deg);
}

.app-shell.rail-collapsed .step {
  justify-content: center;
  padding-inline: 8px;
}

.app-shell.rail-collapsed .steps {
  overflow: visible;
}

#uploadView .library-database-layout {
  grid-template-columns: minmax(0, 1fr) 14px minmax(280px, var(--preview-width, 390px));
  gap: 0;
  align-items: start;
}

#uploadView .library-preview-splitter {
  position: sticky;
  top: 92px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 14px;
  height: min(740px, calc(100vh - 132px));
  min-height: 300px;
  cursor: col-resize;
  background: linear-gradient(180deg, rgba(18, 50, 46, 0.1), rgba(63, 124, 232, 0.08));
  border-block: 1px solid var(--import-line);
}

#uploadView .library-preview-splitter span {
  width: 4px;
  height: 52px;
  border-radius: 999px;
  background: rgba(18, 50, 46, 0.28);
  box-shadow: 0 0 0 5px rgba(18, 50, 46, 0.06);
}

#uploadView .library-preview-splitter:hover span,
#uploadView .library-preview-splitter:focus-visible span,
.preview-resizing #uploadView .library-preview-splitter span {
  background: var(--import-blue);
  box-shadow: 0 0 0 7px rgba(63, 124, 232, 0.13);
}

.preview-resizing,
.preview-resizing * {
  cursor: col-resize !important;
  user-select: none;
}

#uploadView .sheet-preview-panel {
  border-radius: 0 8px 8px 0;
}

#uploadView .music-library-panel {
  border-radius: 8px 0 0 8px;
}

#uploadView .sheet-preview-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

#uploadView .preview-minimize-button {
  display: grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
}

#uploadView .preview-minimize-button span {
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

#uploadView .preview-rail-toggle {
  display: none;
}

#uploadView .library-database-layout.preview-collapsed {
  grid-template-columns: minmax(0, 1fr) 60px;
}

#uploadView .library-database-layout.preview-collapsed .library-preview-splitter {
  display: none;
}

#uploadView .library-database-layout.preview-collapsed .sheet-preview-panel {
  position: sticky;
  top: 92px;
  display: grid;
  min-height: min(560px, calc(100vh - 132px));
  padding: 6px;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
}

#uploadView .library-database-layout.preview-collapsed .sheet-preview-panel > :not(.preview-rail-toggle) {
  display: none;
}

#uploadView .library-database-layout.preview-collapsed .preview-rail-toggle {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100%;
  padding: 16px 9px;
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #1d665d, #12322e);
  box-shadow: none;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

#uploadView .sheet-preview-actions {
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

#uploadView .sheet-preview-actions .button-link {
  grid-column: auto;
}

#uploadView .sheet-preview-actions #sheetPreviewDetails {
  grid-column: 1 / -1;
}

#uploadView .table-actions-inner {
  gap: 6px;
}

#uploadView .table-actions-inner .text-link {
  min-height: 30px;
}

/* Floating scrollbars for dense library surfaces */
html,
body {
  scrollbar-color: rgba(29, 102, 93, 0.34) transparent;
  scrollbar-width: thin;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: transparent;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(29, 102, 93, 0.34);
  background-clip: content-box;
}

#uploadView .music-table-wrap,
.rail-library {
  scrollbar-color: rgba(29, 102, 93, 0.36) transparent;
  scrollbar-width: thin;
}

#uploadView .music-table-wrap::-webkit-scrollbar,
.rail-library::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

#uploadView .music-table-wrap::-webkit-scrollbar-track,
.rail-library::-webkit-scrollbar-track {
  background: transparent;
}

#uploadView .music-table-wrap::-webkit-scrollbar-thumb,
.rail-library::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(29, 102, 93, 0.32);
  background-clip: content-box;
}

#uploadView .music-table-wrap:hover::-webkit-scrollbar-thumb,
.rail-library:hover::-webkit-scrollbar-thumb {
  background: rgba(29, 102, 93, 0.52);
  background-clip: content-box;
}

#uploadView .music-table-wrap::-webkit-scrollbar-corner {
  background: transparent;
}

#uploadView .sheet-preview-frame {
  scrollbar-width: none;
}

#uploadView .sheet-preview-frame iframe {
  width: calc(100% + 14px);
  max-width: none;
  margin-right: -14px;
}

@media (max-width: 1280px) {
  #uploadView .library-database-layout,
  #uploadView .library-database-layout.preview-collapsed {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  #uploadView .library-preview-splitter {
    display: none;
  }

  #uploadView .music-library-panel,
  #uploadView .sheet-preview-panel {
    border-radius: 8px;
  }

  #uploadView .library-database-layout.preview-collapsed .sheet-preview-panel {
    position: static;
    min-height: 66px;
    padding: 6px;
  }

  #uploadView .library-database-layout.preview-collapsed .preview-rail-toggle {
    min-height: 54px;
    padding: 12px 14px;
    writing-mode: horizontal-tb;
    transform: none;
  }
}

@media (max-width: 820px) {
  .rail-toggle {
    display: none;
  }

  .app-shell.rail-collapsed {
    display: block;
  }

  .app-shell.rail-collapsed .step strong {
    display: block;
  }
}

/* Sheet music compact polish */
body,
#uploadView {
  padding-bottom: 0 !important;
}

.player-bar {
  display: none !important;
}

#uploadView {
  gap: 12px;
}

#uploadView .importer-workbench {
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(18, 50, 46, 0.08);
  color: var(--import-ink);
  background: rgba(255, 250, 239, 0.52);
  box-shadow: none;
}

#uploadView .importer-copy {
  gap: 10px;
}

#uploadView .importer-copy h2 {
  max-width: 680px;
  color: var(--import-ink);
  font-size: 23px;
  line-height: 1.08;
}

#uploadView .importer-copy .eyebrow,
#uploadView .importer-copy p {
  color: var(--import-muted);
}

#uploadView .importer-copy > p {
  max-width: 620px;
  font-size: 14px;
}

#uploadView .importer-flow {
  gap: 6px;
}

#uploadView .importer-flow span {
  min-height: 28px;
  padding: 4px 8px;
  color: var(--import-ink);
  border-color: rgba(18, 50, 46, 0.1);
  background: rgba(255, 253, 247, 0.56);
  font-size: 12px;
}

#uploadView .importer-flow strong {
  width: 19px;
  height: 19px;
  color: var(--import-ink);
  background: rgba(142, 228, 209, 0.42);
  font-size: 11px;
}

#uploadView .importer-actions-panel {
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#uploadView .importer-actions-panel .upload-actions {
  gap: 8px;
}

#uploadView .importer-actions-panel .upload-actions button,
#uploadView .importer-actions-panel .upload-actions .file-button {
  min-height: 36px;
  padding-inline: 10px;
}

#uploadView .sheet-music-pulse {
  gap: 1px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(18, 50, 46, 0.1);
}

#uploadView .sheet-pulse-card {
  min-height: 56px;
  padding: 10px 14px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 253, 247, 0.72);
  box-shadow: none;
}

#uploadView .sheet-pulse-card span {
  font-size: 10px;
}

#uploadView .sheet-pulse-card em {
  font-size: 12px;
}

#uploadView .sheet-pulse-card strong {
  font-size: 23px;
}

#uploadView .sheet-pulse-card:hover,
#uploadView .sheet-pulse-card:focus-visible {
  background: rgba(142, 228, 209, 0.17);
  box-shadow: none;
}

#uploadView .library-database-layout {
  gap: 0;
  border: 1px solid rgba(18, 50, 46, 0.1);
  border-radius: 10px;
  background: rgba(255, 250, 239, 0.62);
  box-shadow: 0 12px 32px rgba(18, 50, 46, 0.06);
}

#uploadView .music-library-panel,
#uploadView .sheet-preview-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
}

#uploadView .music-library-panel {
  border-radius: 10px 0 0 10px;
}

#uploadView .sheet-preview-panel {
  border-left: 1px solid rgba(18, 50, 46, 0.1);
  border-radius: 0 10px 10px 0;
}

#uploadView .library-preview-splitter {
  background: transparent;
  border-block: 0;
}

#uploadView .library-preview-splitter span {
  width: 3px;
  height: 44px;
  background: rgba(18, 50, 46, 0.2);
  box-shadow: none;
}

#uploadView .library-search-dock {
  gap: 8px;
  padding: 12px 16px 8px;
  border-bottom: 1px solid rgba(18, 50, 46, 0.08);
  background: transparent;
}

#uploadView .music-table-tools {
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(126px, 0.7fr)) auto auto;
  gap: 6px;
}

#uploadView #musicTableSearch,
#uploadView .music-table-tools input,
#uploadView .music-table-tools select,
#uploadView .bulk-edit-bar input,
#uploadView .bulk-edit-bar select {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 7px;
  background: rgba(255, 253, 247, 0.72);
  font-size: 13px;
}

#uploadView #musicTableSearch {
  min-height: 36px;
  padding-inline: 11px;
  font-size: 14px;
}

#uploadView .music-table-tools button,
#uploadView .bulk-edit-bar button,
#uploadView .sheet-preview-actions button,
#uploadView .button-link {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 13px;
}

#uploadView .library-search-shortcuts {
  gap: 5px;
}

#uploadView .library-filter-chip {
  min-height: 26px;
  padding: 3px 8px;
  font-size: 12px;
}

#uploadView .library-filter-chip strong {
  font-size: 11px;
}

#uploadView .library-search-count {
  margin: 0;
  font-size: 12px;
}

#uploadView .music-library-header {
  align-items: flex-end;
  padding: 12px 16px 8px;
  border-bottom: 0;
  background: transparent;
}

#uploadView .music-library-header h2 {
  font-size: 21px;
}

#uploadView .music-library-header p {
  max-width: 680px;
  font-size: 13px;
}

#uploadView .music-summary {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 12px;
}

#uploadView .bulk-edit-bar {
  gap: 6px;
  margin: 0 16px 8px;
  padding: 7px 0;
  border: 0;
  border-top: 1px solid rgba(18, 50, 46, 0.08);
  border-bottom: 1px solid rgba(18, 50, 46, 0.08);
  border-radius: 0;
  background: transparent;
}

#uploadView .bulk-edit-bar strong {
  font-size: 13px;
}

#uploadView .music-table-wrap {
  min-height: 460px;
  max-height: calc(100vh - 300px);
  border-top: 1px solid rgba(18, 50, 46, 0.08);
  background: transparent;
}

#uploadView .music-table th {
  padding: 8px 10px;
  background: rgba(245, 248, 246, 0.9);
}

#uploadView .music-table td {
  padding: 7px 10px;
  background: rgba(255, 253, 247, 0.58);
}

#uploadView .table-inline-input,
#uploadView .table-inline-select {
  min-height: 30px;
  padding: 5px 7px;
}

#uploadView .activity-cell button,
#uploadView .table-actions-cell button,
#uploadView .table-actions-inner .text-link {
  min-height: 28px;
  padding: 4px 8px;
}

#uploadView .sheet-preview-panel {
  gap: 10px;
  min-height: min(720px, calc(100vh - 118px));
  padding: 14px;
}

#uploadView .sheet-preview-header h2 {
  font-size: 20px;
}

#uploadView .sheet-preview-actions {
  gap: 6px;
}

#uploadView .sheet-preview-frame {
  border-color: rgba(18, 50, 46, 0.1);
  border-radius: 7px;
  background: rgba(245, 248, 246, 0.78);
}

#uploadView .library-database-layout.preview-collapsed .sheet-preview-panel {
  padding: 8px;
  border-left: 0;
  background: transparent;
}

#uploadView .library-database-layout.preview-collapsed .preview-rail-toggle {
  border-radius: 8px;
}

@media (max-width: 1280px) {
  #uploadView .sheet-preview-panel {
    border-left: 0;
    border-top: 1px solid rgba(18, 50, 46, 0.1);
    border-radius: 0 0 10px 10px;
  }

  #uploadView .music-library-panel {
    border-radius: 10px 10px 0 0;
  }
}

@media (max-width: 1080px) {
  #uploadView .music-table-tools,
  #uploadView .bulk-edit-bar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  #uploadView .importer-workbench {
    padding: 16px;
  }

  #uploadView .importer-copy h2 {
    font-size: 24px;
  }

  #uploadView .music-library-header {
    align-items: flex-start;
  }
}

/* Sheet music table-first refinements */
body[data-view="upload"] .topbar {
  padding: 10px 24px 9px;
}

body[data-view="upload"] .topbar h2 {
  margin: 1px 0 2px;
  font-size: 23px;
}

body[data-view="upload"] #flowSummary {
  display: none;
}

body[data-view="upload"] .top-actions {
  justify-content: flex-end;
  min-width: 40px;
}

body[data-view="upload"] .main-shell main {
  padding-top: 12px;
}

body[data-view="spotify"] .topbar {
  padding: 10px 24px 9px;
}

body[data-view="spotify"] .topbar h2 {
  margin: 1px 0 2px;
  font-size: 23px;
}

body[data-view="spotify"] #flowSummary {
  display: none;
}

body[data-view="spotify"] .top-actions {
  justify-content: flex-end;
  min-width: 40px;
}

body[data-view="spotify"] .main-shell main {
  padding-top: 12px;
}

#uploadView {
  gap: 10px;
}

#uploadView .importer-workbench {
  display: block;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(18, 50, 46, 0.08);
  border-radius: 8px;
  background: rgba(255, 250, 239, 0.44);
}

#uploadView .importer-workbench > summary {
  list-style: none;
}

#uploadView .importer-workbench > summary::-webkit-details-marker {
  display: none;
}

#uploadView .importer-summary {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 9px 14px;
  cursor: pointer;
}

#uploadView .importer-summary-copy {
  display: flex;
  gap: 9px;
  align-items: baseline;
  flex-wrap: wrap;
  min-width: 0;
}

#uploadView .importer-summary-copy .eyebrow {
  color: #1d665d;
  font-size: 11px;
}

#uploadView .importer-summary-copy strong {
  color: var(--import-ink);
  font-size: 15px;
  line-height: 1.1;
}

#uploadView .importer-summary-copy small {
  color: var(--import-muted);
  font-size: 12px;
  font-weight: 650;
}

#uploadView .importer-summary-toggle {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(18, 50, 46, 0.12);
  border-radius: 999px;
  color: #1d665d;
  background: rgba(255, 253, 247, 0.72);
  font-size: 12px;
  font-weight: 800;
}

#uploadView .importer-summary-toggle .open-label {
  display: none;
}

#uploadView .importer-workbench[open] .importer-summary-toggle .closed-label {
  display: none;
}

#uploadView .importer-workbench[open] .importer-summary-toggle .open-label {
  display: inline;
}

#uploadView .importer-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 500px);
  gap: 14px;
  align-items: center;
  padding: 0 14px 12px;
  border-top: 1px solid rgba(18, 50, 46, 0.08);
}

#uploadView .importer-copy {
  gap: 6px;
  padding-top: 12px;
}

#uploadView .importer-copy h2 {
  max-width: none;
  font-size: 18px;
}

#uploadView .importer-copy > p {
  max-width: 560px;
  font-size: 13px;
}

#uploadView .importer-flow span {
  min-height: 24px;
  padding: 3px 7px;
  font-size: 11px;
}

#uploadView .importer-flow strong {
  width: 17px;
  height: 17px;
  font-size: 10px;
}

#uploadView .importer-actions-panel {
  padding-top: 12px;
}

#uploadView .importer-action-header h3 {
  font-size: 15px;
}

#uploadView .importer-action-header p {
  font-size: 12px;
}

#uploadView .importer-actions-panel .upload-actions button,
#uploadView .importer-actions-panel .upload-actions .file-button {
  min-height: 32px;
}

#uploadView .sheet-music-pulse {
  border-radius: 7px;
}

#uploadView .sheet-pulse-card {
  min-height: 44px;
  padding: 7px 12px;
}

#uploadView .sheet-pulse-card span {
  font-size: 9px;
}

#uploadView .sheet-pulse-card em {
  font-size: 11px;
}

#uploadView .sheet-pulse-card strong {
  font-size: 20px;
}

#uploadView .library-search-dock {
  padding: 12px 16px 9px;
  background: rgba(255, 253, 247, 0.3);
}

#uploadView .music-table-tools {
  grid-template-columns: minmax(360px, 2fr) repeat(3, minmax(118px, 0.58fr)) auto auto;
  gap: 7px;
}

#uploadView #musicTableSearch {
  min-height: 42px;
  padding-inline: 14px;
  border-color: rgba(29, 102, 93, 0.28);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(142, 228, 209, 0.08);
  font-size: 15px;
  font-weight: 780;
}

#uploadView .music-table-tools select {
  min-height: 34px;
  font-size: 12px;
}

#uploadView #musicTableSearch:focus {
  outline-color: rgba(29, 102, 93, 0.36);
}

#uploadView .library-search-shortcuts {
  margin-top: 1px;
}

#uploadView .music-library-header {
  padding: 8px 16px 4px;
}

#uploadView .music-library-header .eyebrow,
#uploadView .music-library-header p {
  display: none;
}

#uploadView .music-library-header h2 {
  font-size: 16px;
  line-height: 1.1;
}

#uploadView .music-summary {
  min-height: 24px;
  padding: 3px 9px;
  font-size: 11px;
}

#uploadView .bulk-edit-bar {
  margin-bottom: 6px;
  padding: 6px 0;
}

#uploadView .music-table-wrap {
  min-height: 520px;
  max-height: calc(100vh - 248px);
}

body[data-view="upload"] #uploadView .sheet-preview-panel,
body[data-view="upload"] #uploadView .library-preview-splitter,
body[data-view="upload"] #uploadView .library-database-layout.preview-collapsed .sheet-preview-panel {
  top: 72px;
}

@media (max-width: 1280px) {
  #uploadView .importer-body {
    grid-template-columns: 1fr;
  }

  #uploadView .music-table-tools {
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(112px, 0.45fr)) auto auto;
  }
}

@media (max-width: 1080px) {
  #uploadView .music-table-tools {
    grid-template-columns: 1fr;
  }

  #uploadView .music-table-wrap {
    max-height: 620px;
  }
}

@media (max-width: 720px) {
  body[data-view="upload"] .topbar {
    padding: 12px 16px 10px;
  }

  #uploadView .importer-summary {
    align-items: flex-start;
  }

  #uploadView .importer-summary-copy {
    display: grid;
    gap: 3px;
  }

  #uploadView .sheet-music-pulse {
    grid-template-columns: 1fr 1fr;
  }
}

/* Green chrome for secondary sheet-music controls */
#uploadView .importer-workbench {
  border: 0;
  background: linear-gradient(135deg, #153a34 0%, #1d665d 58%, #12322e 100%);
  box-shadow: none;
}

#uploadView .importer-summary {
  min-height: 44px;
  color: #fff8ea;
}

#uploadView .importer-summary-copy .eyebrow,
#uploadView .importer-summary-copy strong,
#uploadView .importer-summary-copy small {
  color: #fff8ea;
}

#uploadView .importer-summary-copy small {
  color: rgba(255, 248, 234, 0.72);
}

#uploadView .importer-summary-toggle {
  color: #0f2f2a;
  border-color: rgba(255, 248, 234, 0.22);
  background: rgba(142, 228, 209, 0.92);
}

#uploadView .importer-body {
  border-top: 1px solid rgba(255, 248, 234, 0.16);
  background: rgba(9, 35, 31, 0.34);
}

#uploadView .importer-copy h2,
#uploadView .importer-action-header h3 {
  color: #fff8ea;
}

#uploadView .importer-copy p,
#uploadView .importer-action-header p {
  color: rgba(255, 248, 234, 0.72);
}

#uploadView .importer-flow span {
  color: #fff8ea;
  border-color: rgba(255, 248, 234, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

#uploadView .importer-flow strong {
  color: #0f2f2a;
  background: rgba(142, 228, 209, 0.92);
}

#uploadView .importer-actions-panel .upload-actions button,
#uploadView .importer-actions-panel .upload-actions .file-button {
  color: #0f2f2a;
  border-color: rgba(142, 228, 209, 0.72);
  background: #46b8a8;
}

#uploadView .importer-actions-panel .upload-actions button.secondary,
#uploadView .importer-actions-panel .upload-actions .file-button.secondary {
  color: #fff8ea;
  border-color: rgba(255, 248, 234, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

#uploadView .sheet-preview-panel {
  overflow: hidden;
  border-left: 0;
  background:
    linear-gradient(180deg, #153a34 0, #1d665d 130px, rgba(255, 250, 239, 0.62) 130px);
}

#uploadView .sheet-preview-header {
  margin: -14px -14px 0;
  padding: 13px 14px 10px;
  color: #fff8ea;
}

#uploadView .sheet-preview-header .eyebrow,
#uploadView .sheet-preview-header h2,
#uploadView .sheet-preview-header p {
  color: #fff8ea;
}

#uploadView .sheet-preview-header p {
  color: rgba(255, 248, 234, 0.72);
}

#uploadView .preview-minimize-button {
  color: #fff8ea;
  border-color: rgba(255, 248, 234, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

#uploadView .sheet-preview-actions button,
#uploadView .sheet-preview-actions .button-link {
  color: #0f2f2a;
  border-color: rgba(142, 228, 209, 0.66);
  background: #46b8a8;
}

#uploadView .sheet-preview-actions button.secondary,
#uploadView .sheet-preview-actions .button-link.secondary,
#uploadView .sheet-preview-actions .button-link[aria-disabled="true"] {
  color: #0f2f2a;
  border-color: rgba(255, 248, 234, 0.38);
  background: rgba(255, 248, 234, 0.88);
}

#uploadView .sheet-preview-frame {
  background: #fffaf0;
  border-color: rgba(18, 50, 46, 0.12);
}

#uploadView .library-database-layout.preview-collapsed .preview-rail-toggle {
  background: linear-gradient(180deg, #153a34, #1d665d 58%, #12322e);
}

#uploadView .library-utility-grid-compact {
  display: block;
  margin-top: 8px;
}

#uploadView .compact-library-tools {
  width: fit-content;
  margin-left: auto;
  color: rgba(18, 50, 46, 0.62);
  border: 0;
  background: transparent;
  font-size: 12px;
}

#uploadView .compact-library-tools summary {
  cursor: pointer;
  color: rgba(18, 50, 46, 0.58);
  font-weight: 760;
}

#uploadView .library-tools-content {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 6px;
  color: rgba(18, 50, 46, 0.56);
}

#uploadView .compact-library-tools button {
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
}

@media (max-width: 1280px) {
  #uploadView .sheet-preview-panel {
    border-top: 0;
  }
}

@media (max-width: 720px) {
  #uploadView .library-tools-content {
    display: grid;
    justify-items: end;
  }
}

/* Preview padding and quieter bulk selectors */
#uploadView .sheet-preview-panel {
  gap: 6px;
  padding: 8px;
  background:
    linear-gradient(180deg, #153a34 0, #1d665d 150px, rgba(255, 250, 239, 0.62) 150px);
}

#uploadView .sheet-preview-header {
  margin: -8px -8px 0;
  padding: 10px 12px 7px;
}

#uploadView .sheet-preview-header h2 {
  font-size: 19px;
}

#uploadView .sheet-preview-header p {
  font-size: 12px;
  line-height: 1.25;
}

#uploadView .preview-minimize-button {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
}

#uploadView .sheet-preview-actions {
  gap: 5px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 248, 234, 0.16);
  position: relative;
  z-index: 2;
}

#uploadView .sheet-preview-actions button,
#uploadView .sheet-preview-actions .button-link {
  min-height: 31px;
  padding: 5px 8px;
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#uploadView .sheet-preview-actions #sheetPreviewDetails {
  grid-column: auto;
  min-height: 28px;
}

#uploadView .sheet-preview-frame {
  border-radius: 6px;
  margin-top: 4px;
  position: relative;
  z-index: 1;
  background: #fffaf0;
}

#uploadView .select-col,
#uploadView .music-table th.select-col,
#uploadView .music-table td.select-col {
  width: 34px;
  min-width: 34px;
  padding-inline: 8px 5px;
}

#uploadView .music-table input[type="checkbox"],
#uploadView #selectAllMusicRows {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #1d665d;
  cursor: pointer;
  opacity: 0.46;
}

#uploadView .music-table th.select-col input[type="checkbox"] {
  width: 13px;
  height: 13px;
  opacity: 0.38;
}

#uploadView .music-table tr:hover input[type="checkbox"],
#uploadView .music-table input[type="checkbox"]:checked,
#uploadView #selectAllMusicRows:checked,
#uploadView #selectAllMusicRows:indeterminate {
  opacity: 0.9;
}

#uploadView.view:not(.active),
#spotifyView.view:not(.active) {
  display: none;
}

#uploadView.view.active {
  display: grid;
}

#spotifyView.view.active {
  display: block;
}

/* Spotify matching and playlist flow */
#spotifyView {
  padding-bottom: 126px;
}

#spotifyView .spotify-workspace {
  display: grid;
  gap: 14px;
}

#spotifyView .spotify-flow-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: 16px;
  align-items: stretch;
  padding: 22px;
  color: #fff8ea;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(70, 184, 168, 0.22), rgba(21, 58, 52, 0.96) 54%, rgba(15, 47, 42, 0.98)),
    #153a34;
  box-shadow: 0 18px 48px rgba(21, 58, 52, 0.18);
}

#spotifyView .spotify-flow-copy {
  display: grid;
  gap: 8px;
  align-content: center;
}

#spotifyView .spotify-flow-copy h2 {
  max-width: 840px;
  color: #fff8ea;
  font-size: 31px;
  line-height: 1.08;
}

#spotifyView .spotify-flow-copy p {
  max-width: 820px;
  color: rgba(255, 248, 234, 0.75);
}

#spotifyView .spotify-flow-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#spotifyView .spotify-flow-stats article,
#spotifyView .spotify-flow-step,
#spotifyView .spotify-connect-panel,
#spotifyView .spotify-review-main,
#spotifyView .playlist-panel,
#spotifyView .spotify-workflow-panel {
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 8px;
  background: rgba(251, 245, 232, 0.94);
  box-shadow: 0 16px 44px rgba(77, 63, 40, 0.09);
}

#spotifyView .spotify-flow-stats article {
  display: grid;
  gap: 5px;
  align-content: center;
  min-height: 86px;
  padding: 14px;
  border-color: rgba(255, 248, 234, 0.13);
  background: rgba(0, 0, 0, 0.2);
  box-shadow: none;
}

#spotifyView .spotify-flow-stats strong {
  color: #8ee4d1;
  font-size: 27px;
  line-height: 1;
}

#spotifyView .spotify-flow-stats span {
  color: rgba(255, 248, 234, 0.72);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

#spotifyView .spotify-flow-panel {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 14px;
  align-items: stretch;
}

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

#spotifyView .spotify-flow-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 108px;
  padding: 13px;
}

#spotifyView .spotify-flow-step > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #0f2f2a;
  border-radius: 999px;
  background: #eadfc9;
  font-weight: 900;
}

#spotifyView .spotify-flow-step.done > span {
  background: #8ee4d1;
}

#spotifyView .spotify-flow-step.active {
  border-color: rgba(29, 102, 93, 0.34);
  background: linear-gradient(180deg, rgba(236, 248, 244, 0.94), rgba(251, 245, 232, 0.94));
}

#spotifyView .spotify-flow-step strong,
#spotifyView .spotify-connect-panel h2,
#spotifyView .spotify-review-toolbar h2,
#spotifyView .spotify-panel-heading h2,
#spotifyView .match-card h3 {
  color: var(--earth-ink);
}

#spotifyView .spotify-flow-step p,
#spotifyView .spotify-connect-panel p,
#spotifyView .spotify-review-toolbar p,
#spotifyView .spotify-panel-heading p,
#spotifyView .match-card p {
  color: var(--earth-muted);
}

#spotifyView .spotify-connect-panel {
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 15px;
}

#spotifyView .spotify-grid.compact {
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) repeat(3, auto);
  gap: 8px;
}

#spotifyView .spotify-grid.compact input {
  min-height: 36px;
  color: var(--earth-ink);
  border-color: rgba(31, 111, 99, 0.18);
  background: rgba(255, 253, 247, 0.96);
}

#spotifyView .spotify-grid.compact button,
#spotifyView .spotify-grid.compact .text-link {
  align-self: end;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
}

#spotifyView .spotify-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 14px;
  align-items: start;
}

#spotifyView .spotify-review-main {
  overflow: hidden;
}

#spotifyView .spotify-review-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 15px 16px 12px;
  border-bottom: 1px solid rgba(31, 111, 99, 0.14);
}

#spotifyView .spotify-review-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

#spotifyView .spotify-review-controls select,
#spotifyView .manual-search input {
  min-height: 36px;
  color: var(--earth-ink);
  border-color: rgba(31, 111, 99, 0.18);
  background: rgba(255, 253, 247, 0.96);
}

#spotifyView .spotify-review-controls button {
  min-height: 36px;
  padding: 7px 10px;
}

#spotifyView .spotify-review-summary {
  grid-column: 1 / -1;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

#spotifyView .spotify-review-summary span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 3px 9px;
  color: var(--earth-muted);
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 999px;
  background: rgba(255, 250, 239, 0.82);
  font-size: 12px;
}

#spotifyView .spotify-review-summary strong {
  color: var(--earth-ink);
}

#spotifyView .spotify-review-list {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: calc(100vh - 316px);
  min-height: 520px;
  overflow: auto;
  padding: 12px;
}

#spotifyView .match-card {
  display: grid;
  align-self: start;
  gap: 10px;
  padding: 12px;
  color: var(--earth-ink);
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 8px;
  background: rgba(255, 250, 239, 0.94);
}

#spotifyView .match-card.pairing {
  border-color: rgba(67, 193, 177, 0.44);
  box-shadow: 0 0 0 3px rgba(67, 193, 177, 0.1);
}

#spotifyView .match-card-hero {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

#spotifyView .cover-art-match {
  width: 64px;
  border-radius: 7px;
  box-shadow: 0 12px 24px rgba(13, 48, 42, 0.2);
}

#spotifyView .match-song-identity {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#spotifyView .match-song-identity h3 {
  overflow: hidden;
  font-size: 20px;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#spotifyView .match-song-identity p {
  overflow: hidden;
  color: var(--earth-muted);
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#spotifyView .match-song-links {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 22px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 800;
}

#spotifyView .match-card-hero .badge {
  justify-self: end;
  white-space: nowrap;
}

#spotifyView .match-pairing {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  color: var(--earth-ink);
  border-color: rgba(31, 111, 99, 0.12);
  background: #fffaf0;
}

#spotifyView .match-pairing strong {
  overflow-wrap: anywhere;
}

#spotifyView .match-target-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 7px;
  background: rgba(246, 239, 221, 0.68);
}

#spotifyView .match-target-strip.matched {
  border-color: rgba(32, 185, 98, 0.24);
  background: rgba(226, 248, 234, 0.65);
}

#spotifyView .match-target-strip span {
  color: var(--earth-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

#spotifyView .match-target-strip strong {
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#spotifyView .manual-search {
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

#spotifyView .spotify-search-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 7px;
  color: var(--tea-green);
  background: rgba(226, 248, 234, 0.58);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

#spotifyView .match-card .manual-search {
  align-self: start;
  height: 42px;
}

#spotifyView .match-card .manual-search input,
#spotifyView .match-card .manual-search button {
  height: 42px;
  min-height: 42px;
}

#spotifyView .match-card .manual-search button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
}

#spotifyView .match-card.pairing .manual-search input:disabled,
#spotifyView .match-card.pairing .manual-search button:disabled,
#spotifyView .match-card.pairing .spotify-query-chips button:disabled,
#spotifyView .match-card.pairing .match-actions button:disabled,
#spotifyView .match-card.searching .manual-search input:disabled,
#spotifyView .match-card.searching .manual-search button:disabled,
#spotifyView .match-card.searching .spotify-query-chips button:disabled,
#spotifyView .match-card.searching .match-actions button:disabled {
  border: 1px solid rgba(31, 111, 99, 0.12);
  color: var(--earth-muted);
  background: rgba(246, 239, 221, 0.56);
  box-shadow: none;
  opacity: 0.75;
}

#spotifyView .match-card.searching .manual-search button:disabled {
  color: #0b332d;
  background: #43c1b1;
  opacity: 1;
}

#spotifyView .spotify-query-chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

#spotifyView .spotify-query-chips button {
  min-height: 30px;
  max-width: 100%;
  padding: 4px 10px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
}

#spotifyView .match-actions {
  gap: 8px;
}

#spotifyView .match-actions button {
  min-height: 34px;
  padding: 7px 12px;
}

#spotifyView .candidate-list {
  display: grid;
  gap: 8px;
}

#spotifyView .candidate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 10px;
  color: var(--earth-ink);
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 8px;
  background: #fffaf0;
}

#spotifyView .candidate.pairing {
  border-color: rgba(67, 193, 177, 0.36);
  background: rgba(226, 248, 234, 0.58);
  box-shadow: 0 10px 28px rgba(31, 111, 99, 0.12);
}

#spotifyView .candidate.disabled {
  opacity: 0.62;
}

#spotifyView .candidate-track {
  min-width: 0;
}

#spotifyView .candidate-cover {
  display: grid;
  place-items: center;
  width: 54px;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  background: linear-gradient(135deg, #1f6f63, #43c1b1);
}

#spotifyView .candidate-cover.has-image {
  background: #0f211d;
}

#spotifyView .candidate-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#spotifyView .candidate-track strong,
#spotifyView .candidate-track p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#spotifyView .candidate-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  white-space: nowrap;
}

#spotifyView .candidate-actions button {
  min-height: 38px;
  padding: 8px 15px;
}

#spotifyView .candidate-actions .pair-button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-width: 70px;
}

#spotifyView .candidate-actions .pair-button:disabled {
  color: #0b332d;
  background: #43c1b1;
  box-shadow: none;
  opacity: 1;
}

#spotifyView .pair-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(11, 51, 45, 0.28);
  border-top-color: #0b332d;
  border-radius: 999px;
  animation: spotifyPairSpin 760ms linear infinite;
}

@keyframes spotifyPairSpin {
  to {
    transform: rotate(360deg);
  }
}

#spotifyView .spotify-playlist-sidebar {
  display: grid;
  gap: 14px;
}

#spotifyView .playlist-panel,
#spotifyView .spotify-workflow-panel {
  display: grid;
  gap: 12px;
  padding: 15px;
}

#spotifyView .spotify-panel-heading {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}

#spotifyView .playlist-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

#spotifyView .playlist-actions button {
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  justify-content: center;
  padding: 8px 11px;
  font-size: 13px;
}

#spotifyView .spotify-next-actions {
  display: grid;
  gap: 9px;
}

#spotifyView .spotify-next-action {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(31, 111, 99, 0.13);
  border-radius: 8px;
  color: var(--earth-ink);
  background: rgba(255, 250, 239, 0.9);
  box-shadow: none;
  text-align: left;
  text-decoration: none;
}

#spotifyView .spotify-next-action.primary {
  border-color: rgba(31, 111, 99, 0.2);
  background: linear-gradient(180deg, rgba(226, 248, 234, 0.92), rgba(255, 250, 239, 0.92));
}

#spotifyView .spotify-next-action:hover {
  border-color: rgba(31, 111, 99, 0.24);
  background: rgba(226, 248, 234, 0.58);
  box-shadow: none;
  transform: none;
}

#spotifyView .spotify-next-action span {
  color: var(--earth-ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}

#spotifyView .spotify-next-action small {
  color: var(--earth-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

#spotifyView .progress-bar {
  background: #eadfc9;
}

#spotifyView .progress-bar span {
  background: linear-gradient(90deg, var(--tea-green), #1ed760);
}

@media (max-width: 1260px) {
  #spotifyView .spotify-flow-panel,
  #spotifyView .spotify-review-layout {
    grid-template-columns: 1fr;
  }

  #spotifyView .spotify-review-list {
    max-height: none;
  }
}

@media (max-width: 920px) {
  #spotifyView .spotify-flow-hero,
  #spotifyView .spotify-connect-panel,
  #spotifyView .spotify-review-toolbar {
    grid-template-columns: 1fr;
  }

  #spotifyView .spotify-flow-steps,
  #spotifyView .spotify-grid.compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  #spotifyView .spotify-flow-hero {
    padding: 18px;
  }

  #spotifyView .spotify-flow-copy h2 {
    font-size: 25px;
  }

  #spotifyView .spotify-flow-stats,
  #spotifyView .match-pairing,
  #spotifyView .manual-search,
  #spotifyView .match-card-header {
    grid-template-columns: 1fr;
  }

  #spotifyView .spotify-review-list {
    min-height: 360px;
    padding: 10px;
  }
}

/* Spotify compact top alignment, matched to Sheet Music */
#spotifyView .spotify-workspace {
  gap: 10px;
}

#spotifyView .spotify-connect-workbench {
  overflow: hidden;
  color: #fff8ea;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #153a34 0%, #1d665d 58%, #12322e 100%);
  box-shadow: none;
}

#spotifyView .spotify-connect-summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 9px 14px;
  cursor: pointer;
  list-style: none;
}

#spotifyView .spotify-connect-summary::-webkit-details-marker {
  display: none;
}

#spotifyView .spotify-connect-copy {
  display: flex;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

#spotifyView .spotify-connect-copy .eyebrow,
#spotifyView .spotify-connect-copy strong,
#spotifyView .spotify-connect-copy small {
  color: #fff8ea;
}

#spotifyView .spotify-connect-copy .eyebrow {
  font-size: 11px;
}

#spotifyView .spotify-connect-copy strong {
  font-size: 16px;
  line-height: 1;
}

#spotifyView .spotify-connect-copy small {
  overflow: hidden;
  color: rgba(255, 248, 234, 0.72);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#spotifyView .spotify-connect-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 11px;
  color: #0f2f2a;
  border-radius: 999px;
  background: rgba(142, 228, 209, 0.92);
  font-size: 12px;
  font-weight: 900;
}

#spotifyView .spotify-connect-workbench[open] .closed-label,
#spotifyView .spotify-connect-workbench:not([open]) .open-label {
  display: none;
}

#spotifyView .spotify-connect-body {
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255, 248, 234, 0.16);
  background: rgba(9, 35, 31, 0.34);
}

#spotifyView .spotify-connect-body .spotify-grid.compact {
  grid-template-columns: minmax(220px, 0.9fr) minmax(180px, 0.75fr) repeat(3, auto);
  gap: 8px;
  align-items: end;
}

#spotifyView .spotify-connect-body .spotify-grid.compact input {
  min-height: 32px;
}

#spotifyView .spotify-connect-body .spotify-grid.compact button,
#spotifyView .spotify-connect-body .spotify-grid.compact .text-link {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 12px;
}

#spotifyView .spotify-music-pulse {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(31, 111, 99, 0.1);
  border-radius: 7px;
  background: rgba(255, 253, 247, 0.72);
}

#spotifyView .spotify-pulse-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  min-height: 44px;
  padding: 8px 12px;
  border-right: 1px solid rgba(31, 111, 99, 0.1);
  background: rgba(255, 250, 239, 0.78);
}

#spotifyView .spotify-pulse-card:last-child {
  border-right: 0;
}

#spotifyView .spotify-pulse-card span {
  color: var(--earth-muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

#spotifyView .spotify-pulse-card strong {
  grid-row: span 2;
  align-self: center;
  color: var(--tea-green);
  font-size: 23px;
  line-height: 1;
}

#spotifyView .spotify-pulse-card em {
  min-width: 0;
  overflow: hidden;
  color: var(--earth-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#spotifyView .spotify-review-layout {
  gap: 10px;
}

#spotifyView .spotify-review-toolbar {
  gap: 8px 12px;
  padding: 11px 16px 10px;
}

#spotifyView .spotify-review-toolbar .eyebrow,
#spotifyView .spotify-review-toolbar p,
#spotifyView .spotify-panel-heading .eyebrow,
#spotifyView .spotify-panel-heading p {
  display: none;
}

#spotifyView .spotify-review-toolbar h2 {
  font-size: 18px;
  line-height: 1.1;
}

#spotifyView .spotify-panel-heading h2 {
  font-size: 16px;
  line-height: 1.1;
}

#spotifyView .spotify-review-controls select,
#spotifyView .manual-search input {
  min-height: 34px;
}

#spotifyView .spotify-queue-search {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(320px, 1fr) auto auto;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

#spotifyView .spotify-queue-search-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 11px;
  color: var(--tea-green);
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 7px;
  background: rgba(226, 248, 234, 0.58);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

#spotifyView .spotify-queue-search input {
  min-height: 42px;
  padding: 7px 14px;
  color: var(--earth-ink);
  border: 1px solid rgba(29, 102, 93, 0.28);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(142, 228, 209, 0.08);
  font-size: 15px;
  font-weight: 780;
}

#spotifyView .spotify-queue-search input::placeholder {
  color: #7d8277;
  font-weight: 700;
}

#spotifyView .spotify-queue-search input:focus {
  outline: 2px solid rgba(29, 102, 93, 0.36);
  outline-offset: 1px;
}

#spotifyView .spotify-queue-search button {
  min-height: 42px;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 13px;
}

#spotifyView .spotify-review-controls {
  flex-wrap: nowrap;
}

#spotifyView .spotify-review-controls select {
  width: 178px;
}

#spotifyView .spotify-review-controls button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

#spotifyView .spotify-review-list {
  max-height: calc(100vh - 250px);
}

#spotifyView .match-song-identity h3 {
  font-size: 18px;
}

#spotifyView .match-song-identity p {
  font-size: 13px;
}

#spotifyView .playlist-panel,
#spotifyView .spotify-workflow-panel {
  gap: 10px;
  padding: 12px;
}

@media (max-width: 920px) {
  #spotifyView .spotify-music-pulse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #spotifyView .spotify-review-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  #spotifyView .spotify-review-controls select {
    width: auto;
  }

  #spotifyView .spotify-queue-search {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }

  #spotifyView .spotify-connect-body .spotify-grid.compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  #spotifyView .spotify-connect-copy {
    display: grid;
    gap: 2px;
  }

  #spotifyView .match-card-hero {
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: start;
  }

  #spotifyView .cover-art-match {
    width: 56px;
  }

  #spotifyView .match-card-hero .badge {
    grid-column: 2;
    justify-self: start;
  }

  #spotifyView .match-target-strip,
  #spotifyView .spotify-queue-search,
  #spotifyView .manual-search,
  #spotifyView .candidate {
    grid-template-columns: 1fr;
  }

  #spotifyView .match-card .manual-search {
    height: auto;
  }

  #spotifyView .candidate-actions {
    justify-content: flex-end;
  }
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #18312c;
  background:
    linear-gradient(135deg, rgba(30, 215, 96, 0.42) 0%, rgba(196, 241, 211, 0.52) 34%, rgba(249, 251, 250, 0.96) 72%),
    linear-gradient(180deg, #e8f7ed 0, #f9fbfa 58%, #eef6f1 100%);
}

.auth-panel {
  width: min(100%, 420px);
  padding: 28px;
  border: 1px solid rgba(29, 102, 93, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 60px rgba(16, 35, 48, 0.14);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.auth-brand h1 {
  color: #172621;
  font-size: 24px;
}

.auth-copy {
  margin-bottom: 18px;
}

.auth-copy h2 {
  color: #172621;
  font-size: 22px;
  margin-bottom: 6px;
}

.auth-copy p,
.auth-message {
  color: #5a6f69;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  color: #304942;
}

.auth-form label[hidden],
.auth-form input[hidden] {
  display: none !important;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  border: 1px solid #cbd8d4;
  border-radius: 7px;
  padding: 10px 12px;
  color: #172621;
  background: #ffffff;
}

.auth-form input:focus {
  border-color: #1d665d;
  box-shadow: 0 0 0 3px rgba(29, 102, 93, 0.12);
  outline: none;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  bottom: 7px;
  display: grid;
  place-items: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  color: #47665d;
  background: transparent;
  border: 0;
  border-radius: 7px;
}

.password-toggle:hover,
.password-toggle[aria-pressed="true"] {
  color: #1d665d;
  background: rgba(29, 102, 93, 0.1);
}

.password-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-criteria {
  display: grid;
  gap: 8px;
  margin: -2px 0 2px;
  padding: 12px;
  list-style: none;
  border: 1px solid rgba(29, 102, 93, 0.14);
  border-radius: 8px;
  background: rgba(235, 248, 240, 0.7);
}

.auth-criteria[hidden] {
  display: none;
}

.auth-criteria li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #5d716a;
  font-size: 13px;
}

.auth-criteria li[hidden] {
  display: none;
}

.auth-criteria li::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 1px solid #9eb2ab;
  border-radius: 50%;
  background: #ffffff;
}

.auth-criteria li.met {
  color: #1d665d;
}

.auth-criteria li.met::before {
  border-color: #1d665d;
  background: #1d665d;
  box-shadow: inset 0 0 0 2px #ffffff;
}

.auth-form > button {
  min-height: 44px;
  color: #ffffff;
  background: #1d665d;
  border-color: #1d665d;
}

.auth-form > button:hover {
  background: #17534d;
}

.auth-form > button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.auth-message {
  min-height: 22px;
  margin-top: 12px;
  font-size: 14px;
}

.auth-mode-toggle {
  width: 100%;
  margin-top: 8px;
  color: #1d665d;
  background: transparent;
  border-color: transparent;
}

.auth-mode-toggle:hover {
  color: #153f3a;
  background: rgba(29, 102, 93, 0.08);
}

body[data-auth="checking"] .app-shell,
body[data-auth="signed-out"] .app-shell {
  display: none;
}

body[data-auth="signed-in"] .auth-screen {
  display: none;
}

#signOutButton {
  min-height: 34px;
}

/* UI consolidation: laptop-first application shell */
:root {
  --app-bg: #edf2ee;
  --app-rail: #123a34;
  --app-rail-soft: rgba(255, 248, 234, 0.07);
  --app-surface: #fffdf7;
  --app-panel: #f7f4ea;
  --app-line: rgba(28, 89, 80, 0.14);
  --app-line-strong: rgba(28, 89, 80, 0.22);
  --app-muted: #66736b;
  --app-shadow: 0 14px 34px rgba(35, 55, 42, 0.08);
}

body {
  background:
    linear-gradient(180deg, rgba(214, 233, 220, 0.72), rgba(237, 242, 238, 0.96) 300px),
    var(--app-bg);
}

.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
  background: var(--app-bg);
}

.left-rail {
  align-content: start;
  gap: 12px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(25, 82, 74, 0.96), var(--app-rail)),
    var(--app-rail);
}

.left-rail .brand {
  min-height: 66px;
  padding: 10px;
  border: 1px solid rgba(255, 248, 234, 0.08);
  border-radius: 8px;
  background: var(--app-rail-soft);
}

.steps {
  display: grid;
  gap: 6px;
}

.step {
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 8px;
}

.step.active {
  background: rgba(142, 228, 209, 0.18);
}

.main-shell {
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.9), rgba(245, 242, 233, 0.92) 420px),
    var(--app-panel);
}

.topbar {
  min-height: 86px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--app-line);
  background: rgba(255, 253, 247, 0.9);
  backdrop-filter: blur(14px);
}

.topbar h2 {
  font-size: 27px;
  letter-spacing: 0;
}

.topbar #flowSummary,
.page-kicker {
  color: var(--app-muted);
}

.main-shell main {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 14px 24px 110px;
}

#practiceView .practice-studio-workspace,
#uploadView,
#spotifyView .spotify-workspace {
  gap: 12px;
}

#practiceView .practice-planner-workbench,
#uploadView .importer-workbench,
#spotifyView .spotify-connect-workbench {
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(18, 58, 52, 0.1);
}

#practiceView .practice-studio-pulse,
#uploadView .sheet-music-pulse,
#spotifyView .spotify-music-pulse {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

#practiceView .practice-pulse-card,
#uploadView .sheet-pulse-card,
#spotifyView .spotify-pulse-card {
  min-height: 56px;
  padding: 10px 14px;
  border-right: 1px solid var(--app-line);
  border-radius: 0;
  background: rgba(255, 253, 247, 0.84);
  box-shadow: none;
}

#practiceView .practice-pulse-card:last-child,
#uploadView .sheet-pulse-card:last-child,
#spotifyView .spotify-pulse-card:last-child {
  border-right: 0;
}

#practiceView .practice-pulse-card strong,
#uploadView .sheet-pulse-card strong,
#spotifyView .spotify-pulse-card strong {
  color: var(--tea-green);
  font-size: 24px;
}

#practiceView .practice-session-layout {
  grid-template-columns: minmax(560px, var(--practice-left, 56%)) 10px minmax(390px, 1fr);
  gap: 0;
  align-items: start;
}

#practiceView .practice-splitter {
  width: 10px;
  min-height: min(760px, calc(100vh - 214px));
  border-inline: 0;
  background: linear-gradient(180deg, rgba(198, 221, 207, 0.62), rgba(255, 253, 247, 0.2));
}

#practiceView .practice-studio-session,
#practiceView .practice-picker-side,
#uploadView .music-library-panel,
#uploadView .sheet-preview-panel,
#spotifyView .spotify-review-main,
#spotifyView .playlist-panel,
#spotifyView .spotify-workflow-panel {
  border: 1px solid var(--app-line);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

#practiceView .practice-studio-session {
  min-height: min(760px, calc(100vh - 214px));
  border-radius: 8px 0 0 8px;
  box-shadow: var(--app-shadow);
}

#practiceView .practice-picker-side {
  top: 100px;
  min-height: min(760px, calc(100vh - 214px));
  border-radius: 0 8px 8px 0;
}

#practiceView .practice-session-title,
#practiceView .practice-picker-side .section-title,
#uploadView .music-library-header,
#uploadView .sheet-preview-header,
#spotifyView .spotify-review-toolbar,
#spotifyView .spotify-panel-heading {
  border-bottom-color: var(--app-line);
  background: rgba(255, 253, 247, 0.72);
}

#practiceView .practice-session-title h2,
#practiceView .practice-picker-side .section-title h2,
#uploadView .music-library-header h2,
#uploadView .sheet-preview-header h2,
#spotifyView .spotify-review-toolbar h2,
#spotifyView .spotify-panel-heading h2 {
  font-size: 20px;
  line-height: 1.12;
}

#practiceView .practice-picker-side .song-card-grid {
  grid-template-columns: 1fr;
  max-height: calc(100vh - 404px);
}

#practiceView .practice-picker-side .song-card {
  min-height: 138px;
  border-color: var(--app-line);
}

#practiceView .practice-picker-side .song-card-main {
  gap: 16px;
}

#practiceView .practice-session-box .session-list {
  min-height: 330px;
  max-height: calc(100vh - 534px);
  overflow: auto;
}

#uploadView .library-database-layout,
#spotifyView .spotify-review-layout {
  gap: 12px;
}

#uploadView .library-search-dock,
#spotifyView .spotify-review-toolbar {
  padding: 13px 16px;
}

#uploadView .music-table-wrap,
#spotifyView .spotify-review-list {
  max-height: calc(100vh - 286px);
}

#uploadView .sheet-preview-panel {
  grid-template-rows: auto auto minmax(360px, 1fr);
}

#uploadView .sheet-preview-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  align-self: start;
  gap: 6px;
  min-height: 38px;
  height: auto;
  padding: 0 0 8px;
  border-bottom: 1px solid rgba(31, 111, 99, 0.12);
}

#uploadView .sheet-preview-actions button,
#uploadView .sheet-preview-actions .button-link {
  width: 100%;
  min-height: 34px;
  height: 34px;
  padding: 6px 9px;
  writing-mode: horizontal-tb;
  transform: none;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

#uploadView .sheet-preview-actions .button-link,
#uploadView .sheet-preview-actions #sheetPreviewDetails {
  grid-column: auto;
}

#uploadView .button-link:hover {
  writing-mode: horizontal-tb;
  transform: none;
}

.app-shell.rail-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.app-shell.rail-collapsed .left-rail {
  padding-inline: 10px;
}

.app-shell.rail-collapsed .brand {
  justify-content: center;
}

@media (max-width: 1240px) {
  #practiceView .practice-session-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #practiceView .practice-splitter {
    display: none;
  }

  #practiceView .practice-studio-session,
  #practiceView .practice-picker-side {
    position: static;
    min-height: 0;
    border-radius: 8px;
  }

  #practiceView .practice-session-box .session-list,
  #practiceView .practice-picker-side .song-card-grid,
  #uploadView .music-table-wrap,
  #spotifyView .spotify-review-list {
    max-height: none;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .left-rail {
    position: static;
    grid-template-columns: auto 1fr;
    align-items: center;
  }

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

  .main-shell main {
    padding-inline: 14px;
  }
}

@media (max-width: 640px) {
  .auth-screen {
    padding: 16px;
    align-items: stretch;
  }

  .auth-panel {
    align-self: center;
    padding: 22px;
  }

  .auth-brand h1 {
    font-size: 21px;
  }
}

/* Profile: musician stats dashboard */
#profileView {
  padding-bottom: 120px;
  color: var(--earth-ink);
}

#profileView .profile-workspace {
  display: grid;
  gap: 12px;
}

#profileView .profile-summary-panel,
#profileView .profile-metrics-strip,
#profileView .profile-panel {
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

#profileView .profile-summary-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 310px);
  gap: 12px;
  align-items: stretch;
  margin: 0;
  padding: 14px;
}

#profileView .profile-identity-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-width: 0;
}

#profileView .profile-avatar {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  color: #fff8ea;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(70, 184, 168, 0.92), rgba(18, 58, 52, 0.96)),
    var(--app-rail);
  box-shadow: 0 14px 30px rgba(18, 58, 52, 0.18);
  font-size: 24px;
  font-weight: 900;
}

#profileView .profile-hero-copy {
  display: grid;
  gap: 6px;
  align-content: center;
  min-width: 0;
}

#profileView .profile-hero h2,
#profileView .profile-panel h2 {
  color: var(--earth-ink);
  line-height: 1.12;
  letter-spacing: 0;
}

#profileView .profile-hero h2 {
  overflow-wrap: anywhere;
  font-size: 30px;
}

#profileView .profile-hero p,
#profileView .profile-section-title p,
#profileView .profile-song-item small,
#profileView .profile-song-item em,
#profileView .profile-session-item small,
#profileView .profile-social-seed p,
#profileView .insight-item p,
#profileView .style-row span {
  color: var(--app-muted);
}

#profileView .profile-tag-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding-top: 2px;
}

#profileView .profile-tag-row span,
#profileView .profile-best-day {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  color: var(--tea-green);
  border: 1px solid rgba(31, 111, 99, 0.13);
  border-radius: 999px;
  background: rgba(226, 248, 234, 0.68);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

#profileView .profile-rhythm-card {
  display: grid;
  gap: 7px;
  align-content: center;
  min-height: 132px;
  padding: 18px;
  color: #fff8ea;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(70, 184, 168, 0.22), rgba(18, 58, 52, 0.98)),
    var(--app-rail);
  box-shadow: none;
}

#profileView .profile-rhythm-card span,
#profileView .profile-rhythm-card p {
  color: rgba(255, 248, 234, 0.76);
}

#profileView .profile-rhythm-card strong {
  color: #8ee4d1;
  font-size: 42px;
  line-height: 1;
}

#profileView .profile-metrics-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  margin: 0;
}

#profileView .profile-stat {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 12px 14px;
  border: 0;
  border-right: 1px solid var(--app-line);
  border-radius: 0;
  background: rgba(255, 253, 247, 0.82);
  box-shadow: none;
}

#profileView .profile-stat:last-child {
  border-right: 0;
}

#profileView .profile-stat span {
  overflow: hidden;
  color: var(--app-muted);
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

#profileView .profile-stat strong {
  overflow: hidden;
  color: var(--tea-green);
  font-size: 24px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#profileView .profile-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 370px);
  gap: 12px;
  align-items: start;
}

#profileView .profile-main,
#profileView .profile-sidebar {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding-bottom: 0;
}

#profileView .profile-panel {
  gap: 12px;
  margin: 0;
  padding: 14px;
}

#profileView .profile-section-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
}

#profileView .profile-section-title > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

#profileView .profile-section-title h2 {
  font-size: 20px;
}

#profileView .profile-section-title .eyebrow,
#profileView .eyebrow {
  color: var(--tea-green);
}

#profileView .profile-activity-panel {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.96), rgba(247, 244, 234, 0.94)),
    var(--app-surface);
}

#profileView .profile-activity-grid {
  display: grid;
  grid-template-columns: repeat(28, minmax(0, 1fr));
  gap: 4px;
  padding: 2px 0;
}

#profileView .profile-activity-cell {
  aspect-ratio: 1;
  min-width: 8px;
  border: 1px solid rgba(31, 111, 99, 0.08);
  border-radius: 3px;
  background: #e8e2d4;
}

#profileView .profile-activity-cell.level-1 {
  background: #cde9d8;
}

#profileView .profile-activity-cell.level-2 {
  background: #8dd7b0;
}

#profileView .profile-activity-cell.level-3 {
  background: #48b889;
}

#profileView .profile-activity-cell.level-4 {
  background: #1f6f63;
}

#profileView .consistency-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  min-height: 116px;
  padding-top: 6px;
}

#profileView .consistency-day {
  display: grid;
  gap: 5px;
  min-width: 0;
  text-align: center;
}

#profileView .bar-track {
  display: flex;
  align-items: end;
  justify-content: center;
  height: 72px;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(234, 223, 201, 0.8);
}

#profileView .bar-track span {
  width: 100%;
  min-height: 8px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, var(--turquoise), var(--tea-green));
}

#profileView .consistency-day strong,
#profileView .consistency-day small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#profileView .consistency-day strong {
  color: var(--earth-ink);
  font-size: 12px;
}

#profileView .consistency-day small {
  color: var(--app-muted);
  font-size: 11px;
}

#profileView .profile-feature {
  overflow: hidden;
}

#profileView .profile-carousel {
  display: grid;
  grid-auto-columns: minmax(350px, 410px);
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scroll-snap-type: x mandatory;
}

#profileView .favorite-song-card {
  min-height: 184px;
  padding: 14px;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.84);
  box-shadow: none;
  scroll-snap-align: start;
}

#profileView .favorite-song-copy span {
  color: var(--tea-green);
}

#profileView .favorite-song-copy h3,
#profileView .favorite-song-copy p,
#profileView .favorite-song-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
}

#profileView .favorite-song-copy h3 {
  color: var(--earth-ink);
}

#profileView .favorite-song-copy p,
#profileView .favorite-song-copy small {
  color: var(--app-muted);
}

#profileView .profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#profileView .profile-song-list,
#profileView .profile-session-feed,
#profileView .profile-social-seeds,
#profileView .insight-list,
#profileView .style-breakdown {
  display: grid;
  gap: 8px;
}

#profileView .profile-song-item,
#profileView .profile-session-item,
#profileView .profile-social-seed,
#profileView .insight-item {
  min-height: 62px;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.78);
  box-shadow: none;
}

#profileView .profile-song-item,
#profileView .profile-session-item {
  width: 100%;
  color: var(--earth-ink);
  text-align: left;
  white-space: normal;
}

#profileView .profile-song-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) minmax(118px, auto);
  gap: 10px;
  align-items: center;
  padding: 9px;
}

#profileView .profile-song-item:hover,
#profileView .profile-song-item:focus-visible,
#profileView .profile-session-item:hover,
#profileView .profile-session-item:focus-visible {
  border-color: var(--app-line-strong);
  background: rgba(226, 248, 234, 0.62);
  box-shadow: none;
  transform: none;
}

#profileView .profile-song-item .cover-art-xs {
  width: 52px;
  border-radius: 7px;
}

#profileView .profile-song-item span,
#profileView .profile-song-item strong,
#profileView .profile-song-item small,
#profileView .profile-song-item em {
  min-width: 0;
}

#profileView .profile-song-item strong,
#profileView .profile-song-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#profileView .profile-song-item strong,
#profileView .profile-session-item strong,
#profileView .profile-social-seed strong,
#profileView .insight-item strong,
#profileView .style-row strong {
  color: var(--earth-ink);
}

#profileView .profile-song-item em {
  max-width: 190px;
  justify-self: end;
  overflow: hidden;
  font-style: normal;
  font-size: 12px;
  font-weight: 760;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#profileView .profile-session-item {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
}

#profileView .profile-session-item span,
#profileView .profile-social-seed span,
#profileView .insight-item span {
  color: var(--tea-green);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

#profileView .profile-session-item strong,
#profileView .profile-session-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#profileView .profile-social-seed,
#profileView .insight-item {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
}

#profileView .profile-social-seed strong,
#profileView .insight-item strong {
  overflow-wrap: anywhere;
  line-height: 1.16;
}

#profileView .profile-empty-card,
#profileView .profile-empty-feature {
  display: grid;
  gap: 5px;
  min-height: 128px;
  place-content: center;
  padding: 16px;
  border: 1px dashed var(--app-line-strong);
  border-radius: 8px;
  color: var(--earth-ink);
  background: rgba(255, 253, 247, 0.72);
  text-align: center;
}

#profileView .profile-empty-card p,
#profileView .profile-empty-feature p {
  color: var(--app-muted);
}

#profileView .style-row {
  display: grid;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--app-line);
}

#profileView .style-row:last-child {
  border-bottom: 0;
}

#profileView .style-row > div:first-child {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
}

#profileView .style-meter {
  height: 7px;
  border-radius: 999px;
  background: rgba(234, 223, 201, 0.9);
}

#profileView .style-meter span {
  background: linear-gradient(90deg, var(--tea-green), var(--turquoise));
}

@media (max-width: 1180px) {
  #profileView .profile-dashboard-grid,
  #profileView .profile-summary-panel {
    grid-template-columns: 1fr;
  }

  #profileView .profile-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  #profileView .profile-metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #profileView .profile-stat:nth-child(2n) {
    border-right: 0;
  }

  #profileView .profile-stat {
    border-bottom: 1px solid var(--app-line);
  }

  #profileView .profile-grid,
  #profileView .profile-sidebar {
    grid-template-columns: 1fr;
  }

  #profileView .profile-activity-grid {
    grid-template-columns: repeat(21, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #profileView .profile-summary-panel {
    padding: 12px;
  }

  #profileView .profile-identity-card {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
  }

  #profileView .profile-avatar {
    width: 58px;
    height: 58px;
    font-size: 18px;
  }

  #profileView .profile-hero h2 {
    font-size: 24px;
  }

  #profileView .profile-rhythm-card strong {
    font-size: 36px;
  }

  #profileView .profile-section-title {
    display: grid;
  }

  #profileView .profile-best-day {
    justify-self: start;
  }

  #profileView .profile-activity-grid {
    grid-template-columns: repeat(14, minmax(0, 1fr));
  }

  #profileView .profile-carousel {
    grid-auto-columns: minmax(286px, 84vw);
  }

  #profileView .favorite-song-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  #profileView .favorite-cover-button,
  #profileView .cover-art-favorite {
    width: 96px;
  }

  #profileView .profile-song-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  #profileView .profile-song-item em {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
    text-align: left;
  }
}

/* Profile repertoire pulse: reduce card noise, add sleeker movement */
#profileView .profile-repertoire-panel {
  position: relative;
  overflow: hidden;
  gap: 0;
  padding: 0;
  border-color: rgba(31, 111, 99, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.96) 0%, rgba(238, 247, 236, 0.92) 44%, rgba(223, 239, 229, 0.96) 100%),
    var(--app-surface);
}

#profileView .profile-repertoire-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 54%, rgba(70, 184, 168, 0.16) 54% 55%, transparent 55%),
    repeating-linear-gradient(90deg, transparent 0 52px, rgba(31, 111, 99, 0.035) 52px 53px, transparent 53px 84px);
  opacity: 0.9;
}

#profileView .profile-repertoire-panel > * {
  position: relative;
  z-index: 1;
}

#profileView .profile-repertoire-title {
  padding: 18px 20px 4px;
}

#profileView .profile-repertoire-title h2 {
  font-size: 26px;
}

#profileView .profile-repertoire-title > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: #0f3d36;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 999px;
  background: rgba(226, 248, 234, 0.66);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

#profileView .profile-repertoire-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: 0;
  align-items: stretch;
}

#profileView .profile-rotation-feature {
  display: grid;
  grid-template-columns: minmax(170px, 0.34fr) minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  padding: 18px 20px 20px;
  border-right: 1px solid rgba(31, 111, 99, 0.12);
}

#profileView .profile-rotation-copy {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: end;
  min-height: 270px;
  overflow: hidden;
  padding: 18px;
  color: #fff8ea;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(18, 58, 52, 0.98), rgba(31, 111, 99, 0.92) 54%, rgba(70, 184, 168, 0.92)),
    var(--app-rail);
}

#profileView .profile-rotation-copy::before {
  content: "";
  position: absolute;
  inset: 18px 18px auto 18px;
  height: 92px;
  border-top: 1px solid rgba(255, 248, 234, 0.22);
  border-bottom: 1px solid rgba(255, 248, 234, 0.12);
  transform: rotate(-8deg);
}

#profileView .profile-rotation-copy span,
#profileView .profile-rotation-copy strong {
  position: relative;
  z-index: 1;
}

#profileView .profile-rotation-copy span {
  color: rgba(255, 248, 234, 0.68);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

#profileView .profile-rotation-copy strong {
  max-width: 220px;
  color: #fff8ea;
  font-size: 24px;
  line-height: 1.04;
}

#profileView .profile-song-list-feature {
  align-content: start;
  gap: 10px;
}

#profileView .profile-song-list-feature .profile-song-item {
  grid-template-columns: 58px minmax(0, 1fr) auto;
  min-height: 72px;
  padding: 10px 12px;
  border-color: rgba(31, 111, 99, 0.12);
  background: rgba(255, 253, 247, 0.72);
  backdrop-filter: blur(10px);
}

#profileView .profile-song-list-feature .profile-song-item:first-child {
  min-height: 92px;
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.92), rgba(226, 248, 234, 0.74)),
    rgba(255, 253, 247, 0.84);
  box-shadow: 0 16px 32px rgba(31, 111, 99, 0.12);
}

#profileView .profile-song-list-feature .profile-song-item .cover-art-xs {
  width: 58px;
}

#profileView .profile-song-list-feature .profile-song-item strong {
  font-size: 17px;
}

#profileView .profile-repertoire-stack {
  display: grid;
  align-content: start;
}

#profileView .profile-compact-panel {
  display: grid;
  grid-template-columns: minmax(104px, 0.26fr) minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  padding: 17px 20px;
  border-bottom: 1px solid rgba(31, 111, 99, 0.11);
}

#profileView .profile-compact-panel:last-child {
  border-bottom: 0;
}

#profileView .profile-compact-heading {
  display: grid;
  gap: 4px;
  align-content: start;
}

#profileView .profile-compact-heading span {
  color: var(--tea-green);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

#profileView .profile-compact-heading strong {
  color: var(--earth-ink);
  font-size: 18px;
  line-height: 1.08;
}

#profileView .profile-song-list-compact {
  gap: 7px;
}

#profileView .profile-song-list-compact .profile-song-item {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 9px;
  min-height: 52px;
  padding: 7px 8px;
  border-color: transparent;
  background: rgba(255, 253, 247, 0.54);
}

#profileView .profile-song-list-compact .profile-song-item:hover,
#profileView .profile-song-list-compact .profile-song-item:focus-visible {
  border-color: rgba(31, 111, 99, 0.14);
  background: rgba(255, 253, 247, 0.84);
}

#profileView .profile-song-list-compact .profile-song-item .cover-art-xs {
  width: 42px;
  border-radius: 6px;
}

#profileView .profile-song-list-compact .profile-song-item strong {
  font-size: 14px;
}

#profileView .profile-song-list-compact .profile-song-item small {
  font-size: 12px;
}

#profileView .profile-song-list-compact .profile-song-item em,
#profileView .profile-song-list-feature .profile-song-item em {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  max-width: 128px;
  min-height: 26px;
  padding: 4px 9px;
  color: var(--tea-green);
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 999px;
  background: rgba(226, 248, 234, 0.7);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

#profileView .profile-song-list-compact .meta,
#profileView .profile-song-list-feature .meta {
  align-self: center;
  padding: 10px 0;
  color: var(--app-muted);
  font-weight: 760;
}

@media (max-width: 1500px) {
  #profileView .profile-repertoire-stage,
  #profileView .profile-rotation-feature {
    grid-template-columns: 1fr;
  }

  #profileView .profile-rotation-feature {
    border-right: 0;
    border-bottom: 1px solid rgba(31, 111, 99, 0.11);
  }

  #profileView .profile-rotation-copy {
    min-height: 160px;
  }
}

@media (max-width: 760px) {
  #profileView .profile-repertoire-title {
    padding: 16px 14px 2px;
  }

  #profileView .profile-repertoire-stage,
  #profileView .profile-compact-panel {
    grid-template-columns: 1fr;
  }

  #profileView .profile-rotation-feature,
  #profileView .profile-compact-panel {
    padding: 14px;
  }

  #profileView .profile-rotation-copy {
    min-height: 132px;
  }

  #profileView .profile-song-list-feature .profile-song-item,
  #profileView .profile-song-list-compact .profile-song-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  #profileView .profile-song-list-feature .profile-song-item em,
  #profileView .profile-song-list-compact .profile-song-item em {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
  }
}

/* Studio console simplification pass */
:root {
  --studio-gold: #c79a43;
  --studio-gold-soft: rgba(199, 154, 67, 0.18);
  --studio-ink: #102f2b;
  --studio-panel: #fffdf7;
  --studio-wash: #f3efe4;
}

.topbar {
  position: relative;
  background:
    linear-gradient(90deg, rgba(255, 253, 247, 0.96), rgba(243, 239, 228, 0.9)),
    var(--studio-panel);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(199, 154, 67, 0.72), transparent);
}

#practiceView .practice-planner-summary,
#uploadView .importer-summary,
#spotifyView .spotify-connect-summary {
  min-height: 62px;
  padding: 12px 16px;
}

#practiceView .practice-planner-copy small,
#uploadView .importer-summary-copy small,
#spotifyView .spotify-connect-copy small {
  max-width: 520px;
}

#practiceView .practice-planner-body,
#uploadView .importer-body,
#spotifyView .spotify-connect-body {
  border-top-color: rgba(199, 154, 67, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.98), rgba(243, 239, 228, 0.82)),
    var(--studio-panel);
}

#practiceView .practice-session-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#practiceView .session-actions button:first-child,
#uploadView .upload-actions #uploadButton,
#spotifyView #connectSpotify,
#spotifyView #createPlaylists {
  color: #082f2a;
  border-color: rgba(67, 193, 177, 0.26);
  background:
    linear-gradient(135deg, #43c1b1, #8ee4d1),
    var(--turquoise);
  box-shadow: 0 10px 24px rgba(31, 111, 99, 0.14);
}

#practiceView .session-actions .secondary,
#uploadView .upload-actions .secondary,
#spotifyView .spotify-grid.compact .secondary,
#spotifyView .spotify-queue-search .secondary,
#uploadView #clearMusicTableFilters,
#uploadView #toggleMusicEditMode {
  color: var(--studio-ink);
  border-color: rgba(31, 111, 99, 0.13);
  background: rgba(255, 253, 247, 0.78);
  box-shadow: none;
}

#profileView .profile-summary-panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(199, 154, 67, 0.2);
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.98), rgba(241, 234, 216, 0.88)),
    var(--studio-panel);
}

#profileView .profile-summary-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(120deg, transparent 0 34px, rgba(199, 154, 67, 0.08) 34px 35px, transparent 35px 70px),
    linear-gradient(90deg, rgba(67, 193, 177, 0.08), transparent 44%);
}

#profileView .profile-summary-panel > * {
  position: relative;
  z-index: 1;
}

#profileView .profile-avatar {
  color: #fff7df;
  background:
    linear-gradient(145deg, rgba(18, 58, 52, 0.98), rgba(31, 111, 99, 0.94) 56%, rgba(199, 154, 67, 0.72)),
    var(--app-rail);
}

#profileView .profile-rhythm-card {
  background:
    linear-gradient(145deg, rgba(16, 47, 43, 0.98), rgba(31, 111, 99, 0.95) 58%, rgba(199, 154, 67, 0.64)),
    var(--app-rail);
}

#profileView .profile-rhythm-card strong {
  color: #f0cf83;
}

#profileView .profile-metrics-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-color: rgba(199, 154, 67, 0.16);
}

#profileView .profile-stat {
  min-height: 70px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.92), rgba(251, 247, 237, 0.88));
}

#profileView .profile-stat strong {
  color: var(--studio-ink);
}

#profileView .profile-stat:nth-child(4) {
  border-right: 0;
}

#profileView .profile-dashboard-grid {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 350px);
}

#profileView .profile-repertoire-panel {
  border-color: rgba(199, 154, 67, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.98) 0%, rgba(239, 246, 235, 0.92) 48%, rgba(241, 233, 214, 0.94) 100%),
    var(--studio-panel);
}

#profileView .profile-repertoire-panel::before {
  background:
    repeating-linear-gradient(100deg, transparent 0 54px, rgba(199, 154, 67, 0.11) 54px 55px, transparent 55px 104px),
    linear-gradient(115deg, transparent 0 56%, rgba(67, 193, 177, 0.14) 56% 57%, transparent 57%);
}

#profileView .profile-repertoire-title > span,
#profileView .profile-song-list-compact .profile-song-item em,
#profileView .profile-song-list-feature .profile-song-item em {
  color: #6d501b;
  border-color: rgba(199, 154, 67, 0.22);
  background: rgba(255, 245, 217, 0.72);
}

#profileView .profile-rotation-copy {
  background:
    linear-gradient(145deg, rgba(16, 47, 43, 0.98), rgba(31, 111, 99, 0.94) 58%, rgba(199, 154, 67, 0.76)),
    var(--app-rail);
}

#profileView .profile-rotation-copy::before {
  border-top-color: rgba(240, 207, 131, 0.38);
  border-bottom-color: rgba(240, 207, 131, 0.2);
}

#profileView .profile-tools-card {
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.94), rgba(246, 239, 221, 0.78)),
    var(--studio-panel);
}

#profileView .profile-advanced-tools {
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.72);
}

#profileView .profile-advanced-tools summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--studio-ink);
  cursor: pointer;
  font-weight: 900;
}

#profileView .profile-tools-actions {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

#profileView .profile-tools-actions button {
  width: 100%;
  min-height: 36px;
  justify-content: center;
}

#profileView .profile-tools-actions small {
  display: block;
  margin-top: -3px;
  color: var(--earth-muted);
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
}

#uploadView .library-search-dock {
  display: grid;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.94), rgba(247, 244, 234, 0.9)),
    var(--studio-panel);
}

#uploadView .music-table-tools {
  grid-template-columns: minmax(260px, 1.9fr) repeat(3, minmax(140px, 0.7fr)) auto;
  gap: 8px;
}

#uploadView .music-table-tools input,
#uploadView .music-table-tools select {
  min-height: 40px;
}

#uploadView .library-search-shortcuts {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}

#uploadView .library-filter-chip {
  flex: 0 0 auto;
}

#uploadView .music-library-header {
  align-items: center;
}

#uploadView .music-library-header > div:first-child p:not(.eyebrow) {
  max-width: 520px;
}

#uploadView .music-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

#uploadView .music-view-toggle {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  padding: 3px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.78);
}

#uploadView .music-view-toggle button {
  min-height: 30px;
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  color: rgba(18, 50, 46, 0.68);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
}

#uploadView .music-view-toggle button.active {
  color: #0f3f38;
  background: var(--tea-green-soft);
}

#uploadView .music-view-toggle button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

#uploadView #toggleMusicEditMode[aria-pressed="true"] {
  color: #082f2a;
  border-color: rgba(67, 193, 177, 0.26);
  background: linear-gradient(135deg, #43c1b1, #8ee4d1);
}

#uploadView .library-database-layout:not(.music-edit-mode) .bulk-edit-bar {
  display: none;
}

#uploadView .library-database-layout.music-edit-mode .bulk-edit-bar {
  display: grid;
}

#uploadView .library-database-layout:not(.music-edit-mode) .select-col {
  display: none;
}

#uploadView .library-database-layout:not(.music-edit-mode) .tags-col,
#uploadView .library-database-layout:not(.music-edit-mode) .tags-cell,
#uploadView .library-database-layout:not(.music-edit-mode) .activity-col,
#uploadView .library-database-layout:not(.music-edit-mode) .activity-cell,
#uploadView .library-database-layout:not(.music-edit-mode) .music-table th:nth-child(9),
#uploadView .library-database-layout:not(.music-edit-mode) .spotify-cell,
#uploadView .library-database-layout:not(.music-edit-mode) .table-actions-heading,
#uploadView .library-database-layout:not(.music-edit-mode) .table-actions-cell {
  display: none;
}

#uploadView .library-database-layout:not(.music-edit-mode) .music-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

#uploadView .library-database-layout:not(.music-edit-mode) .music-table th,
#uploadView .library-database-layout:not(.music-edit-mode) .music-table td {
  min-width: 0;
}

#uploadView .library-database-layout:not(.music-edit-mode) .music-table th:nth-child(2),
#uploadView .library-database-layout:not(.music-edit-mode) .music-table td:nth-child(2) {
  width: 38%;
}

#uploadView .library-database-layout:not(.music-edit-mode) .music-table th:nth-child(3),
#uploadView .library-database-layout:not(.music-edit-mode) .music-table td:nth-child(3) {
  width: 18%;
}

#uploadView .library-database-layout:not(.music-edit-mode) .music-table th:nth-child(4),
#uploadView .library-database-layout:not(.music-edit-mode) .music-table td:nth-child(4) {
  width: 16%;
}

#uploadView .library-database-layout:not(.music-edit-mode) .music-table th:nth-child(5),
#uploadView .library-database-layout:not(.music-edit-mode) .music-table td:nth-child(5) {
  width: 18%;
}

#uploadView .library-database-layout:not(.music-edit-mode) .music-table th:nth-child(8),
#uploadView .library-database-layout:not(.music-edit-mode) .music-table td:nth-child(8) {
  width: 10%;
}

#uploadView .song-title-stack strong,
#uploadView .table-artist-text {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--studio-ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

#uploadView .table-muted {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 760;
}

#uploadView .library-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: 100%;
  padding: 4px 9px;
  overflow: hidden;
  color: var(--tea-green);
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 999px;
  background: rgba(226, 248, 234, 0.68);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#uploadView .library-status-pill.muted {
  color: #6d501b;
  border-color: rgba(199, 154, 67, 0.2);
  background: rgba(255, 245, 217, 0.68);
}

#uploadView .music-table tr.previewed {
  background:
    linear-gradient(90deg, rgba(255, 245, 217, 0.46), rgba(226, 248, 234, 0.42));
}

#uploadView .sheet-preview-panel {
  border-color: rgba(199, 154, 67, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.96), rgba(246, 239, 221, 0.82)),
    var(--studio-panel);
}

#uploadView .sheet-preview-actions {
  grid-template-columns: 1fr 1fr auto;
}

#uploadView .sheet-preview-actions #sheetPreviewSpread {
  color: #082f2a;
  border-color: rgba(67, 193, 177, 0.26);
  background: linear-gradient(135deg, #43c1b1, #8ee4d1);
}

#uploadView .sheet-preview-actions #sheetPreviewSpread:disabled {
  color: var(--app-muted);
  border-color: rgba(31, 111, 99, 0.1);
  background: rgba(246, 239, 221, 0.68);
  box-shadow: none;
}

#spotifyView .spotify-connect-workbench {
  border-color: rgba(199, 154, 67, 0.18);
}

#spotifyView .spotify-grid.compact {
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) repeat(2, auto);
}

#spotifyView .spotify-grid.compact .text-link {
  grid-column: 1 / -1;
  justify-self: start;
}

#spotifyView #saveClientId {
  color: var(--studio-ink);
  border-color: rgba(31, 111, 99, 0.13);
  background: rgba(255, 253, 247, 0.78);
}

#spotifyView #refreshSpotifyStatus {
  grid-column: 3 / span 2;
}

#spotifyView .spotify-review-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.95), rgba(247, 244, 234, 0.9)),
    var(--studio-panel);
}

#spotifyView .spotify-queue-search {
  grid-template-columns: auto minmax(220px, 1fr) auto;
}

#spotifyView .spotify-review-controls button,
#spotifyView .spotify-queue-search button {
  min-height: 38px;
}

#spotifyView .playlist-panel {
  overflow: hidden;
  border-color: rgba(199, 154, 67, 0.18);
  background:
    linear-gradient(145deg, rgba(16, 47, 43, 0.98), rgba(31, 111, 99, 0.94) 64%, rgba(199, 154, 67, 0.58)),
    var(--app-rail);
}

#spotifyView .playlist-panel .eyebrow,
#spotifyView .playlist-panel h2,
#spotifyView .playlist-panel p {
  color: #fff7df;
}

#spotifyView .playlist-panel p {
  opacity: 0.72;
}

#spotifyView .playlist-actions {
  gap: 0;
}

#spotifyView #createPlaylists {
  min-height: 48px;
  font-size: 15px;
}

@media (max-width: 1180px) {
  #profileView .profile-dashboard-grid {
    grid-template-columns: 1fr;
  }

  #spotifyView .spotify-grid.compact,
  #spotifyView .spotify-review-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  #profileView .profile-metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #profileView .profile-stat:nth-child(2n) {
    border-right: 0;
  }

  #uploadView .music-table-tools,
  #spotifyView .spotify-queue-search {
    grid-template-columns: 1fr;
  }

  #uploadView .music-header-actions {
    justify-content: stretch;
  }

  #uploadView .music-header-actions > * {
    flex: 1 1 auto;
  }
}

/* Targeted polish: preset cards, reader density, and page rhythm */
html,
body,
.app-shell,
.main-shell {
  min-height: 100vh;
}

.main-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.main-shell main {
  min-height: calc(100vh - 86px);
}

.view.active {
  min-height: max(720px, calc(100vh - 124px));
}

#practiceView .practice-studio-workspace,
#profileView .profile-workspace,
#uploadView,
#spotifyView .spotify-workspace {
  min-height: max(720px, calc(100vh - 124px));
}

#spotifyView .spotify-review-layout,
#uploadView .library-database-layout {
  min-height: max(560px, calc(100vh - 276px));
}

#spotifyView .spotify-review-main,
#spotifyView .spotify-playlist-sidebar {
  min-height: max(560px, calc(100vh - 276px));
}

#practiceView .practice-planner-body {
  grid-template-columns: minmax(170px, 0.28fr) minmax(0, 1fr);
  align-items: center;
  padding: 14px 16px 16px;
  color: var(--studio-ink);
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.98), rgba(239, 248, 237, 0.9) 44%, rgba(247, 239, 221, 0.92)),
    var(--studio-panel);
}

#practiceView .practice-planner-body h2 {
  color: var(--studio-ink);
  font-size: 18px;
}

#practiceView .practice-planner-body p {
  color: var(--app-muted);
}

#practiceView .practice-preset-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  align-items: stretch;
}

#practiceView .practice-preset-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 68px;
  padding: 12px 12px 12px 14px;
  color: var(--studio-ink);
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-left: 4px solid rgba(67, 193, 177, 0.74);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.98), rgba(226, 248, 234, 0.64)),
    var(--studio-panel);
  box-shadow: 0 10px 24px rgba(31, 111, 99, 0.08);
}

#practiceView .practice-preset-card:nth-child(2) {
  border-left-color: rgba(199, 154, 67, 0.86);
}

#practiceView .practice-preset-card:nth-child(3) {
  border-left-color: rgba(67, 193, 177, 0.86);
}

#practiceView .practice-preset-card:nth-child(4) {
  border-left-color: rgba(31, 111, 99, 0.72);
}

#practiceView .practice-preset-card:hover {
  border-color: rgba(31, 111, 99, 0.22);
  border-left-color: rgba(67, 193, 177, 0.95);
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 1), rgba(226, 248, 234, 0.86)),
    var(--studio-panel);
  box-shadow: 0 14px 30px rgba(31, 111, 99, 0.12);
}

#practiceView .practice-preset-card:disabled {
  color: rgba(16, 47, 43, 0.42);
  border-color: rgba(31, 111, 99, 0.09);
  border-left-color: rgba(31, 111, 99, 0.18);
  background: rgba(255, 253, 247, 0.58);
  box-shadow: none;
}

#practiceView .practice-preset-card .preset-card-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

#practiceView .practice-preset-card .preset-card-label {
  overflow: hidden;
  color: var(--studio-ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#practiceView .practice-preset-card .preset-card-meta {
  overflow: hidden;
  color: var(--app-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#practiceView .practice-preset-card .preset-card-count {
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  color: #0b332d;
  border: 1px solid rgba(67, 193, 177, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(142, 228, 209, 0.94), rgba(255, 245, 217, 0.84));
  font-size: 22px;
  line-height: 1;
}

#practiceView .practice-preset-card:disabled .preset-card-count {
  color: rgba(16, 47, 43, 0.36);
  background: rgba(246, 239, 221, 0.72);
}

.sheet-viewer {
  grid-template-columns: clamp(96px, 8vw, 126px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  background: #10231f;
}

.sheet-viewer-rail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  height: 100vh;
  padding: 8px;
  color: #fff8ea;
  border-right: 1px solid rgba(255, 248, 234, 0.14);
  background:
    linear-gradient(180deg, rgba(18, 58, 52, 0.98), rgba(16, 47, 43, 0.98)),
    var(--app-rail);
}

.sheet-viewer-header {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.sheet-viewer-header h2 {
  display: -webkit-box;
  overflow: hidden;
  color: #fff8ea;
  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.12;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.sheet-viewer-header .eyebrow {
  display: block;
  color: rgba(255, 248, 234, 0.62);
  font-size: 10px;
}

.sheet-viewer-header-actions,
.sheet-viewer-toolbar {
  display: grid;
  gap: 6px;
  align-items: start;
}

.sheet-viewer-header-actions button,
.sheet-viewer-header-actions .button-link,
.sheet-viewer-toolbar button {
  width: 100%;
  min-height: 31px;
  padding: 5px 7px;
  color: #0b332d;
  border-color: rgba(255, 248, 234, 0.18);
  background: rgba(255, 248, 234, 0.86);
  font-size: 12px;
  line-height: 1;
}

.sheet-viewer-toolbar {
  justify-content: stretch;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.sheet-viewer-toolbar span {
  display: grid;
  place-items: center;
  min-height: 30px;
  padding: 5px 6px;
  color: #fff8ea;
  border: 1px solid rgba(255, 248, 234, 0.14);
  border-radius: 999px;
  background: rgba(255, 248, 234, 0.08);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.sheet-spread {
  min-height: 0;
  height: 100vh;
  gap: 3px;
  padding: 3px;
}

.sheet-page {
  border-radius: 2px;
}

.sheet-page-label {
  top: 6px;
  min-height: 20px;
  padding: 2px 8px;
  font-size: 11px;
  opacity: 0.9;
}

.sheet-page-canvas-wrap {
  padding: 0;
  overflow: hidden;
}

.sheet-page-canvas-wrap canvas {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
}

@media (max-width: 1240px) {
  #practiceView .practice-preset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .view.active,
  #practiceView .practice-studio-workspace,
  #profileView .profile-workspace,
  #uploadView,
  #spotifyView .spotify-workspace {
    min-height: max(680px, calc(100vh - 112px));
  }

  .sheet-viewer {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .sheet-viewer-rail {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: start;
    height: auto;
    padding: 6px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 248, 234, 0.14);
  }

  .sheet-viewer-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .sheet-viewer-header-actions {
    grid-template-columns: repeat(3, auto);
  }

  .sheet-viewer-toolbar {
    grid-column: 2;
    grid-template-columns: auto auto auto;
    align-items: center;
  }

  .sheet-spread {
    height: auto;
    min-height: calc(100vh - 72px);
    overflow: auto;
  }

  .sheet-page-canvas-wrap {
    overflow: auto;
  }
}

@media (max-width: 640px) {
  #practiceView .practice-preset-grid,
  #practiceView .practice-planner-body {
    grid-template-columns: 1fr;
  }

  .sheet-viewer-rail,
  .sheet-viewer-header,
  .sheet-viewer-header-actions,
  .sheet-viewer-toolbar {
    grid-template-columns: 1fr;
  }

  .sheet-viewer-toolbar {
    grid-column: 1;
  }
}

/* Reader floating controls and longer Practice canvas */
#practiceView.view.active,
#practiceView .practice-studio-workspace {
  min-height: max(1080px, calc(100vh + 420px));
}

@media (min-width: 1241px) {
  #practiceView .practice-session-layout {
    min-height: max(820px, calc(100vh - 128px));
  }

  #practiceView .practice-studio-session,
  #practiceView .practice-picker-side {
    min-height: max(820px, calc(100vh - 128px));
  }

  #practiceView .practice-session-box .session-list {
    min-height: 430px;
    max-height: calc(100vh - 430px);
  }

  #practiceView .practice-picker-side .song-card-grid {
    max-height: calc(100vh - 302px);
  }
}

.sheet-viewer {
  position: relative;
  display: block;
  width: 100vw;
  height: 100vh;
  background: #111d1a;
}

.sheet-viewer-rail {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: block;
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  pointer-events: none;
  border: 0;
  background: transparent;
}

.sheet-viewer-header {
  position: absolute;
  inset: 12px 14px auto 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 0;
  padding: 0;
  pointer-events: none;
  border: 0;
  background: transparent;
}

.sheet-viewer-header > div:first-child {
  display: grid;
  gap: 1px;
  max-width: min(320px, 34vw);
  padding: 7px 10px;
  overflow: hidden;
  pointer-events: auto;
  border: 1px solid rgba(255, 248, 234, 0.16);
  border-radius: 8px;
  background: rgba(13, 44, 39, 0.42);
  backdrop-filter: blur(14px);
}

.sheet-viewer-header h2 {
  display: block;
  overflow: hidden;
  color: rgba(255, 248, 234, 0.94);
  font-size: 14px;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-viewer-header .eyebrow {
  display: block;
  color: rgba(255, 248, 234, 0.58);
  font-size: 10px;
  line-height: 1;
}

#sheetViewerMeta {
  display: none;
}

.sheet-viewer-header-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
  padding: 6px;
  pointer-events: auto;
  border: 1px solid rgba(255, 248, 234, 0.16);
  border-radius: 999px;
  background: rgba(13, 44, 39, 0.34);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.sheet-viewer-header-actions button,
.sheet-viewer-header-actions .button-link {
  width: auto;
  min-height: 34px;
  padding: 7px 12px;
  color: rgba(255, 248, 234, 0.94);
  border-color: rgba(255, 248, 234, 0.14);
  background: rgba(255, 248, 234, 0.1);
  box-shadow: none;
  font-size: 12px;
  line-height: 1;
}

.sheet-viewer-header-actions button:hover,
.sheet-viewer-header-actions .button-link:hover {
  color: #0b332d;
  background: rgba(255, 248, 234, 0.86);
}

.sheet-viewer-toolbar {
  position: absolute;
  left: 50%;
  bottom: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 6px;
  pointer-events: auto;
  border: 1px solid rgba(255, 248, 234, 0.16);
  border-radius: 999px;
  background: rgba(13, 44, 39, 0.3);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
  transform: translateX(-50%);
}

.sheet-viewer-toolbar button {
  width: auto;
  min-width: 68px;
  min-height: 34px;
  padding: 7px 12px;
  color: rgba(255, 248, 234, 0.94);
  border-color: rgba(255, 248, 234, 0.14);
  background: rgba(255, 248, 234, 0.1);
  box-shadow: none;
  font-size: 12px;
}

.sheet-viewer-toolbar button:hover {
  color: #0b332d;
  background: rgba(255, 248, 234, 0.86);
}

.sheet-viewer-toolbar button:disabled {
  color: rgba(255, 248, 234, 0.42);
  background: rgba(255, 248, 234, 0.06);
  opacity: 1;
}

.sheet-viewer-toolbar span {
  min-width: 78px;
  min-height: 34px;
  color: rgba(255, 248, 234, 0.96);
  border-color: rgba(255, 248, 234, 0.14);
  background: rgba(255, 248, 234, 0.1);
}

.sheet-spread {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  padding: 4px;
}

.sheet-page-canvas-wrap {
  padding: 0;
}

@media (max-width: 900px) {
  #practiceView.view.active,
  #practiceView .practice-studio-workspace {
    min-height: max(880px, calc(100vh + 260px));
  }

  .sheet-viewer-header {
    inset: 8px 8px auto 8px;
  }

  .sheet-viewer-header > div:first-child {
    max-width: min(260px, 42vw);
  }

  .sheet-viewer-header-actions {
    gap: 5px;
  }

  .sheet-viewer-header-actions button,
  .sheet-viewer-header-actions .button-link,
  .sheet-viewer-toolbar button {
    min-height: 32px;
    padding: 6px 9px;
  }

  .sheet-viewer-toolbar {
    bottom: 10px;
  }
}

@media (max-width: 640px) {
  .sheet-viewer-header {
    display: grid;
  }

  .sheet-viewer-header > div:first-child {
    max-width: none;
  }

  .sheet-viewer-header-actions {
    justify-self: end;
    border-radius: 8px;
    flex-wrap: wrap;
  }

  .sheet-viewer-toolbar {
    left: 8px;
    right: 8px;
    transform: none;
  }
}

/* MVP refinement: quiet support tools and compact Spotify review rows */
#profileView .profile-secondary-drawer,
#spotifyView .spotify-quiet-drawer {
  padding: 0;
  overflow: hidden;
}

#profileView .profile-secondary-summary,
#spotifyView .spotify-workflow-summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 13px 15px;
  cursor: pointer;
  list-style: none;
}

#profileView .profile-secondary-summary::-webkit-details-marker,
#spotifyView .spotify-workflow-summary::-webkit-details-marker {
  display: none;
}

#profileView .profile-secondary-summary span,
#spotifyView .spotify-workflow-summary > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#profileView .profile-secondary-summary h2,
#spotifyView .spotify-workflow-summary h2 {
  margin: 0;
  overflow: hidden;
  color: var(--studio-ink);
  font-size: 15px;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#profileView .profile-secondary-summary p,
#spotifyView .spotify-workflow-summary p {
  margin: 0;
  overflow: hidden;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#profileView .profile-secondary-summary strong,
#spotifyView .spotify-workflow-summary > span {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  padding: 5px 11px;
  color: var(--tea-green);
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 999px;
  background: rgba(226, 248, 234, 0.62);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

#profileView .profile-secondary-drawer[open] .profile-secondary-summary,
#spotifyView .spotify-quiet-drawer[open] .spotify-workflow-summary {
  border-bottom: 1px solid rgba(31, 111, 99, 0.1);
}

#profileView .profile-secondary-drawer[open] .profile-secondary-summary strong,
#spotifyView .spotify-quiet-drawer[open] .spotify-workflow-summary > span {
  color: #6d501b;
  border-color: rgba(199, 154, 67, 0.2);
  background: rgba(255, 245, 217, 0.72);
}

#profileView .profile-secondary-drawer .insight-list,
#profileView .profile-secondary-drawer .style-breakdown {
  padding: 12px 15px 15px;
}

#spotifyView .spotify-quiet-drawer {
  border-color: rgba(31, 111, 99, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.88), rgba(247, 244, 234, 0.74)),
    var(--studio-panel);
  box-shadow: none;
}

#spotifyView .spotify-quiet-drawer .spotify-next-actions {
  padding: 12px;
}

#spotifyView .spotify-review-toolbar {
  gap: 8px 12px;
}

#spotifyView .spotify-queue-search {
  grid-template-columns: minmax(260px, 1fr) auto;
}

#spotifyView .spotify-queue-search-label {
  display: none;
}

#spotifyView .spotify-review-summary {
  gap: 6px;
}

#spotifyView .spotify-review-summary span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 11px;
}

#spotifyView #spotifyAutoMatch {
  color: var(--studio-ink);
  border-color: rgba(31, 111, 99, 0.12);
  background: rgba(255, 253, 247, 0.76);
  box-shadow: none;
}

#spotifyView .spotify-review-list {
  gap: 7px;
  padding: 10px;
}

#spotifyView .match-card {
  gap: 8px;
  padding: 10px;
  border-color: rgba(31, 111, 99, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.96), rgba(249, 245, 236, 0.9)),
    var(--studio-panel);
  box-shadow: none;
}

#spotifyView .match-card.compact {
  padding: 8px 10px;
}

#spotifyView .match-card.expanded {
  border-color: rgba(199, 154, 67, 0.2);
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.98), rgba(226, 248, 234, 0.54) 52%, rgba(255, 245, 217, 0.58)),
    var(--studio-panel);
  box-shadow: 0 14px 32px rgba(18, 58, 52, 0.1);
}

#spotifyView .match-card-hero {
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 10px;
}

#spotifyView .match-card.expanded .match-card-hero {
  grid-template-columns: 60px minmax(0, 1fr) auto;
}

#spotifyView .cover-art-match {
  width: 52px;
  border-radius: 7px;
  box-shadow: 0 8px 18px rgba(13, 48, 42, 0.14);
}

#spotifyView .match-card.expanded .cover-art-match {
  width: 60px;
}

#spotifyView .match-song-identity {
  gap: 2px;
}

#spotifyView .match-song-identity h3 {
  font-size: 16px;
  line-height: 1.12;
}

#spotifyView .match-card.expanded .match-song-identity h3 {
  font-size: 18px;
}

#spotifyView .match-song-identity p {
  font-size: 12px;
}

#spotifyView .match-source-file {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--earth-muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#spotifyView .match-song-links {
  gap: 9px;
  min-height: 18px;
  font-size: 12px;
}

#spotifyView .match-row-side {
  display: grid;
  gap: 6px;
  justify-items: end;
  align-items: center;
}

#spotifyView .match-row-side .badge {
  justify-self: end;
  min-height: 26px;
  padding: 4px 9px;
  font-size: 11px;
  white-space: nowrap;
}

#spotifyView .spotify-expand-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 12px;
  color: #0b332d;
  border: 1px solid rgba(67, 193, 177, 0.22);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(67, 193, 177, 0.92), rgba(142, 228, 209, 0.9));
  box-shadow: none;
  font-size: 12px;
  font-weight: 900;
}

#spotifyView .spotify-expand-button[aria-expanded="true"] {
  color: #6d501b;
  border-color: rgba(199, 154, 67, 0.22);
  background: rgba(255, 245, 217, 0.86);
}

#spotifyView .match-card-signal {
  display: none;
}

#spotifyView .match-target-strip {
  min-height: 32px;
  padding: 6px 9px;
}

#spotifyView .match-target-strip strong {
  font-size: 13px;
}

#spotifyView .match-card .manual-search {
  height: 38px;
}

#spotifyView .match-card .manual-search input,
#spotifyView .match-card .manual-search button,
#spotifyView .spotify-search-label {
  height: 38px;
  min-height: 38px;
}

#spotifyView .match-card .manual-search button {
  padding: 7px 12px;
}

#spotifyView .spotify-query-chips {
  gap: 6px;
}

#spotifyView .spotify-query-chips button {
  min-height: 28px;
  padding: 4px 9px;
  font-size: 11px;
}

#spotifyView .match-actions button {
  min-height: 32px;
  padding: 6px 11px;
}

#spotifyView .candidate {
  padding: 8px 9px;
  background: rgba(255, 250, 239, 0.86);
}

#spotifyView .candidate-cover {
  width: 46px;
}

#spotifyView .candidate-actions button {
  min-height: 34px;
  padding: 7px 12px;
}

#spotifyView .spotify-playlist-sidebar {
  align-content: start;
}

#spotifyView .playlist-panel {
  align-self: start;
  min-height: 0;
  gap: 14px;
  padding: 15px;
}

#spotifyView .playlist-panel .spotify-panel-heading {
  padding: 0;
  border: 0;
  background: transparent;
}

#spotifyView .playlist-panel .spotify-panel-heading .eyebrow,
#spotifyView .playlist-panel .spotify-panel-heading p {
  display: none;
}

#spotifyView .playlist-panel .spotify-panel-heading h2 {
  font-size: 18px;
}

#spotifyView #createPlaylists {
  min-height: 44px;
}

@media (max-width: 680px) {
  #spotifyView .spotify-queue-search,
  #spotifyView .match-card-hero,
  #spotifyView .match-card.expanded .match-card-hero,
  #spotifyView .manual-search,
  #spotifyView .candidate {
    grid-template-columns: 1fr;
  }

  #spotifyView .match-row-side {
    justify-items: start;
  }
}

/* Sheet Music edit-mode preview affordance */
#uploadView .edit-preview-collapse-button {
  display: none;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 999px;
}

#uploadView .library-database-layout.music-edit-mode .edit-preview-collapse-button {
  display: inline-grid;
}

#uploadView .edit-preview-collapse-button span {
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateX(-1px) rotate(45deg);
}

#uploadView .edit-preview-collapse-button[aria-pressed="true"] span {
  transform: translateX(1px) rotate(225deg);
}

#uploadView .sheet-preview-header,
#uploadView .sheet-preview-header .eyebrow,
#uploadView .sheet-preview-header h2,
#uploadView .sheet-preview-header p {
  color: var(--studio-ink);
}

#uploadView .sheet-preview-header .eyebrow,
#uploadView .sheet-preview-header p {
  color: var(--app-muted);
}

#uploadView .preview-minimize-button {
  color: var(--studio-ink);
  border-color: rgba(31, 111, 99, 0.14);
  background: rgba(255, 253, 247, 0.82);
}

/* Sidebar responsiveness and clearer navigation icons */
.nav-icon {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  opacity: 0.86;
}

.step:hover .nav-icon,
.step.active .nav-icon {
  opacity: 1;
}

.nav-practice {
  border-radius: 999px;
}

.nav-practice::before {
  left: 8px;
  top: 6px;
  border-left: 8px solid currentColor;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.nav-practice::after {
  left: auto;
  right: 5px;
  top: 5px;
  bottom: auto;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
}

.nav-profile {
  border-radius: 999px;
}

.nav-profile::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 5px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.nav-profile::after {
  left: 4px;
  right: 4px;
  bottom: 4px;
  height: 6px;
  border-radius: 999px 999px 5px 5px;
  background: currentColor;
}

.nav-library {
  border-radius: 5px;
  background:
    linear-gradient(currentColor, currentColor) 6px 7px / 10px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 6px 12px / 12px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 6px 17px / 8px 2px no-repeat;
}

.nav-library::before {
  left: auto;
  right: -2px;
  top: -2px;
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 0 3px 0 3px;
  background: rgba(25, 82, 74, 0.96);
}

.nav-library::after {
  display: none;
}

.step.active .nav-library::before {
  background: rgba(43, 115, 104, 0.98);
}

.nav-spotify {
  border-radius: 999px;
}

.nav-spotify::before {
  inset: auto;
  left: 5px;
  top: 7px;
  width: 12px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 999px;
}

.nav-spotify::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 14px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.nav-users {
  border-radius: 999px;
}

.nav-users::before,
.nav-users::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: currentColor;
}

.nav-users::before {
  left: 5px;
  top: 5px;
  width: 6px;
  height: 6px;
  box-shadow: 8px 0 0 currentColor;
}

.nav-users::after {
  left: 4px;
  right: 4px;
  bottom: 4px;
  height: 7px;
  border-radius: 999px 999px 5px 5px;
}

.app-shell.rail-collapsed {
  display: flex;
  gap: 8px;
  grid-template-columns: none !important;
}

.app-shell.rail-collapsed .main-shell {
  flex: 1 1 auto;
  min-width: 0;
}

.app-shell.rail-collapsed .left-rail {
  flex: 0 0 96px;
  gap: 14px;
  width: 96px;
  max-width: 96px;
  min-width: 0;
  height: calc(100dvh - 24px);
  min-height: 0;
  max-height: calc(100dvh - 24px);
  padding: 12px 10px;
  overflow: hidden auto;
  border-radius: 10px;
}

.app-shell.rail-collapsed .brand {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 0;
  min-height: auto;
  padding: 12px 8px;
  border-color: rgba(255, 248, 234, 0.12);
  background: rgba(255, 248, 234, 0.06);
}

.app-shell.rail-collapsed .brand-mark {
  width: 46px;
  height: 46px;
  font-size: 15px;
}

.app-shell.rail-collapsed .rail-toggle {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  margin: 0;
  color: #fff8ea;
  border-color: rgba(255, 248, 234, 0.14);
  background: rgba(10, 19, 17, 0.92);
}

.app-shell.rail-collapsed .steps {
  gap: 10px;
}

.app-shell.rail-collapsed .step {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 74px;
  padding: 9px 6px;
  border-radius: 10px;
  text-align: center;
}

.app-shell.rail-collapsed .step strong {
  display: block;
  max-width: 68px;
  overflow: hidden;
  color: rgba(255, 248, 234, 0.72);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: normal;
}

.app-shell.rail-collapsed .step.active strong,
.app-shell.rail-collapsed .step:hover strong {
  color: #fff8ea;
}

.app-shell.rail-collapsed .nav-icon {
  width: 32px;
  height: 32px;
  color: currentColor;
}

.app-shell.rail-collapsed .step.active {
  background: rgba(142, 228, 209, 0.18);
  box-shadow: inset 0 0 0 1px rgba(142, 228, 209, 0.12);
}

.app-shell.rail-collapsed .step.active .nav-icon {
  color: #5df0d1;
}

.app-shell.rail-collapsed .nav-practice::before {
  left: 11px;
  top: 9px;
  border-left-width: 10px;
  border-top-width: 7px;
  border-bottom-width: 7px;
}

.app-shell.rail-collapsed .nav-practice::after {
  right: 7px;
  top: 7px;
}

.app-shell.rail-collapsed .nav-profile::before {
  left: 11px;
  top: 8px;
  width: 7px;
  height: 7px;
}

.app-shell.rail-collapsed .nav-profile::after {
  left: 7px;
  right: 7px;
  bottom: 7px;
  height: 8px;
}

.app-shell.rail-collapsed .nav-library {
  background:
    linear-gradient(currentColor, currentColor) 8px 10px / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 8px 16px / 16px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 8px 22px / 11px 2px no-repeat;
}

.app-shell.rail-collapsed .nav-library::before {
  width: 10px;
  height: 10px;
}

.app-shell.rail-collapsed .nav-spotify::before {
  left: 7px;
  top: 10px;
  width: 17px;
  height: 8px;
}

.app-shell.rail-collapsed .nav-spotify::after {
  left: 9px;
  top: 20px;
  width: 13px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .app-shell:not(.rail-collapsed) .left-rail {
    min-width: 0;
    padding-inline: 10px;
  }

  .app-shell:not(.rail-collapsed) .brand > div:not(.brand-mark),
  .app-shell:not(.rail-collapsed) .step strong {
    display: none;
  }

  .app-shell:not(.rail-collapsed) .brand,
  .app-shell:not(.rail-collapsed) .step {
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .app-shell,
  .app-shell.rail-collapsed {
    display: grid;
    grid-template-columns: 1fr !important;
  }

  .left-rail,
  .app-shell.rail-collapsed .left-rail {
    position: sticky;
    top: 0;
    z-index: 20;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    width: auto;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 8px;
    border-radius: 0 0 10px 10px;
  }

  .brand,
  .app-shell.rail-collapsed .brand {
    min-height: 50px;
    padding: 6px;
    grid-template-columns: auto auto;
    gap: 6px;
  }

  .brand > div:not(.brand-mark),
  .app-shell.rail-collapsed .brand > div:not(.brand-mark) {
    display: none;
  }

  .brand-mark,
  .app-shell.rail-collapsed .brand-mark {
    width: 36px;
    height: 36px;
  }

  .steps,
  .app-shell.rail-collapsed .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    align-items: stretch;
  }

  .step,
  .app-shell.rail-collapsed .step {
    min-height: 54px;
    padding: 6px 4px;
  }

  .step strong,
  .app-shell:not(.rail-collapsed) .step strong,
  .app-shell.rail-collapsed .step strong {
    display: block !important;
    max-width: 100%;
    font-size: 9px;
    line-height: 1.05;
  }

  .nav-icon,
  .app-shell.rail-collapsed .nav-icon {
    width: 24px;
    height: 24px;
  }

  .rail-toggle {
    display: none;
  }
}

/* Public/private account and Spotify connection foundation */
#spotifyView .spotify-connect-workbench {
  display: grid;
  gap: 10px;
  overflow: hidden;
  color: #fff8ea;
  border: 0;
  border-radius: 8px;
  background:
    radial-gradient(circle at 82% 18%, rgba(93, 240, 209, 0.24), transparent 30%),
    linear-gradient(135deg, #123a34 0%, #1d665d 58%, #0f2f2a 100%);
  box-shadow: 0 18px 44px rgba(18, 58, 52, 0.14);
}

#spotifyView .spotify-connect-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 13px 16px 4px;
}

#spotifyView .spotify-connect-copy {
  display: flex;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

#spotifyView .spotify-connect-copy .eyebrow,
#spotifyView .spotify-connect-copy strong,
#spotifyView .spotify-connect-copy small {
  color: #fff8ea;
}

#spotifyView .spotify-connect-copy .eyebrow {
  color: #8ee4d1;
  font-size: 11px;
}

#spotifyView .spotify-connect-copy strong {
  font-size: 17px;
  line-height: 1;
}

#spotifyView .spotify-connect-copy small {
  overflow: hidden;
  color: rgba(255, 248, 234, 0.74);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#spotifyView .spotify-connect-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 11px;
  color: #102f2a;
  border-radius: 999px;
  background: rgba(142, 228, 209, 0.94);
  font-size: 12px;
  font-weight: 900;
}

#spotifyView .spotify-connect-workbench[data-connection="connected"] .spotify-connect-state {
  color: #0b321e;
  background: #77dfbd;
}

#spotifyView .spotify-connect-workbench[data-connection="needs_scope"] .spotify-connect-state {
  color: #533908;
  background: #f5d58a;
}

#spotifyView .spotify-connect-actions {
  display: flex;
  justify-content: flex-end;
}

#spotifyView .spotify-connect-actions button {
  min-height: 34px;
  padding: 7px 13px;
  color: #0f2f2a;
  border-color: rgba(142, 228, 209, 0.46);
  background: #8ee4d1;
  font-size: 13px;
}

#spotifyView .spotify-flow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 16px 14px;
}

#spotifyView .spotify-flow-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  min-height: 54px;
  padding: 9px;
  border: 1px solid rgba(255, 248, 234, 0.12);
  border-radius: 8px;
  background: rgba(255, 248, 234, 0.07);
}

#spotifyView .spotify-flow-step > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: #10332e;
  border-radius: 999px;
  background: rgba(255, 248, 234, 0.82);
  font-size: 12px;
  font-weight: 900;
}

#spotifyView .spotify-flow-step.done > span {
  background: #77dfbd;
}

#spotifyView .spotify-flow-step.active {
  border-color: rgba(142, 228, 209, 0.46);
  background: rgba(142, 228, 209, 0.13);
}

#spotifyView .spotify-flow-step strong {
  display: block;
  color: #fff8ea;
  font-size: 12px;
  line-height: 1.15;
}

#spotifyView .spotify-flow-step p {
  margin: 2px 0 0;
  color: rgba(255, 248, 234, 0.68);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.spotify-connect-modal-backdrop {
  background: rgba(10, 24, 22, 0.58);
  backdrop-filter: blur(10px);
}

.spotify-connect-modal {
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  border: 1px solid rgba(142, 228, 209, 0.24);
  border-radius: 10px;
  background:
    radial-gradient(circle at 86% 0%, rgba(93, 240, 209, 0.2), transparent 28%),
    linear-gradient(180deg, #fffdf7 0%, #f3efe2 100%);
  box-shadow: 0 28px 80px rgba(11, 39, 35, 0.28);
}

.spotify-connect-modal-header {
  color: #fff8ea;
  border-bottom: 0;
  background: linear-gradient(135deg, #123a34, #1d665d);
}

.spotify-connect-modal-header h2,
.spotify-connect-modal-header p,
.spotify-connect-modal-header .eyebrow {
  color: #fff8ea;
}

.spotify-connect-modal-body {
  display: grid;
  gap: 13px;
  max-height: calc(100dvh - 122px);
  overflow: auto;
  padding: 16px;
}

.spotify-connect-status-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 8px;
  background: rgba(255, 250, 239, 0.88);
}

.spotify-connect-status-card span {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  color: #153a34;
  border-radius: 999px;
  background: #d8f4e4;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.spotify-connect-status-card span[data-connection="needs_scope"] {
  background: #f5e4bb;
}

.spotify-connect-status-card span[data-connection="connected"] {
  background: #aef0cf;
}

.spotify-connect-status-card strong {
  color: var(--earth-ink);
  font-size: 16px;
}

.spotify-connect-status-card p,
.spotify-modal-note {
  margin: 0;
  color: var(--earth-muted);
  font-size: 13px;
  font-weight: 700;
}

.spotify-modal-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.spotify-modal-steps span {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  color: var(--earth-ink);
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.8);
  font-size: 12px;
  font-weight: 850;
}

.spotify-modal-steps strong {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #fff8ea;
  border-radius: 999px;
  background: var(--tea-green);
  font-size: 11px;
}

.spotify-modal-field {
  display: grid;
  gap: 6px;
  color: var(--earth-ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.spotify-modal-field input {
  width: 100%;
  min-height: 42px;
  border-color: rgba(29, 102, 93, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.92);
}

.spotify-copy-row,
.spotify-connect-modal-actions {
  display: grid;
  gap: 8px;
}

.spotify-copy-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.spotify-connect-modal-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.spotify-connect-modal-actions button,
.spotify-connect-modal-actions .button-link {
  min-height: 40px;
  padding: 8px 10px;
}

#spotifyConnectCancel {
  justify-self: end;
}

@media (max-width: 760px) {
  #spotifyView .spotify-connect-summary,
  #spotifyView .spotify-flow-steps,
  .spotify-modal-steps,
  .spotify-connect-modal-actions {
    grid-template-columns: 1fr;
  }

  #spotifyView .spotify-connect-copy {
    display: grid;
    gap: 3px;
  }

  #spotifyView .spotify-connect-state,
  #spotifyView .spotify-connect-actions {
    justify-self: start;
  }

  .spotify-connect-status-card,
  .spotify-copy-row {
    grid-template-columns: 1fr;
  }
}

/* Importer and Spotify setup polish */
#uploadView .importer-workbench {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(31, 111, 99, 0.16);
  border-radius: 8px;
  color: var(--studio-ink);
  background:
    linear-gradient(135deg, #123a34 0%, #1d665d 62%, #10322d 100%),
    var(--app-rail);
  box-shadow: 0 18px 46px rgba(18, 58, 52, 0.13);
}

#uploadView .importer-summary {
  color: #fff8ea;
  background:
    linear-gradient(90deg, rgba(255, 248, 234, 0.06), transparent 44%),
    transparent;
}

#uploadView .importer-summary-copy .eyebrow,
#uploadView .importer-summary-copy strong,
#uploadView .importer-summary-copy small {
  color: #fff8ea;
}

#uploadView .importer-summary-copy small {
  color: rgba(255, 248, 234, 0.72);
}

#uploadView .importer-summary-toggle {
  color: #0f2f2a;
  border-color: rgba(142, 228, 209, 0.36);
  background: #8ee4d1;
}

#uploadView .importer-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(420px, 1.14fr);
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  overflow: hidden;
  border-top: 1px solid rgba(255, 248, 234, 0.16);
  background:
    repeating-linear-gradient(122deg, transparent 0 30px, rgba(199, 154, 67, 0.08) 30px 31px, transparent 31px 62px),
    linear-gradient(135deg, rgba(255, 253, 247, 0.98), rgba(241, 234, 216, 0.9)),
    var(--studio-panel);
}

#uploadView .importer-body > * {
  position: relative;
  z-index: 1;
}

#uploadView .importer-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  min-width: 0;
  padding: 4px 0;
}

#uploadView .importer-copy h2 {
  max-width: 620px;
  color: var(--studio-ink);
  font-size: 30px;
  line-height: 1.04;
}

#uploadView .importer-copy > p,
#uploadView .importer-action-header p {
  color: #65736e;
}

#uploadView .importer-copy > p {
  max-width: 540px;
  font-size: 14px;
  font-weight: 760;
}

#uploadView .importer-flow {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

#uploadView .importer-flow span {
  min-height: 30px;
  padding: 5px 9px;
  color: var(--studio-ink);
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.72);
  font-size: 12px;
  font-weight: 900;
}

#uploadView .importer-flow strong {
  color: #0d372f;
  background: #8ee4d1;
}

#uploadView .importer-actions-panel {
  display: grid;
  gap: 13px;
  align-content: center;
  min-height: 206px;
  padding: 18px;
  color: var(--studio-ink);
  border: 1px dashed rgba(29, 102, 93, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.96), rgba(255, 250, 239, 0.9)),
    var(--studio-panel);
  box-shadow: 0 16px 36px rgba(77, 63, 40, 0.1);
}

#uploadView .importer-actions-panel[data-queue="ready"] {
  border-style: solid;
  border-color: rgba(67, 193, 177, 0.58);
  background:
    linear-gradient(180deg, rgba(238, 250, 245, 0.98), rgba(255, 253, 247, 0.92)),
    var(--studio-panel);
}

#uploadView .importer-actions-panel.drag-active {
  border-color: rgba(67, 193, 177, 0.9);
  box-shadow: 0 18px 46px rgba(31, 111, 99, 0.18);
  transform: translateY(-1px);
}

#uploadView .importer-action-header h3 {
  color: var(--studio-ink);
  font-size: 22px;
  line-height: 1.05;
}

#uploadView .selected-file-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

#uploadView .selected-file-list[hidden] {
  display: none;
}

#uploadView .selected-file-list span,
#uploadView .selected-file-list strong {
  max-width: 100%;
  min-height: 28px;
  padding: 5px 10px;
  overflow: hidden;
  color: #17413a;
  border: 1px solid rgba(29, 102, 93, 0.14);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.86);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#uploadView .selected-file-list strong {
  color: #533908;
  border-color: rgba(199, 154, 67, 0.24);
  background: rgba(199, 154, 67, 0.14);
}

#uploadView .importer-actions-panel .upload-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

#uploadView .importer-actions-panel .upload-actions button,
#uploadView .importer-actions-panel .upload-actions .file-button {
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 12px;
  color: #0f2f2a;
  border-color: rgba(29, 102, 93, 0.16);
  background: rgba(255, 253, 247, 0.92);
  box-shadow: none;
}

#uploadView .importer-actions-panel .upload-actions #uploadButton {
  color: #082f2a;
  border-color: rgba(67, 193, 177, 0.28);
  background: linear-gradient(135deg, #43c1b1, #8ee4d1);
  box-shadow: 0 12px 24px rgba(31, 111, 99, 0.14);
}

#uploadView .importer-actions-panel .upload-actions #uploadButton:disabled {
  cursor: not-allowed;
  color: rgba(16, 47, 43, 0.46);
  border-color: rgba(31, 111, 99, 0.1);
  background: rgba(229, 224, 210, 0.72);
  box-shadow: none;
  transform: none;
}

#uploadView .importer-actions-panel .upload-actions .secondary {
  color: #533908;
  border-color: rgba(199, 154, 67, 0.26);
  background: rgba(199, 154, 67, 0.13);
}

#uploadView .importer-actions-panel .upload-actions button.secondary,
#uploadView .importer-actions-panel .upload-actions .file-button.secondary {
  color: #533908;
  border-color: rgba(199, 154, 67, 0.26);
  background: rgba(199, 154, 67, 0.13);
}

.spotify-connect-modal {
  width: min(840px, calc(100vw - 28px));
  background:
    linear-gradient(180deg, #fffdf7 0%, #f4efe3 100%),
    var(--studio-panel);
}

.spotify-connect-modal-header {
  padding: 18px 20px;
  background:
    repeating-linear-gradient(122deg, transparent 0 30px, rgba(255, 248, 234, 0.07) 30px 31px, transparent 31px 62px),
    linear-gradient(135deg, #123a34 0%, #1d665d 62%, #10322d 100%);
}

.spotify-connect-modal-body {
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  padding: 16px;
}

.spotify-connect-guide,
.spotify-connect-form {
  display: grid;
  gap: 12px;
  align-content: start;
}

.spotify-connect-guide {
  padding: 14px;
  color: #fff8ea;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(18, 58, 52, 0.98), rgba(31, 111, 99, 0.94)),
    var(--app-rail);
}

.spotify-connect-guide .spotify-connect-status-card {
  grid-template-columns: 1fr;
  padding: 0;
  gap: 9px;
  align-items: start;
  color: #fff8ea;
  border: 0;
  background: transparent;
}

.spotify-connect-guide .spotify-connect-status-card span {
  grid-row: auto;
  justify-self: start;
  max-width: 100%;
  white-space: normal;
}

.spotify-connect-guide .spotify-connect-status-card strong {
  color: #fff8ea;
}

.spotify-connect-guide .spotify-connect-status-card p {
  color: rgba(255, 248, 234, 0.72);
}

.spotify-connect-guide .spotify-modal-steps {
  grid-template-columns: 1fr;
}

.spotify-connect-guide .spotify-modal-steps span {
  color: #fff8ea;
  border-color: rgba(255, 248, 234, 0.13);
  background: rgba(255, 248, 234, 0.08);
}

.spotify-connect-form {
  padding: 14px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.82);
}

.spotify-modal-field {
  gap: 7px;
  color: var(--studio-ink);
  letter-spacing: 0;
}

.spotify-modal-field input {
  min-height: 44px;
  color: var(--studio-ink);
  border-color: rgba(29, 102, 93, 0.18);
  background: rgba(255, 255, 255, 0.94);
}

.spotify-copy-row {
  grid-template-columns: minmax(0, 1fr) minmax(84px, auto);
}

.spotify-connect-modal-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.spotify-connect-modal-actions button,
.spotify-connect-modal-actions .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
}

.spotify-connect-modal-actions #connectSpotify {
  color: #082f2a;
  border-color: rgba(67, 193, 177, 0.28);
  background: linear-gradient(135deg, #43c1b1, #8ee4d1);
}

#saveClientId,
#refreshSpotifyStatus {
  color: var(--studio-ink);
  border-color: rgba(199, 154, 67, 0.24);
  background: rgba(199, 154, 67, 0.14);
}

.spotify-connect-modal-actions .secondary,
.spotify-connect-modal-actions .button-link.secondary,
.spotify-copy-row .secondary {
  color: var(--studio-ink);
  border-color: rgba(31, 111, 99, 0.14);
  background: rgba(255, 253, 247, 0.84);
}

.spotify-modal-note,
#spotifyConnectCancel {
  grid-column: 1 / -1;
}

.spotify-modal-note {
  padding: 0 4px;
}

@media (max-width: 900px) {
  #uploadView .importer-body,
  .spotify-connect-modal-body {
    grid-template-columns: 1fr;
  }

  #uploadView .importer-copy h2 {
    font-size: 25px;
  }
}

@media (max-width: 560px) {
  #uploadView .importer-body,
  #uploadView .importer-actions-panel,
  .spotify-connect-guide,
  .spotify-connect-form {
    padding: 14px;
  }

  #uploadView .importer-actions-panel .upload-actions,
  .spotify-connect-modal-actions,
  .spotify-copy-row {
    grid-template-columns: 1fr;
  }
}

/* Practice presets, song details, and Spotify account polish */
#practiceView .practice-planner-workbench {
  border: 1px solid rgba(31, 111, 99, 0.16);
  background:
    radial-gradient(circle at 76% 20%, rgba(142, 228, 209, 0.18), transparent 24%),
    linear-gradient(135deg, #123a34 0%, #1d665d 58%, #10322d 100%);
  box-shadow: 0 16px 38px rgba(18, 58, 52, 0.12);
}

#practiceView .practice-planner-summary {
  min-height: 50px;
  padding: 12px 16px;
}

#practiceView .practice-planner-workbench[open] .practice-planner-summary {
  border-bottom: 1px solid rgba(255, 248, 234, 0.14);
}

#practiceView .practice-planner-body {
  grid-template-columns: minmax(180px, 0.3fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  min-height: 0;
  padding: 16px;
  color: var(--studio-ink);
  background:
    repeating-linear-gradient(122deg, transparent 0 32px, rgba(199, 154, 67, 0.07) 32px 33px, transparent 33px 66px),
    linear-gradient(135deg, rgba(255, 253, 247, 0.98), rgba(238, 250, 245, 0.9) 46%, rgba(246, 239, 221, 0.92)),
    var(--studio-panel);
}

#practiceView .practice-planner-body > div:first-child {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 86px;
  padding: 13px 14px;
  border: 1px solid rgba(31, 111, 99, 0.11);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.72);
}

#practiceView .practice-planner-body h2 {
  color: var(--studio-ink);
  font-size: 19px;
}

#practiceView .practice-planner-body p {
  color: #65736e;
  font-size: 13px;
  font-weight: 780;
}

#practiceView .practice-preset-grid {
  grid-template-columns: repeat(4, minmax(128px, 1fr));
  gap: 10px;
}

#practiceView .practice-preset-card {
  position: relative;
  min-height: 86px;
  padding: 14px;
  overflow: hidden;
  border-left-width: 0;
  background:
    linear-gradient(150deg, rgba(255, 253, 247, 0.98), rgba(226, 248, 234, 0.72)),
    var(--studio-panel);
}

#practiceView .practice-preset-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #43c1b1, rgba(199, 154, 67, 0.82));
}

#practiceView .practice-preset-card:nth-child(2)::before {
  background: linear-gradient(180deg, #c79a43, rgba(67, 193, 177, 0.74));
}

#practiceView .practice-preset-card:nth-child(3)::before {
  background: linear-gradient(180deg, #43c1b1, rgba(31, 111, 99, 0.7));
}

#practiceView .practice-preset-card:nth-child(4)::before {
  background: linear-gradient(180deg, #1f6f63, rgba(199, 154, 67, 0.72));
}

#practiceView .practice-preset-card .preset-card-label {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#practiceView .practice-preset-card .preset-card-count {
  width: 42px;
  box-shadow: 0 8px 18px rgba(31, 111, 99, 0.1);
}

#practiceView .practice-preset-card .preset-card-meta {
  white-space: normal;
}

#songModal .song-modal {
  width: min(1040px, calc(100vw - 40px));
  border-color: rgba(142, 228, 209, 0.22);
  background:
    linear-gradient(180deg, #fffdf7 0%, #f4ead7 100%),
    var(--sand-panel);
}

#songModal .modal-header {
  color: #fff8ea;
  background:
    repeating-linear-gradient(122deg, transparent 0 32px, rgba(255, 248, 234, 0.06) 32px 33px, transparent 33px 66px),
    linear-gradient(135deg, #123a34 0%, #1d665d 64%, #10322d 100%);
  border-bottom: 0;
}

#songModal .modal-header h2,
#songModal .modal-header p {
  color: #fff8ea;
}

#songModal .modal-header p {
  color: rgba(255, 248, 234, 0.72);
}

#songModalBody {
  gap: 14px;
  padding: 18px 24px 24px;
}

#songModalBody .song-detail-hero {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.98), rgba(226, 248, 234, 0.62)),
    var(--studio-panel);
  box-shadow: 0 14px 32px rgba(77, 63, 40, 0.09);
}

#songModalBody .cover-art-modal {
  width: 112px;
  aspect-ratio: 1;
  border-radius: 9px;
  box-shadow: 0 16px 28px rgba(18, 58, 52, 0.18);
}

#songModalBody .cover-art-modal span {
  font-size: 28px;
}

#songModalBody .cover-art-modal i {
  font-size: 11px;
}

.song-detail-hero-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.song-detail-hero-copy h3 {
  overflow: hidden;
  color: var(--studio-ink);
  font-size: 24px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-detail-hero-copy p:not(.eyebrow) {
  color: #65736e;
  font-weight: 760;
}

.song-detail-badges {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.song-detail-badges span {
  min-height: 26px;
  padding: 5px 9px;
  color: #17413a;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.76);
  font-size: 12px;
  font-weight: 850;
}

.song-detail-hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 230px;
}

.song-detail-hero-actions button,
.song-detail-hero-actions .text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
}

.song-detail-hero-actions .text-link {
  color: var(--studio-ink);
  border: 1px solid rgba(31, 111, 99, 0.13);
  border-radius: 7px;
  background: rgba(255, 253, 247, 0.78);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

#songModalBody .style-helper {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 9px;
  background: rgba(255, 253, 247, 0.78);
}

#songModalBody .style-helper button {
  min-height: 34px;
  color: var(--studio-ink);
  border-color: rgba(199, 154, 67, 0.24);
  background: rgba(199, 154, 67, 0.13);
}

#songModalBody .detail-stat,
#songModalBody .detail-grid {
  border-radius: 9px;
  background: rgba(255, 253, 247, 0.76);
}

#spotifyView .spotify-connect-summary {
  grid-template-columns: minmax(0, 1fr) minmax(230px, auto) auto;
  padding: 14px 16px;
}

#spotifyView .spotify-connect-status-readout {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  color: #fff8ea;
  border: 1px solid rgba(255, 248, 234, 0.14);
  border-radius: 8px;
  background: rgba(255, 248, 234, 0.08);
}

#spotifyView .spotify-status-dot {
  width: 10px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: #f5d58a;
  box-shadow: 0 0 0 4px rgba(245, 213, 138, 0.14);
}

#spotifyView .spotify-connect-workbench[data-connection="connected"] .spotify-status-dot {
  background: #77dfbd;
  box-shadow: 0 0 0 4px rgba(119, 223, 189, 0.14);
}

#spotifyView .spotify-connect-workbench[data-connection="needs_scope"] .spotify-status-dot {
  background: #f5d58a;
}

#spotifyView .spotify-connect-status-readout strong,
#spotifyView .spotify-connect-status-readout small {
  display: block;
  overflow: hidden;
  color: #fff8ea;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#spotifyView .spotify-connect-status-readout strong {
  font-size: 13px;
  line-height: 1.15;
}

#spotifyView .spotify-connect-status-readout small {
  color: rgba(255, 248, 234, 0.68);
  font-size: 11px;
  font-weight: 750;
}

#spotifyView .spotify-connect-actions button {
  min-height: 36px;
  color: #fff8ea;
  border-color: rgba(255, 248, 234, 0.18);
  background: rgba(255, 248, 234, 0.08);
  box-shadow: none;
}

@media (max-width: 1100px) {
  #practiceView .practice-planner-body,
  #songModalBody .song-detail-hero {
    grid-template-columns: 1fr;
  }

  .song-detail-hero-actions {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 760px) {
  #practiceView .practice-preset-grid,
  #spotifyView .spotify-connect-summary,
  .song-detail-hero-actions,
  #songModalBody .style-helper {
    grid-template-columns: 1fr;
  }

  #practiceView .practice-planner-copy,
  #spotifyView .spotify-connect-copy {
    display: grid;
    gap: 3px;
  }

  #songModalBody .cover-art-modal {
    width: min(112px, 34vw);
  }
}

/* Final polish: thin closed presets and stable song detail scrolling */
#practiceView .practice-planner-workbench:not([open]) {
  min-height: 0;
  max-height: 54px;
  overflow: hidden;
}

#practiceView .practice-planner-workbench:not([open]) .practice-planner-summary {
  min-height: 46px;
  padding: 8px 16px;
}

#practiceView .practice-planner-workbench:not([open]) .practice-planner-body {
  display: none;
}

#practiceView .practice-planner-workbench:not([open]) .practice-planner-toggle {
  min-height: 30px;
  padding: 6px 10px;
}

#practiceView .practice-planner-workbench:not([open]) .practice-planner-copy small {
  color: rgba(255, 248, 234, 0.68);
  font-size: 12px;
}

#songModal .song-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

#songModal .modal-header {
  position: relative;
  z-index: 3;
}

#songModalBody {
  min-height: 0;
  overflow-y: auto;
}

#songModalBody .session-history-card {
  display: grid;
  grid-template-columns: minmax(160px, 0.28fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.9), rgba(226, 248, 234, 0.58)),
    var(--studio-panel);
}

#songModalBody .session-history-card > div:first-child {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
}

#songModalBody .session-history-card strong {
  color: var(--studio-ink);
  font-size: 16px;
  line-height: 1.1;
}

#songModalBody .session-history-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

#songModalBody .session-history-row,
#songModalBody .session-history-empty {
  display: grid;
  align-content: center;
  min-height: 54px;
  padding: 10px;
  border: 1px solid rgba(31, 111, 99, 0.1);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.82);
}

#songModalBody .session-history-row span,
#songModalBody .session-history-empty {
  color: #65736e;
  font-size: 12px;
  font-weight: 820;
}

@media (max-width: 900px) {
  #songModalBody .session-history-card,
  #songModalBody .session-history-list {
    grid-template-columns: 1fr;
  }
}

/* Practice top strip: compact, responsive, and tied to the studio console */
#practiceView .practice-studio-workspace {
  gap: clamp(8px, 1vw, 12px);
  align-content: start;
  min-height: 0;
}

#practiceView .practice-planner-workbench:not([open]) + .practice-studio-pulse {
  margin-top: -1px;
}

#practiceView .practice-planner-workbench[open] + .practice-studio-pulse {
  margin-top: 2px;
}

#practiceView .practice-studio-pulse {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  min-height: 0;
  border-color: rgba(31, 111, 99, 0.12);
  box-shadow: 0 10px 24px rgba(18, 58, 52, 0.07);
}

#practiceView .practice-pulse-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 42px;
  padding: 7px 12px;
  gap: 1px 10px;
}

#practiceView .practice-pulse-card span {
  font-size: 9px;
  line-height: 1.05;
}

#practiceView .practice-pulse-card strong {
  grid-row: 1 / span 2;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1;
}

#practiceView .practice-pulse-card em {
  font-size: 10px;
  line-height: 1.15;
}

@media (max-width: 760px) {
  #practiceView .practice-studio-pulse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #practiceView .practice-pulse-card:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 520px) {
  #practiceView .practice-studio-pulse {
    grid-template-columns: 1fr;
  }

  #practiceView .practice-pulse-card {
    border-right: 0;
    border-bottom: 1px solid rgba(31, 111, 99, 0.1);
  }

  #practiceView .practice-pulse-card:last-child {
    border-bottom: 0;
  }
}

/* Practice canvas: longer lower panels and a more responsive splitter */
#practiceView .practice-session-layout {
  --practice-right-min: 300px;
  --practice-gutter: 10px;
  grid-template-columns:
    clamp(380px, var(--practice-left, 58%), calc(100% - var(--practice-right-min) - var(--practice-gutter)))
    var(--practice-gutter)
    minmax(var(--practice-right-min), 1fr);
  align-items: stretch;
  min-height: clamp(500px, calc(58vh + 20px), 620px);
}

#practiceView .practice-side-column,
#practiceView .practice-studio-session,
#practiceView .practice-picker-side {
  min-width: 0;
  min-height: inherit;
}

#practiceView .practice-splitter {
  align-self: stretch;
  min-height: 100%;
}

#practiceView .practice-picker-side {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

#practiceView .practice-picker-side .song-card-grid {
  min-height: 0;
  max-height: none;
  align-content: start;
  align-items: start;
  overflow: auto;
}

#practiceView .practice-session-box .session-list {
  max-height: none;
}

@media (min-width: 1241px) {
  #practiceView .practice-session-box .session-list {
    min-height: clamp(180px, calc(58vh - 280px), 300px);
  }
}

@media (max-width: 1240px) {
  #practiceView .practice-session-layout {
    grid-template-columns: 1fr;
    min-height: max(640px, calc(58vh + 180px));
  }

  #practiceView .practice-side-column,
  #practiceView .practice-studio-session,
  #practiceView .practice-picker-side {
    min-height: 0;
  }
}

/* Practice add-song cards and filters: calmer default density */
#practiceView.view.active {
  min-height: 700px;
}

#practiceView .practice-studio-workspace {
  padding-bottom: 38px;
}

#practiceView .practice-session-title {
  padding: 10px 12px;
}

#practiceView .practice-session-title h2 {
  font-size: 18px;
}

#practiceView .practice-session-title p {
  font-size: 12px;
}

#practiceView .practice-timer-panel {
  padding: 10px 12px;
}

#practiceView .practice-clock strong {
  font-size: clamp(34px, 4.2vw, 46px);
}

#practiceView .practice-session-stat-grid {
  padding: 8px 10px;
}

#practiceView .practice-session-stat-grid article {
  min-height: 50px;
  padding: 8px 10px;
}

#practiceView .practice-session-box .session-list {
  min-height: 180px;
  padding: 10px 14px;
  overflow: auto;
}

#practiceView .practice-session-box .session-actions {
  min-height: 42px;
  padding: 0 14px 12px;
}

@media (min-width: 1241px) {
  #practiceView .practice-session-layout {
    height: 540px;
    min-height: 540px;
    max-height: 540px;
  }

  #practiceView .practice-studio-session,
  #practiceView .practice-side-column,
  #practiceView .practice-picker-side,
  #practiceView .practice-splitter {
    height: 100%;
    min-height: 0;
  }

  #practiceView .practice-studio-session {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    overflow: hidden;
  }

  #practiceView .practice-session-box .session-list {
    min-height: 0;
  }
}

#practiceView .practice-picker-side .quick-filters {
  align-items: center;
  gap: 5px;
  overflow: visible;
}

#practiceView .practice-picker-side .quick-filter,
#practiceView .practice-picker-side .quick-filter-more summary {
  min-height: 26px;
  padding: 4px 8px;
  color: #4f625b;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.76);
  font-size: 10px;
  font-weight: 760;
  line-height: 1;
}

#practiceView .practice-picker-side .quick-filter.active {
  color: var(--tea-green);
  border-color: rgba(31, 111, 99, 0.24);
  background: rgba(226, 248, 234, 0.82);
}

#practiceView .practice-picker-side .quick-filter-more {
  position: relative;
  flex: 0 0 auto;
}

#practiceView .practice-picker-side .quick-filter-more summary {
  display: inline-flex;
  align-items: center;
  list-style: none;
  cursor: pointer;
}

#practiceView .practice-picker-side .quick-filter-more summary::-webkit-details-marker {
  display: none;
}

#practiceView .practice-picker-side .quick-filter-more summary::after {
  content: "+";
  margin-left: 5px;
  font-weight: 900;
}

#practiceView .practice-picker-side .quick-filter-more[open] summary::after {
  content: "-";
}

#practiceView .practice-picker-side .quick-filter-more > div {
  position: absolute;
  z-index: 8;
  right: 0;
  top: calc(100% + 6px);
  display: grid;
  gap: 5px;
  min-width: 126px;
  padding: 7px;
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.98);
  box-shadow: 0 14px 32px rgba(18, 58, 52, 0.12);
}

#practiceView .practice-picker-side .quick-filter-more .quick-filter {
  width: 100%;
  justify-content: flex-start;
}

#practiceView .practice-picker-side .song-card {
  align-self: start;
  grid-template-rows: auto auto;
  gap: 7px;
  min-height: 116px;
  padding: 9px 10px;
}

#practiceView .practice-picker-side .song-card-main {
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding-right: 42px;
}

#practiceView .practice-picker-side .cover-art-card {
  width: 64px;
}

#practiceView .practice-picker-side .song-card-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

#practiceView .practice-picker-side .song-card-actions {
  position: static;
  right: auto;
  bottom: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 0;
  margin-top: 2px;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

#practiceView .practice-picker-side .song-card-actions .text-link,
#practiceView .practice-picker-side .song-card-actions button {
  min-height: 25px;
  padding: 4px 8px;
  font-size: 10px;
  line-height: 1;
}

#practiceView .practice-picker-side .song-card-status {
  margin-top: 7px;
  font-size: 11px;
}

#practiceView .practice-picker-side .drag-handle {
  display: none;
}

/* Design language system: studio utility */
:root {
  --ui-bg: #eef3ef;
  --ui-rail: #143d36;
  --ui-rail-strong: #0e2d28;
  --ui-surface: #fffdf8;
  --ui-surface-raised: #ffffff;
  --ui-surface-soft: #f5f1e7;
  --ui-text: #102f2b;
  --ui-muted: #62736c;
  --ui-muted-strong: #42554e;
  --ui-line: rgba(22, 74, 65, 0.14);
  --ui-line-strong: rgba(22, 74, 65, 0.24);
  --ui-primary: #28b9a7;
  --ui-primary-strong: #159987;
  --ui-primary-soft: rgba(40, 185, 167, 0.14);
  --ui-accent: #c9a24d;
  --ui-accent-soft: rgba(201, 162, 77, 0.14);
  --ui-danger: #b64b4b;
  --ui-space-1: 4px;
  --ui-space-2: 8px;
  --ui-space-3: 12px;
  --ui-space-4: 16px;
  --ui-space-5: 20px;
  --ui-space-6: 24px;
  --ui-space-7: 32px;
  --ui-radius-sm: 6px;
  --ui-radius-md: 8px;
  --ui-radius-pill: 999px;
  --ui-shadow-soft: 0 16px 40px rgba(31, 55, 45, 0.09);
  --ui-shadow-lift: 0 20px 48px rgba(31, 55, 45, 0.14);
}

body {
  color: var(--ui-text);
  background:
    linear-gradient(180deg, rgba(218, 235, 224, 0.86), rgba(238, 243, 239, 0.96) 320px),
    var(--ui-bg);
}

.app-shell {
  gap: var(--ui-space-2);
  background: var(--ui-bg);
}

.left-rail {
  background:
    linear-gradient(180deg, rgba(31, 99, 88, 0.92), var(--ui-rail-strong)),
    var(--ui-rail);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.left-rail .brand {
  border-color: rgba(255, 253, 248, 0.12);
  background: rgba(255, 253, 248, 0.08);
}

.brand-mark {
  color: #062d27;
  background:
    linear-gradient(135deg, #89eadb, var(--ui-primary)),
    var(--ui-primary);
}

.step {
  color: rgba(255, 253, 248, 0.78);
  border-radius: var(--ui-radius-md);
}

.step:hover,
.step.active {
  color: #ffffff;
  background: rgba(137, 234, 219, 0.16);
  box-shadow: inset 0 0 0 1px rgba(137, 234, 219, 0.08);
}

.main-shell {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.95), rgba(246, 242, 232, 0.94) 420px),
    var(--ui-surface-soft);
}

.topbar {
  min-height: 88px;
  padding: var(--ui-space-4) var(--ui-space-6);
  border-bottom: 1px solid var(--ui-line);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.topbar::after {
  background: linear-gradient(90deg, transparent, rgba(40, 185, 167, 0.34), transparent);
}

.topbar h2 {
  color: var(--ui-text);
  font-size: 28px;
}

.page-kicker,
.eyebrow {
  color: var(--ui-muted-strong);
  font-weight: 850;
}

p,
.meta,
.topbar #flowSummary {
  color: var(--ui-muted);
}

button,
.file-button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(40, 185, 167, 0.24);
  border-radius: var(--ui-radius-pill);
  color: #082f2a;
  background:
    linear-gradient(135deg, #70dece, var(--ui-primary)),
    var(--ui-primary);
  box-shadow: 0 9px 22px rgba(21, 153, 135, 0.16);
  font-weight: 850;
  line-height: 1;
}

button:hover,
.file-button:hover,
.button-link:hover {
  border-color: rgba(21, 153, 135, 0.42);
  background:
    linear-gradient(135deg, #7de8d8, var(--ui-primary-strong)),
    var(--ui-primary-strong);
  box-shadow: 0 13px 28px rgba(21, 153, 135, 0.2);
}

button.secondary,
.file-button.secondary,
button.ghost,
button.quick-filter,
button.choice,
button.familiarity-chip,
.button-link.secondary,
.button-link[aria-disabled="true"] {
  color: var(--ui-text);
  border-color: var(--ui-line);
  background: rgba(255, 253, 248, 0.86);
  box-shadow: none;
}

button.secondary:hover,
.file-button.secondary:hover,
button.ghost:hover,
button.quick-filter:hover,
button.quick-filter.active,
button.choice:hover,
button.choice.active,
button.familiarity-chip:hover,
button.familiarity-chip.active,
.button-link.secondary:hover {
  color: var(--ui-primary-strong);
  border-color: rgba(40, 185, 167, 0.32);
  background: var(--ui-primary-soft);
  box-shadow: none;
}

button:disabled,
button[aria-disabled="true"],
.button-link[aria-disabled="true"] {
  color: rgba(66, 85, 78, 0.62);
  border-color: rgba(22, 74, 65, 0.12);
  background: rgba(231, 226, 214, 0.76);
  box-shadow: none;
  opacity: 1;
}

button.danger {
  color: var(--ui-danger);
  border-color: rgba(182, 75, 75, 0.24);
  background: rgba(255, 245, 245, 0.82);
}

input,
select,
textarea {
  min-height: 38px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-pill);
  color: var(--ui-text);
  background: rgba(255, 253, 248, 0.94);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(40, 185, 167, 0.52);
  box-shadow: 0 0 0 3px rgba(40, 185, 167, 0.13);
  outline: none;
}

button:focus-visible,
a:focus-visible,
.button-link:focus-visible {
  outline: 2px solid rgba(21, 153, 135, 0.74);
  outline-offset: 2px;
}

.panel,
.panel-lite,
.session-box,
.music-library-panel,
.upload-panel,
.quiet-panel,
.spotify-setup,
.playlist-panel,
.profile-panel,
.match-section,
#practiceView .practice-planner-workbench,
#uploadView .importer-workbench,
#spotifyView .spotify-connect-workbench {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-soft);
}

.section-title,
.music-library-header,
.profile-section-title,
.section-heading {
  padding: var(--ui-space-4) var(--ui-space-5);
  border-bottom-color: var(--ui-line);
}

.badge,
.status-pill,
.count-pill,
.music-summary {
  border-color: var(--ui-line);
  color: var(--ui-muted-strong);
  background: rgba(255, 253, 248, 0.82);
}

.topbar .status-pill {
  background: #082f2a;
}

.topbar .status-pill.connected::before {
  background: #72ead5;
  box-shadow: 0 0 16px rgba(114, 234, 213, 0.72);
}

#practiceView.view.active,
#practiceView .practice-studio-workspace {
  min-height: 1000px;
}

#practiceView .practice-studio-workspace {
  gap: var(--ui-space-3);
  align-content: stretch;
  padding-bottom: var(--ui-space-7);
}

#practiceView .practice-planner-summary {
  min-height: 58px;
  padding: 12px 16px;
  color: #f8fff9;
  border-radius: var(--ui-radius-md);
  background:
    linear-gradient(135deg, rgba(20, 61, 54, 0.98), rgba(30, 95, 84, 0.94)),
    var(--ui-rail);
}

#practiceView .practice-planner-toggle {
  color: #082f2a;
  background: #a8eee2;
}

#practiceView .practice-studio-pulse {
  border-color: var(--ui-line);
  background: var(--ui-surface-raised);
  box-shadow: var(--ui-shadow-soft);
}

#practiceView .practice-pulse-card {
  min-height: 58px;
  padding: 10px 14px;
  border-right-color: var(--ui-line);
  background: rgba(255, 253, 248, 0.9);
}

#practiceView .practice-pulse-card:hover {
  background: linear-gradient(180deg, #ffffff, #f2fbf8);
}

#practiceView .practice-pulse-card strong {
  color: var(--ui-primary-strong);
}

#practiceView .practice-session-layout {
  grid-template-columns:
    minmax(560px, var(--practice-left, 58%))
    12px
    minmax(390px, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: 724px;
  height: auto;
  max-height: none;
}

#practiceView .practice-splitter {
  width: 12px;
  min-height: 724px;
  background:
    linear-gradient(180deg, rgba(40, 185, 167, 0.18), rgba(255, 253, 248, 0.2)),
    var(--ui-bg);
}

#practiceView .practice-splitter span {
  background: rgba(20, 61, 54, 0.42);
}

#practiceView .practice-studio-session,
#practiceView .practice-picker-side {
  min-height: 724px;
  height: auto;
  max-height: none;
  border-color: var(--ui-line);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-soft);
}

#practiceView .practice-studio-session {
  border-radius: var(--ui-radius-md) 0 0 var(--ui-radius-md);
}

#practiceView .practice-picker-side {
  border-radius: 0 var(--ui-radius-md) var(--ui-radius-md) 0;
}

#practiceView .practice-session-title,
#practiceView .practice-picker-side .section-title {
  min-height: 82px;
  padding: 14px 16px;
  background: rgba(255, 253, 248, 0.76);
}

#practiceView .practice-timer-panel {
  padding: 14px 16px;
  background:
    linear-gradient(135deg, rgba(40, 185, 167, 0.13), rgba(201, 162, 77, 0.08)),
    rgba(255, 253, 248, 0.78);
}

#practiceView .practice-clock strong {
  color: var(--ui-primary-strong);
}

#practiceView .practice-timer-actions {
  gap: var(--ui-space-2);
}

#practiceView .practice-session-stat-grid {
  gap: var(--ui-space-2);
  padding: 10px 12px;
}

#practiceView .practice-session-stat-grid article {
  min-height: 54px;
  border-color: var(--ui-line);
  border-radius: var(--ui-radius-sm);
  background: rgba(255, 253, 248, 0.8);
}

#practiceView .practice-session-box .session-list {
  min-height: 394px;
  max-height: none;
  padding: 14px 16px;
}

#practiceView .studio-drop-hint span {
  border-color: rgba(40, 185, 167, 0.32);
  color: var(--ui-primary-strong);
  background: rgba(255, 253, 248, 0.88);
}

#practiceView .practice-session-box .session-actions {
  gap: var(--ui-space-2);
  min-height: 54px;
  padding: 0 16px 16px;
}

#practiceView .practice-session-box .session-actions button:disabled,
#practiceView .practice-timer-actions button:disabled,
#practiceView .practice-timer-actions button[aria-disabled="true"],
#uploadView .upload-actions button:disabled,
#spotifyView .spotify-connect-actions button:disabled {
  color: rgba(66, 85, 78, 0.62);
  border-color: rgba(22, 74, 65, 0.12);
  background: rgba(231, 226, 214, 0.76);
  box-shadow: none;
  transform: none;
}

#practiceView .practice-picker-side .practice-search-rail {
  padding: 12px 16px 0;
}

#practiceView .practice-picker-side .song-search-form {
  gap: var(--ui-space-2);
  padding: 0;
}

#practiceView .practice-picker-side #songSearchInput {
  min-width: 0;
}

#practiceView .practice-picker-side .quick-filters {
  gap: 6px;
  padding: 10px 0 0;
}

#practiceView .practice-picker-side .quick-filter,
#practiceView .practice-picker-side .quick-filter-more summary {
  min-height: 28px;
  padding: 5px 9px;
  color: var(--ui-muted-strong);
  border-color: var(--ui-line);
  background: rgba(255, 253, 248, 0.84);
  font-size: 11px;
}

#practiceView .practice-picker-side .quick-filter.active {
  color: var(--ui-primary-strong);
  border-color: rgba(40, 185, 167, 0.34);
  background: var(--ui-primary-soft);
}

#practiceView .practice-picker-side .search-helper {
  padding: 10px 16px 0;
}

#practiceView .practice-picker-side .song-card-grid {
  max-height: none;
  padding: 12px 16px 16px;
}

#practiceView .practice-picker-side .song-card {
  border-color: var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: rgba(255, 253, 248, 0.9);
}

#practiceView .practice-picker-side .song-card:hover {
  border-color: rgba(40, 185, 167, 0.28);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(31, 55, 45, 0.1);
}

#practiceView .practice-picker-side .song-card-actions button,
#practiceView .practice-picker-side .song-card-actions .text-link {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 11px;
}

#practiceView .card-add-indicator,
#practiceView .mini-add-button,
#practiceView .mini-play-button {
  color: #082f2a;
  background:
    linear-gradient(135deg, #8eeadb, var(--ui-primary)),
    var(--ui-primary);
  box-shadow: 0 12px 26px rgba(21, 153, 135, 0.2);
}

@media (min-width: 1241px) {
  #practiceView .practice-session-layout {
    height: auto;
    min-height: 724px;
    max-height: none;
  }

  #practiceView .practice-studio-session {
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    overflow: hidden;
  }
}

@media (max-width: 1240px) {
  #practiceView .practice-session-layout {
    grid-template-columns: 1fr;
    gap: var(--ui-space-3);
    min-height: auto;
  }

  #practiceView .practice-splitter {
    display: none;
  }

  #practiceView .practice-studio-session,
  #practiceView .practice-picker-side {
    min-height: 0;
    border-radius: var(--ui-radius-md);
  }
}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

  #practiceView.view.active,
  #practiceView .practice-studio-workspace {
    min-height: 1000px;
  }

  #practiceView .practice-picker-side .song-search-form {
    grid-template-columns: 1fr;
  }
}

/* Practice standard-screen fit pass */
body[data-view="practice"] {
  min-height: calc(100vh - 8px);
  padding-bottom: 0;
}

body[data-view="practice"] .main-shell main {
  min-height: 0;
  padding: 10px 24px 20px;
}

body[data-view="practice"] .topbar {
  min-height: 76px;
  padding: 12px 24px;
}

body[data-view="practice"] .topbar h2 {
  font-size: 26px;
}

body[data-view="practice"] #flowSummary {
  font-size: 13px;
  line-height: 1.25;
}

body[data-view="practice"] #practiceView.view.active,
body[data-view="practice"] #practiceView .practice-studio-workspace {
  min-height: 0;
}

body[data-view="practice"] #practiceView .practice-studio-workspace {
  gap: 8px;
  padding-bottom: 0;
}

body[data-view="practice"] #practiceView .practice-planner-summary {
  min-height: 48px;
  padding: 9px 14px;
}

body[data-view="practice"] #practiceView .practice-planner-copy {
  gap: 6px;
}

body[data-view="practice"] #practiceView .practice-planner-copy small {
  font-size: 11px;
}

body[data-view="practice"] #practiceView .practice-studio-pulse {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-view="practice"] #practiceView .practice-pulse-card {
  min-height: 46px;
  padding: 7px 12px;
}

body[data-view="practice"] #practiceView .practice-pulse-card strong {
  font-size: 21px;
}

body[data-view="practice"] #practiceView .practice-session-layout {
  --practice-empty-fit: clamp(430px, calc(100vh - 266px), 560px);
  --practice-filled-fit: clamp(454px, calc(328px + (var(--bench-visible-slots, 1) * 112px)), 820px);
  min-height: var(--practice-empty-fit);
  height: var(--practice-empty-fit);
  max-height: none;
}

body[data-view="practice"] #practiceView .practice-session-layout.bench-has-songs {
  min-height: max(var(--practice-empty-fit), var(--practice-filled-fit));
  height: max(var(--practice-empty-fit), var(--practice-filled-fit));
}

body[data-view="practice"] #practiceView .practice-splitter,
body[data-view="practice"] #practiceView .practice-studio-session,
body[data-view="practice"] #practiceView .practice-picker-side {
  min-height: 0;
  height: 100%;
  max-height: 100%;
}

body[data-view="practice"] #practiceView .practice-session-title,
body[data-view="practice"] #practiceView .practice-picker-side .section-title {
  min-height: 62px;
  padding: 10px 14px;
}

body[data-view="practice"] #practiceView .practice-session-title h2,
body[data-view="practice"] #practiceView .practice-picker-side .section-title h2 {
  font-size: 18px;
}

body[data-view="practice"] #practiceView .practice-session-title p,
body[data-view="practice"] #practiceView .practice-picker-side .section-title p {
  font-size: 12px;
  line-height: 1.25;
}

body[data-view="practice"] #practiceView .practice-timer-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
}

body[data-view="practice"] #practiceView .practice-clock strong {
  font-size: clamp(32px, 3.5vw, 42px);
}

body[data-view="practice"] #practiceView .practice-timer-actions button {
  min-height: 34px;
  padding: 7px 12px;
}

body[data-view="practice"] #practiceView .practice-log-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background:
    linear-gradient(135deg, rgba(40, 185, 167, 0.1), rgba(255, 253, 248, 0.88)),
    rgba(255, 253, 248, 0.9);
}

body[data-view="practice"] #practiceView .practice-log-strip > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body[data-view="practice"] #practiceView .practice-log-strip strong {
  color: var(--ui-text);
  font-size: 14px;
  line-height: 1;
}

body[data-view="practice"] #practiceView .practice-log-strip span {
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.2;
}

body[data-view="practice"] #practiceView .practice-log-strip .session-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  min-height: 0;
  padding: 0;
}

body[data-view="practice"] #practiceView .practice-log-strip .session-actions button {
  min-height: 32px;
  padding: 6px 12px;
}

body[data-view="practice"] #practiceView .practice-session-stat-grid {
  padding: 8px 10px;
}

body[data-view="practice"] #practiceView .practice-session-stat-grid article {
  min-height: 48px;
  padding: 8px 10px;
}

body[data-view="practice"] #practiceView .practice-session-box .session-list {
  min-height: 0;
  padding: 10px 14px;
}

body[data-view="practice"] #practiceView .practice-session-box.has-session-songs .session-list {
  height: min(calc(var(--bench-visible-slots, 1) * 116px), 580px);
  max-height: min(calc(var(--bench-visible-slots, 1) * 116px), 580px);
  overflow: auto;
}

body[data-view="practice"] #practiceView .practice-session-box .session-empty.now-playing-empty {
  min-height: 150px;
}

body[data-view="practice"] #practiceView .practice-session-box .session-actions {
  min-height: 42px;
  padding: 0 14px 10px;
}

body[data-view="practice"] #practiceView .session-card {
  min-height: 104px;
  padding: 12px 14px;
  column-gap: 12px;
}

body[data-view="practice"] #practiceView .session-card-title {
  gap: 12px;
}

body[data-view="practice"] #practiceView .session-card-title h3 {
  font-size: 16px;
}

body[data-view="practice"] #practiceView .session-card-title p {
  font-size: 13px;
}

body[data-view="practice"] #practiceView .session-card .cover-art-sm {
  width: 54px;
}

body[data-view="practice"] #practiceView .playthrough-stepper {
  grid-template-columns: 36px minmax(104px, 126px) 36px;
  gap: 8px;
}

body[data-view="practice"] #practiceView .stepper-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  font-size: 21px;
}

body[data-view="practice"] #practiceView .playthrough-count {
  min-width: 104px;
  padding: 8px 10px;
}

body[data-view="practice"] #practiceView .playthrough-count strong {
  font-size: 22px;
}

body[data-view="practice"] #practiceView .session-card-actions {
  gap: 8px;
}

body[data-view="practice"] #practiceView .session-card-actions button,
body[data-view="practice"] #practiceView .session-card-actions .text-link {
  min-height: 31px;
  padding: 6px 12px;
  font-size: 12px;
}

body[data-view="practice"] #practiceView .practice-picker-side .practice-search-rail {
  padding: 10px 14px 0;
}

body[data-view="practice"] #practiceView .practice-picker-side .quick-filters {
  padding-top: 8px;
}

body[data-view="practice"] #practiceView .practice-picker-side .search-helper {
  padding: 8px 14px 0;
}

body[data-view="practice"] #practiceView .practice-picker-side .song-card-grid {
  min-height: 0;
  padding: 10px 14px 14px;
  overflow: auto;
}

@media (min-width: 1241px) {
  body[data-view="practice"] {
    min-height: calc(100vh - 8px);
    overflow-x: hidden;
  }

  body[data-view="practice"] .app-shell,
  body[data-view="practice"] .main-shell {
    min-height: 0;
    height: auto;
  }
}

@media (max-width: 1240px) {
  body[data-view="practice"] #practiceView .practice-session-layout {
    height: auto;
    max-height: none;
  }

  body[data-view="practice"] #practiceView .practice-studio-session,
  body[data-view="practice"] #practiceView .practice-picker-side {
    height: auto;
    max-height: none;
  }
}

@media (max-width: 860px) {
  body[data-view="practice"] #practiceView.view.active,
  body[data-view="practice"] #practiceView .practice-studio-workspace {
    min-height: 0;
  }

  body[data-view="practice"] .main-shell main {
    padding-inline: 14px;
  }

  body[data-view="practice"] #practiceView .practice-studio-pulse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-view="practice"] #practiceView .practice-timer-panel,
  body[data-view="practice"] #practiceView .practice-log-strip {
    grid-template-columns: 1fr;
  }

  body[data-view="practice"] #practiceView .practice-timer-actions,
  body[data-view="practice"] #practiceView .practice-log-strip .session-actions {
    justify-content: stretch;
  }

  body[data-view="practice"] #practiceView .practice-timer-actions > *,
  body[data-view="practice"] #practiceView .practice-log-strip .session-actions > * {
    flex: 1 1 0;
  }
}

/* Practice session confirmation */
.session-log-confirm-backdrop {
  z-index: 96;
  background: rgba(18, 50, 46, 0.54);
  backdrop-filter: blur(6px);
}

.session-log-confirm-modal {
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: hidden auto;
  color: var(--ui-text);
  border: 1px solid rgba(31, 111, 99, 0.18);
  border-radius: 10px;
  background: var(--ui-surface);
  box-shadow: 0 30px 90px rgba(21, 58, 52, 0.32);
}

.session-log-confirm-header {
  color: #fff8ea;
  border-bottom: 1px solid rgba(255, 248, 234, 0.16);
  background: linear-gradient(135deg, #153a34 0%, #1d665d 58%, #12322e 100%);
}

.session-log-confirm-header .eyebrow,
.session-log-confirm-header h2,
.session-log-confirm-header p {
  color: #fff8ea;
}

.session-log-confirm-header p:not(.eyebrow) {
  color: rgba(255, 248, 234, 0.76);
  font-weight: 700;
}

#sessionLogConfirmClose {
  color: #12322e;
  border-color: rgba(255, 248, 234, 0.36);
  background: rgba(255, 248, 234, 0.92);
  box-shadow: 0 10px 24px rgba(9, 35, 31, 0.18);
}

.session-log-confirm-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

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

.session-log-summary-grid article {
  display: grid;
  gap: 6px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: rgba(255, 253, 248, 0.86);
}

.session-log-summary-grid span {
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.session-log-summary-grid strong {
  color: var(--ui-text);
  font-size: 18px;
  line-height: 1.08;
}

.session-log-song-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: rgba(255, 253, 248, 0.74);
}

.session-log-song-panel h3 {
  color: var(--ui-text);
  font-size: 16px;
}

.session-log-song-list {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}

.session-log-song-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 3px 10px;
  align-items: center;
  min-height: 58px;
  padding: 8px;
  border: 1px solid rgba(31, 111, 99, 0.1);
  border-radius: var(--ui-radius-sm);
  background: rgba(255, 253, 248, 0.92);
}

.session-log-song-row > .cover-art-xs {
  grid-row: 1 / span 2;
}

.session-log-song-row .cover-art-xs {
  width: 44px;
  border-radius: var(--ui-radius-sm);
}

.session-log-song-row strong {
  overflow: hidden;
  color: var(--ui-text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-log-song-row em {
  overflow: hidden;
  color: var(--ui-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-log-song-row b {
  grid-column: 3;
  grid-row: 1 / span 2;
  color: var(--ui-primary-strong);
  font-size: 12px;
  white-space: nowrap;
}

.session-log-empty {
  padding: 16px;
  color: var(--ui-muted);
  text-align: center;
  font-weight: 800;
}

.session-log-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 680px) {
  .session-log-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .session-log-song-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .session-log-song-row b {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
  }

  .session-log-confirm-actions {
    justify-content: stretch;
  }

  .session-log-confirm-actions button {
    flex: 1 1 160px;
  }
}

/* Practice laptop/iPad polish: static split, tighter copy, no spacer gap */
body[data-view="practice"] .topbar {
  min-height: 72px;
}

body[data-view="practice"] #flowSummary {
  max-width: 420px;
}

body[data-view="practice"] #practiceView .practice-session-layout {
  --practice-empty-fit: clamp(500px, calc(100vh - 220px), 720px);
  --practice-filled-fit: clamp(500px, calc(356px + (var(--bench-visible-slots, 1) * 110px)), 900px);
  grid-template-columns: minmax(0, 1fr) clamp(360px, 38vw, 520px);
  gap: 12px;
  align-items: stretch;
  min-height: var(--practice-empty-fit);
  height: var(--practice-empty-fit);
  max-height: none;
}

body[data-view="practice"] #practiceView .practice-session-layout.bench-has-songs {
  min-height: max(var(--practice-empty-fit), var(--practice-filled-fit));
  height: max(var(--practice-empty-fit), var(--practice-filled-fit));
}

body[data-view="practice"] #practiceView .practice-splitter {
  display: none;
}

body[data-view="practice"] #practiceView .practice-studio-session,
body[data-view="practice"] #practiceView .practice-picker-side {
  border-radius: var(--ui-radius-md);
  min-height: 0;
  height: 100%;
  max-height: 100%;
}

body[data-view="practice"] #practiceView .practice-studio-session {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  overflow: hidden;
}

body[data-view="practice"] #practiceView .practice-picker-side {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

body[data-view="practice"] #practiceView .practice-session-title,
body[data-view="practice"] #practiceView .practice-picker-side .section-title {
  min-height: 56px;
  padding: 9px 14px;
}

body[data-view="practice"] #practiceView .practice-session-title > div,
body[data-view="practice"] #practiceView .practice-picker-side .section-title > div {
  gap: 2px;
}

body[data-view="practice"] #practiceView .practice-session-title h2,
body[data-view="practice"] #practiceView .practice-picker-side .section-title h2 {
  font-size: 17px;
}

body[data-view="practice"] #practiceView .practice-session-title p:not(.eyebrow),
body[data-view="practice"] #practiceView .practice-picker-side .section-title div p:not(.eyebrow) {
  color: var(--ui-muted);
  font-size: 11px;
}

body[data-view="practice"] #practiceView .practice-timer-panel {
  padding: 8px 14px;
}

body[data-view="practice"] #practiceView .practice-session-stat-grid {
  padding: 8px 10px 7px;
}

body[data-view="practice"] #practiceView .studio-drop-hint {
  display: none;
  max-height: none;
  margin: 0 12px 8px;
}

body.practice-card-dragging[data-view="practice"] #practiceView .studio-drop-hint,
body[data-view="practice"] #practiceView .practice-studio-session.drag-over .studio-drop-hint {
  display: grid;
}

body[data-view="practice"] #practiceView .practice-log-strip {
  margin: 8px 10px 0;
  padding: 9px 12px;
}

body[data-view="practice"] #practiceView .practice-log-strip .eyebrow {
  display: none;
}

body[data-view="practice"] #practiceView .practice-log-strip strong {
  font-size: 13px;
}

body[data-view="practice"] #practiceView .practice-log-strip span {
  font-size: 11px;
}

body[data-view="practice"] #practiceView .practice-session-box .session-list {
  min-height: 0;
  gap: 16px;
  padding: 14px;
  overflow: auto;
}

body[data-view="practice"] #practiceView .practice-session-box.has-session-songs .session-list {
  height: min(calc(var(--bench-visible-slots, 1) * 124px), 620px);
  max-height: min(calc(var(--bench-visible-slots, 1) * 124px), 620px);
}

body[data-view="practice"] #practiceView .practice-session-box .session-empty.now-playing-empty {
  min-height: 180px;
}

body[data-view="practice"] #practiceView .practice-picker-side .section-title > p {
  align-self: center;
}

body[data-view="practice"] #practiceView .practice-picker-side .practice-search-rail {
  padding: 9px 14px 0;
}

body[data-view="practice"] #practiceView .practice-picker-side .search-helper {
  padding-top: 6px;
  font-size: 11px;
}

body[data-view="practice"] #practiceView .practice-picker-side .song-card-grid {
  padding: 9px 14px 14px;
}

@media (max-width: 1180px) {
  body[data-view="practice"] #practiceView .practice-session-layout {
    grid-template-columns: minmax(0, 1fr) clamp(330px, 40vw, 430px);
  }
}

@media (max-width: 920px) {
  body[data-view="practice"] #practiceView .practice-session-layout {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
  }

  body[data-view="practice"] #practiceView .practice-studio-session,
  body[data-view="practice"] #practiceView .practice-picker-side {
    height: auto;
    max-height: none;
  }
}

/* App design language rollout: align non-practice tabs with Practice Studio */
body[data-view="profile"] .topbar,
body[data-view="upload"] .topbar,
body[data-view="spotify"] .topbar {
  min-height: 72px;
  padding: 12px 24px;
}

body[data-view="profile"] #flowSummary,
body[data-view="upload"] #flowSummary,
body[data-view="spotify"] #flowSummary {
  max-width: 420px;
  font-size: 13px;
  line-height: 1.25;
}

body[data-view="profile"] .main-shell main,
body[data-view="upload"] .main-shell main,
body[data-view="spotify"] .main-shell main {
  min-height: 0;
  padding: 10px 24px 20px;
}

#profileView .profile-workspace,
#uploadView,
#spotifyView .spotify-workspace {
  display: grid;
  gap: 8px;
  align-content: start;
  padding-bottom: 0;
}

#profileView .profile-summary-panel,
#profileView .profile-panel,
#uploadView .importer-workbench,
#uploadView .music-library-panel,
#uploadView .sheet-preview-panel,
#spotifyView .spotify-connect-workbench,
#spotifyView .spotify-review-main,
#spotifyView .playlist-panel,
#spotifyView .spotify-workflow-panel {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-soft);
}

#profileView .profile-dashboard-grid,
#uploadView .library-database-layout,
#spotifyView .spotify-review-layout {
  gap: 12px;
}

#profileView .profile-dashboard-grid {
  grid-template-columns: minmax(0, 1fr) clamp(320px, 32vw, 350px);
}

#uploadView .library-database-layout:not(.preview-collapsed) {
  grid-template-columns: minmax(0, 1fr) clamp(360px, 30vw, 400px);
  align-items: stretch;
}

#uploadView .library-preview-splitter {
  display: none;
}

#spotifyView .spotify-review-layout {
  grid-template-columns: minmax(0, 1fr) clamp(360px, 34vw, 430px);
  align-items: start;
}

#profileView .profile-hero {
  min-height: 154px;
  padding: 14px;
}

#profileView .profile-avatar {
  width: 76px;
  height: 76px;
  border-radius: var(--ui-radius-md);
}

#profileView .profile-score {
  min-height: 110px;
  border-radius: var(--ui-radius-md);
}

#profileView .profile-metrics-strip,
#uploadView .sheet-music-pulse,
#spotifyView .spotify-music-pulse {
  min-height: 48px;
  overflow: hidden;
  border-color: var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface-raised);
  box-shadow: var(--ui-shadow-soft);
}

#profileView .profile-stat,
#uploadView .sheet-pulse-card,
#spotifyView .spotify-pulse-card {
  min-height: 48px;
  padding: 7px 12px;
  background: rgba(255, 253, 248, 0.9);
}

#profileView .profile-stat strong,
#uploadView .sheet-pulse-card strong,
#spotifyView .spotify-pulse-card strong {
  color: var(--ui-primary-strong);
  font-size: 21px;
}

#profileView .profile-section-title,
#uploadView .music-library-header,
#uploadView .sheet-preview-header,
#spotifyView .spotify-review-toolbar,
#spotifyView .spotify-panel-heading {
  min-height: 56px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ui-line);
  background: rgba(255, 253, 248, 0.76);
}

#profileView .profile-section-title h2,
#uploadView .music-library-header h2,
#uploadView .sheet-preview-header h2,
#spotifyView .spotify-review-toolbar h2,
#spotifyView .spotify-panel-heading h2 {
  font-size: 17px;
  line-height: 1.12;
}

#profileView .profile-section-title p:not(.eyebrow),
#uploadView .music-library-header p:not(.eyebrow),
#uploadView .sheet-preview-header p:not(.eyebrow),
#spotifyView .spotify-review-toolbar p:not(.eyebrow),
#spotifyView .spotify-panel-heading p:not(.eyebrow) {
  color: var(--ui-muted);
  font-size: 11px;
  line-height: 1.2;
}

#uploadView .importer-workbench,
#spotifyView .spotify-connect-workbench {
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(20, 61, 54, 0.98), rgba(30, 95, 84, 0.94)),
    var(--ui-rail);
}

#uploadView .importer-summary,
#spotifyView .spotify-connect-summary {
  min-height: 48px;
  padding: 9px 14px;
  color: #fff8ea;
}

#uploadView .importer-summary-copy,
#spotifyView .spotify-connect-copy {
  gap: 8px;
}

#uploadView .importer-summary-copy .eyebrow,
#uploadView .importer-summary-copy strong,
#uploadView .importer-summary-copy small,
#spotifyView .spotify-connect-copy .eyebrow,
#spotifyView .spotify-connect-copy strong,
#spotifyView .spotify-connect-copy small {
  color: #fff8ea;
}

#uploadView .importer-summary-copy .eyebrow,
#spotifyView .spotify-connect-copy .eyebrow {
  color: #8ee4d1;
}

#uploadView .importer-summary-copy strong,
#spotifyView .spotify-connect-copy strong {
  font-size: 17px;
}

#uploadView .importer-summary-copy small,
#spotifyView .spotify-connect-copy small {
  color: rgba(255, 248, 234, 0.76);
  font-size: 11px;
}

#uploadView .importer-summary-toggle,
#spotifyView .spotify-connect-actions button {
  min-height: 32px;
  padding: 6px 12px;
  color: #082f2a;
  border-color: rgba(168, 238, 226, 0.44);
  background: #a8eee2;
  box-shadow: none;
}

#uploadView .importer-body {
  padding: 14px;
  background: var(--ui-surface);
}

#spotifyView .spotify-flow-steps {
  padding: 0 14px 14px;
}

#spotifyView .spotify-flow-step {
  min-height: 50px;
  border-color: rgba(255, 248, 234, 0.14);
  background: rgba(255, 248, 234, 0.08);
}

#uploadView .library-search-dock {
  padding: 10px 14px;
}

#uploadView .music-table-tools,
#spotifyView .spotify-review-controls,
#spotifyView .spotify-queue-search {
  gap: 8px;
}

#uploadView .music-table-tools {
  grid-template-columns: minmax(220px, 1fr) minmax(128px, 160px) minmax(128px, 160px);
}

#uploadView .music-library-panel,
#uploadView .sheet-preview-panel,
#spotifyView .spotify-review-main,
#spotifyView .playlist-panel,
#spotifyView .spotify-workflow-panel {
  min-height: min(650px, calc(100vh - 214px));
}

#uploadView .sheet-preview-panel {
  padding: 0;
}

#uploadView .sheet-preview-actions {
  gap: 8px;
  padding: 8px 14px;
}

#uploadView .sheet-preview-frame {
  margin: 0 14px 14px;
}

#spotifyView .spotify-review-toolbar {
  gap: 10px;
}

#spotifyView .playlist-panel {
  overflow: hidden;
  min-height: 168px;
  background:
    linear-gradient(145deg, rgba(16, 47, 43, 0.98), rgba(31, 111, 99, 0.94) 64%, rgba(201, 162, 77, 0.56)),
    var(--ui-rail);
}

#spotifyView .spotify-workflow-panel {
  min-height: 0;
}

#spotifyView .playlist-actions {
  padding: 0 14px 14px;
}

#spotifyView #createPlaylists {
  width: 100%;
  min-height: 44px;
}

#profileView button,
#uploadView button,
#spotifyView button,
#uploadView .button-link,
#uploadView .file-button,
#spotifyView .button-link {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
}

#profileView .profile-rotation-feature,
#profileView .profile-compact-panel,
#profileView .profile-session-feed-card,
#profileView .profile-tools-card {
  border-radius: var(--ui-radius-md);
}

#profileView .profile-rotation-feature {
  min-height: 132px;
}

#profileView .profile-rotation-copy strong {
  font-size: 22px;
  line-height: 1.04;
}

@media (max-width: 1180px) {
  #profileView .profile-dashboard-grid,
  #uploadView .library-database-layout:not(.preview-collapsed),
  #spotifyView .spotify-review-layout {
    grid-template-columns: 1fr;
  }

  #uploadView .music-library-panel,
  #uploadView .sheet-preview-panel,
  #spotifyView .spotify-review-main,
  #spotifyView .playlist-panel,
  #spotifyView .spotify-workflow-panel {
    min-height: 0;
  }
}

/* Spotify setup walkthrough and field help */
#spotifyView .spotify-setup-walkthrough {
  display: grid;
  gap: 10px;
  margin: 0 14px 14px;
  padding: 10px;
  color: #fff8ea;
  border: 1px solid rgba(255, 248, 234, 0.14);
  border-radius: var(--ui-radius-md);
  background: rgba(255, 248, 234, 0.07);
}

#spotifyView .spotify-setup-walkthrough-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

#spotifyView .spotify-setup-walkthrough-heading span {
  color: #8ee4d1;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

#spotifyView .spotify-setup-walkthrough-heading strong {
  overflow: hidden;
  color: #fff8ea;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#spotifyView .spotify-setup-checklist {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

#spotifyView .spotify-setup-step {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 7px;
  align-content: start;
  min-width: 0;
  min-height: 118px;
  padding: 9px;
  border: 1px solid rgba(255, 248, 234, 0.13);
  border-radius: var(--ui-radius-md);
  background: rgba(255, 248, 234, 0.07);
}

#spotifyView .spotify-setup-step > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #10332e;
  border-radius: 999px;
  background: rgba(255, 248, 234, 0.86);
  font-size: 11px;
  font-weight: 900;
}

#spotifyView .spotify-setup-step.done > span {
  background: #77dfbd;
}

#spotifyView .spotify-setup-step.active {
  border-color: rgba(142, 228, 209, 0.46);
  background: rgba(142, 228, 209, 0.12);
}

#spotifyView .spotify-setup-step strong {
  display: block;
  color: #fff8ea;
  font-size: 12px;
  line-height: 1.15;
}

#spotifyView .spotify-setup-step p {
  margin: 3px 0 0;
  color: rgba(255, 248, 234, 0.7);
  font-size: 11px;
  font-weight: 740;
  line-height: 1.25;
}

#spotifyView .spotify-setup-step button {
  grid-column: 1 / -1;
  align-self: end;
  min-height: 30px;
  padding: 5px 9px;
  color: #fff8ea;
  border-color: rgba(255, 248, 234, 0.14);
  background: rgba(255, 248, 234, 0.08);
  box-shadow: none;
}

#spotifyView .spotify-setup-step.active button {
  color: #082f2a;
  border-color: rgba(168, 238, 226, 0.44);
  background: #a8eee2;
}

#spotifyView .spotify-setup-step button[aria-disabled="true"] {
  cursor: default;
  color: rgba(255, 248, 234, 0.62);
  border-color: rgba(255, 248, 234, 0.1);
  background: rgba(255, 248, 234, 0.05);
}

.spotify-field-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.spotify-help-tip {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #0f2f2a;
  border-radius: 999px;
  background: #a8eee2;
  font-size: 11px;
  font-weight: 900;
  text-transform: none;
  cursor: help;
}

.spotify-help-tip span,
.spotify-tooltip-trigger::after {
  position: absolute;
  z-index: 120;
  width: min(260px, 70vw);
  padding: 9px 10px;
  color: #fff8ea;
  border: 1px solid rgba(255, 248, 234, 0.14);
  border-radius: var(--ui-radius-md);
  background: #123a34;
  box-shadow: 0 16px 38px rgba(11, 39, 35, 0.22);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.3;
  text-transform: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.spotify-help-tip span {
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translate(-50%, 4px);
}

.spotify-help-tip:hover span,
.spotify-help-tip:focus-visible span {
  opacity: 1;
  transform: translate(-50%, 0);
}

.spotify-tooltip-trigger {
  position: relative;
}

.spotify-tooltip-trigger::after {
  content: attr(data-tooltip);
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translate(-50%, 4px);
}

.spotify-tooltip-trigger:hover::after,
.spotify-tooltip-trigger:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.spotify-connect-guide .spotify-modal-steps span {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 2px 8px;
  align-items: center;
}

.spotify-connect-guide .spotify-modal-steps span strong {
  grid-row: 1 / span 2;
}

.spotify-connect-guide .spotify-modal-steps span b {
  color: #fff8ea;
  font-size: 12px;
  line-height: 1.1;
}

.spotify-connect-guide .spotify-modal-steps span small {
  color: rgba(255, 248, 234, 0.68);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.2;
}

@media (max-width: 1180px) {
  #spotifyView .spotify-setup-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  #spotifyView .spotify-setup-checklist {
    grid-template-columns: 1fr;
  }

  #spotifyView .spotify-setup-walkthrough-heading {
    display: grid;
  }
}

/* Sheet Music preview polish */
#uploadView .sheet-preview-panel {
  overflow: hidden;
}

#uploadView .sheet-preview-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: start;
  gap: 12px;
  min-height: 74px;
  padding: 12px 14px 10px;
}

#uploadView .sheet-preview-header > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#uploadView .sheet-preview-header h2 {
  overflow: hidden;
  max-width: 100%;
  color: var(--ui-text);
  font-size: 17px;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#uploadView .sheet-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 21px;
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
}

#uploadView .sheet-preview-meta span {
  max-width: 100%;
  padding: 4px 7px;
  overflow: hidden;
  border: 1px solid rgba(31, 111, 99, 0.1);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.74);
  text-overflow: ellipsis;
  white-space: nowrap;
}

#uploadView .sheet-preview-actions {
  grid-template-columns: minmax(136px, 1fr) minmax(74px, 88px) minmax(74px, 88px);
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(31, 111, 99, 0.1);
}

#uploadView .sheet-preview-actions button,
#uploadView .sheet-preview-actions .button-link {
  min-height: 36px;
  height: 36px;
  border-radius: var(--ui-radius-sm);
  font-size: 12px;
}

#uploadView .sheet-preview-actions #sheetPreviewSpread {
  min-height: 38px;
  height: 38px;
  color: #082f2a;
  border-color: rgba(67, 193, 177, 0.28);
  background: linear-gradient(135deg, #43c1b1, #8ee4d1);
  box-shadow: 0 10px 24px rgba(67, 193, 177, 0.16);
}

#uploadView .sheet-preview-actions #sheetPreviewOpen,
#uploadView .sheet-preview-actions #sheetPreviewDetails {
  color: var(--ui-text);
  border-color: rgba(31, 111, 99, 0.1);
  background: rgba(255, 253, 248, 0.78);
  box-shadow: none;
}

#uploadView .sheet-preview-actions #sheetPreviewOpen {
  font-size: 11px;
}

#uploadView .sheet-preview-frame {
  margin: 0 14px 14px;
  border-radius: var(--ui-radius-sm);
}

#uploadView .library-database-layout.preview-collapsed {
  grid-template-columns: minmax(0, 1fr) 72px;
}

#uploadView .library-database-layout.preview-collapsed .sheet-preview-panel {
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: var(--ui-radius-md);
  background: rgba(255, 253, 248, 0.66);
  box-shadow: var(--ui-shadow-soft);
}

#uploadView .library-database-layout.preview-collapsed .preview-rail-toggle {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 100%;
  padding: 14px 7px;
  color: #fff8ea;
  border: 1px solid rgba(142, 228, 209, 0.26);
  border-radius: var(--ui-radius-sm);
  background:
    linear-gradient(180deg, rgba(142, 228, 209, 0.16), rgba(142, 228, 209, 0) 34%),
    linear-gradient(180deg, #153a34, #1d665d 58%, #12322e);
  box-shadow: 0 14px 28px rgba(17, 55, 49, 0.18);
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
  writing-mode: horizontal-tb;
  transform: none;
}

#uploadView .preview-rail-label {
  font-size: 12px;
  line-height: 1;
}

#uploadView .preview-rail-hint {
  width: 100%;
  max-width: 100%;
  color: rgba(255, 248, 234, 0.72);
  font-size: 10px;
  line-height: 1.1;
  text-align: center;
}

#uploadView .preview-rail-chevron {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  border: 1px solid rgba(255, 248, 234, 0.18);
  border-radius: 999px;
  background: rgba(255, 248, 234, 0.12);
}

#uploadView .preview-rail-chevron::before {
  content: "";
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

/* Sheet Music and Spotify modal refinement pass */
#uploadView .library-search-dock {
  gap: 8px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(31, 111, 99, 0.07);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.72), rgba(255, 253, 248, 0.34)),
    var(--ui-surface);
  box-shadow: none;
}

#uploadView .music-table-tools {
  grid-template-columns: minmax(220px, 1fr) minmax(118px, 150px) minmax(118px, 150px);
  gap: 8px;
  align-items: center;
}

#uploadView .music-table-tools input,
#uploadView .music-table-tools select,
#uploadView .music-table-tools button {
  min-height: 34px;
  height: 34px;
  padding: 7px 10px;
  border-color: rgba(31, 111, 99, 0.11);
  border-radius: var(--ui-radius-sm);
  background: rgba(255, 253, 248, 0.76);
  box-shadow: none;
  font-size: 12px;
}

#uploadView #musicTableSearch {
  min-height: 38px;
  height: 38px;
  padding-inline: 12px;
  border-color: rgba(31, 111, 99, 0.18);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 2px rgba(142, 228, 209, 0.05);
  font-size: 14px;
}

#uploadView #clearMusicTableFilters {
  color: var(--ui-text);
  background: rgba(255, 253, 248, 0.66);
}

#uploadView #musicTableSearch {
  grid-column: 1;
}

#uploadView #musicTableFamiliarity {
  grid-column: 2;
}

#uploadView #musicTableStatus {
  grid-column: 3;
}

#uploadView #musicTableSort {
  grid-column: 1 / 3;
}

#uploadView #clearMusicTableFilters {
  grid-column: 3;
}

#uploadView .library-search-shortcuts {
  gap: 6px;
  margin: 0;
  padding: 0;
}

#uploadView .library-filter-chip {
  min-height: 24px;
  padding: 3px 8px;
  border-color: rgba(31, 111, 99, 0.11);
  background: rgba(255, 253, 248, 0.72);
  box-shadow: none;
  font-size: 11px;
}

#uploadView .library-search-count {
  margin: 0;
  color: var(--ui-muted);
  font-size: 12px;
}

#uploadView .music-library-header {
  min-height: 54px;
  padding: 9px 14px;
  background: rgba(255, 253, 248, 0.62);
}

#uploadView .library-database-layout.preview-collapsed {
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 10px;
}

#uploadView .library-database-layout.preview-collapsed .sheet-preview-panel {
  justify-items: center;
  align-content: start;
  padding: 7px;
  border: 1px solid rgba(31, 111, 99, 0.11);
  border-radius: var(--ui-radius-md);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.82), rgba(255, 253, 248, 0.42)),
    var(--ui-surface);
  box-shadow: var(--ui-shadow-soft);
}

#uploadView .library-database-layout.preview-collapsed .preview-rail-toggle {
  align-self: start;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: 10px;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 168px;
  min-height: 168px;
  padding: 11px 0 9px;
  color: #fff8ea;
  border: 1px solid rgba(142, 228, 209, 0.2);
  border-radius: var(--ui-radius-sm);
  background:
    linear-gradient(180deg, rgba(142, 228, 209, 0.14), rgba(142, 228, 209, 0) 36%),
    linear-gradient(180deg, #123a34, #1d665d 58%, #10322d);
  box-shadow: 0 14px 28px rgba(17, 55, 49, 0.18);
  text-transform: uppercase;
  writing-mode: horizontal-tb;
  transform: none;
}

#uploadView .preview-rail-label {
  display: block;
  color: #fff8ea;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-align: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

#uploadView .preview-rail-hint {
  display: none;
}

#uploadView .preview-rail-chevron {
  width: 26px;
  height: 26px;
  margin: 0;
  color: #082f2a;
  border: 0;
  background: #8ee4d1;
  box-shadow: 0 7px 16px rgba(67, 193, 177, 0.24);
}

.spotify-connect-modal {
  width: min(1120px, calc(100vw - 32px));
}

.spotify-connect-modal-body {
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 16px;
}

.spotify-connect-modal-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
  gap: 14px;
  min-width: 0;
}

.spotify-modal-walkthrough {
  display: grid;
  gap: 10px;
  padding: 12px;
  color: #fff8ea;
  border: 1px solid rgba(255, 248, 234, 0.14);
  border-radius: var(--ui-radius-md);
  background:
    linear-gradient(135deg, rgba(18, 58, 52, 0.98), rgba(31, 111, 99, 0.94)),
    var(--ui-rail);
}

.spotify-modal-walkthrough .spotify-setup-walkthrough-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.spotify-modal-walkthrough .spotify-setup-walkthrough-heading span {
  color: #8ee4d1;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.spotify-modal-walkthrough .spotify-setup-walkthrough-heading strong {
  overflow: hidden;
  color: #fff8ea;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spotify-modal-walkthrough .spotify-setup-checklist {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.spotify-modal-walkthrough .spotify-setup-step {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 7px;
  align-content: start;
  min-width: 0;
  min-height: 116px;
  padding: 9px;
  border: 1px solid rgba(255, 248, 234, 0.13);
  border-radius: var(--ui-radius-md);
  background: rgba(255, 248, 234, 0.07);
}

.spotify-modal-walkthrough .spotify-setup-step > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #10332e;
  border-radius: 999px;
  background: rgba(255, 248, 234, 0.86);
  font-size: 11px;
  font-weight: 900;
}

.spotify-modal-walkthrough .spotify-setup-step.done > span {
  background: #77dfbd;
}

.spotify-modal-walkthrough .spotify-setup-step.active {
  border-color: rgba(142, 228, 209, 0.46);
  background: rgba(142, 228, 209, 0.12);
}

.spotify-modal-walkthrough .spotify-setup-step strong {
  display: block;
  color: #fff8ea;
  font-size: 12px;
  line-height: 1.15;
}

.spotify-modal-walkthrough .spotify-setup-step p {
  margin: 3px 0 0;
  color: rgba(255, 248, 234, 0.72);
  font-size: 11px;
  font-weight: 740;
  line-height: 1.25;
}

.spotify-modal-walkthrough .spotify-setup-step button {
  grid-column: 1 / -1;
  align-self: end;
  min-height: 30px;
  padding: 5px 9px;
  color: #fff8ea;
  border-color: rgba(255, 248, 234, 0.14);
  background: rgba(255, 248, 234, 0.08);
  box-shadow: none;
}

.spotify-modal-walkthrough .spotify-setup-step.active button {
  color: #082f2a;
  border-color: rgba(168, 238, 226, 0.44);
  background: #a8eee2;
}

.spotify-modal-walkthrough .spotify-setup-step button[aria-disabled="true"] {
  cursor: default;
  color: rgba(255, 248, 234, 0.62);
  border-color: rgba(255, 248, 234, 0.1);
  background: rgba(255, 248, 234, 0.05);
}

@media (max-width: 1180px) {
  #uploadView .music-table-tools {
    grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(118px, 150px));
  }

  .spotify-modal-walkthrough .spotify-setup-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  #uploadView .music-table-tools,
  .spotify-connect-modal-layout {
    grid-template-columns: 1fr;
  }

  #uploadView #musicTableSearch,
  #uploadView #musicTableFamiliarity,
  #uploadView #musicTableStatus,
  #uploadView #musicTableSort,
  #uploadView #clearMusicTableFilters {
    grid-column: 1;
  }

  .spotify-modal-walkthrough .spotify-setup-checklist {
    grid-template-columns: 1fr;
  }
}

/* Beta polish: production shell, account entry, and responsive guardrails */
html {
  background: var(--ui-bg);
}

body {
  min-width: 0;
  overflow-x: hidden;
}

.app-shell {
  min-height: 100dvh;
}

.main-shell,
.main-shell main,
.view,
.panel,
.music-library-panel,
.sheet-preview-panel,
.profile-panel,
.spotify-review-main,
.playlist-panel,
.spotify-workflow-panel {
  min-width: 0;
}

.brand {
  min-width: 0;
}

.brand > div:not(.brand-mark) {
  min-width: 0;
}

.left-rail .brand h1 {
  display: -webkit-box;
  overflow: hidden;
  max-width: 100%;
  font-size: 16px;
  line-height: 1.06;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.left-rail .brand p {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar > div:first-child {
  min-width: 0;
}

.topbar h2,
.topbar #flowSummary {
  overflow-wrap: anywhere;
}

.top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar .status-pill {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  overflow: visible;
  color: var(--ui-muted-strong);
  border-color: var(--ui-line);
  border-radius: var(--ui-radius-pill);
  background: rgba(255, 253, 248, 0.82);
}

.topbar .status-pill::before {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin: 0;
}

.topbar .status-pill.connected {
  color: var(--ui-primary-strong);
  border-color: rgba(40, 185, 167, 0.28);
  background: var(--ui-primary-soft);
}

.auth-screen {
  min-height: 100dvh;
  padding: clamp(16px, 4vw, 40px);
  color: var(--ui-text);
  background:
    radial-gradient(circle at 18% 12%, rgba(142, 228, 209, 0.28), transparent 28%),
    linear-gradient(180deg, rgba(214, 233, 220, 0.82), rgba(246, 242, 232, 0.96) 58%),
    var(--ui-bg);
}

.auth-panel {
  width: min(100%, 456px);
  padding: clamp(22px, 3vw, 32px);
  border-color: var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--ui-shadow-strong);
}

.auth-brand {
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ui-line);
}

.auth-brand h1 {
  color: var(--ui-text);
  font-size: 23px;
  line-height: 1.05;
}

.auth-copy {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.auth-copy h2 {
  margin: 0;
  color: var(--ui-text);
  font-size: 24px;
  line-height: 1.08;
}

.auth-copy p,
.auth-message {
  color: var(--ui-muted);
  line-height: 1.4;
}

.auth-form {
  gap: 12px;
}

.auth-form label {
  color: var(--ui-muted-strong);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-form input {
  min-height: 44px;
  margin-top: 7px;
  border-color: var(--ui-line);
  border-radius: var(--ui-radius-sm);
  color: var(--ui-text);
  background: rgba(255, 255, 255, 0.9);
}

.auth-form input:focus {
  border-color: rgba(40, 185, 167, 0.52);
  box-shadow: 0 0 0 3px rgba(40, 185, 167, 0.13);
}

.auth-criteria {
  border-color: rgba(31, 111, 99, 0.12);
  border-radius: var(--ui-radius-md);
  background: rgba(232, 247, 243, 0.58);
}

.auth-criteria li {
  color: var(--ui-muted);
}

.auth-criteria li.met {
  color: var(--ui-primary-strong);
}

.auth-criteria li.met::before {
  border-color: var(--ui-primary-strong);
  background: var(--ui-primary-strong);
}

.auth-form > button {
  min-height: 44px;
  border-radius: var(--ui-radius-pill);
  color: #082f2a;
  border-color: rgba(67, 193, 177, 0.28);
  background: linear-gradient(135deg, #43c1b1, #8ee4d1);
  box-shadow: 0 12px 26px rgba(67, 193, 177, 0.18);
}

.auth-form > button:hover {
  color: #082f2a;
  background: linear-gradient(135deg, #55d3c3, #a4f0e4);
  box-shadow: 0 15px 30px rgba(67, 193, 177, 0.22);
}

.auth-mode-toggle {
  min-height: 36px;
  color: var(--ui-text);
  border-color: var(--ui-line);
  border-radius: var(--ui-radius-pill);
  background: rgba(255, 253, 248, 0.72);
}

.auth-mode-toggle:hover {
  color: var(--ui-primary-strong);
  border-color: rgba(40, 185, 167, 0.28);
  background: var(--ui-primary-soft);
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin: 16px 0 10px;
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--ui-line);
}

.auth-divider[hidden],
.google-auth-button[hidden] {
  display: none;
}

.google-auth-button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ui-text);
  border-color: var(--ui-line);
  border-radius: var(--ui-radius-pill);
  background: rgba(255, 255, 255, 0.9);
}

.google-auth-button span {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--ui-line);
  border-radius: 50%;
  color: #2563eb;
  background: #ffffff;
  font-weight: 900;
}

.google-auth-button:hover {
  color: var(--ui-primary-strong);
  border-color: rgba(40, 185, 167, 0.28);
  background: var(--ui-primary-soft);
}

.optional-label {
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 700;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-width: 0;
  min-height: 38px;
  max-width: 240px;
  padding: 5px 10px 5px 6px;
  color: var(--ui-text);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-pill);
  background: rgba(255, 253, 248, 0.88);
  box-shadow: none;
}

.account-chip:hover {
  color: var(--ui-primary-strong);
  border-color: rgba(40, 185, 167, 0.36);
  background: var(--ui-primary-soft);
}

.account-avatar {
  display: inline-grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #ffffff;
  border-radius: 50%;
  background: #1d665d;
  font-size: 12px;
  font-weight: 900;
}

.account-chip-copy {
  display: grid;
  min-width: 0;
  text-align: left;
}

.account-chip-copy strong,
.account-chip-copy small {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-chip-copy strong {
  color: var(--ui-text);
  font-size: 13px;
  line-height: 1.05;
}

.account-chip-copy small {
  color: var(--ui-muted);
  font-size: 11px;
}

.account-modal-backdrop {
  align-items: flex-start;
  justify-content: flex-end;
  padding: 80px 24px 24px;
}

.account-modal {
  width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: rgba(255, 253, 248, 0.98);
  box-shadow: var(--ui-shadow);
}

.account-modal .modal-header {
  align-items: flex-start;
  padding: 16px;
  border-bottom: 1px solid var(--ui-line);
}

.account-modal .modal-header h2 {
  color: var(--ui-text);
  font-size: 22px;
}

.account-modal .modal-header p:not(.eyebrow) {
  color: var(--ui-muted);
  overflow-wrap: anywhere;
}

.account-form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.account-form input {
  width: 100%;
}

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

#accountMessage {
  min-height: 18px;
  color: var(--ui-muted);
  font-size: 13px;
}

.admin-step[hidden] {
  display: none;
}

.users-workspace {
  display: grid;
  gap: 14px;
}

.users-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--ui-shadow);
}

.users-admin-header h2 {
  color: var(--ui-text);
  font-size: 24px;
  line-height: 1.1;
}

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

.users-summary-card,
.users-table-panel {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--ui-shadow);
}

.users-summary-card {
  display: grid;
  gap: 5px;
  min-height: 106px;
  padding: 14px;
}

.users-summary-card span,
.users-summary-card em,
.users-user-cell span,
.users-user-cell em,
.users-table td span {
  color: var(--ui-muted);
  font-size: 12px;
  font-style: normal;
}

.users-summary-card strong {
  color: var(--ui-text);
  font-size: 28px;
  line-height: 1;
}

.users-table-panel {
  overflow: hidden;
}

.users-table-panel .section-title {
  padding: 16px 18px;
  border-bottom: 1px solid var(--ui-line);
}

.users-table-panel .section-title h2 {
  color: var(--ui-text);
}

.users-table-panel .section-title > p {
  color: var(--ui-muted);
}

.users-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--ui-line);
  background: rgba(241, 247, 244, 0.58);
}

.users-search {
  display: grid;
  flex: 1 1 260px;
  max-width: 420px;
  gap: 6px;
  color: var(--ui-muted-strong);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.users-search input {
  width: 100%;
  min-height: 38px;
}

.users-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ui-muted);
  font-size: 13px;
  white-space: nowrap;
}

.users-pagination button {
  min-height: 34px;
  padding: 6px 10px;
}

.users-result-summary {
  padding: 0 18px 12px;
  color: var(--ui-muted);
  font-size: 13px;
}

.users-table-wrap {
  overflow-x: auto;
}

.users-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.users-table th,
.users-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--ui-line);
  text-align: left;
  vertical-align: top;
}

.users-table th {
  color: var(--ui-muted-strong);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  background: rgba(241, 247, 244, 0.82);
}

.users-table td {
  color: var(--ui-text);
}

.users-user-cell {
  display: grid;
  gap: 4px;
  max-width: 300px;
}

.users-user-cell strong {
  overflow-wrap: anywhere;
}

.users-user-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-badge-row,
.users-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.users-badge-row span {
  padding: 5px 8px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-pill);
  color: var(--ui-muted-strong);
  background: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.users-actions button {
  min-height: 32px;
  padding: 6px 10px;
}

.users-empty-state {
  padding: 24px;
  color: var(--ui-muted);
  text-align: center;
}

#uploadView .music-table-wrap,
#spotifyView .spotify-review-list,
#profileView .profile-session-feed,
#profileView .profile-song-list {
  overscroll-behavior: contain;
}

#uploadView .music-table {
  min-width: 880px;
}

#uploadView .music-table th,
#uploadView .music-table td {
  vertical-align: middle;
}

#uploadView .music-table th.select-col,
#uploadView .music-table td.select-col {
  width: 34px;
  min-width: 34px;
  max-width: 34px;
}

#uploadView .music-table th:last-child,
#uploadView .music-table td:last-child {
  min-width: 150px;
}

#uploadView .library-database-layout.music-edit-mode .music-table {
  width: 100%;
  min-width: 1500px;
  table-layout: fixed;
  font-size: 12px;
}

#uploadView .library-database-layout.music-edit-mode .music-table th,
#uploadView .library-database-layout.music-edit-mode .music-table td {
  min-width: 0;
  padding: 7px 8px;
}

#uploadView .library-database-layout.music-edit-mode .music-table th:nth-child(1),
#uploadView .library-database-layout.music-edit-mode .music-table td:nth-child(1) {
  width: 34px;
}

#uploadView .library-database-layout.music-edit-mode .music-table th:nth-child(2),
#uploadView .library-database-layout.music-edit-mode .music-table td:nth-child(2) {
  width: 300px;
}

#uploadView .library-database-layout.music-edit-mode .music-table th:nth-child(3),
#uploadView .library-database-layout.music-edit-mode .music-table td:nth-child(3) {
  width: 170px;
}

#uploadView .library-database-layout.music-edit-mode .music-table th:nth-child(4),
#uploadView .library-database-layout.music-edit-mode .music-table td:nth-child(4) {
  width: 158px;
}

#uploadView .library-database-layout.music-edit-mode .music-table th:nth-child(5),
#uploadView .library-database-layout.music-edit-mode .music-table td:nth-child(5) {
  width: 205px;
}

#uploadView .library-database-layout.music-edit-mode .music-table th:nth-child(6),
#uploadView .library-database-layout.music-edit-mode .music-table td:nth-child(6) {
  width: 175px;
}

#uploadView .library-database-layout.music-edit-mode .music-table th:nth-child(7),
#uploadView .library-database-layout.music-edit-mode .music-table td:nth-child(7) {
  width: 112px;
}

#uploadView .library-database-layout.music-edit-mode .music-table th:nth-child(8),
#uploadView .library-database-layout.music-edit-mode .music-table td:nth-child(8) {
  width: 88px;
}

#uploadView .library-database-layout.music-edit-mode .music-table th:nth-child(9),
#uploadView .library-database-layout.music-edit-mode .music-table td:nth-child(9) {
  width: 100px;
}

#uploadView .library-database-layout.music-edit-mode .music-table th:nth-child(10),
#uploadView .library-database-layout.music-edit-mode .music-table td:nth-child(10) {
  width: 258px;
}

#uploadView .library-database-layout.music-edit-mode .table-inline-input,
#uploadView .library-database-layout.music-edit-mode .table-inline-select {
  min-height: 28px;
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.2;
}

#uploadView .library-database-layout.music-edit-mode .song-title-stack {
  gap: 4px;
}

#uploadView .library-database-layout.music-edit-mode .source-file-line {
  max-width: 100%;
}

#uploadView .library-database-layout.music-edit-mode .tags-cell-inner {
  gap: 4px;
}

#uploadView .library-database-layout.music-edit-mode .row-chip-list {
  gap: 4px;
}

#uploadView .library-database-layout.music-edit-mode .row-chip-list span {
  min-height: 18px;
  max-width: 100%;
  padding: 1px 6px;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#uploadView .library-database-layout.music-edit-mode .activity-cell-inner {
  gap: 6px;
  min-width: 0;
}

#uploadView .library-database-layout.music-edit-mode .activity-cell strong {
  font-size: 14px;
}

#uploadView .library-database-layout.music-edit-mode .activity-cell span {
  font-size: 11px;
}

#uploadView .library-database-layout.music-edit-mode .activity-cell button,
#uploadView .library-database-layout.music-edit-mode .table-actions-cell button,
#uploadView .library-database-layout.music-edit-mode .table-actions-inner .text-link {
  min-height: 26px;
  padding: 3px 7px;
  font-size: 11px;
}

#uploadView .library-database-layout.music-edit-mode .pdf-status-pill,
#uploadView .library-database-layout.music-edit-mode .spotify-cell .badge {
  min-height: 22px;
  padding: 3px 7px;
  font-size: 11px;
}

#uploadView .library-database-layout.music-edit-mode .table-actions-inner {
  gap: 5px;
  justify-content: flex-start;
}

#uploadView .music-table-wrap {
  scrollbar-gutter: stable both-edges;
}

/* Library table polish: the main view reads as repertoire, edit mode reads as metadata. */
#uploadView .library-database-layout:not(.music-edit-mode) .music-table {
  font-size: 13px;
}

#uploadView .library-database-layout:not(.music-edit-mode) .music-table th {
  height: 40px;
  padding: 9px 16px;
  color: rgba(18, 50, 46, 0.5);
  border-bottom: 1px solid rgba(31, 111, 99, 0.1);
  background: rgba(250, 252, 250, 0.95);
  font-size: 10px;
  letter-spacing: 0;
}

#uploadView .library-database-layout:not(.music-edit-mode) .music-table td {
  height: 74px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(31, 111, 99, 0.08);
  background: rgba(255, 253, 247, 0.78);
  vertical-align: middle;
}

#uploadView .library-database-layout:not(.music-edit-mode) .music-table tr:hover td {
  background: rgba(248, 251, 250, 0.96);
}

#uploadView .library-database-layout:not(.music-edit-mode) .music-table tr.previewed td {
  background: rgba(224, 241, 236, 0.74);
}

#uploadView .library-database-layout:not(.music-edit-mode) .song-title-cell {
  padding-block: 13px;
}

#uploadView .library-database-layout:not(.music-edit-mode) .song-title-stack {
  gap: 8px;
  align-items: flex-start;
  justify-content: start;
  justify-items: start;
  text-align: left;
}

#uploadView .library-database-layout:not(.music-edit-mode) .song-title-stack strong {
  font-size: 14px;
  line-height: 1.16;
  text-align: left;
}

#uploadView .library-database-layout:not(.music-edit-mode) .source-file-line {
  max-width: 100%;
  align-items: center;
}

#uploadView .library-database-layout:not(.music-edit-mode) .source-file-line .pdf-mini-label {
  padding: 2px 6px;
  font-size: 10px;
}

#uploadView .library-database-layout:not(.music-edit-mode) .source-file-line .source-file-name {
  max-width: min(290px, 100%);
  color: rgba(18, 50, 46, 0.58);
  font-size: 12px;
}

#uploadView .library-database-layout:not(.music-edit-mode) .table-artist-text {
  color: rgba(18, 50, 46, 0.82);
  font-size: 14px;
  font-weight: 650;
}

#uploadView .library-database-layout:not(.music-edit-mode) .library-status-pill,
#uploadView .library-database-layout:not(.music-edit-mode) .pdf-status-pill {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 12px;
}

#uploadView .library-database-layout:not(.music-edit-mode) .pdf-cell {
  text-align: left;
}

#uploadView .library-database-layout.music-library-mode:not(.music-edit-mode) .music-table th:nth-child(1),
#uploadView .library-database-layout.music-library-mode:not(.music-edit-mode) .music-table td:nth-child(1) {
  width: 40%;
}

#uploadView .library-database-layout.music-library-mode:not(.music-edit-mode) .music-table th:nth-child(2),
#uploadView .library-database-layout.music-library-mode:not(.music-edit-mode) .music-table td:nth-child(2) {
  width: 18%;
}

#uploadView .library-database-layout.music-library-mode:not(.music-edit-mode) .music-table th:nth-child(3),
#uploadView .library-database-layout.music-library-mode:not(.music-edit-mode) .music-table td:nth-child(3) {
  width: 16%;
}

#uploadView .library-database-layout.music-library-mode:not(.music-edit-mode) .music-table th:nth-child(4),
#uploadView .library-database-layout.music-library-mode:not(.music-edit-mode) .music-table td:nth-child(4) {
  width: 18%;
}

#uploadView .library-database-layout.music-library-mode:not(.music-edit-mode) .music-table th:nth-child(5),
#uploadView .library-database-layout.music-library-mode:not(.music-edit-mode) .music-table td:nth-child(5) {
  width: 8%;
  min-width: 96px;
}

#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table {
  min-width: 980px;
}

#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table th:nth-child(1),
#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table td:nth-child(1) {
  width: 34%;
}

#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table th:nth-child(2),
#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table td:nth-child(2) {
  width: 11%;
}

#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table th:nth-child(3),
#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table td:nth-child(3) {
  width: 17%;
}

#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table th:nth-child(4),
#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table td:nth-child(4) {
  width: 17%;
}

#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table th:nth-child(5),
#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table td:nth-child(5) {
  width: 9%;
}

#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table th:nth-child(6),
#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table td:nth-child(6) {
  width: 12%;
}

#uploadView .plays-cell,
#uploadView .last-played-cell {
  display: grid;
  gap: 2px;
  align-content: center;
}

#uploadView .plays-cell strong,
#uploadView .last-played-cell strong {
  color: var(--studio-ink);
  font-size: 15px;
  line-height: 1.1;
}

#uploadView .plays-cell span,
#uploadView .last-played-cell span {
  color: rgba(18, 50, 46, 0.54);
  font-size: 11px;
  font-weight: 750;
}

#uploadView .stats-actions-cell .table-actions-inner {
  justify-content: flex-start;
}

#uploadView .library-database-layout.music-edit-mode .activity-col,
#uploadView .library-database-layout.music-edit-mode .activity-cell,
#uploadView .library-database-layout.music-edit-mode .music-table th:nth-child(9),
#uploadView .library-database-layout.music-edit-mode .spotify-cell,
#uploadView .library-database-layout.music-edit-mode .table-actions-heading,
#uploadView .library-database-layout.music-edit-mode .table-actions-cell {
  display: none;
}

#uploadView .music-table {
  border-collapse: separate;
  border-spacing: 0;
}

#uploadView .music-table th {
  padding-block: 9px;
  color: rgba(18, 50, 46, 0.58);
  border-bottom: 1px solid rgba(31, 111, 99, 0.1);
  background: rgba(250, 252, 250, 0.94);
  font-size: 10px;
  letter-spacing: 0;
}

#uploadView .music-table td {
  padding-block: 8px;
  border-bottom: 1px solid rgba(31, 111, 99, 0.08);
  background: rgba(255, 253, 247, 0.72);
}

#uploadView .music-table tr:hover td {
  background: rgba(248, 251, 250, 0.94);
}

#uploadView .music-table tr.previewed td {
  background: rgba(224, 241, 236, 0.72);
}

#uploadView .music-table tr.selected td {
  background: rgba(70, 184, 168, 0.12);
}

#uploadView .library-database-layout.music-edit-mode .music-table {
  min-width: 1120px;
}

#uploadView .library-database-layout.music-edit-mode .music-table th,
#uploadView .library-database-layout.music-edit-mode .music-table td {
  padding: 9px 10px;
}

#uploadView .library-database-layout.music-edit-mode .music-table th:nth-child(1),
#uploadView .library-database-layout.music-edit-mode .music-table td:nth-child(1) {
  width: 36px;
}

#uploadView .library-database-layout.music-edit-mode .music-table th:nth-child(2),
#uploadView .library-database-layout.music-edit-mode .music-table td:nth-child(2) {
  width: 31%;
}

#uploadView .library-database-layout.music-edit-mode .music-table th:nth-child(3),
#uploadView .library-database-layout.music-edit-mode .music-table td:nth-child(3) {
  width: 17%;
}

#uploadView .library-database-layout.music-edit-mode .music-table th:nth-child(4),
#uploadView .library-database-layout.music-edit-mode .music-table td:nth-child(4) {
  width: 15%;
}

#uploadView .library-database-layout.music-edit-mode .music-table th:nth-child(5),
#uploadView .library-database-layout.music-edit-mode .music-table td:nth-child(5) {
  width: 19%;
}

#uploadView .library-database-layout.music-edit-mode .music-table th:nth-child(6),
#uploadView .library-database-layout.music-edit-mode .music-table td:nth-child(6) {
  width: 14%;
}

#uploadView .library-database-layout.music-edit-mode .music-table th:nth-child(7),
#uploadView .library-database-layout.music-edit-mode .music-table td:nth-child(7) {
  width: 86px;
}

#uploadView .library-database-layout.music-edit-mode .music-table th:last-child,
#uploadView .library-database-layout.music-edit-mode .music-table td:last-child {
  min-width: 96px;
}

#uploadView .library-database-layout.music-edit-mode .table-inline-input,
#uploadView .library-database-layout.music-edit-mode .table-inline-select {
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

#uploadView .library-database-layout.music-edit-mode .table-inline-input:focus,
#uploadView .library-database-layout.music-edit-mode .table-inline-select:focus {
  background: #ffffff;
}

#uploadView .library-database-layout.music-edit-mode .song-title-stack {
  gap: 6px;
}

#uploadView .library-database-layout.music-edit-mode .source-file-line .source-file-name {
  max-width: 220px;
  font-size: 11px;
}

#uploadView .library-database-layout.music-edit-mode .tags-input {
  max-width: 100%;
}

#uploadView .library-database-layout.music-edit-mode .tags-cell-inner {
  gap: 5px;
}

#uploadView .library-database-layout.music-edit-mode .row-chip-list {
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
}

#uploadView .library-database-layout.music-edit-mode .row-chip-list span {
  min-height: 20px;
  max-width: 100%;
  padding: 2px 7px;
  font-size: 11px;
  text-overflow: ellipsis;
}

#uploadView .library-database-layout.music-edit-mode .pdf-cell {
  text-align: left;
}

#uploadView .library-database-layout.music-edit-mode .pdf-status-pill {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 11px;
}

#uploadView .library-search-count {
  margin-top: 2px;
}

#profileView .profile-dashboard-grid,
#spotifyView .spotify-review-layout,
#uploadView .library-database-layout {
  min-width: 0;
}

@media (max-width: 980px) {
  .topbar {
    align-items: flex-start;
    gap: 12px;
  }

  .top-actions {
    align-self: stretch;
  }

  .topbar .status-pill,
  #signOutButton {
    min-height: 32px;
  }
}

@media (max-width: 860px) {
  .left-rail {
    position: sticky;
    top: 0;
    z-index: 40;
    grid-template-columns: minmax(0, 1fr);
    border-bottom: 1px solid rgba(255, 253, 248, 0.1);
  }

  .left-rail .brand {
    min-height: 52px;
  }

  .steps {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
  }

  .step {
    flex: 0 0 auto;
    min-width: 118px;
    scroll-snap-align: start;
  }

  .main-shell main {
    padding-inline: 14px;
  }

  .topbar {
    padding: 14px;
  }

  .topbar h2 {
    font-size: 24px;
  }
}

@media (max-width: 640px) {
  .auth-panel {
    padding: 22px;
  }

  .auth-brand {
    margin-bottom: 20px;
  }

  .auth-brand h1 {
    font-size: 21px;
  }

  .topbar {
    display: grid;
  }

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

  .top-actions > * {
    width: 100%;
  }

  .account-chip {
    max-width: none;
  }

  .account-modal-backdrop {
    align-items: flex-start;
    justify-content: center;
    padding: 72px 12px 12px;
  }

  .users-admin-header {
    align-items: stretch;
    display: grid;
  }

  .users-toolbar {
    align-items: stretch;
    display: grid;
  }

  .users-search {
    max-width: none;
  }

  .users-pagination {
    justify-content: space-between;
  }

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

  body[data-view="upload"] .main-shell main,
  body[data-view="spotify"] .main-shell main,
  body[data-view="profile"] .main-shell main,
  body[data-view="practice"] .main-shell main {
    padding-bottom: 28px;
  }

  #uploadView .sheet-preview-actions {
    grid-template-columns: 1fr;
  }

  #uploadView .library-database-layout.preview-collapsed {
    grid-template-columns: 1fr;
  }

  #uploadView .library-database-layout.preview-collapsed .preview-rail-toggle {
    grid-template-columns: 1fr auto;
    grid-template-rows: 1fr;
    width: 100%;
    max-width: none;
    height: 46px;
    min-height: 46px;
    padding: 9px 12px;
  }

  #uploadView .preview-rail-label {
    writing-mode: horizontal-tb;
    transform: none;
  }
}

/* Slice 2 cascade keeper */
body[data-view="practice"] #practiceView .practice-log-strip .session-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto));
}

@media (max-width: 720px) {
  body[data-view="practice"] #practiceView .practice-log-strip .session-actions {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1180px) {
  body.sheet-viewer-queue-open .sheet-spread {
    padding-left: 338px;
  }

  body.sheet-viewer-queue-open .sheet-viewer-queue-panel {
    top: 76px;
    bottom: 14px;
    max-height: none;
  }

  body.sheet-viewer-queue-open .sheet-viewer-practice-controls {
    left: calc(50% + 169px);
    max-width: min(760px, calc(100vw - 700px));
  }
}

.sheet-viewer-queue-panel,
.sheet-viewer-queue-list {
  align-content: start;
}

.sheet-viewer-queue-item {
  justify-content: stretch;
  align-content: center;
}

body.sheet-viewer-open .session-log-confirm-backdrop {
  z-index: 150;
}

/* Slice 2 follow-up: reader play counter, sidecar notes, and logged-session finish */
.sheet-viewer-play-stepper {
  display: grid;
  grid-template-columns: 42px minmax(76px, auto) 42px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 234, 0.15);
  border-radius: 999px;
  background: rgba(255, 248, 234, 0.1);
}

.sheet-viewer-practice-controls .sheet-viewer-play-stepper button {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 19px;
}

.sheet-viewer-practice-controls .sheet-viewer-play-stepper button:last-child {
  color: #062f2a;
  background: linear-gradient(135deg, #9af0e3, #36cbb8);
}

.sheet-viewer-play-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 10px;
  color: rgba(255, 248, 234, 0.92);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.sheet-viewer-practice-controls #sheetViewerPlayed[aria-pressed="true"] {
  color: #0b332d;
  background: rgba(164, 238, 226, 0.92);
}

body[data-view="practice"] #practiceView .session-celebration {
  border-style: solid;
  border-color: rgba(40, 185, 167, 0.34);
  background:
    linear-gradient(135deg, rgba(40, 185, 167, 0.13), rgba(255, 253, 248, 0.96)),
    var(--ui-surface);
  animation: sessionLoggedPop 360ms ease-out;
}

body[data-view="practice"] #practiceView .session-celebration > span {
  max-width: 520px;
  line-height: 1.4;
}

.session-celebration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}

.session-celebration-actions button {
  min-height: 42px;
  padding: 9px 16px;
}

@keyframes sessionLoggedPop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 1180px) {
  body.sheet-viewer-queue-open .sheet-viewer-queue-panel {
    bottom: auto;
    max-height: clamp(180px, calc(100vh - 448px), 286px);
  }

  body.sheet-viewer-notes-open .sheet-viewer-queue-panel {
    max-height: clamp(156px, calc(100vh - 482px), 252px);
  }

  body.sheet-viewer-notes-open .sheet-viewer-notes-panel {
    top: 374px;
    right: auto;
    bottom: 14px;
    left: 14px;
    width: min(318px, 28vw);
  }
}

@media (max-width: 1100px) {
  .sheet-viewer-practice-controls {
    align-items: stretch;
  }

  .sheet-viewer-play-stepper {
    flex: 1 1 180px;
  }
}

@media (max-width: 720px) {
  .sheet-viewer-play-stepper {
    width: 100%;
  }
}

/* Practice-first song details */
#songModalBody .song-detail-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 5px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 10px;
  background: rgba(255, 253, 247, 0.78);
}

#songModalBody .song-detail-tabs button {
  flex: 1 1 0;
  min-height: 38px;
  padding: 8px 12px;
  color: #34554e;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 900;
}

#songModalBody .song-detail-tabs button.active {
  color: #0f332e;
  border-color: rgba(31, 111, 99, 0.16);
  background: #fff8ea;
  box-shadow: 0 8px 18px rgba(77, 63, 40, 0.08);
}

#songModalBody .song-detail-tab-panel {
  display: grid;
  gap: 14px;
}

#songModalBody .song-detail-tab-panel[hidden] {
  display: none;
}

#songModalBody .practice-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#songModalBody .practice-detail-grid article {
  display: grid;
  gap: 5px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.94), rgba(226, 248, 234, 0.54)),
    var(--studio-panel);
}

#songModalBody .practice-detail-grid strong {
  overflow: hidden;
  color: var(--studio-ink);
  font-size: 18px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#songModalBody .practice-detail-grid small,
#songModalBody .session-history-card small {
  color: #65736e;
  font-size: 12px;
  font-weight: 820;
}

#songModalBody .practice-note-panel {
  display: grid;
  grid-template-columns: minmax(156px, 0.22fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 10px;
  background: rgba(255, 253, 247, 0.78);
}

#songModalBody .practice-note-panel > div:first-child {
  display: grid;
  align-content: center;
  gap: 4px;
}

#songModalBody .practice-note-panel strong {
  color: var(--studio-ink);
  font-size: 16px;
  line-height: 1.15;
}

#songModalBody .practice-note-panel textarea {
  min-height: 112px;
  resize: vertical;
}

#songModalBody .practice-note-actions {
  display: grid;
  gap: 8px;
  align-content: center;
  min-width: 136px;
}

#songModalBody .practice-note-actions button {
  min-height: 40px;
  padding: 8px 12px;
}

#songModalBody .practice-edit-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 14px;
}

#songModalBody .replace-pdf-box,
#songModalBody .remove-sheet-box,
#songModalBody .parser-note-box {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 9px;
  background: rgba(255, 253, 247, 0.78);
}

#songModalBody .remove-sheet-box {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-color: rgba(182, 75, 75, 0.18);
  background: rgba(255, 248, 246, 0.72);
}

#songModalBody .remove-sheet-box strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--studio-ink);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#songModalBody .remove-sheet-box button {
  min-height: 34px;
  white-space: nowrap;
}

#songModalBody .replace-pdf-box strong {
  color: var(--studio-ink);
  font-size: 13px;
  line-height: 1.25;
}

#songModalBody .replace-pdf-box input[type="file"] {
  width: 100%;
  min-height: 38px;
  padding: 7px;
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.92);
}

#songModalBody .replace-pdf-box button {
  justify-self: start;
}

#songModalBody .parser-note-box p {
  margin: 0;
  color: #65736e;
  font-size: 13px;
  line-height: 1.35;
}

#songModalBody .source-query-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

#songModalBody .source-query-chips span {
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 999px;
  color: var(--tea-green);
  background: var(--tea-green-soft);
  font-size: 12px;
  font-weight: 750;
}

#songModalBody .session-history-row {
  gap: 3px;
}

#songModalBody .session-history-row em {
  display: -webkit-box;
  overflow: hidden;
  color: #34554e;
  font-size: 11px;
  font-style: normal;
  font-weight: 780;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#songModalBody .modal-save-row {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 0 -24px -24px;
  padding: 12px 24px;
  border-top: 1px solid rgba(31, 111, 99, 0.1);
  background: rgba(244, 234, 215, 0.92);
  backdrop-filter: blur(12px);
}

@media (max-width: 900px) {
  #songModalBody .practice-detail-grid,
  #songModalBody .practice-edit-grid,
  #songModalBody .practice-note-panel {
    grid-template-columns: 1fr;
  }

  #songModalBody .practice-note-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #songModalBody .song-detail-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  #songModalBody .practice-note-actions {
    grid-template-columns: 1fr;
  }

  #songModalBody .modal-save-row {
    margin-inline: -16px;
    padding-inline: 16px;
  }

  #songModalBody .remove-sheet-box {
    grid-template-columns: 1fr;
  }
}

/* Practice home simplification: make the top strip a launch pad, not an audit dashboard */
body[data-view="practice"] #practiceView .practice-planner-summary {
  min-height: 42px;
  padding: 7px 14px;
}

body[data-view="practice"] #practiceView .practice-planner-copy small {
  display: none;
}

body[data-view="practice"] #practiceView .practice-planner-toggle {
  min-height: 30px;
  padding: 6px 12px;
}

body[data-view="practice"] #practiceView .practice-studio-pulse {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(220px, 0.65fr);
  gap: 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body[data-view="practice"] #practiceView .practice-pulse-card {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.82);
}

body[data-view="practice"] #practiceView .practice-pulse-card.primary {
  color: #fff8ea;
  border-color: rgba(142, 228, 209, 0.2);
  background:
    linear-gradient(135deg, rgba(31, 111, 99, 0.94), rgba(20, 84, 76, 0.98)),
    #153a34;
}

body[data-view="practice"] #practiceView .practice-pulse-card.primary span,
body[data-view="practice"] #practiceView .practice-pulse-card.primary strong,
body[data-view="practice"] #practiceView .practice-pulse-card.primary em {
  color: #fff8ea;
}

body[data-view="practice"] #practiceView .practice-pulse-card span {
  font-size: 10px;
}

body[data-view="practice"] #practiceView .practice-pulse-card strong {
  font-size: 18px;
}

body[data-view="practice"] #practiceView .practice-pulse-card em {
  font-size: 11px;
}

body[data-view="practice"] #practiceView .practice-session-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 860px) {
  body[data-view="practice"] #practiceView .practice-studio-pulse {
    grid-template-columns: 1fr;
  }
}

/* Practice mix CTA polish */
body[data-view="practice"] #practiceView .practice-planner-workbench {
  border: 1px solid rgba(142, 228, 209, 0.22);
  background:
    linear-gradient(135deg, rgba(18, 58, 52, 0.98), rgba(30, 102, 93, 0.96)),
    #153a34;
  box-shadow: 0 16px 34px rgba(18, 58, 52, 0.13);
}

body[data-view="practice"] #practiceView .practice-planner-workbench[open] .practice-planner-summary {
  border-bottom: 1px solid rgba(255, 248, 234, 0.13);
}

body[data-view="practice"] #practiceView .practice-planner-copy {
  gap: 8px;
}

body[data-view="practice"] #practiceView .practice-planner-copy small {
  display: inline;
  max-width: 320px;
}

body[data-view="practice"] #practiceView .practice-planner-body {
  grid-template-columns: minmax(150px, 0.24fr) minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  background: rgba(9, 35, 31, 0.18);
}

body[data-view="practice"] #practiceView .practice-planner-body h2 {
  font-size: 15px;
}

body[data-view="practice"] #practiceView .practice-planner-body p {
  max-width: 190px;
  font-size: 12px;
  line-height: 1.35;
}

body[data-view="practice"] #practiceView .practice-preset-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body[data-view="practice"] #practiceView .practice-preset-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 94px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 234, 0.15);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 248, 234, 0.12), rgba(142, 228, 209, 0.1)),
    rgba(0, 0, 0, 0.18);
}

body[data-view="practice"] #practiceView .practice-preset-card:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(255, 248, 234, 0.13), rgba(106, 183, 255, 0.12)),
    rgba(0, 0, 0, 0.18);
}

body[data-view="practice"] #practiceView .practice-preset-card:nth-child(3) {
  background:
    linear-gradient(135deg, rgba(255, 248, 234, 0.13), rgba(255, 184, 107, 0.12)),
    rgba(0, 0, 0, 0.18);
}

body[data-view="practice"] #practiceView .practice-preset-card:nth-child(4) {
  background:
    linear-gradient(135deg, rgba(255, 248, 234, 0.13), rgba(142, 228, 209, 0.15)),
    rgba(0, 0, 0, 0.18);
}

body[data-view="practice"] #practiceView .practice-preset-card:hover:not(:disabled),
body[data-view="practice"] #practiceView .practice-preset-card:focus-visible {
  border-color: rgba(142, 228, 209, 0.4);
  background-color: rgba(142, 228, 209, 0.08);
  transform: translateY(-1px);
}

body[data-view="practice"] #practiceView .practice-preset-card .preset-card-kicker {
  grid-column: 1;
  color: rgba(255, 248, 234, 0.66);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

body[data-view="practice"] #practiceView .practice-preset-card .preset-card-main {
  display: grid;
  grid-column: 1;
  gap: 4px;
  align-content: end;
  min-width: 0;
}

body[data-view="practice"] #practiceView .practice-preset-card .preset-card-label {
  color: #fff8ea;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.1;
}

body[data-view="practice"] #practiceView .practice-preset-card .preset-card-meta {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 248, 234, 0.68);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body[data-view="practice"] #practiceView .practice-preset-card .preset-card-count {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  color: #0f332e;
  border-radius: 999px;
  background: rgba(142, 228, 209, 0.92);
  font-size: 16px;
}

body[data-view="practice"] #practiceView .practice-studio-pulse {
  grid-template-columns: minmax(320px, 1fr) minmax(220px, 0.42fr);
  align-items: stretch;
}

body[data-view="practice"] #practiceView .practice-pulse-card {
  min-height: 64px;
  padding: 13px 16px;
}

body[data-view="practice"] #practiceView .practice-pulse-card.primary {
  border-color: rgba(31, 111, 99, 0.24);
  background:
    linear-gradient(135deg, #8ee4d1, #34c9b7),
    #34c9b7;
}

body[data-view="practice"] #practiceView .practice-pulse-card.primary span,
body[data-view="practice"] #practiceView .practice-pulse-card.primary strong,
body[data-view="practice"] #practiceView .practice-pulse-card.primary em {
  color: #092f2a;
}

body[data-view="practice"] #practiceView .practice-pulse-card.primary strong {
  font-size: 24px;
}

@media (max-width: 980px) {
  body[data-view="practice"] #practiceView .practice-planner-body,
  body[data-view="practice"] #practiceView .practice-preset-grid,
  body[data-view="practice"] #practiceView .practice-studio-pulse {
    grid-template-columns: 1fr;
  }

  body[data-view="practice"] #practiceView .practice-planner-body p {
    max-width: none;
  }
}

/* Reader polish: keep practice controls thin so the PDF stays primary. */
.sheet-viewer-practice-controls {
  bottom: 8px;
  gap: 5px;
  flex-wrap: nowrap;
  max-width: min(1120px, calc(100vw - 340px));
  min-height: 0;
  padding: 4px;
  border-color: rgba(255, 248, 234, 0.12);
  background: rgba(13, 44, 39, 0.24);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.sheet-viewer-practice-controls button {
  min-width: 0;
  min-height: 28px;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1;
}

.sheet-viewer-session-timer {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 5px;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  color: rgba(255, 248, 234, 0.94);
  border: 1px solid rgba(255, 248, 234, 0.12);
  border-radius: 999px;
  background: rgba(255, 248, 234, 0.08);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.sheet-viewer-session-timer span {
  color: rgba(255, 248, 234, 0.58);
  font-size: 9px;
  text-transform: uppercase;
}

.sheet-viewer-session-timer strong {
  color: #fff8ea;
  font-size: 12px;
}

.sheet-viewer-play-stepper {
  grid-template-columns: 28px minmax(56px, auto) 28px;
}

.sheet-viewer-practice-controls .sheet-viewer-play-stepper button {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  font-size: 15px;
}

.sheet-viewer-play-count {
  min-height: 28px;
  padding: 0 7px;
  font-size: 11px;
}

.sheet-viewer-practice-controls .sheet-viewer-toolbar {
  position: static;
  left: auto;
  bottom: auto;
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.sheet-viewer-practice-controls .sheet-viewer-toolbar button,
.sheet-viewer-practice-controls .sheet-viewer-toolbar span {
  min-width: 52px;
  min-height: 28px;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1;
}

.sheet-viewer-practice-controls .sheet-viewer-toolbar span {
  min-width: 64px;
}

@media (min-width: 1180px) {
  body.sheet-viewer-queue-open .sheet-viewer-practice-controls {
    left: calc(50% + 169px);
    max-width: min(1120px, calc(100vw - 420px));
  }
}

@media (max-width: 900px) {
  .sheet-viewer-practice-controls {
    right: 8px;
    left: 8px;
    bottom: 8px;
    justify-content: center;
    transform: none;
  }
}

@media (max-width: 640px) {
  .sheet-viewer-practice-controls {
    flex-wrap: wrap;
    border-radius: 12px;
  }
}

/* Reader rail progress and freestyle mode */
.sheet-viewer-session-card {
  position: absolute;
  top: 72px;
  left: 14px;
  z-index: 7;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(318px, 28vw);
  padding: 10px;
  pointer-events: auto;
  border: 1px solid rgba(142, 234, 219, 0.22);
  border-radius: 10px;
  color: #fff8ea;
  background:
    linear-gradient(135deg, rgba(33, 198, 179, 0.22), rgba(13, 44, 39, 0.7)),
    rgba(13, 44, 39, 0.64);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.sheet-viewer-session-card div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sheet-viewer-session-card span {
  color: rgba(255, 248, 234, 0.62);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sheet-viewer-session-card strong {
  overflow: hidden;
  color: #fff8ea;
  font-size: clamp(18px, 1.8vw, 26px);
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.sheet-viewer-queue-open .sheet-viewer-queue-panel {
  top: 154px;
  max-height: min(430px, calc(100vh - 170px));
}

body.sheet-viewer-queue-open.sheet-viewer-notes-open .sheet-viewer-queue-panel {
  max-height: clamp(138px, calc(100vh - 558px), 212px);
}

.sheet-viewer-freestyle-item span {
  width: auto;
  min-width: 36px;
  padding: 0 7px;
}

.sheet-viewer-freestyle {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 64px clamp(24px, 8vw, 120px);
  color: #fff8ea;
  background:
    linear-gradient(135deg, rgba(12, 37, 33, 0.94), rgba(21, 76, 67, 0.9)),
    #10231f;
}

.sheet-viewer-freestyle[hidden] {
  display: none !important;
}

.sheet-viewer-freestyle-card {
  display: grid;
  gap: 18px;
  width: min(760px, 100%);
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(255, 248, 234, 0.18);
  border-radius: 12px;
  background: rgba(255, 248, 234, 0.08);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.sheet-viewer-freestyle-card h2 {
  margin: 0;
  color: #fff8ea;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
}

.sheet-viewer-freestyle-card p {
  max-width: 540px;
  margin: 0;
  color: rgba(255, 248, 234, 0.72);
  font-size: 15px;
}

.sheet-viewer-freestyle-suggestions {
  display: grid;
  gap: 12px;
}

.sheet-viewer-freestyle-theme {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(142, 234, 219, 0.2);
  border-radius: 10px;
  background: rgba(142, 234, 219, 0.12);
}

.sheet-viewer-freestyle-theme span {
  color: rgba(255, 248, 234, 0.62);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.sheet-viewer-freestyle-theme strong {
  color: #fff8ea;
  font-size: 20px;
  line-height: 1.1;
}

.sheet-viewer-freestyle-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.sheet-viewer-freestyle-list button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 8px 10px;
  color: #fff8ea;
  border-color: rgba(255, 248, 234, 0.14);
  border-radius: 10px;
  background: rgba(255, 248, 234, 0.1);
  box-shadow: none;
  text-align: left;
}

.sheet-viewer-freestyle-list button:hover {
  color: #0b332d;
  background: rgba(164, 238, 226, 0.92);
}

.sheet-viewer-freestyle-list button span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sheet-viewer-freestyle-list button strong,
.sheet-viewer-freestyle-list button em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-viewer-freestyle-list button strong {
  font-size: 13px;
}

.sheet-viewer-freestyle-list button em {
  color: rgba(255, 248, 234, 0.62);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.sheet-viewer-freestyle-list button:hover em {
  color: rgba(11, 51, 45, 0.7);
}

@media (max-width: 900px) {
  .sheet-viewer-session-card {
    top: 72px;
    right: 8px;
    left: 8px;
    width: auto;
  }

  body.sheet-viewer-queue-open .sheet-viewer-queue-panel {
    top: 150px;
    right: 8px;
    left: 8px;
    width: auto;
    max-height: 220px;
  }

  .sheet-viewer-freestyle {
    padding: 220px 14px 88px;
  }
}

/* Practice queue reordering and richer Reader queue rows */
.session-card,
.sheet-viewer-queue-item {
  position: relative;
}

body[data-view="practice"] #practiceView .session-card {
  cursor: grab;
}

body[data-view="practice"] #practiceView .session-card:active,
.sheet-viewer-queue-item[draggable="true"]:active {
  cursor: grabbing;
}

body[data-view="practice"] #practiceView .session-card.dragging,
.sheet-viewer-queue-item.dragging {
  opacity: 0.56;
  transform: scale(0.992);
}

.session-card.drag-over-before::before,
.session-card.drag-over-after::after,
.sheet-viewer-queue-item.drag-over-before::before,
.sheet-viewer-queue-item.drag-over-after::after {
  content: "";
  position: absolute;
  right: 10px;
  left: 10px;
  z-index: 3;
  height: 3px;
  border-radius: 999px;
  background: #38d6c2;
  box-shadow: 0 0 0 3px rgba(56, 214, 194, 0.16);
}

.session-card.drag-over-before::before,
.sheet-viewer-queue-item.drag-over-before::before {
  top: -3px;
}

.session-card.drag-over-after::after,
.sheet-viewer-queue-item.drag-over-after::after {
  bottom: -3px;
}

body[data-view="practice"] #practiceView .session-card-title {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
}

body[data-view="practice"] #practiceView .session-drag-handle {
  display: grid;
  place-items: center;
  min-width: 38px;
  min-height: 34px;
  padding: 0 7px;
  color: rgba(10, 47, 42, 0.72);
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.78);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  cursor: grab;
}

.sheet-viewer-session-card {
  grid-template-columns: minmax(0, 1fr) auto;
}

.sheet-viewer-session-total {
  grid-column: 1 / -1;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 248, 234, 0.12);
}

.sheet-viewer-finish-button {
  align-self: center;
  min-height: 34px;
  padding: 7px 12px;
  color: #062f2a;
  border-color: rgba(142, 234, 219, 0.42);
  border-radius: 999px;
  background:
    linear-gradient(135deg, #9af0e3, #36cbb8),
    #36cbb8;
  box-shadow: 0 12px 24px rgba(27, 164, 148, 0.24);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.sheet-viewer-finish-button:disabled {
  color: rgba(255, 248, 234, 0.42);
  border-color: rgba(255, 248, 234, 0.12);
  background: rgba(255, 248, 234, 0.08);
  box-shadow: none;
}

.sheet-viewer-queue-item {
  grid-template-columns: 32px 34px minmax(0, 1fr) auto;
  min-height: 54px;
  cursor: pointer;
}

.sheet-viewer-queue-item[draggable="true"] {
  cursor: grab;
}

.sheet-viewer-queue-item .sheet-viewer-queue-index {
  display: grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: rgba(255, 248, 234, 0.12);
  font-size: 11px;
  font-weight: 900;
}

.sheet-viewer-queue-item .cover-art-xs {
  width: 32px;
}

.sheet-viewer-queue-item .sheet-viewer-queue-copy {
  display: grid;
  gap: 2px;
  place-items: unset;
  width: auto;
  min-width: 0;
  padding: 0;
  aspect-ratio: auto;
  border-radius: 0;
  background: transparent;
}

.sheet-viewer-queue-item .sheet-viewer-queue-copy small {
  overflow: hidden;
  color: rgba(255, 248, 234, 0.58);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-viewer-queue-item.active .sheet-viewer-queue-copy small {
  color: rgba(11, 51, 45, 0.64);
}

.sheet-viewer-freestyle-item {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.sheet-viewer-queue-item.sheet-viewer-freestyle-item {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  min-height: 70px;
  padding: 10px;
  color: #08352f;
  border-color: rgba(142, 234, 219, 0.48);
  background:
    linear-gradient(135deg, rgba(164, 238, 226, 0.98), rgba(122, 218, 202, 0.9)),
    #9feada;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 14px 30px rgba(25, 145, 130, 0.22);
}

.sheet-viewer-queue-item.sheet-viewer-freestyle-item:hover {
  border-color: rgba(255, 248, 234, 0.42);
  background:
    linear-gradient(135deg, #b9f3e8, #7dddcf),
    #9feada;
  transform: translateY(-1px);
}

.sheet-viewer-queue-item.sheet-viewer-freestyle-item.active,
.sheet-viewer-queue-item.sheet-viewer-freestyle-item.timer-running {
  border-color: rgba(255, 248, 234, 0.42);
  background:
    linear-gradient(135deg, #d8f8ef, #8ce5d7),
    #a7efe3;
}

.sheet-viewer-freestyle-item .sheet-viewer-queue-index {
  width: 34px;
  min-width: 34px;
  color: #0b3f38;
  background: rgba(255, 248, 234, 0.28);
}

.sheet-viewer-freestyle-item .sheet-viewer-queue-copy strong {
  color: #092f2a;
  font-size: 13px;
}

.sheet-viewer-freestyle-item .sheet-viewer-queue-copy small {
  color: rgba(9, 47, 42, 0.7);
  font-size: 11px;
}

.sheet-viewer-jam-timer {
  display: grid;
  place-items: center;
  min-width: 58px;
  min-height: 40px;
  padding: 5px 8px;
  color: #0a332d;
  border: 1px solid rgba(8, 53, 47, 0.12);
  border-radius: 999px;
  background: rgba(255, 248, 234, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.sheet-viewer-jam-timer b {
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.sheet-viewer-jam-timer small {
  color: #0b332d;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.1;
}

.sheet-viewer-freestyle-item.timer-running .sheet-viewer-jam-timer {
  background: #fff8ea;
}

.sheet-viewer-freestyle-item.timer-running .sheet-viewer-jam-timer b {
  color: #1b8f80;
}

.sheet-viewer-freestyle-item em {
  grid-column: 2 / -1;
  color: rgba(9, 47, 42, 0.62);
  font-size: 10px;
  line-height: 1.2;
  white-space: normal;
}

/* Practice set cleanup: quiet reorder affordance and stable save strip */
body[data-view="practice"] #practiceView .session-card-title {
  grid-template-columns: 20px auto minmax(0, 1fr);
  gap: 10px;
}

body[data-view="practice"] #practiceView .session-drag-handle {
  width: 18px;
  min-width: 18px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background:
    radial-gradient(circle, rgba(15, 57, 51, 0.34) 1.5px, transparent 1.7px) 0 0 / 7px 7px;
  box-shadow: none;
  opacity: 0.68;
}

body[data-view="practice"] #practiceView .session-card:hover .session-drag-handle,
body[data-view="practice"] #practiceView .session-card.dragging .session-drag-handle {
  opacity: 1;
}

body[data-view="practice"] #practiceView .practice-log-strip {
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px 8px 12px;
  overflow: visible;
}

body[data-view="practice"] #practiceView .practice-log-strip > div:first-child {
  align-content: center;
}

body[data-view="practice"] #practiceView .practice-log-strip .eyebrow {
  display: none;
}

body[data-view="practice"] #practiceView .practice-log-strip strong {
  line-height: 1.15;
}

body[data-view="practice"] #practiceView .practice-log-strip span {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-view="practice"] #practiceView .practice-log-strip .session-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  min-width: max-content;
  min-height: 0;
  padding: 0;
}

body[data-view="practice"] #practiceView .practice-log-strip .session-actions button {
  min-width: 0;
  min-height: 32px;
  padding: 6px 13px;
  line-height: 1;
}

@media (max-width: 760px) {
  body[data-view="practice"] #practiceView .practice-log-strip {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  body[data-view="practice"] #practiceView .practice-log-strip .session-actions {
    display: grid;
    grid-template-columns: 1fr;
    min-width: 0;
  }
}

/* Practice set spacing pass: keep saving controls clear and the reorder grip quiet. */
@media (min-width: 1241px) {
  body[data-view="practice"] #practiceView .practice-studio-session {
    grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  }
}

body[data-view="practice"] #practiceView .practice-log-strip {
  position: relative;
  z-index: 2;
  margin: 0 14px;
  padding: 9px 12px;
  border-radius: 8px;
}

body[data-view="practice"] #practiceView .practice-log-strip .session-actions button:not(:disabled) {
  color: #082f2a;
  border-color: rgba(40, 185, 167, 0.28);
  background:
    linear-gradient(135deg, rgba(142, 234, 219, 0.95), rgba(54, 203, 184, 0.9)),
    #36cbb8;
  box-shadow: 0 10px 20px rgba(21, 153, 135, 0.14);
}

body[data-view="practice"] #practiceView .practice-log-strip .session-actions #clearSession:not(:disabled) {
  border-color: rgba(31, 111, 99, 0.14);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: none;
}

body[data-view="practice"] #practiceView .practice-session-box .session-list {
  position: relative;
  z-index: 1;
  gap: 8px;
  margin: 0;
  padding: 10px 14px 0;
  overflow: auto;
  scroll-padding: 8px;
}

body[data-view="practice"] #practiceView .practice-session-box.has-session-songs .session-list {
  height: auto;
  max-height: min(calc(var(--bench-visible-slots, 1) * 108px), 560px);
}

body[data-view="practice"] #practiceView .session-card {
  min-height: 98px;
  padding: 10px 12px;
  column-gap: 10px;
  border-radius: 8px;
}

body[data-view="practice"] #practiceView .session-card-title {
  grid-template-columns: 12px auto minmax(0, 1fr);
  gap: 10px;
}

body[data-view="practice"] #practiceView .session-drag-handle {
  width: 12px;
  min-width: 12px;
  min-height: 36px;
  border-radius: 5px;
  background:
    radial-gradient(circle, rgba(15, 57, 51, 0.2) 1.1px, transparent 1.25px) 0 0 / 6px 6px;
  opacity: 0.42;
}

body[data-view="practice"] #practiceView .session-card:hover .session-drag-handle,
body[data-view="practice"] #practiceView .session-card.dragging .session-drag-handle {
  opacity: 0.72;
}

body[data-view="practice"] #practiceView .session-card .cover-art-sm {
  width: 52px;
}

body[data-view="practice"] #practiceView .session-card-actions {
  gap: 7px;
}

body[data-view="practice"] #practiceView .session-card-actions button,
body[data-view="practice"] #practiceView .session-card-actions .text-link {
  min-height: 30px;
  padding: 5px 11px;
}

body[data-view="practice"] #practiceView .studio-drop-hint {
  max-height: none;
  margin: 7px 14px 12px;
  overflow: visible;
  opacity: 0.72;
}

body[data-view="practice"] #practiceView .studio-drop-hint span {
  padding: 7px 10px;
  color: rgba(9, 47, 42, 0.54);
  border-color: rgba(31, 111, 99, 0.2);
  background: rgba(255, 253, 248, 0.42);
  font-size: 11px;
  font-weight: 850;
}

body.practice-card-dragging[data-view="practice"] #practiceView .studio-drop-hint,
body[data-view="practice"] #practiceView .practice-studio-session.drag-over .studio-drop-hint {
  margin-top: 7px;
  margin-bottom: 12px;
  opacity: 1;
}

.sheet-viewer-header-actions .button-link,
.sheet-viewer-header-actions button,
#sheetViewerOpen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

#sheetViewerOpen {
  min-height: 34px;
  padding-inline: 13px;
}

/* Practice set layout fix: separate stats, save controls, and queue cards. */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body[data-view="practice"] #practiceView .practice-studio-pulse {
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.42fr);
  gap: 10px;
  overflow: hidden;
}

body[data-view="practice"] #practiceView .practice-pulse-card {
  min-width: 0;
  overflow: hidden;
}

body[data-view="practice"] #practiceView .practice-pulse-card span,
body[data-view="practice"] #practiceView .practice-pulse-card strong,
body[data-view="practice"] #practiceView .practice-pulse-card em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-view="practice"] #practiceView .practice-session-stat-grid {
  padding: 8px 10px 10px;
  border-bottom: 1px solid rgba(31, 111, 99, 0.1);
}

body[data-view="practice"] #practiceView .practice-log-strip {
  margin: 10px 14px 0;
  padding: 9px 12px;
}

body[data-view="practice"] #practiceView .practice-session-box .session-list {
  margin-top: 8px;
  padding: 0 14px 0;
}

body[data-view="practice"] #practiceView .practice-session-box.has-session-songs .session-list {
  max-height: min(calc(var(--bench-visible-slots, 1) * 116px), 560px);
}

body[data-view="practice"] #practiceView .session-card {
  min-height: 104px;
}

body[data-view="practice"] #practiceView .practice-timer-actions {
  gap: 8px;
}

body[data-view="practice"] #practiceView .timer-icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 999px;
}

body[data-view="practice"] #practiceView .timer-icon-button[aria-disabled="true"] {
  opacity: 0.58;
}

body[data-view="practice"] #practiceView .timer-glyph {
  position: relative;
  display: inline-block;
  color: currentColor;
}

body[data-view="practice"] #practiceView .timer-glyph-play {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid currentColor;
}

body[data-view="practice"] #practiceView #sessionTimerToggle.is-running .timer-glyph-play {
  width: 14px;
  height: 16px;
  margin-left: 0;
  border: 0;
  background:
    linear-gradient(90deg, currentColor 0 35%, transparent 35% 65%, currentColor 65% 100%);
}

body[data-view="practice"] #practiceView .timer-glyph-reset {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-radius: 999px;
}

body[data-view="practice"] #practiceView .timer-glyph-reset::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 6px solid currentColor;
  transform: rotate(-28deg);
  transform-origin: center;
}

/* Reader timer separation: session clock controls live here, Jam keeps only a small elapsed badge. */
.timer-icon-button {
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
}

.timer-glyph {
  position: relative;
  display: inline-block;
  color: currentColor;
}

.timer-glyph-play {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid currentColor;
}

.timer-icon-button.is-running .timer-glyph-play {
  width: 14px;
  height: 16px;
  margin-left: 0;
  border: 0;
  background:
    linear-gradient(90deg, currentColor 0 35%, transparent 35% 65%, currentColor 65% 100%);
}

.sheet-viewer-session-card {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.sheet-viewer-timer-button {
  align-self: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  color: #082f2a;
  border-color: rgba(142, 234, 219, 0.34);
  background: rgba(255, 248, 234, 0.9);
  box-shadow: none;
}

.sheet-viewer-timer-button.is-running {
  background:
    linear-gradient(135deg, #9af0e3, #36cbb8),
    #36cbb8;
}

.sheet-viewer-timer-button[aria-disabled="true"] {
  opacity: 0.48;
}

.sheet-viewer-session-total {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sheet-viewer-session-total strong {
  font-size: 17px;
  line-height: 1;
}

.sheet-viewer-queue-item.sheet-viewer-freestyle-item {
  cursor: pointer;
}

.sheet-viewer-jam-timer {
  min-width: 54px;
  min-height: 38px;
  padding: 5px 7px;
  pointer-events: none;
}

.sheet-viewer-jam-timer b {
  font-size: 8px;
}

/* Final practice polish: warmer reader rail, clearer session total, matching queue rhythm. */
body.sheet-viewer-open .sheet-viewer-rail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: clamp(300px, 31vw, 356px);
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 0%, rgba(232, 191, 104, 0.2), transparent 36%),
    linear-gradient(165deg, rgba(198, 154, 72, 0.18) 0%, rgba(16, 73, 64, 0.96) 32%, rgba(9, 55, 48, 0.98) 100%);
  border-right: 1px solid rgba(235, 202, 128, 0.2);
  box-shadow: inset -24px 0 54px rgba(0, 0, 0, 0.14);
}

.sheet-viewer-session-card,
.sheet-viewer-queue-panel {
  border-color: rgba(235, 202, 128, 0.18);
  background:
    linear-gradient(145deg, rgba(235, 202, 128, 0.12) 0%, rgba(142, 234, 219, 0.08) 46%, rgba(9, 39, 35, 0.06) 100%),
    rgba(13, 44, 39, 0.62);
}

.sheet-viewer-session-card .sheet-viewer-session-total {
  min-height: 34px;
  padding: 8px 8px 0;
  border-top-color: rgba(235, 202, 128, 0.18);
  display: flex;
}

.sheet-viewer-session-card .sheet-viewer-session-total span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 248, 234, 0.78);
}

.sheet-viewer-session-card .sheet-viewer-session-total span::before {
  content: "x";
  display: inline-grid;
  place-items: center;
  width: 22px;
  min-width: 22px;
  aspect-ratio: 1;
  color: #f5d585;
  border: 1px solid rgba(235, 202, 128, 0.24);
  border-radius: 999px;
  background: rgba(235, 202, 128, 0.14);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  text-transform: none;
}

.sheet-viewer-session-card .sheet-viewer-session-total strong {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 28px;
  padding: 0 10px;
  color: #fff6d6;
  border: 1px solid rgba(235, 202, 128, 0.26);
  border-radius: 999px;
  background: rgba(235, 202, 128, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body[data-view="practice"] #practiceView .practice-session-box .session-list {
  display: flex;
  flex-direction: column;
  align-content: stretch;
  gap: 10px;
  row-gap: 10px;
  margin-top: 10px;
  padding: 0 14px 12px;
  scroll-padding: 10px;
  overflow-y: auto;
}

body[data-view="practice"] #practiceView .practice-session-box.has-session-songs .session-list {
  max-height: min(calc(var(--bench-visible-slots, 1) * 128px), 596px);
}

body[data-view="practice"] #practiceView .practice-picker-side .song-card-grid {
  gap: 10px;
}

.sheet-viewer-queue-list {
  gap: 8px;
}

body.sheet-viewer-queue-open .sheet-viewer-queue-panel {
  top: 190px;
  max-height: min(430px, calc(100vh - 206px));
}

body.sheet-viewer-queue-open.sheet-viewer-notes-open .sheet-viewer-queue-panel {
  max-height: clamp(138px, calc(100vh - 594px), 196px);
}

@media (min-width: 1180px) {
  body.sheet-viewer-queue-open .sheet-viewer-queue-panel {
    top: 190px;
    bottom: 14px;
    max-height: none;
  }

  body.sheet-viewer-queue-open.sheet-viewer-notes-open .sheet-viewer-queue-panel {
    max-height: clamp(138px, calc(100vh - 594px), 196px);
  }
}

body[data-view="practice"] #practiceView .session-card {
  flex: 0 0 auto;
  min-height: 106px;
}

@media (max-width: 900px) {
  body.sheet-viewer-open .sheet-viewer-rail::before {
    right: 0;
    bottom: auto;
    width: auto;
    height: 262px;
  }

  body.sheet-viewer-queue-open .sheet-viewer-queue-panel {
    top: 176px;
    max-height: 196px;
  }
}

/* Responsive Reader and empty Practice Studio fit pass. */
:root {
  --reader-rail-width: clamp(244px, 19vw, 318px);
  --reader-control-height: 38px;
}

body.sheet-viewer-open .sheet-viewer-rail::before {
  width: calc(var(--reader-rail-width) + 18px);
}

.sheet-viewer-session-card,
.sheet-viewer-queue-panel {
  width: var(--reader-rail-width);
}

@media (min-width: 1180px) {
  body.sheet-viewer-queue-open .sheet-spread {
    padding-left: calc(var(--reader-rail-width) + 20px);
  }

  body.sheet-viewer-queue-open .sheet-viewer-practice-controls {
    left: calc(var(--reader-rail-width) + ((100vw - var(--reader-rail-width)) / 2));
    max-width: calc(100vw - var(--reader-rail-width) - 36px);
  }
}

.sheet-viewer-practice-controls {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  min-height: var(--reader-control-height);
  max-height: var(--reader-control-height);
  overflow: hidden;
  padding: 4px 6px;
}

.sheet-viewer-practice-controls button,
.sheet-viewer-practice-controls .sheet-viewer-toolbar button,
.sheet-viewer-practice-controls .sheet-viewer-toolbar span {
  height: 30px;
  min-height: 30px;
  padding: 4px 9px;
  white-space: nowrap;
}

.sheet-viewer-practice-controls .sheet-viewer-toolbar {
  display: grid;
  grid-template-columns: 50px 66px 50px;
  flex: 0 0 auto;
  gap: 4px;
  flex-wrap: nowrap;
}

.sheet-viewer-practice-controls .sheet-viewer-toolbar button,
.sheet-viewer-practice-controls .sheet-viewer-toolbar span {
  min-width: 0;
  width: 100%;
}

.sheet-viewer-play-stepper {
  flex: 0 0 146px;
  grid-template-columns: 30px minmax(58px, 1fr) 30px;
  height: 30px;
  min-height: 30px;
}

.sheet-viewer-practice-controls .sheet-viewer-play-stepper button {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
}

.sheet-viewer-play-count {
  min-height: 30px;
  padding: 0 6px;
  text-align: center;
}

body[data-view="practice"] #practiceView .practice-session-box:not(.has-session-songs) .session-list {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  min-height: 0;
  padding: 18px 20px 24px;
  overflow: hidden;
}

body[data-view="practice"] #practiceView .practice-session-box:not(.has-session-songs) .session-empty.now-playing-empty {
  align-self: center;
  justify-self: center;
  width: min(100%, 430px);
  height: 100%;
  min-height: 0 !important;
  max-height: 470px;
  margin: 0 auto;
}

@media (max-width: 1500px) {
  :root {
    --reader-rail-width: 268px;
  }

  .sheet-viewer-session-card {
    top: 66px;
    padding: 8px;
  }

  body.sheet-viewer-queue-open .sheet-viewer-queue-panel {
    top: 178px;
  }

  .sheet-viewer-queue-item {
    min-height: 48px;
    padding: 7px;
  }

  .sheet-viewer-queue-item .cover-art-xs {
    width: 28px;
  }

  .sheet-viewer-queue-item .sheet-viewer-queue-copy strong {
    font-size: 11px;
  }

  .sheet-viewer-queue-item .sheet-viewer-queue-copy small,
  .sheet-viewer-queue-item em {
    font-size: 9px;
  }
}

@media (max-width: 1320px) {
  :root {
    --reader-rail-width: 232px;
  }

  body.sheet-viewer-queue-open .sheet-viewer-queue-panel {
    top: 220px;
  }

  .sheet-viewer-header > div:first-child {
    max-width: 230px;
  }

  .sheet-viewer-session-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sheet-viewer-finish-button {
    grid-column: 2;
  }

  .sheet-viewer-timer-button {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
  }

  .sheet-viewer-queue-item {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }

  .sheet-viewer-queue-item .cover-art-xs {
    display: none;
  }

  .sheet-viewer-queue-item.sheet-viewer-freestyle-item {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  #sheetViewerPrevSong,
  #sheetViewerNextSong {
    min-width: 48px;
    font-size: 0;
  }

  #sheetViewerPrevSong::after,
  #sheetViewerNextSong::after {
    font-size: 11px;
  }

  #sheetViewerPrevSong::after {
    content: "Prev";
  }

  #sheetViewerNextSong::after {
    content: "Next";
  }
}

@media (max-width: 1179px) {
  :root {
    --reader-rail-width: 218px;
  }

  body.sheet-viewer-queue-open .sheet-spread {
    padding-left: calc(var(--reader-rail-width) + 14px);
  }

  body.sheet-viewer-queue-open .sheet-viewer-practice-controls {
    right: 12px;
    left: calc(var(--reader-rail-width) + 18px);
    max-width: none;
    transform: none;
  }

  .sheet-viewer-practice-controls {
    gap: 4px;
  }

  .sheet-viewer-practice-controls button {
    padding-inline: 7px;
    font-size: 11px;
  }

  .sheet-viewer-play-stepper {
    flex-basis: 132px;
  }
}

@media (max-width: 760px) {
  body.sheet-viewer-queue-open .sheet-spread {
    padding-left: 4px;
  }

  .sheet-viewer-session-card,
  .sheet-viewer-queue-panel,
  body.sheet-viewer-open .sheet-viewer-rail::before {
    display: none;
  }

  body.sheet-viewer-queue-open .sheet-viewer-practice-controls {
    left: 8px;
    right: 8px;
  }
}

/* Empty Practice Studio polish: quieter set art and greener timer affordance. */
body[data-view="practice"] #practiceView #sessionTimerToggle {
  color: #07362f;
  border-color: rgba(21, 153, 135, 0.32);
  background:
    linear-gradient(135deg, #9af0e3, #33c9b6),
    var(--ui-primary);
  box-shadow: 0 12px 24px rgba(21, 153, 135, 0.2);
  opacity: 1;
}

body[data-view="practice"] #practiceView #sessionTimerToggle[aria-disabled="true"] {
  color: rgba(7, 54, 47, 0.82);
  border-color: rgba(21, 153, 135, 0.22);
  background:
    linear-gradient(135deg, rgba(154, 240, 227, 0.78), rgba(51, 201, 182, 0.72)),
    rgba(232, 250, 245, 0.95);
  box-shadow: 0 10px 20px rgba(21, 153, 135, 0.14);
  opacity: 1;
}

body[data-view="practice"] #practiceView #resetSessionTimer[aria-disabled="true"] {
  color: rgba(66, 85, 78, 0.46);
  border-color: rgba(22, 74, 65, 0.1);
  background: rgba(231, 226, 214, 0.66);
  box-shadow: none;
  opacity: 1;
}

body[data-view="practice"] #practiceView .practice-session-box:not(.has-session-songs) .session-empty.now-playing-empty {
  gap: 8px;
  width: min(100%, 340px);
}

body[data-view="practice"] #practiceView .practice-session-box:not(.has-session-songs) .cover-art-session {
  width: 76px;
  padding: 6px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.2), transparent 28%),
    linear-gradient(145deg, rgba(47, 199, 190, 0.78), rgba(18, 86, 103, 0.84));
  box-shadow: 0 8px 18px rgba(20, 72, 74, 0.12);
}

body[data-view="practice"] #practiceView .practice-session-box:not(.has-session-songs) .cover-art-session::after {
  left: 14px;
  right: 14px;
  height: 1px;
  opacity: 0.64;
  box-shadow: 0 5px 0 rgba(255, 255, 255, 0.32), 0 -5px 0 rgba(255, 255, 255, 0.22);
}

body[data-view="practice"] #practiceView .practice-session-box:not(.has-session-songs) .cover-art-session span {
  color: rgba(255, 248, 234, 0.62);
  font-size: 9px;
  letter-spacing: 0;
}

body[data-view="practice"] #practiceView .practice-session-box:not(.has-session-songs) .cover-art-session i {
  color: rgba(255, 248, 234, 0.9);
  font-size: 6px;
}

body[data-view="practice"] #practiceView .practice-session-box:not(.has-session-songs) .session-empty.now-playing-empty > strong {
  font-size: 18px;
  line-height: 1.05;
}

body[data-view="practice"] #practiceView .practice-session-box:not(.has-session-songs) .session-empty.now-playing-empty > span {
  max-width: 280px;
  font-size: 14px;
  line-height: 1.25;
}

body[data-view="practice"] #practiceView .session-empty.now-playing-empty button {
  min-height: 38px;
  margin-top: 4px;
  padding: 8px 18px;
  font-size: 15px;
}

/* Keep queued song cards visually consistent regardless of title length. */
body[data-view="practice"] #practiceView .practice-session-box .session-list {
  align-items: stretch;
}

body[data-view="practice"] #practiceView .practice-session-box .session-list > .session-card {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Sheet Music MVP flow refinements */
body[data-view="upload"] #uploadView .library-database-layout:not(.preview-collapsed) {
  align-items: stretch;
}

body[data-view="upload"] #uploadView .library-database-layout:not(.preview-collapsed) .music-library-panel,
body[data-view="upload"] #uploadView .library-database-layout:not(.preview-collapsed) .sheet-preview-panel {
  min-height: calc(100vh - 104px);
}

body[data-view="upload"] #uploadView .sheet-preview-panel {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 104px);
  grid-template-rows: auto auto minmax(0, 1fr);
}

body[data-view="upload"] #uploadView .sheet-preview-frame {
  min-height: 0;
  height: 100%;
}

body[data-view="upload"] #uploadView .sheet-preview-frame iframe {
  min-height: 0;
}

body[data-view="upload"] #uploadView .library-database-layout.preview-collapsed .sheet-preview-panel {
  position: sticky;
  top: 72px;
  min-height: calc(100vh - 104px);
  max-height: calc(100vh - 104px);
  padding: 8px;
  border-color: rgba(31, 111, 99, 0.14);
  background:
    linear-gradient(90deg, rgba(142, 228, 209, 0.28), transparent 18px),
    rgba(255, 253, 248, 0.86);
}

body[data-view="upload"] #uploadView .library-database-layout.preview-collapsed .preview-rail-toggle {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  border-color: rgba(142, 228, 209, 0.34);
  background:
    linear-gradient(180deg, rgba(142, 228, 209, 0.3), rgba(142, 228, 209, 0.04) 38%),
    linear-gradient(180deg, #153a34, #1d665d 58%, #12322e);
}

body[data-view="upload"] #uploadView .library-database-layout.preview-collapsed .preview-rail-toggle::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 7px;
  width: 4px;
  border-radius: 999px;
  background: #8ee4d1;
  box-shadow: 0 0 18px rgba(142, 228, 209, 0.44);
}

body[data-view="upload"] #uploadView .library-database-layout.preview-collapsed .preview-rail-chevron {
  box-shadow: 0 0 0 6px rgba(142, 228, 209, 0.16);
}

#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table {
  width: 100%;
  min-width: 820px;
  table-layout: fixed;
}

#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table th,
#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table td {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table td {
  height: 64px;
  padding: 10px 14px;
}

#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table th:nth-child(1),
#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table td:nth-child(1) {
  width: 42%;
}

#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table th:nth-child(2),
#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table td:nth-child(2) {
  width: 9%;
}

#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table th:nth-child(3),
#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table td:nth-child(3) {
  width: 16%;
}

#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table th:nth-child(4),
#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table td:nth-child(4) {
  width: 22%;
}

#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table th:nth-child(5),
#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .music-table td:nth-child(5) {
  width: 11%;
}

#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .plays-cell,
#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .last-played-cell {
  display: table-cell;
  vertical-align: middle;
  white-space: nowrap;
}

#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .plays-cell strong,
#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .last-played-cell strong {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  color: var(--studio-ink);
  font-size: 13px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#uploadView .library-database-layout.music-stats-mode:not(.music-edit-mode) .plays-cell strong {
  min-width: 28px;
  padding: 5px 8px;
  border: 1px solid rgba(31, 111, 99, 0.1);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.82);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

#songModalBody .pdf-management-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(31, 111, 99, 0.12);
  border-radius: 9px;
  background: rgba(255, 253, 247, 0.78);
}

#songModalBody .pdf-management-box strong,
#songModalBody .pdf-management-box small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#songModalBody .pdf-management-box strong {
  color: var(--studio-ink);
  font-size: 13px;
  line-height: 1.25;
}

#songModalBody .pdf-management-box small {
  color: var(--ui-muted);
  font-size: 12px;
}

#songModalBody .pdf-management-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

#songModalBody .pdf-management-actions input[type="file"] {
  width: 100%;
  min-height: 38px;
  padding: 7px;
  border: 1px solid rgba(31, 111, 99, 0.14);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.92);
}

.remove-sheet-confirm-modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: hidden;
  border: 1px solid rgba(182, 75, 75, 0.18);
  border-radius: var(--ui-radius-md, 8px);
  background: var(--ui-surface, #fffdf8);
  box-shadow: var(--ui-shadow-strong, 0 24px 70px rgba(77, 63, 40, 0.24));
}

.remove-sheet-confirm-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.remove-sheet-warning {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(182, 75, 75, 0.18);
  border-radius: 8px;
  background: rgba(255, 248, 246, 0.78);
}

.remove-sheet-warning strong {
  color: var(--ui-danger, #b64b4b);
  font-size: 15px;
}

.remove-sheet-warning span {
  color: var(--ui-muted, #65736e);
  font-size: 13px;
}

.remove-sheet-confirm-list {
  display: grid;
  gap: 7px;
  max-height: 240px;
  overflow: auto;
}

.remove-sheet-confirm-row {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid rgba(31, 111, 99, 0.1);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.76);
}

.remove-sheet-confirm-row strong,
.remove-sheet-confirm-row span,
.remove-sheet-confirm-more {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-sheet-confirm-row strong {
  color: var(--studio-ink);
  font-size: 13px;
}

.remove-sheet-confirm-row span,
.remove-sheet-confirm-more {
  color: var(--ui-muted, #65736e);
  font-size: 12px;
}

.remove-sheet-confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.remove-sheet-confirm-actions button {
  min-height: 38px;
}

@media (max-width: 1180px) {
  body[data-view="upload"] #uploadView .library-database-layout:not(.preview-collapsed) .music-library-panel,
  body[data-view="upload"] #uploadView .library-database-layout:not(.preview-collapsed) .sheet-preview-panel {
    min-height: 0;
  }

  body[data-view="upload"] #uploadView .sheet-preview-panel {
    position: relative;
    top: auto;
    max-height: none;
  }
}

@media (max-width: 720px) {
  #songModalBody .pdf-management-actions {
    grid-template-columns: 1fr;
  }

  .remove-sheet-confirm-actions {
    display: grid;
  }
}

/* Sheet Music filter persistence and import-review polish. */
#uploadView .sheet-music-pulse {
  display: none;
}

#uploadView .library-search-dock {
  gap: 9px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(31, 111, 99, 0.09);
  background:
    linear-gradient(135deg, rgba(142, 228, 209, 0.12), transparent 42%),
    rgba(255, 253, 248, 0.82);
}

#uploadView .music-table-tools {
  grid-template-columns: minmax(260px, 1fr) minmax(148px, 176px) minmax(148px, 176px);
  gap: 9px;
}

#uploadView .music-table-tools input,
#uploadView .music-table-tools select,
#uploadView .music-table-tools button {
  min-height: 36px;
  height: 36px;
  border-color: rgba(31, 111, 99, 0.13);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 253, 248, 0.72));
  color: rgba(18, 50, 46, 0.86);
  font-size: 12px;
  font-weight: 650;
}

#uploadView #musicTableSearch {
  min-height: 40px;
  height: 40px;
  padding-left: 14px;
  border-color: rgba(31, 111, 99, 0.18);
  background:
    linear-gradient(90deg, rgba(142, 228, 209, 0.2), transparent 7px),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(31, 111, 99, 0.05);
  font-size: 14px;
  font-weight: 700;
}

#uploadView #musicTableSort {
  grid-column: 1 / 3;
}

#uploadView #clearMusicTableFilters {
  grid-column: 3;
  color: rgba(18, 50, 46, 0.76);
}

#uploadView .library-search-shortcuts {
  gap: 7px;
  padding-top: 1px;
}

#uploadView .library-filter-chip {
  position: relative;
  min-height: 27px;
  padding: 4px 9px;
  border-color: rgba(31, 111, 99, 0.11);
  background: rgba(255, 253, 248, 0.78);
  color: rgba(18, 50, 46, 0.74);
  font-size: 11px;
  font-weight: 650;
}

#uploadView .library-filter-chip span,
#uploadView .library-filter-chip strong {
  font-weight: 700;
}

#uploadView .library-filter-chip strong {
  color: rgba(64, 116, 105, 0.78);
  font-variant-numeric: tabular-nums;
}

#uploadView .library-filter-chip.active {
  border-color: rgba(80, 170, 153, 0.28);
  background:
    linear-gradient(180deg, rgba(142, 228, 209, 0.32), rgba(142, 228, 209, 0.14)),
    rgba(255, 253, 248, 0.9);
  color: var(--studio-ink);
  box-shadow: 0 6px 14px rgba(31, 111, 99, 0.08);
}

#uploadView .library-filter-chip.loading {
  padding-right: 27px;
  color: var(--studio-ink);
}

#uploadView .library-filter-chip.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 8px;
  width: 11px;
  height: 11px;
  margin-top: -5.5px;
  border: 2px solid rgba(31, 111, 99, 0.14);
  border-top-color: #2bbca9;
  border-radius: 999px;
  animation: library-filter-spin 0.78s linear infinite;
}

#uploadView .upload-result-actions {
  align-items: center;
}

#uploadView .upload-result-actions .review-imported-button {
  position: relative;
  min-height: 40px;
  padding: 8px 16px;
  border-color: rgba(31, 111, 99, 0.18);
  background:
    linear-gradient(135deg, rgba(142, 228, 209, 0.72), rgba(65, 201, 181, 0.86)),
    var(--ui-primary);
  color: #07362f;
  box-shadow: 0 10px 20px rgba(31, 111, 99, 0.12);
  font-size: 14px;
}

#uploadView .upload-result-actions .review-imported-button.is-loading {
  padding-right: 38px;
}

#uploadView .upload-result-actions .review-imported-button.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 15px;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border: 2px solid rgba(7, 54, 47, 0.18);
  border-top-color: #07362f;
  border-radius: 999px;
  animation: library-filter-spin 0.78s linear infinite;
}

@keyframes library-filter-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 840px) {
  #uploadView .music-table-tools {
    grid-template-columns: 1fr;
  }

  #uploadView #musicTableSearch,
  #uploadView #musicTableFamiliarity,
  #uploadView #musicTableStatus,
  #uploadView #musicTableSort,
  #uploadView #clearMusicTableFilters {
    grid-column: 1;
  }
}

/* Song detail modal cleanup: compact MVP workflows over large dashboard surfaces. */
#songModal .song-modal {
  width: min(960px, calc(100vw - 40px));
  max-height: calc(100vh - 28px);
  border-color: rgba(31, 111, 99, 0.16);
  border-radius: 10px;
  background: #fffdf8;
}

#songModal .modal-header {
  min-height: 74px;
  padding: 16px 22px;
  color: #fff8ea;
  border-bottom: 1px solid rgba(255, 248, 234, 0.08);
}

#songModal .modal-header h2 {
  font-size: 20px;
  line-height: 1.1;
}

#songModal .modal-header p {
  max-width: 680px;
  color: rgba(255, 248, 234, 0.74);
  font-size: 13px;
  line-height: 1.25;
}

#songModal #closeSongModal {
  min-height: 34px;
  padding: 7px 14px;
}

#songModalBody {
  gap: 12px;
  padding: 14px 22px 18px;
}

#songModalBody .song-detail-hero {
  grid-template-columns: 76px minmax(0, 1fr) minmax(180px, auto);
  gap: 12px;
  padding: 12px;
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(231, 248, 243, 0.74)),
    #fffdf8;
  box-shadow: 0 8px 22px rgba(31, 111, 99, 0.07);
}

#songModalBody .cover-art-modal {
  width: 76px;
  border-radius: 7px;
  box-shadow: 0 8px 18px rgba(18, 58, 52, 0.12);
}

#songModalBody .song-detail-hero-copy {
  gap: 3px;
}

#songModalBody .song-detail-hero-copy .eyebrow {
  font-size: 10px;
}

#songModalBody .song-detail-hero-copy h3 {
  font-size: 21px;
  line-height: 1.08;
}

#songModalBody .song-detail-hero-copy p:not(.eyebrow) {
  color: rgba(18, 50, 46, 0.66);
  font-size: 13px;
  font-weight: 720;
}

#songModalBody .song-detail-badges {
  gap: 5px;
  margin-top: 5px;
}

#songModalBody .song-detail-badges span {
  min-height: 22px;
  padding: 3px 7px;
  color: rgba(18, 50, 46, 0.78);
  background: rgba(255, 253, 248, 0.72);
  font-size: 11px;
  font-weight: 760;
}

#songModalBody .song-detail-hero-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  min-width: 206px;
}

#songModalBody .song-detail-hero-actions button,
#songModalBody .song-detail-hero-actions .text-link {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
}

#songModalBody .song-detail-tabs {
  gap: 5px;
  padding: 4px;
  border-radius: 9px;
}

#songModalBody .song-detail-tabs button {
  min-height: 34px;
  padding: 7px 10px;
  color: rgba(18, 50, 46, 0.72);
  font-size: 12px;
  font-weight: 780;
}

#songModalBody .song-detail-tabs button.active {
  box-shadow: 0 6px 14px rgba(31, 111, 99, 0.08);
}

#songModalBody .song-detail-tab-panel {
  gap: 11px;
}

#songModalBody .practice-detail-grid {
  gap: 10px;
}

#songModalBody .practice-detail-grid article {
  min-height: 68px;
  padding: 11px 12px;
  border-radius: 8px;
}

#songModalBody .practice-detail-grid strong {
  font-size: 16px;
}

#songModalBody .practice-detail-grid small,
#songModalBody .session-history-card small {
  font-size: 11px;
  font-weight: 720;
}

#songModalBody .practice-note-panel {
  grid-template-columns: minmax(122px, 0.18fr) minmax(0, 1fr) 112px;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
}

#songModalBody .practice-note-panel strong {
  font-size: 14px;
}

#songModalBody .practice-note-panel textarea {
  min-height: 86px;
  font-size: 13px;
}

#songModalBody .practice-note-actions {
  min-width: 0;
}

#songModalBody .practice-note-actions button {
  min-height: 36px;
  padding: 7px 10px;
}

#songModalBody .practice-edit-grid,
#songModalBody .detail-grid {
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
}

#songModalBody .detail-grid label {
  gap: 6px;
  font-size: 11px;
}

#songModalBody .detail-grid input,
#songModalBody .detail-grid select,
#songModalBody .detail-grid textarea {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
}

#songModalBody .detail-grid textarea {
  min-height: 86px;
}

#songModalBody .pdf-status-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid rgba(31, 111, 99, 0.1);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.78);
}

#songModalBody .pdf-status-strip strong,
#songModalBody .pdf-status-strip small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#songModalBody .pdf-status-strip strong {
  color: var(--studio-ink);
  font-size: 13px;
}

#songModalBody .pdf-status-strip small {
  color: rgba(18, 50, 46, 0.54);
  font-size: 12px;
  font-weight: 760;
}

#songModalBody .pdf-management-box {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(231, 248, 243, 0.62)),
    #fffdf8;
}

#songModalBody .pdf-management-box .meta {
  margin-bottom: 2px;
}

#songModalBody .pdf-management-actions {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

#songModalBody .pdf-management-actions input[type="file"] {
  min-height: 36px;
  padding: 6px 8px;
  font-size: 12px;
}

#songModalBody .pdf-management-actions button {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
}

#songModalBody .pdf-management-actions [data-action="remove-sheet"] {
  color: #842a2a;
  border-color: rgba(182, 75, 75, 0.24);
  background: rgba(255, 248, 246, 0.86);
}

#songModalBody .pdf-management-actions [data-action="remove-sheet"]:hover,
#songModalBody .pdf-management-actions [data-action="remove-sheet"]:focus-visible {
  background: rgba(255, 238, 234, 0.96);
}

#songModalBody .parser-note-box {
  padding: 0;
  border: 1px solid rgba(31, 111, 99, 0.1);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.7);
}

#songModalBody .parser-note-box summary {
  cursor: pointer;
  padding: 10px 12px;
  color: rgba(18, 50, 46, 0.74);
  font-size: 12px;
  font-weight: 820;
}

#songModalBody .parser-note-box > div {
  display: grid;
  gap: 6px;
  padding: 0 12px 10px;
}

#songModalBody .parser-note-box p {
  font-size: 12px;
}

#songModalBody .source-query-chips {
  padding: 0 12px 10px;
}

#songModalBody .source-query-chips span {
  min-height: 22px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
}

#songModalBody .session-history-card {
  border-radius: 8px;
}

#songModalBody .modal-save-row {
  margin: 0 -22px -18px;
  padding: 10px 22px;
  background: rgba(255, 253, 248, 0.94);
}

#songModalBody .modal-save-row button {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
}

.remove-sheet-confirm-modal {
  width: min(520px, calc(100vw - 32px));
  border-color: rgba(182, 75, 75, 0.18);
  border-radius: 10px;
  background: #fffdf8;
}

.remove-sheet-confirm-modal .modal-header {
  min-height: 0;
  padding: 16px 18px;
  color: var(--studio-ink);
  border-bottom: 1px solid rgba(31, 111, 99, 0.1);
  background:
    linear-gradient(135deg, rgba(255, 248, 246, 0.92), rgba(255, 253, 248, 0.98)),
    #fffdf8;
}

.remove-sheet-confirm-modal .modal-header .eyebrow,
.remove-sheet-confirm-modal .modal-header h2,
.remove-sheet-confirm-modal .modal-header p {
  color: var(--studio-ink);
}

.remove-sheet-confirm-modal .modal-header .eyebrow {
  color: rgba(182, 75, 75, 0.86);
}

.remove-sheet-confirm-modal .modal-header h2 {
  font-size: 18px;
}

.remove-sheet-confirm-modal .modal-header p {
  color: rgba(18, 50, 46, 0.66);
  font-size: 13px;
  line-height: 1.35;
}

.remove-sheet-confirm-modal #removeSheetConfirmClose {
  min-height: 34px;
  padding: 7px 14px;
}

.remove-sheet-confirm-body {
  gap: 10px;
  padding: 14px;
}

.remove-sheet-warning {
  padding: 10px 11px;
  border-radius: 8px;
  background: rgba(255, 248, 246, 0.82);
}

.remove-sheet-warning strong {
  font-size: 14px;
}

.remove-sheet-confirm-row {
  padding: 8px 10px;
  background: rgba(255, 253, 248, 0.82);
}

.remove-sheet-confirm-actions {
  gap: 8px;
}

.remove-sheet-confirm-actions #removeSheetConfirmSubmit {
  color: #7d2222;
  border-color: rgba(182, 75, 75, 0.28);
  background: rgba(255, 248, 246, 0.9);
}

.remove-sheet-confirm-actions #removeSheetConfirmSubmit:hover,
.remove-sheet-confirm-actions #removeSheetConfirmSubmit:focus-visible {
  background: rgba(255, 238, 234, 0.96);
}

@media (max-width: 900px) {
  #songModalBody .song-detail-hero,
  #songModalBody .pdf-management-box,
  #songModalBody .practice-note-panel {
    grid-template-columns: 1fr;
  }

  #songModalBody .song-detail-hero-actions,
  #songModalBody .practice-note-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
}

@media (max-width: 640px) {
  #songModal .song-modal {
    width: calc(100vw - 20px);
  }

  #songModal .modal-header,
  #songModalBody {
    padding-inline: 14px;
  }

  #songModalBody .song-detail-hero-actions,
  #songModalBody .pdf-status-strip,
  #songModalBody .pdf-management-actions,
  #songModalBody .practice-note-actions {
    grid-template-columns: 1fr;
  }

  #songModalBody .modal-save-row {
    margin-inline: -14px;
    padding-inline: 14px;
  }
}

/* Regression fixes: visible saved notes and correct collapsed preview direction. */
#songModalBody .session-history-row.saved-note-row {
  border-color: rgba(31, 111, 99, 0.14);
  background:
    linear-gradient(135deg, rgba(142, 228, 209, 0.14), rgba(255, 253, 248, 0.88)),
    rgba(255, 253, 248, 0.86);
}

#songModalBody .session-history-row.saved-note-row strong {
  color: var(--studio-ink);
}

#uploadView .library-database-layout.preview-collapsed .preview-rail-chevron::before {
  transform: rotate(225deg);
}

/* Reader and library cleanup follow-ups. */
.sheet-viewer-header-actions #sheetViewerDetails {
  color: #06352f;
  border-color: rgba(142, 228, 209, 0.54);
  background:
    linear-gradient(135deg, #8ee4d1, #3fcdbc),
    #3fcdbc;
  box-shadow: 0 10px 22px rgba(63, 205, 188, 0.24);
}

.sheet-viewer-header-actions #sheetViewerDetails:hover,
.sheet-viewer-header-actions #sheetViewerDetails:focus-visible {
  color: #062a25;
  border-color: rgba(142, 228, 209, 0.72);
  background:
    linear-gradient(135deg, #a0eadb, #54d5c5),
    #54d5c5;
}

.sheet-viewer-header-actions #sheetViewerOpen {
  color: rgba(255, 248, 234, 0.9);
  border-color: rgba(255, 248, 234, 0.18);
  background: rgba(255, 248, 234, 0.1);
  box-shadow: none;
}

.sheet-viewer-header-actions #sheetViewerOpen:hover,
.sheet-viewer-header-actions #sheetViewerOpen:focus-visible {
  color: #0b332d;
  background: rgba(255, 248, 234, 0.86);
}

body[data-view="upload"] #uploadView .library-database-layout.preview-collapsed .sheet-preview-panel {
  background: rgba(255, 253, 248, 0.86);
}

body[data-view="upload"] #uploadView .library-database-layout.preview-collapsed .preview-rail-toggle {
  border-color: rgba(31, 111, 99, 0.24);
  background: linear-gradient(180deg, #153a34, #1d665d 58%, #12322e);
}

body[data-view="upload"] #uploadView .library-database-layout.preview-collapsed .preview-rail-toggle::before {
  content: none;
  display: none;
}

body[data-view="upload"] #uploadView .library-database-layout.preview-collapsed .preview-rail-chevron {
  box-shadow: 0 0 0 5px rgba(142, 228, 209, 0.12);
}

.remove-sheet-warning #removeSheetConfirmDetail.is-working {
  color: rgba(18, 50, 46, 0.72);
  font-weight: 800;
}

.remove-sheet-warning #removeSheetConfirmDetail.is-error {
  color: #9d2f2f;
  font-weight: 850;
}

/* Production polish: clearer selected preview rows and resilient Reader controls. */
#uploadView .music-table tr.previewed td:first-child {
  box-shadow: inset 4px 0 0 rgba(31, 111, 99, 0.68);
}

#uploadView .music-table tr.previewed .song-title-cell strong::after {
  content: "Previewing";
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 7px;
  border: 1px solid rgba(31, 111, 99, 0.18);
  border-radius: 999px;
  color: rgba(31, 111, 99, 0.78);
  background: rgba(142, 228, 209, 0.18);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}

@media (max-width: 760px) {
  .sheet-viewer-practice-controls {
    flex-wrap: wrap;
    max-height: none;
    overflow: visible;
  }

  .sheet-viewer-practice-controls .sheet-viewer-toolbar {
    order: -1;
  }
}
