:root {
  --bg: #fdf8ee;
  --text: #2b1d12;
  --muted: #6b5a4a;
  --accent: #b5730a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2a211a;
    --text: #f3e9d9;
    --muted: #bcab95;
    --accent: #f2a516;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
main {
  flex: 1;
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  padding: 18vh 16px 3rem;
}
h1 { font-size: 3rem; line-height: 1; margin: 1rem 0 .5rem; letter-spacing: -.02em; }
.lede { font-size: 1.35rem; margin: 0 0 1.5rem; color: var(--accent); font-weight: 600; }
.soon { color: var(--muted); }
footer { padding: 1.5rem 16px; text-align: center; font-size: .85rem; color: var(--muted); }
ul { padding-left: 1.2rem; }
li { margin: .4rem 0; }
code { font-size: .85em; }
a { color: var(--accent); }

/* /near: phone first, then tablet (two columns), then desktop (three). */
:root { --card: #fffaf0; --line: #e8dcc6; --chip: #f3e7d1; }
@media (prefers-color-scheme: dark) {
  :root { --card: #342920; --line: #4a3b2e; --chip: #43352a; }
}
body.app { display: block; }
.top { padding: 12px 16px 4px; max-width: 70rem; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.25rem; color: var(--text); text-decoration: none; }
.where { margin: .5rem 0; }
.rough { color: var(--muted); font-size: .9rem; }
.zip { display: flex; gap: 8px; margin: .5rem 0 .75rem; }
.zip label { position: absolute; left: -9999px; }
.zip input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); }
.zip button, .button { font: inherit; font-weight: 600; min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--accent); color: #1c140d; display: inline-flex; align-items: center; text-decoration: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; }
.chips a { flex: none; min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; background: var(--chip); color: var(--text); text-decoration: none; font-size: .95rem; }
.chips a[aria-current] { background: var(--accent); color: #1c140d; font-weight: 600; }
.list { max-width: 70rem; margin: 0 auto; padding: 8px 16px 24px; }
.list h2 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1.25rem 0 .5rem; }
.cards { display: grid; gap: 12px; }
.card { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.when { flex: none; width: 56px; height: 60px; border-radius: 10px; background: var(--accent); color: #1c140d; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.when.usually { background: var(--chip); color: var(--text); }
.mon { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.day { font-size: 1.5rem; font-weight: 700; margin-top: 2px; }
.what { min-width: 0; }
.what h3 { margin: 0 0 4px; font-size: 1.1rem; line-height: 1.3; }
.what h3 a { color: var(--text); text-decoration: none; }
.meta { margin: 0; color: var(--muted); font-size: .95rem; }
.miles { white-space: nowrap; }
.tags { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: var(--chip); }
.tag.draft { background: #c0392b; color: #fff; }
.buy { margin: 10px 0 0; }
.what .button { min-height: 40px; }
.empty, .note { color: var(--muted); }
.note { font-size: .85rem; margin-top: 1.5rem; }
/* Newspaper columns (Paul, 2026-10-19): each card straight under the one above, no holes. */
@media (min-width: 700px) { .cards { display: block; columns: 2; column-gap: 12px; } .card { break-inside: avoid; margin-bottom: 12px; } }
@media (min-width: 1100px) { .cards { columns: 3; } }
.notice { margin: .25rem 0 .5rem; padding: 8px 12px; border-radius: 10px; background: var(--chip); font-size: .95rem; }
.forget { font-size: .9rem; margin-left: 4px; white-space: nowrap; }
@media (min-width: 700px) { .zip { max-width: 22rem; } }
.locate { font: inherit; font-weight: 600; min-height: 44px; width: 100%; margin: 0 0 .25rem; border: 1px solid var(--accent); border-radius: 10px; background: transparent; color: var(--accent); }
.locate:disabled { opacity: .6; }
.locate-status { margin: 0 0 .5rem; color: var(--muted); font-size: .9rem; }
.locate-status:empty { display: none; }
@media (min-width: 700px) { .locate { width: auto; padding: 0 18px; } }
.expected { font-style: italic; }

/* /add: the "Send in a fest" form, one column on every screen. */
.add { max-width: 36rem; }
.add h1 { font-size: 1.8rem; margin: .5rem 0; }
.send .field { margin: 0 0 14px; border: 0; padding: 0; }
.send label, .send legend { display: block; font-weight: 600; margin-bottom: 4px; }
.send .opt { font-weight: 400; color: var(--muted); font-size: .9rem; }
.send input, .send select, .send textarea { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); }
.send .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.send .checks { display: flex; flex-wrap: wrap; gap: 8px; }
.send .check { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--chip); font-weight: 400; }
.send .check input { width: auto; min-height: 0; }
.send .hint { margin: 4px 0 0; font-size: .9rem; color: var(--muted); }
.send .err { margin: 4px 0 0; font-size: .95rem; color: #b3261e; font-weight: 600; }
.send .bad input, .send .bad select { border-color: #b3261e; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (prefers-color-scheme: dark) { .send .err { color: #ff8a80; } .send .bad input, .send .bad select { border-color: #ff8a80; } }

/* Paid spots: always labeled, never dressed up as a fest. */
.tag.paid { background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.card.featured { border: 2px solid var(--accent); }
.card.ad { display: block; }
.card.ad img { display: block; width: 100%; max-width: 300px; height: auto; margin: 6px auto 0; border-radius: 8px; }
.card.ad ul { margin: 6px 0 0; padding-left: 1.1rem; }
.card.house a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); }
.card.house { border-style: dashed; }
.prices { border-collapse: collapse; width: 100%; }
.prices th, .prices td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.prices s { color: var(--muted); font-size: .9em; }

/* /add and /advertise: header lines up with the narrow column; plan cards are plain blocks, one column. */
.top.narrow { max-width: 36rem; }
.add .cards { display: grid; columns: auto; gap: 12px; }
.add .cards .card { display: block; margin: 0; }
.add .cards .card h2 { text-transform: none; letter-spacing: 0; color: var(--text); font-size: 1.15rem; margin: 0 0 .25rem; }
.add .cards .card p { margin: 0; }

/* /stats: Paul's traffic dashboard. */
.stats { max-width: 70rem; }
.stats h1 { font-size: 1.8rem; margin: .5rem 0; }
.card.stat { display: block; margin-bottom: 12px; }
.card.stat h2 { text-transform: none; letter-spacing: 0; color: var(--text); font-size: 1.05rem; margin: 0 0 .5rem; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.facts b { display: block; font-size: 1.8rem; line-height: 1.1; color: var(--accent); }
.facts small { display: block; color: var(--muted); font-size: .8rem; }
.chart { width: 100%; height: auto; max-height: 220px; }
.chart .bar { fill: var(--accent); }
.chart text { font-size: 11px; fill: var(--muted); }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 3.5rem; gap: 10px; align-items: center; font-size: .9rem; }
.bars li > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars b { text-align: right; }
.bars progress { width: 100%; height: 10px; appearance: none; border: 0; border-radius: 5px; background: var(--chip); overflow: hidden; }
.bars progress::-webkit-progress-bar { background: var(--chip); border-radius: 5px; }
.bars progress::-webkit-progress-value { background: var(--accent); border-radius: 5px; }
.bars progress::-moz-progress-bar { background: var(--accent); border-radius: 5px; }
.keylink { word-break: break-all; }

/* /inbox: Paul's site mail. */
.inbox .mail { list-style: none; margin: 0; padding: 0; }
.inbox .mail li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.mailbody { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: .95rem; margin: .5rem 0; }
.inbox .send textarea { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }

/* /fest/<id> and the state pages. */
.card.fest { display: block; max-width: 44rem; }
.card.fest h1 { margin: 0 0 4px; }
.big { font-size: 1.25rem; font-weight: 700; margin: 12px 0 2px; }
.states { margin-top: 16px; }
.chips.towns { flex-wrap: wrap; overflow: visible; }
.chips.towns small { margin-left: 6px; color: var(--muted); font-size: .8rem; }

/* "Worth the drive" inside the logo link, so the flex row centers it on the icon; one line on a small phone. */
.tagline { margin-left: 2px; color: var(--muted); font-size: .95rem; font-weight: 400; white-space: nowrap; position: relative; top: 2px; }

/* /advertise: the sample picture ad. */
.sample { max-width: 22rem; }
.sample .card.ad { margin-bottom: 6px; }

/* "Add to phone" in the top right of every page; gone once it's opened from the home screen. */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.add-phone { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-weight: 600; font-size: .9rem; text-decoration: none; }
@media (max-width: 359px) { .tagline { display: none; } }
@media (display-mode: standalone) { .add-phone { display: none; } }
.steps { margin: 0 0 .5rem; padding-left: 1.4rem; }
.steps li { margin: 0 0 .4rem; }

/* 404 and error pages (src/pages.js): the tipped glass, centered. */
.oops { text-align: center; }
.spill { display: block; width: 100%; max-width: 360px; height: auto; margin: .5rem auto 0; }
/* Fests / Breweries switch at the top of the lists */
.chips.views { margin: 4px 0 2px; }
.card.brewery { display: block; }
.card.brewery h3 { margin: 0 0 2px; }
.card.brewery .tags { align-items: center; }
/* /check: Paul's one-tap brewery check */
.check h1 small { font-size: .9rem; color: var(--muted); font-weight: 400; margin-left: 6px; }
.check-card { display: block; }
.check-card h2 { text-transform: none; letter-spacing: 0; color: var(--text); font-size: 1.25rem; margin: 0 0 4px; }
.suggest { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: var(--chip); }
.suggest-publish { border-left: 4px solid #2e8b57; }
.suggest-closed, .suggest-leave_off { border-left: 4px solid #c0392b; }
.suggest-unsure { border-left: 4px solid var(--accent); }
.check-form { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.check-form input[type=url], .check-form input:not([type]) { font: inherit; min-height: 44px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.check-form .lead-box { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.check-form .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.check-form .actions .button { justify-content: center; }
.leads { margin: 0; padding-left: 1.1rem; }
.leads li { margin: 6px 0; }
.buy .button + .button, .tags .button + .button { margin-left: 6px; }
/* Fest and brewery pages: the buttons share one row on a phone, equal widths */
.card.fest .actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.card.fest .actions .button { justify-content: center; padding: 0 8px; white-space: nowrap; }
/* The whole card opens the fest or brewery (a beer buddy's idea, 2026-10-21): the title link is stretched
   over the card, and the buttons and other links sit above it so they still work on their own. */
.cards .card { position: relative; }
.cards .card h3 a::after { content: ''; position: absolute; inset: 0; border-radius: 14px; }
.cards .card .button, .cards .card .tags a, .cards .card .meta a, .cards .card .buy a { position: relative; z-index: 1; }
.cards .card:has(h3 a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.cards .card h3 a:focus-visible { outline: none; }
@media (hover: hover) { .cards .card:has(h3 a):hover { border-color: var(--accent); } }
.listed textarea { width: 100%; box-sizing: border-box; font: .85rem/1.4 ui-monospace, Menlo, monospace; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.listed label { display: block; font-weight: 600; margin-top: 8px; }
