* {
  box-sizing: border-box;
}

:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: #233033;
  background: #f5efe5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --cream: #faf6ee;
  --cream-deep: #efe6d7;
  --line: #ded4c5;
  --green: #1f6d58;
  --green-strong: #1f7a5c;
  --ink: #233033;
  --muted: #5d6c70;
  --gold: #8a6d3b;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input {
  color: inherit;
}

a {
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(360px, 460px) 1fr;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  position: relative;
  z-index: 2;
  overflow-y: auto;
  scroll-behavior: smooth;
  background: var(--cream);
  border-right: 1px solid var(--line);
}

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

.map-view {
  width: 100%;
  height: 100%;
}

.map-status {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: min(360px, calc(100% - 40px));
  padding: 14px 18px;
  transform: translate(-50%, -50%);
  border: 1px solid #d4c8b8;
  border-radius: 12px;
  background: rgba(250, 246, 238, 0.96);
  box-shadow: 0 14px 36px rgba(35, 48, 51, 0.14);
  text-align: center;
  line-height: 1.45;
}

.map-status[hidden] {
  display: none;
}

.brand {
  padding: 28px 28px 22px;
  border-bottom: 1px solid #e2d8ca;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #1d2b34;
  font-size: clamp(30px, 3vw, 36px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.subtitle {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.search-panel {
  padding: 22px 28px;
  border-bottom: 1px solid #e2d8ca;
}

.search-panel label,
.field-label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 900;
}

.filter-grid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

input,
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cfc4b5;
  border-radius: 12px;
  background: #fff;
  outline: none;
}

input:focus,
select:focus,
.clear-button:focus-visible,
.venue-card:focus-visible {
  border-color: var(--green-strong);
  box-shadow: 0 0 0 3px rgba(31, 122, 92, 0.16);
  outline: none;
}

.clear-button {
  width: 100%;
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid #cfc4b5;
  border-radius: 12px;
  background: transparent;
  color: #44565a;
  font-weight: 800;
  cursor: pointer;
}

.clear-button:hover {
  background: #f1e9dc;
}

.region-profile {
  margin: 20px 28px 0;
  padding: 18px;
  background: var(--cream-deep);
  border: 1px solid #dfd0ba;
  border-radius: 18px;
}

.region-profile[hidden] {
  display: none;
}

.region-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.region-title-row h2 {
  margin: 0;
  color: #1d2b34;
  font-size: 22px;
}

.region-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 34px;
  border: 1px solid #ddcfbb;
  border-radius: 999px;
  background: #fff;
  color: #6d5530;
  font-weight: 900;
}

.region-profile p {
  margin: 10px 0 0;
  color: #4e5c60;
  line-height: 1.45;
}

.results-panel {
  padding: 22px 28px 28px;
}

.results-header {
  margin-bottom: 14px;
}

.results-header p {
  margin: 0;
  color: #45575c;
  font-weight: 900;
}

.venue-list {
  display: grid;
  gap: 14px;
}

.venue-card {
  position: relative;
  padding: 24px 68px 22px 24px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e1d8ca;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(60, 45, 26, 0.08);
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease,
    transform 180ms ease;
}

.venue-card:hover {
  transform: translateY(-1px);
  border-color: #c7bba9;
  box-shadow: 0 14px 30px rgba(60, 45, 26, 0.13);
}

.venue-card-selected {
  transform: translateY(-2px);
  border-color: var(--green-strong);
  box-shadow: 0 16px 38px rgba(31, 122, 92, 0.17);
}

.card-topline {
  margin-bottom: 16px;
}

.rentable-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid #b9dbc9;
  border-radius: 999px;
  background: #e5f3ec;
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.venue-card-icon {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 27px;
  height: 27px;
  object-fit: contain;
}

.venue-card h2 {
  margin: 0 0 10px;
  color: #1d2b34;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.venue-card p {
  margin: 0 0 10px;
  color: #1d2b34;
  line-height: 1.45;
}

.venue-card strong {
  font-weight: 900;
}

.venue-card .location {
  color: #68787b;
  font-size: 16px;
}

.expandable-card-content {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  transition: grid-template-rows 280ms ease, opacity 180ms ease,
    margin-top 280ms ease;
}

.expandable-card-inner {
  overflow: hidden;
}

.venue-card-expanded .expandable-card-content {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 14px;
}

.details-description {
  margin: 0 0 18px !important;
  color: #3f5054 !important;
  line-height: 1.5 !important;
}

.details-grid {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-item {
  padding-top: 12px;
  border-top: 1px solid #eee5d8;
}

.detail-item dt {
  margin: 0 0 4px;
  color: #7a6849;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-item dd {
  margin: 0;
  color: #263438;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.card-links a {
  font-weight: 900;
}

.empty-state {
  padding: 26px;
  border: 1px dashed #cfc4b5;
  border-radius: 18px;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 8px;
  color: #1d2b34;
  font-size: 20px;
}

.empty-state p {
  margin: 0;
  color: #68787b;
  line-height: 1.45;
}

.popup {
  max-width: 260px;
  color: #233033;
}

.popup-title {
  display: block;
  margin-bottom: 6px;
  color: #1d2b34;
  font-size: 16px;
}

.popup p {
  margin: 5px 0;
  line-height: 1.35;
}

.popup a {
  color: var(--green);
  font-weight: 900;
}

.mapboxgl-popup-content {
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(35, 48, 51, 0.18);
}

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

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 48vh 52vh;
    min-height: 100vh;
  }

  .map-panel {
    grid-row: 1;
    height: 48vh;
  }

  .sidebar {
    grid-row: 2;
    border-top: 1px solid var(--line);
    border-right: none;
  }

  .brand,
  .search-panel,
  .results-panel {
    padding-left: 20px;
    padding-right: 20px;
  }

  .region-profile {
    margin-left: 20px;
    margin-right: 20px;
  }
}

@media (max-width: 520px) {
  .app-shell {
    grid-template-rows: 42vh 58vh;
  }

  .map-panel {
    height: 42vh;
  }

  h1 {
    font-size: 30px;
  }

  .venue-card {
    padding: 22px 58px 20px 20px;
  }

  .venue-card-icon {
    top: 20px;
    right: 18px;
  }
}
