/* The atlas rides the same entrance as the biography. Its transparent stage
   leaves the original animated field visible around the sphere. */
.travel-atlas {
  --atlas-lived: #f4cf92;
  --atlas-visited: #d97b9c;
  --atlas-other: #577a92;
  margin: 0;
  color: #fff7fb;
}
.atlas-surface {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin-inline: auto;
}
.atlas-poster, .atlas-globe {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.atlas-poster { object-fit: contain; pointer-events: none; }
.atlas-globe {
  opacity: 0;
  touch-action: none;
  border-radius: 50%;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.atlas-globe[data-ready="true"] { opacity: 1; }
.atlas-surface:has(.atlas-globe[data-ready="true"]) .atlas-poster { visibility: hidden; }
.atlas-globe:active { cursor: grabbing; }
.atlas-globe:focus-visible { outline: 1px dashed #fff0f4c9; outline-offset: -3px; }
.atlas-caption {
  width: min(94%, 460px);
  margin: 2px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px clamp(14px, 1.8vw, 28px);
  font-family: Manrope, Arial, sans-serif;
  text-shadow: 0 1px 6px #1b132a;
}
.atlas-key {
  display: flex;
  justify-content: center;
  gap: clamp(9px, 1vw, 16px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.atlas-key li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: clamp(.78rem, .92vw, .98rem);
  line-height: 1.35;
  white-space: nowrap;
}
.atlas-key i {
  display: block;
  width: 10px;
  height: 10px;
  border: 1px solid #211a3490;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #fff2;
}
.atlas-key [data-tone=lived] { background: var(--atlas-lived); }
.atlas-key [data-tone=visited] { background: var(--atlas-visited); }
.atlas-key [data-tone=other] { background: var(--atlas-other); }
.atlas-journey-button {
  display: none;
  appearance: none;
  border: none;
  background: transparent;
  color: #fff8f5;
  padding: 7px 3px;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font: 600 .88rem/1.25 Manrope, Arial, sans-serif;
  text-shadow: 0 1px 6px #141123;
}
.travel-atlas[data-interactive] .atlas-journey-button { display: inline-flex; }
.journey-symbol {
  position: relative;
  width: 24px;
  height: 24px;
  border: 1px solid #e5fff0ab;
  border-radius: 50%;
}
.journey-symbol::before {
  content: '';
  position: absolute;
  inset: 7px 6px 7px 8px;
  background: #e0fff5;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.atlas-journey-button[data-state=playing] .journey-symbol::before {
  inset: 7px 7px;
  clip-path: none;
  background: linear-gradient(to right, #e0fff5 0 35%, transparent 35% 65%, #e0fff5 65% 100%);
}
.atlas-journey-button:hover .journey-symbol { border-color: #e3fff2; }
.atlas-journey-button:hover .journey-action { text-decoration: underline; text-underline-offset: .22em; }
.atlas-journey-button:focus-visible { outline: 1px solid #f6fff8; outline-offset: 3px; }
@media (min-width: 761px), (min-aspect-ratio: 6/5) and (min-width: 540px) {
  .playbook-copy > .travel-atlas {
    width: min(46vw, 66svh, 660px);
    position: absolute;
    right: max(5vw, calc((100vw - 1730px) / 2));
    top: 48%;
    transform: translateY(-50%);
  }
}
@media (max-width: 760px) and (max-aspect-ratio: 6/5), (max-width: 539px) {
  .playbook-copy > .travel-atlas {
    margin: .3rem auto 0;
    width: 100%;
  }
  .atlas-surface { width: min(76vw, 39svh, 340px); }
  .atlas-caption { width: 100%; column-gap: 12px; }
  .atlas-key { padding-bottom: 0; }
  .atlas-journey-button { min-height: 40px; }
  .playbook-copy:has(.travel-atlas) > p { margin-top: 12px; }
  .playbook-copy:has(.travel-atlas) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'bio bio' 'details story' 'globe globe';
  }
  .playbook-copy:has(.travel-atlas) > h2 { grid-area: bio; }
  .playbook-copy:has(.travel-atlas) > p { grid-area: details; }
  .playbook-copy > .travel-atlas { grid-area: globe; }
  .playbook-copy:has(.travel-atlas) .playbook-down {
    grid-area: story;
    justify-self: end;
    align-self: center;
    justify-content: end;
    margin-top: 8px;
  }
  .playbook-copy:has(.travel-atlas) .playbook-down svg { height: 32px; }
  .has-scroll-motion .playbook-copy:has(.travel-atlas) { padding-top: min(5svh, 36px); }
}
@media (min-aspect-ratio: 6/5) and (max-height: 550px) and (min-width: 540px) {
  .playbook-copy > .travel-atlas { width: min(41vw, 63svh); top: 52%; }
  .atlas-caption { width: 106%; margin-left: -3%; }
  .atlas-key { gap: 8px; padding-bottom: 3px; }
  .atlas-journey-button { min-height: 32px; padding-block: 2px; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 760px) and (max-aspect-ratio: 6/5) {
  .atlas-surface { width: min(86vw, 380px); }
  .travel-atlas { margin-block: 20px; }
}
@media (prefers-contrast: more) {
  .atlas-key i { border-color: white; }
}
