.campus-map-label-layer {
  position: absolute;
  z-index: 5;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.campus-intro,
.campus-toolbar,
.campus-detail,
.campus-map-note,
.campus-gestures {
  z-index: 8;
}

.campus-intro {
  transition: opacity 160ms ease, visibility 160ms ease;
}

.app-shell__scene.campus-map-labels-zoomed .campus-intro {
  visibility: hidden;
  opacity: 0;
}

.campus-map-label-layer[hidden],
.campus-map-label[hidden] {
  display: none;
}

.campus-map-label {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  max-width: 12.8rem;
  padding: 0.32rem 0.58rem 0.34rem;
  color: rgba(53, 47, 41, 0.82);
  font-family: inherit;
  font-size: 0.69rem;
  font-weight: 760;
  line-height: 1.1;
  white-space: nowrap;
  background: rgba(255, 252, 247, 0.45);
  border: 1px solid rgba(205, 189, 166, 0.32);
  border-radius: 999px;
  box-shadow: 0 0.2rem 0.55rem rgba(60, 45, 29, 0.07);
  backdrop-filter: blur(2px);
  cursor: pointer;
  pointer-events: auto;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
  transform-origin: 50% 100%;
  will-change: transform;
}

.campus-map-label::after {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  width: 7px;
  height: 7px;
  box-sizing: border-box;
  background: #ad1930;
  border: 1px solid rgba(255, 252, 247, .9);
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 1px 4px rgba(91, 41, 39, .22);
  content: "";
  transform: translateX(-50%) rotate(-45deg);
}

.campus-map-label__dot {
  width: 0.39rem;
  height: 0.39rem;
  flex: 0 0 auto;
  background: #ad1930;
  border-radius: 50%;
  box-shadow: 0 0 0 0.13rem #ad193024;
}

.campus-map-label__text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.campus-map-label.is-selected {
  z-index: 2;
  color: #352f29;
  background: rgba(255, 252, 247, 0.97);
  border-color: rgba(169, 25, 50, 0.6);
  box-shadow: 0 0.35rem 0.9rem rgba(60, 45, 29, 0.2);
}

.campus-map-label:hover,
.campus-map-label:focus-visible {
  z-index: 3;
  color: #2f2624;
  background: rgb(255, 252, 247);
  border-color: rgba(169, 25, 50, 0.75);
  box-shadow: 0 0.35rem 0.9rem rgba(60, 45, 29, 0.22);
}

.campus-map-label:focus-visible {
  outline: 2px solid #a91932;
  outline-offset: 3px;
}

.campus-map-label.is-selected::after {
  background: #ad1930;
  box-shadow: 0 1px 5px rgba(91, 41, 39, .3);
}

.campus-map-label.is-selected .campus-map-label__dot {
  background: #ad1930;
  box-shadow: 0 0 0 0.13rem #ad193024;
}

@media (prefers-reduced-motion: reduce) {
  .campus-map-label { transition: none; }
}

@media (width <= 760px) {
  .campus-map-label {
    gap: 0.27rem;
    max-width: 9.8rem;
    padding: 0.27rem 0.47rem 0.29rem;
    font-size: 0.59rem;
    box-shadow: 0 0.22rem 0.58rem #3c2d1d2b;
  }

  .campus-map-label__dot {
    width: 0.34rem;
    height: 0.34rem;
  }

  .campus-map-label[data-priority="3"] {
    font-size: 0.63rem;
  }

  .campus-map-label[data-priority="2"] {
    font-size: 0.56rem;
  }
}
