:root {
  color-scheme: light;
  --bg: #f6f1e8;
  --panel: #fffdf8;
  --ink: #1f1a14;
  --muted: #5c5348;
  --line: #e2d8c8;
  --accent: #9a3412;
  --shadow: 0 12px 40px rgba(31, 26, 20, 0.08);
  font-family: "Source Sans 3", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
}

body {
  min-width: 320px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

h1,
h2,
h3 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  line-height: 1.15;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem clamp(1rem, 3vw, 2.5rem) 0.85rem;
  color: var(--ink);
  background: linear-gradient(180deg, #fffdf8 0%, var(--bg) 100%);
}

.eyebrow {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.intro {
  margin: 0.35rem 0 0;
  max-width: 42rem;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.92rem;
}

.app-shell {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(17rem, 24rem) minmax(0, 1fr);
  min-height: 0;
}

.venue-panel {
  overflow-y: auto;
  padding: 0.75rem 1rem 0.5rem;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.search-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

#venue-search {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fff;
  color: inherit;
  font: inherit;
}

#venue-search:focus-visible,
.venue-card-main:focus-visible,
.venue-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.result-count {
  margin: 0.75rem 0 0.5rem;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.15rem;
  color: var(--accent);
}

.venue-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0.65rem 0 0.5rem;
  list-style: none;
}

.venue-card {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #fff;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.venue-card-main {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.venue-card:hover,
.venue-card[aria-current="true"] {
  border-color: #c4a574;
  background: #fff;
  box-shadow: var(--shadow);
}

.venue-name {
  display: block;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.15;
}

.venue-meta {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.venue-address {
  display: block;
  margin-top: 0.35rem;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
}

.venue-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.venue-link {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}

.venue-link:hover {
  border-color: var(--accent);
  background: var(--bg);
  color: var(--accent);
}

.map-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
}

#map {
  width: 100%;
  height: 100%;
  background: #e7e6df;
}

.popup-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.popup-warning {
  margin: 0.45rem 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.popup-address {
  margin: 0.35rem 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

@media (max-width: 760px) {
  body {
    height: auto;
    overflow: auto;
  }

  .site-header {
    align-items: stretch;
    flex-direction: column;
    gap: 0.35rem;
    padding-block: 1rem 0.85rem;
  }

  .app-shell {
    flex: none;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(18rem, 46vh) minmax(19rem, 1fr);
    min-height: 0;
  }

  .map-panel {
    grid-row: 1;
  }

  .venue-panel {
    grid-row: 2;
    border-top: 1px solid var(--line);
    border-right: 0;
  }
}
