:root {
  --terrain-desert: #dddddd;
  --terrain-swamp: #bbbbbb;
  --terrain-grassland: #999999;
  --terrain-forest: #777777;
  --terrain-river: #555555;
  --terrain-ocean: #333333;
  --terrain-mountain: #111111;
}

body {
  font-family: Arial, sans-serif;
  font-size: 12px;
}

canvas {
  background-color: #ffffff;
  display: block;
  margin: auto;
}

.legend {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 20px;
  background: white;
  z-index: 1;
}

ul {
  padding-left: 0;
  margin: 0;
}

ul li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid #000;
}

.context-menu {
  position: absolute;
  display: none;
  background-color: white;
  border: 1px solid #ccc;
  padding: 5px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 5px;
  cursor: pointer;
}

.context-menu-item:hover {
  background-color: #eee;
}

#buttons {
  position: absolute;
  top: 10px;
  z-index: 2;
}

.risks span {
  position: relative;
}
.risks span::after {
  position: absolute;
  top: -15px;
  left: 0;
  opacity: .15;
  font-size: 1.5em;
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
}
.risks span.risk-1::after {
  content: "1h";
}
.risks span.risk-2::after {
  content: "2h";
}
.risks span.risk-3::after {
  content: "3h";
}

.poi-text {
  display: inline-block;
  min-width: 100px;
  padding: 2px 4px;
  border: 1px dashed #ccc;
  border-radius: 3px;
  cursor: text;
}
.poi-text:focus {
  outline: none;
  border-color: #666;
  background: #f8f8f8;
}

@media print {
  #buttons {
    display: none;
  }

  .poi-text {
    border: none;
    padding: inherit;
  }
}