html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Arial, sans-serif;
  background-image: url("stripesbg_lrg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow-x: hidden;
}

.page {
  min-height: 100vh;
  padding: 8px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.site-header {
  text-align: center;
  margin-bottom: 6px;
}

.logo {
  width: min(145px, 38vw);
  height: auto;
}

.game-area {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.game-shell {
  position: relative;
  overflow: hidden;
  background: #000;
  padding: 8px;
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55);
  box-sizing: content-box;
}

#gameFrame {
  position: absolute;
  top: 8px;
  left: 8px;
  border: 0;
  background: #000;
  transform-origin: top left;
}

.button-row {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.fullscreen-btn,
.play-direct-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 0;
  background: #111;
  color: white;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}



.handshake-link {
  margin-top: 8px;
  display: block;
}

.handshake-logo {
  width: 70px !important;
  max-width: 70px !important;
  height: auto;
  display: block;
}

@media (max-width: 700px) {
  .page {
    padding: 5px;
  }

  .logo {
    width: min(120px, 42vw);
  }

  .game-shell {
    padding: 4px;
    border-width: 3px;
    border-radius: 10px;
  }

  #gameFrame {
    top: 4px;
    left: 4px;
  }

  .button-row {
    margin-top: 6px;
  }

  .fullscreen-btn,
  .play-direct-btn {
    font-size: 13px;
    padding: 7px 12px;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .site-header,
  .button-row,
  .handshake-link {
    display: none;
  }

  .page {
    padding: 0;
    justify-content: center;
  }

  .game-shell {
    padding: 2px;
    border-width: 2px;
    border-radius: 6px;
  }

  #gameFrame {
    top: 2px;
    left: 2px;
  }
}

.game-shell:fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #000;
}

.game-shell:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #000;
}