:root {
  color-scheme: light;
  background: #ffffff;
}

@font-face {
  font-family: "Twigs New Roman";
  src: url("assets/TwigsNewRoman.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  font-family: "Twigs New Roman", ui-serif, Georgia, serif;
  background: #ffffff;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  cursor: grab;
  touch-action: none;
}

.stage:active {
  cursor: grabbing;
}

#globe {
  display: block;
  width: 100%;
  height: 100%;
}

.pigeon-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

body.is-recalled .stage {
  cursor: default;
  touch-action: pan-y;
}

body.is-recalled .pigeon-layer {
  overflow-y: auto;
  pointer-events: auto;
  touch-action: pan-y;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.is-recalled .pigeon-layer.is-recall-scroll-locked {
  overflow-y: hidden;
}

body.is-recalled .pigeon-layer::after {
  content: "";
  display: block;
  height: var(--recall-scroll-height, 100vh);
}

.pigeon-pin {
  position: absolute;
  width: 90px;
  height: 90px;
  display: block;
  transform: translate(-50%, -50%);
  transform-origin: center;
  will-change: left, top, opacity, transform;
  pointer-events: auto;
  text-decoration: none;
  isolation: isolate;
}

.pigeon-pin::before {
  content: "";
  position: absolute;
  inset: -18px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 0, 0.95) 0%, rgba(255, 236, 0, 0.55) 38%, rgba(255, 236, 0, 0) 72%);
  opacity: 0;
  transform: scale(0.72);
  transition:
    opacity 260ms ease-in-out,
    transform 520ms ease-in-out;
  pointer-events: none;
}

.pigeon-pin.is-top-layer {
  z-index: 8;
}

.pigeon-pin.is-search-highlight::before {
  inset: -26px -34px -34px;
  border-radius: 999px;
  opacity: 1;
  transform: scale(1);
  animation: search-glow-pulse 1.5s ease-in-out infinite;
}

.pigeon-pin.is-search-highlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  z-index: 10;
}

.pigeon-pin.is-search-highlight img {
  width: 90px;
  height: 90px;
  flex: 0 0 auto;
}

@keyframes search-glow-pulse {
  0%,
  100% {
    opacity: 0.28;
    transform: scale(0.82);
  }

  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

.merch-pin {
  position: absolute;
  display: block;
  transform: translate(-50%, -50%);
  transform-origin: center;
  will-change: left, top, opacity, transform;
  pointer-events: auto;
  text-decoration: none;
  overflow: visible;
  transition: opacity 260ms ease-in-out;
}

.pigeon-pin img,
.merch-pin img,
.vault-pigeon img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

.merch-pin img {
  object-fit: contain;
}

.pigeon-pin__label {
  display: none;
}

.pigeon-pin.is-recalled {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.pigeon-pin.is-recalled img {
  width: 86px;
  height: 86px;
  flex: 0 0 auto;
}

.pigeon-pin.is-recalled .pigeon-pin__label,
.pigeon-pin.is-search-highlight .pigeon-pin__label {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 150px;
  max-width: 150px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  -webkit-text-stroke: 1px #8e8e8e;
  paint-order: stroke fill;
  mix-blend-mode: exclusion;
}

.pigeon-pin.is-search-highlight .pigeon-pin__label {
  -webkit-text-stroke-color: #ffec00;
  mix-blend-mode: normal;
}

.pigeon-pin.is-recalled.is-sold-out::after {
  content: "";
  position: absolute;
  top: 6px;
  z-index: 3;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: green;
  pointer-events: none;
}

.pigeon-pin.is-recalled.is-sold-out.has-dot-left::after {
  left: 6px;
}

.pigeon-pin.is-recalled.is-sold-out.has-dot-right::after {
  right: 6px;
}

.pigeon-pin__number,
.pigeon-pin__name {
  display: block;
}

.top-controls {
  position: fixed;
  top: 36px;
  left: 24px;
  right: 24px;
  z-index: 3;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  pointer-events: auto;
}

.map-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 20px;
  align-items: center;
}

.map-button {
  width: auto;
  height: 40px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #1f1f1f;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #111111;
  font: 500 14px/20px "Twigs New Roman", ui-serif, Georgia, serif;
  cursor: pointer;
}

#recallButton {
  width: 104px;
}

.map-button:hover {
  background: rgba(255, 255, 255, 0.94);
}

.map-search {
  position: relative;
  display: grid;
  flex: 0 1 430px;
  grid-template-columns: auto 1fr;
  align-items: center;
  margin-left: auto;
  width: clamp(280px, 34vw, 430px);
  max-width: 430px;
  min-width: 280px;
  pointer-events: auto;
}

.map-search__icon {
  grid-column: 1;
  grid-row: 1;
  z-index: 1;
  padding-left: 18px;
  color: #111111;
  font: 500 15px/40px "Twigs New Roman", ui-serif, Georgia, serif;
  pointer-events: none;
}

.map-search__input {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  height: 40px;
  padding: 0 46px 0 88px;
  border: 1px solid #1f1f1f;
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, 0.72);
  color: #111111;
  font: 500 16px/40px "Twigs New Roman", ui-serif, Georgia, serif;
  text-transform: uppercase;
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}

.map-search__input::-webkit-search-cancel-button {
  display: none;
}

.map-search__input::placeholder {
  color: rgba(17, 17, 17, 0.44);
  opacity: 1;
}

.map-search__input:focus {
  background: rgba(255, 255, 255, 0.94);
}

.map-search__clear {
  grid-column: 2;
  grid-row: 1;
  z-index: 1;
  justify-self: end;
  width: 40px;
  height: 40px;
  padding: 0 14px 0 0;
  border: 0;
  background: transparent;
  color: #111111;
  font: 500 22px/40px "Twigs New Roman", ui-serif, Georgia, serif;
  text-align: right;
  cursor: pointer;
}

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

.map-search__error {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 5px 0 0 24px;
  color: #d90000;
  font: 500 13px/18px "Twigs New Roman", ui-serif, Georgia, serif;
}

.vault {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: auto;
  display: grid;
  place-items: center;
}

.vault[hidden] {
  display: none;
}

.vault__box {
  position: relative;
  width: 60vw;
  height: 70vh;
  border: 1px solid #008d8e;
  background: rgba(255, 255, 255, 0.95);
  overflow: hidden;
  pointer-events: auto;
}

.vault__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  color: #111111;
  font: 500 24px/32px "Twigs New Roman", ui-serif, Georgia, serif;
  letter-spacing: 0;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 0.16em;
  text-transform: none;
}

.vault-pigeon {
  position: absolute;
  width: 105px;
  height: 105px;
  display: block;
  transform-origin: center;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  text-decoration: none;
  user-select: none;
  -webkit-user-drag: none;
}

.vault-pigeon.is-dragging {
  cursor: grabbing;
  z-index: 5;
}

.vault-pigeon.is-search-target {
  z-index: 10;
}

.camera-control {
  position: fixed;
  top: 50%;
  right: 30px;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 8px;
  transform: translateY(-50%);
  color: #211900;
  font-size: 12px;
  font-weight: 700;
  pointer-events: auto;
  user-select: none;
  opacity: 1;
  transition: opacity 260ms ease-in-out;
}

.camera-control__label,
.camera-control__value {
  min-width: 26px;
  padding: 0;
  background: transparent;
  border: 0;
  color: #111111;
  font-size: 16px;
  line-height: 18px;
  text-align: center;
}

.camera-control__track {
  --slider-ratio: 0.46;
  --slider-thumb-size: 48px;
  --slider-thumb-half: calc(var(--slider-thumb-size) / 2);
  position: relative;
  width: 30px;
  height: min(55vh, 440px);
  min-height: 260px;
}

.camera-control__track::before,
.camera-control__track::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.camera-control__track::before {
  top: var(--slider-thumb-half);
  bottom: var(--slider-thumb-half);
  width: 3px;
  border-radius: 999px;
  background: #111111;
}

.camera-control__track::after {
  top: calc(var(--slider-thumb-half) + (100% - var(--slider-thumb-size)) * var(--slider-ratio));
  width: 26px;
  height: var(--slider-thumb-size);
  transform: translate(-50%, -50%);
  border: 1.5px solid #111111;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.camera-control__slider {
  position: absolute;
  inset: var(--slider-thumb-half) 0;
  width: 30px;
  height: calc(100% - var(--slider-thumb-size));
  margin: 0;
  opacity: 0;
  cursor: ns-resize;
  writing-mode: vertical-lr;
  direction: rtl;
}

@media (max-width: 660px) {
  .vault {
    align-items: start;
    padding-top: 138px;
    padding-bottom: 18px;
  }

  .vault__box {
    width: 80vw;
    height: calc(100vh - 156px);
    max-height: 70vh;
  }

  .top-controls {
    top: 18px;
    left: 18px;
    right: 18px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .map-actions {
    justify-content: space-between;
    width: 100%;
  }

  .map-button {
    font-size: 16px;
  }

  #recallButton {
    width: 124px;
    justify-content: flex-start;
  }

  .map-search {
    width: 100%;
    max-width: none;
    min-width: 0;
    justify-self: stretch;
  }

  .map-search__icon {
    padding-left: 24px;
    font-size: 16px;
  }

  .map-search__input {
    width: 100%;
    padding: 0 46px 0 96px;
  }

  .camera-control {
    top: calc(138px + (100dvh - 162px) / 2);
    right: 18px;
  }

  .camera-control__track {
    height: clamp(170px, calc(100dvh - 214px), 360px);
    min-height: 0;
  }

  body.is-recalled .camera-control {
    opacity: 0;
    pointer-events: none;
  }

  .pigeon-pin.is-recalled.is-sold-out::after {
    width: 18px;
    height: 18px;
  }
}
