:root {
  color-scheme: light;
  --globe-size: min(680px, 92vw);
  --ink: #17382d;
  --sage: #aab8ad;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #f7f8f6;
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.demo-shell { width: 100%; padding: 1.5rem; text-align: center; }

.timber-globe {
  position: relative;
  width: var(--globe-size);
  max-width: 100%;
  aspect-ratio: 1;
  margin-inline: auto;
  isolation: isolate;
  touch-action: none;
  cursor: grab;
}

.timber-globe:active { cursor: grabbing; }

.timber-globe canvas,
.timber-globe__fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.timber-globe canvas { z-index: 2; outline: none; }

.timber-globe__fallback {
  z-index: 1;
  object-fit: contain;
  transition: opacity 320ms ease;
}

.timber-globe.is-ready .timber-globe__fallback {
  opacity: 0;
  pointer-events: none;
}

.timber-globe__status {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 7%;
  transform: translateX(-50%);
  margin: 0;
  padding: .45rem .75rem;
  border-radius: 999px;
  background: rgb(247 248 246 / .88);
  color: var(--ink);
  font-size: .875rem;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgb(23 56 45 / .12);
  animation: hide-stale-status 0s 8s forwards;
}

.timber-globe.is-ready .timber-globe__status { display: none; }

.globe-hint {
  margin: .85rem 0 0;
  color: #50635b;
  font-size: .9rem;
}

@media (prefers-reduced-motion: reduce) {
  .timber-globe__fallback { transition: none; }
}

@keyframes hide-stale-status {
  to { visibility: hidden; }
}
