:root {
  --juniora-h: 56px
}
* {
  box-sizing: border-box
}
html,
body {
  margin: 0;
  padding: 0;
  background-color: #F8F3A9;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  overflow: hidden
}
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center
}
.game-wrap {
  width: 100vw;
  height: calc(100vh - var(--juniora-h));
  height: calc(100dvh - var(--juniora-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px
}
canvas {
  border-radius: 0.4em;
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;

  aspect-ratio: 750/450
}

.mobile-controls {
  direction: ltr;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--juniora-h) + 14px);
  display: none;
  grid-template-columns: 64px 64px 64px;
  grid-template-rows: 64px 64px;
  gap: 6px;
  z-index: 90;
  user-select: none
}
.mc-btn {
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 10px;
  font-size: 22px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  font-family: inherit
}
.mc-btn:active {
  transform: translateY(2px)
}
.mc-up {
  grid-column: 2;
  grid-row: 1
}
.mc-left {
  grid-column: 1;
  grid-row: 2
}
.mc-down {
  grid-column: 2;
  grid-row: 2
}
.mc-right {
  grid-column: 3;
  grid-row: 2
}
@media (hover: none) and (pointer: coarse) {
  .mobile-controls {
    display: grid
  }
  .game-wrap {
    height: calc(100vh - var(--juniora-h) - 160px);
    height: calc(100dvh - var(--juniora-h) - 160px);
    align-items: flex-start;
    padding-top: 12px
  }
}

.juniora-overlay {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--juniora-h);
  background: #292929;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 0 16px
}
.juniora-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-family: var(--jn-font);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.9
}
.juniora-logo {
  width: 28px;
  height: auto;
  display: block
}
.juniora-text {
  letter-spacing: normal
}
@media (max-width: 480px) {
  :root {
    --juniora-h: 52px
  }
  .juniora-link {
    font-size: 12.5px
  }
}

.juniora-overlay {
  height: var(--juniora-h)
}
.juniora-link {
  font-family: var(--jn-font);
  font-size: clamp(12px, 3.4vw, 15px);
  font-weight: 700;
  line-height: 1.9;
  letter-spacing: normal;
  gap: 8px;
  white-space: nowrap
}
.juniora-logo {
  width: 22px;
  height: auto
}
.juniora-text {
  letter-spacing: normal
}
@media (max-height: 520px) {
  .juniora-link {
    font-size: 12px
  }
  .juniora-logo {
    width: 18px
  }
}

.mc-btn, .jump-btn, #jumpBtn, #controls button, .mc-fire {
  font-family: var(--jn-font);
  font-weight: 700;
}
