@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../typefaces/fraunces-700.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../typefaces/ibm-plex-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../typefaces/ibm-plex-sans-600.woff2") format("woff2");
}

html, body {
  margin: 0;
  padding: 0;
  background: #e6ecf0;
  color: #1c2428;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}

.container {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.title {
  margin: 0 auto 8px;
  text-align: center;
}
.title img {
  width: min(100%, 420px);
  height: auto;
  display: inline-block;
  vertical-align: middle;
}

.game-intro {
  text-align: center;
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 24px;
  color: #3a454c;
}

.court-wrap {
  display: flex;
  justify-content: center;
  padding: 12px 24px 28px;
}

#floe-field {
  position: relative;
  display: block;
  width: min(100%, 640px);
  aspect-ratio: 780 / 540;
  margin: 0 auto;
  background: #1e262c;
  border-radius: 4px;
  box-shadow: 0 18px 40px rgba(28, 36, 40, 0.28);
  overflow: hidden;
}

#canvas {
  display: block;
  width: 100%;
  height: 100%;
  -webkit-transform: translateZ(0);
}

#controls {
  position: absolute;
  bottom: 0.6em;
  left: 0.6em;
  color: #cdd6dc;
  font-size: 12px;
}
#controls input,
#controls label { vertical-align: middle; }

#touch-pads {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.pad {
  pointer-events: auto;
  position: absolute;
  border: 1px solid #8a9aa0;
  background: rgba(30, 38, 44, 0.55);
  color: #e8eef1;
  font: 600 11px "IBM Plex Sans", sans-serif;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  border-radius: 4px;
  padding: 0;
}
.pad-up { left: 12px; bottom: 88px; width: 88px; height: 44px; }
.pad-left { left: 12px; bottom: 36px; width: 42px; height: 44px; }
.pad-right { left: 58px; bottom: 36px; width: 42px; height: 44px; }
.pad-send { right: 12px; bottom: 36px; width: 88px; height: 96px; }

.unsupported {
  border: 1px solid #9aada8;
  color: #1c2428;
  background: #d5dde4;
  padding: 2em;
  margin: 5em;
  display: inline-block;
}

.game-explanation {
  font-size: 14px;
  line-height: 1.55;
  color: #3a454c;
  margin: 8px 0 0;
}
hr {
  border: 0;
  border-top: 1px solid #c5d0d6;
  margin: 24px 0 16px;
}
.game-credit {
  font-size: 13px;
  line-height: 1.5;
  color: #5a666c;
}
.game-credit a { color: #1c2428; }

@media (pointer: coarse) {
  #touch-pads { display: block; }
}

@media screen and (min-width: 1200px) {
  #floe-field { width: 780px; }
}
