:root { color-scheme: dark; }

* { box-sizing: border-box; }

body {
  background: #121212;
  color: #eee;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
}

.site-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid #262626;
}
.site-header .brand {
  color: #eee;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}
.site-header .tool-name {
  color: #9aa0a6;
  font-size: 0.95rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

h1 { font-size: 1.4rem; margin-bottom: 4px; }
.subtitle { color: #9aa0a6; margin-top: 0; margin-bottom: 24px; font-size: 0.9rem; }

/* ---- form page ---- */
.lookup-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  background: #1c1c1c;
  padding: 18px;
  border-radius: 10px;
  margin-bottom: 14px;
}
.lookup-form label {
  display: block;
  font-size: 0.8rem;
  color: #9aa0a6;
  margin-bottom: 4px;
}
.lookup-form input {
  background: #121212;
  border: 1px solid #333;
  color: #eee;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.95rem;
}
.lookup-form input#user_id { width: 220px; }
.lookup-form button {
  background: #5ec8f2;
  border: none;
  color: #0b1b22;
  font-weight: 600;
  border-radius: 6px;
  padding: 9px 18px;
  font-size: 0.95rem;
  cursor: pointer;
}
.lookup-form button:hover { background: #7ed4f5; }

.error {
  background: #ff808022;
  border: 1px solid #ff808066;
  color: #ff9b9b;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.hint { color: #6b7075; font-size: 0.82rem; }
.loading-note { color: #7fb2ff; font-size: 0.85rem; margin-top: -6px; }

.info-section {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #262626;
}
.info-section h2 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: #eee;
}
.info-section ul {
  margin: 0;
  padding-left: 20px;
  color: #b8bcc0;
  font-size: 0.88rem;
  line-height: 1.6;
}
.info-section li { margin-bottom: 6px; }
.info-section li:last-child { margin-bottom: 0; }
.info-section strong { color: #eee; }

/* ---- results page ---- */
.meta-line { color: #9aa0a6; font-size: 0.9rem; margin-bottom: 24px; }
.meta-line a { color: #7fb2ff; }

h2.month {
  font-size: 1.05rem;
  margin: 28px 0 12px;
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: 6px;
}
h2.section.slop { color: #ff8080; margin-top: 44px; }
.section-note { color: #9aa0a6; font-size: 0.85rem; margin-top: -6px; margin-bottom: 14px; }

.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 8px;
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

.tile {
  display: flex;
  flex-direction: column;
  background: #1c1c1c;
  border-radius: 10px;
  padding: 8px;
  min-width: 0;
}
.tile.slop { outline: 1px solid #ff808066; }
.tile.today { background: #3a2560; }
.tile a { display: block; }

.today-note {
  color: #d3aeff;
  font-weight: 600;
  font-size: 0.72rem;
  margin-top: 4px;
}

.cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  background: #2a2a2a;
  margin-bottom: 6px;
}
.cover.broken { visibility: hidden; }

.row1 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.badge {
  color: #111;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
}
.tag {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
}
.tag.pre { background: #4287f533; color: #7fb2ff; }
.tag.slop { background: #ff808033; color: #ff9b9b; }

.title {
  font-size: 0.88rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.title a { color: #eee; text-decoration: none; }
.title a:hover { text-decoration: underline; }
.artist { color: #9aa0a6; font-size: 0.8rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.date { color: #6b7075; font-size: 0.72rem; margin-top: 2px; font-variant-numeric: tabular-nums; }
.empty { color: #9aa0a6; font-style: italic; }
