:root {
  color-scheme: dark;
  --bg: #121212;
  --sidebar: #090909;
  --surface: #1b1b1b;
  --surface2: #252525;
  --text: #f5f5f5;
  --muted: #b3b3b3;
  --line: #343434;
  --accent: #1ed760;
  --accentText: #07190e;
  --accentInk: #1ed760;
  --dataFill: var(--accent);
  --action: var(--accent);
  --actionText: var(--accentText);
  --secondary: #8ab4f8;
  --shadow: 0 14px 38px #00000012;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-synthesis: none;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f5;
  --sidebar: #fff;
  --surface: #fff;
  --surface2: #eeeeee;
  --text: #171717;
  --muted: #606060;
  --line: #d8d8d8;
  --accent: #1ed760;
  --accentText: #07190e;
  --accentInk: #087c32;
  --dataFill: #087c32;
  --secondary: #315da8;
  --shadow: 0 12px 30px #00000008;
}
:root[data-provider="youtube-music"] {
  --accent: #ff0000;
  --accentInk: #ff5555;
  --dataFill: var(--accentInk);
  --accentText: #171717;
  --action: #d90000;
  --actionText: #fff;
  --secondary: #a8c7fa;
}
:root[data-provider="youtube-music"][data-theme="light"] {
  --accentInk: #b80000;
  --secondary: #315da8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}
button,
input,
select {
  font: inherit;
}
button {
  color: inherit;
  border: 0;
  cursor: pointer;
  background: transparent;
}
a {
  color: var(--accentInk);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button,
a,
input,
select,
summary {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accentInk);
  outline-offset: 4px;
}
button,
input,
select,
a {
  transition:
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}
aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 34px 22px;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 37px;
  line-height: 1;
  letter-spacing: -1px;
}
.brand span {
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.4px;
}
.brand b {
  color: var(--accentInk);
}
.brand:hover {
  text-decoration: none;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 700;
  color: var(--muted);
}
aside > .eyebrow {
  margin: 46px 12px 17px;
}
nav {
  display: grid;
  gap: 7px;
}
nav button {
  text-align: left;
  color: var(--muted);
  padding: 13px 15px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  min-height: 46px;
}
nav button:hover {
  background: var(--surface2);
  color: var(--text);
}
nav button.active {
  color: var(--accentInk);
  background: var(--surface2);
  box-shadow: inset 3px 0 var(--accent);
}
.aside-bottom {
  margin-top: auto;
  padding: 30px 11px 18px;
  font-size: 11px;
  color: var(--muted);
}
.aside-bottom p {
  margin: 8px 0;
}
.aside-bottom button {
  padding: 7px 0;
  text-decoration: underline;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 5px;
}
.theme-toggle {
  color: var(--muted);
  text-align: left;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 12px;
}
.theme-toggle:hover {
  background: var(--surface2);
}
main {
  margin-left: 232px;
  padding: 40px 42px;
  max-width: 1720px;
}
header {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 35px;
}
header > div:first-child {
  margin-right: auto;
}
h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(29px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -1.9px;
  margin: 12px 0;
}
h1 em {
  font-style: normal;
  color: var(--accentInk);
}
header p {
  color: var(--muted);
  font-size: 13px;
  margin: 10px 0 0;
}
h2 {
  font-size: 32px;
  letter-spacing: -1px;
}
h3 {
  font-size: 17px;
  letter-spacing: -0.3px;
  margin: 0;
}
h4 {
  font-size: 15px;
}
.import-button,
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 9px;
  background: var(--action);
  color: var(--actionText);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  min-height: 44px;
}
.import-button:hover,
.primary:hover {
  filter: brightness(1.08);
}
.spotify-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--accentInk);
}
.spotify-controls button {
  border: 1px solid var(--line);
  padding: 11px 13px;
  border-radius: 9px;
  min-height: 44px;
  color: var(--text);
  background: var(--surface);
}
.spotify-controls button:hover {
  border-color: var(--accentInk);
}
.welcome {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  padding: 55px;
  border: 1px solid var(--line);
  background: linear-gradient(130deg, var(--surface2), var(--surface));
  border-radius: 22px;
  min-height: 430px;
}
.welcome h2 {
  font-size: 48px;
  line-height: 1.12;
  letter-spacing: -2px;
  margin: 20px 0;
}
.welcome p {
  color: var(--muted);
  max-width: 430px;
  font-size: 14px;
  line-height: 1.8;
}
.welcome small {
  display: block;
  max-width: 430px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}
.record {
  width: 270px;
  height: 270px;
  border-radius: 50%;
  flex-shrink: 0;
  background: repeating-radial-gradient(
    circle,
    #191919 0px,
    #191919 3px,
    #363636 4px,
    #101010 5px
  );
  display: grid;
  place-items: center;
  box-shadow: 16px 22px 36px #0004;
  transform: rotate(-14deg);
}
.record div {
  height: 145px;
  width: 145px;
  background: var(--action);
  color: var(--actionText);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.4;
}
.record span {
  font-size: 28px;
}
#status {
  font-size: 12px;
  color: var(--accentInk);
  line-height: 1.8;
  margin: 18px 0;
  border-radius: 10px;
}
#status:not(:empty) {
  padding: 13px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}
#status a {
  font-weight: 700;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: 28px 0 22px;
}
.toolbar > div:first-child {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.6px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.filters label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.3px;
}
.filters select {
  display: block;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 9px 11px;
  border-radius: 8px;
  margin-top: 5px;
  font-size: 12px;
  min-height: 40px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.stat {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 23px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.stat:first-child {
  background: var(--surface2);
}
.stat small {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 600;
}
.stat strong {
  display: block;
  font-size: 31px;
  line-height: 1.3;
  letter-spacing: -1.3px;
  margin: 12px 0 8px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 20px 0;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 24px;
  margin: 20px 0;
  box-shadow: var(--shadow);
}
.grid > .panel {
  margin: 0;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 15px;
}
.panel-head button,
.pill {
  font-size: 11px;
  color: var(--accentInk);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px 12px;
  white-space: nowrap;
}
.panel-head button:hover {
  background: var(--surface2);
}
.muted {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin: 8px 0 14px;
}
.panel-head .muted {
  margin: 6px 0 0;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 12px 3px;
  width: 100%;
  min-height: 70px;
  border-radius: 6px;
}
.row:last-child {
  border: 0;
}
button.row:hover {
  background: var(--surface2);
  padding-left: 8px;
}
.rank {
  width: 20px;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.avatar {
  height: 43px;
  width: 43px;
  flex-shrink: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--surface2), var(--line));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--accentInk);
  overflow: hidden;
}
.artist-avatar {
  border-radius: 50%;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.row-info {
  flex: 1;
  min-width: 0;
}
.row-info b {
  display: block;
  font-size: 12px;
  overflow-wrap: anywhere;
  font-weight: 600;
}
.row-info small,
.value small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.value {
  white-space: nowrap;
  text-align: right;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.spotify-link {
  font-size: 16px;
  padding: 8px;
  color: var(--muted);
}
.spotify-link:hover {
  color: var(--accentInk);
}
.bar-line {
  margin: 16px 0;
}
.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 7px;
}
.bar {
  height: 8px;
  background: var(--surface2);
  border-radius: 5px;
  overflow: hidden;
}
.bar i {
  display: block;
  background: var(--dataFill);
  height: 100%;
  border-radius: 5px;
  opacity: 0.8;
  transition: width 0.25s ease;
}
.search-head {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin: 20px 0;
}
.search-head label {
  width: 100%;
  font-size: 12px;
  color: var(--muted);
}
.search {
  flex: 1;
  width: 100%;
  padding: 14px 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  font-size: 13px;
  min-width: 170px;
}
.search::placeholder {
  color: var(--muted);
}
.badge {
  font-size: 10px;
  display: inline-flex;
  padding: 6px 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 20px;
  white-space: nowrap;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding-top: 22px;
  font-size: 12px;
  color: var(--muted);
}
.pagination button {
  background: var(--surface2);
  color: var(--text);
  padding: 11px 13px;
  border-radius: 8px;
  min-height: 44px;
}
.artist-hero {
  padding: 26px 30px;
  background: linear-gradient(120deg, var(--surface2), var(--surface));
  border: 1px solid var(--line);
  border-radius: 18px;
  margin: 20px 0;
}
.back {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 23px;
}
.artist-identity {
  display: flex;
  align-items: center;
  gap: 25px;
}
.hero-art {
  height: 112px;
  width: 112px;
  font-size: 44px;
}
.hero-art:hover {
  text-decoration: none;
}
.artist-identity h2 {
  font-size: 42px;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin: 10px 0 12px;
}
.artist-identity p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.artist-tabs {
  display: flex;
  gap: 8px;
  margin: 26px 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.artist-tabs button {
  border-radius: 8px;
  font-size: 12px;
  padding: 11px 17px;
  color: var(--muted);
}
.artist-tabs button.active {
  background: var(--surface2);
  color: var(--accentInk);
}
.track-list {
  max-height: 750px;
  overflow: auto;
  scrollbar-color: var(--line) transparent;
  padding-right: 6px;
}
.playlist-actions {
  border: 1px solid var(--line);
  background: var(--surface2);
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px;
  margin: 20px 0;
}
.playlist-actions h3 {
  margin: 9px 0;
}
.playlist-actions p {
  margin: 5px 0;
}
.playlist-actions > small {
  width: 100%;
  font-size: 10px;
  color: var(--muted);
}
.action-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.action-group button:not(.primary) {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 11px 13px;
  border-radius: 8px;
  font-size: 11px;
  min-height: 44px;
}
.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}
.insight-grid article {
  padding: 20px 23px;
  border-left: 2px solid var(--secondary);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
}
.insight-grid strong {
  display: block;
  font-size: 23px;
  letter-spacing: -0.6px;
  margin: 10px 0 8px;
  color: var(--secondary);
}
.insight-grid p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.heatmap-scroll {
  overflow: auto;
  padding-bottom: 6px;
}
.heatmap {
  display: grid;
  grid-template-columns: 38px repeat(24, minmax(10px, 1fr));
  gap: 4px;
  min-width: 510px;
}
.heat-hour,
.heat-day {
  font-size: 9px;
  color: var(--muted);
  align-self: center;
}
.heat-cell {
  height: 22px;
  background: var(--dataFill);
  opacity: var(--intensity);
  border-radius: 3px;
}
.heat-cell:hover,
.heat-cell:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 1px;
  opacity: 1;
}
.settings-intro {
  margin: 30px 0;
  padding: 30px;
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 15px;
}
.settings-intro h2 {
  margin: 12px 0;
}
.settings-intro p {
  font-size: 13px;
  color: var(--muted);
  max-width: 700px;
  margin: 0;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.setting-row b {
  font-size: 11px;
  white-space: nowrap;
}
.setting-row input {
  accent-color: var(--accentInk);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.settings-intro ~ .grid button {
  border: 1px solid var(--line);
  padding: 11px 13px;
  border-radius: 8px;
  margin: 6px 6px 6px 0;
  background: var(--surface2);
  font-size: 12px;
}
.danger {
  color: #ef9692 !important;
}
.empty {
  text-align: center;
  padding: 32px;
  color: var(--muted);
  font-size: 13px;
}
.empty p {
  font-size: 12px;
}
.empty button {
  background: var(--surface2);
  color: var(--accentInk);
  padding: 11px;
  border-radius: 8px;
}
summary {
  cursor: pointer;
  color: var(--accentInk);
  font-size: 12px;
  padding: 15px 0;
}
footer {
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
  padding-top: 26px;
  margin-top: 25px;
  border-top: 1px solid var(--line);
}
footer a {
  font-size: 10px;
}
#dashboard[aria-busy="true"] #content {
  opacity: 0.5;
  pointer-events: none;
}
#content {
  transition: opacity 0.12s ease;
}
[hidden] {
  display: none !important;
}
.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  background: var(--action);
  color: var(--actionText);
  padding: 12px;
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}
@media (min-width: 1450px) {
  main {
    padding: 45px 60px;
  }
  .stat strong {
    font-size: 36px;
  }
}
@media (max-width: 1100px) {
  aside {
    width: 190px;
    padding: 28px 17px;
  }
  main {
    margin-left: 190px;
    padding: 28px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .welcome {
    padding: 35px;
  }
  .record {
    width: 210px;
    height: 210px;
  }
  .welcome h2 {
    font-size: 38px;
  }
  .toolbar {
    align-items: flex-start;
  }
  .filters {
    justify-content: flex-end;
  }
  .row {
    gap: 9px;
  }
  .panel {
    padding: 20px;
  }
}
@media (max-width: 720px) {
  aside {
    position: sticky;
    top: 0;
    inset: auto;
    width: 100%;
    padding: 14px 16px 8px;
    border-bottom: 1px solid var(--line);
    border-right: 0;
    display: block;
  }
  .brand {
    font-size: 25px;
    gap: 8px;
  }
  .brand span {
    font-size: 12px;
    line-height: 1.2;
  }
  aside > .eyebrow,
  .aside-bottom {
    display: none;
  }
  nav {
    display: flex;
    gap: 5px;
    overflow: auto;
    margin-top: 13px;
    scrollbar-width: none;
  }
  nav button {
    white-space: nowrap;
    padding: 10px 12px;
    font-size: 11px;
    min-height: 39px;
  }
  nav button.active {
    box-shadow: inset 0 -2px var(--accent);
  }
  .theme-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 8px 10px;
    font-size: 10px;
  }
  main {
    margin: 0;
    padding: 24px 16px;
  }
  header {
    margin-bottom: 24px;
    gap: 10px;
  }
  header > div:first-child {
    width: 100%;
  }
  h1 {
    font-size: 32px;
  }
  header p {
    font-size: 12px;
  }
  .import-button {
    padding: 11px 14px;
  }
  .spotify-controls button {
    font-size: 11px;
    padding: 10px 12px;
  }
  .toolbar {
    display: block;
  }
  .toolbar > div:first-child {
    font-size: 20px;
    margin-bottom: 17px;
  }
  .filters {
    justify-content: flex-start;
    gap: 8px;
  }
  .filters select {
    max-width: 140px;
    padding: 8px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
  .stat strong {
    font-size: 27px;
  }
  .stat small {
    font-size: 8px;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .insight-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .insight-grid article {
    padding: 14px 18px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3px;
  }
  .insight-grid article .eyebrow {
    font-size: 8px;
  }
  .insight-grid strong {
    grid-column: 2;
    grid-row: 1/3;
    margin: 0;
    align-self: center;
    font-size: 21px;
  }
  .insight-grid p {
    font-size: 10px;
  }
  .panel {
    padding: 19px;
    margin: 16px 0;
  }
  .artist-hero {
    padding: 20px;
  }
  .artist-identity {
    gap: 16px;
  }
  .hero-art {
    width: 75px;
    height: 75px;
    font-size: 32px;
  }
  .artist-identity h2 {
    font-size: 32px;
  }
  .artist-identity p {
    font-size: 11px;
  }
  .artist-tabs {
    gap: 3px;
  }
  .artist-tabs button {
    padding: 10px 12px;
    font-size: 11px;
  }
  .playlist-actions {
    padding: 20px;
  }
  .action-group {
    width: 100%;
  }
  .action-group .primary {
    width: 100%;
  }
  .playlist-actions h3 {
    font-size: 16px;
  }
  .welcome {
    padding: 28px;
    min-height: 0;
  }
  .welcome h2 {
    font-size: 38px;
  }
  .record {
    display: none;
  }
  .heat-cell {
    height: 19px;
  }
  .row {
    min-height: 67px;
  }
  .row-info b {
    font-size: 12px;
  }
  .avatar {
    width: 38px;
    height: 38px;
  }
  .rank {
    width: 16px;
  }
  .value {
    font-size: 10px;
  }
  .spotify-link {
    padding: 5px;
  }
  .pagination {
    gap: 12px;
  }
  .settings-intro {
    padding: 23px;
  }
  .settings-intro h2 {
    font-size: 25px;
  }
  .badge {
    font-size: 9px;
  }
  .panel-head {
    gap: 8px;
  }
  .panel-head button {
    font-size: 10px;
    padding: 7px 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
