* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  font-family: Suisse, sans-serif;
  letter-spacing: -0.3px;
}

#map {
  position: absolute;
  inset: 0;
}

.maplibregl-ctrl-attrib,
.maplibregl-ctrl-logo {
  display: none !important;
}

.top-bar {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  pointer-events: none;
  width: 520px;
}

.top-bar-inner {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 10px 0 0;
}

.top-bar-header {
  padding: 0 16px 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.top-bar-title {
  font-weight: 600;
  font-size: 18px;
  color: #000;
}

.top-bar-meta {
  font-size: 11px;
  color: #999;
  white-space: nowrap;
}

.meta-link {
  color: #999;
  text-decoration: none;
}

.meta-link:hover {
  color: #000;
}

.info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: transparent;
  color: #999;
  font-family: Suisse, sans-serif;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  vertical-align: middle;
  margin-left: 1px;
  transition: color 0.15s, border-color 0.15s;
}

.info-btn:hover {
  color: #000;
  border-color: rgba(0, 0, 0, 0.4);
}

.info-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-modal.hidden {
  display: none;
}

.info-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}

.info-modal-content {
  position: relative;
  background: #fff;
  border-radius: 14px;
  padding: 28px 28px 22px;
  max-width: 460px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  font-family: Suisse, sans-serif;
  letter-spacing: -0.3px;
}

.info-modal-content h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 600;
}

.info-modal-content h3 {
  margin: 18px 0 6px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #999;
}

.info-modal-content p {
  margin: 0 0 10px;
  font-size: 13px;
  color: #444;
  line-height: 1.5;
}

.info-modal-content a {
  color: #000;
}

.info-footer {
  margin-top: 18px !important;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 12px !important;
  color: #999 !important;
}

.info-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 22px;
  color: #999;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.info-modal-close:hover {
  color: #000;
}

.city-row {
  display: flex;
  align-items: center;
  gap: 0;
  padding-bottom: 10px;
}

.row-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  padding: 0 6px 0 10px;
  flex-shrink: 0;
  user-select: none;
}

.city-scroll {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 12px 2px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.city-scroll::-webkit-scrollbar {
  display: none;
}

.city-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 8px 5px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  min-width: 64px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.city-card:hover {
  background: rgba(0, 0, 0, 0.04);
}

.city-card.active {
  border-color: #000;
  background: rgba(0, 0, 0, 0.04);
}

.city-card.disabled {
  opacity: 0.25;
  pointer-events: none;
}

.city-card-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.city-card-name {
  font-size: 10px;
  font-weight: 600;
  color: #000;
  white-space: nowrap;
  line-height: 1.1;
  text-align: center;
}

.city-card-region {
  font-size: 9px;
  color: #999;
  white-space: nowrap;
  line-height: 1;
  text-align: center;
  letter-spacing: 0;
}

.attribution {
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 10;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.7);
  font-family: Suisse, sans-serif;
  font-size: 10px;
  color: #666;
  letter-spacing: 0;
  border-top-left-radius: 4px;
}

.maplibregl-popup-content {
  border-radius: 10px;
  padding: 14px;
  font-family: Suisse, sans-serif;
  letter-spacing: -0.3px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.popup-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #000;
}

.popup-match {
  margin: 3px 0 8px;
  font-size: 13px;
  color: #666;
}

.popup-text {
  margin: 0 0 6px;
  font-size: 12px;
  color: #888;
  line-height: 1.4;
}

.popup-alt {
  margin: 0;
  font-size: 11px;
  color: #aaa;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .top-bar {
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
  }

  .top-bar-inner {
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
  }

  .city-card {
    min-width: 56px;
    padding: 5px 6px 4px;
  }

  .city-card-icon {
    width: 20px;
    height: 20px;
  }
}
