:root {
  --bg: #ffffff;
  --bg-alt: #f4f2ee;
  --text: #1a1a1a;
  --text-muted: #5a5a5a;
  --border: #d8d3cb;
  --accent: #a8501f;
  --accent-text: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17140f;
    --bg-alt: #221e17;
    --text: #f2ede4;
    --text-muted: #b8b0a2;
    --border: #3a342a;
    --accent: #d97b3f;
    --accent-text: #17140f;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

h1 {
  font-size: 1.9rem;
  line-height: 1.15;
  margin: 0.2rem 0 0.4rem;
}

h2 {
  font-size: 1.2rem;
  margin: 1.6rem 0 0.5rem;
}

p {
  margin: 0.4rem 0;
}

a {
  color: var(--accent);
}

.numero-birra {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  margin: 0.4rem 0 0.2rem;
}

.stile-abv {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.badge {
  display: inline-block;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.85rem;
  margin: 0.15rem 0.3rem 0.15rem 0;
}

.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin: 0.6rem 0;
}

.card-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.card-list li:last-child {
  border-bottom: none;
}

.ricette-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ricette-list > li {
  margin: 0 0 1rem;
}

.varianti-list {
  list-style: none;
  padding: 0;
  margin: 0.3rem 0 0;
}

.varianti-list a {
  display: block;
  padding: 0.6rem 0.2rem;
  min-height: 44px;
  display: flex;
  align-items: center;
}

label {
  display: block;
  font-weight: 600;
  margin: 0.9rem 0 0.3rem;
}

input {
  width: 100%;
  font-size: 16px;
  padding: 0.7rem 0.8rem;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

button,
.button {
  display: inline-block;
  min-height: 44px;
  padding: 0.7rem 1.4rem;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.errore {
  color: #c0392b;
  font-weight: 600;
}

.privato {
  border-left: 3px solid var(--accent);
  padding-left: 0.8rem;
}

footer {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 2rem;
}

nav.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

nav.top a {
  text-decoration: none;
  font-weight: 600;
}
