:root {
  color-scheme: dark;
  --background: #101310;
  --panel: #191e19;
  --line: #333c32;
  --text: #f3f2e9;
  --muted: #aab5a5;
  --accent: #c5ed87;
  font: 400 15px/1.5 Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--background); }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.shell { width: min(100% - 64px, 1140px); margin-inline: auto; }
.topbar { border-bottom: 1px solid #293227; background: #161b15; }
.topbar-content { display: flex; justify-content: space-between; align-items: center; min-height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: .9rem; font-weight: 700; }
.record {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid #789356; background: repeating-radial-gradient(circle, #c5ed87 0 1px, #95b86a 1px 2px, #c5ed87 2px 4px);
}
.record::after { content: ""; width: 7px; height: 7px; border: 2px solid var(--accent); border-radius: 50%; background: #192319; }
.demo { background: #252d21; border: 1px solid #394637; color: var(--muted); border-radius: 100px; font-size: .76rem; padding: 3px 11px; }
main { padding-bottom: 48px; }
.shelf-heading { padding: 48px 0 23px; }
.shelf-heading h1 { margin: 0; font-size: clamp(2.9rem, 6.2vw, 5.4rem); font-weight: 850; letter-spacing: -.072em; line-height: .99; overflow-wrap: anywhere; }
.shelf-heading p { margin: 13px 0 0; color: var(--muted); }
.shelf-switcher { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 0 0 16px; }
.shelf-switcher label { color: var(--muted); font-size: .88rem; font-weight: 650; }
.shelf-switcher select { max-width: min(100%, 330px); min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; color: var(--text); background: var(--panel); }
#shelf-access { color: var(--muted); font-size: .82rem; }
.controls { display: grid; gap: 14px; padding: 8px 0 23px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.status-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.status-tabs button, .secondary {
  border: 1px solid var(--line); padding: 7px 13px; border-radius: 8px;
  background: var(--panel); color: var(--text); font-weight: 650; font-size: .88rem; min-height: 40px;
}
.status-tabs button[aria-pressed="true"] { background: var(--accent); color: #202b17; border-color: var(--accent); }
.status-tabs button span { font-size: .8em; opacity: .8; padding-left: 3px; font-variant-numeric: tabular-nums; }
.status-tabs button:hover:not([aria-pressed="true"]), .secondary:hover { background: #263024; }
.tools { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, minmax(125px, 155px)); gap: 8px; }
.tools label { min-width: 0; }
.tools select, .search { width: 100%; border: 1px solid var(--line); border-radius: 8px; min-height: 44px; color: var(--text); background: var(--panel); }
.tools select { padding: 0 9px; font-size: .88rem; }
.search { display: flex; align-items: center; padding: 0 10px; gap: 9px; }
.search span { color: var(--accent); font-size: 1.7rem; line-height: 1; margin-top: -3px; }
.search input { background: transparent; color: inherit; border: 0; min-width: 0; width: 100%; padding: 9px 0; }
.search input::placeholder { color: var(--muted); }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search input:focus-visible { outline: none; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 19px; row-gap: 25px; }
.card { min-width: 0; display: block; width: 100%; color: inherit; background: none; border: 0; border-radius: 10px; padding: 0; text-align: left; }
.cover { display: block; position: relative; isolation: isolate; aspect-ratio: 1; border-radius: 9px; overflow: hidden; background: #222b21; }
.cover::before { content: ""; background: repeating-radial-gradient(circle, #2d3e2a 0 2px, #222e20 3px 5px); position: absolute; z-index: -1; inset: 13%; border-radius: 50%; }
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card:hover .cover { outline: 2px solid var(--accent); outline-offset: -2px; }
.badge { color: #eff2e8; background: #101610eb; border: 1px solid #d9e8d642; padding: 4px 8px; font-size: .74rem; font-weight: 640; border-radius: 7px; white-space: nowrap; }
.cover .badge { position: absolute; bottom: 9px; left: 9px; }
.badge.score { color: #e8fcd3; }
.cover .score { left: auto; right: 9px; bottom: auto; top: 9px; }
.card-title, .artist, .meta { overflow-wrap: anywhere; }
.card-title { display: block; margin-top: 9px; font-size: 1.02rem; line-height: 1.24; font-weight: 740; }
.card .artist { display: block; margin-top: 3px; color: var(--muted); font-size: .87rem; }
.meta { color: var(--muted); font-size: .8rem; }
.card .meta { display: block; color: #9ca794; margin-top: 3px; }
.feedback { color: var(--muted); padding: 12px 0 25px; margin: 0; }
.more { display: block; margin: 24px auto 0; }
dialog {
  position: fixed; width: min(630px, calc(100% - 28px)); max-height: calc(100% - 28px);
  border: 1px solid #455340; background: var(--panel); color: var(--text);
  border-radius: 14px; padding: 16px; margin: auto; overflow: auto;
}
dialog[open] { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; }
dialog::backdrop { background: #070907cc; }
.close { position: absolute; z-index: 1; top: 10px; right: 10px; border: 1px solid var(--line); background: #20281f; color: var(--text); width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; line-height: 1; }
.detail-content { padding-top: 33px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 5px; }
dialog h2 { margin: 12px 0 4px; font-size: 1.65rem; line-height: 1.14; letter-spacing: -.04em; overflow-wrap: anywhere; }
dialog p { margin: 6px 0; }
.note { border-top: 1px solid var(--line); padding-top: 13px; margin-top: 14px; }
.note h3 { margin: 0; font-size: .84rem; color: var(--accent); }
.note p { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 870px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .shell { width: calc(100% - 28px); }
  .topbar-content { min-height: 55px; }
  .shelf-heading { padding-top: 29px; }
  .controls { margin-bottom: 16px; padding-bottom: 16px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tools .search { grid-column: 1 / -1; }
  .status-tabs button { padding-inline: 8px; }
  dialog[open] { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .detail-cover { width: min(100%, 330px); margin-inline: auto; }
  .detail-content { padding-top: 0; }
}
