:root {
  --blue: #9ac8eb;
  --blue-deep: #6eafdf;
  --blue-soft: #c5e2f5;
  --pink: #e73059;
  --pink-deep: #c42048;
  --ink: #1a1a1a;
  --ink-soft: #4a5560;
  --paper: #ffffff;
  --paper-wash: rgba(255, 255, 255, 0.94);
  --accent: var(--pink);
  --accent-deep: var(--pink-deep);
  --marker: var(--pink);
  --marker-ring: rgba(231, 48, 89, 0.4);
  --line: rgba(26, 26, 26, 0.1);
  --shadow: 0 12px 40px rgba(26, 26, 26, 0.16);
  --header-h: auto;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-display: "Montserrat", system-ui, sans-serif;
  --font-body: "Montserrat", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--blue);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
}

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--header-h);
  padding: 0.5rem 0.85rem;
  padding-top: max(0.5rem, env(safe-area-inset-top));
  background: linear-gradient(
      120deg,
      var(--blue) 0%,
      var(--blue-deep) 55%,
      #5a9fd4 100%
    );
  border-bottom: 2px solid rgba(231, 48, 89, 0.2);
  box-shadow: 0 4px 20px rgba(110, 175, 223, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  display: block;
  width: auto;
  height: clamp(3rem, 10vw, 100px);
  max-height: 100px;
  flex-shrink: 0;
  border-radius: 0.35rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 3.4vw, 1.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--pink);
}

.brand-tag {
  margin: 0.15rem 0 0;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.35;
  color: #fff;
  max-width: 14rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.brand-mayor {
  font-weight: 600;
}

.list-toggle {
  flex-shrink: 0;
  appearance: none;
  border: 2px solid var(--pink);
  background: var(--pink);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.list-toggle[aria-expanded="true"],
.list-toggle:hover {
  background: #fff;
  color: var(--pink);
  border-color: var(--pink);
}

.list-toggle:active {
  transform: scale(0.97);
}

.map-shell {
  position: relative;
  flex: 1;
  min-height: 0;
}

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.venue-list {
  position: absolute;
  z-index: 4;
  inset: 0.75rem;
  top: 0.75rem;
  bottom: calc(0.75rem + var(--safe-bottom));
  max-width: 22rem;
  margin-left: auto;
  background: var(--paper-wash);
  border: 2px solid var(--blue);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: sheet-in 0.35s var(--ease);
}

.venue-list[hidden] {
  display: none;
}

.venue-list-inner {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem;
}

.venue-list-item {
  display: block;
  width: 100%;
  text-align: left;
  appearance: none;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  padding: 0.85rem 0.9rem;
  border-radius: 0.65rem;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.venue-list-item:hover,
.venue-list-item:focus-visible {
  background: rgba(154, 200, 235, 0.45);
  outline: none;
}

.venue-list-item .name {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
}

.venue-list-item .addr {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.map-marker {
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  background: var(--marker);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px var(--marker-ring);
  transform: rotate(-45deg);
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.map-marker:hover,
.map-marker:focus-visible {
  transform: rotate(-45deg) scale(1.25);
  box-shadow: 0 4px 14px var(--marker-ring);
  outline: none;
}

.map-marker.is-active {
  background: #fff;
  border-color: var(--pink);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.55);
  transform: rotate(-45deg) scale(1.25);
  outline: none;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: rgba(26, 26, 26, 0.4);
  animation: fade-in 0.25s var(--ease);
}

.sheet-backdrop[hidden] {
  display: none;
}

.detail-sheet {
  position: fixed;
  z-index: 9;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(72vh, 34rem);
  background: var(--blue-deep);
  box-shadow: var(--shadow);
  padding: 0.35rem 1.15rem calc(1.25rem + var(--safe-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: sheet-up 0.4s var(--ease);
}

.detail-sheet[hidden] {
  display: none;
}

.sheet-handle {
  width: 2.5rem;
  height: 0.28rem;
  margin: 0.45rem auto 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
}

.sheet-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.55);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--pink);
  font-family: var(--font-body);
  font-weight: 700;
}

.sheet-close:hover {
  background: #fff;
  color: var(--pink-deep);
}

.sheet-body {
  padding-right: 2rem;
  color: #fff;
}

.sheet-body h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #fff;
}

.sheet-address {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  line-height: 1.4;
}

.sheet-note {
  margin: 0 0 0.75rem;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
}

.sheet-artists-label {
  margin: 1rem 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
}

.sheet-artists {
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
}

.sheet-artists li {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.sheet-artists li:last-child {
  border-bottom: none;
}

.sheet-maps-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  background: var(--pink);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.sheet-maps-link:hover {
  background: var(--pink-deep);
}

.sheet-maps-link:active {
  transform: scale(0.98);
}

.site-footnote {
  position: absolute;
  z-index: 3;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(0.5rem + var(--safe-bottom));
  margin: 0;
  pointer-events: none;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(26, 26, 26, 0.6);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-bottom-right {
  margin-bottom: 1.75rem !important;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .site-header {
    padding-left: 1.35rem;
    padding-right: 1.35rem;
  }

  .brand-logo {
    height: 100px;
  }

  .brand-tag {
    max-width: none;
    font-size: 0.75rem;
  }

  .brand-name {
    font-size: 1.35rem;
  }

  .detail-sheet {
    left: auto;
    right: 1.25rem;
    bottom: 1.25rem;
    width: min(24rem, calc(100vw - 2.5rem));
    max-height: min(80vh, 36rem);
    border-radius: 1.15rem;
    border: 3px solid var(--pink);
    animation: sheet-in 0.35s var(--ease);
  }

  .sheet-handle {
    display: none;
  }

  .sheet-backdrop {
    background: transparent;
    pointer-events: none;
  }

  .site-footnote {
    left: auto;
    right: 1rem;
    bottom: 0.65rem;
    max-width: 18rem;
    text-align: right;
  }
}

@media (max-width: 380px) {
  .brand-tag {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
