* {
  box-sizing: border-box;
}
body {
  margin: 2.5vmin;
  background: #333;
  color: #ccc;
  font-family: Georgia;
}
gemini-game {
  position: relative;
  color: #333;
  background: #ca5;
  width: 95vmin;
  height: 95vmin;
  border-radius: 1.5vmin;
  display: flex;
  align-items: center;
  justify-content: center;
}
gemini-nav {
  position: absolute;
}
gemini-nav button {
  font-family: inherit;
  font-weight: bold;
  text-shadow: none;
  box-shadow: none;
  color: inherit;
  border: 0.25vmin solid;
  border-radius: 0.5vmin;
  padding: 2vmin;
  margin: 0.5vmin;
}
gemini-nav button[disabled] {
  color: #666;
  background: #999;
}
gemini-nav button.primary {
  color: #ccc;
  background: green;
}
gemini-nav button.text {
  font-style: italic;
  font-size: 3vmin;
}
gemini-nav button.pict {
  font-size: 6vmin;
  line-height: 0.6;
  padding: 0.5vmin 1vmin 1.5vmin;
}
gemini-ring {
  position: absolute;
  width: 80vmin;
  height: 80vmin;
  display: flex;
  align-items: center;
  justify-content: center;
}
gemini-ring > gemini-ring {
  width: 70.71%;
  height: 70.71%;
  transform: rotate(45deg);
}
gemini-ring > .edges {
  position: absolute;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
gemini-edge {
  position: absolute;
  top: -1.5vmin;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 0;
  border-top: 1.5vmin solid #a84;
  transform-origin: 50% calc(50% + 0.75vmin);
}
/* the innermost ring w/o visible edges */
gemini-ring > .edges:only-child gemini-edge {
  border-color: transparent;
}
gemini-edge.seq-2 {
  transform: rotate(90deg);
}
gemini-edge.seq-3 {
  transform: rotate(180deg);
}
gemini-edge.seq-4 {
  transform: rotate(270deg);
}
gemini-edge::before {
  content: "";
  position: absolute;
  top: -0.75vmin;
  left: -0.75vmin;
  width: 6vmin;
  height: 6vmin;
  margin: -3vmin 0 0 -3vmin;
  background-color: #a84;
  border-radius: 100%;
  z-index: 1000;
}
gemini-edge.moved-from-side::before {
  animation-duration: 0.5s;
  animation-name: move-from-side;
}
@keyframes move-from-side {
  from {
    left: 50%;
  }
}
gemini-edge.moved-from-prev::before {
  animation-duration: 0.5s;
  animation-name: move-from-prev;
}
@keyframes move-from-prev {
  from {
    top: 50%;
  }
}
gemini-edge.moved-from-trunk::before {
  animation-duration: 0.5s;
  animation-name: move-from-trunk;
}
@keyframes move-from-trunk {
  from {
    top: 50%;
    left: -50%;
  }
}
gemini-edge.moved-from-next-trunk::before {
  animation-duration: 0.5s;
  animation-name: move-from-next-trunk;
}
@keyframes move-from-next-trunk {
  from {
    top: -50%;
    left: 50%;
  }
}

gemini-edge.color--1::before {
  background-color: white;
}
gemini-edge.color-1::before {
  background-color: green;
}
gemini-edge.color-2::before {
  background-color: yellow;
}
gemini-edge.color-3::before {
  background-color: black;
}
gemini-edge.color-4::before {
  background-color: firebrick;
}
gemini-edge.color-5::before {
  background-color: darkslateblue;
}
gemini-edge button {
  position: absolute;
  top: -3.75vmin;
  width: 100%;
  height: 6vmin;
  border: none;
  border-radius: 3vmin;
  background: rgba(255, 255, 255, 0);
  transition: background 0.3s;
  z-index: 1000;
  pointer-events: auto;
}
gemini-edge button:hover {
  background: rgba(255, 255, 255, 0.25);
}

gemini-game.length-3 gemini-ring > gemini-ring {
  width: 50%;
  height: 50%;
  transform: rotate(60deg);
  transform-origin: 62% 28%;
}
gemini-game.length-3 gemini-ring > .edges {
  height: 86.6%;
}
gemini-game.length-3 gemini-edge {
  transform-origin: 50% calc(33.333% + 0.75vmin);
}
gemini-game.length-3 gemini-edge.seq-2 {
  transform: rotate(120deg);
}
gemini-game.length-3 gemini-edge.seq-3 {
  transform: rotate(240deg);
}

gemini-game.length-5 gemini-ring > gemini-ring {
  width: 80.8%;
  height: 80.8%;
  transform: rotate(36deg);
}
gemini-game.length-5 gemini-ring > .edges {
  width: 72.5%;
}
gemini-game.length-5 gemini-edge.seq-2 {
  transform: rotate(72deg);
}
gemini-game.length-5 gemini-edge.seq-3 {
  transform: rotate(144deg);
}
gemini-game.length-5 gemini-edge.seq-4 {
  transform: rotate(216deg);
}
gemini-game.length-5 gemini-edge.seq-5 {
  transform: rotate(288deg);
}
