html, body {
  height: 100%;
  width: 100%;
  margin: 0px;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  font-family: 'Wire One', sans-serif;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
}

/* Screens that are too small */
@media only screen and (max-width: 719px), screen and (max-height: 744px) {
  body *:not(#warning) {
    display: none;
  }

  #warning {
    margin: auto;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;
    display: block;
    font-family: 'Londrina Outline', cursive;
    font-size: 5vh;
    font-weight: bold;
    cursor: default;
  }
}

/* Laptop and desktop screens */
@media only screen and (min-width: 720px) and (min-height: 745px) {
  a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
  }

  a:active, button:active {
    text-shadow: 0.1px -0.1px 0px #000000;
  }

  a:hover, button:hover {
    color: #808080;
  }

  a:focus, button:focus {
    outline: none;
  }

  #warning, #warning-mobile {
    display: none;
  }

  #page-container {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    flex: 1;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
  }

  .control-buttons {
    position: relative;
    width: 300px;
    top: 0px;
    left: 0px;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    z-index: 100;
  }

  button {
    border: none;
    border-radius: 5px;
    margin: 1%;
    background-color: #e8e8e8;
    font-family: 'Wire One', sans-serif;
    font-size: 25px;
    color: #000000;
    text-shadow: 0 -0.1px 0 #000000;
    opacity: 1;
    cursor: pointer;
  }

  button:active {
    box-shadow: inset 0 0.1px 1.1px rgba(0, 0, 0, 0.6);
  }

  button:hover {
    background-color: #d4d4d4;
  }

  #pause::first-letter, #restart::first-letter, #learn-more-desktop::first-letter {
    text-decoration: underline;
  }

  #sound {
    width: 30px;
    background-image: url('images/on.svg');
    background-position: center;
    background-size: 80% 80%;
    background-repeat: no-repeat;
  }

  .control-buttons.right {
    display: none;
  }

  h1 {
    margin: 0px auto;
    background-color: #e8e8e8;
  }

  #blood-pressure {
    width: 420px;
    margin-top: 0.5%;
    font-size: 34px;
    cursor: default;
  }

  #systolic, #diastolic {
    color: #56d056;
  }

  #lifespan {
    width: 420px;
    margin-bottom: 0.5%;
    font-size: 34px;
    cursor: default;
  }

  #game-container {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
  }

  #left-panel, #right-panel {
    width: 160px;
    padding-left: 5px;
    padding-right: 5px;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
  }

  .side-board {
    height: 297.5px;
    background-color: #e8e8e8;
    opacity: 0.5;
    cursor: default;
  }

  .side-board:hover {
    opacity: 1;
  }

  #stressboard, #ranges {
    margin-bottom: 2.5px;
  }

  table {
    width: 100%;
  }

  .side-table-title {
    font-size: 26px;
    font-weight: bold;
    line-height: 45px;
  }

  tr, td {
    font-size: 20px;
    font-weight: bold;
  }

  .stressor, .reliever {
    height: 53.75px;
    width: 53.75px;
  }

  #reliefboard, #leaderboard {
    margin-top: 2.5px;
  }

  #game-board {
    position: relative;
    height: 600px;
    width: 420px;
    margin-left: 0%;
    margin-right: 0%;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
  }

  #svg-game {
    height: 100%;
    width: 100%;
    background-color: #ceebff;
  }

  .screen {
    position: absolute;
    height: 100%;
    width: 100%;
    margin: auto;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;
    visibility: hidden;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    background: #e8e8e8 no-repeat center 20%;
    font-size: 29px;
    line-height: 38px;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    cursor: default;
  }

  #start-screen-desktop {
    visibility: visible;
  }

  #start-title {
    margin-top: 20%;
    font-family: 'Tangerine', cursive;
    font-size: 55px;
    line-height: 105px;
  }

  #pause-screen-desktop, #pause-screen-mobile, #game-over-screen {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    opacity: 0.85;
  }

  #pause-title {
    margin-top: 30%;
    font-family: 'Poiret One', cursive;
    font-size: 55px;
    font-weight: bold;
    line-height: 50px;
  }

  #learn-more-screen {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    opacity: 1;
  }

  #learn-more-screen a {
    font-weight: bold;
  }

  .close {
    position: absolute;
    top: 0px;
    right: 0px;
  }

  #stress-description, #relief-description {
    margin-top: 3%;
  }

  .description-title {
    font-size: 30px;
    font-weight: bold;
    text-shadow: 0 -0.1px 0 #000000;
    opacity: 0.7;
  }

  .description {
    margin-left: 3%;
    font-size: 18px;
    font-weight: 100;
    text-align: left;
    line-height: 20px;
  }

  .description-image {
    width: 45px;
    margin-right: 3%;
  }

  #relief-description {
    margin-left: 0%;
  }

  #leader-screen {
    display: none;
  }

  #game-over-screen {
    font-weight: bold;
  }

  #game-over-title {
    margin-top: 40%;
    background-color: rgba(0, 0, 0, 0);
    font-family: 'Ribeye', cursive;
    font-size: 55px;
    color: #ff0000;
    line-height: 45px;
  }

  input {
    width: 75%;
    margin: 2%;
    font-family: 'Wire One', sans-serif;
    font-size: 24px;
  }

  #replay {
    font-size: 20px;
  }

  th {
    width: 50%;
    font-size: 28px;
    text-decoration: underline;
    line-height: 45px;
  }

  #ranges td {
    font-size: 32px;
    line-height: 40px;
  }

  #green {
    background-color: #56d056;
    opacity: 0.7;
  }

  #yellow {
    background-color: #ffff00;
    opacity: 0.7;
  }

  #orange {
    background-color: #ffc107;
    opacity: 0.7;
  }

  #red {
    background-color: #ff2020;
    opacity: 0.7;
  }

  #leaderboard td {
    line-height: 36px;
    text-overflow: ellipsis;
  }

  #error-cell {
    font-style: italic;
    color: #ff8600;
    line-height: normal !important;
  }
}

/* iPad portrait and larger */
@media only screen and (min-width: 768px) and (min-height: 1024px) and (orientation: portrait) {
  .control-buttons {
    font-size: 20px;
  }

  .side-board {
    height: 387.5px;
  }

  .side-table-title {
    font-size: 35px;
  }

  tr, td {
    font-size: 32px;
  }

  .stressor, .reliever {
    height: 76.75px;
    width: 62px;
  }

  #game-board {
    height: 780px;
  }

  .screen {
    font-size: 35px;
  }

  #start-title, #pause-title {
    margin-top: 30%;
    font-size: 90px;
  }

  #stress-description {
    margin-top: 10%;
  }

  #relief-description {
    margin-top: 20%;
  }

  th {
    font-size: 32px;
    line-height: 55px;
  }

  #leaderboard td {
    font-size: 30px;
    line-height: 46px;
  }
}

/* iPad landscape and larger */
@media only screen and (min-width: 1024px) and (min-height: 768px) and (orientation: landscape) {
  .control-buttons {
    font-size: 20px;
  }

  #blood-pressure, #lifespan {
    width: 540px;
  }

  #game-board {
    width: 540px;
  }
}

/* iPad Pro portrait and larger */
@media only screen and (min-width: 1024px) and (min-height: 1366px) and (orientation: portrait) {
  .control-buttons {
    width: 390px;
  }

  #blood-pressure, #lifespan {
    width: 600px;
    font-size: 50px;
  }

  button {
    font-size: 45px;
  }

  #sound {
    width: 40px;
  }

  .side-board {
    height: 537.5px;
  }

  .side-table-title {
    font-size: 47px;
    line-height: 50px;
  }

  tr, td {
    font-size: 38px;
  }

  .stressor, .reliever {
    height: 108px;
    width: 90px;
  }

  #game-board {
    height: 1080px;
    width: 600px;
  }

  .screen {
    font-size: 60px;
    line-height: 70px;
  }

  #start-title, #pause-title {
    font-size: 130px;
    line-height: 200px;
  }

  #stress-description {
    margin-top: 5%;
  }

  .description-title {
    font-size: 60px;
  }

  .description {
    font-size: 26px;
  }

  .description-image {
    width: 70px;
  }

  #relief-description {
    margin-top: 10%;
  }

  #game-over-title {
    font-size: 95px;
  }

  #input {
    font-size: 60px;
  }

  #replay {
    font-size: 45px;
  }

  th {
    font-size: 40px;
    line-height: 90px;
  }

  #ranges td {
    font-size: 38px;
    line-height: 60px;
  }

  #leaderboard td {
    font-size: 30px;
    line-height: 70px;
  }
}

/* iPad Pro landscape and larger */
@media only screen and (min-width: 1366px) and (min-height: 1024px) and (orientation: landscape) {
  .control-buttons {
    width: 500px;
  }

  button {
    margin-top: 5%;
    font-size: 40px;
  }

  #blood-pressure, #lifespan {
    width: 960px;
    font-size: 40px;
  }

  #left-panel, #right-panel {
    padding-left: 10px;
    padding-right: 10px;
  }

  .side-board {
    height: 415px;
  }

  #stressboard, #ranges {
    margin-bottom: 5px;
  }

  .side-table-title {
    font-size: 45px;
    line-height: 48px;
  }

  .stressor, .reliever {
    height: 83px;
    width: 76px;
  }

  #reliefboard, #leaderboard {
    margin-top: 5px;
  }

  #game-board {
    height: 840px;
    width: 960px;
  }

  .screen {
    font-size: 50px;
    line-height: 65px;
  }

  #start-title {
    margin-top: 10%;
    font-size: 120px;
    line-height: 185px;
  }

  #stress-description, #relief-description {
    margin-top: 1%;
  }

  .description-title {
    font-size: 50px;
  }

  .description {
    font-size: 35px;
  }

  .description-image {
    width: 58px;
  }

  #pause-title, #game-over-title {
    margin-top: 20%;
  }

  #input {
    font-size: 55px;
  }

  #replay {
    font-size: 50px;
  }

  th {
    font-size: 36px;
    line-height: 65px;
  }

  #ranges td {
    font-size: 38px;
    line-height: 53px;
  }

  #leaderboard td {
    font-size: 32px;
    line-height: 54px;
  }
}
