.ann-story-globe {
  --ann-story-globe-height: min(72vh, 680px);
  --ann-story-globe-border: var(--theme-border-color, #9aa5b0);
  --ann-story-globe-text: var(--theme-text-color, #3a4854);
  --ann-story-globe-heading: var(--theme-palette-color-4, #293241);
  --ann-story-globe-muted: var(--theme-link-initial-color, #5a6470);
  --ann-story-globe-accent: var(--theme-palette-color-1, #98c1d9);
  --ann-story-globe-hot: var(--theme-palette-color-2, #e84855);
  --ann-story-globe-surface: var(--theme-palette-color-8, #ffffff);
  --ann-story-globe-soft: var(--theme-palette-color-6, #f3f4f7);
  --ann-story-globe-page: #e8e2d5;
  --ann-story-globe-shadow: 0 12px 18px -6px rgba(34, 56, 101, 0.06);
  width: 100%;
  margin: 28px 0;
  color: var(--ann-story-globe-text);
  font-family: inherit;
}

.ann-story-globe,
.ann-story-globe * {
  box-sizing: border-box;
}

.ann-story-globe__panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 24px;
  border: 1px solid rgba(154, 165, 176, 0.4);
  border-radius: 3px;
  background: var(--ann-story-globe-surface);
  box-shadow: var(--ann-story-globe-shadow);
}

.ann-story-globe__search-label {
  color: var(--ann-story-globe-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}

.ann-story-globe__controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
  gap: 10px;
}

.ann-story-globe__search,
.ann-story-globe__category {
  width: 100%;
  min-height: 42px;
  padding: 6px 14px;
  border: 1px solid rgba(154, 165, 176, 0.7);
  border-radius: 20px;
  background: var(--ann-story-globe-surface);
  color: var(--ann-story-globe-text);
  font: inherit;
  line-height: 1.4;
}

.ann-story-globe__search:focus,
.ann-story-globe__category:focus,
.ann-story-globe__result:focus-visible {
  outline: 3px solid rgba(152, 193, 217, 0.32);
  outline-offset: 2px;
  border-color: var(--ann-story-globe-accent);
}

.ann-story-globe__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 18px;
  align-items: stretch;
}

.ann-story-globe__canvas {
  position: relative;
  width: 100%;
  height: var(--ann-story-globe-height);
  min-height: 420px;
  border: 1px solid rgba(154, 165, 176, 0.5);
  border-radius: 3px;
  overflow: hidden;
  background: #09131f;
  box-shadow: var(--ann-story-globe-shadow);
}

.ann-story-globe__canvas::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background-image:
    radial-gradient(circle at 8% 18%, rgba(255, 255, 255, 0.95) 0 1px, transparent 1.6px),
    radial-gradient(circle at 17% 72%, rgba(177, 220, 255, 0.8) 0 1px, transparent 1.7px),
    radial-gradient(circle at 28% 34%, rgba(255, 255, 255, 0.7) 0 0.8px, transparent 1.5px),
    radial-gradient(circle at 39% 11%, rgba(255, 244, 207, 0.75) 0 1px, transparent 1.8px),
    radial-gradient(circle at 62% 15%, rgba(255, 255, 255, 0.75) 0 0.8px, transparent 1.5px),
    radial-gradient(circle at 74% 76%, rgba(177, 220, 255, 0.85) 0 1.2px, transparent 2px),
    radial-gradient(circle at 83% 28%, rgba(255, 255, 255, 0.9) 0 1px, transparent 1.7px),
    radial-gradient(circle at 92% 61%, rgba(255, 244, 207, 0.7) 0 0.9px, transparent 1.6px),
    radial-gradient(circle at 12% 48%, rgba(255, 255, 255, 0.55) 0 0.7px, transparent 1.3px),
    radial-gradient(circle at 69% 42%, rgba(255, 255, 255, 0.6) 0 0.7px, transparent 1.4px),
    radial-gradient(circle at 96% 9%, rgba(177, 220, 255, 0.65) 0 0.8px, transparent 1.5px),
    radial-gradient(circle at 5% 89%, rgba(255, 255, 255, 0.7) 0 1px, transparent 1.7px);
  content: "";
  pointer-events: none;
  transition: opacity 220ms ease;
  -webkit-mask-image: radial-gradient(circle at center, transparent 0 30%, #000 43%);
  mask-image: radial-gradient(circle at center, transparent 0 30%, #000 43%);
}

.ann-story-globe__canvas--close::before {
  opacity: 0;
}

.ann-story-globe__results {
  display: grid;
  align-content: start;
  gap: 12px;
  max-height: var(--ann-story-globe-height);
  min-height: 420px;
  overflow: auto;
  padding: 0 2px 0 0;
}

.ann-story-globe__result {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 18px;
  border: 1px solid rgba(154, 165, 176, 0.35);
  border-radius: 3px;
  background: var(--ann-story-globe-surface);
  color: var(--ann-story-globe-text);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--ann-story-globe-shadow);
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.ann-story-globe__result:hover {
  border-color: rgba(232, 72, 85, 0.55);
  background: #ffffff;
  transform: translateY(-1px);
}

.ann-story-globe__result-title {
  color: var(--ann-story-globe-heading);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.ann-story-globe__result-meta,
.ann-story-globe__empty {
  color: var(--ann-story-globe-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  text-transform: uppercase;
}

.ann-story-globe__empty {
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(154, 165, 176, 0.35);
  border-radius: 3px;
  background: var(--ann-story-globe-surface);
  box-shadow: var(--ann-story-globe-shadow);
}

.ann-story-globe-marker {
  width: 28px;
  height: 36px;
  background: transparent;
}

.ann-story-globe-marker.maplibregl-marker-covered {
  opacity: 0 !important;
  pointer-events: none;
}

.ann-story-globe .maplibregl-control-container,
.ann-story-globe .maplibregl-marker,
.ann-story-globe .maplibregl-popup {
  z-index: 2;
}

.ann-story-globe-marker span {
  position: relative;
  display: block;
  width: 26px;
  height: 26px;
  border: 3px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  background: var(--ann-story-globe-hot);
  box-shadow: 0 10px 18px rgba(41, 50, 65, 0.2);
  transform: rotate(-45deg);
}

.ann-story-globe-marker span::after {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--ann-story-globe-accent);
  content: "";
}

.ann-story-globe-popup {
  max-width: 260px;
  color: var(--ann-story-globe-text);
}

.ann-story-globe-popup__title,
.ann-story-globe-popup__meta,
.ann-story-globe-popup__excerpt,
.ann-story-globe-popup__link {
  display: block;
}

.ann-story-globe-popup__title {
  margin-bottom: 6px;
  color: var(--ann-story-globe-heading);
  font-size: 15px;
  line-height: 1.35;
}

.ann-story-globe-popup__meta {
  margin-bottom: 7px;
  color: var(--ann-story-globe-muted);
  font-size: 12px;
  line-height: 1.4;
}

.ann-story-globe-popup__excerpt {
  margin: 0 0 9px;
  font-size: 13px;
  line-height: 1.5;
}

.ann-story-globe-popup__link {
  color: var(--ann-story-globe-hot);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.ann-story-globe-popup__link:hover {
  text-decoration: underline;
}

.ann-story-globe .maplibregl-popup-content {
  padding: 16px;
  border-radius: 3px;
  font-family: inherit;
  box-shadow: 0 12px 24px rgba(9, 19, 31, 0.2);
}

.ann-story-globe .maplibregl-popup-close-button {
  width: 30px;
  height: 30px;
  color: var(--ann-story-globe-muted);
  font-size: 20px;
  line-height: 30px;
}

.ann-story-globe .maplibregl-ctrl-group {
  border-radius: 3px;
  box-shadow: 0 4px 14px rgba(9, 19, 31, 0.2);
}

.ann-story-globe .maplibregl-ctrl-attrib {
  color: #334155;
  font-family: inherit;
}

@media (max-width: 900px) {
  .ann-story-globe__layout {
    grid-template-columns: 1fr;
  }

  .ann-story-globe__results {
    max-height: none;
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .ann-story-globe {
    --ann-story-globe-height: 68vh;
  }

  .ann-story-globe__controls {
    grid-template-columns: 1fr;
  }

  .ann-story-globe__canvas {
    min-height: 360px;
  }
}
