:root {
  --color-bg: #faf7f5;
  --color-text: #2a1a1f;
  --color-primary: #5b1a2b;
  --color-primary-dark: #3d1120;
  --color-border: #e0d4d0;
  --color-muted: #8a7a76;
  --color-error: #b3261e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

.site-header {
  background: var(--color-primary);
  color: white;
}
.site-header__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.site-logo { color: white; text-decoration: none; font-weight: 600; font-size: 1.1rem; }
.site-nav { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.site-nav a { color: white; text-decoration: none; opacity: 0.9; }
.site-nav a:hover { opacity: 1; text-decoration: underline; }

.link-btn {
  background: none; border: none; color: white; opacity: 0.9;
  cursor: pointer; font: inherit; padding: 0;
}
.link-btn:hover { opacity: 1; text-decoration: underline; }

.admin-bar { background: #e0b000; border-bottom: 1px solid #c9a000; }
.admin-bar__inner {
  max-width: 900px; margin: 0 auto; padding: 5px 16px;
  display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.82rem;
}
.admin-bar a { color: #333; text-decoration: none; font-weight: 500; }
.admin-bar a:hover { color: #000; text-decoration: underline; }

.site-main { max-width: 900px; margin: 0 auto; padding: 1rem; }
.site-footer { text-align: center; color: var(--color-muted); padding: 2rem 1rem; font-size: 0.85rem; }

h2 { color: var(--color-primary-dark); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
th, td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--color-border); }
th { color: var(--color-muted); font-weight: 600; }

.form { display: flex; flex-direction: column; gap: 0.75rem; max-width: 480px; }
.form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; color: var(--color-muted); }
input, select, textarea {
  padding: 0.5rem; border: 1px solid var(--color-border); border-radius: 6px; font: inherit;
}
textarea { min-height: 4rem; }

button {
  background: var(--color-primary); color: white; border: none;
  padding: 0.6rem 1.2rem; border-radius: 6px; cursor: pointer; font: inherit;
}
button:hover { background: var(--color-primary-dark); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
.btn-danger { background: var(--color-error); }

.wine-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; }
.wine-facts dt { color: var(--color-muted); }
.wine-facts dd { margin: 0; }

.muted { color: var(--color-muted); font-size: 0.9rem; }

#candidates .candidate, #manualList .candidate { margin: 0.25rem 0.25rem 0.25rem 0; }
#manualList { list-style: none; padding: 0; }
