:root {
  --accent: #fe640b;
  --accent-rgb: 254 100 11;
  --accent-hover: #ff8f4d;
  --accent-soft: rgb(var(--accent-rgb) / .12);
  --sky: #04a5e5;
  --sky-rgb: 4 165 229;
  --sky-soft: rgb(var(--sky-rgb) / .14);
  --orange: var(--accent);
  --crust: #11111b;
  --mantle: #181825;
  --bg: #1e1e2e;
  --base-alt: #181825;
  --panel: #181825;
  --panel-2: #313244;
  --surface-0: #1f2335;
  --surface-1: #313244;
  --surface-2: #45475a;
  --ink: #cdd6f4;
  --muted: #a6adc8;
  --subtle: #bac2de;
  --line: rgb(148 156 187 / .24);
  --line-strong: rgb(148 156 187 / .4);
  --shadow: 0 24px 70px rgba(0,0,0,.42);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding-bottom: 86px;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 0 max(18px, calc((100vw - 1460px) / 2));
  background: var(--mantle);
  border-bottom: 1px solid var(--line-strong);
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
}
.brand, .nav { display: flex; align-items: center; }
.brand {
  min-width: 0;
}
.brand-logo {
  display: block;
  width: auto;
  height: 30px;
  object-fit: contain;
}
.nav {
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  white-space: nowrap;
  color: var(--subtle);
  font-size: 14px;
  font-weight: 800;
}
.nav::-webkit-scrollbar { display: none; }
.nav a, .nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  opacity: .92;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.nav a:hover, .nav button:hover {
  color: var(--ink);
  background: rgb(var(--sky-rgb) / .1);
  border-color: rgb(var(--sky-rgb) / .22);
  opacity: 1;
}
.logout-form { margin: 0; }
.nav button {
  appearance: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.upload-link {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border: 1px solid rgb(var(--accent-rgb) / .6);
  box-shadow: 0 10px 26px rgb(var(--accent-rgb) / .18);
  opacity: 1;
}
.upload-link:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  border-color: rgb(var(--accent-rgb) / .85);
  box-shadow: 0 12px 30px rgb(var(--accent-rgb) / .24);
}
.logout-button {
  color: var(--muted);
  border-color: var(--line-strong) !important;
  background: rgb(49 50 68 / .4) !important;
}
.logout-button:hover {
  color: var(--ink) !important;
  background: rgb(69 71 90 / .62) !important;
  border-color: rgb(148 156 187 / .55) !important;
}

.shell {
  width: min(1460px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 40px;
}
.messages { width: min(1460px, calc(100% - 48px)); margin: 16px auto 0; }
.message {
  color: var(--ink);
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / .14), rgb(var(--sky-rgb) / .08));
  border: 1px solid rgb(var(--accent-rgb) / .26);
  border-radius: 8px;
  padding: 12px 14px;
}

.hero {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: clamp(24px, 4vw, 64px);
  align-items: stretch;
  padding: clamp(24px, 4vw, 48px);
  background:
    radial-gradient(circle at 70% 8%, rgb(var(--accent-rgb) / .18), transparent 30%),
    radial-gradient(circle at 12% 80%, rgb(var(--sky-rgb) / .11), transparent 28%),
    linear-gradient(120deg, rgb(17 17 27 / .98), rgb(24 24 37 / .96));
  box-shadow: var(--shadow);
}
.hero > div, .detail-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.hero h1, .section-head h1, .profile-head h1, .form-layout h1, .detail-main h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.06;
  letter-spacing: 0;
}
.hero p { max-width: 760px; font-size: 18px; color: rgb(205 214 244 / .8); }
.eyebrow {
  margin: 0 0 10px;
  color: var(--orange);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-weight: 800;
  cursor: pointer;
}
.primary {
  background: linear-gradient(180deg, var(--accent-hover), var(--accent));
  color: var(--crust);
  box-shadow: 0 10px 20px rgb(var(--accent-rgb) / .18);
}
.primary:hover {
  background: linear-gradient(180deg, #ff9e63, var(--accent-hover));
}
.secondary {
  background: color-mix(in srgb, var(--panel-2) 82%, var(--crust));
  border-color: var(--line);
  color: var(--ink);
}
.secondary:hover {
  border-color: rgb(var(--sky-rgb) / .36);
  background: color-mix(in srgb, var(--panel-2) 72%, var(--sky-soft));
}

.section-head, .profile-head, .form-layout { margin: 30px 0 18px; }
.with-action, .profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.section-head h2 { margin: 0; font-size: 24px; }

.mix-list { display: grid; gap: 14px; }
.mix-card {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 28px rgba(0,0,0,.16);
}
.cover {
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--surface-1), var(--surface-2));
  overflow: hidden;
}
.cover span, .player-cover:not(.has-cover) {
  display: block;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--orange), var(--orange) 4px, var(--crust) 4px, var(--crust) 9px);
}
.mix-card-body { min-width: 0; }
.mix-card-top { display: flex; align-items: flex-start; gap: 12px; }
.mix-card h3 { margin: 0 0 4px; font-size: 20px; }
.artist-link { color: var(--subtle); font-size: 14px; font-weight: 700; }
.artist-link:hover { color: var(--sky); }
.play-small, .play-big, .transport-button, .volume-button {
  border: 0;
  color: var(--ink);
  background: var(--crust);
  cursor: pointer;
}
.play-small {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: 0 0 auto;
  font-size: 14px;
}
.meta-row { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.mini-wave {
  height: 76px;
  margin: 12px 0;
  cursor: pointer;
}
.wave-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  touch-action: none;
}

.mix-detail {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
  grid-template-rows: auto auto;
  gap: clamp(18px, 2.4vw, 32px) clamp(22px, 3vw, 42px);
  align-items: start;
  padding: clamp(24px, 4vw, 48px);
  background:
    radial-gradient(circle at 70% 8%, rgb(var(--accent-rgb) / .16), transparent 28%),
    radial-gradient(circle at 14% 84%, rgb(var(--sky-rgb) / .1), transparent 26%),
    linear-gradient(120deg, rgb(17 17 27 / .98), rgb(24 24 37 / .96));
  box-shadow: var(--shadow);
}
.mobile-collapse { display: none; }
.title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.detail-main h1 {
  display: inline;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 8px 12px;
  background: rgb(17 17 27 / .82);
  font-size: clamp(38px, 5vw, 58px);
}
.detail-main > .artist-link {
  width: fit-content;
  margin-top: 8px;
  padding: 7px 12px;
  color: var(--subtle);
  background: rgb(17 17 27 / .74);
  font-size: 18px;
}
.current-track-list {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  max-width: min(66vw, 680px);
  margin-top: 8px;
  min-height: 86px;
  max-height: 86px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(2px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.current-track-list::-webkit-scrollbar {
  display: none;
}
.current-track-list.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.current-track-pill {
  width: fit-content;
  max-width: none;
  padding: 6px 10px;
  border: 0;
  color: var(--ink);
  background: rgb(17 17 27 / .76);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
}
.current-track-label {
  color: var(--subtle);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.current-track-artist {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-left: 6px;
}
.current-track-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  margin-left: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.edit-inline {
  width: fit-content;
  min-height: 34px;
  margin-top: 10px;
  padding: 0 12px;
  font-size: 13px;
}
.genre-pill {
  position: relative;
  width: fit-content;
  margin-top: 4px;
  color: var(--ink);
  outline: 0;
}
.genre-pill > span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / .95);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}
.genre-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 210px;
  max-width: min(360px, 80vw);
  padding: 10px;
  background: rgb(17 17 27 / .92);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease;
}
.genre-popover span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgb(49 50 68 / .92);
  color: var(--subtle);
  font-size: 12px;
  font-weight: 800;
}
.genre-pill:hover .genre-popover,
.genre-pill:focus-within .genre-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.large {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  width: min(100%, 340px);
  justify-self: end;
  box-shadow: var(--shadow);
}
.description {
  max-width: 840px;
  font-size: 17px;
  line-height: 1.65;
  color: rgb(205 214 244 / .88);
}
.hero-waveform {
  grid-column: 1 / -1;
  grid-row: 2;
  position: relative;
  height: clamp(118px, 19vh, 220px);
  max-height: 30vh;
  padding: 26px 0 0;
}
.wave-time {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}
.wave-time-end {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.processing-note {
  margin: 10px 0 0;
  color: var(--subtle);
  font-size: 13px;
  font-weight: 800;
}
.detail-content {
  grid-column: 1 / -1;
  grid-row: 3;
  margin-left: 0;
}
.play-big {
  width: 70px;
  height: 70px;
  margin-top: 20px;
  border-radius: 50%;
  color: var(--crust);
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 68%, var(--sky)) 58%, var(--sky) 100%);
  box-shadow: 0 16px 30px rgb(var(--accent-rgb) / .2), 0 0 0 1px rgb(var(--sky-rgb) / .28);
  font-size: 22px;
}
.play-big:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, color-mix(in srgb, var(--accent-hover) 62%, var(--sky)) 56%, color-mix(in srgb, var(--sky) 88%, white) 100%);
}
.play-big:active {
  transform: translateY(1px);
}
.tracklist pre {
  white-space: pre-wrap;
  padding: 18px;
  background: var(--surface-0);
  border: 1px solid var(--line);
  font-family: inherit;
  line-height: 1.55;
}
.tracklist-list {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: rgb(148 156 187 / .16);
  border: 1px solid var(--line);
}
.tracklist-item {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface-0);
  font-size: 13px;
}
.tracklist-item.is-active {
  outline: 1px solid rgb(var(--accent-rgb) / .75);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / .45);
}
.tracklist-item.is-current {
  background: linear-gradient(90deg, rgb(var(--sky-rgb) / .18), rgb(var(--sky-rgb) / .08) 42%, var(--surface-0) 100%);
  outline: 1px solid rgb(var(--sky-rgb) / .62);
  box-shadow: inset 3px 0 0 var(--sky);
}
.tracklist-item.is-current .tracklist-time {
  color: color-mix(in srgb, var(--sky) 88%, white);
}
.tracklist-item.is-current .tracklist-title {
  color: var(--ink);
}
.tracklist-item.is-current.is-active {
  outline: 1px solid rgb(var(--sky-rgb) / .82);
  box-shadow: inset 3px 0 0 var(--sky), inset 0 0 0 1px rgb(var(--sky-rgb) / .42);
}
.tracklist-time {
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  display: inline-block;
  width: 100%;
}
.tracklist-time-button {
  border: 0;
  padding: 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: color .18s ease, transform .18s ease;
}
.tracklist-time-button:hover,
.tracklist-time-button:focus-visible,
.tracklist-time-button:active {
  color: color-mix(in srgb, var(--sky) 86%, white);
}
.tracklist-time-button:hover .tracklist-time,
.tracklist-time-button:focus-visible .tracklist-time,
.tracklist-time-button:active .tracklist-time {
  color: color-mix(in srgb, var(--sky) 86%, white);
}
.tracklist-time-button:active {
  transform: translateY(1px);
}
.tracklist-copy {
  min-width: 0;
  display: flex;
  gap: 7px;
  align-items: baseline;
  flex-wrap: wrap;
}
.tracklist-artist { color: var(--muted); font-weight: 800; }
.tracklist-title { color: var(--ink); font-weight: 850; }
.tracklist-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}
.tracklist-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 24px;
  padding: 4px 6px;
  border-radius: 4px;
  background: rgb(49 50 68 / .74);
  border: 1px solid var(--line);
}
.tracklist-link img {
  display: block;
  width: auto;
  height: auto;
  max-width: 18px;
  max-height: 14px;
  object-fit: contain;
}
.tracklist-link:hover {
  background: rgb(var(--sky-rgb) / .14);
  border-color: rgb(var(--sky-rgb) / .34);
}
.tracklist-toggle {
  display: none;
}
.track-cue {
  position: absolute;
  left: 0;
  bottom: calc(100% - 22px);
  z-index: 3;
  display: grid;
  grid-auto-flow: row;
  gap: 8px;
  align-items: center;
  max-width: min(320px, calc(100% - 24px));
  padding: 6px 9px;
  color: var(--ink);
  background: rgb(17 17 27 / .9);
  box-shadow: 0 12px 34px rgba(0,0,0,.34);
  transform: translateY(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.track-cue.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.track-cue::after {
  content: "";
  position: absolute;
  left: var(--cue-pointer-x, 50%);
  top: 100%;
  width: 12px;
  height: 12px;
  background: rgb(17 17 27 / .9);
  transform: translate(-50%, -6px) rotate(45deg);
}
.track-cue-time {
  color: var(--orange);
  font-weight: 950;
  white-space: nowrap;
  font-size: 12px;
}
.track-cue-title {
  min-width: 0;
  border: 0;
  padding: 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track-cue-artist {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.track-cue-sep {
  color: var(--subtle);
}
.track-cue-track {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.profile-head {
  position: relative;
  overflow: hidden;
  padding: 28px;
  min-height: 220px;
  background:
    linear-gradient(90deg, rgb(17 17 27 / .9), rgb(17 17 27 / .58)),
    var(--profile-banner, linear-gradient(120deg, var(--surface-1), var(--mantle)));
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  justify-content: flex-start;
}
.profile-head > div {
  min-width: 0;
}
.avatar {
  width: 110px;
  height: 110px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--surface-2);
  font-size: 44px;
  font-weight: 900;
  overflow: hidden;
}

.form-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  max-width: 100%;
}
.panel-form {
  display: grid;
  gap: 16px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  min-width: 0;
  overflow-x: clip;
}
.field { display: grid; gap: 7px; font-weight: 800; }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 42px;
  color: var(--ink);
  background: var(--surface-0);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px;
  font: inherit;
  font-weight: 500;
}
.field ul { margin: 4px 0 0; padding-left: 18px; font-weight: 400; }
.field li { margin-bottom: 6px; }
.field input[type="checkbox"] { width: auto; min-height: 0; }
.short-share-panel {
  display: grid;
  gap: 6px;
  margin-top: -6px;
  padding: 10px 12px;
  background: var(--base-alt);
  border: 1px solid var(--line);
}
.short-share-panel small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.short-share-link {
  color: var(--sky);
  font-weight: 800;
  overflow-wrap: anywhere;
}
.tracklist-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--base-alt);
  border: 1px solid var(--line);
}
.tracklist-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tracklist-editor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.export-dropdown {
  position: relative;
}
.export-dropdown summary {
  list-style: none;
}
.export-dropdown summary::-webkit-details-marker {
  display: none;
}
.export-dropdown .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  font-size: inherit;
}
.export-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10;
  display: grid;
  min-width: 112px;
  padding: 6px;
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  box-shadow: 0 12px 30px rgba(0,0,0,.24);
}
.export-dropdown-menu a {
  display: block;
  padding: 8px 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}
.export-dropdown-menu a:hover {
  background: var(--sky-soft);
}
.tracklist-editor-head span {
  display: block;
  color: var(--ink);
  font-weight: 900;
}
.tracklist-editor-head small,
.tracklist-import small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.tracklist-rows {
  display: grid;
  gap: 8px;
}
.tracklist-row {
  display: grid;
  grid-template-columns: 82px 82px 1fr 1.2fr minmax(220px, 1.3fr) 38px;
  gap: 8px;
  align-items: end;
}
.tracklist-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  min-width: 0;
}
.tracklist-row input {
  width: 100%;
  min-height: 38px;
  min-width: 0;
  color: var(--ink);
  background: var(--surface-0);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px;
  font: inherit;
  font-size: 14px;
}
.tracklist-row .icon-button {
  width: 38px;
  height: 38px;
  font-size: 22px;
}
.tracklist-links-editor {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.tracklist-links-editor-wide {
  grid-column: span 3;
}
.tracklist-link-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 22px;
}
.tracklist-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}
.tracklist-link-chip button {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.tracklist-link-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.tracklist-link-feedback {
  min-height: 16px;
  color: #fab387;
  opacity: 0;
  transition: opacity .18s ease;
}
.tracklist-link-feedback.is-visible {
  opacity: 1;
}
.tracklist-import {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.tracklist-import summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}
.tracklist-import .field {
  margin-top: 10px;
  margin-bottom: 10px;
}
.tracklist-editor-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.timestamp-editor {
  display: grid;
  gap: 18px;
}
.timestamp-editor-head,
.timestamp-stage-head,
.timestamp-rows-head,
.timestamp-editor-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.timestamp-editor-head h1 {
  margin: 0;
}
.timestamp-editor-subtitle,
.timestamp-editor-note,
.timestamp-stage-head small,
.timestamp-rows-head small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.timestamp-editor-form {
  display: grid;
  gap: 18px;
}
.timestamp-stage,
.timestamp-rows {
  gap: 18px;
}
.timestamp-wave-shell {
  position: relative;
  min-height: 178px;
  padding: 12px 14px;
  background: var(--surface-0);
  border: 1px solid var(--line);
}
.timestamp-wave-shell.is-disabled {
  opacity: .74;
}
.timestamp-wave-canvas {
  display: block;
  width: 100%;
  height: 154px;
  min-height: 154px;
  cursor: crosshair;
}
.timestamp-transport {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.timestamp-timebox {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface-0);
  border: 1px solid var(--line);
  font-weight: 900;
}
.timestamp-rows-head strong,
.timestamp-stage-head strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}
.timestamp-row-list {
  display: grid;
  gap: 10px;
}
.timestamp-row {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  background: var(--surface-0);
  border: 1px solid var(--line);
}
.timestamp-row.is-selected {
  border-color: rgb(var(--accent-rgb) / .72);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / .28);
}
.timestamp-row-select {
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface-1);
  text-align: left;
}
.timestamp-row-fields {
  display: grid;
  grid-template-columns: 1fr 1.2fr minmax(220px, 1.25fr);
  gap: 10px;
}
.timestamp-row-fields label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.timestamp-row-fields input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  color: var(--ink);
  background: var(--surface-1);
  border: 1px solid var(--line);
  padding: 8px;
  font: inherit;
}
.timestamp-row-actions {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}
.timestamp-row-actions .button,
.timestamp-row-actions .icon-button {
  min-width: 118px;
}
.timestamp-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  color: var(--ink);
  background: rgb(148 156 187 / .12);
  font-size: 12px;
  font-weight: 900;
}
.timestamp-chip.is-set {
  background: rgb(var(--accent-rgb) / .16);
  color: #fab387;
}
.timestamp-editor-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.image-select {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: -8px;
}
.image-select-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.crop-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3,4,5,.74);
  backdrop-filter: blur(12px);
}
.crop-dialog {
  width: min(720px, 100%);
  max-height: calc(100dvh - 36px);
  display: grid;
  gap: 14px;
  padding: 16px;
  overflow: auto;
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.crop-dialog-head, .crop-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.crop-dialog-head strong { font-size: 18px; }
.icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: var(--crust);
  font-size: 26px;
  cursor: pointer;
}
.crop-dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 12px;
  background: var(--surface-0);
  border: 1px dashed var(--line-strong);
  outline: none;
}
.crop-dropzone.is-dragging {
  border-color: var(--orange);
  background: rgb(var(--accent-rgb) / .08);
}
.crop-dropzone canvas {
  display: block;
  width: 100%;
  max-height: 62dvh;
  cursor: grab;
  touch-action: none;
}
.crop-empty {
  position: absolute;
  inset: 12px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
  pointer-events: none;
}
.crop-empty strong {
  color: var(--ink);
  font-size: 18px;
}
.crop-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}
.crop-actions label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.crop-actions input {
  accent-color: var(--orange);
}

.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px max(16px, calc((100vw - 1460px) / 2));
  background: var(--surface-1);
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -14px 40px rgba(0,0,0,.35);
}
.player-main { min-width: 0; cursor: pointer; }
.player-cover {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  min-width: 48px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.player-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.player-meta strong, .player-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-meta span { color: var(--muted); font-size: 13px; }
.player-controls { display: flex; align-items: center; gap: 10px; margin-top: 7px; }
.transport-button, .volume-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--mantle);
}
.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 132px;
}
.volume-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--mantle);
}
.volume-slider {
  width: 86px;
  accent-color: var(--orange);
}
.player-progress {
  position: relative;
  width: 100%;
  height: 14px;
  overflow: visible;
  background: transparent;
}
.player-progress::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  background: rgb(148 156 187 / .24);
  transform: translateY(-50%);
  z-index: 0;
}
.player-progress-markers {
  display: none;
}
.player-progress.has-markers .player-progress-markers {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: auto;
  z-index: 2;
}
.player-progress-marker {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: rgb(205 214 244 / .96);
  border: 1.5px solid rgb(17 17 27 / .82);
  transform: translateY(-50%);
  box-shadow: 0 0 0 1px rgb(17 17 27 / .22);
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.player-progress-marker.is-played {
  background: var(--orange);
  border-color: rgb(17 17 27 / .92);
}
.player-progress-marker:hover {
  background: var(--sky);
  border-color: rgb(17 17 27 / .92);
  box-shadow: 0 0 0 1px rgb(17 17 27 / .28);
  transform: translateY(-50%) scale(1.08);
}
.player-progress-fill {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--orange);
  translate: 0 -50%;
  z-index: 1;
}
.time { width: 62px; color: var(--subtle); font-size: 12px; text-align: center; }
.empty { padding: 28px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.mobile-tracklist-panel {
  display: none;
}

@media (max-width: 820px) {
  body { padding-bottom: 78px; }
  body.mix-detail-page {
    height: 100dvh;
    overflow: hidden;
    padding-bottom: 0;
  }
  body.mix-detail-page .topbar,
  body.mix-detail-page .player {
    display: none;
  }
  body.mix-detail-page .shell {
    width: 100%;
    height: 100dvh;
    padding: 0;
  }
  .topbar { height: 60px; padding: 0 14px; }
  .brand-logo { height: 24px; }
  .shell { width: min(100% - 20px, 1460px); padding-top: 14px; }
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    min-height: 0;
    padding: 20px;
  }
  .mix-detail {
    position: fixed;
    inset: 0;
    z-index: 40;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
    padding: 0;
    overflow: hidden;
    background: var(--crust);
  }
  .mix-detail::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--mobile-cover, linear-gradient(135deg, #1b1d1f, #090a0b));
    background-size: cover;
    background-position: center;
    filter: saturate(.95) brightness(.9) blur(1px);
    transform: scale(1.012);
  }
  .mix-detail::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0,0,0,.32), rgba(0,0,0,.18) 40%, rgba(0,0,0,.6));
    pointer-events: none;
  }
  .mobile-collapse {
    position: fixed;
    top: max(14px, env(safe-area-inset-top));
    right: 16px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: var(--ink);
    background: rgba(32,35,38,.82);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
  }
  .hero h1, .section-head h1, .profile-head h1, .form-layout h1, .detail-main h1 {
    font-size: 38px;
  }
  .detail-main {
    position: absolute;
    top: max(52px, calc(env(safe-area-inset-top) + 42px));
    left: 20px;
    z-index: 2;
    max-width: calc(100% - 92px);
  }
  .detail-main h1 {
    padding: 7px 10px;
    font-size: clamp(30px, 9vw, 42px);
  }
  .title-row {
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }
  .detail-main > .artist-link {
    margin-top: 6px;
    padding: 5px 10px;
    font-size: 22px;
    color: rgb(205 214 244 / .76);
  }
  .detail-main .eyebrow,
  .detail-main .edit-inline {
    display: none;
  }
  .current-track-pill {
    display: block;
    width: 100%;
    padding: 5px 10px;
    font-size: 14px;
    line-height: 1.35;
    max-width: calc(100vw - 112px);
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .current-track-list {
    width: 100%;
    max-width: calc(100vw - 112px);
    gap: 6px;
    min-height: 0;
    overflow: visible;
    flex-wrap: wrap;
  }
  .current-track-label,
  .current-track-artist,
  .current-track-title {
    display: inline;
  }
  .detail-main .tracklist-toggle {
    position: fixed;
    left: 12px;
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 8px));
    z-index: 12;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 40px;
    margin-top: 0;
    padding: 0 14px;
    font-size: 12px;
    background: rgba(12,14,16,.94);
    border: 1px solid var(--line-strong);
    box-shadow: 0 10px 22px rgba(0,0,0,.24);
  }
  .detail-main .tracklist-toggle.is-open {
    background: rgb(var(--accent-rgb) / .96);
    border-color: rgb(var(--accent-rgb) / .96);
    color: var(--crust);
  }
  .genre-pill {
    margin-top: 0;
  }
  .genre-popover {
    top: calc(100% + 6px);
    min-width: 180px;
    max-width: calc(100vw - 40px);
  }
  .large {
    display: none;
  }
  .hero-waveform {
    position: absolute;
    left: 0;
    right: 0;
    bottom: max(104px, calc(env(safe-area-inset-bottom) + 88px));
    z-index: 2;
    grid-column: auto;
    grid-row: auto;
    height: min(30vh, 220px);
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  .hero-waveform .wave-canvas {
    width: 100%;
  }
  .detail-main .play-big {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 4;
    width: 96px;
    height: 96px;
    margin: 0;
    transform: translate(-50%, -50%);
    color: color-mix(in srgb, var(--accent) 76%, var(--sky));
    background: transparent;
    border: 0;
    font-size: 74px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 5px 26px rgba(0,0,0,.7);
    opacity: .95;
    transition: opacity .28s ease;
  }
  .detail-main .play-big.is-playing {
    opacity: 0;
    pointer-events: none;
  }
  .detail-main .play-big.is-paused {
    opacity: .95;
    pointer-events: auto;
  }
  .hero-waveform .wave-time {
    position: absolute;
    left: 50%;
    bottom: 34%;
    transform: translateX(-50%);
    justify-content: center;
    width: max-content;
    max-width: calc(100% - 32px);
    margin: 0;
    padding: 5px 9px;
    color: var(--ink);
    background: rgba(0,0,0,.78);
    font-size: 16px;
    pointer-events: none;
  }
  .hero-waveform .wave-time [data-wave-current] {
    color: var(--orange);
  }
  .hero-waveform .wave-time [data-wave-remaining] {
    display: none !important;
  }
  .track-cue {
    bottom: calc(100% - 8px);
    max-width: min(270px, calc(100% - 20px));
    gap: 0;
    padding: 6px 9px;
  }
  .track-cue-title {
    font-size: 13px;
  }
  .detail-content {
    display: none;
    margin-left: 0;
  }
  .mobile-tracklist-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(68px, calc(env(safe-area-inset-bottom) + 58px));
    z-index: 11;
    display: grid;
    gap: 10px;
    max-height: 44dvh;
    padding: 14px;
    overflow: auto;
    background: rgba(8,10,11,.95);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow);
  }
  .mobile-tracklist-panel[hidden] {
    display: none !important;
  }
  .mobile-tracklist-panel h2 {
    margin: 0;
    font-size: 15px;
  }
  .mobile-tracklist-panel .tracklist-list {
    margin-top: 0;
  }
  .play-big {
    width: 46px;
    height: 46px;
  }
  .mix-card {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
  }
  .mix-card h3 { font-size: 16px; }
  .mix-card p { display: none; }
  .mini-wave { height: 48px; }
  .form-layout { grid-template-columns: 1fr; }
  .tracklist-row {
    grid-template-columns: 1fr 1fr 38px;
  }
  .tracklist-row label:nth-of-type(3),
  .tracklist-row label:nth-of-type(4),
  .tracklist-row .tracklist-links-editor {
    grid-column: 1 / -1;
  }
  .tracklist-editor-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .timestamp-editor-head,
  .timestamp-stage-head,
  .timestamp-rows-head,
  .timestamp-editor-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .timestamp-transport {
    justify-content: flex-start;
    position: sticky;
    top: 0;
    z-index: 2;
    padding-top: 4px;
    background: linear-gradient(180deg, rgba(21,24,25,.96), rgba(21,24,25,.82) 70%, rgba(21,24,25,0));
  }
  .timestamp-wave-shell {
    padding: 10px;
    min-height: 160px;
  }
  .timestamp-wave-canvas {
    height: 140px;
    min-height: 140px;
  }
  .timestamp-row {
    grid-template-columns: 1fr;
  }
  .timestamp-row-fields {
    grid-template-columns: 1fr;
  }
  .tracklist-links-editor-wide {
    grid-column: auto;
  }
  .timestamp-row-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .timestamp-row-actions .button,
  .timestamp-row-actions .icon-button {
    min-width: 0;
    width: 100%;
  }
  .profile-head { align-items: flex-start; flex-direction: column; }
  .player {
    grid-template-columns: 46px minmax(0, 1fr) 42px;
    gap: 9px;
    padding: 8px 10px;
  }
  .player-cover { width: 42px; height: 42px; }
  .player-meta { gap: 9px; }
  .time { display: none; }
  .player-progress {
    height: 8px;
  }
  .transport-button { width: 40px; height: 40px; }
  .volume-control { min-width: 42px; }
  .volume-slider { display: none; }
  .player-progress-markers { display: none !important; }
}
