:root {
  --red: #b42624;
  --red-dark: #761817;
  --cream: #fff1c7;
  --cream-soft: #fff8dc;
  --gold: #d6a232;
  --gold-deep: #8f651c;
  --ink: #23170f;
  --muted: #6d5643;
  --shadow: 0 18px 45px rgba(35, 23, 15, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

button,
input,
select {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  transform: translateY(-160%);
  background: var(--cream-soft);
  color: var(--red-dark);
  padding: 0.65rem 0.85rem;
  border: 2px solid var(--red-dark);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  height: 100dvh;
  min-height: 100vh;
  display: grid;
  grid-template-columns: clamp(20rem, 34vw, 28rem) minmax(0, 1fr);
  overflow: hidden;
}

.sidebar {
  background: linear-gradient(180deg, var(--red), var(--red-dark));
  color: var(--cream-soft);
  height: 100dvh;
  min-height: 0;
  padding: 1.35rem;
  overflow-y: auto;
  box-shadow: var(--shadow);
  z-index: 2;
}

.brand {
  border-bottom: 2px solid rgba(255, 241, 199, 0.58);
  padding-bottom: 1.2rem;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--gold);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.brand-title {
  margin: 0;
  line-height: 0;
}

.brand-logo {
  display: block;
  width: min(100%, 18.5rem);
  height: auto;
  max-height: 12.8rem;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

.lede {
  margin: 0.85rem 0 0;
  color: rgba(255, 248, 220, 0.88);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

.filters {
  display: grid;
  gap: 1rem;
  margin: 1.15rem 0;
  padding: 1.1rem;
  background: rgba(255, 248, 220, 0.06);
  border: 2px solid rgba(255, 241, 199, 0.22);
  border-radius: 24px;
}

.filters h2 {
  margin: 0 0 0.2rem;
  color: var(--cream-soft);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem 0.75rem;
  align-items: center;
}

.field label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field select,
.field input[type="search"],
.field input[type="range"] {
  grid-column: 1 / -1;
}

.field select,
.field input[type="search"] {
  width: 100%;
  min-height: 2.75rem;
  color: var(--cream-soft);
  background: rgba(255, 248, 220, 0.16);
  border: 2px solid rgba(255, 241, 199, 0.28);
  border-radius: 14px;
  padding: 0.72rem 0.8rem;
}

.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--cream-soft) 50%),
    linear-gradient(135deg, var(--cream-soft) 50%, transparent 50%);
  background-position:
    calc(100% - 1.25rem) 50%,
    calc(100% - 0.85rem) 50%;
  background-size: 0.45rem 0.45rem, 0.45rem 0.45rem;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
}

.field input[type="search"]::placeholder {
  color: rgba(255, 248, 220, 0.62);
}

.field select:focus,
.field input[type="search"]:focus,
.field input[type="range"]:focus {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.field select option {
  color: var(--ink);
  background: var(--cream-soft);
}

.field input[type="range"] {
  accent-color: var(--gold);
}

.field output {
  color: var(--cream);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
}

.summary {
  display: inline-flex;
  gap: 0.45rem;
  align-items: baseline;
  margin-bottom: 1rem;
  color: var(--cream-soft);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
}

.summary span:first-child {
  color: var(--gold);
  font-size: 1.8rem;
}

.leaderboard {
  display: grid;
  gap: 0.85rem;
  padding-bottom: 1rem;
}

.bar-card {
  background: var(--cream-soft);
  color: var(--ink);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 0.85rem;
  box-shadow: 0 10px 0 rgba(118, 24, 23, 0.24);
}

.bar-card.is-active {
  outline: 3px solid var(--cream);
  outline-offset: 2px;
}

.bar-topline,
.bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.rank {
  color: var(--red-dark);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
}

.rank-review-link {
  text-decoration-color: rgba(118, 24, 23, 0.44);
  text-underline-offset: 0.14em;
}

.rank-review-link:hover,
.rank-review-link:focus {
  color: var(--gold-deep);
}

.score {
  color: var(--red-dark);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
}

.bar-card h2 {
  margin: 0.35rem 0 0.55rem;
  font-size: 1.35rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.bar-name-link {
  color: inherit;
  text-decoration-color: rgba(118, 24, 23, 0.36);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.12em;
}

.bar-name-link:hover,
.bar-name-link:focus {
  color: var(--red-dark);
  text-decoration-color: currentColor;
}

.bar-meta,
.notes {
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  line-height: 1.35;
}

.notes {
  margin: 0.55rem 0 0;
}

.bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin-top: 0.65rem;
}

.bar-map-link,
.bar-review-link {
  color: var(--red-dark);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration-color: rgba(118, 24, 23, 0.44);
  text-underline-offset: 0.18em;
}

.bar-map-link:hover,
.bar-map-link:focus,
.bar-review-link:hover,
.bar-review-link:focus {
  color: var(--gold-deep);
}

.map-panel {
  height: 100dvh;
  min-height: 0;
  background: var(--gold);
  overflow: hidden;
}

.map {
  height: 100%;
  min-height: 0;
  width: 100%;
}

.map-fallback {
  display: grid;
  min-height: 100vh;
  place-items: center;
  margin: 0;
  padding: 1rem;
  background: var(--cream);
  color: var(--red-dark);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  text-align: center;
}

.info-window {
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  max-width: 14rem;
}

.info-window strong {
  display: block;
  color: var(--red-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}

.info-window span {
  display: block;
  margin-top: 0.2rem;
}

.info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.65rem;
  margin-top: 0.45rem;
}

.info-window a {
  display: inline-block;
  color: var(--red-dark);
  font-weight: 800;
}

@media (max-width: 1080px) {
  .brand-logo {
    width: min(100%, 17rem);
    max-height: 11.8rem;
  }

  .sidebar {
    padding: 1.1rem;
  }

  .bar-card h2 {
    font-size: 1.2rem;
  }
}

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

  .app-shell {
    height: auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  .sidebar {
    height: auto;
    min-height: auto;
    overflow: visible;
    padding: 1rem;
    box-shadow: none;
  }

  .brand {
    padding-bottom: 0.9rem;
  }

  .brand-logo {
    width: min(100%, 16rem);
    max-height: 11rem;
  }

  .lede {
    font-size: 0.95rem;
  }

  .filters {
    gap: 0.75rem;
    margin: 0.9rem 0;
  }

  .leaderboard {
    max-height: 54vh;
    overflow-y: auto;
    padding-right: 0.25rem;
  }

  .map-panel,
  .map,
  .map-fallback {
    height: 58vh;
    min-height: 24rem;
  }
}

@media (max-width: 520px) {
  .sidebar {
    padding: 1rem;
  }

  .bar-topline,
  .bar-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }
}

@media (max-width: 390px) {
  .sidebar {
    padding: 0.85rem;
  }

  .brand-logo {
    width: min(100%, 14.5rem);
    max-height: 10rem;
  }

  .bar-card {
    padding: 0.75rem;
  }

  .bar-card h2 {
    font-size: 1.08rem;
  }
}
