/* Drill Archive — "night estate archive"
   Concrete black, sodium-streetlight orange, condensed industrial display type,
   and archive catalogue numbers in mono. */

:root {
  --bg: #0b0b0c;
  --bg-raise: #111113;
  --surface: #151517;
  --surface-2: #1c1c1f;
  --surface-3: #242428;
  --line: #2a2a2f;
  --text: #ecebe7;
  /* Contrast (WCAG AAA = 7:1 for body text) is checked against --surface-3, the lightest
     surface text sits on. --faint is for borders/dividers only (3:1), never text. */
  --muted: #b2b0aa;       /* 7.1:1 on surface-3, 9.1:1 on bg */
  --faint: #6a6965;
  --accent: #ff7433;      /* fills; --accent-ink on it is 7.4:1 */
  --accent-hi: #ff8a50;
  --accent-text: #ff9555; /* orange as text: 7.1:1 on surface-3 */
  --accent-ink: #120700;
  --good: #7bd88f;
  --bad: #ff8f8f;         /* 7.05:1 on surface-3 */
  --warn: #ffc53d;

  --f-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --f-body: "Archivo", ui-sans-serif, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;

  --sidebar-w: 264px;
  --player-h: 88px;
  --radius: 6px;
  --gutter: clamp(16px, 3vw, 32px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--surface-3) transparent; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 .75em; }

.mono { font-family: var(--f-mono); font-size: .78em; letter-spacing: .04em; }
.display { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; line-height: .92; }
.accent { color: var(--accent-text); }
.muted { color: var(--muted); }
.error { color: var(--bad); font-size: .9em; }
.eyebrow { color: var(--muted); letter-spacing: .18em; margin-bottom: 10px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; }
.skip:focus { left: 8px; }

.icon { width: 20px; height: 20px; flex: none; }
.icon--xl { width: 36px; height: 36px; }

/* film grain over everything, very subtle */
.grain {
  position: fixed; inset: -50%; z-index: -1; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- shell */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100dvh;
  padding-bottom: var(--player-h);
}
.sidebar {
  position: sticky; top: 0; height: calc(100dvh - var(--player-h));
  display: flex; flex-direction: column; gap: 18px;
  padding: 20px 14px 14px;
  background: var(--bg-raise);
  border-right: 1px solid var(--line);
  overflow: hidden;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.brand__mark {
  display: grid; place-items: center; width: 44px; height: 44px;
  background: var(--accent); color: var(--accent-ink);
  font: 900 22px/1 var(--f-display); letter-spacing: -.02em;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
}
.brand__word { font: 800 21px/.85 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }

.nav { display: flex; flex-direction: column; gap: 16px; min-height: 0; flex: 1; }
.nav__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav__list--foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.nav__link {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 10px; border-radius: var(--radius);
  color: var(--muted); font-weight: 600; font-size: 14.5px;
  transition: color .15s, background .15s;
}
.nav__link:hover { color: var(--text); background: var(--surface); }
.nav__link.is-active { color: var(--text); }
.nav__link.is-active .icon { color: var(--accent); }
.nav__section { display: flex; flex-direction: column; min-height: 0; flex: 1; background: var(--surface); border-radius: 10px; padding: 6px; }
.nav__heading { display: flex; align-items: center; justify-content: space-between; }
.nav__heading .nav__link { flex: 1; }
.nav__playlists { list-style: none; margin: 4px 0 0; padding: 0; overflow-y: auto; display: grid; gap: 2px; align-content: start; }
.nav__cta { padding: 12px 10px; color: var(--muted); font-size: 13.5px; }
.shelf { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--radius); }
.shelf:hover, .shelf.is-active { background: var(--surface-2); }
.shelf b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.shelf small { color: var(--muted); font-size: 12px; }
.shelf__art { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 4px; background: var(--surface-3); color: var(--muted); }
.shelf__art--liked { background: linear-gradient(135deg, var(--accent), #7a1f00); color: #fff; }
.shelf__art--liked .icon { width: 16px; height: 16px; }
.badge {
  margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font: 700 11px/18px var(--f-mono); text-align: center;
}

.stage { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.topbar__user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search { position: relative; flex: 1; max-width: 440px; }
.search .icon { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--muted); width: 18px; }
.search input {
  width: 100%; height: 42px; padding: 0 16px 0 42px;
  background: var(--surface-2); border: 1px solid transparent; border-radius: 999px;
  transition: border-color .15s, background .15s;
}
.search input:hover { background: var(--surface-3); }
.search input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.search--big { max-width: 640px; margin-top: 8px; }
.search--big input { height: 56px; font-size: 18px; padding-left: 20px; }

main { flex: 1; padding: 8px var(--gutter) 40px; outline: none; animation: page-in .35s var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }

.colophon { display: flex; justify-content: space-between; gap: 12px; margin-top: 64px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 22px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: 14px; letter-spacing: .01em; white-space: nowrap;
  transition: transform .12s var(--ease), background .15s;
}
.btn:hover { background: var(--accent-hi); color: var(--accent-ink); transform: scale(1.03); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn--small { height: 34px; padding: 0 16px; font-size: 13px; }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--faint); }
.btn--ghost:hover { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.btn--danger { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 60%, transparent); }
.btn--danger:hover { background: var(--bad); color: var(--accent-ink); }
.btn .icon { width: 17px; height: 17px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  color: var(--muted); transition: color .15s, background .15s, transform .12s;
  list-style: none;
}
.icon-btn::-webkit-details-marker { display: none; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn--sm { width: 30px; height: 30px; }
.icon-btn--sm .icon { width: 17px; height: 17px; }

.play-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  transition: transform .15s var(--ease), background .15s;
  box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.play-btn:hover { transform: scale(1.06); background: var(--accent-hi); }
.play-btn .icon { width: 20px; height: 20px; }
.play-btn .icon--play { translate: 1px 0; }
.play-btn .icon--pause, .is-playing .play-btn .icon--play, .play-btn.is-playing .icon--play { display: none; }
.is-playing .play-btn .icon--pause, .play-btn.is-playing .icon--pause { display: block; }
.play-btn--lg { width: 58px; height: 58px; }
.play-btn--lg .icon { width: 24px; height: 24px; }
.play-btn--sm { width: 36px; height: 36px; }
.play-btn--sm .icon { width: 16px; height: 16px; }

.like .icon--on { display: none; }
.like.is-liked { color: var(--accent); }
.like.is-liked .icon--on { display: block; }
.like.is-liked .icon--off { display: none; }
.like:active { transform: scale(.85); }
.follow.is-following { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent-text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: 999px;
  background: var(--surface-2); font-size: 13px; font-weight: 600;
  transition: background .15s;
}
.chip:hover { background: var(--surface-3); }
.chip.is-active { background: var(--text); color: var(--bg); }
.chip--warn { box-shadow: inset 0 0 0 1px var(--warn); color: var(--warn); }
.chip .badge { margin-left: 2px; }

/* ---------------------------------------------------------------- menus */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu__panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 50;
  min-width: 220px; max-height: 60vh; overflow-y: auto;
  display: grid; padding: 6px;
  background: var(--surface-3); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 18px 40px -12px #000c;
  animation: pop .14s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.menu__panel > a, .menu__panel > button, .menu__panel > form > button, .menu__sub > button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 4px; font-size: 14px;
}
.menu__panel > a:hover, .menu__panel > button:hover, .menu__panel > form > button:hover, .menu__sub > button:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.menu__sub { display: grid; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.menu__label { display: block; padding: 8px 12px 4px; color: var(--muted); }
.menu__new { display: flex; gap: 4px; padding: 6px 6px 2px; }
.menu__new input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); }
.avatar-btn {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-3); font: 800 17px/1 var(--f-display);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--line);
}

/* ---------------------------------------------------------------- page sections */
.page-head { padding: 28px 0 24px; }
.page-head__title { font-size: clamp(44px, 7vw, 92px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title { font: 700 22px/1.1 var(--f-body); letter-spacing: -.01em; margin-bottom: 14px; }
.section-head .section-title { margin: 0; }
.more-link { color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.more-link:hover { text-decoration: underline; }
.shelf-row { margin-bottom: 40px; }
.empty { color: var(--muted); padding: 24px 0; list-style: none; }
.empty a { color: var(--accent-text); }
.about p { max-width: 70ch; color: var(--muted); }

.flash { display: grid; gap: 8px; padding-top: 16px; }
.flash__item { margin: 0; padding: 12px 16px; border-radius: var(--radius); background: var(--surface-2); border-left: 3px solid var(--accent); }
.flash__item--error { border-color: var(--bad); }
.notice { padding: 12px 16px; border-radius: var(--radius); background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); }

/* horizontal rails of cards */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 196px); gap: 18px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  padding: 2px 2px 14px; margin: 0 -2px; scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; }
.rail--people { grid-auto-columns: minmax(130px, 164px); }

.card { position: relative; padding: 10px; margin: -10px; border-radius: 10px; transition: background .2s; }
.card:hover { background: var(--surface); }
.card__art { position: relative; aspect-ratio: 1; border-radius: 4px; overflow: hidden; background: var(--surface-2); box-shadow: 0 12px 28px -14px #000; }
.card__art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__art img { transform: scale(1.04); }
.card__play { position: absolute; right: 10px; bottom: 10px; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .25s var(--ease); }
.card:hover .card__play, .card.is-current .card__play, .card__play:focus-visible { opacity: 1; transform: none; }
.card__title { display: block; margin-top: 10px; font-weight: 700; font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card.is-current .card__title { color: var(--accent-text); }
.card__sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.person { display: grid; justify-items: center; gap: 4px; padding: 10px; margin: -10px; border-radius: 10px; text-align: center; transition: background .2s; }
.person:hover { background: var(--surface); }
.person__img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; background: var(--surface-2); margin-bottom: 8px; filter: grayscale(.35) contrast(1.05); transition: filter .3s; box-shadow: 0 12px 28px -14px #000; }
.person:hover .person__img { filter: none; }
.person--group .person__img { border-radius: 6px; }
.person__name { font-weight: 700; font-size: 14.5px; }
.person__sub { color: var(--muted); }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 28px 20px; }

.quickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.quick { display: flex; align-items: center; gap: 12px; padding-right: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; transition: background .15s; }
.quick:hover { background: var(--surface-3); }
.quick img { width: 64px; height: 64px; object-fit: cover; }
.quick a { flex: 1; font-weight: 700; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.quick .play-btn { opacity: 0; transition: opacity .15s; }
.quick:hover .play-btn, .quick.is-current .play-btn { opacity: 1; }
.quick.is-current a { color: var(--accent-text); }

.callout {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding: 32px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--line);
  background-image: repeating-linear-gradient(-45deg, transparent 0 14px, #ffffff04 14px 28px);
}
.callout .display { font-size: clamp(30px, 4vw, 46px); margin-bottom: 8px; }
.callout p { color: var(--muted); margin: 0; }
.callout__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- track list */
.tracklist { list-style: none; margin: 0; padding: 0; }
.track {
  display: grid; align-items: center; gap: 14px;
  grid-template-columns: 36px 44px minmax(0, 1fr) auto auto 44px auto auto;
  padding: 6px 10px; border-radius: 5px;
  transition: background .12s;
}
.track:hover { background: var(--surface); }
.track.is-current { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.track__play { position: relative; display: grid; place-items: center; width: 36px; height: 36px; color: var(--muted); }
.track__play .icon, .track__play .eq { display: none; }
.track:hover .track__n, .track.is-playing .track__n { display: none; }
.track:hover .track__play .icon { display: block; color: var(--text); }
.track.is-playing:not(:hover) .eq { display: flex; }
.track.is-current .track__n { color: var(--accent-text); }
.track__cover { width: 44px; height: 44px; object-fit: cover; border-radius: 3px; background: var(--surface-2); }
.track__meta { min-width: 0; }
.track__title { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track.is-current .track__title { color: var(--accent-text); }
.track__title:hover { text-decoration: underline; }
.track__artists { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track__artists a:hover { text-decoration: underline; color: var(--text); }
.track__plays, .track__dur { color: var(--muted); }
.track__plays { min-width: 44px; text-align: right; color: var(--muted); }
.track__dur { text-align: right; }
.track .like, .track .menu--track > summary { opacity: 0; }
.track:hover .like, .track .like.is-liked, .track:hover .menu--track > summary, .track .menu--track[open] > summary, .track :focus-visible { opacity: 1; }
.track-remove { color: var(--muted); }
.track.is-pending .track__title::after { content: " · pending"; color: var(--warn); font-weight: 500; }
.loadmore { padding: 20px; text-align: center; color: var(--muted); list-style: none; }

.eq { gap: 2px; align-items: flex-end; height: 14px; }
.eq i { width: 3px; background: var(--accent); animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; }
.eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }

/* ---------------------------------------------------------------- release (song page) */
.release__head { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 36px; align-items: end; padding: 32px 0; }
.release__art { position: relative; }
.release__art img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; box-shadow: 0 30px 60px -20px #000, 0 0 0 1px #ffffff0d; }
.release__title { font-size: clamp(38px, 6vw, 84px); overflow-wrap: anywhere; }
.release__artists { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 18px 0 8px; }
.byline { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.byline img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.byline:hover { text-decoration: underline; }
.release__stats { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); }
.release__stats span + span::before { content: "/"; margin-right: 18px; }
.release__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.release__actions .like { width: 44px; height: 44px; }
.release__actions .like .icon { width: 26px; height: 26px; }
.release__source { margin-top: 18px; color: var(--muted); font-size: 13px; }
.release__source a { color: var(--text); text-decoration: underline; text-decoration-color: var(--faint); }
.video { aspect-ratio: 16 / 9; max-width: 880px; border-radius: 6px; overflow: hidden; background: #000; }
.video iframe { width: 100%; height: 100%; border: 0; }

/* ---------------------------------------------------------------- profile (artist / group) */
.profile {
  position: relative; display: flex; align-items: end; gap: 28px;
  margin: 0 calc(var(--gutter) * -1); padding: 64px var(--gutter) 28px;
  overflow: hidden; isolation: isolate;
}
.profile__bg { position: absolute; inset: 0; z-index: -1; background: var(--bg) var(--bg) center / cover; filter: blur(50px) saturate(1.2) brightness(.45); transform: scale(1.3); }
.profile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 20%, var(--bg)); }
.profile__img { width: clamp(140px, 18vw, 220px); aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 24px 60px -16px #000; }
.profile--group .profile__img { border-radius: 8px; }
.profile__name { font-size: clamp(48px, 9vw, 120px); overflow-wrap: anywhere; }
.profile__stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0; color: var(--muted); }
.profile__stats span + span::before { content: "/"; margin-right: 18px; }
.profile__info .chip { margin-right: 6px; }
.actions-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 22px 0 28px; }

.collection-head { display: flex; align-items: end; gap: 28px; padding: 32px 0 8px; }
.collection-head__art { display: grid; place-items: center; width: clamp(140px, 16vw, 200px); aspect-ratio: 1; border-radius: 4px; background: var(--surface-3); overflow: hidden; flex: none; box-shadow: 0 24px 50px -18px #000; }
.collection-head__art > .icon { width: 64px; height: 64px; }
.collection-head--liked .collection-head__art { background: linear-gradient(135deg, var(--accent), #5c1700); }
.collection-head__art--mosaic { grid-template-columns: 1fr 1fr; place-items: stretch; }
.collection-head__art--mosaic img { width: 100%; height: 100%; object-fit: cover; }
.collection-head__art--mosaic img:only-child { grid-column: span 2; grid-row: span 2; }
.collection-head__art--mosaic .mono { grid-column: span 2; place-self: center; font-size: 42px; color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: end; gap: 6px; aspect-ratio: 1; padding: 16px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .2s var(--ease), background .2s; }
.tile:hover { transform: translateY(-3px); background: var(--surface-2); }
.tile .display { font-size: 28px; }
.tile .mono { color: var(--muted); }
.tile__mark { position: absolute; top: 12px; right: 14px; font-size: 48px !important; color: var(--surface-3) !important; font-weight: 500; }
.tile--liked { background: linear-gradient(135deg, #8f2b06 0%, #3d0f00 100%); border: 0; }
.tile--liked .mono, .tile--liked .display { color: #fff; }

.alpha { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 18px; font-family: var(--f-mono); font-size: 13px; }
.alpha a { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 4px; color: var(--muted); }
.alpha a:hover { background: var(--surface-2); color: var(--text); }
.alpha a.is-active { background: var(--accent); color: var(--accent-ink); }
.filter input { margin-top: 16px; width: min(360px, 100%); height: 40px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.filter input:focus { outline: none; border-color: var(--accent); }
.pager { display: flex; justify-content: center; gap: 24px; margin-top: 36px; color: var(--muted); }
.pager a { color: var(--text); }

/* ---------------------------------------------------------------- forms */
.form { display: grid; gap: 18px; max-width: 760px; }
.form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px 22px; }
.field { display: grid; gap: 6px; align-content: start; }
.field--wide { grid-column: 1 / -1; }
.field > label { font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.field small, .form small { color: var(--muted); font-size: 12.5px; }
.form input[type=text], .form input[type=email], .form input[type=password], .form input[type=url],
.form input[type=search], .form input[type=number], .form textarea, .form select, .form input:not([type]) {
  width: 100%; min-height: 44px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s;
}
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--accent); }
.form input[type=file] { font-size: 13px; color: var(--muted); }
.form ul.errorlist, .form__errors ul { list-style: none; margin: 0; padding: 0; color: var(--bad); font-size: 13px; }
.form__foot { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }

.dropzone {
  position: relative; display: grid; justify-items: center; gap: 8px; padding: 44px 20px; text-align: center;
  border: 2px dashed var(--line); border-radius: 10px; background: var(--surface); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.dropzone.has-file { border-style: solid; border-color: var(--accent); }
.dropzone.has-file .icon { color: var(--accent); }
.dropzone.has-error { border-color: var(--bad); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone small { color: var(--muted); }
.upload-progress { flex: 1; height: 6px; appearance: none; border: 0; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.upload-progress::-webkit-progress-bar { background: var(--surface-3); }
.upload-progress::-webkit-progress-value { background: var(--accent); }
.upload-progress::-moz-progress-bar { background: var(--accent); }

.picked { display: flex; flex-wrap: wrap; gap: 6px; }
.picked:empty { display: none; }
.pick { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 6px 0 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px; }
.pick button { width: 20px; height: 20px; border-radius: 50%; font-size: 16px; line-height: 1; }
.pick button:hover { background: #0002; }
.lookup { position: relative; }
.lookup__results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; display: grid; background: var(--surface-3); border-radius: 8px; box-shadow: 0 18px 40px -12px #000c; overflow: hidden; }
.lookup__results:empty { display: none; }
.lookup__opt { display: flex; align-items: center; gap: 10px; padding: 8px 12px; text-align: left; font-weight: 600; }
.lookup__opt:hover, .lookup__opt:focus { background: color-mix(in srgb, var(--text) 8%, transparent); outline: none; }
.lookup__opt img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.lookup__none { margin: 0; padding: 10px 12px; color: var(--muted); font-size: 13px; }

.auth { max-width: 440px; margin: 48px auto; }
.auth__title { font-size: 64px; margin-bottom: 24px; }
.auth__alt { margin-top: 24px; color: var(--muted); }
.auth__alt a, .auth .form__foot a { color: var(--text); text-decoration: underline; text-decoration-color: var(--faint); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td small { display: block; color: var(--muted); margin-top: 4px; }
.table a:hover { text-decoration: underline; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font: 500 11px/20px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }
.status--pending { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.status--approved { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.status--rejected { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }

/* ---------------------------------------------------------------- moderation */
.modlist { display: grid; gap: 14px; }
.modcard { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 20px; padding: 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.modcard--approved { border-color: color-mix(in srgb, var(--good) 50%, var(--line)); }
.modcard--rejected { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); }
.modcard__art { width: 120px; height: 120px; object-fit: cover; border-radius: 4px; }
.modcard__art--round { border-radius: 50%; }
.modcard__title { font-size: 20px; margin-bottom: 8px; }
.modcard__artists { display: flex; flex-wrap: wrap; gap: 6px; }
.modcard__preview { width: 100%; max-width: 480px; height: 36px; margin-top: 8px; }
.modcard__actions { display: grid; gap: 8px; align-content: start; justify-items: stretch; min-width: 200px; }
.modcard__actions .reject { display: grid; gap: 6px; }
.modcard__actions input { height: 34px; padding: 0 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); font-size: 13px; }
.modcard .form--inline { gap: 10px; }
.modcard .form--inline div { display: grid; gap: 4px; }
.modcard .form--inline label { font-size: 12px; font-weight: 700; }

/* ---------------------------------------------------------------- player */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: var(--player-h);
  display: grid; grid-template-columns: minmax(180px, 1fr) minmax(300px, 640px) minmax(180px, 1fr); align-items: center; gap: 16px;
  padding: 0 16px;
  background: #060607; border-top: 1px solid var(--line);
}
.player__now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player__cover { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; background: var(--surface-2); }
.player__meta { min-width: 0; }
.player__title { display: block; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__title:hover, .player__artists a:hover { text-decoration: underline; }
.player__artists { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player.is-empty .player__title { pointer-events: none; color: var(--muted); }
.player__like { flex: none; }
.player__like.is-liked { color: var(--accent-text); }
.player__center { display: grid; gap: 6px; }
.player__controls { display: flex; justify-content: center; align-items: center; gap: 14px; }
.player__controls .play-btn { width: 38px; height: 38px; background: var(--text); color: var(--bg); box-shadow: none; }
.player__controls .play-btn .icon { width: 18px; height: 18px; }
.player .play-btn .icon--pause { display: none; }
.player.is-playing .play-btn .icon--pause { display: block; }
.player.is-playing .play-btn .icon--play { display: none; }
.player [aria-pressed="true"], .player [data-mode="all"], .player [data-mode="one"] { color: var(--accent); position: relative; }
.player [aria-pressed="true"]::after, .player [data-mode="all"]::after, .player [data-mode="one"]::after { content: ""; position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.repeat-one { display: none; position: absolute; top: 5px; right: 5px; font: 700 9px var(--f-mono); }
[data-mode="one"] .repeat-one { display: block; }
[data-action="repeat"] { position: relative; }
.player__scrub { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 10px; color: var(--muted); }
.player__scrub span:last-child { text-align: left; }
.player__scrub span:first-child { text-align: right; }
.player__side { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.player__progress-mini { display: none; }
.player.is-empty .player__center, .player.is-empty .player__side > :not([data-action=queue]) { opacity: .4; pointer-events: none; }

.range { --p: 0%; appearance: none; width: 100%; height: 14px; background: transparent; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--text) var(--p), var(--surface-3) var(--p)); }
.range::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--text) var(--p), var(--surface-3) var(--p)); }
.range::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .15s; }
.range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; opacity: 0; }
.range:hover::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--accent) var(--p), var(--surface-3) var(--p)); }
.range:hover::-moz-range-track { background: linear-gradient(90deg, var(--accent) var(--p), var(--surface-3) var(--p)); }
.range:hover::-webkit-slider-thumb, .range:focus-visible::-webkit-slider-thumb { opacity: 1; }
.range:hover::-moz-range-thumb { opacity: 1; }
.range--volume { width: 110px; }

.queue {
  position: fixed; right: 12px; bottom: calc(var(--player-h) + 12px); z-index: 45;
  width: min(380px, calc(100vw - 24px)); max-height: min(560px, 70vh);
  display: flex; flex-direction: column;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 24px 60px -12px #000d;
  animation: pop .16s var(--ease);
}
.queue__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
.queue__head .display { font-size: 28px; }
.queue__list { list-style: none; margin: 0; padding: 0 8px 8px; overflow-y: auto; }
.queue__item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 5px; cursor: pointer; }
.queue__item:hover { background: var(--surface-3); }
.queue__item img { width: 36px; height: 36px; object-fit: cover; border-radius: 3px; }
.queue__item span { min-width: 0; }
.queue__item b, .queue__item small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue__item b { font-size: 13.5px; font-weight: 600; }
.queue__item small { color: var(--muted); font-size: 12px; }
.queue__item.is-current b { color: var(--accent-text); }
.queue__item.is-past b { color: var(--muted); }

.toasts { position: fixed; left: 50%; bottom: calc(var(--player-h) + 20px); translate: -50% 0; z-index: 95; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { padding: 10px 18px; border-radius: 6px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: 0 12px 30px -8px #000; animation: pop .2s var(--ease); transition: opacity .3s, transform .3s; }
.toast.is-leaving { opacity: 0; transform: translateY(6px); }

.tabbar { display: none; }

/* ---------------------------------------------------------------- share, consent, prose */
.menu--share > summary { list-style: none; }
.menu--share .menu__panel { left: 0; right: auto; }
.menu--up .menu__panel { top: auto; bottom: calc(100% + 10px); }
.player__share { flex: none; }
.consent {
  position: fixed; left: 16px; bottom: calc(var(--player-h) + 16px); z-index: 60;
  width: min(440px, calc(100vw - 32px)); padding: 16px 18px;
  background: var(--surface-3); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 24px 60px -12px #000d; animation: pop .2s var(--ease);
}
.consent p { margin: 0 0 12px; font-size: 14px; }
.consent a { text-decoration: underline; }
.consent__actions { display: flex; justify-content: flex-end; gap: 8px; }
.notice form { margin-top: 10px; }
.notice p { margin: 0; }
.prose { max-width: 70ch; }
.prose a, .colophon a, .form--dmca a { text-decoration: underline; }
.colophon__links { display: flex; gap: 18px; }
.colophon__links a { color: var(--muted); font-size: 13px; }
.colophon__links a:hover { color: var(--text); }
.form--dmca { margin-top: 28px; }
.radios { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.radios legend { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.modcard__num { font-size: 28px !important; color: var(--muted); text-align: center; align-self: start; }
.modcard__songs { margin: 8px 0; padding-left: 18px; }
.modcard__songs li { margin: 4px 0; }
.modcard--actioned { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); }
.prose p { color: var(--muted); }
.prose .section-title { margin-top: 28px; }

/* WCAG 2.5.5 (AAA): 44px touch targets on coarse pointers */
@media (pointer: coarse) {
  .icon-btn, .play-btn--sm { width: 44px; height: 44px; }
  .btn, .btn--small, .chip { min-height: 44px; }
  .alpha a { min-width: 44px; height: 44px; }
  .menu__panel > a, .menu__panel > button, .menu__sub > button { min-height: 44px; display: flex; align-items: center; }
  .nav__link, .shelf { min-height: 44px; }
  .pick button { width: 32px; height: 32px; }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  :root { --sidebar-w: 220px; }
}

@media (max-width: 820px) {
  :root { --player-h: 64px; --tabbar-h: 60px; }
  .shell { grid-template-columns: 1fr; padding-bottom: calc(var(--player-h) + var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .hide-sm { display: none !important; }
  .topbar { padding: 10px 14px; }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
    display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: #060607f2; backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  }
  .tabbar a { display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--muted); }

  .player {
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); left: 8px; right: 8px; border-radius: 8px;
    grid-template-columns: minmax(0, 1fr) auto; height: 58px; padding: 0 6px 0 8px;
    background: var(--surface-3); border: 0;
  }
  .player__cover { width: 42px; height: 42px; }
  .player__center { display: contents; }
  .player__controls > :not([data-action=toggle]) { display: none; }
  .player__controls { grid-column: 2; }
  .player__scrub, .player__side > :not([data-action=queue]) { display: none; }
  .player__side { display: none; }
  .player.is-empty { display: none; }
  .player__progress-mini { display: block; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; background: #ffffff1a; }
  .player__progress-mini span { display: block; height: 100%; width: 0; background: var(--text); }
  .queue { bottom: calc(var(--player-h) + var(--tabbar-h) + 16px); }
  .consent { left: 8px; bottom: calc(var(--player-h) + var(--tabbar-h) + 16px); width: calc(100vw - 16px); }
  .toasts { bottom: calc(var(--player-h) + var(--tabbar-h) + 20px); }

  .track { grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 12px; padding: 6px 4px; }
  .track__play { display: none; }
  .track__cover { grid-column: 1; }
  .track__dur { display: none; }
  .track .like, .track .menu--track > summary { opacity: 1; }
  .track .like:not(.is-liked) { display: none; }
  .track__cover { cursor: pointer; }

  .release__head { grid-template-columns: 1fr; gap: 20px; padding-top: 16px; }
  .release__art { max-width: 280px; margin: 0 auto; }
  .profile { flex-direction: column; align-items: flex-start; padding-top: 40px; }
  .collection-head { flex-direction: column; align-items: flex-start; }
  .modcard { grid-template-columns: 72px 1fr; }
  .modcard__art { width: 72px; height: 72px; }
  .modcard__actions { grid-column: 1 / -1; }
  .people-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 20px 12px; }
  .colophon { flex-direction: column; }
}

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