:root {
  --bg: #16181c;
  --panel: #1f2228;
  --line: #2c3038;
  --text: #e4e6ea;
  --muted: #8a919c;
  --accent: #e5577f;
  --star: #f2b134;
  --star-off: #3a3f48;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1 { font-size: 1.6rem; margin: 0 0 .5rem; }
h2 { font-size: 1.1rem; margin: 2rem 0 .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
.muted { color: var(--muted); font-weight: normal; }

header { background: var(--panel); border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
nav { display: flex; align-items: center; gap: 1.25rem; height: 52px; }
nav a { color: var(--muted); }
nav a.on, nav a:hover { color: var(--text); }
nav .logo { color: var(--text); font-weight: 700; letter-spacing: .02em; margin-right: .75rem; }
nav .right { margin-left: auto; }

button, .btn {
  display: inline-block; font: inherit; color: #fff; background: var(--accent); border: 0; border-radius: 4px;
  padding: .45rem .9rem; cursor: pointer;
}
button:hover, .btn:hover { filter: brightness(1.1); color: #fff; }
.btn.ghost { background: var(--line); }
button.small { padding: .2rem .6rem; font-size: .85rem; }
button.link { background: none; color: var(--muted); padding: 0; }
button.link:hover { color: var(--accent); }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: .45rem .6rem;
}
input:focus, select:focus, textarea:focus { outline: 1px solid var(--accent); border-color: var(--accent); }
form.inline { display: inline; }
form.row { display: flex; gap: .5rem; margin: .5rem 0; }
form.row input { flex: 1; }

.flash { background: var(--panel); border-left: 3px solid var(--accent); padding: .5rem .75rem; }
.tag { display: inline-block; background: var(--line); color: var(--muted); border-radius: 3px; padding: 0 .4rem; font-size: .8rem; }

.bar { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.sort { color: var(--muted); }
.sort a { margin-left: .5rem; }
.sort a.on { color: var(--text); border-bottom: 2px solid var(--accent); }
progress { width: 100%; height: 4px; appearance: none; border: 0; background: var(--line); margin: .5rem 0 1.5rem; }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1.25rem; }
.card .t { margin-top: .4rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .a { color: var(--muted); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); background: var(--panel); }
.cover.none { display: flex; align-items: center; justify-content: center; text-align: center; padding: 1rem; color: var(--muted); }

.album { display: grid; grid-template-columns: 300px 1fr; gap: 2rem; align-items: start; }
.album .artist { font-size: 1.15rem; margin: 0 0 .75rem; }
.review { white-space: pre-line; background: var(--panel); border-radius: 4px; padding: .75rem 1rem; margin: 1rem 0; }
@media (max-width: 700px) { .album { grid-template-columns: 1fr; } .album .cover { max-width: 320px; } }

.rating {
  --p: 0%;
  display: inline-block; vertical-align: middle; width: 90px; height: 18px;
  background: linear-gradient(to right, var(--star) var(--p), var(--star-off) var(--p));
  -webkit-mask: url(star.svg) 0 0 / 18px 18px repeat-x; mask: url(star.svg) 0 0 / 18px 18px repeat-x;
}
.p1 { --p: 10%; } .p2 { --p: 20%; } .p3 { --p: 30%; } .p4 { --p: 40%; } .p5 { --p: 50%; }
.p6 { --p: 60%; } .p7 { --p: 70%; } .p8 { --p: 80%; } .p9 { --p: 90%; } .p10 { --p: 100%; }

.rate { display: flex; flex-direction: column; gap: .6rem; max-width: 460px; margin-top: 1.25rem; }
.rate button { align-self: flex-start; }
.stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
.stars input { position: absolute; opacity: 0; width: 0; height: 0; }
.stars label {
  width: 18px; height: 36px; cursor: pointer; background: var(--star-off);
  -webkit-mask: url(star.svg) no-repeat; mask: url(star.svg) no-repeat;
  -webkit-mask-size: 36px 36px; mask-size: 36px 36px;
}
.stars label.l { -webkit-mask-position: 0 0; mask-position: 0 0; }
.stars label.r { -webkit-mask-position: -18px 0; mask-position: -18px 0; margin-right: 4px; }
.stars input:checked ~ label { background: var(--star); }
.stars:hover input ~ label { background: var(--star-off); }
.stars:hover label:hover, .stars:hover label:hover ~ label { background: var(--star); }
.stars input:focus-visible + label { outline: 1px solid var(--accent); }

.tracks { padding-left: 1.5rem; max-width: 600px; }
.tracks li { padding: .2rem 0; border-bottom: 1px solid var(--line); }
.tracks li span:first-child { display: inline-block; width: calc(100% - 4rem); }
.tracks li span:last-child { float: right; }

table.list { width: 100%; border-collapse: collapse; }
table.list td { padding: .45rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list td:last-child { text-align: right; white-space: nowrap; }
.review-item { background: var(--panel); border-radius: 4px; padding: .75rem 1rem; margin-bottom: 1rem; }
.review-item p { margin: 0 0 .5rem; }

.login { max-width: 320px; margin: 4rem auto; display: flex; flex-direction: column; gap: .75rem; }
