:root {
  --bg: #f7f4ef;
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --accent: #2f6f4e;
  --card: #fff;
  --line: #e2dbd0;
  --gold: #d4a72c;
  --red: #b33;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
}
header, main, footer { max-width: 52rem; margin: 0 auto; padding: 1.25rem; }
h1 { margin: 0 0 0.35rem; font-size: 1.75rem; }
header p, footer p, #status { color: var(--muted); }
.controls {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
  margin-bottom: 1rem;
}
@media (min-width: 720px) {
  .controls { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; }
input, select {
  font: inherit;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%235c5c5c' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 0.75rem;
}
.results { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.results li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  position: relative;
}
.results a { color: var(--accent); font-weight: 600; text-decoration: none; }
.results a:hover { text-decoration: underline; }
.url-display { font-size: 0.78rem; color: var(--muted); word-break: break-all; margin: 0.1rem 0 0.15rem; opacity: 0.75; }
.meta { font-size: 0.85rem; color: var(--muted); margin: 0.25rem 0; }
.intro { font-size: 0.92rem; margin: 0.35rem 0 0; }
.score-row { margin-top: 0.35rem; }
.stars { color: var(--gold); font-size: 1rem; letter-spacing: 1px; }
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-right: 0.5rem;
  vertical-align: middle;
}
.badge.bad { background: #fdd; color: var(--red); }
.badge.pick { background: #efe5c7; color: #8a6e1c; }
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.pagination button {
  font: inherit;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}
.pagination button:not(:disabled):hover {
  background: var(--accent);
  color: #fff;
}
.page-info {
  font-size: 0.9rem;
  color: var(--muted);
}
.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  margin-top: 0.35rem;
  font-size: 0.85rem;
}
.share-row a {
  color: var(--accent);
}
.share-copy {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.share-copy:hover {
  background: var(--accent);
  color: #fff;
}
body.share-page {
  max-width: 42rem;
  margin: 2rem auto;
  padding: 0 1rem;
}
.share-brand a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.share-intro {
  font-size: 1.05rem;
  line-height: 1.55;
}
.share-meta {
  color: var(--muted);
  font-size: 0.9rem;
}
.share-cta {
  display: inline-block;
  margin: 0.75rem 0;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
}
.share-note {
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-lang label {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-lang select {
  font-size: 0.82rem;
  padding: 0.3rem 1.8rem 0.3rem 0.5rem;
  background-position: right 0.4rem center;
  background-size: 0.65rem;
}
