body {
  font-family: Arial, Helvetica, sans-serif;
  padding: 0 .5rem;
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
}

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

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  margin-bottom: .5rem;
}

h1 {
  font-size: 2em;
  margin-top: .5em;
}

h2 {
  font-size: 1.75em;
}

h3 {
  font-size: 1.5em;
}

h4, h5, h6 {
  font-size: 1em;
}

ul, ol, p {
  margin-bottom: 1rem;
}

ul, ol {
  text-align: left;
  padding-left: 1em;
}

small {
  font-size: .75em;
}

img, iframe {
  max-width: 100% !important;
}

table {
  border-collapse: collapse;
  margin: 0 auto 1em;
}

table th {
  padding: 0 .5em;
}

table td {
  text-align: left;
  border: 1px solid;
  padding: .25em .5em;
  line-height: 1.25;
  vertical-align: top;
  max-width: 40em;
}

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
  line-height: 1.25;
}

.input {
  display: block;
  width: 100%;
  max-width: 40em;
  padding: .25em .5em;
  margin: .25em auto;
  height: 2em;
}

textarea.input {
  height: auto;
  min-height: 8em;
  resize: vertical;
}

.btn {
  display: inline-block;
  cursor: pointer;
  padding: .25em .5em;
  margin: .25em .5em;
  color: inherit;
  text-decoration: none;
  border: 1px solid;
  line-height: 1.25;
}

.btn.disabled {
  opacity: .5;
  cursor: default;
}

a.disabled.disabled, .dropdown a.disabled, .tooltip a.disabled {
  opacity: .5;
  cursor: default;
  pointer-events: none;
}

.btn.ed-exit {
  float: right;
}

.select {
  padding: .25em .5em;
  position: relative;
  cursor: pointer;
}

.select.input {
  border: 1px solid #888;
  height: auto;
}

.select:after {
  content: '\25BC';
  position: absolute;
  top: 0;
  right: .25em;
  display: inline-block;
  line-height: 2em;
}

.select.open:after {
  content: '\25B2';
}

.select a {
  text-decoration: none;
  color: inherit;
}

.select > * {
  display: none;
  padding-right: 1.25em;
}

.select > .selected, .select.open > * {
  display: block;
}

.select.open > a.no-value {
  font-weight: 700;
}

.select.open:not(.input) > a[data-value]:before {
  content: '- ';
}

.select.open > a[data-value].selected:after {
  content: '\2713';
  position: absolute;
  right: .25em;
}

.select.input.open {
  padding-top: 1.75em;
}

.center {
  text-align: center;
}

#message {
  position: fixed;
  z-index: 2;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
}

.msg {
  margin-top: .5em;
  padding: .5em 1em;
  font-weight: 700;
  line-height: 1.25;
}

.msg.error {
  color: #A00;
  background: #F88;
}

.msg.success {
  color: #0A0;
  background: #8A8;
}

#message .msg {
  font-size: 1.25em;
  margin-top: 2px;
}

.tooltip, .confirm {
  position: absolute;
  z-index: 2;
  border: 1px solid;
  background: #FFF;
  padding: .25em .5em;
  margin: .25em 0;
  max-height: 90vh;
  max-width: 50em;
  overflow: auto;
}

.confirm {
  z-index: 3;
  top: 30%;
  left: 0;
  right: 0;
  max-width: 40em;
  margin: 0 auto;
  box-shadow: 0 0 1em .25em #000;
  text-align: center;
}

.tooltip.dropdown {
  padding: 0 .25em;
}

.dropdown > * {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: .25em 0;
  margin: 0 .25em;
}

.dropdown > *:not(:last-child) {
  border-bottom: 1px solid;
}

.dropdown .input {
  padding: 0;
}

.tooltip.modal {
  left: 0;
  right: 0;
  margin: 0 auto;
  padding: 1.25em 2.5em;
  max-width: 100em;
}

.tooltip.modal::before {
  content: '';
  position: fixed;
  z-index: -1;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, .5);
}

.tooltip.modal table {
  margin-top: 1em;
  width: 100%;
}

.tooltip.modal > .close {
  position: absolute;
  top: 0;
  right: 0;
  margin-right: .25em;
}

#header, #footer {
  text-align: center;
  max-width: 60em;
  margin: 2em auto;
}

#editor {
  text-align: center;
  max-width: 60em;
  margin: 0 auto;
}

#header .legend {
  margin-top: 1.5em;
  padding: 1em;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  display: inline-block;
  text-align: left;
}

#header .legend h4 {
  margin-bottom: 0.75em;
  text-align: center;
}

#header .legend-item {
  display: inline-block;
  margin-right: 1.5em;
  margin-bottom: 0.5em;
}

#header .legend-color {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 0.5em;
  border: 1px solid #999;
  vertical-align: middle;
}

ul.pagination {
  list-style: none;
  padding-left: 0;
  text-align: center;
}

ul.pagination li {
  display: inline-block;
}

ul.pagination .active .btn {
  border-color: #00F;
  box-shadow: 0 0 .5em .125em #00F;
}

#editor .plus-one {
  margin-top: 1em;
}
