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

h1 {
  text-align: center;
  font-size: 40px;
  position: relative;
}
h1 .sub-title {
  display: inline-block;
  font-size: 10px;
  font-weight: normal;
  position: absolute;
  bottom: 5px;
  color: #aaa;
}

.blue {
  color: #4285ff;
}

.yellow {
  color: #fbbc05;
}

.red {
  color: #ea4335;
}

.green {
  color: #3aa853;
}

button {
  appearance: none;
  border: 1px solid #aaa;
  background: #eee;
  color: #444;
  border-radius: 4px;
  cursor: pointer;
}
button.active {
  background: #444;
  color: #eee;
}

#search {
  max-width: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin: 5px auto;
  width: 100%;
}
#search select {
  width: 100%;
  max-width: 70px;
  display: block;
  padding: 5px;
}
#search select, #search input, #search button {
  height: 2em;
  appearance: none;
  border: 1px solid #aaa;
  background: #fff;
  color: #444;
  padding: 4px;
  border-radius: 4px;
}
#search input {
  flex-grow: 1;
}
#search button {
  background: #eee;
  width: 30px;
}

#status {
  text-align: center;
  flex-direction: column;
  display: flex;
  width: 100%;
  font-size: 10px;
}

#controller {
  display: flex;
  margin: 10px;
  gap: 0 15px;
  justify-content: center;
  align-items: center;
}
#controller .guide {
  display: flex;
  flex-direction: column;
  align-items: center;
}
#controller .guide i {
  font-size: 50px;
}
#controller .guide .title {
  font-size: 14px;
  font-weight: bold;
}
#controller .guide .heading {
  width: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1/1;
  gap: 10px;
}
#controller .guide .heading .direction {
  font-size: 12px;
  color: #888;
}
#controller .guide .heading > div {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-around;
}
#controller .buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 160px;
  aspect-ratio: 4/3;
  grid-gap: 5px;
}
#controller .buttons i {
  font-size: 1.2em;
}

.tile {
  border: 1px solid #aaa;
  border-right: 0;
  border-bottom: 0;
  display: flex;
  gap: 2px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  font-size: 10px;
  text-align: center;
  overflow: hidden;
  color: black !important;
  text-decoration: none;
  padding: 2px;
  cursor: pointer;
  pointer-events: none;
  tab-index: -1;
}
.tile.current {
  border: 3px solid red;
}
.tile span {
  line-height: 1.2;
}
.tile .pref {
  transform: scale(0.85);
}
.tile[data-p] {
  pointer-events: auto;
}

#map {
  margin: 0 auto;
  border: 1px solid #aaa;
  max-width: 400px;
  aspect-ratio: 1/0.7;
  display: grid;
}
#map:not(:empty) {
  border-top: 0;
  border-left: 0;
}
#map.loading {
  pointer-events: none;
  opacity: 0.15;
}

.description {
  border: 2px solid #ddd;
  display: block;
  max-width: min(600px, 100vw - 20px);
  margin: 20px auto;
  padding: 20px;
  font-size: 12px;
}
