/* TrackDrop
   Palette: neutral ink base, one citron accent. Accent is reserved for the
   primary action, links, and the "playing now" state. Everything else is
   carried by the neutral ramp so long track lists stay quiet.
   Radius rule: pills for buttons, 14px cards, 10px inputs, 8px rows. */

:root {
  --bg: #0e0f11;
  --surface-1: #16181b;
  --surface-2: #1d2024;
  --surface-3: #262a2f;
  --line: #2b3036;
  --line-soft: #21252a;

  --text: #e9ecee;
  --text-2: #9aa1a8;
  --text-3: #7e858c;

  --accent: #cdf34a;
  --accent-press: #b8dd35;
  --accent-soft: rgba(205, 243, 74, .13);
  --on-accent: #12140a;

  --ok: #56d39a;
  --warn: #f0c14b;
  --danger: #ff6f61;

  --r-card: 14px;
  --r-ctl: 10px;
  --r-row: 8px;
  --r-pill: 999px;

  --shadow-1: 0 10px 26px rgba(0, 0, 0, .38);
  --shadow-2: 0 22px 54px rgba(0, 0, 0, .5);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --page: 1180px;

  --sans: ui-sans-serif, -apple-system, "Segoe UI Variable Display", "Segoe UI",
          system-ui, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 132px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

::selection { background: var(--accent); color: var(--on-accent); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* main is focused on every route change so screen readers land on the new
   view. That is a programmatic target, not a control, so it takes no ring. */
main:focus, main:focus-visible { outline: none; }

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.skip:focus { left: 16px; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- animation ---------- */

@keyframes tdRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes tdFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tdPop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes tdPopC { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes tdBar { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
@keyframes tdSkel { 0%, 100% { opacity: .45; } 50% { opacity: .85; } }
@keyframes tdSpin { to { transform: rotate(360deg); } }

.rise { animation: tdRise .5s var(--ease) both; }
.fade { animation: tdFade .45s both; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- layout ---------- */

.wrap { max-width: var(--page); margin: 0 auto; padding: 20px 24px 0; }
.wrap.narrow { max-width: 640px; }
.wrap.wide { max-width: 1240px; }

.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.push { margin-left: auto; }
.stack { display: flex; flex-direction: column; gap: 10px; }

h1, h2, h3 { margin: 0; letter-spacing: -.025em; line-height: 1.12; font-weight: 700; }
h1 { font-size: 30px; }
h2 { font-size: 20px; }
h3 { font-size: 15px; }

.section-title {
  margin: 34px 0 14px;
  font-size: 14px;
  font-weight: 600;
}

/* ---------- header ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 24px;
  background: rgba(14, 15, 17, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--accent);
  display: grid; place-items: center;
  color: var(--on-accent);
  font-size: 12px; font-weight: 800;
}

nav { display: flex; align-items: center; gap: 4px; }

.navlink {
  padding: 7px 12px;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  color: var(--text-2);
  transition: background .18s, color .18s;
}
.navlink:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.navlink[aria-current="page"] { background: var(--surface-2); color: var(--text); }

.rolechip {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  font-size: 11.5px;
  color: var(--text-2);
}
.rolechip.admin { background: var(--accent-soft); color: var(--accent); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s, transform .18s var(--ease), border-color .18s;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn.primary { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { background: var(--accent-press); }

.btn.ghost { background: transparent; border-color: var(--line); color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }

.btn.danger { background: transparent; border-color: var(--line); color: var(--danger); }
.btn.danger:hover { background: rgba(255, 111, 97, .12); }

.btn.small { padding: 7px 14px; font-size: 12.5px; }
.btn.icon { padding: 10px 14px; }

.iconbtn {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  transition: background .18s, color .18s;
}
.iconbtn:hover { background: var(--surface-3); color: var(--text); }

/* Inline SVG icons carry no width or height of their own, so without this they
   fall back to the 300x150 replaced-element default and blow the button up. */
.btn svg, .iconbtn svg, .linkish svg { width: 16px; height: 16px; flex: none; }
.iconbtn svg { width: 15px; height: 15px; }

.playbtn {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  transition: transform .2s var(--ease), background .18s;
}
.playbtn:hover { background: var(--accent-press); transform: scale(1.05); }
.playbtn svg { width: 15px; height: 15px; }

.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  font-size: 13.5px;
  cursor: pointer;
}
.linkish:hover { text-decoration: underline; }

/* ---------- forms ---------- */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label { font-size: 12.5px; color: var(--text-2); }
.field .help { font-size: 12px; color: var(--text-3); }
.field .err { font-size: 12.5px; color: var(--danger); }

input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="datetime-local"], textarea, select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface-1);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .18s, background .18s;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); background: var(--surface-2); }
textarea { resize: vertical; line-height: 1.6; min-height: 84px; }

.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface-1);
  font-size: 13px;
  color: var(--text-2);
}
.switch button {
  position: relative;
  width: 40px; height: 23px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  cursor: pointer;
  transition: background .2s;
}
.switch button::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--text-3);
  transition: transform .2s var(--ease), background .2s;
}
.switch button[aria-pressed="true"] { background: var(--accent); }
.switch button[aria-pressed="true"]::after { transform: translateX(17px); background: var(--on-accent); }

.segmented { display: flex; gap: 5px; }
.segmented button {
  flex: 1;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface-1);
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}
.segmented button:hover { background: var(--surface-2); color: var(--text); }
.segmented button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
}
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip.warn { background: rgba(240, 193, 75, .13); color: var(--warn); }
.chip.danger { background: rgba(255, 111, 97, .13); color: var(--danger); }
.chip.ok { background: rgba(86, 211, 154, .13); color: var(--ok); }
button.chip { border: 0; cursor: pointer; transition: background .18s, color .18s; }
button.chip:hover { background: var(--surface-3); color: var(--text); }
button.chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }

/* The paste-a-link bar. Reaching a drop starts with its link, so this is the
   primary control on the library page rather than a search box. */
.linkbar {
  display: flex;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface-1);
}
.linkbar input { border: 0; background: transparent; padding: 9px 8px; }
.linkbar input:focus { background: transparent; }
.linkbar .btn { flex: none; }

/* ---------- covers and drop cards ---------- */

.cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--surface-2);
}
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover .generated {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.04em;
  color: rgba(255, 255, 255, .82);
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 26px 22px;
}

.dropcard { display: block; color: inherit; cursor: pointer; }
.dropcard:hover { text-decoration: none; }
.dropcard .cover {
  transition: transform .3s var(--ease), box-shadow .3s;
}
.dropcard:hover .cover { transform: translateY(-3px); box-shadow: var(--shadow-1); }
.dropcard .title { margin-top: 10px; font-size: 13.5px; font-weight: 600; }
.dropcard:hover .title { color: var(--accent); }
.dropcard .meta { margin-top: 2px; font-size: 12.5px; color: var(--text-2); }
.dropcard .badge {
  position: absolute;
  right: 8px; bottom: 8px;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  background: rgba(14, 15, 17, .78);
  backdrop-filter: blur(6px);
  font-size: 11px;
  color: var(--text);
}

/* ---------- landing ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 48px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 20px;
}
.hero h1 { font-size: clamp(34px, 4.6vw, 52px); letter-spacing: -.035em; }
.hero p {
  margin: 20px 0 0;
  max-width: 46ch;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-2);
}
.hero .cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

/* Sealed drop card. This replaces the old WebGL turntable: same idea, plain
   CSS, and it is the actual product moment rather than a decoration. */
.sealed { perspective: 1400px; }
.sealed-inner {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  aspect-ratio: 1;
  transform-style: preserve-3d;
}
.sealed-face {
  position: absolute;
  inset: 0;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--surface-2);
}
.sealed-face img, .sealed-face .generated { width: 100%; height: 100%; }
.sealed-inner { max-width: 380px; }
.sealed-lid {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--r-card);
  /* Translucent so the cover art underneath reads as something wrapped up
     rather than a blank panel. */
  background:
    linear-gradient(160deg, rgba(22, 24, 27, .62), rgba(14, 15, 17, .88));
  backdrop-filter: blur(16px) saturate(115%);
  -webkit-backdrop-filter: blur(16px) saturate(115%);
  box-shadow: var(--shadow-2), inset 0 1px 0 rgba(255, 255, 255, .07);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transform-origin: 50% 0;
  backface-visibility: hidden;
  transition: transform .9s cubic-bezier(.3, 1, .3, 1), box-shadow .8s;
}
@media (prefers-reduced-transparency: reduce) {
  .sealed-lid {
    background: linear-gradient(160deg, #1b1e22, #121417);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
.sealed-lid .lidmid { display: grid; place-items: center; gap: 14px; }
.sealed-lid .lidtitle {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
  text-align: center;
  max-width: 90%;
}
.sealed-lid .lidcreator { font-size: 12px; color: var(--text-2); }
.sealed-lid .open-cue {
  align-self: center;
  padding: 7px 15px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 600;
}
.sealed.open .sealed-lid { transform: rotateX(-116deg); }
.sealed-lid .lidtop {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-3);
}
.sealed-lid .seal {
  width: 54px; height: 54px;
  margin: 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(205, 243, 74, .38);
  background:
    radial-gradient(circle at 50% 50%, var(--accent) 0 16%, transparent 16%),
    repeating-radial-gradient(circle at 50% 50%, rgba(205, 243, 74, .2) 0 1px, transparent 1px 5px);
}
.sealed-lid .lidfoot { font-size: 12px; color: var(--text-3); }
.sealed-list {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 18px;
  border-radius: var(--r-card);
  background: var(--surface-1);
  overflow: hidden;
  opacity: 0;
  transition: opacity .5s .25s;
}
.sealed.open .sealed-list { opacity: 1; }
.sealed-list .r {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  padding: 6px 4px;
  font-size: 12.5px;
  color: var(--text-2);
  border-bottom: 1px solid var(--line-soft);
}
.sealed-list .r:last-child { border-bottom: 0; }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  margin-top: 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--line-soft);
}
.steps > div { padding: 24px; background: var(--surface-1); }
.steps h3 { margin-bottom: 8px; }
.steps p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--text-2); }
.steps .n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 12px;
}

.twoup {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.panel {
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  background: var(--surface-1);
}
.panel ul { margin: 14px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13.5px; line-height: 1.9; }

footer {
  margin-top: 72px;
  padding: 26px 24px 40px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-3);
  font-size: 12.5px;
}
footer .wrap { padding-top: 0; }

/* ---------- drop page ---------- */

.droplayout {
  display: grid;
  grid-template-columns: minmax(0, 330px) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}
.dropside .cover { box-shadow: var(--shadow-1); }
.dropside .actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.dropside .actions .btn:first-child { flex: 1; }
.dropside .actions .btn.icon { flex: none; width: 46px; padding: 11px 0; }
.dropside .desc { margin-top: 18px; font-size: 13px; line-height: 1.65; color: var(--text-2); }
.dropside .chips { margin-top: 16px; }

.tracklist { margin-top: 22px; }
.track {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 46px 52px 32px;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: var(--r-row);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .16s;
}
.track:hover { background: var(--surface-1); }
.track[aria-current="true"] { background: var(--surface-2); }
.track[aria-current="true"] .t-title { color: var(--accent); }
.track .t-num {
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-3);
}
.track .t-title { font-size: 14px; font-weight: 600; }
.track .t-sub { margin-top: 2px; font-size: 12px; color: var(--text-3); }
.track .t-kind { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.track .t-kind.video { color: var(--accent); }
.track .t-dur { font-family: var(--mono); font-size: 12.5px; color: var(--text-3); text-align: right; }

.eq { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq span {
  width: 2px; height: 100%;
  background: var(--accent);
  transform-origin: bottom;
  animation: tdBar .9s ease-in-out infinite;
}
.eq span:nth-child(2) { animation-delay: .28s; }
.eq span:nth-child(3) { animation-delay: .52s; }

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-ctl);
  background: var(--surface-1);
  font-size: 12.5px;
  color: var(--text-2);
}

/* ---------- video ---------- */

.videolayout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
}
.videoframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-card);
  overflow: hidden;
  background: #000;
}
.videoframe video { width: 100%; height: 100%; display: block; }
.upnext { display: flex; flex-direction: column; gap: 2px; }
.upnext button {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 8px;
  border: 0;
  border-radius: var(--r-row);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .16s;
}
.upnext button:hover { background: var(--surface-1); }
.upnext button[aria-current="true"] { background: var(--surface-2); }
.upnext .thumb {
  display: grid;
  place-items: center;
  width: 52px; height: 32px;
  flex: none;
  border-radius: 5px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-3);
}

/* ---------- player ---------- */

#player {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 70;
  width: min(680px, calc(100% - 40px));
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface-2);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  animation: tdPopC .35s both;
}
.player-main { display: flex; align-items: center; gap: 14px; padding: 11px 14px; }
.player-art {
  width: 42px; height: 42px;
  flex: none;
  border-radius: var(--r-row);
  overflow: hidden;
  background: var(--surface-3);
}
.player-art img { width: 100%; height: 100%; object-fit: cover; }
.player-meta { min-width: 0; flex: 1; }
.player-meta .t { font-size: 13px; font-weight: 600; }
.player-meta .s { margin-top: 2px; font-size: 11.5px; color: var(--text-2); }
.player-controls { display: flex; align-items: center; gap: 12px; }
.player-controls .iconbtn { width: 30px; height: 30px; background: transparent; }
.player-time {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
}
.player-vol { width: 74px; }

.scrub {
  position: relative;
  height: 4px;
  background: var(--surface-3);
  cursor: pointer;
}
.scrub .fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.scrub.slim { height: 3px; border-radius: 2px; }
.scrub.slim .fill { border-radius: 2px; background: var(--text-2); }

.queue { max-height: 210px; overflow: auto; padding: 10px 12px 4px; border-bottom: 1px solid var(--line); }
.queue .qrow {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: var(--r-row);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.queue .qrow:hover { background: var(--surface-3); }
.queue .qrow[aria-current="true"] { background: var(--surface-3); }
.queue .qrow[aria-current="true"] .qt { color: var(--accent); }
.queue .qn { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); width: 18px; }
.queue .qt { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; }
.queue .qd { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }

/* ---------- create ---------- */

.createlayout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin-top: 26px;
}
.coverpick {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border: 1px dashed var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--surface-1);
  cursor: pointer;
  transition: border-color .2s;
}
.coverpick:hover { border-color: var(--accent); }
.coverpick img { width: 100%; height: 100%; object-fit: cover; }
.coverpick .ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-3);
}

.dropzone {
  margin-top: 24px;
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: var(--r-card);
  background: var(--surface-1);
  text-align: center;
  transition: border-color .2s, background .2s;
}
.dropzone.over { border-color: var(--accent); background: var(--surface-2); }
.dropzone .hint { margin-top: 6px; font-size: 12.5px; color: var(--text-3); }

.uploadrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--r-row);
  background: var(--surface-1);
  margin-top: 2px;
}
.uploadrow .grip { color: var(--text-3); cursor: grab; font-size: 12px; }
.uploadrow .name { font-size: 13px; font-weight: 600; }
.uploadrow .bar { margin-top: 6px; height: 3px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.uploadrow .bar > i { display: block; height: 100%; background: var(--accent); transition: width .3s var(--ease); }
.uploadrow .state { font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.uploadrow .state.ok { color: var(--ok); }
.uploadrow .state.err { color: var(--danger); }
.uploadrow[draggable="true"] { cursor: grab; }
.uploadrow.dragging { opacity: .5; }

/* ---------- dashboard, admin ---------- */

.sidelayout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}
.sidenav { display: flex; flex-direction: column; gap: 2px; }
.sidenav button, .sidenav a {
  padding: 8px 11px;
  border: 0;
  border-radius: var(--r-row);
  background: transparent;
  color: var(--text-2);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: background .16s, color .16s;
}
.sidenav button:hover, .sidenav a:hover { background: var(--surface-1); color: var(--text); text-decoration: none; }
.sidenav [aria-current="true"] { background: var(--surface-2); color: var(--text); font-weight: 600; }
.sidenav .grouplabel {
  margin: 16px 0 6px;
  padding: 0 11px;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat {
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  background: var(--surface-1);
}
.stat .k { font-size: 11.5px; color: var(--text-2); }
.stat .v { margin-top: 6px; font-family: var(--mono); font-size: 24px; font-weight: 700; }
.stat .v.warn { color: var(--warn); }
.stat .v.danger { color: var(--danger); }

.avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  font-weight: 700;
  color: var(--text-2);
  flex: none;
}

.table { border: 1px solid var(--line-soft); border-radius: var(--r-card); overflow: hidden; }
.table .th, .table .tr {
  display: grid;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
}
.table .th {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface-2);
}
.table .tr { background: var(--surface-1); border-top: 1px solid var(--line-soft); font-size: 13px; }
.table .tr:hover { background: var(--surface-2); }

.logline {
  display: flex;
  gap: 14px;
  padding: 9px 12px;
  border-radius: var(--r-row);
  background: var(--surface-1);
  font-size: 12.5px;
  margin-bottom: 2px;
}
.logline time { font-family: var(--mono); color: var(--text-3); flex: none; }
.logline .what { color: var(--text-2); }

/* ---------- states ---------- */

.center-page {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}
.center-page p { max-width: 42ch; margin: 12px 0 0; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.center-page .btn { margin-top: 22px; }

.empty {
  padding: 44px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--r-card);
  text-align: center;
  color: var(--text-2);
}
.empty strong { display: block; margin-bottom: 6px; color: var(--text); font-size: 15px; }

.skel { border-radius: var(--r-row); background: var(--surface-2); animation: tdSkel 1.4s ease-in-out infinite; }
.skel.cover { aspect-ratio: 1; border-radius: var(--r-card); }
.skel.line { height: 11px; margin-top: 10px; }

.formerror {
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 111, 97, .3);
  border-radius: var(--r-ctl);
  background: rgba(255, 111, 97, .09);
  color: var(--danger);
  font-size: 13px;
}
.formnote {
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid var(--accent-soft);
  border-radius: var(--r-ctl);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
}

#toasts {
  position: fixed;
  left: 50%;
  bottom: 120px;
  z-index: 90;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 11px 19px;
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-1);
  animation: tdPop .28s both;
}
.toast.bad { background: var(--danger); color: #2a0d0a; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 24px; }
  .droplayout, .videolayout, .createlayout, .sidelayout { grid-template-columns: 1fr; gap: 26px; }
  .sidenav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .sidenav .grouplabel { display: none; }
  .sidenav button, .sidenav a { white-space: nowrap; }
  .table .th { display: none; }
  .table .tr { grid-template-columns: 1fr !important; gap: 6px; }
}

@media (max-width: 640px) {
  .wrap { padding: 16px 16px 0; }
  header { padding: 12px 16px; gap: 10px; }
  header .rolechip, .navlink.secondary { display: none; }
  h1 { font-size: 24px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 20px 14px; }
  .track { grid-template-columns: 26px minmax(0, 1fr) 46px; }
  .track .t-kind, .track .t-menu { display: none; }
  .player-time, .player-art { display: none; }
  #player { bottom: 12px; width: calc(100% - 20px); }
  body { padding-bottom: 116px; }
}
