/* Songs & Albums — "Studio Light" theme */
:root {
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --soft: #F1F1EC;
  --line: #E2E1DC;
  --line-strong: #CFCEC8;
  --text: #17171A;
  --text-2: #45444C;
  --muted: #5E5D66;
  --faint: #6B6A72;
  --accent: #2F5BEA;
  --accent-ink: #2448C7;
  --accent-soft: #E8EDFD;
  --good: #1E7A46;
  --bad: #B3261E;
  --radius: 14px;
  --display: "Space Grotesk", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, -apple-system, sans-serif; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-ink); }
img { display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
main.wrap { padding-top: 28px; padding-bottom: 56px; min-height: 60vh; outline: none; }
.loading, .empty { color: var(--muted); padding: 24px 0; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 12px; padding-bottom: 12px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.5px; white-space: nowrap; }
.logo span { color: var(--accent); }
.search { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; background: var(--soft); border: 1px solid #DCDBD5; border-radius: 10px; padding: 0 14px; min-height: 44px; color: var(--muted); }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.main-nav { display: flex; gap: 18px; font-weight: 500; color: var(--text-2); }
.account-slot { display: flex; align-items: center; gap: 10px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; cursor: pointer; background: var(--accent); color: #fff; white-space: nowrap; }
.btn:hover { background: var(--accent-ink); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--text-2); color: var(--text); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 14px; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent-ink); font-weight: 600; cursor: pointer; }
.muted-btn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px 4px; font-size: 13px; }
.muted-btn:hover { color: var(--text); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Layout */
.cols { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.col-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.card h2 { font-size: 22px; margin-bottom: 10px; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; margin-bottom: 10px; }
.section-head h2 { margin: 0; }
.kicker { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.meta { color: var(--muted); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--soft); border: 1px solid #DCDBD5; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 500; }
button.chip { cursor: pointer; min-height: 40px; padding: 0 16px; font-size: 14px; }
button.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Covers */
.cover { background: #3A4A5A; color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; overflow: hidden; flex: none; border-radius: 8px; position: relative; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.round { border-radius: 50%; }

/* Hero */
.hero { display: flex; flex-wrap: wrap; gap: 32px; margin-bottom: 28px; }
.hero .cover { width: 260px; height: 260px; font-size: 64px; border-radius: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.08); }
.hero-body { flex: 999 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.05; }
.byline { font-size: 18px; color: var(--text-2); }
.byline a { color: var(--accent-ink); font-weight: 600; }
.stat-row { display: flex; flex-wrap: wrap; gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px; min-width: 150px; }
.stat .big { font-family: var(--display); font-size: 32px; font-weight: 700; display: flex; align-items: baseline; gap: 6px; }
.stat .big small { font-family: Inter, sans-serif; font-size: 15px; font-weight: 500; color: var(--muted); }
.star { color: var(--accent); }

/* Lists of songs / albums */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid #ECEBE6; }
.row:first-child { border-top: 0; }
.row .rank { width: 26px; text-align: right; font-family: var(--display); font-weight: 700; color: var(--faint); flex: none; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.row .sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score { font-weight: 700; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.score .count { font-weight: 400; color: var(--faint); font-size: 12px; }
.unrated { color: var(--faint); font-size: 13px; white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.tile { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tile .cover { width: 100%; aspect-ratio: 1; height: auto; font-size: 30px; border-radius: 10px; }
.tile .t { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .s { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { position: absolute; right: 8px; bottom: 8px; background: #fff; color: var(--accent-ink); font-family: Inter, sans-serif; font-size: 13px; font-weight: 700; border-radius: 6px; padding: 1px 7px; }

/* Rating widget */
.rate-card { border-color: var(--accent); }
.scale { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.scale button { min-height: 44px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 700; font-size: 16px; cursor: pointer; }
.scale button:hover { border-color: var(--accent); }
.scale button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.scale.compact { display: flex; gap: 3px; grid-template-columns: none; }
.scale.compact button { width: 28px; min-height: 32px; height: 32px; font-size: 12px; border-radius: 6px; padding: 0; }
textarea, input[type=text], input[type=email], input[type=password] { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); padding: 11px 13px; min-height: 46px; }
textarea { resize: vertical; min-height: 110px; }
textarea:focus, input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
label.field .hint { font-weight: 400; color: var(--faint); font-size: 13px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
label.check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
.note-box { flex-basis: 100%; margin: 4px 0 4px 40px; padding: 12px 14px; background: #F6F8FE; border: 1px solid #D6DFFA; border-radius: 10px; display: flex; flex-direction: column; gap: 8px; }
.note-box textarea { min-height: 90px; }

/* Distribution bars */
.dist { display: flex; flex-direction: column; gap: 5px; }
.dist-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.dist-row .n { width: 20px; text-align: right; color: var(--text-2); font-weight: 600; }
.dist-row .bar { flex: 1; height: 10px; background: #ECEBE6; border-radius: 5px; overflow: hidden; }
.dist-row .bar span { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.dist-row .pct { width: 38px; color: var(--faint); }

/* Reviews */
.review { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid #ECEBE6; }
.review:first-of-type { border-top: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 13px; text-transform: uppercase; }
.review .head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.pill { background: var(--accent); color: #fff; font-weight: 700; border-radius: 6px; padding: 1px 8px; font-size: 13px; }
.review .body { margin: 8px 0 6px; color: #2E2D33; white-space: pre-wrap; overflow-wrap: anywhere; }
.review .body.spoiler { filter: blur(5px); cursor: pointer; user-select: none; }
.review .actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 13px; color: var(--muted); }
.vote { background: var(--surface); border: 1px solid #DCDBD5; border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.vote.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.report-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.report-form select { border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 8px; background: #fff; }

/* Listen on */
.listen { display: flex; flex-wrap: wrap; gap: 8px; }
.listen a { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid #DCDBD5; border-radius: 10px; padding: 0 14px; min-height: 42px; font-weight: 600; font-size: 14px; }
.listen .dot { width: 10px; height: 10px; border-radius: 50%; }

/* Tabs */
.tabs { display: flex; gap: 6px; background: var(--soft); padding: 4px; border-radius: 10px; flex-wrap: wrap; }
.tabs button { border: 0; border-radius: 8px; padding: 7px 13px; min-height: 36px; background: transparent; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--text-2); }
.tabs button[aria-selected="true"] { background: var(--accent); color: #fff; }

/* Auth pages */
.auth { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; justify-content: center; padding-top: 12px; }
.auth .pitch { flex: 1 1 340px; max-width: 460px; padding-top: 8px; }
.auth .pitch h1 { font-size: 44px; line-height: 1.05; margin-bottom: 14px; }
.auth .form-card { flex: 1 1 400px; max-width: 460px; }
.auth .form-card h1, .auth .form-card h2 { font-size: 28px; margin-bottom: 4px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.perk { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.perk .tick { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; font-weight: 700; }
.alert { border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.alert.error { background: #FCEDEC; color: var(--bad); border: 1px solid #F2C9C6; }
.alert.ok { background: #E8F5EE; color: var(--good); border: 1px solid #C5E6D3; }
.pw-row { display: flex; gap: 8px; }
.pw-row input { flex: 1; min-width: 0; }

/* Home */
.home-hero { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; padding: 20px 0 32px; }
.home-hero .pitch { flex: 999 1 460px; }
.home-hero h1 { font-size: clamp(36px, 5.5vw, 56px); line-height: 1.04; }
.home-hero p { color: var(--muted); font-size: 18px; max-width: 560px; margin: 16px 0 24px; }
.home-hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.callout { flex: 1 1 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }

/* Toast + footer */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--text); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.site-footer { border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 20px; }
.footer-row a { text-decoration: underline; }
.user-pill { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.user-pill .avatar { width: 34px; height: 34px; font-size: 12px; }

@media (max-width: 720px) {
  .main-nav { display: none; }
  .hero .cover { width: 180px; height: 180px; font-size: 44px; }
  .scale button { min-height: 40px; font-size: 14px; }
  .card { padding: 18px; }
  .note-box { margin-left: 0; }
}
