@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* Catalogue, artist workspace and preserved upload layouts. */
[hidden] { display: none !important; }

:root {
  --tt-glass: #21191e;
  --tt-scarlet: #f6334c;
  --tt-ivory: #f6efe8;
}
.tt-screen {
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --tt-edge: #51454b;
  --tt-muted: #c3b6bc;
  max-width: 1080px;
  margin-inline: auto;
  color: var(--tt-ivory);
}
.tt-screen h1, .tt-screen h2, .tt-screen h3, .tt-screen p {
  margin-top: 0;
}
.tt-screen h2 { margin-bottom: 12px; font-size: clamp(19px, 3vw, 24px); line-height: 1.15; }
.tt-head {
  margin: 0 0 18px;
  min-height: 74px;
}
.tt-head h1 {
  margin: 0;
  font: 850 clamp(44px, 7vw, 76px)/1.05 var(--display);
  letter-spacing: -.065em;
}
.tt-head p { margin: 6px 0; color: var(--tt-muted); }
.tt-head .button { margin-top: 10px; }
.tt-screen .button {
  min-height: 43px;
  letter-spacing: 0;
  border-radius: 100vw;
  text-transform: none;
  gap: .5rem;
}
.tt-screen .button.primary { background: linear-gradient(105deg, #d20932, #b80026); }
.tt-screen .button:disabled { opacity: .5; cursor: default; }
.tt-screen :focus-visible, .tt-mobile-brand:focus-visible { outline: 2px solid #ffdbe0; outline-offset: 3px; }
.tt-screen .field { display: flex; flex-direction: column; gap: 5px; min-width: 0; color: var(--tt-ivory); font-weight: 650; }
.tt-screen .field input, .tt-screen .field select, .tt-screen .field textarea, .tt-performance select {
  color: var(--tt-ivory);
  background: #161415;
  border: 1px solid var(--tt-edge);
  border-radius: 8px;
  width: 100%;
  min-height: 42px;
  min-width: 0;
  padding: 8px 12px;
  font-size: 16px;
}
.tt-screen .field input[readonly] { color: var(--tt-muted); }
.tt-screen .field textarea { resize: vertical; }
.tt-screen p.form-feedback { margin: 8px 0; }
.tt-screen .form-feedback:empty, .tt-player-status:empty { display: none; }
.tt-screen .form-feedback[data-state="error"], .tt-player-status { color: #ffadb7; }
.tt-screen .form-feedback[data-state="ok"] { color: var(--tt-ivory); }
.tt-glass {
  border: 1px solid var(--tt-edge);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 90% 0, #5e1325 0, transparent 44%),
    linear-gradient(145deg, var(--tt-glass), #131114 64%, #211216);
  box-shadow: inset 0 1px 12px #ffffff09;
  padding: 16px;
}
.tt-search.searchbar {
  display: flex;
  width: 100%;
  min-height: 46px;
  margin: 0 0 12px;
  align-items: center;
  border-radius: 100vw;
  background: linear-gradient(105deg, #282225, #151015 80%, #490e20);
  padding: 0 14px;
}
.tt-search input { width: 100%; min-width: 0; font-size: 16px; }
.tt-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tt-filters button {
  background: #141113;
  border: 1px solid var(--tt-edge);
  color: var(--tt-ivory);
  border-radius: 100vw;
  min-height: 35px;
  padding: 4px 13px;
}
.tt-filters button[aria-pressed="true"] { background: var(--tt-scarlet); color: #140007; border-color: var(--tt-scarlet); font-weight: 750; }
.tt-feature {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border: 1px solid #7c2335;
  border-radius: 19px;
  margin: 0 0 20px;
  padding: clamp(18px, 4vw, 40px);
  min-height: clamp(196px, 28vw, 300px);
  isolation: isolate;
}
.tt-editorial {
  background: #211017 url(assets/hero-artist.webp) right 32% / cover no-repeat;
}
.tt-feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0a090bf5, #16080aa8 48%, #30000824), linear-gradient(0deg,#12020887, transparent);
  z-index: -1;
}
.tt-feature-art {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(66%, 430px);
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.tt-feature:has(.tt-feature-art) { background: #1d0e15; }
.tt-feature h2 { max-width: 15ch; margin: 0 0 5px; font: 900 clamp(28px, 5vw, 52px)/.98 var(--display); letter-spacing: -.055em; }
.tt-feature > div { position: relative; }
.tt-feature > div > a:not(.button) { display: block; margin-bottom: 10px; }
.tt-feature .button { margin-top: 10px; }
.tt-track-list { margin-bottom: 20px; }
.tt-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  border-bottom: 1px solid #ffffff20;
  padding: 7px 0;
}
.tt-track-main {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 12px;
  min-width: 0;
  text-align: left;
  color: var(--tt-ivory);
  background: transparent;
  border: 0;
  padding: 0;
}
.tt-track-main img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; flex: none; }
.tt-track-main span { min-width: 0; overflow-wrap: anywhere; }
.tt-track-main strong, .tt-track-main small { display: block; }
.tt-track-main small, .tt-track-state, .tt-empty { color: var(--tt-muted); }
.tt-track-state { font-size: .83rem; }
.tt-save {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--tt-ivory);
}
.tt-save svg { width: 18px; height: 20px; stroke: currentColor; fill: none; }
.tt-save[aria-pressed="true"] svg { color: var(--tt-scarlet); fill: currentColor; }
.tt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tt-row h2 { margin: 0; }
.tt-performance { margin: 0 0 22px; }
.tt-performance select { width: auto; border-radius: 100vw; font-size: 13px; }
.tt-performance dl { margin: 5px 0 0; }
.tt-performance dl div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid #ffffff23; }
.tt-performance dl div:last-child { border: 0; padding-bottom: 0; }
.tt-performance dd { margin: 0; }
.tt-profile-banner { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.tt-profile-banner .profile-avatar { flex: none; }
.tt-profile-banner .profile-avatar svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.tt-profile-banner h2 { margin-bottom: 5px; }
.tt-profile-banner p { overflow-wrap: anywhere; }
.tt-profile-form, .tt-account { max-width: 660px; }
.tt-profile-form .field, .tt-account .field { margin-bottom: 12px; }
.tt-distribution { max-width: 660px; margin-top: 18px; }
.tt-distribution p { margin: 10px 0 0; color: var(--tt-muted); }
.tt-gate { margin: 8px 0 16px; }
.tt-gate p { margin-bottom: 8px; }
.tt-upload-heading > a { display: inline-block; margin-bottom: 8px; color: var(--tt-muted); }
.tt-upload-heading { position: relative; }
.tt-upload-heading > .tt-upload-close { display: none; }
.tt-upload-heading .tt-head { margin-bottom: 12px; }
.tt-upload-heading .tt-head h1 { font-size: clamp(40px, 5.6vw, 58px); }
.tt-upload-heading .tt-step-label { display: none; }
.tt-upload-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(230px, 1fr); gap: 16px; align-items: start; }
.tt-upload-grid .preview-panel { background-color: var(--tt-glass); order: 2; min-width: 0; padding: 16px; }
.tt-upload-grid .record-art { aspect-ratio: 1; overflow: hidden; display: block; background: #110e10; }
.tt-upload-grid .record-art img { width: 100%; height: 100%; object-fit: cover; }
.tt-upload-grid .preview-panel h3 { margin-top: 12px; overflow-wrap: anywhere; }
.tt-upload-grid .preview-panel p { margin-bottom: 10px; }
.tt-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tt-full { grid-column: 1 / -1; }
.tt-file-grid { margin-bottom: 12px; }
.tt-file {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 7px 10px;
  min-height: 120px;
  padding: 12px;
}
.tt-file > svg, .tt-file img { width: 36px; height: 36px; object-fit: cover; border-radius: 7px; }
.tt-file strong, .tt-file span { display: block; overflow-wrap: anywhere; }
.tt-file span { font-size: .8rem; color: var(--tt-muted); }
.tt-file .button { grid-column: 2; justify-self: start; min-height: 38px; padding: 7px 11px; font-size: .82rem; }
.tt-file-picker { position: relative; overflow: hidden; cursor: pointer; }
.tt-file-picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tt-file-picker:focus-within { outline: 2px solid #ffdbe0; outline-offset: 3px; }
#upload-wave { grid-column: 1 / -1; width: 100%; height: 26px; }
#estimate-bpm { margin-top: 5px; min-height: 34px; padding: 4px 10px; }
.tt-ownership { margin: 15px 0 9px; }
.tt-rights-summary { display: none; }
.tt-ownership details { margin-top: 10px; }
.tt-ownership summary { cursor: pointer; }
.tt-ownership details .field { margin-top: 9px; }
.tt-ownership details p { margin: 6px 0 0; color: var(--tt-muted); }
.tt-declaration { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 15px; }
.tt-declaration input { accent-color: var(--tt-scarlet); width: 18px; height: 18px; flex: none; }
.tt-permissions { padding: 6px 12px; margin-bottom: 9px; }
.tt-permission { display: flex; align-items: center; gap: 10px; min-height: 50px; }
.tt-permission + .tt-permission { border-top: 1px solid #ffffff20; }
.tt-permission > svg { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; }
.tt-permission small { display: block; color: var(--tt-muted); }
.tt-permission input {
  appearance: none;
  position: relative;
  flex: none;
  margin-left: auto;
  width: 39px;
  height: 23px;
  background: #605960;
  border-radius: 100vw;
  cursor: pointer;
}
.tt-permission input::before { content: ""; position: absolute; left: 3px; top: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; }
.tt-permission input:checked { background: #e5002d; }
.tt-permission input:checked::before { left: 19px; }
.tt-upload-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 10px 0; }
#upload-next, #upload-back { display: none; }
#upload[data-published="true"] #save-draft, #upload:not([data-published="true"]) #unpublish-track { display: none; }
.tt-player-status { position: absolute; inset: auto 12px calc(100% + 3px) auto; font-size: 12px; padding: 4px 9px; border-radius: 6px; background: #21151b; }
.tt-mobile-brand { display: none; }
.tt-cleanup { margin: 15px 0 0; }
.tt-cleanup > summary { min-height: 40px; padding: 8px 0; color: var(--tt-muted); cursor: pointer; }
.tt-cleanup .cleanup-workbench { margin-top: 0; }
body:is([data-page="account"], [data-page="artist"], [data-page="profile"], [data-page="studio"], [data-page="discover"], [data-page="library"], [data-page="upload"])
  #global-player[data-active="false"]:has(#playback-status:empty) { display: none; }
.tt-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.avatar svg { width: 19px; height: 19px; stroke: currentColor; fill: none; }
.avatar:has(img:not([hidden])), .profile-avatar:has(img:not([hidden])) { overflow: hidden; padding: 0; }
[data-founder-avatar] { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 63%; transform: translateY(-6%) scale(1.22); }

@media (max-width: 790px) {
  .tt-mobile-brand { display: inline-flex; align-items: center; gap: 7px; font: 850 17px var(--display); white-space: nowrap; }
  .tt-mobile-brand img { width: 26px; height: 26px; object-fit: contain; }
  .topbar .breadcrumb { display: none; }
  .mobile-bottom a, .mobile-bottom button { text-transform: none; }
  .tt-screen h1 { font-size: clamp(43px, 9vw, 60px); }
  .tt-head { min-height: auto; margin-bottom: 12px; }
  .tt-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .tt-filters button { flex: none; }
  .tt-upload-heading { border-radius: 14px; padding: 10px 8px 4px; background: linear-gradient(90deg,#0a090b 32%,#0a090b4d),url(assets/hero-artist.webp) right 30% / cover; }
  .tt-upload-heading .tt-step-label { display: block; font-weight: 700; }
  .tt-upload-heading > .tt-upload-close { display: grid; place-items: center; position: absolute; right: 5px; top: 5px; width: 40px; height: 40px; color: var(--tt-ivory); font-size: 25px; }
  .tt-rights-summary { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 10px; }
  .tt-rights-summary img { width: 50px; height: 50px; object-fit: cover; border-radius: 9px; }
  .tt-rights-summary small { display: block; color: var(--tt-muted); }
  .tt-upload-grid { display: block; }
  .tt-upload-grid .preview-panel { display: none; }
  .tt-file-grid { grid-template-columns: 1fr; }
  .tt-file { grid-template-columns: 34px minmax(0, 1fr) auto; min-height: 60px; }
  .tt-file .button { grid-column: auto; padding-inline: 9px; }
  .tt-file #check-audio { grid-column: 3; }
  .tt-form-grid .field:is([for="release-title"], [for="release-artist"]) { grid-column: 1 / -1; }
  #upload[data-step="1"] #step-two, #upload[data-step="2"] #step-one,
  #upload[data-step="1"] #upload-back, #upload[data-step="1"] #save-draft,
  #upload[data-step="1"] #publish-track, #upload[data-step="1"] #unpublish-track,
  #upload[data-step="2"] #upload-next { display: none; }
  #upload[data-step="1"] #upload-next, #upload[data-step="2"] #upload-back { display: inline-flex; }
  .tt-upload-actions { justify-content: stretch; }
  .tt-upload-actions .button { flex: 1 0 auto; }
  .tt-track { gap: 8px; }
  .tt-track .button { padding-inline: 9px; font-size: .8rem; }
  .tt-track-state { max-width: 80px; }
  .tt-feature-art { width: 72%; }
}
@media (max-width: 700px) {
  body[data-page="upload"] .mobile-bottom, body[data-page="upload"] #feedback-trigger,
  body[data-page="upload"] #global-player:has(#playback-status:empty) { display: none; }
  body[data-page="upload"] .layout { padding-bottom: 30px; }
  body[data-page="upload"] .tt-upload-actions { position: sticky; z-index: 6; bottom: 0; background: #0a090bf6; }
}
@media (max-width: 360px) {
  .tt-file { grid-template-columns: 30px minmax(0, 1fr); }
  .tt-file .button, .tt-file #check-audio { grid-column: 2; }
}
