* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font-ui);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a {
  touch-action: manipulation;
}
button,
select,
input {
  border-radius: var(--radius-s);
  border-color: var(--line);
}
button {
  min-height: 44px;
  background: var(--surface);
  border: 0;
  padding: 10px 16px;
  cursor: pointer;
}
button:hover {
  background: var(--surface-2);
}
a {
  color: inherit;
}
button.primary,
.primary {
  background: var(--accent);
  color: var(--accent-text);
}
input,
textarea,
select {
  background: var(--surface);
  border: 1px solid transparent;
  padding: 10px 14px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  flex-shrink: 0;
  pointer-events: none;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
}
.site-header {
  max-width: none;
  height: 104px;
  padding: 28px max(32px, calc((100% - 1200px) / 2));
  display: flex;
  align-items: center;
  gap: 32px;
  position: relative;
  border: 0;
  background: var(--bg);
}
.wordmark {
  font: 600 22px var(--font-display);
  letter-spacing: -0.04em;
  text-decoration: none;
  white-space: nowrap;
}
.site-header nav {
  display: flex;
  gap: 32px;
  margin: auto;
}
.site-header nav a {
  color: var(--text-2);
  text-decoration: none;
  position: relative;
}
.site-header nav a.active {
  color: var(--text);
}
.avatar {
  border-radius: 50%;
  width: 44px;
  padding: 0;
  background: var(--surface);
  font-weight: 600;
}
.profile-menu {
  z-index: 100;
  position: absolute;
  right: max(24px, calc((100% - 1200px) / 2));
  top: 80px;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 16px 60px #0002;
}
.profile-menu button,
.profile-menu a {
  display: block;
  width: 100%;
  text-align: left;
  text-decoration: none;
  padding: 12px;
  border-radius: 8px;
}
.theme-picker {
  display: flex;
}
.theme-picker button {
  font-size: 13px;
  text-align: center;
  padding: 8px;
}
.sync-dot,
#note-count:not(:empty) {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  font-size: 0;
  margin-left: 4px;
}
.sync-dot {
  background: var(--text-3);
}
main {
  max-width: 1200px;
  margin: 48px auto 160px;
  padding: 0;
  min-height: 60vh;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
h1 {
  font-size: 56px;
  font-weight: 600;
  line-height: 1.1;
}
h2 {
  font-size: 22px;
  font-weight: 600;
}
h3 {
  font-size: 17px;
  font-weight: 500;
}
.mono {
  font-family: var(--font-mono);
}
.muted,
.small {
  color: var(--text-2);
}
.small,
small {
  font-size: 13px;
}
dialog {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px;
  max-width: min(600px, calc(100vw - 32px));
  max-height: 85dvh;
  box-shadow: 0 30px 120px #0003;
}
dialog::backdrop {
  background: #0005;
  backdrop-filter: blur(8px);
}
.dialog-close {
  position: absolute;
  right: 8px;
  top: 8px;
}
.profile-options {
  display: grid;
  gap: 8px;
  margin: 12px 0 24px;
}
.profile-options button {
  font-size: 22px;
  text-align: left;
  padding: 16px;
}
.dialog-form {
  display: flex;
  gap: 8px;
}
#toast {
  position: fixed;
  z-index: 200;
  bottom: 106px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  border-radius: 24px;
  padding: 10px 20px;
  display: none;
  font-size: 15px;
}
#dock {
  z-index: 70;
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, calc(100% - 32px));
  min-height: 72px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  align-items: center;
  box-shadow: 0 8px 36px #0001;
}
#dock[hidden],
[hidden] {
  display: none !important;
}
#dock-title {
  width: 220px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}
#dock-seek {
  flex: 1;
  min-width: 40px;
  height: 8px;
  padding: 0;
  accent-color: var(--accent);
}
#dock-time,
#dock-duration {
  font-size: 13px;
}
.skeleton {
  display: grid;
  gap: 24px;
}
.skeleton i {
  height: 56px;
  border-radius: 8px;
  background: var(--surface);
}
.chip {
  border-radius: 24px;
  background: transparent;
  white-space: nowrap;
  font-size: 15px;
}
.chip.selected {
  background: var(--surface-2);
  color: var(--text);
}
.segmented {
  display: flex;
  gap: 4px;
  background: var(--surface);
  padding: 4px;
  border-radius: 24px;
  width: fit-content;
}
.segmented .selected {
  background: var(--bg);
}
.detail-panel {
  margin: 12px 0;
}
.detail-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 20px 0;
  list-style: none;
  font-size: 17px;
}
.detail-panel > summary::-webkit-details-marker {
  display: none;
}
.detail-panel[open] > summary .icon {
  transform: rotate(180deg);
}
.detail-content {
  padding: 8px 0 36px;
}
.actions,
.flex {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.skeleton i {
  animation: pulse 1.3s infinite alternate;
}
@keyframes pulse {
  to {
    opacity: 0.4;
  }
}
@media (max-width: 680px) {
  .site-header {
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 20px 0;
  }
  .wordmark {
    font-size: 20px;
  }
  .site-header nav {
    order: 3;
    width: 100%;
    gap: 0;
    justify-content: space-between;
    font-size: 13px;
    margin: 0;
  }
  .avatar {
    margin-left: auto;
  }
  .profile-menu {
    top: 62px;
    right: 16px;
  }
  .site-header nav a {
    padding: 10px 0;
  }
  main {
    margin: 40px 20px 150px;
    max-width: none;
  }
  h1 {
    font-size: 34px;
  }
  #dock {
    bottom: 0;
    width: 100%;
    border-radius: 0;
    border-width: 1px 0 0;
    min-height: 64px;
    height: 64px;
    padding: 8px 12px;
    gap: 4px;
  }
  #dock-prev,
  #dock-time,
  #dock-duration {
    display: none;
  }
  #dock-title {
    width: auto;
    flex: 1;
    font-size: 13px;
  }
  #dock-seek {
    position: absolute;
    top: -4px;
    left: 0;
    width: 100%;
    height: 4px;
  }
  dialog {
    position: fixed;
    bottom: 0;
    top: auto;
    margin: 0;
    width: 100%;
    max-width: 100%;
    max-height: 88dvh;
    border-radius: 24px 24px 0 0;
    padding: 36px 24px;
  }
  .dialog-form {
    flex-wrap: wrap;
  }
  #toast {
    bottom: 84px;
  }
  .icon-button {
    flex-shrink: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
:root {
  --paper: var(--bg);
  --ink: var(--text);
  --soft: var(--surface);
  --muted: var(--text-2);
  --blue: var(--accent);
}
.songs-toolbar {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 32px;
}
.list-chips {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: auto;
  scrollbar-width: none;
  min-width: 0;
}
.browse-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.browse-tools input {
  width: 160px;
}
.browse-tools select {
  width: 110px;
  min-height: 44px;
  border: 0;
  background: transparent;
}
.work-row {
  display: grid;
  grid-template-columns: 44px minmax(160px, 1fr) 220px 52px 44px;
  gap: 24px;
  align-items: center;
  min-height: 80px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  position: relative;
  cursor: pointer;
  content-visibility: auto;
  contain-intrinsic-size: auto 55px;
}
.work-row .play {
  border: 0;
  width: 44px;
  height: 44px;
}
.row-title {
  font: 500 22px var(--font-display);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  letter-spacing: -0.02em;
}
.row-title-block {
  min-width: 0;
}
.row-meta {
  font: 13px var(--font-ui);
  color: var(--text-2);
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}
.wave-small {
  width: 100%;
  height: 32px;
  color: var(--text-3);
}
.playing .wave-small,
.playing .play {
  color: var(--accent);
}
.row-more {
  position: absolute;
  right: 44px;
  opacity: 0;
  background: var(--bg);
  z-index: 2;
}
.work-row:hover .row-more,
.row-more:focus-visible {
  opacity: 1;
}
.duration-cell {
  font-size: 13px;
  color: var(--text-2);
  text-align: right;
}
.note-dot,
.review-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.review-dot {
  background: var(--text-3);
}
.filter-popover {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius);
  display: flex;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.filter-popover label {
  font-size: 13px;
  display: grid;
  gap: 8px;
}
.filter-popover select {
  min-width: 120px;
}
.list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.list-card {
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 12px;
  width: 100%;
  height: 240px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  text-decoration: none;
  font: 500 22px var(--font-display);
}
.list-card small {
  font: 15px var(--font-ui);
}
.list-grid > .slot {
  position: relative;
}
.list-menu {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 3;
}
.list-new {
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.list-picker {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}
.list-picker button {
  display: flex;
  justify-content: space-between;
}
#inline-list-form input {
  width: 140px;
}
#toast button {
  background: transparent;
  color: inherit;
  min-height: 24px;
  padding: 0 0 0 12px;
  text-decoration: underline;
}
.empty {
  font-size: 15px;
  color: var(--text-2);
  padding: 48px 0;
}
.slot {
  position: relative;
}
.slot-art,
.slot-over {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}
.slot-art {
  z-index: 0;
}
.slot-content {
  position: relative;
  z-index: 1;
}
.slot-over {
  z-index: 2;
}
.slot-optional > .slot-content:empty {
  display: none;
}
.slot-optional:not(.has-art):not(.editing-slot) > .slot-art {
  display: none;
}
.slot-optional:not(.has-art):not(.editing-slot) > .slot-content:empty {
  height: 0;
}
.list-grid .slot-art + .slot-content .list-card {
  background: transparent;
}
.list-grid .slot {
  background: var(--surface);
  border-radius: var(--radius);
}
@media (max-width: 1000px) {
  .songs-toolbar {
    flex-wrap: wrap;
  }
  .browse-tools {
    margin-left: auto;
  }
  .work-row {
    grid-template-columns: 44px minmax(120px, 1fr) 120px 44px;
    gap: 16px;
  }
  .duration-cell {
    display: none;
  }
}
@media (max-width: 680px) {
  .songs-toolbar {
    gap: 16px;
    margin-bottom: 16px;
  }
  .list-chips {
    width: 100%;
  }
  .browse-tools {
    width: 100%;
    margin: 0;
  }
  .browse-tools input {
    flex: 1;
    min-width: 0;
    width: auto;
  }
  .work-row {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 12px;
    min-height: 80px;
  }
  .work-row > .wave-small,
  .work-row .duration-cell,
  .row-more {
    display: none;
  }
  .row-title {
    font-size: 20px;
  }
  .row-meta {
    font-size: 13px;
  }
  .list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .list-card {
    height: 170px;
    padding: 20px;
    font-size: 17px;
  }
  .filter-popover {
    padding: 16px;
    gap: 12px;
  }
  .filter-popover label {
    width: calc(50% - 6px);
  }
  .filter-popover select {
    min-width: 0;
    width: 100%;
  }
}
.song-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 48px;
}
.song-heading {
  display: flex;
  align-items: baseline;
  gap: 20px;
  min-width: 0;
  flex: 1;
}
.song-heading h1 {
  margin: 0;
  overflow-wrap: anywhere;
}
.song-length {
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
}
.song-tools {
  display: flex;
}
.version-pill {
  width: auto;
  max-width: 180px;
  min-height: 44px;
  border: 0;
  border-radius: 24px;
  font-size: 13px;
}
.core-layout {
  display: grid;
  grid-template-columns: 720px 432px;
  gap: 48px;
  align-items: start;
  margin-bottom: 96px;
}
.core-listen {
  position: relative;
  min-width: 0;
}
.core-layout > .slot {
  position: relative;
}
.big-play {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  display: flex;
  justify-content: center;
  align-items: center;
}
.big-play:hover {
  background: var(--accent);
  opacity: 0.85;
}
.big-play .icon {
  width: 32px;
  height: 32px;
}
.recording-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 32px;
}
#recording {
  height: 300px;
  padding: 24px 0;
}
.wave-wrap {
  position: relative;
  height: 128px;
  touch-action: pan-y;
  cursor: crosshair;
}
.wave-wrap > svg {
  width: 100%;
  height: 100%;
  color: var(--text-3);
  position: absolute;
  inset: 0;
}
.wave-wrap > .played-wave {
  color: var(--accent);
  clip-path: inset(0 100% 0 0);
}
.wave-cursor {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--accent);
  pointer-events: none;
}
.wave-times {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-2);
}
.range-band {
  position: absolute;
  top: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border-inline: 1px solid var(--accent);
  pointer-events: none;
}
.range-actions {
  display: flex;
  position: absolute;
  top: -48px;
  background: var(--surface);
  border-radius: 24px;
  z-index: 5;
  box-shadow: 0 4px 16px #0001;
}
.range-actions button {
  color: var(--accent);
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.wave-note {
  position: absolute;
  bottom: 0;
  width: 22px;
  min-height: 24px;
  padding: 2px;
  background: var(--bg);
  border-radius: 50%;
  color: var(--accent);
  z-index: 4;
}
.wave-note .icon {
  width: 16px;
  height: 16px;
}
#notes {
  min-height: 520px;
  height: auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
#note-list {
  flex: 1;
  min-height: 0;
  overflow: visible;
  padding: 0 0 24px;
}
.note-form {
  order: -1;
  margin: 0 0 24px;
  background: var(--bg);
  padding: 12px 0 0;
}
.composer-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  min-height: 32px;
}
.time-chip {
  font: 13px var(--font-mono);
  color: var(--text-2);
  background: var(--surface);
  padding: 6px 12px;
  min-height: 32px;
  border-radius: 18px;
  white-space: nowrap;
}
.time-chip .icon {
  width: 14px;
  height: 14px;
}
.composer-field {
  display: flex;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 8px;
  align-items: end;
}
.composer-field textarea {
  background: transparent;
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  resize: none;
  min-height: 72px;
  padding: 12px;
}
.composer-field button {
  color: var(--accent);
}
.note {
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 16px 0 24px;
  margin: 0;
}
.note-top {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.note-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--surface);
  border-radius: 50%;
  font-size: 13px;
}
.note-top .icon-button {
  margin-left: auto;
}
.note p {
  margin: 12px 0;
  white-space: pre-wrap;
  font-size: 15px;
}
.text-button {
  background: transparent;
  color: var(--text-2);
  padding: 4px 0;
  font-size: 13px;
}
.reply {
  margin-left: 24px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.resolved {
  opacity: 0.6;
}
.resolved-notes {
  font-size: 13px;
  color: var(--text-2);
  padding-top: 16px;
}
.note-version-chips {
  display: flex;
  overflow: auto;
  gap: 4px;
}
.note-song {
  font-size: 22px;
  display: block;
  text-decoration: none;
  margin-bottom: 16px;
}
.song-details {
  max-width: 100%;
  margin-top: 64px;
}
.version-row {
  display: grid;
  grid-template-columns: 1fr 80px 32px 44px 64px 44px;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
}
.version-row .icon {
  width: 20px;
  height: 20px;
}
.version-evidence {
  position: relative;
  font-size: 13px;
}
.version-evidence > summary {
  list-style: none;
  cursor: pointer;
}
.version-evidence[open] {
  grid-column: 1/-1;
}
.version-evidence pre,
.advanced pre {
  max-height: 320px;
  overflow: auto;
  font-size: 13px;
  background: var(--surface);
  padding: 16px;
  border-radius: 8px;
}
.energy-plot {
  width: 100%;
  height: 120px;
  color: var(--accent);
}
#human-sound {
  margin: 48px 0;
  max-width: 620px;
}
.human-meter {
  margin: 32px 0;
  font-size: 15px;
}
.human-meter > div {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
  color: var(--text-2);
  font-size: 13px;
}
.meter-line {
  height: 2px;
  background: var(--line);
  flex: 1;
  position: relative;
}
.meter-line i {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  top: -3px;
}
.meter-line b {
  position: absolute;
  bottom: 12px;
  font: 13px var(--font-mono);
  transform: translateX(-50%);
}
.sound-key {
  margin: 40px 0;
  font-size: 17px;
}
.similar {
  display: block;
  margin-top: 48px;
}
.similar-cards {
  display: flex;
  gap: 20px;
  overflow: auto;
  margin-top: 24px;
}
.similar-cards > .slot {
  flex: 0 0 220px;
  background: var(--surface);
  border-radius: var(--radius);
}
.similar-cards a {
  height: 260px;
  display: flex;
  align-items: end;
  padding: 24px;
  font: 500 22px var(--font-display);
  text-decoration: none;
}
.advanced {
  margin: 32px 0;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
}
.advanced summary {
  cursor: pointer;
  font-size: 13px;
}
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.metrics dt,
.metrics dd {
  margin: 0;
  font-size: 13px;
}
.metrics dd {
  color: var(--text-2);
}
.upload-tile {
  height: 160px;
  min-width: 160px;
  border: 1px dashed var(--line);
  background: transparent;
}
.studio-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  align-items: center;
}
.studio-controls select {
  width: auto;
  max-width: 280px;
  border-radius: 24px;
}
.arrangement {
  overflow-x: auto;
  overflow-y: hidden;
  max-height: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.track-name,
.track-row,
.track-axis {
  border-color: var(--line);
  background: var(--bg);
}
.region {
  background: var(--surface-2) !important;
  color: var(--accent);
  border-color: var(--line) !important;
}
.region.muted {
  color: var(--text-3);
  opacity: 0.4;
}
.track-flags {
  color: var(--text-2);
}
.track-flags .icon {
  width: 16px;
  height: 16px;
}
.stack-toggle {
  width: 24px;
  padding: 0;
  background: transparent;
}
.stack-toggle .icon {
  width: 16px;
  height: 16px;
  transform: rotate(-90deg);
}
.stack-toggle[aria-expanded="true"] .icon {
  transform: none;
}
.track-title strong {
  font-family: var(--font-ui);
}
.track-name .icon-button,
.track-name button[data-action="track-note"] {
  padding: 0;
  width: 32px;
}
.track-name button[data-action="track-note"] .icon {
  width: 18px;
  height: 18px;
}
.materials {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.material {
  background: var(--surface);
  border: 0;
  border-radius: var(--radius);
  padding: 16px;
}
.material img,
.material video {
  max-width: 300px;
}
.source-file {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  font-size: 13px;
}
.source-file span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.source-file audio {
  max-width: 220px;
}
.matched-row {
  outline: 2px solid var(--accent);
}
@media (max-width: 1250px) {
  main {
    margin-inline: 32px;
  }
  .core-layout {
    grid-template-columns: minmax(0, 62fr) minmax(0, 38fr);
    gap: 32px;
  }
}
@media (max-width: 999px) {
  .core-layout {
    gap: 40px;
  }
  .core-listen,
  .core-layout > .slot {
    position: relative;
    top: auto;
  }
  .song-header {
    flex-wrap: wrap;
  }
  .song-tools {
    margin-left: auto;
  }
}
@media (max-width: 680px) {
  main {
    margin-inline: 20px;
  }
  .song-header {
    margin-bottom: 24px;
    align-items: start;
  }
  .song-heading {
    display: block;
  }
  .song-heading h1 {
    font-size: 34px;
  }
  .song-length {
    display: block;
    margin-top: 8px;
  }
  .version-pill {
    max-width: 145px;
    margin-left: 44px;
  }
  .core-layout {
    gap: 32px;
    margin-bottom: 64px;
  }
  #recording {
    height: 260px;
    padding: 8px 0;
  }
  .recording-top {
    margin-bottom: 24px;
  }
  .wave-wrap {
    height: 100px;
  }
  #notes {
    min-height: 0;
    height: auto;
  }
  #note-list {
    padding-bottom: 0;
  }
  .note-form {
    position: fixed;
    bottom: 12px;
    left: 20px;
    right: 20px;
    z-index: 65;
    background: var(--bg);
    padding: 8px;
    border-radius: var(--radius);
    box-shadow: 0 0 24px var(--bg);
  }
  .has-audio .note-form {
    bottom: 76px;
  }
  .composer-field textarea {
    min-height: 56px;
    max-height: 96px;
    font-size: 15px;
  }
  .composer-chips {
    margin-bottom: 4px;
  }
  .song-details {
    margin-top: 24px;
    padding-bottom: 140px;
  }
  .version-row {
    gap: 8px;
    grid-template-columns: 1fr 44px 20px 44px 40px 24px;
    font-size: 13px;
  }
  .similar-cards > .slot {
    flex-basis: 160px;
  }
  .similar-cards a {
    height: 200px;
    font-size: 17px;
    padding: 20px;
  }
  .source-file {
    flex-direction: column;
    align-items: start;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .song-header .slot[data-slot="work.cover"] {
    width: 100%;
  }
}
.inbox-tools {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 48px;
}
.inbox-tools input {
  margin-left: auto;
}
.inbox-tools select {
  width: auto;
}
.note-group {
  max-width: 740px;
  margin-bottom: 64px;
}
.studio-nav {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
  font-size: 15px;
}
.studio-nav a {
  text-decoration: none;
}
.studio-label {
  font-size: 17px;
  display: block;
  margin-bottom: 32px;
}
.review-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 48px;
}
.review-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
}
.review-tabs button {
  display: flex;
  justify-content: space-between;
  text-align: left;
  gap: 16px;
  background: transparent;
}
.review-tabs button.active {
  background: var(--surface);
  color: var(--text);
}
.review-content h2 {
  font-size: 17px;
  margin: 0 0 24px;
}
.review-content .toolbar {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}
.review-content .toolbar input[type="search"] {
  width: 100%;
  min-width: 0;
}
.review-item {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  margin: 0;
}
.review-item h3 {
  font-size: 17px;
}
.review-item h3 a {
  text-decoration: none;
}
.review-recording {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  font-size: 13px;
}
.review-recording a {
  flex: 1;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.candidate-evidence {
  border-left: 1px solid var(--line);
  padding-left: 16px;
  margin: 20px 0;
  font-size: 13px;
}
.candidate-evidence details {
  margin-top: 8px;
}
.candidate-evidence pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--surface);
  padding: 12px;
}
.review-item .actions {
  margin-top: 16px;
}
.connection-editor label {
  display: grid;
  gap: 8px;
  font-size: 13px;
}
.connection-editor select {
  width: 100%;
}
.project-only {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  font-size: 22px;
}
.check-label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.check-label input {
  min-width: 16px;
}
.key-candidates {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}
.key-candidates small {
  color: var(--text-2);
}
@media (max-width: 680px) {
  .inbox-tools {
    gap: 8px;
    flex-wrap: wrap;
  }
  .inbox-tools input {
    width: 100%;
    margin: 8px 0 0;
  }
  .review-layout {
    display: block;
  }
  .review-tabs {
    flex-direction: row;
    overflow: auto;
    margin-bottom: 24px;
  }
  .review-tabs button {
    white-space: nowrap;
    gap: 8px;
    font-size: 13px;
  }
  .review-content .toolbar {
    flex-wrap: wrap;
    gap: 12px;
  }
  .review-recording {
    gap: 8px;
  }
  .review-item .actions button {
    font-size: 13px;
  }
  .studio-nav {
    gap: 24px;
  }
}
.slot[data-slot="shell.wordmark"] {
  width: 160px;
  height: 40px;
  flex-shrink: 0;
}
.slot[data-slot="shell.wordmark"] .slot-content {
  display: flex;
  height: 100%;
  align-items: center;
}
.slot[data-slot="shell.bg"] {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.slot[data-slot="shell.dock"] {
  position: fixed;
  z-index: 70;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, calc(100% - 32px));
  height: 72px;
  border-radius: var(--radius);
}
.slot[data-slot="shell.dock"]:has(#dock[hidden]) {
  display: none;
}
.slot[data-slot="shell.dock"] #dock {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  width: 100%;
  height: 72px;
}
.slot[data-kind="icon"] > .slot-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.slot[data-kind="icon"].has-art > .slot-content {
  opacity: 0;
}
.slot[data-slot="icon.play"],
.slot[data-slot="icon.pause"] {
  width: 88px;
  height: 88px;
}
.slot[data-slot="songs.hero"].has-art,
.slot[data-slot="songs.hero"].editing-slot {
  width: 100%;
  height: var(--ref-h);
  margin-bottom: 32px;
}
.slot[data-slot="work.cover"].has-art,
.slot[data-slot="work.cover"].editing-slot {
  width: min(600px, 100%);
  aspect-ratio: 1;
  margin-bottom: 32px;
}
.slot[data-slot="work.banner"].has-art,
.slot[data-slot="work.banner"].editing-slot {
  width: 100%;
  height: var(--ref-h);
  margin-bottom: 48px;
}
.slot[data-slot="work.divider"].has-art,
.slot[data-slot="work.divider"].editing-slot {
  width: 100%;
  height: var(--ref-h);
  margin: 48px 0;
}
.slot[data-slot="work.player"] {
  height: 300px;
}
.slot[data-slot="work.notes"] {
  min-height: 520px;
  height: auto;
}
.row-cover {
  float: left;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 16px;
}
.slot.has-art[data-slot="shell.dock"] #dock,
.slot.has-art[data-slot="work.similar"],
.slot.has-art[data-slot="explore.card"] .selection-card {
  background: transparent;
}
.slot[data-slot="shell.bg"] ~ .site-header {
  background: transparent;
}
.editing-slot {
  outline: 1px dashed var(--accent);
  outline-offset: 1px;
}
.slot-label {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  background: var(--accent);
  color: var(--accent-text);
  font: 11px var(--font-ui);
  padding: 3px 7px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  max-width: 100%;
  overflow: hidden;
}
.editing-slot:hover {
  outline-style: solid;
}
.editing-slot {
  cursor: crosshair;
}
.editing .slot[data-slot="shell.bg"] {
  z-index: -1;
}
.editing .slot[data-slot="shell.bg"] .slot-label {
  top: 100px;
}
.editing-slot[data-slot="songs.row"] .slot-label {
  right: 0;
  left: auto;
  font-size: 10px;
}
.editing .slot[data-slot="work.cover"],
.editing .slot[data-slot="work.banner"],
.editing .slot[data-slot="songs.hero"] {
  background: var(--surface);
}
#edit-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 4px;
  padding: 4px 12px;
  z-index: 160;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  overflow: auto;
  white-space: nowrap;
  align-items: center;
}
#edit-bar button,
#edit-bar label {
  font-size: 13px;
  min-height: 36px;
  padding: 8px 12px;
  background: transparent;
  white-space: nowrap;
}
#edit-bar button:first-child {
  color: var(--accent);
}
#edit-bar [aria-busy="true"]::after {
  content: "…";
}
#art-inspector {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: 380px;
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
  padding: 64px 24px 32px;
  overflow: auto;
  display: none;
}
#art-inspector[open] {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
#art-inspector > .icon-button {
  position: absolute;
  right: 12px;
  top: 12px;
}
#art-inspector h2 {
  margin: 0;
  font-size: 22px;
}
#art-inspector .art-size {
  font-size: 17px;
}
#art-inspector small {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-2);
}
#art-inspector label {
  font-size: 13px;
}
.art-preview {
  height: 140px;
  background: var(--surface);
  border-radius: 8px;
  padding: 8px;
}
.art-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.art-upload {
  background: var(--accent);
  color: var(--accent-text);
  padding: 12px 16px;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  min-height: 44px;
}
.art-import {
  cursor: pointer;
}
#art-size-error {
  font-size: 13px;
  color: var(--danger);
}
#art-size-error:empty {
  display: none;
}
#art-size-error button {
  display: block;
  margin-top: 12px;
}
.position-grid {
  display: grid;
  grid-template-columns: repeat(3, 44px);
  gap: 4px;
  margin-top: 8px;
}
.position-grid button {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--surface);
}
.position-grid span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-3);
}
.position-grid .selected {
  outline: 1px solid var(--accent);
}
.position-grid .selected span {
  background: var(--accent);
}
.art-revision {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 8px;
  margin-top: 8px;
  text-align: left;
  font-size: 13px;
}
.art-revision img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.slot-directory {
  display: grid;
  gap: 8px;
}
.slot-directory button {
  text-align: left;
}
.slot-directory small {
  display: block;
}
.template-stage {
  visibility: hidden;
}
#art-inspector input[type="range"] {
  padding: 0;
  accent-color: var(--accent);
}
.slot[data-slot="lists.card"] {
  height: 240px;
}
.slot[data-slot="work.similar"] {
  width: 220px;
  height: 260px;
}
.slot[data-slot="explore.card"] {
  height: 240px;
}
.slot[data-slot="explore.canvas"] {
  height: 760px;
}
.slot[data-slot="shell.wordmark"] .wordmark {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}
@media (max-width: 680px) {
  .slot[data-slot="shell.wordmark"] {
    width: 120px;
    height: 32px;
  }
  .slot[data-slot="shell.dock"] {
    bottom: 0;
    width: 100%;
    height: 64px;
    border-radius: 0;
  }
  .slot[data-slot="shell.dock"] #dock {
    height: 64px;
  }
  .slot[data-slot="work.player"] {
    height: 260px;
  }
  .slot[data-slot="lists.card"] {
    height: 170px;
  }
  .slot[data-slot="work.similar"] {
    width: 160px;
    height: 200px;
  }
  .slot[data-slot="explore.canvas"] {
    height: 640px;
  }
  .slot[data-slot="work.banner"].has-art,
  .slot[data-slot="work.banner"].editing-slot {
    height: 233px;
  }
  #art-inspector {
    inset: auto 0 0;
    width: 100%;
    height: 88dvh;
    max-height: 88dvh;
    border-radius: 24px 24px 0 0;
  }
  .editing-slot .slot-label {
    font-size: 10px;
  }
  .slot[data-slot="work.cover"].editing-slot,
  .slot[data-slot="work.cover"].has-art {
    width: 100%;
  }
  #edit-bar {
    padding: 4px 8px;
    gap: 0;
  }
}
@media (max-width: 680px) {
  .song-header {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 16px 8px;
  }
  .song-header > .icon-button {
    grid-column: 1;
    grid-row: 1;
    margin-left: -8px;
  }
  .song-heading {
    grid-column: 2/-1;
    grid-row: 1;
  }
  .song-header .version-pill {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    max-width: 160px;
  }
  .song-tools {
    grid-column: 3;
    grid-row: 2;
    margin: 0;
    width: auto;
    justify-content: end;
  }
  .song-header:not(:has(.version-pill)) .song-tools {
    grid-column: 2/-1;
  }
  .slot[data-slot="work.cover"] .slot-content {
    width: 100%;
    height: 100%;
  }
}
.theme-picker button[aria-pressed="true"] {
  background: var(--surface-2);
  color: var(--text);
}
/* Independent columns prevent a long thread from resizing the music rows. */
.core-layout {
  overflow-anchor: none;
}
.core-music {
  min-width: 0;
}
@media (min-width: 1000px) {
  .core-music {
    grid-column: 1;
    grid-row: 1;
  }
  .core-listen {
    min-height: 300px;
  }
  .core-layout > .slot[data-slot="work.notes"] {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }
  .core-music > .song-details {
    margin-top: 64px;
    min-width: 0;
  }
  .core-music > .song-details .similar-cards {
    max-width: 100%;
  }
}
@media (max-width: 999px) {
  .core-music {
    display: contents;
  }
  .core-listen {
    order: 0;
  }
  .core-layout > .slot[data-slot="work.notes"] {
    order: 1;
  }
  .core-music > .song-details {
    order: 2;
  }
}

.row-wave {
  position: relative;
  width: 100%;
  height: 32px;
}
.row-wave svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.row-wave .row-played-wave {
  color: var(--accent);
  clip-path: inset(0 100% 0 0);
}
.playing .row-wave > .wave-small:first-child {
  color: var(--text-3);
}
@media (max-width: 680px) {
  .work-row > .row-wave {
    display: none;
  }
}
.core-layout > * {
  min-width: 0;
}
@media (max-width: 999px) {
  .core-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
.time-chip,
.family-chips .chip {
  min-height: 44px;
}
input:not([type="range"]):not([type="checkbox"]):not([type="hidden"]):not(
    .sr-only
  ),
select {
  min-height: 44px;
}
.track-name {
  gap: 4px;
  padding: 6px 8px;
}
.track-name button {
  min-height: 44px;
}
.track-name .stack-toggle,
.track-name button[data-action="track-note"] {
  width: 44px;
  min-width: 44px;
}
.track-name strong,
.track-name small,
.track-axis,
.track-number {
  font-size: 13px;
}
.track-name small {
  line-height: 1.2;
}
@media (max-width: 680px) {
  .site-header {
    height: 112px;
  }
  .avatar {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }
  .site-header nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* One document scroll. Notes and timeline rows never create a second vertical
   scroller; artwork frames stretch with their content. */
.slot[data-slot="explore.canvas"] > .slot-content {
  height: 100%;
}
.detail-panel {
  scroll-margin-top: 24px;
}
@media (max-width: 680px) {
  .slot[data-slot="work.notes"] {
    min-height: 0;
  }
  .slot[data-slot="work.notes"].editing-slot,
  .slot[data-slot="work.notes"].has-art,
  .slot[data-slot="work.notes"].editing-slot #notes,
  .slot[data-slot="work.notes"].has-art #notes {
    min-height: 520px;
  }
  .note-form {
    margin-bottom: 0;
  }
}
