:root {
  --half: calc(min(100vw, 100vh) / 2.1);
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;

  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-evenly;
  width: min(100vw, 100vh);
}

#gentime {
  color: white;
  font-size: 17px;
  padding-top: 5px;
}

#map {
  position: relative;
  display: grid;

  padding-top: calc(var(--half) / 12);

  grid-template-rows: repeat(18, 1fr);
  grid-template-columns: repeat(18, 1fr);

  box-shadow: 2px 2px 20px darkgray;
  border-radius: 10px 10px 0px 0px;
  background-color: darkgray;

  gap: 1px;
  overflow: hidden;
}

#map .top {
  position: absolute;
  width: 100%;
  height: calc(var(--half) / 12);
  background-color: #4b88ed;
  box-shadow: 0px 5px 15px -2px darkgray;
  border-radius: 10px 10px 0px 0px;

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

#map .top input[type="text"] {
  height: 50%;
  background-color: transparent;
  border: none;
  border-bottom: 2px solid #555;
  border-radius: 5px;
  font-size: 20px;
  padding: 5px;
  padding-bottom: 0px;
  color: white;
  font-weight: bold;
  margin-left: 20px;
  width: 30%;
}
#map .top input[type="text"]::placeholder {
  color: lightgray;
}

#map .tile {
  width: calc(var(--half) / 18);
  height: calc(var(--half) / 18);
  background-color: white;
}
#map .tile[data-angle="90"] {
  transform: rotate(90deg);
}
#map .tile[data-angle="180"] {
  transform: rotate(180deg);
}
#map .tile[data-angle="270"] {
  transform: rotate(270deg);
}
#map.zones .tile[data-zone="1"] {
  background-color: #00ffff;
}
#map.zones .tile[data-zone="2"] {
  background-color: #f4cccc;
}
#map.zones .tile[data-zone="3"] {
  background-color: #fff2cc;
}
#map.no106 .tile[data-nodecals="true"] {
  background-color: #ea9999;
}

#map .modes {
  display: flex;
  width: 20%;
  align-items: center;
  justify-content: space-around;
}

#map .modes > div {
  width: 100%;
  height: calc(var(--half) / 12);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  color: white;
  transition: background 0.2s, color 0.2s;
}

#map .top .selected {
  background-color: rgba(255, 255, 255, 0.2);
  color: #333 !important;
}
#map .sel {
  box-shadow: inset 0px 0px 2px black;
}

#map p {
  font-variant: small-caps;
  font-size: 14px;
  color: white;
}

#info {
  width: var(--half);
  height: var(--half);
  display: flex;
  align-items: center;
  justify-content: center;
}

#info table {
  font-size: 120%;
  border-collapse: collapse;
  width: calc(var(--half) / 2);
  height: calc(var(--half) / 2);
  border-radius: 10px;
  box-shadow: 2px 2px 20px darkgray;
  overflow: hidden;
}

#info th {
  height: calc(var(--half) / 14);
  width: calc(var(--half) / 2);
  background-color: #4b88ed;
  color: white;
}
#info tr {
  border-bottom: 1px solid darkgray;
  height: calc(var(--half) / 14);
  text-align: center;
}
#info td {
  width: calc(var(--half) / 2);
}

#rdesc {
  font-size: 16px;
}
