@font-face {
  font-family: "Routed Gothic";
  src: url("/fonts/RoutedGothic.woff") format('woff');
}

:root {
  --help: #fffbe3; /* and coords */
  --border: #8a8a8a; /* and close button */
  --button: #d6d6d6; /* and dialog header */
  --hover: #bdbdbd; /* and focus */
  --text: #000000; /* and close button */
  --background: #ffffff; /* mainly dialog tabs */
  --sidebar: #eeeeee; /* and keyboard shortcuts */
  --accent: #ffa0a0; /* just for tab highlight */
  --danger: #ff7676; /* clear button hover */
  --link: #5f94c8; /* just for about section */
}
body.dark, body.blue {
  --help: #272727; /* #2e2d00 */
  --border: #747474;
  --button: #3d3d3d;
  --hover: #505050;
  --text: #ffffff;
  --background: #121212;
  --sidebar: #272727;
  --accent: #a13131;
  --danger: #c73c3c;
  --link: #52789e;
}


body, input, select {
  color: #000000;
  color: var(--text);
  background-color: #ffffff;
  background-color: var(--background);
}

html, body {
  height: 100%;
  width: 100%;
}
canvas, bgcanvas {
  position: fixed;
  z-index: 2;
  top: 0;
  left: 0;
  display: block;
  height: 100%;
  width: 100%;
}
footer {
    display: none;
  position: fixed;
  z-index: 4;
  bottom: 16px;
  right: 16px;
}
#help, #coords {
  display: none;
  background: #FFFBE3;
  background: var(--help);
  padding: 1px 8px;
  border: 1px solid #8A8A8A;
  border: 1px solid var(--border);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
#coords {
  position: fixed;
  z-index: 5;
  display: none;
}

sup, sub {
  font: 10px sans-serif;
}

/* division */

body {
  font: 14px sans-serif;
  line-height: 22px;
  margin: 0;
}
h2, h3 {
  font-size: 16px;
  margin: 0;
}
h3 {
  display: none;
}
h3, p {
  margin: 0 0 16px;
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}
a, button, select, input {
  font: 14px sans-serif;
  box-sizing: content-box;
  outline: none;
}
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: 2px;
  border: 1px solid #8A8A8A;
  border: 1px solid var(--border);
  border-radius: 2px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10'><polygon fill='%238A8A8A' points='1,2 5,9 9,2'></polygon></svg>");
  background-position: right 6px center;
  background-repeat: no-repeat;
}
#options select {
  float: right;
  width: 100px;
}
button, .actions a {
  color: #000000;
  color: var(--text);
  cursor: pointer;
  font: 14px sans-serif;
  display: block;
  background: #D6D6D6;
  background: var(--button);
  border: 1px solid #8A8A8A;
  border: 1px solid var(--border);
  border-radius: 2px;
}
button:hover, .actions a:hover {
  background: #BDBDBD;
  background: var(--hover);
}
button:focus, .actions a:focus {
  background: #BDBDBD;
  background: var(--hover);
}
button::-moz-focus-inner, select::-moz-focus-inner {
  padding: 0;
  border: 0;
}
.actions {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  padding: 8px;
}
.actions li {
  margin: 8px;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.actions button, .actions a {
  width: 64px;
  position: relative;
  color: #000;
  color: var(--text);
  text-decoration: none;
  text-align: center;
  padding: 4px;
}
.actions select {
  width: 68px;
  position: relative;
}

.actions input {
  width: 60px;
  position: relative;
  padding: 3px 6px;
  border: 1px solid #8A8A8A;
  border: 1px solid var(--border);
  border-radius: 2px;
}
.dialog {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  height: 100%;
  min-height: 360px;
  display: none;
  background: rgba(0, 0, 0, 0.02);
}
.dialog div {
  position: absolute;
  bottom: 50%;
  left: 32px;
  right: 32px;
  transform: translate(0, 50%);
  width: 75%;
  max-width: 440px;
  background: #fff;
  background: var(--background);
  border: 1px solid #8A8A8A;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  margin: auto;
}
.dialog header {
  width: 100%;
  float: left;
  background: #D6D6D6;
  background: var(--button);
  border-bottom: 1px solid #8A8A8A;
  border-bottom: 1px solid var(--border);
  border-radius: 3px 3px 0 0;
}
.dialog header h2 {
  float: left;
  margin: 12px 12px 11px;
}
.dialog header svg {
  display: block;
}
.dialog header button {
  float: right;
  font-weight: bold;
  padding: 3px;
  margin: 12px 12px 0;
  border: none;
  background: transparent;
}
#options-close {
  fill: #8a8a8a;
  fill: var(--border);
}
.dialog header button:hover svg polygon, .dialog header button:focus svg polygon {
  fill: #000;
  fill: var(--text);
}
.dialog aside {
  height: 258px;
  width: 30%;
  float: left;
  background: #EEEEEE;
  background: var(--sidebar);
  border-radius: 0 0 0 3px;
}
.dialog aside ul {
  margin-top: 16px;
}
.dialog aside a {
  color: #000;
  color: var(--text);
  text-decoration: none;
  display: block;
  padding: 8px;
  margin-bottom: 6px;
  margin-left: 4px;
}
.dialog aside a:hover, .dialog aside a:focus  {
  background: #fff;
  background: var(--background);
  border-left: 4px solid #fff;
  border-left: 4px solid var(--background);
  margin-left: 0;
}
.dialog aside a.active  {
  background: #fff;
  background: var(--background);
  border-left: 4px solid #FFA0A0;
  border-left: 4px solid var(--accent);
  margin-left: 0;
}
.dialog section {
  display: none;
  padding: 20px 28px;
  margin-top: 46px;
  margin-left: 30%;
}
.dialog section.active {
  display: block;
}
.dialog section p {
  height: 24px;
  clear: right;
}
.dialog section input {
  width: 92px;
  float: right;
  padding: 3px 6px;
  border: 1px solid #8A8A8A;
  border: 1px solid var(--border);
  border-radius: 2px;
}
.dialog section button {
  float: right;
  width: 100px;
  padding: 3px 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
#clear {
  background: #ffa0a0;
  background: var(--accent);
}
#clear:hover, #clear:focus {
  background: #ff7676;
  background: var(--danger);
}
#about a {
  color: #5F94C8;
  color: var(--link);
}

#shortcuts ul {
  text-align: left;
}
#shortcuts ul li {
  margin-bottom: 8px;
}
#shortcuts span {
  width: 106px;
  display: inline-block;
  text-align: left;
}
#shortcuts span i {
  font: normal 12px sans-serif;
  padding: 3px 4px 2px;
  background: #eee;
  background: var(--sidebar);
  border: 1px solid #8A8A8A;
  border: 1px solid var(--border);
  border-radius: 2px;
  margin-left: 8px;
}

/* theme items that couldn't use vars */

.dark select, .blue select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10'><polygon fill='%23747474' points='1,2 5,9 9,2'></polygon></svg>");
}