/* Load after the Apple edition styles. Circle diameter includes this border. */
.apple-edition [data-watch-cloud] {
  /* A fixed viewport onto the hyperbolic plane; projection never resizes it. */
  --poincare-footer-height: 48px;
  width: min(100%, 820px);
  aspect-ratio: 1;
  height: auto;
  min-height: 0;
  margin-inline: auto;
  overflow: clip;
}

.apple-edition .watch-cloud-stage {
  position: absolute;
  inset: 0 0 var(--poincare-footer-height);
  contain: layout style;
  overflow: clip;
  will-change: auto;
}

.apple-edition .watch-cloud-items { position:absolute; inset:0; }
.apple-edition .poincare-canvas { position:absolute; inset:0; width:100%; height:100%; display:none; }
.apple-edition .watch-cloud-gpu .poincare-canvas { display:block; }
.apple-edition .watch-cloud-gpu .watch-cloud-items {
  inset:50% auto auto 50%; width:1px; height:1px; margin:-1px; overflow:hidden;
  clip-path:inset(50%); white-space:nowrap;
}
.apple-edition .watch-cloud-gpu .watch-cloud-items .watch-item {
  position:static; display:block; width:1px!important; height:1px!important;
  padding:0; border:0; transform:none!important; opacity:1!important; will-change:auto;
}
.apple-edition .poincare-hover-link { position:absolute; z-index:5; display:block; border-radius:50%; cursor:pointer; }
.apple-edition .poincare-hover-label {
  position:absolute; z-index:800; width:max-content; max-width:min(275px,calc(100% - 16px));
  padding:8px 13px; border:1px solid rgb(33 73 113 / 9%); border-radius:12px;
  background:rgb(255 255 255 / 97%); color:#253d55; box-shadow:0 7px 25px rgb(25 53 85 / 13%);
  font-size:13px; line-height:1.5; transform:translate(-50%,-100%); pointer-events:none;
  opacity:1; visibility:visible;
  transition:opacity 180ms ease, transform 240ms ease, visibility 0s;
}
.apple-edition .poincare-hover-link[hidden] { display:none; }
.apple-edition .poincare-hover-label[hidden] {
  display:block; opacity:0; visibility:hidden; transform:translate(-50%,calc(-100% + 9px));
  transition:opacity 180ms ease, transform 240ms ease, visibility 0s 240ms;
}

.apple-edition :is(.poincare-view-source, .poincare-view-attribution) {
  position: absolute;
  bottom: 8px;
  z-index: 600;
  max-width: calc(50% - 16px);
  margin: 0;
  color: #8293a6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(10px, .9vw, 14px);
  font-style: normal;
  letter-spacing: 0;
  line-height: 1.5;
}
.apple-edition .poincare-view-source { left: 8px; text-align: left; }
.apple-edition .poincare-view-source a { color: inherit; overflow-wrap: anywhere; }
.apple-edition .poincare-view-attribution { right: 8px; text-align: right; padding: 0; border: 0; background: none; cursor: pointer; }
.apple-edition .poincare-view-attribution:disabled { cursor: default; }
.apple-edition .poincare-view-attribution:focus-visible { outline: 2px solid #198cff; outline-offset: 4px; border-radius: 3px; }
.apple-edition .poincare-view-attribution:not(:disabled):hover { color: #198cff; }
.apple-edition .poincare-view-attribution i { font-style: italic; }
.apple-edition .watch-cloud-3d { background: #071122; border-radius: 18px; }
.apple-edition .watch-cloud-3d .watch-cloud-stage { cursor: grab; touch-action: none; user-select: none; }
.apple-edition .watch-cloud-dragging .watch-cloud-stage { cursor: grabbing; }
.apple-edition .watch-cloud-3d :is(.poincare-view-source, .poincare-view-attribution) { color: #a9c3db; }
.apple-edition .poincare-3d-hint { position: absolute; left: 0; right: 0; top: 18px; z-index: 2; text-align: center; color: #a9c3db; font: 12px/1.5 var(--font); letter-spacing: .08em; pointer-events: none; }
.apple-edition .poincare-3d-hint[hidden] { display: none; }

.apple-edition :is(#naming, #artist-names, #west, #china) .watch-cloud .watch-item {
  box-sizing: border-box;
  border: 3px solid #fff;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgb(64 102 139 / 11%), 0 1px 4px rgb(25 54 86 / 9%);
  transition: none;
  transform-origin: center;
  z-index: 1;
  will-change: auto;
}

.apple-edition :is(#naming, #artist-names, #west, #china) .watch-cloud .watch-item > img {
  border: 0;
  border-radius: 50%;
  background: #fff;
  image-rendering: auto;
  image-rendering: smooth;
}

.apple-edition :is(#naming, #artist-names, #west, #china) .watch-cloud .watch-item:hover,
.apple-edition :is(#naming, #artist-names, #west, #china) .watch-cloud .watch-item:focus-visible {
  z-index: 500;
}

.apple-edition :is(#naming, #artist-names, #west, #china) .watch-cloud .watch-label {
  top: auto;
  bottom: calc(100% + 11px);
  left: 50%;
  width: max-content;
  max-width: min(275px, 70vw);
  padding: 8px 13px;
  border: 1px solid rgb(33 73 113 / 9%);
  border-radius: 12px;
  background: rgb(255 255 255 / 97%);
  color: #253d55;
  box-shadow: 0 7px 25px rgb(25 53 85 / 13%);
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 9px) scale(var(--watch-label-scale, 1));
  transform-origin: 50% 100%;
  transition: opacity 180ms ease, transform 240ms cubic-bezier(.2, .7, .2, 1), visibility 0s linear 240ms;
}

.apple-edition :is(#naming, #artist-names, #west, #china) .watch-cloud .watch-item:hover .watch-label,
.apple-edition :is(#naming, #artist-names, #west, #china) .watch-cloud .watch-item:focus-visible .watch-label {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -2px) scale(var(--watch-label-scale, 1));
  transition-delay: 0s;
}

.apple-edition.motion-off :is(#naming, #artist-names, #west, #china) .watch-cloud .watch-label {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .apple-edition :is(#naming, #artist-names, #west, #china) .watch-cloud .watch-label { transition: none; }
  .apple-edition .poincare-hover-label { transition:none!important; }
}

@media (max-width: 600px) {
  .apple-edition [data-watch-cloud] { --poincare-footer-height: 64px; }
  .apple-edition :is(#naming, #artist-names, #west, #china) .watch-cloud .watch-item { border-width: 2px; padding: 0; }
  .apple-edition :is(#naming, #artist-names, #west, #china) .watch-cloud .watch-label { font-size: 12px; }
}
