:root {
  --bg: #0f1117;
  --panel: #161922;
  --border: #262a36;
  --text: #e8eaf0;
  --muted: #8b90a3;
  --accent: #7c9cff;
  --danger: #ff6b6b;
  --ok: #6bd39a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.site-header nav { display: flex; gap: 1rem; align-items: center; }
.site-header nav .who { color: var(--muted); font-size: 0.9rem; }
.site-header nav form.inline { display: inline; margin: 0; }
.linklike {
  background: none; border: 0; color: var(--accent);
  cursor: pointer; padding: 0; font: inherit;
}

main { max-width: 720px; margin: 2rem auto; padding: 0 1.5rem; }

.btn-primary, .btn-secondary {
  display: inline-block; padding: 0.6rem 1rem; border-radius: 6px;
  font-weight: 600; cursor: pointer; border: 0; font: inherit;
}
.btn-primary { background: var(--accent); color: #0b0e16; }
.btn-primary:hover { filter: brightness(1.1); text-decoration: none; }
.btn-secondary {
  background: transparent; color: var(--text); border: 1px solid var(--border);
}

.hero { padding: 3rem 0; text-align: center; }
.hero h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.hero p { color: var(--muted); margin-bottom: 2rem; }
.hero a + a { margin-left: 0.75rem; }

.auth-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 2rem; max-width: 420px; margin: 2rem auto;
}
.auth-card h1 { margin-top: 0; }
.auth-card form { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1rem; }
.auth-card label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; color: var(--muted); }
.auth-card input {
  padding: 0.6rem 0.75rem; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 1rem;
}
.auth-card input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.auth-card small { color: var(--muted); font-size: 0.8rem; }

.flash {
  max-width: 720px; margin: 1rem auto 0; padding: 0.75rem 1rem;
  border-radius: 6px; border: 1px solid var(--border); background: var(--panel);
}
.flash-ok { border-color: var(--ok); color: var(--ok); }
.flash-error { border-color: var(--danger); color: var(--danger); }
.error { color: var(--danger); margin-bottom: 1rem; }
.muted { color: var(--muted); font-size: 0.9rem; }

.site-footer { text-align: center; padding: 2rem 1rem; color: var(--muted); }

.page-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem;
  flex-wrap: wrap; gap: 1rem;
}
.page-head h1 { margin: 0; }
.page-head a + a { margin-left: 0.5rem; }

.group-list { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.group-list li {
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
}
.group-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.25rem; color: var(--text);
}
.group-list a:hover { text-decoration: none; background: #1b2030; border-radius: 8px; }

.empty {
  background: var(--panel); border: 1px dashed var(--border);
  border-radius: 8px; padding: 2rem; text-align: center; color: var(--muted);
}

.member-list { list-style: none; padding: 0; }
.member-list li {
  display: flex; justify-content: space-between;
  padding: 0.5rem 0; border-bottom: 1px solid var(--border);
}

.invite-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 1rem 1.25rem; margin-top: 0.75rem;
}
.readonly-input {
  width: 100%; padding: 0.5rem 0.75rem; background: var(--bg);
  border: 1px solid var(--border); color: var(--text); border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.inline-form { margin: 0; }
.group-cycle {
  padding: 1rem; background: var(--panel);
  border: 1px dashed var(--border); border-radius: 8px; margin-bottom: 2rem;
}

.submission-list { list-style: none; padding: 0; }
.submission-list li {
  padding: 0.5rem 0; border-bottom: 1px solid var(--border);
  display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: baseline;
}

.vote-shell { max-width: 820px; margin: 0 auto; }
.matchup-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.5rem; margin-top: 1rem;
}
.matchup-head { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.side-by-side { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .side-by-side { grid-template-columns: 1fr; } }
.vote-side {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 1rem;
}
.vote-side .art {
  aspect-ratio: 1 / 1; background: #0a0d16; border-radius: 6px;
  margin-bottom: 0.75rem; overflow: hidden;
}
.vote-side .art img { width: 100%; height: 100%; object-fit: cover; }
.vote-side .meta { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.75rem; }
.vote-side .meta .release { font-size: 0.85rem; }
.vote-side .actions { display: flex; flex-direction: column; gap: 0.5rem; }
.listen-btn {
  display: inline-block; text-align: center;
  padding: 0.4rem 0.75rem; border-radius: 6px; border: 1px solid var(--border);
  color: var(--text);
}
.rate-label { display: flex; align-items: center; justify-content: space-between; font-size: 0.85rem; color: var(--muted); }
.rate-label select {
  background: var(--panel); color: var(--text);
  border: 1px solid var(--border); border-radius: 4px; padding: 0.2rem 0.4rem;
}
.pick-btn { width: 100%; }
.comment-label { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 1rem; }
.comment-label input {
  padding: 0.5rem 0.75rem; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 1rem;
}

.matchup-card.done { text-align: center; padding: 3rem 1.5rem; }

.notif-bell { position: relative; }
.notif-badge {
  position: absolute; top: -6px; right: -10px;
  background: var(--danger); color: white; border-radius: 10px;
  padding: 1px 6px; font-size: 0.7rem; font-weight: 700;
}

.notification-list { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.notification {
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
}
.notification.unread { border-left: 3px solid var(--accent); }
.notification a { display: block; padding: 0.85rem 1rem; color: var(--text); }
.notification a:hover { background: #1b2030; border-radius: 8px; text-decoration: none; }
.notification p { margin: 0.25rem 0; }
