/* Drums@Work Mixes — schwarz wie die Hauptseite, ein einziger Akzent für "jetzt". */

/* Schrift liegt lokal, damit keine Daten an fremde CDNs gehen.
   Fehlen die Dateien, greift die Systemschrift — das Layout bleibt gleich. */
@font-face {
  font-family: 'Archivo Local';
  src: url('/fonts/archivo-variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #000000;
  --paper: #ffffff;
  --haze: #8e8e8e;
  --dim: #5a5a5a;
  --rule: #1c1c1c;
  --rule-strong: #333333;
  --signal: #ffb020;

  --wave-played: #ffffff;
  --wave-rest: #2b2b2b;

  --font: 'Archivo Local', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --gutter: 1.25rem;
  --measure: 38rem;
  --shell: 54rem;

  --pad-top: env(safe-area-inset-top, 0px);
  --pad-bottom: env(safe-area-inset-bottom, 0px);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(3.5rem + var(--pad-top)); }

body {
  margin: 0;
  padding-top: var(--pad-top);
  padding-bottom: var(--pad-bottom);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

button, input, textarea, select { font: inherit; color: inherit; }

/* ------------------------------------------------------------- Topbar */

.topbar {
  position: sticky;
  top: var(--pad-top);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.5rem;
  padding: 0 var(--gutter);
  background: var(--ink);
  border-bottom: 1px solid var(--rule);
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: var(--pad-top);
  background: var(--ink);
  z-index: 30;
}

.wordmark {
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.0625rem;
  text-decoration: none;
}
.wordmark-rest { color: var(--haze); font-weight: 500; }

.topbar-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.875rem;
  color: var(--haze);
}
.topbar-links a { text-decoration: none; }
.topbar-links a:hover { color: var(--paper); }
.topbar-links form { margin: 0; }

.linkbtn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--haze); font-size: 0.875rem;
}
.linkbtn:hover { color: var(--paper); }

/* ------------------------------------------------------------- Archiv */

.archive {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 3rem var(--gutter) 4rem;
}
.archive-title {
  font-size: clamp(2.5rem, 12vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.92;
}
.archive-intro {
  margin-top: 1rem;
  max-width: var(--measure);
  color: var(--haze);
}

.mixlist {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.mixrow { border-bottom: 1px solid var(--rule); }
.mixrow-link {
  display: grid;
  grid-template-columns: 3.25rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 0;
  text-decoration: none;
}
.mixrow-link:hover .mixrow-title { color: var(--signal); }
.mixrow-art img,
.mixrow-art-empty {
  width: 3.25rem; height: 3.25rem;
  object-fit: cover;
  background: #141414;
  display: block;
}
.mixrow-body { min-width: 0; }
.mixrow-title {
  display: block;
  font-weight: 650;
  letter-spacing: -0.015em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mixrow-meta {
  display: block;
  font-size: 0.8125rem;
  color: var(--haze);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mixrow-time { font-size: 0.8125rem; color: var(--dim); }

.empty { color: var(--haze); padding: 2rem 0; }

/* ---------------------------------------------------------- Mix-Seite */

.mixpage { padding-bottom: 4rem; }

.hero {
  position: relative;
  padding: 3rem var(--gutter) 1.75rem;
  max-width: var(--shell);
  margin: 0 auto;
}
.hero-has-cover { padding-top: 14rem; }

.hero-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
}
.hero-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: grayscale(0.35) contrast(1.05);
}
.hero-art::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.2) 35%, rgba(0,0,0,0.95) 88%, #000 100%);
}

.hero-kicker {
  font-size: 0.875rem;
  color: var(--haze);
  margin-bottom: 0.5rem;
}
.hero-has-cover .hero-kicker { color: #c9c9c9; }
.hero-title {
  font-size: clamp(2rem, 9vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  max-width: 16ch;
}
.hero-meta {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--haze);
}

/* ------------------------------------------------------------- Player */

.player {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wave {
  display: block;
  width: 100%;
  height: 5rem;
  cursor: pointer;
  touch-action: pan-y;
}
.player.is-loading .wave { opacity: 0.4; }

/* Unsichtbares, aber fokussierbares Bedienelement über der Wellenform. */
.wave-handle {
  display: block;
  width: 100%;
  height: 0.5rem;
  margin-top: -0.5rem;
  cursor: pointer;
}

.transport {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 0 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.btn-play {
  flex: none;
  width: 3rem; height: 3rem;
  border-radius: 50%;
  border: 1px solid var(--paper);
  background: var(--paper);
  color: var(--ink);
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.btn-play:active { transform: scale(0.94); }
.btn-play svg { width: 1.375rem; height: 1.375rem; fill: currentColor; }
.btn-play .icon-pause { display: none; }
.player.is-playing .btn-play .icon-play { display: none; }
.player.is-playing .btn-play .icon-pause { display: block; }

.btn-skip {
  flex: none;
  background: none;
  border: 1px solid var(--rule-strong);
  color: var(--haze);
  border-radius: 999px;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  cursor: pointer;
}
.btn-skip:hover { color: var(--paper); border-color: var(--paper); }

.times {
  font-size: 0.8125rem;
  color: var(--haze);
  white-space: nowrap;
}
.times .t-now { color: var(--paper); }

.transport-right {
  flex-basis: 100%;
  display: flex;
  gap: 0.5rem;
}
@media (min-width: 34rem) {
  .transport-right { flex-basis: auto; margin-left: auto; }
}

.btn-ghost {
  background: none;
  border: 1px solid var(--rule-strong);
  color: var(--paper);
  padding: 0.4rem 0.8rem;
  font-size: 0.8125rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn-ghost:hover { border-color: var(--paper); }
.btn-ghost.is-done { border-color: var(--signal); color: var(--signal); }

.btn {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--paper);
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--signal); border-color: var(--signal); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; background: var(--paper); }

/* ---------------------------------------------- Notizen und Tracklist */

.notes, .tracklist, .share {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 2rem var(--gutter) 0;
}
.notes p {
  max-width: var(--measure);
  color: #d4d4d4;
}
.notes p + p { margin-top: 0.75rem; }

.tracklist h2, .share h2 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--haze);
  letter-spacing: 0;
  margin-bottom: 0.75rem;
}

.tracks {
  list-style: none;
  margin: 0; padding: 0;
  border-top: 1px solid var(--rule);
}
.track {
  display: grid;
  grid-template-columns: 4.25rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.track-time {
  background: none; border: 0; padding: 0;
  text-align: left;
  font-size: 0.8125rem;
  color: var(--haze);
  cursor: pointer;
}
.track-time:hover { color: var(--paper); }
.track-time-static { cursor: default; }
.track-name { font-size: 0.9375rem; }
.track.is-current .track-name { color: var(--signal); }
.track.is-current .track-time { color: var(--signal); }

/* --------------------------------------------------------------- Teilen */

.field { display: block; margin-bottom: 1rem; }
.field-label {
  display: block;
  font-size: 0.8125rem;
  color: var(--haze);
  margin-bottom: 0.375rem;
}
.input {
  width: 100%;
  background: #0d0d0d;
  border: 1px solid var(--rule-strong);
  color: var(--paper);
  padding: 0.55rem 0.7rem;
  font-size: 0.9375rem;
  border-radius: 0;
}
.input:focus { border-color: var(--paper); outline: none; }
textarea.input { resize: vertical; line-height: 1.45; }
.input-file { padding: 0.45rem; font-size: 0.8125rem; color: var(--haze); }
.field-row { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }

/* --------------------------------------------------------------- Embed */

.page-embed { background: var(--ink); }
.player.embed {
  display: flex;
  gap: 0.875rem;
  padding: 0.75rem;
  max-width: none;
  align-items: stretch;
}
.embed-art { flex: none; width: 5.5rem; }
.embed-art img { width: 5.5rem; height: 5.5rem; object-fit: cover; }
.embed-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.embed-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.embed-title:hover { color: var(--signal); }
.embed-kicker {
  font-size: 0.75rem; color: var(--haze);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.player.embed .wave { height: 2.75rem; margin-top: 0.375rem; }
.player.embed .transport { border-bottom: 0; padding: 0.375rem 0 0; gap: 0.625rem; }
.player.embed .btn-play { width: 2.25rem; height: 2.25rem; }
.player.embed .btn-play svg { width: 1rem; height: 1rem; }

/* -------------------------------------------------------------- Studio */

.studio {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 4rem;
}
.studio-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
}

.drop {
  border: 1px dashed var(--rule-strong);
  padding: 2.5rem 1.25rem;
  text-align: center;
  cursor: pointer;
}
.drop:hover, .drop.is-over { border-color: var(--signal); }
.drop.is-over { background: rgba(255, 176, 32, 0.06); }
.drop-main { font-weight: 600; }
.drop-sub { font-size: 0.8125rem; color: var(--haze); margin-top: 0.375rem; }

.form { margin-top: 1.5rem; }
.picked {
  font-size: 0.8125rem;
  color: var(--signal);
  margin-bottom: 1rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.switches { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0.5rem 0 1.5rem; }
.switch { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--haze); cursor: pointer; }
.switch input { accent-color: var(--signal); width: 1rem; height: 1rem; }

.progress { margin-bottom: 1.25rem; }
.progress-bar {
  height: 3px;
  background: var(--wave-rest);
  overflow: hidden;
}
.progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--signal);
  transition: width 0.2s linear;
}
.progress-text { font-size: 0.8125rem; color: var(--haze); margin-top: 0.5rem; }

.form-actions { display: flex; gap: 0.75rem; align-items: center; }

.notice {
  border-left: 2px solid var(--signal);
  padding: 0.625rem 0.875rem;
  background: #0d0d0d;
  color: #d4d4d4;
  font-size: 0.875rem;
}
.notice-inline { margin-top: 1.25rem; }
.notice code { color: var(--signal); }

.library { margin-top: 3.5rem; }
.library-list { border-top: 1px solid var(--rule); }

.item { border-bottom: 1px solid var(--rule); padding: 1rem 0; }
.item-head { display: flex; gap: 1rem; align-items: flex-start; }
.item-art img, .item-art-empty {
  width: 3.5rem; height: 3.5rem; object-fit: cover; background: #141414; flex: none;
}
.item-body { flex: 1; min-width: 0; }
.item-title { font-weight: 650; letter-spacing: -0.015em; }
.item-meta { font-size: 0.8125rem; color: var(--haze); margin-top: 0.125rem; }
.item-draft { color: var(--signal); }
.item-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.item-danger { border-color: #4a2020; color: #d08b8b; }
.item-danger:hover { border-color: #d08b8b; }

/* --------------------------------------------------------------- Login */

.login {
  max-width: 22rem;
  margin: 0 auto;
  padding: 6rem var(--gutter);
}
.login-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}
.login-form .btn { width: 100%; }
.error { color: var(--signal); font-size: 0.875rem; margin-bottom: 1rem; }

/* -------------------------------------------------------------- Fehler */

.errorpage {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 5rem var(--gutter);
}
.errorpage h1 { font-size: 4rem; font-weight: 800; letter-spacing: -0.05em; }
.errorpage p { color: var(--haze); margin-top: 0.75rem; }
.errorpage p:last-child { margin-top: 2rem; }

/* -------------------------------------------------------------- Footer */

.sitefoot {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 2rem var(--gutter) 3rem;
  font-size: 0.8125rem;
  color: var(--dim);
  border-top: 1px solid var(--rule);
}
.sitefoot a { text-decoration: none; }
.sitefoot a:hover { color: var(--paper); }
.page-embed .sitefoot { display: none; }

/* ------------------------------------------------------- Groessere Schirme */

@media (min-width: 40rem) {
  :root { --gutter: 2rem; }
  .field-row { grid-template-columns: 1fr 12rem; }
  .wave { height: 7.5rem; }
  .hero-has-cover { padding-top: 18rem; }
  .track { grid-template-columns: 5rem 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------- Bearbeiten in der Liste */

.item-edit {
  margin-top: 1.25rem;
  padding: 1.25rem 0 0.25rem;
  border-top: 1px solid var(--rule);
}
.item-form { margin-top: 0; }
.item-form .form-actions { flex-wrap: wrap; }
.item-form .progress-text { margin-top: 0; }

/* ------------------------------------------------- Hinweis über der Seite */

.notice-top {
  max-width: var(--shell);
  margin: 1.5rem auto 0;
  padding: 0.625rem 0.875rem;
}

/* Im Studio stehen mehrere Abschnitte untereinander */
.page-studio .library + .library { margin-top: 3.5rem; }
.page-studio .login .notice { margin-bottom: 1.25rem; }
