*,
*::before,
*::after {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}
html,body,table,tr,td,h1,p,div{font-family: 'Righteous', cursive;}
body {
  margin: 20px 0;
  background: #6589F9;
}
table{background: #f5f5f5;
border: 1px solid #FFF;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
box-shadow: 1px 2px 4px rgba(0,0,0,.4);
margin-bottom:30px;}
.grid {
  max-width: 960px;
  margin: 0 auto;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  -webkit-box-pack: space-evenly;
      -ms-flex-pack: space-evenly;
          justify-content: space-evenly;
}

.card {
  position: relative;
  -webkit-transition: all .4s linear;
  -o-transition: all .4s linear;
  transition: all .4s linear;
  -webkit-transform-style: preserve-3d;
          transform-style: preserve-3d;
  margin: 5px;
  background: #f5f5f5;
border: 1px solid #FFF;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
box-shadow: 1px 2px 4px rgba(0,0,0,.4);

}

.card,
.back,
.front {
  height: 150px;
  width: 150px;
}

.back,
.front {
  position: absolute;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
}

.front {
  background: #FAB942 url('../img/sw.jpg') no-repeat center center / contain;
}

.back {
  -webkit-transform: rotateY(180deg);
          transform: rotateY(180deg);
  background-color: #6589F9;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
}

.selected {
  -webkit-transform: rotateY(180deg);
          transform: rotateY(180deg);
}

.match .front {
  background: #6589F9 !important;
}
@media only screen and (max-width: 365px)  {.card,
.back,
.front {
  height: 4em;
  width: 4em;
}}
@media only screen and (min-width: 365px)  {.card,
.back,
.front {
  height: 5em;
  width: 5em;
}}
@media only screen and (min-width: 450px)  {.card,
.back,
.front {
  height: 6em;
  width: 6em;
}}
@media only screen and (min-width: 530px)  {.card,
.back,
.front {
  height: 7em;
  width: 7em;
}}
@media only screen and (min-width: 610px)  {.card,
.back,
.front {
  height: 8em;
  width: 8em;
}}
@media only screen and (min-width: 690px)  {.card,
.back,
.front {
  height: 9em;
  width: 9em;
}}