@font-face {
  font-family: 'xkcd-script';
  src: url('../fonts/xkcd-script.woff2') format('woff2'),
       url('../fonts/xkcd-script.woff') format('woff'),
       url('../fonts/xkcd-script.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: 'xkcd-script', 'Comic Sans MS', 'Bradley Hand', 'Comic Neue', cursive;
}

#game-container {
  position: relative;
  width: 800px;
  height: 700px;
}

@media (max-width: 800px) {
  #game-container {
    width: 100vw;
    height: calc(100vw * 700 / 800);
  }
}

@media (max-width: 600px) {
  #game-container {
    width: 100vw;
    height: calc(100vw * 700 / 400);
    padding-bottom: 8px;
  }

  #refresh-btn {
    font-size: 18px;
  }

  #info-btn {
    font-size: 16px;
  }
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

#game-canvas:active {
  cursor: grabbing;
}

#refresh-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

#refresh-btn:hover {
  color: #333;
}

#info-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  font-size: 22px;
  font-style: italic;
  color: #666;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  font-family: Georgia, serif;
}

#info-btn:hover {
  color: #333;
}

#info-panel {
  position: absolute;
  top: 40px;
  left: 8px;
  z-index: 10;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 12px 16px;
  font-size: 14px;
  color: #333;
  line-height: 1.6;
}

#info-panel.hidden {
  display: none;
}

#info-panel a {
  color: #333;
}
