@font-face {
  font-family: Inter;
  src: url("assets/inter.ttf");
}
@font-face {
  font-family: Inter;
  src: url("assets/inter-semibold.ttf");
  font-weight: 600;
}
@font-face {
  font-family: Feather;
  src: url("assets/feather.ttf");
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: #eee8dc;
  color: #493825;
  font-family: Inter, sans-serif;
}
body {
  display: grid;
  place-items: center;
  min-height: 100dvh;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible {
  outline: 3px solid #b94c30;
  outline-offset: 4px;
}
button:disabled {
  cursor: wait;
}
button[hidden],
[hidden] {
  display: none !important;
}
#game {
  position: relative;
  width: min(100vw, 390px);
  height: min(100dvh, 844px);
  overflow: hidden;
  background: #fff9f1;
  touch-action: none;
  user-select: none;
}
canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
header {
  position: absolute;
  inset: 2px 10px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
header button {
  pointer-events: auto;
}
h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.8px;
  margin: 0;
}
.icon {
  font-family: Feather;
  font-size: 26px;
  background: transparent;
  border: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
}
#altitude {
  position: absolute;
  top: 45px;
  width: 100%;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  pointer-events: none;
}
#pause {
  position: absolute;
  right: 15px;
  top: 44px;
  font-size: 21px;
}
#panel {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 150px;
  text-align: center;
  background: #fff9f1f5;
  padding: 22px 18px 16px;
  border-radius: 20px;
  box-shadow: 0 5px 30px #4938250b;
}
h2 {
  font-weight: 600;
  font-size: 25px;
  letter-spacing: -0.7px;
  margin: 12px 0;
}
p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: #7e775b;
}
#start {
  background: #b94c30;
  color: #fff9f1;
  border: 0;
  border-radius: 24px;
  padding: 14px 32px;
  margin: 19px 0 10px;
  font-weight: 600;
  min-width: 190px;
}
.note {
  font-size: 11px;
  color: #83765e;
}
#steering {
  position: absolute;
  bottom: max(70px, env(safe-area-inset-bottom));
  left: 25px;
  right: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
#steering button {
  pointer-events: auto;
}
.steer {
  font-size: 42px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #fff9f14d;
}
.steer:active {
  background: #eadfc7b8;
}
#hint {
  font-size: 12px;
  color: #827152;
}
footer {
  position: absolute;
  bottom: 16px;
  left: 25px;
  right: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #8e8067;
  pointer-events: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (max-height: 650px) {
  #panel {
    bottom: 120px;
    padding: 12px;
  }
  #altitude {
    top: 65px;
  }
  header {
    top: 10px;
  }
  #steering {
    bottom: 35px;
  }
}
/* Keep instructions legible when the scrolling course passes beneath them. */
#hint {
  background: #fff9f1ed;
  padding: 5px 9px;
  border-radius: 12px;
}
header h1 {
  flex: 1;
  margin-left: 6px;
}
#scoreboard {
  position: absolute;
  top: 60px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  background: #fff9f1e8;
  padding: 10px 12px;
  border-radius: 14px;
  pointer-events: none;
}
#scoreboard #altitude {
  position: static;
  width: auto;
  font-size: 14px;
  color: #aa482c;
}
#opponent {
  color: #775b93;
  text-align: right;
}
#invite-label {
  display: block;
  font-size: 11px;
  color: #827152;
  margin-top: 12px;
}
#invite {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid #dfd2bb;
  border-radius: 8px;
  padding: 9px;
  background: #fffaf3;
  color: #493825;
  font: 11px Inter;
  user-select: text;
}
#copy {
  background: none;
  border: 0;
  font-size: 13px;
  text-decoration: underline;
  padding: 12px;
  color: #aa482c;
}
#respawn {
  position: absolute;
  left: 28px;
  right: 28px;
  top: 42%;
  text-align: center;
  border-radius: 20px;
  background: #fff9f1f0;
  padding: 17px 12px;
  font-size: 15px;
  font-weight: 600;
  color: #aa482c;
  pointer-events: none;
}
