:root {
  --bg: #0a0a0f;
  --text: #eef0f6;
  --muted: #9aa0b4;
  --faint: #6b7086;
  --line: rgba(255, 255, 255, 0.08);
  --card: rgba(255, 255, 255, 0.035);
  --card-brd: rgba(255, 255, 255, 0.09);
  --accent: #7c5cff;
  --accent2: #23d5e0;
  --accent3: #ff4ecd;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
/* Animated aurora background */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg::before, .bg::after {
  content: "";
  position: absolute;
  width: 60vw; height: 60vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.bg::before {
  top: -18vw; left: -12vw;
  background: radial-gradient(circle, var(--accent) 0%, transparent 68%);
  animation: drift1 22s ease-in-out infinite alternate;
}
.bg::after {
  bottom: -22vw; right: -14vw;
  background: radial-gradient(circle, var(--accent2) 0%, transparent 68%);
  animation: drift2 26s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(18vw, 12vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vw, -10vh) scale(1.2); } }

.wrap { max-width: 1000px; margin: 0 auto; padding: 26px 18px 90px; }

/* Navbar */
:root { --nav-h: 64px; }
.navbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 10, 15, 0.72); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1000px; margin: 0 auto; padding: 0 18px; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand .brand-mark { font-size: clamp(19px, 4vw, 23px); }
.brand-mark .tld { font-size: 0.58em; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.tabs { display: flex; gap: 6px; flex: none; }
.tabs button {
  background: transparent; color: var(--muted); border: 1px solid transparent;
  border-radius: 999px; padding: 8px 15px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: color .2s, background .2s, border-color .2s;
}
.tabs button:hover { color: var(--text); }
.tabs button.active {
  color: #fff;
  /* Gradient slides on hover */
  background-image: linear-gradient(to right, var(--accent) 0%, var(--accent3) 51%, var(--accent) 100%);
  background-size: 200% auto;
  box-shadow: 0 2px 12px -4px rgba(0, 0, 0, 0.6);
  transition: background-position 0.5s ease, color 0.2s;
}
.tabs button.active:hover { background-position: right center; color: #fff; }
@media (max-width: 560px) {
  .nav-inner { height: auto; flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; }
  .tabs { justify-content: center; flex-wrap: wrap; }
}

.view-title { font-size: 20px; font-weight: 700; margin: 6px 0 16px; }
.panel { border: 1px solid var(--card-brd); border-radius: 16px; background: var(--card); backdrop-filter: blur(8px); padding: 20px 22px; }

/* "More from me" card + site footer */
.more-card { margin-top: 14px; }
.more-title { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.more-card p { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 0; }
.more-card a, .site-footer a { color: var(--accent2); text-decoration: none; font-weight: 600; }
.more-card a:hover, .site-footer a:hover { text-decoration: underline; }
.site-footer { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 22px; text-align: center; font-size: 13px; color: var(--faint); }

/* Stats tab */
.stats-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card { border: 1px solid var(--card-brd); border-radius: 14px; background: var(--card); backdrop-filter: blur(8px); padding: 15px 17px; }
.stat-num { font-size: 27px; font-weight: 800; letter-spacing: -0.5px; color: var(--text); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.stat-label span { color: var(--faint); }
.stat-fact { border: 1px solid var(--card-brd); border-radius: 14px; background: var(--card); padding: 14px 18px; font-size: 14px; color: var(--muted); margin-bottom: 18px; line-height: 1.5; }
.stat-fact b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.stats-note {
  font-size: 12.5px; color: #f0c86b; line-height: 1.55;
  margin: 0 0 18px; padding: 11px 14px;
  border: 1px solid var(--card-brd);
  border-radius: 10px; background: var(--card);
}
.stats-sub { font-size: 15px; font-weight: 700; margin: 4px 2px 12px; }
.key-rank { display: flex; flex-direction: column; gap: 7px; }
.key-rank-more { margin-top: 7px; }
.key-rank-more[hidden] { display: none; } /* .key-rank's display:flex would otherwise override the native [hidden] behavior */
.key-rank-toggle {
  display: block; margin: 14px auto 0; padding: 9px 18px;
  background: var(--card); color: var(--muted); border: 1px solid var(--card-brd);
  border-radius: 10px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.key-rank-toggle:hover { border-color: var(--accent); color: var(--text); background: rgba(124,92,255,.12); }
.rank-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.rank-no { width: 20px; text-align: right; color: var(--faint); font-variant-numeric: tabular-nums; flex: none; }
.rank-row .key-badge { flex: none; }
.rank-mkey { width: 34px; color: var(--muted); font-size: 12px; flex: none; }
.rank-track { flex: 1; height: 10px; background: rgba(255,255,255,.05); border-radius: 999px; overflow: hidden; }
.rank-bar { height: 100%; background: var(--accent); border-radius: 999px; }
.rank-count { width: 54px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
.rank-pct { width: 48px; text-align: right; color: var(--faint); font-variant-numeric: tabular-nums; flex: none; }
@media (max-width: 480px) {
  .rank-mkey, .rank-pct { display: none; }
}

/* Stats tab: interactive tools (word search, artist key lookup, word frequency) */
.stats-tool { margin-top: 16px; }
.tool-title { font-size: 15px; font-weight: 700; margin: 0 0 10px; }
.tool-sub { font-size: 12.5px; color: var(--muted); margin: -4px 0 12px; line-height: 1.5; }
.tool-input {
  width: 100%; padding: 12px 14px; font-size: 14px;
  border-radius: 10px; border: 1px solid var(--card-brd);
  background: rgba(255,255,255,.03); color: var(--text); outline: none;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.tool-input::placeholder { color: var(--faint); }
.tool-input:focus {
  border-color: transparent; background: rgba(255,255,255,.05);
  box-shadow: 0 0 0 1px var(--accent), 0 0 20px -8px var(--accent);
}
.tool-result { margin-top: 14px; }
.tool-empty { font-size: 13px; color: var(--faint); margin: 0; }
.tool-result-head { font-size: 14px; color: var(--text); margin: 0; }
.tool-subhead { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--faint); font-weight: 700; margin: 12px 0 8px; }
.tool-keys { display: flex; flex-wrap: wrap; gap: 14px; }
.tool-key { display: inline-flex; align-items: center; gap: 7px; }
.tool-key-count { font-size: 12px; color: var(--muted); }
.tool-artist-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.tool-artist-row:last-child { border-bottom: none; }
.tool-artist-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-word-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13.5px; }
.tool-word-no { width: 20px; text-align: right; color: var(--faint); font-variant-numeric: tabular-nums; flex: none; }
.tool-word { flex: 1; font-weight: 600; text-transform: capitalize; }
.tool-word-count { color: var(--muted); font-size: 12px; }

/* Header (brand block) */
header { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.vinyl {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: radial-gradient(circle at center,
    #1c1c26 0 20%, #0b0b10 21% 25%, #191922 26% 39%, #0b0b10 40% 44%,
    #191922 45% 60%, #0b0b10 61% 65%, #191922 66%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.07), 0 10px 26px -10px #000;
  position: relative;
  animation: spin 4.5s linear infinite;
}
.vinyl::after {
  content: ""; position: absolute; inset: 40%; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
}
@keyframes spin { to { transform: rotate(360deg); } }

h1 {
  font-size: clamp(26px, 5vw, 38px); font-weight: 800; margin: 0;
  letter-spacing: -0.5px; line-height: 1;
}
.brand-mark {
  font-weight: 800; letter-spacing: -0.5px; line-height: 1;
}
.brand-mark .grad, h1 .grad {
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3), var(--accent));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: hue 9s linear infinite;
}
@keyframes hue { to { background-position: 300% 0; } }
.tagline { font-size: 13.5px; color: var(--muted); margin: 14px 0 22px; line-height: 1.55; max-width: 68ch; }
.tagline strong { color: var(--text); font-weight: 600; }
.tagline .badge-mik {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  color: #cfc4ff; background: rgba(124,92,255,.16); border: 1px solid rgba(124,92,255,.35);
  vertical-align: middle;
}

/* Search */
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--faint); pointer-events: none; transition: color .25s; }
.search-wrap:focus-within svg { color: var(--accent2); }
#search {
  width: 100%; padding: 15px 16px 15px 46px; font-size: 16px;
  border-radius: 14px; border: 1px solid var(--card-brd);
  background: var(--card); color: var(--text); outline: none;
  backdrop-filter: blur(10px);
  transition: border-color .25s, box-shadow .25s, background .25s;
}
#search::placeholder { color: var(--faint); }
#search:focus {
  border-color: transparent; background: rgba(255,255,255,.05);
  box-shadow: 0 0 0 1px var(--accent), 0 0 28px -8px var(--accent);
}

#status { margin: 12px 4px; font-size: 12.5px; color: var(--muted); min-height: 16px; letter-spacing: .2px; }
#status.loading { color: var(--accent2); animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* Table card (no overflow/backdrop-filter — would trap sticky thead) */
.table-card {
  border: 1px solid var(--card-brd); border-radius: 16px;
  background: var(--card);
  box-shadow: 0 20px 50px -30px #000;
}
/* Fixed layout; content clips via ellipsis */
table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
col.c-key { width: 124px; }
col.c-artist { width: 22%; }
col.c-song { width: 24%; }
col.c-num { width: 78px; }
thead th {
  text-align: left; font-size: 10.5px; letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--muted); font-weight: 700; padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: var(--nav-h); z-index: 2;
  background: #111119;
}
thead th:first-child { border-top-left-radius: 16px; }
thead th:last-child { border-top-right-radius: 16px; }
thead th.sortable { cursor: pointer; user-select: none; transition: color .2s; white-space: nowrap; }
thead th.sortable:hover { color: var(--text); }
thead th.active { color: var(--accent2); }
thead th .arrow { font-size: 9px; margin-left: 5px; }
tbody td {
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:last-child td:first-child { border-bottom-left-radius: 16px; }
tbody tr:last-child td:last-child { border-bottom-right-radius: 16px; }
@media (max-width: 620px) {
  col.c-key { width: 96px; }
  col.c-num { width: 58px; }
  thead th, tbody td { padding-left: 9px; padding-right: 9px; }
}
tbody tr { transition: background .18s; }
tbody tr:hover td { background: rgba(124, 92, 255, 0.09); }
tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
td.song { font-weight: 600; }
td.artist, td.album { color: var(--muted); }
td a.dg { color: inherit; text-decoration: none; transition: color .18s; }
td a.dg:hover { color: var(--accent2); text-decoration: underline; }
td a.dg::after { content: " ↗"; font-size: 10px; opacity: 0; transition: opacity .18s; }
td a.dg:hover::after { opacity: .6; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.bpm { color: var(--text); font-weight: 600; }

/* Row entrance animation */
tbody tr.row { animation: rowIn .32s cubic-bezier(.2,.7,.3,1) both; animation-delay: calc(var(--i, 0) * 14ms); }
@keyframes rowIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

/* Camelot key badge — hue from Camelot number (like the wheel) */
.key-badge {
  display: inline-block; min-width: 42px; text-align: center; font-weight: 800; font-size: 13px;
  padding: 5px 8px; border-radius: 8px;
  color: hsl(var(--h, 250) 90% 72%);
  background: hsl(var(--h, 250) 60% 15% / 0.85);
  border: 1px solid hsl(var(--h, 250) 65% 34% / 0.7);
  box-shadow: 0 0 14px -6px hsl(var(--h, 250) 80% 55%);
  transition: transform .18s, box-shadow .18s;
}
tbody tr:hover .key-badge { transform: scale(1.06); box-shadow: 0 0 18px -4px hsl(var(--h, 250) 85% 60%); }
.key-badge.none { color: var(--faint); background: rgba(255,255,255,.05); border-color: var(--line); box-shadow: none; }
.key-cell { display: inline-flex; align-items: baseline; gap: 8px; }
.key-alt { font-size: 12px; font-weight: 600; color: var(--muted); }

/* Similar-tracks mode */
col.c-sim { width: 82px; }
td.sim-cell { text-align: center; overflow: visible; padding-left: 8px; padding-right: 8px; }
.add-btn {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  font-size: 15px; font-weight: 700; line-height: 1; margin-right: 4px;
  color: var(--faint); background: transparent; border: 1px solid transparent;
  transition: color .18s, border-color .18s, background .18s;
}
tbody tr:hover .add-btn { border-color: var(--card-brd); }
.add-btn:hover { color: var(--accent3); border-color: var(--accent3); background: rgba(255,78,205,.08); }
.add-btn.added { color: var(--accent3); border-color: var(--accent3); background: rgba(255,78,205,.12); }
.sim-btn {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  font-size: 15px; font-weight: 700; line-height: 1;
  color: var(--faint); background: transparent; border: 1px solid transparent;
  transition: color .18s, border-color .18s, background .18s;
}
tbody tr:hover .sim-btn { border-color: var(--card-brd); }
.sim-btn:hover { color: var(--accent2); border-color: var(--accent2); background: rgba(35,213,224,.08); }
.rel-tag { display: block; font-size: 10px; font-weight: 600; color: var(--faint); margin-top: 4px; letter-spacing: .3px; }
.sim-banner {
  border: 1px solid var(--card-brd); border-radius: 14px; background: var(--card);
  backdrop-filter: blur(8px); padding: 13px 16px; margin-top: 12px;
}
.sim-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sim-title { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.sim-title b { color: var(--text); }
.sim-clear {
  flex: none; width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  color: var(--muted); background: transparent; border: 1px solid var(--card-brd);
  font-size: 12px; line-height: 1; transition: color .18s, border-color .18s;
}
.sim-clear:hover { color: var(--text); border-color: var(--accent3); }
.sim-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sim-chip {
  border: 1px solid var(--accent); border-radius: 999px; cursor: pointer;
  padding: 4px 12px; font-size: 11.5px; font-weight: 600;
  color: #cfc4ff; background: rgba(124,92,255,.16);
  transition: color .18s, background .18s, border-color .18s, opacity .18s;
}
.sim-chip.off { color: var(--faint); background: transparent; border-color: var(--card-brd); }
.sim-chip:hover { border-color: var(--accent2); }
.sim-credit { font-size: 11px; color: var(--faint); margin-top: 10px; }
.sim-credit a { color: var(--accent2); text-decoration: none; }
.sim-credit a:hover { text-decoration: underline; }

/* Mobile: restack the single table into cards (CSS only, no separate markup) */
@media (max-width: 560px) {
  .table-card { border: none; background: transparent; box-shadow: none; overflow: visible; }
  .table-card table, .table-card tbody, .table-card tr, .table-card td { display: block; }
  .table-card thead, .table-card colgroup { display: none; }
  tbody tr.row {
    border: 1px solid var(--card-brd); border-radius: 14px; background: var(--card);
    padding: 13px 15px 14px; margin-bottom: 10px;
    position: relative;
  }
  /* Action buttons float top-right of the card; make room so text doesn't run under them */
  td.sim-cell { position: absolute; top: 10px; right: 10px; width: auto; margin: 0; }
  td.artist, td.song { margin-right: 68px; }
  .sim-btn { border-color: var(--card-brd); }
  tbody tr td { padding: 0; border: none; max-width: none; white-space: normal; overflow: visible; text-overflow: clip; }
  tbody tr:hover td { background: none; }
  tbody tr:hover td:first-child { box-shadow: none; }
  /* Key badge anchors top-left; Artist + Song are the heading beside it */
  td.c-key-cell { float: left; margin: 2px 13px 0 0; }
  td.artist { font-weight: 700; font-size: 15px; color: var(--text); line-height: 1.35; }
  td.song { color: var(--muted); font-weight: 600; font-size: 13.5px; line-height: 1.35; }
  /* Meta line: labeled Album / BPM / Year / Length below a divider */
  td.album { clear: left; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
  td.album, td.num { font-size: 12.5px; color: var(--muted); text-align: left; }
  td.num { display: inline-block; margin: 8px 18px 0 0; }
  td[data-label]::before {
    content: attr(data-label); font-size: 9.5px; text-transform: uppercase; letter-spacing: .6px;
    color: var(--faint); font-weight: 700; margin-right: 6px;
  }
  td.album[data-label]::before { display: block; margin-bottom: 2px; }
}

/* Pager */
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 20px; font-size: 13px; color: var(--muted); }
.pager button {
  background: var(--card); color: var(--text); border: 1px solid var(--card-brd);
  border-radius: 10px; padding: 9px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color .2s, background .2s, transform .1s;
}
.pager button:hover:not(:disabled) { border-color: var(--accent); background: rgba(124,92,255,.12); }
.pager button:active:not(:disabled) { transform: translateY(1px); }
.pager button:disabled { opacity: 0.35; cursor: default; }
#pageInfo { font-variant-numeric: tabular-nums; }

/* Details panels */
details {
  margin-top: 20px; border: 1px solid var(--card-brd); border-radius: 16px;
  background: var(--card); backdrop-filter: blur(8px); overflow: hidden;
}
summary {
  cursor: pointer; padding: 15px 20px; font-size: 15px; font-weight: 700;
  list-style: none; user-select: none; transition: color .2s;
}
summary:hover { color: var(--accent2); }
summary::-webkit-details-marker { display: none; }
summary::before { content: "›"; color: var(--accent); font-weight: 800; margin-right: 9px; display: inline-block; transition: transform .2s; }
details[open] summary::before { transform: rotate(90deg); }
.about-body { max-width: 72ch; }
.about-body p { font-size: 14px; color: var(--muted); line-height: 1.7; margin: 0 0 14px; }
.about-body p:last-child { margin-bottom: 0; }
.ref-body { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 720px) { .ref-body { grid-template-columns: 1fr; } }
.ref-card h3 { font-size: 14px; margin: 4px 0 10px; }
.ref-card p { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; line-height: 1.5; }
.ref-card img { width: 100%; border-radius: 10px; display: block; box-shadow: 0 12px 30px -18px #000; cursor: zoom-in; transition: transform .2s; }
.ref-card img:hover { transform: scale(1.01); }
.read-more { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--accent2); text-decoration: none; transition: color .18s; }
.read-more:hover { color: var(--accent3); text-decoration: underline; }

/* Responsive image modal (lightbox) */
.img-modal {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(4px);
  padding: 48px 20px; cursor: zoom-out;
}
.img-modal.open { display: flex; align-items: center; justify-content: center; animation: modalIn .18s ease; }
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
.img-modal img { max-width: 94%; max-height: 88vh; border-radius: 12px; box-shadow: 0 30px 90px -20px #000; cursor: default; animation: modalZoom .2s ease; }
@keyframes modalZoom { from { transform: scale(.96); } to { transform: none; } }
.img-modal .close {
  position: absolute; top: 16px; right: 24px; width: 44px; height: 44px;
  font-size: 34px; line-height: 1; color: #fff; font-weight: 300;
  background: none; border: none; cursor: pointer; opacity: .8; transition: opacity .2s;
}
.img-modal .close:hover { opacity: 1; }

/* Playlist tab */
.pl-count { margin-left: 5px; font-size: 11px; font-weight: 700; opacity: .85; }

.pl-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
#plName {
  flex: 1; min-width: 200px; padding: 13px 16px; font-size: 15px;
  border-radius: 12px; border: 1px solid var(--card-brd);
  background: var(--card); color: var(--text); outline: none;
  backdrop-filter: blur(10px);
  transition: border-color .25s, box-shadow .25s, background .25s;
}
#plName::placeholder { color: var(--faint); }
#plName:focus {
  border-color: transparent; background: rgba(255,255,255,.05);
  box-shadow: 0 0 0 1px var(--accent), 0 0 28px -8px var(--accent);
}
.pl-actions { display: flex; gap: 10px; flex: none; }
.pl-btn {
  background: var(--accent); color: #fff; border: 1px solid transparent;
  border-radius: 10px; padding: 12px 18px; font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: opacity .2s, transform .1s;
}
.pl-btn:hover:not(:disabled) { opacity: .88; }
.pl-btn:active:not(:disabled) { transform: translateY(1px); }
.pl-btn:disabled { opacity: .35; cursor: default; }
.pl-btn-ghost { background: var(--card); color: var(--text); border: 1px solid var(--card-brd); }
.pl-btn-ghost:hover:not(:disabled) { border-color: var(--accent3); opacity: 1; }

.pl-notice {
  font-size: 12.5px; color: #f0c86b; line-height: 1.55;
  margin: 0 0 16px; padding: 11px 14px;
  border: 1px solid var(--card-brd); border-radius: 10px; background: var(--card);
}
.pl-empty { font-size: 13.5px; color: var(--muted); padding: 20px 4px; }

.pl-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.pl-row {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--card-brd); border-radius: 12px; background: var(--card);
  padding: 10px 12px;
}
.pl-no { width: 24px; text-align: right; color: var(--faint); font-variant-numeric: tabular-nums; flex: none; font-size: 13px; }
.pl-row .key-badge { flex: none; }
.pl-meta { flex: 1; min-width: 0; }
.pl-artist { font-weight: 700; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-song { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-sub { font-size: 11.5px; color: var(--faint); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-move { display: flex; gap: 4px; flex: none; }
.pl-move-btn, .pl-remove {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  font-size: 13px; font-weight: 700; line-height: 1;
  color: var(--muted); background: transparent; border: 1px solid var(--card-brd);
  transition: color .18s, border-color .18s, background .18s;
}
.pl-move-btn:hover:not(:disabled) { color: var(--accent2); border-color: var(--accent2); }
.pl-move-btn:disabled { opacity: .3; cursor: default; }
.pl-remove:hover { color: var(--accent3); border-color: var(--accent3); }

@media (max-width: 560px) {
  .pl-controls { flex-direction: column; align-items: stretch; }
  .pl-actions { flex-wrap: wrap; }
  .pl-btn { flex: 1 1 calc(50% - 5px); }
  .pl-row { flex-wrap: wrap; }
  .pl-sub { white-space: normal; }
}

/* Playlist FAQ block (also doubles as indexable SEO content) */
.faq-block { margin-top: 8px; }
.faq-block-title { font-size: 15px; font-weight: 700; margin: 0 0 14px; }
.faq-item { margin-bottom: 16px; }
.faq-item:last-child { margin-bottom: 0; }
.faq-item h4 { font-size: 13.5px; font-weight: 700; margin: 0 0 5px; color: var(--text); }
.faq-item p { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
