.odm-globe {
  --globe-gold: #d5a34b;
  --globe-ice: #b8edf2;
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  color: #e6f3f8;
  font-family: inherit;
}
.odm-globe [hidden] { display: none !important; }
/* The placeholder reserves the globe block's final height (viewport + controls, key and legend),
   so the sections below do not jump when the globe loads. */
#globe-stage > .globe-loading { min-height: calc(clamp(380px, 49vw, 660px) + 216px); }
.odm-globe__viewport {
  position: relative;
  width: 100%;
  height: clamp(380px, 49vw, 660px);
  overflow: hidden;
  border-radius: 18px;
  touch-action: pan-y;
  cursor: grab;
  background: radial-gradient(ellipse at 50% 48%, rgb(35 109 135 / .16), transparent 62%);
  outline: none;
}
.odm-globe__viewport:focus-visible { box-shadow: inset 0 0 0 2px var(--globe-gold); }
.odm-globe__viewport.is-dragging { cursor: grabbing; }
.odm-globe__viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 18px 48px rgb(0 11 29 / .28));
  mask-image: linear-gradient(to bottom, transparent, #000 7%, #000 92%, transparent);
}
.odm-globe__orbit {
  position: absolute;
  z-index: -1;
  top: 13%; left: 11%;
  width: 78%; height: 70%;
  border: 1px solid rgb(161 211 224 / .1);
  border-radius: 50%;
  transform: rotate(-24deg) scaleX(1.19);
  pointer-events: none;
}
.odm-globe__orbit::after {
  content: '';
  position: absolute;
  inset: -25px 22px;
  border: 1px dashed rgb(161 211 224 / .1);
  border-radius: 50%;
  transform: rotate(35deg);
}
.odm-globe__tooltip {
  position: absolute;
  z-index: 5;
  left: 0; top: 0;
  width: max-content;
  max-width: min(230px, calc(100% - 24px));
  padding: 11px 13px;
  border: 1px solid rgb(152 216 226 / .36);
  border-radius: 8px;
  background: rgb(7 29 48 / .96);
  box-shadow: 0 9px 28px rgb(0 0 0 / .2);
  color: #edf9ff;
  font-size: 13px;
  line-height: 1.5;
  pointer-events: none;
}
.odm-globe__tooltip[hidden] { display: none; }
.odm-globe__tooltip strong { display: block; font-size: 14px; }
.odm-globe__tooltip small { display: block; color: #c3d9e4; font-size: 12px; }
.odm-globe__controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
}
.odm-globe__controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 10px 13px;
  border: 1px solid rgb(173 209 226 / .22);
  border-radius: 100px;
  background: rgb(14 45 69 / .72);
  color: #dfedf4;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.odm-globe__controls button:hover { border-color: rgb(213 163 75 / .8); background: #20445c; color: #ffdfab; }
.odm-globe__controls button:focus-visible { outline: 2px solid var(--globe-gold); outline-offset: 3px; }
.odm-globe__controls button:disabled { opacity: .4; cursor: default; }
.odm-globe__controls svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.odm-globe__key { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin: 14px 0 0; color: #d7e7f0; font-size: 13px; line-height: 1.5; }
.odm-globe__key span { display: inline-flex; align-items: center; gap: 8px; }
.odm-globe__key i { flex: none; display: inline-block; }
.odm-globe__key-student { flex: none; width: 15px; height: 15px; fill: #eefafc; filter: drop-shadow(0 0 3px rgb(159 233 243 / .7)); }

/* Activity bubbles of the miniature students (positioned by globe.js over each figure). */
.odm-globe__activities { position: absolute; inset: 0; z-index: 4; overflow: hidden; pointer-events: none; }
.odm-globe__activity { position: absolute; left: 0; top: 0; will-change: transform; }
.odm-globe__activity-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 236px;
  padding: 8px 12px 8px 8px;
  border-radius: 12px;
  background: rgb(255 255 255 / .97);
  color: #102b46;
  box-shadow: 0 10px 26px rgb(2 16 30 / .34);
  font-size: 12px;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(6px) scale(.9);
  transform-origin: 50% 100%;
  transition: opacity .25s ease, transform .3s cubic-bezier(.2, .75, .2, 1);
}
.odm-globe__activity-card::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; border-radius: 2px; background: inherit; transform: translateX(-50%) rotate(45deg); }
.odm-globe__activity-card.is-in { opacity: 1; transform: none; animation: odm-bubble-pop .45s cubic-bezier(.2, .75, .2, 1); }
.odm-globe__activity-card[data-state=reply] { background: #fff7e9; box-shadow: 0 10px 26px rgb(2 16 30 / .34), inset 3px 0 0 #d5a34b; }
.odm-globe__activity-icon { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: #e4effb; color: #146bd1; }
.odm-globe__activity-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.odm-globe__activity-icon img { width: 13px; height: 19px; }
[data-state=done] .odm-globe__activity-icon { background: #e2f5eb; color: #1d8656; }
[data-state=reply] .odm-globe__activity-icon { background: #ffe6bd; }
.odm-globe__activity-text { display: grid; gap: 1px; min-width: 0; }
.odm-globe__activity-text strong { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.odm-globe__activity-text small { overflow: hidden; color: #55697e; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.odm-globe__meter { display: block; min-width: 110px; height: 4px; margin-top: 5px; overflow: hidden; border-radius: 2px; background: #dbe6f1; }
.odm-globe__meter i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #146bd1, #46b1ee); animation: odm-meter linear forwards; }
.odm-globe__dots { display: flex; gap: 3px; margin-top: 5px; }
.odm-globe__dots i { width: 5px; height: 5px; border-radius: 50%; background: #146bd1; animation: odm-dot 1.1s ease-in-out infinite; }
.odm-globe__dots i:nth-child(2) { animation-delay: .15s; }
.odm-globe__dots i:nth-child(3) { animation-delay: .3s; }
.odm-globe__voice { display: flex; align-items: flex-end; gap: 2px; height: 12px; margin-top: 4px; }
.odm-globe__voice i { width: 3px; height: 100%; border-radius: 2px; background: #e08a1e; transform-origin: bottom; animation: odm-voice .7s ease-in-out infinite alternate; }
.odm-globe__voice i:nth-child(2) { animation-delay: .18s; }
.odm-globe__voice i:nth-child(3) { animation-delay: .36s; }
.odm-globe__voice i:nth-child(4) { animation-delay: .09s; }
.odm-globe__voice i:nth-child(5) { animation-delay: .27s; }
.odm-globe__count { display: block; margin-top: 3px; color: #146bd1; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
@keyframes odm-meter { to { width: 100%; } }
@keyframes odm-dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes odm-voice { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
@keyframes odm-bubble-pop { from { opacity: 0; transform: translateY(6px) scale(.9); } }
.odm-globe__key-flame { width: 12px; height: 18px; background: url('assets/globe/flama.webp') center / contain no-repeat; filter: drop-shadow(0 0 4px rgb(255 140 40 / .75)); }
.odm-globe__legend { margin: 16px auto 0; max-width: 520px; color: #c1d5e1; text-align: center; font-size: 13px; line-height: 1.6; }
.odm-globe__legend strong { color: #f0f6fa; font-weight: 700; font-size: 14px; }
.odm-globe__hint { margin: 8px 0 0; text-align: center; color: #a9c2d2; font-size: 12px; line-height: 1.6; }
.odm-globe__sources { display: block; margin-top: 8px; color: #a9c2d2; font-size: 12px; }
.odm-globe__sources a { color: inherit; text-underline-offset: 3px; }
.odm-globe__loading { position: absolute; left: 12px; right: 12px; top: 50%; color: #c4dce5; text-align: center; font-size: 13px; }
.odm-globe__static { display: block; width: 100%; height: 100%; padding: 46px 12px 40px; box-sizing: border-box; }
.odm-globe__static path { fill: #20566a; stroke: #5d9eab; stroke-width: .55; }
.odm-globe__static .student { fill: #b8edf2; fill-opacity: .8; }
.odm-globe__static .hub { fill: #d5a34b; stroke: #f7dfac; stroke-width: 2; }
.odm-globe__sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
  /* Mexico is wider than tall: the frozen framing needs less height on a phone. */
  #globe-stage > .globe-loading { min-height: calc(clamp(330px, 94vw, 500px) + 302px); }
  .odm-globe__viewport { height: clamp(330px, 94vw, 500px); }
  .odm-globe__controls { gap: 5px; }
  .odm-globe__controls button { padding-inline: 11px; font-size: 12px; }
  .odm-globe__legend { padding-inline: 12px; }
}
/* CSS activities share the renderer clock's visibility and pause state. */
.odm-globe:not([data-globe-running="true"]) .odm-globe__activities *,
.odm-globe:not([data-globe-running="true"]) .odm-globe__activities *::after { animation-play-state: paused; }
.odm-globe:not([data-globe-running="true"]) .odm-globe__activity-card { animation: none; transition: none; }
@media (prefers-reduced-motion: reduce) {
  .odm-globe__controls button, .odm-globe__activity-card { transition: none; }
  .odm-globe__activities * { animation: none !important; }
  .odm-globe__meter i { width: 100%; }
}
