:root {
  --bg: #f9f6f1;
  --card: #fffdf9;
  --line: #e5ddd1;
  --text: #2f241f;
  --muted: #6f5d52;
  --primary: #6b2f2f;
  --primary-2: #9c5b3f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  color: #fff;
  background: linear-gradient(130deg, var(--primary), var(--primary-2));
}

.brand { margin: 0; font-size: .78rem; opacity: .9; letter-spacing: .04em; text-transform: uppercase; }
h1 { margin: .2rem 0 0; font-size: 1.1rem; }

.tabs {
  position: sticky;
  top: 65px;
  z-index: 15;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: .5rem;
  overflow-x: auto;
  padding: .6rem .8rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.tabs a {
  text-decoration: none;
  color: var(--primary);
  background: #f3e8dc;
  font-weight: 600;
  padding: .45rem .8rem;
  border-radius: 999px;
  white-space: nowrap;
  font-size: .88rem;
}

main {
  display: grid;
  gap: .8rem;
  padding: .8rem;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}

.hero { background: linear-gradient(180deg, #fff8ef, #fffdf9); }
.section-heading p { margin-top: 0; color: var(--muted); }

.chips { display: flex; gap: .45rem; flex-wrap: wrap; }
.chips span {
  background: #f3e8dc;
  color: var(--primary);
  font-size: .8rem;
  border-radius: 999px;
  padding: .35rem .65rem;
}

.grid { display: grid; gap: .7rem; }

.post {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .85rem;
  background: #fff;
}

.post h3 { margin: .1rem 0 .5rem; }

.stack { display: grid; gap: .65rem; }
label { display: grid; gap: .3rem; font-weight: 600; font-size: .92rem; }

input, select, button {
  font: inherit;
  border-radius: 10px;
  border: 1px solid #d5c9b9;
  padding: .7rem;
  min-height: 44px;
}

button {
  border: none;
  color: #fff;
  font-weight: 700;
  background: var(--primary-2);
}

button.secondary {
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .45);
}

pre {
  background: #35251f;
  color: #fff8ee;
  border-radius: 10px;
  padding: .85rem;
  overflow-x: auto;
  white-space: pre-wrap;
}

#cellarNotes {
  margin: .4rem 0 0;
  padding-left: 1.15rem;
}

#cellarNotes li { margin-bottom: .4rem; }

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

footer {
  text-align: center;
  color: var(--muted);
  font-size: .86rem;
  padding: .95rem;
}

@media (min-width: 860px) {
  h1 { font-size: 1.25rem; }
  main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #home, #posts { grid-column: span 2; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
