
#wordtablewrapper {
    -webkit-box-ordinal-group: 1;
    -moz-box-ordinal-group: 1;
    -webkit-order: 0;
    -ms-flex-order: 0;
    order: 0;
    -webkit-box-flex: 2;
    -moz-box-flex: 2;
    -webkit-flex: 2 2 auto;
    -ms-flex: 2 2 auto;
    flex: 2 2 auto;
    -webkit-align-self: stretch;
    -ms-flex-item-align: stretch;
    align-self: stretch;
    }

#wordsdiv {
    -webkit-box-ordinal-group: 1;
    -moz-box-ordinal-group: 1;
    -webkit-order: 0;
    -ms-flex-order: 0;
    order: 0;
    -webkit-box-flex: 0;
    -moz-box-flex: 0;
    -webkit-flex: 1 1 auto;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    -webkit-align-self: stretch;
    -ms-flex-item-align: stretch;
    align-self: stretch;
    }

#wordsdiv { 
  display: inline-block;
  box-sizing: border-box;
  max-width: 250px;
  padding: 20px;
  margin: 20px;
  border: 3px solid black;
  border-radius: 10px;
  font-family: arial, sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.hidewordlist #wordsdiv { 
  display: none;
  height: 0px;
  width: 0px;
}

table#thetable { 
  border-spacing: 0px;
}

table#thetable td { 
  padding: 0px;
}

#emptywordlist { 
  font-family: arial, sans-serif;
  background-color: #F04040;
  border: 3px solid black;
  border-radius: 5px;
  width: 300px;
  height: 130px;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  text-align: center;
  padding: 30px;
  display: none;
  color: black;
  position: absolute;
  z-index: 20;
}

.word { 
  display: block;
  padding-left: 5px;
  padding-right: 5px;
  overflow: hidden;
}


.letter { 
  padding: 2px;
  text-align: center;
  cursor: pointer;
}

.wordfound { 
  background-color: green;
}

.hidewordlist #wordsdiv { 
  display: none;
}

#wordtable { 
  position: relative;
  padding: 20px;
  margin-left: auto;
  margin-right: auto;
  border: 3px solid black;
  border-radius: 10px;
  display: inline-block;  
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  z-index: 20;
}

#mycanvas { 
  position: absolute;
  top: 20px;
  left: 20px;
  pointer-events: none;
  z-index: 10;
}

@media only screen and (orientation: portrait) {

  html:not(.ibw-platform-osx-ibooks) #bottom-container {
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;		
  }

  html:not(.ibw-platform-osx-ibooks) div#wordsdiv {    
    max-width: 100%;
  }
  html:not(.ibw-platform-osx-ibooks) .word {
    display: inline-block;
  }
}

@media only screen and (orientation: landscape) and (max-width: 750px), 
only screen and (orientation:portrait) and(max-height: 750px) {

  html:not(.ibw-platform-osx-ibooks) div#wordtable { 
    padding: 10px;
  }

  html:not(.ibw-platform-osx-ibooks) #mycanvas {   
    top: 10px;
    left: 10px;
  }

  html:not(.ibw-platform-osx-ibooks) div#wordsdiv {    
    padding: 0;
    border: none;
  }

  html:not(.ibw-platform-osx-ibooks) .letter {
    font-size:18px;
  }

  html:not(.ibw-platform-osx-ibooks) .word {
    padding-left: 10px;
    padding-right: 10px;
    overflow: hidden;
    font-size: 18px;
  }
  #wordsdiv, #wordtablewrapper { 
    margin: 2px;
  }
}

@media only screen and (max-width: 500px), 
only screen and (max-height: 500px) {
  html:not(.ibw-platform-osx-ibooks) .letter {
    font-size:16px;
  }

  html:not(.ibw-platform-osx-ibooks) .word {
    display: inline-block;
    padding-left: 10px;
    padding-right: 10px;
    overflow: hidden;
    font-size: 16px;
  }
}

@media only screen and (max-width: 370px), 
  only screen and (max-height: 370px) {

  html:not(.ibw-platform-osx-ibooks) .letter {
    font-size:14px;
  }

  html:not(.ibw-platform-osx-ibooks) .word {
    font-size: 14px;
  }

  html:not(.ibw-platform-osx-ibooks) .letter { 
    padding: 1px;
  }
}

@media only screen and (orientation: portrait) and (max-height: 650px),
 and (max-width: 380px) {
  html:not(.ibw-platform-osx-ibooks) #wordsdiv {
    -webkit-flex: 1 1 100px;
    -ms-flex: 1 1 100px;
    flex: 1 1 100px;
  }
}