@import url("battle.css");
@import url("fonts.css");
::-moz-selection {
  color: var(--text);
  background-color: var(--highlight);
}
::selection {
  color: var(--text);
  background-color: var(--highlight);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
}

::-webkit-input-placeholder {
  color: var(--accent);
}

:-ms-input-placeholder {
  color: var(--accent);
}

::-ms-input-placeholder {
  color: var(--accent);
}

::placeholder {
  color: var(--accent);
}

body {
  background-color: var(--background);
  font-family: var(--textfont);
  min-height: 98vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin: 0;
  gap: 1vh;
  overflow-x: hidden;
}

:where(h1, h2, h3, h4, h5, h6) {
  font-family: var(--titlefont);
}

:where(button, input, select, textarea) {
  font-family: inherit;
}

:root {
  --site-sidebar-width: 15rem;
  --background: #28231e;
  --text: #f3ead7;
  --highlight: #bca36b;
  --accent: #342f28;
}

body.has-site-navigation {
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
  padding-left: 0;
  align-items: stretch;
}

.site-sidebar {
  position: fixed;
  z-index: 1000;
  inset: 0 auto 0 0;
  width: var(--site-sidebar-width);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 1rem;
  overflow-y: auto;
  color: var(--text);
  background-color: var(--accent, #342f28);
  border-right: 1px solid var(--highlight, #bca36b);
  font-family: var(--textfont);
  transition: transform 150ms ease, visibility 0s linear;
}

body.has-site-navigation.site-nav-collapsed .site-sidebar {
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 150ms ease, visibility 0s linear 150ms;
}

.site-sidebar-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  border-bottom: 1px solid var(--highlight, #bca36b);
}

.site-brand {
  flex: 0 0 auto;
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
  white-space: normal;
  width: auto;
  height: auto;
  color: var(--text, #f3ead7);
  font-family: var(--titlefont);
  font-size: 1.3rem;
  line-height: 1.25;
  font-weight: bold;
  justify-content: center;
  text-align: center;
  margin-top: 1rem;
}

.site-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.site-nav-link {
  width: auto;
  height: auto;
  min-height: 2.75rem;
  box-sizing: border-box;
  justify-content: flex-start;
  padding: 0.65rem 0.75rem;
  border-left: 3px solid transparent;
  border-radius: 0.25rem;
  color: var(--text, #f3ead7);
  font-family: var(--textfont);
  font-size: 1rem;
  text-align: left;
  text-decoration: none;
}

.site-nav-link:hover,
.site-nav-link:focus-visible {
  color: var(--background, #28231e);
  background-color: var(--highlight, #bca36b);
  outline: 2px solid transparent;
}

.site-nav-link.is-active {
  border-left-color: var(--highlight, #bca36b);
  color: var(--text, #f3ead7);
  background-color: var(--background, #28231e);
  font-weight: bold;
}

.site-nav-toggle {
  position: fixed;
  z-index: 1004;
  top: 0.5rem;
  left: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--highlight, #bca36b);
  border-radius: 0.25rem;
  color: var(--text, #f3ead7);
  background-color: var(--accent, #342f28);
  font: inherit;
  font-family: var(--titlefont);
  cursor: pointer;
}

.site-nav-toggle-icon {
  display: block;
  flex: 0 0 1.5rem;
  width: 1.5rem;
  height: 1.5rem;
  background-color: currentColor;
  -webkit-mask: var(--site-nav-compass) center / contain no-repeat;
  mask: var(--site-nav-compass) center / contain no-repeat;
}

body.has-site-navigation:not(.site-nav-collapsed) .site-nav-toggle {
  display: none;
}

.site-nav-close {
  order: -1;
  align-self: flex-end;
  flex: 0 0 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 2.5rem;
  border: 1px solid var(--highlight, #bca36b);
  border-radius: 0.25rem;
  color: var(--text, #f3ead7);
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}

.site-nav-backdrop {
  display: none;
}

body.has-site-navigation .maincontent {
  width: 100%;
}

body.has-site-navigation .maporg {
  width: 100%;
  box-sizing: border-box;
}

body.has-site-navigation.bmBody .battlemapbody {
  width: calc(100vw - 10rem - 1vh);
  min-width: 0;
  box-sizing: border-box;
  flex: 1 1 auto;
}

@media only screen and (max-width: 900px) {
  body.has-site-navigation {
    padding-top: 3.75rem;
  }

  body.has-site-navigation .maincontent,
  body.has-site-navigation .maporg {
    width: 100%;
  }

  body.has-site-navigation.bmBody .battlemapbody {
    width: auto;
    min-width: 100%;
  }

  body.site-nav-open {
    overflow: hidden;
  }

  .site-sidebar {
    z-index: 1002;
    width: min(85vw, 18rem);
  }

  .site-nav-backdrop:not([hidden]) {
    position: fixed;
    z-index: 1001;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(0, 0, 0, 0.45);
  }
}

@media only screen and (max-width: 900px) {
  .site-sidebar,
  body.has-site-navigation.site-nav-collapsed .site-sidebar {
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 150ms ease, visibility 0s linear 150ms;
  }

  body.has-site-navigation.site-nav-open .site-sidebar {
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
  }

  body.has-site-navigation.site-nav-collapsed .site-nav-toggle {
    display: inline-flex;
  }

  body.has-site-navigation.site-nav-open .site-nav-toggle {
    display: none;
  }

  body.has-site-navigation.site-nav-open .site-nav-close {
    display: inline-flex;
  }
}

a {
  color: var(--text);
  text-decoration: none;
  width: 100%;
  height: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.maincontent {
  width: 100vw;
  height: 100vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  position: relative;
}

body.home-page.has-site-navigation {
  padding-top: 0;
}

.home-page .maincontent {
  height: 100vh;
  height: 100dvh;
}

.heading {
  width: 50%;
  background-color: var(--accent);
  background-size: 100vw 100vh;
  background-position: center;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  font-family: var(--titlefont);
}

.home-page .heading {
  background-size: 100vw 100vh;
  background-size: 100vw 100dvh;
}

.intro-title {
  color: var(--campaign-title);
  font-size: 2vw;
  text-transform: lowercase;
  font-weight: normal;
  opacity: 0;
}

.intro-title:hover {
  cursor: default;
}

.campaign-title {
  color: var(--campaign-title);
  font-size: 4vw;
  border-bottom: 1px solid var(--campaign-title);
  font-weight: normal;
  text-shadow: 0 2px 6px var(--background, #111);
  position: absolute;
  opacity: 0;
}

.campaign-title:hover {
  cursor: default;
}

.addnotes {
  position: relative;
  width: 92.7%;
  min-height: 40%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  padding: 10vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.note-add {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1vh;
  top: 3vh;
  position: relative;
}

.note-add #addsubject {
  width: 62vw;
  height: 5vh;
  font-family: var(--textfont);
  font-size: 1.8vh;
  font-weight: bold;
}

.note-add #addnote {
  width: 62vw;
  height: 20vh;
  font-family: var(--textfont);
  font-size: 1.8vh;
  font-weight: 900;
}

.note-add #addnotesubmit {
  font-family: var(--textfont);
  font-size: 1.8vh;
  background-color: var(--background);
  border: 0.05vw solid var(--highlight);
  color: var(--text);
  padding-left: 5vh;
  padding-right: 5vh;
  padding-top: 1vh;
  padding-bottom: 1vh;
  font-weight: bold;
  -webkit-transition-duration: 100ms;
  transition-duration: 100ms;
}

.note-add #addnotesubmit:hover {
  background-color: var(--highlight);
  color: var(--background);
  cursor: pointer;
}

.radiobuttons {
  width: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 1vh;
}

.note-add input[type="radio"] {
  display: none;
}

.note-add input[type="radio"]:checked + .box {
  background-color: transparent;
}

.note-add input[type="radio"]:checked + .box span {
  color: var(--text);
}

.note-add input[type="radio"]:checked + .box span:before {
  opacity: 1;
}

.radiobuttons label {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
}

.note-add .box {
  width: 100%;
  height: 10vh;
  background-color: transparent;
  border: 0.05vw solid var(--highlight);
  border-radius: 5px;
  -webkit-transition: all 250ms ease;
  transition: all 250ms ease;
  will-change: transition;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  text-align: center;
  cursor: pointer;
  position: relative;
  font-family: var(--textfont);
  font-weight: 900;
}

.note-add .box:active {
  -webkit-transform: translateY(10px);
  transform: translateY(10px);
}

.note-add .box span {
  position: relative;
  left: 0;
  right: 0;
  -webkit-transition: all 300ms ease;
  transition: all 300ms ease;
  font-size: 1.8vh;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  color: var(--text);
  padding: 1vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.note-add .box span:before {
  font-family: "Font Awesome 5 Pro";
  display: block;
  opacity: 0;
  -webkit-transition: all 300ms ease-in-out;
  transition: all 300ms ease-in-out;
  font-weight: normal;
  color: var(--highlight);
  background-color: transparent;
  width: 100%;
  height: 100%;
  position: absolute;
  font-size: 4vh;
  z-index: -1;
}

.note-add .wizard span:before {
  content: "\f0d0";
}

.note-add .fighter span:before {
  content: "\f6de";
}

.note-add .sorcerer span:before {
  content: "\f6e8";
}

.note-add .rogue span:before {
  content: "\f13e";
}

.note-add .barbarian span:before {
  content: "\f6b3";
}

.note-add .bard span:before {
  content: "\f6f9";
}

.note-add .cleric span:before {
  content: "\f132";
}

.note-add .druid span:before {
  content: "\f724";
}

.note-add .monk span:before {
  content: "\f6ef";
}

.note-add .paladin span:before {
  content: "\f71c";
}

.note-add .ranger span:before {
  content: "\f6b9";
}

.note-add .warlock span:before {
  content: "\f6e5";
}

.options {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 1vw;
  width: 45%;
  left: 0;
  position: relative;
}

.options label {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
}

.sort-label {
  position: relative;
  top: 0;
  width: 100%;
  height: 2vh;
  border: 0.1vh solid var(--highlight);
  border-radius: 5%;
  color: var(--text);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  text-align: center;
  -webkit-transition-duration: 50ms;
  transition-duration: 50ms;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-family: var(--textfont);
  font-size: 1.8vh;
}

.sort-label:hover {
  top: 0.2vh;
  cursor: pointer;
}

.sort-default {
  background-color: var(--highlight);
}

.options label input[type="radio"] {
  display: none;
}

.searchbox {
  width: 90vw;
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
}

.searchinput {
  height: 2vh;
  max-width: 50%;
  position: absolute;
  right: 0;
  font-family: var(--textfont);
  font-weight: bold;
  font-size: 1.8vh;
  padding: 1.5vh;
  background-color: var(--background);
  color: var(--text);
  border: 0.05vw solid var(--highlight);
}

.notesholder {
  padding: 1vw;
  min-height: 60%;
  width: 100%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1vh;
  z-index: 1;
  position: relative;
}

.log {
  width: 90vw;
  height: auto;
  border: 0.1vw solid;
  border-color: var(--highlight);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  background-color: transparent !important;
  gap: 1vw;
  padding: 1vw;
  position: relative;
  -webkit-transition-duration: 100ms;
  transition-duration: 100ms;
  z-index: 2;
}

.subject-holder {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
}

.subject {
  width: auto;
  height: auto;
  font-family: var(--titlefont);
  color: var(--text);
  background-color: transparent !important;
  border-color: var(--highlight);
  padding-bottom: 0.2vw;
}

.subject span {
  font-size: 1.9vh;
  text-decoration: underline;
  text-underline-offset: 0.5vh;
}

.note-holder {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
}

.note {
  width: 100%;
  height: auto;
  font-family: var(--textfont);
  color: var(--text);
  background-color: transparent;
  font-size: 1.8vh;
}

.sub-count {
  position: absolute;
  right: 3vh;
  width: auto;
  height: auto;
  font-size: 1.5vh;
  font-family: var(--textfont);
  color: var(--background);
}

.note-count {
  position: absolute;
  right: 3vh;
  width: auto;
  height: auto;
  font-size: 1.5vh;
  font-family: var(--textfont);
  color: var(--background);
}

.earmark {
  position: absolute;
  top: -1;
  right: -1;
  width: 3vh;
  height: 3vh;
  background-color: var(--highlight);
  -webkit-clip-path: polygon(0% 0%, 100% 100%, 100% 0%, 0% 0%);
  clip-path: polygon(0% 0%, 100% 100%, 100% 0%, 0% 0%);
}

.editbtn {
  position: absolute;
  top: -1;
  right: -1;
  width: 3vh;
  height: 3vh;
  background-image: url("pencilblack.svg");
  background-size: 50% 50%;
  background-position: right top;
  background-repeat: no-repeat;
  background-color: transparent;
  -webkit-clip-path: polygon(0% 0%, 100% 100%, 100% 0%, 0% 0%);
  clip-path: polygon(0% 0%, 100% 100%, 100% 0%, 0% 0%);
  display: none;
  z-index: 10;
}

.editbtn:hover {
  cursor: pointer;
}

.log:hover .editbtn {
  display: block;
}

.log:hover {
  background-color: var(--accent) !important;
}

.submitbtn {
  position: absolute;
  top: -1;
  right: -1;
  width: 3vh;
  height: 3vh;
  background-image: url("check.png");
  background-size: 50% 50%;
  background-position: right top;
  background-repeat: no-repeat;
  background-color: transparent;
  -webkit-clip-path: polygon(0% 0%, 100% 100%, 100% 0%, 0% 0%);
  clip-path: polygon(0% 0%, 100% 100%, 100% 0%, 0% 0%);
  border: none;
  z-index: 10;
}

.submitbtn:hover {
  cursor: pointer;
}

.deletebtn {
  position: absolute;
  bottom: -1;
  right: -1;
  width: 3vh;
  height: 3vh;
  background-image: url("delete.png");
  background-size: 50% 50%;
  background-position: right bottom;
  background-repeat: no-repeat;
  background-color: var(--highlight);
  -webkit-clip-path: polygon(100% 0%, 0% 100%, 100% 100%, 100% 0%);
  clip-path: polygon(100% 0%, 0% 100%, 100% 100%, 100% 0%);
  border: none;
  z-index: 10;
}

.deletebtn:hover {
  cursor: not-allowed;
}

.formfield {
  display: none;
  border: 1px solid var(--highlight);
}

.cancel {
  position: absolute;
  right: -10;
  color: var(--text);
  -webkit-transform: rotate(270deg);
  transform: rotate(270deg);
  padding: 0.15vw;
  border: 0.05vw solid var(--highlight);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-transition-duration: 100ms;
  transition-duration: 100ms;
}

.cancel:hover {
  cursor: pointer;
  background-color: var(--highlight);
  color: var(--text);
}

.note-edit {
  height: 100%;
  width: 90%;
}

.hide {
  display: none !important;
}

.show {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
}

.characterheading {
  width: 50%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  font-family: var(--titlefont);
}

.character-notes {
  padding: 1vw;
  min-height: 60%;
  width: 100%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1vh;
  z-index: 1;
  position: relative;
}

.character-entries {
  width: 90vw;
  height: auto;
  border: 0.1vw solid;
  border-color: var(--highlight);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  background-color: transparent !important;
  gap: 1vw;
  padding: 1vw;
  position: relative;
  -webkit-transition-duration: 100ms;
  transition-duration: 100ms;
  z-index: 2;
}

.add-character {
  border-color: var(--highlight);
  background-color: var(--highlight);
}

.character-name {
  -webkit-text-decoration-color: var(--highlight);
  text-decoration-color: var(--highlight);
}

.addchar {
  position: relative;
  width: 92.7%;
  min-height: 40%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  padding: 10vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.char-add {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1vh;
  top: 3vh;
  position: relative;
}

.char-add #addsubject {
  width: 62vw;
  height: 5vh;
  font-family: var(--textfont);
  font-size: 1.8vh;
  font-weight: bold;
}

.char-add #addnote {
  width: 62vw;
  height: 20vh;
  font-family: var(--textfont);
  font-size: 1.8vh;
  font-weight: 900;
}

.char-add #addnotesubmit {
  font-family: var(--textfont);
  font-size: 1.8vh;
  background-color: var(--background);
  border: 0.05vw solid var(--highlight);
  color: var(--text);
  padding-left: 5vh;
  padding-right: 5vh;
  padding-top: 1vh;
  padding-bottom: 1vh;
  font-weight: bold;
  -webkit-transition-duration: 100ms;
  transition-duration: 100ms;
}

.char-add #addnotesubmit:hover {
  background-color: var(--highlight);
  color: var(--background);
  cursor: pointer;
}

.char-entries span {
  font-size: 1.9vh;
  text-decoration: underline;
  text-underline-offset: 0.5vh;
}

.details {
  width: 100%;
  height: auto;
  font-family: var(--textfont);
  color: var(--text);
  background-color: transparent;
  font-size: 1.8vh;
}

.formchild {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
}

.character-name {
  width: auto;
  height: auto;
  font-family: var(--titlefont);
  color: var(--text);
  background-color: transparent !important;
  border-color: var(--highlight);
  padding-bottom: 0.2vw;
}

.addchar {
  position: relative;
  width: 92.7%;
  min-height: 40%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  padding: 10vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.name-count {
  position: absolute;
  right: 3vh;
  width: auto;
  height: auto;
  font-size: 1.5vh;
  font-family: var(--textfont);
  color: var(--background);
}

.loc-count {
  position: absolute;
  right: 3vh;
  width: auto;
  height: auto;
  font-size: 1.5vh;
  font-family: var(--textfont);
  color: var(--background);
}

.details-count {
  position: absolute;
  right: 3vh;
  width: auto;
  height: auto;
  font-size: 1.5vh;
  font-family: var(--textfont);
  color: var(--background);
}

.char-add #addname {
  width: 62vw;
  height: 5vh;
  font-family: var(--textfont);
  font-size: 1.8vh;
  font-weight: bold;
}

.char-add #addloc {
  width: 62vw;
  height: 5vh;
  font-family: var(--textfont);
  font-size: 1.8vh;
  font-weight: bold;
}

.char-add #adddet {
  width: 62vw;
  height: 20vh;
  font-family: var(--textfont);
  font-size: 1.8vh;
  font-weight: 900;
}

.char-add #addcharsubmit {
  font-family: var(--textfont);
  font-size: 1.8vh;
  background-color: var(--background);
  border: 0.05vw solid var(--highlight);
  color: var(--text);
  padding-left: 5vh;
  padding-right: 5vh;
  padding-top: 1vh;
  padding-bottom: 1vh;
  font-weight: bold;
  -webkit-transition-duration: 100ms;
  transition-duration: 100ms;
}

.char-add #addcharsubmit:hover {
  background-color: var(--highlight);
  color: var(--background);
  cursor: pointer;
}

.char-edit {
  height: 100%;
  width: 90%;
}

.character-entries:hover .editbtn {
  display: block;
}

.character-entries:hover {
  background-color: var(--accent) !important;
}

.char-heading {
  color: var(--text);
  font-size: 2vh;
}

.attribute-table {
  width: 90vw;
  min-height: 80vh;
  margin: auto;
}

.tbl-heading {
  font-weight: bold;
  color: var(--highlight) !important;
}

.divTable {
  display: table;
  width: 100%;
  height: 100%;
}

.player-titles {
  height: 3% !important;
  background-color: var(--background);
}

.divTableRow {
  display: table-row;
  height: 10%;
}

.divTableCell {
  border: 0.1vh solid var(--highlight);
  display: table-cell;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 12.5%;
  text-align: center;
  vertical-align: middle;
  font-size: 1.8vh;
  color: var(--text);
  font-family: var(--textfont);
  word-break: break-all;
}

.divTableBody {
  display: table-row-group;
}

.player-add {
  position: absolute;
  bottom: 2.5vh;
  height: 5vh;
  width: 5vh;
  border: 0.2vh solid var(--highlight);
  -webkit-transition-duration: 1s;
  transition-duration: 1s;
  overflow-x: hidden;
  overflow-y: hidden;
  border-radius: 50%;
}

.player-add:hover {
  cursor: pointer;
  -webkit-transform: rotate(360deg);
  transform: rotate(360deg);
  -webkit-animation: wobble 500ms ease-out forwards;
  animation: wobble 500ms ease-out forwards;
}

@-webkit-keyframes wobble {
  50% {
    border-radius: 50%;
  }
  100% {
    border-radius: 0%;
  }
}

@keyframes wobble {
  50% {
    border-radius: 50%;
  }
  100% {
    border-radius: 0%;
  }
}

.player-add-button {
  position: absolute;
  bottom: 0;
  height: 5vh;
  width: 5vh;
  background-color: var(--text);
  -webkit-clip-path: polygon(
    10% 37.5%,
    35% 37.5%,
    35% 12.5%,
    65% 12.5%,
    65% 37.5%,
    90% 37.5%,
    90% 62.5%,
    65% 62.5%,
    65% 87.5%,
    35% 87.5%,
    35% 62.5%,
    10% 62.5%
  );
  clip-path: polygon(
    10% 37.5%,
    35% 37.5%,
    35% 12.5%,
    65% 12.5%,
    65% 37.5%,
    90% 37.5%,
    90% 62.5%,
    65% 62.5%,
    65% 87.5%,
    35% 87.5%,
    35% 62.5%,
    10% 62.5%
  );
  -webkit-transition-duration: 50ms;
  transition-duration: 50ms;
  -webkit-transition-delay: 50ms;
  transition-delay: 50ms;
  -webkit-transform: translateY(12%);
  transform: translateY(12%);
}

.player-add:hover .player-add-button {
  -webkit-clip-path: polygon(
    22% 45%,
    38% 25%,
    50% 10%,
    50% 10%,
    62% 25%,
    76% 42%,
    90% 60%,
    65% 60%,
    65% 90%,
    35% 90%,
    35% 60%,
    10% 60%
  );
  clip-path: polygon(
    22% 45%,
    38% 25%,
    50% 10%,
    50% 10%,
    62% 25%,
    76% 42%,
    90% 60%,
    65% 60%,
    65% 90%,
    35% 90%,
    35% 60%,
    10% 60%
  );
  -webkit-animation-delay: 100ms;
  animation-delay: 100ms;
  -webkit-animation: float 4s linear infinite;
  animation: float 4s linear infinite;
}

@-webkit-keyframes float {
  0% {
    -webkit-transform: translateY(12%);
    transform: translateY(12%);
  }
  25% {
    -webkit-transform: translateY(6%);
    transform: translateY(6%);
  }
  50% {
    -webkit-transform: translateY(12%);
    transform: translateY(12%);
  }
  75% {
    -webkit-transform: translateY(6%);
    transform: translateY(6%);
  }
  100% {
    -webkit-transform: translateY(12%);
    transform: translateY(12%);
  }
}

@keyframes float {
  0% {
    -webkit-transform: translateY(12%);
    transform: translateY(12%);
  }
  25% {
    -webkit-transform: translateY(6%);
    transform: translateY(6%);
  }
  50% {
    -webkit-transform: translateY(12%);
    transform: translateY(12%);
  }
  75% {
    -webkit-transform: translateY(6%);
    transform: translateY(6%);
  }
  100% {
    -webkit-transform: translateY(12%);
    transform: translateY(12%);
  }
}

.player-form-holder {
  position: absolute;
  height: 50vh;
  min-width: 50vw;
  background-color: var(--background);
  border: 0.1vw solid var(--highlight);
  color: var(--text);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 2.5vh;
  top: 100%;
  -webkit-transition-duration: 1s;
  transition-duration: 1s;
  z-index: 3;
}

.player-form {
  display: none;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1vh;
}

.titles {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 0.5vh;
  width: 100%;
}

.inputs {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 0.5vh;
}

.add-player-form-title {
  background-color: var(--background);
  color: var(--text);
  font-weight: bold;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  width: 12%;
  text-align: center;
  font-family: var(--textfont);
  font-size: 1.8vh;
}

.add-player-form-input {
  background-color: var(--background);
  border: 0.1vh solid var(--highlight);
  color: var(--text);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  width: 12%;
  height: 15vh;
  text-align: center;
  font-family: var(--textfont);
  font-size: 1.6vh;
}

.add-player-form-input:focus {
  color: var(--text);
  outline: none;
}

.add-player-form-submit {
  background-color: var(--background);
  color: var(--text);
  border: 0.05vw solid var(--highlight);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  font-family: var(--textfont);
  font-weight: bold;
  font-size: 1.8vh;
  padding: 1.5vh;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.add-player-form-submit:hover,
.add-player-form-submit:focus {
  cursor: pointer;
  background-color: var(--highlight);
  color: var(--background);
  outline: none;
}

.close {
  position: absolute;
  top: 0;
  right: 0;
  width: 3vh;
  height: 3vh;
}

.close-btn {
  -webkit-clip-path: polygon(
    20% 0%,
    0% 20%,
    30% 50%,
    0% 80%,
    20% 100%,
    50% 70%,
    80% 100%,
    100% 80%,
    70% 50%,
    100% 20%,
    80% 0%,
    50% 30%
  );
  clip-path: polygon(
    20% 0%,
    0% 20%,
    30% 50%,
    0% 80%,
    20% 100%,
    50% 70%,
    80% 100%,
    100% 80%,
    70% 50%,
    100% 20%,
    80% 0%,
    50% 30%
  );
  background-color: var(--highlight);
  position: absolute;
  top: 1vh;
  right: 1vh;
  width: 1vh;
  height: 1vh;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.close:hover {
  cursor: pointer;
}

.close:hover .close-btn {
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
}

.form-title {
  position: absolute;
  width: 50%;
  top: 6vh;
  height: 5vh;
  color: var(--text);
  font-family: var(--textfont);
  font-size: 1.8vh;
  font-weight: bold;
  text-align: center;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  display: none;
}

.btn-holder {
  position: absolute;
  top: 45%;
  width: 50%;
  height: 5vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
}

.button {
  width: 50%;
  height: 100%;
  background-color: var(--background);
  color: var(--text);
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  background-size: 200%, 100%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  font-family: var(--textfont);
  font-size: 1.8vh;
  font-weight: bold;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.button:hover {
  cursor: pointer;
  color: var(--background);
  font-weight: bold;
}

.new {
  border-radius: 15px 0px 0px 15px;
  background-image: -webkit-gradient(
    linear,
    right top,
    left top,
    color-stop(49.99999%, var(--highlight)),
    color-stop(50%, var(--background))
  );
  background-image: linear-gradient(
    to left,
    var(--highlight) 49.99999%,
    var(--background) 50%
  );
  background-position: left;
  border-right: 0.1vh solid var(--highlight);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.new:hover {
  background-position: right;
  border: none;
}

.edit {
  border-radius: 0px 15px 15px 0px;
  background-image: -webkit-gradient(
    linear,
    left top,
    right top,
    color-stop(50%, var(--highlight)),
    color-stop(50%, var(--background))
  );
  background-image: linear-gradient(
    to right,
    var(--highlight) 50%,
    var(--background) 50%
  );
  background-position: right;
  border-left: 0.1vh solid var(--highlight);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.edit:hover {
  background-position: left;
  border: none;
}

.edit-player-form-select {
  width: 100%;
}

.edit-btn-select {
  position: relative;
  margin-top: 11vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  width: 100%;
}

.edit-player-select {
  width: 15%;
  height: 5vh;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  border: 0.1vh solid var(--highlight);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  text-align: center;
  font-family: var(--textfont);
  font-size: 1.8vh;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  background-image: -webkit-gradient(
    linear,
    left top,
    left bottom,
    color-stop(49%, var(--highlight)),
    color-stop(50%, var(--background))
  );
  background-image: linear-gradient(
    to bottom,
    var(--highlight) 49%,
    var(--background) 50%
  );
  background-size: 100% 200%;
  background-position: bottom;
  -webkit-transition-duration: 250ms;
  transition-duration: 250ms;
}

.edit-player-select:hover {
  background-position: top;
  border-top: none;
}

.cover {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 46, 46, 0.5);
  display: none;
  z-index: 2;
}

.players-page {
  width: 100%;
  box-sizing: border-box;
  padding: 96px 20px 96px;
}

.players-character-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.player-card {
  position: relative;
  min-width: 0;
  padding: clamp(12px, 2vw, 20px);
  border: 1px solid var(--highlight);
  border-radius: 12px;
  background-color: var(--background);
  color: var(--text);
  box-sizing: border-box;
}

.player-card:hover {
  background-color: var(--accent);
}

.player-card-name {
  margin: 0 0 12px;
  color: var(--highlight);
  font-family: var(--titlefont);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.player-identity-grid,
.player-card-stat-grid,
.player-card-languages {
  margin: 0;
}

.player-identity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--highlight);
}

.player-identity-item,
.player-card-stat,
.player-card-languages {
  min-width: 0;
}

.player-identity-item dt,
.player-card-languages dt {
  color: var(--highlight);
  font-size: 0.75rem;
  font-weight: 700;
}

.player-identity-item dd,
.player-card-languages dd {
  margin: 2px 0 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.player-card-stat-groups {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 12px 0;
}

.player-card-stat-group {
  min-width: 0;
}

.player-card-stat-group h3 {
  margin: 0 0 7px;
  color: var(--highlight);
  font-size: 0.85rem;
}

.player-card-stat-grid {
  display: grid;
  gap: 5px;
}

.player-card-ability-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.player-card-combat-grid,
.player-card-passive-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.player-card-stat {
  padding: 5px 3px;
  border: 1px solid var(--highlight);
  border-radius: 6px;
  text-align: center;
}

.player-card-stat dt {
  color: var(--highlight);
  font-size: 0.7rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.player-card-stat dd {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.player-card-languages {
  padding-top: 10px;
  border-top: 1px solid var(--highlight);
}

@media (max-width: 700px) {
  .player-card-stat-groups {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .player-identity-grid {
    grid-template-columns: 1fr;
  }

  .player-card {
    padding: 12px;
  }
}

body.bmBody {
  position: relative;
  display: block;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body.bmBody .playerpanel,
body.has-site-navigation.bmBody .playerpanel {
  position: fixed;
  z-index: 1100;
  top: 50%;
  left: 0.65rem;
  width: max-content;
  width: 3.25rem;
  min-width: 0;
  height: auto;
  min-height: 0;
  max-height: 90vh;
  padding: 0.35rem;
  overflow: visible;
  border: 1px solid var(--highlight);
  border-radius: 0.75rem;
  background-color: var(--accent);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.35);
  transform: translateY(-50%);
}

.battle-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: max-content;
  max-height: calc(90vh - 0.7rem);
  overflow-y: auto;
}

.battle-toolbar > * {
  flex: 0 0 2.45rem;
}

.battle-tool-button,
.battle-tool-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  min-width: 2.45rem;
  height: 2.45rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 0.45rem;
  color: var(--text);
  background-color: transparent;
  font: inherit;
  font-size: 1.15rem;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

.battle-tool-button:hover,
.battle-tool-button:focus-visible,
.battle-tool-button.is-active,
.battle-tool-close:hover,
.battle-tool-close:focus-visible {
  border-color: var(--highlight);
  color: var(--background);
  background-color: var(--highlight);
  outline: none;
}

.battle-tool-button:focus-visible,
.battle-tool-close:focus-visible {
  box-shadow: inset 0 0 0 2px var(--text);
}

.battle-tool-letter {
  font-size: 1.35rem;
  font-weight: 700;
}

.battle-tool-panels {
  position: fixed;
  z-index: 1099;
  top: 50%;
  left: 4.55rem;
  width: min(19rem, calc(100vw - 5.25rem));
  max-height: min(82vh, 52rem);
  transform: translateY(-50%);
  pointer-events: none;
}

.battle-tool-panels.is-compact {
  width: min(14rem, calc(100vw - 5.25rem));
}

.battle-tool-panel {
  box-sizing: border-box;
  width: 100%;
  max-height: min(82vh, 52rem);
  padding: 1rem;
  overflow: auto;
  border: 1px solid var(--highlight);
  border-radius: 0.65rem;
  color: var(--text);
  background-color: var(--background);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.battle-tool-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--highlight);
}

.battle-tool-panel-heading h2 {
  margin: 0;
  color: var(--highlight);
  font-family: var(--titlefont);
  font-size: 1.05rem;
}

.battle-tool-close {
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
  font-size: 1.4rem;
}

.diceholder-clip {
  width: 100%;
  overflow: hidden;
}

.battle-tool-panel .diceholder {
  min-height: 0;
  max-height: none;
  gap: 0.4rem;
  padding: 0.4rem;
  margin-bottom: -6.4rem;
  box-sizing: border-box;
  overflow: visible;
  transform: scale(0.6);
  transform-origin: top left;
}

.battle-tool-panel .dice {
  gap: 0.4rem;
}

.battle-tool-panel .outputholder {
  height: auto;
  padding: 0.35rem;
  box-sizing: border-box;
}

.battle-tool-panel .diceoutput {
  width: min(7rem, 75%);
  font-size: 1rem;
}

.battle-tool-panel .diebtn-holder {
  height: 1.25rem;
  margin-top: 0;
}

.battle-tool-panel .mathholder {
  height: 66.6667px;
}

.battle-tool-panel .math {
  box-sizing: border-box;
  width: 73.3333px;
  height: 66.6667px;
  font-size: 36px;
}

.battle-tool-panels.is-compact .aoeEffects {
  gap: 0.35rem;
  padding: 0.45rem;
}

.battle-tool-panels.is-compact .aoeBox {
  max-width: 3rem;
  font-size: 1.5rem;
  aspect-ratio: 1;
}

.battle-tool-panels.is-compact .aoeInput {
  max-width: none;
  flex: 1 1 0;
}

.battle-tool-panels.is-compact .aoeDimension {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 2rem;
  font-size: 1rem;
  aspect-ratio: auto;
}

.battle-tool-panels.is-compact .aoeFunction {
  width: 2.75rem;
  height: 2.5rem;
  font-size: 1.35rem;
}

.battle-tool-panels.is-compact .aoeDrawEffects {
  width: 2.75rem;
  flex: 0 0 auto;
}

.aoeDrawStatus {
  min-height: 0;
  color: var(--text);
  font-size: 0.8rem;
  text-align: center;
}

.battle-tool-panels.is-compact .aoeClear {
  color: var(--delete);
}

.battle-tool-panels.is-compact .aoeClear:hover,
.battle-tool-panels.is-compact .aoeClear:focus-visible {
  color: var(--text);
  background-color: var(--delete);
}

.battle-tool-panel .char-select {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  height: auto;
  max-height: 60vh;
  overflow-y: auto;
  opacity: 1;
  box-shadow: none;
}

.battle-tool-panel .char-box {
  box-sizing: border-box;
  flex: 0 0 auto;
  height: auto;
  justify-content: flex-start;
  min-height: 2.75rem;
  overflow-wrap: anywhere;
  padding: 0.55rem 0.7rem;
  border-width: 0 0 1px;
  color: var(--text);
  background-color: var(--background);
  font: inherit;
  font-family: var(--textfont);
  text-align: left;
  cursor: pointer;
}

.battle-tool-panel .char-box.active,
body.battle-view-player .battle-tool-panel .char-box.is-character-selected {
  color: var(--background);
  background-color: var(--highlight);
}

.battle-tool-panel .drawconfig,
.battle-tool-panel .aoeEffects {
  width: 100%;
  margin-top: 0.75rem;
  box-sizing: border-box;
}

.battle-tool-panel .drawconfig {
  margin-top: 0;
  padding: 0.5rem;
}

.battle-placement-toast {
  position: absolute;
  z-index: 20;
  top: 0.75rem;
  left: 50%;
  max-width: min(28rem, calc(100vw - 2rem));
  padding: 0.7rem 1rem;
  transform: translateX(-50%);
  border: 1px solid var(--highlight);
  border-radius: 0.5rem;
  color: var(--text);
  background: var(--accent);
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.4);
  text-align: center;
  pointer-events: none;
}

.battle-placement-toast[hidden] {
  display: none;
}

.battle-map-viewport {
  position: fixed;
  z-index: 0;
  inset: 0;
  box-sizing: border-box;
  overflow: hidden;
  padding: 1rem 1rem 1rem 4.6rem;
  pointer-events: auto;
  background-color: var(--background);
  touch-action: none;
  overscroll-behavior: none;
}

.battle-map-viewport .map-elements-holder {
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.battle-map-viewport .mapholder {
  z-index: 2;
  cursor: default;
}

.battle-map-viewport #grid {
  z-index: 1;
}

.battle-map-viewport .drawingboard {
  z-index: 3;
  top: 0;
  left: 0;
}

.battle-map-viewport .drawingboard.drawmode {
  cursor: crosshair;
}

.battle-map-viewport .aoeBoard {
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  pointer-events: none;
}

.battle-map-viewport .aoeTemplate {
  pointer-events: auto;
}

.battle-map-viewport .drawingboard.drawmode ~ .aoeBoard .aoeTemplate {
  pointer-events: none;
}

body.bmBody .battle-map-viewport {
  cursor: default;
}

body.bmBody .battle-map-viewport .mapholder,
body.bmBody .battle-map-viewport .mapholder:hover {
  cursor: default;
}

body.battle-map-panning .battle-map-viewport {
  cursor: grabbing;
}

body.battle-view-player .battle-tool-panel .grid-calibration {
  display: none !important;
}

body.battle-view-player .right-click-form > .click-form:not(.color-marker) {
  display: none !important;
}

body.bmBody .battlemapbody {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: block;
  width: auto;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 0;
  overflow: visible;
  pointer-events: none;
}

body.bmBody .battlemapbody > .site-nav-toggle,
body.bmBody .battlemapbody > .site-nav-backdrop,
body.bmBody .battlemapbody > .site-sidebar {
  pointer-events: auto;
}

body.has-site-navigation:not(.site-nav-collapsed) .battlemapbody {
  z-index: 1200;
}

body.bmBody .site-sidebar {
  z-index: 1202;
}

body.bmBody .site-nav-backdrop {
  z-index: 1201;
}

body.bmBody .site-nav-toggle {
  z-index: 1203;
}

body.bmBody .dm-panel {
  pointer-events: auto;
}

body.has-site-navigation.bmBody .battlemapbody {
  width: auto;
  min-width: 0;
  height: auto;
}

body.battle-map-panning .battle-map-viewport .mapholder,
body.battle-map-panning .battle-map-viewport .mapholder:hover {
  cursor: grabbing;
}

@media (max-width: 600px) {
  body.bmBody .playerpanel,
  body.has-site-navigation.bmBody .playerpanel {
    top: auto;
    bottom: 0.65rem;
    left: 50%;
    width: max-content;
    max-width: calc(100vw - 1rem);
    max-height: none;
    transform: translateX(-50%);
  }

  .battle-toolbar {
    flex-direction: row;
    width: max-content;
    max-width: calc(100vw - 1.7rem);
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .battle-tool-panels {
    top: auto;
    bottom: 4.5rem;
    left: 50%;
    width: min(22rem, calc(100vw - 1rem));
    max-height: calc(100dvh - 6rem);
    transform: translateX(-50%);
  }

  .battle-tool-panels.is-compact {
    width: min(14rem, calc(100vw - 1rem));
  }

  .battle-tool-panel {
    max-height: calc(100dvh - 6rem);
  }

  .battle-map-viewport {
    padding: 4.5rem 0.5rem 4.5rem;
  }
}

.player-add {
  position: fixed;
  display: grid;
  place-items: center;
  z-index: 5;
  left: 50%;
  bottom: 24px;
  margin-left: -2.5vh;
  padding: 0;
  background-color: var(--background);
  cursor: pointer;
}

.player-add .player-add-button {
  position: absolute;
  top: 50%;
  bottom: auto;
  left: 50%;
  width: 3.2vh;
  height: 3.2vh;
  transform: translate(-50%, -50%);
}

.player-add:hover .player-add-button {
  animation: none;
  transform: translate(-50%, -50%);
}

.player-add:focus-visible,
.close:focus-visible,
.new-mode-button:focus-visible,
.edit-player-select:focus-visible,
.import-character-button:focus-visible,
.add-player-form-submit:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}

.button:focus-visible {
  position: relative;
  z-index: 1;
  outline: none;
  background-color: var(--highlight);
  background-image: none;
  color: var(--background);
  box-shadow: inset 0 0 0 2px var(--text);
}

.cover {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.player-form-holder {
  position: fixed;
  z-index: 1001;
  top: 50%;
  left: 50%;
  width: min(760px, calc(100vw - 32px));
  min-width: 0;
  height: auto;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 56px 24px 24px;
  transform: translate(-50%, -50%);
  justify-content: flex-start;
  align-items: stretch;
  gap: 16px;
  transition: none;
}

.player-form-holder .close {
  display: grid;
  place-items: center;
  z-index: 1;
  width: 40px;
  height: 40px;
  padding: 0;
}

.player-form-holder .close-btn {
  position: relative;
  top: auto;
  right: auto;
  width: 14px;
  height: 14px;
}

.form-title {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  font-size: 22px;
}

.btn-holder {
  position: static;
  width: 100%;
  height: 44px;
  flex: 0 0 auto;
}

.button {
  border: 1px solid var(--highlight);
  font-size: 16px;
}

.new-character-options,
.edit-btn-select,
.player-form {
  width: 100%;
}

.new-character-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.new-mode-buttons {
  display: flex;
  width: 100%;
  gap: 8px;
}

.new-mode-button,
.import-character-button {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--highlight);
  background-color: var(--background);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.new-mode-button {
  flex: 1;
}

.new-mode-button.active,
.new-mode-button:hover,
.import-character-button:hover {
  background-color: var(--highlight);
  color: var(--background);
}

.player-import-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.player-import-panel label,
.player-field {
  color: var(--text);
  font-family: var(--textfont);
  font-size: 15px;
}

.player-import-panel input,
.add-player-form-input {
  box-sizing: border-box;
  width: 100%;
  height: 38px;
  min-height: 0;
  padding: 6px 8px;
  border: 1px solid var(--highlight);
  border-radius: 4px;
  background-color: var(--background);
  color: var(--text);
  font: inherit;
  line-height: 1.2;
  text-align: left;
}

.player-import-panel input:focus,
.add-player-form-input:focus {
  outline: 3px solid var(--highlight);
  outline-offset: 2px;
}

.player-form-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.edit-btn-select {
  position: static;
  margin-top: 0;
  max-height: 22vh;
  overflow-y: auto;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 6px;
}

.edit-player-select {
  width: 100%;
  min-height: 42px;
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 12px;
  background-image: none;
  background-color: var(--background);
  color: var(--text);
  font: inherit;
  text-align: left;
}

.edit-player-select:hover {
  border: 1px solid var(--highlight);
  background-color: var(--accent);
}

.player-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.inputs {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 12px;
}

.ability-score-fields {
  width: 100%;
}

.ability-score-heading {
  color: var(--text);
  font-family: var(--textfont);
  font-size: 15px;
  font-weight: bold;
}

.ability-score-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.combat-score-fields,
.passive-score-fields {
  width: 100%;
}

.combat-score-grid,
.passive-score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.player-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  width: 100%;
}

.player-ability-field {
  min-width: 0;
  text-align: center;
}

.player-ability-field .add-player-form-input {
  height: 34px;
  padding: 4px;
  text-align: center;
}

.player-combat-field,
.player-passive-field {
  min-width: 0;
  text-align: center;
}

.player-combat-field .add-player-form-input,
.player-passive-field .add-player-form-input {
  height: 34px;
  padding: 4px;
  text-align: center;
}

.add-player-form-submit {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--highlight);
  font-size: 16px;
}

@media (max-width: 600px) {
  .players-page {
    padding: 72px 12px 88px;
  }

  .player-form-holder {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 52px 16px 16px;
  }

  .new-mode-buttons {
    flex-direction: column;
  }
}

.successbody {
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.successtitle {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  font-family: var(--titlefont);
  color: var(--highlight);
  font-size: 4vw;
  border-bottom: none !important;
}

.successlink {
  font-family: var(--titlefont);
  color: var(--highlight);
  width: auto;
  height: auto;
  padding: 2vh;
  text-decoration: underline;
  text-underline-offset: 0.2vh;
  background-image: -webkit-gradient(
    linear,
    left bottom,
    left top,
    color-stop(49.9%, var(--highlight)),
    color-stop(50%, var(--background))
  );
  background-image: linear-gradient(
    to top,
    var(--highlight) 49.9%,
    var(--background) 50%
  );
  background-size: 100% 200%;
  background-position: top;
  -webkit-transition-duration: 100ms;
  transition-duration: 100ms;
}

.successlink:hover {
  color: var(--background);
  font-weight: bold;
  background-position: bottom;
}

.bmBody {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}

.battlemapbody {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: flex-start;
  -ms-flex-pack: flex-start;
  align-items: flex-start;
  min-width: 100%;
  height: 90vh;
  overflow: scroll;
  padding: 5vh;
  position: relative;
}

body.mapbody {
  display: block;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-width: 0;
  min-height: 0;
  padding: 76px 24px 20px;
  overflow: hidden !important;
  touch-action: none;
}

.map-elements-holder {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  position: absolute;
  top: 0;
  left: 0;
  width: 1600px;

  /* margin: auto; */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  margin-top: 0;
  transform-origin: 0 0;
  touch-action: none;
  will-change: transform;
}

.mapholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.mapholder:hover {
  cursor: crosshair;
}

.map-pan-zoom .mapholder:hover {
  cursor: grab;
}

.map-pan-zoom.map-panning .mapholder,
.map-pan-zoom.map-panning .mapholder:hover {
  cursor: grabbing;
}

#grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Make it non-interactive */
  background-size: 0 0;
  background-image: linear-gradient(
      to right,
      rgba(0, 0, 0, 0.3) 0.5px,
      transparent 0.5px
    ),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0.5px, transparent 0.5px);
}

.mainmap {
  display: block;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  width: 1600px;
  max-width: none;
  height: auto;
  -webkit-user-drag: none;
}

.map-annotate {
  position: fixed;
  background-color: var(--accent);
  z-index: 20;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.map-annotate-form {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 0.5vh;
  align-items: stretch;
  width: min(280px, calc(100vw - 24px));
  box-sizing: border-box;
  font-size: 14px;
  font-family: var(--titlefont);
  color: var(--highlight);
  padding: 10px;
}

.map-annotate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.map-annotate-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.map-annotate-form .map-description-close-glyph::before,
.map-annotate-form .map-description-close-glyph::after {
  background: var(--highlight);
}

.map-annotate-form input,
.map-annotate-form textarea {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 16px;
  font-family: var(--titlefont);
  color: var(--highlight);
  background-color: var(--background);
  border: 1px solid var(--highlight);
  font-weight: bold;
}

.map-annotate-form input:focus-visible,
.map-annotate-form textarea:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 2px;
  border-color: var(--text);
}

.map-annotate-form textarea {
  min-height: 84px;
  resize: vertical;
}

.map-an-place-confirm {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.map-an-place-confirm:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 2px;
}

.map-an-place-confirm:disabled {
  cursor: wait;
  opacity: 0.7;
}

.map-an-place-confirm:hover {
  cursor: pointer;
  background-color: var(--highlight);
  color: var(--background);
}

.map-annotate-status {
  min-height: 1.2em;
  color: var(--text);
  font-size: 14px;
}

.marker {
  height: 20px;
  width: 20px;
  background-color: rgba(239, 239, 239, 0.5);
  border: 2px solid rgba(217, 165, 32, 0.8);
  -webkit-transform: translateX(-50%) translateY(-50%);
  transform: translateX(-50%) translateY(-50%);
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  z-index: 50;
}

.marker:hover {
  cursor: pointer;
  background-color: transparent;
}

.mselected {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(217, 165, 32, 0.8) !important;
  background-color: rgba(239, 239, 239, 0.5) !important;
  outline: 2px solid var(--highlight);
  outline-offset: 3px;
  filter: drop-shadow(0 0 6px var(--highlight)) drop-shadow(0 0 12px var(--highlight));
}

.pl-desc {
  display: none !important;
}

.map-description-panel {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 24px;
  width: min(760px, calc(100vw - 32px));
  max-height: min(32vh, 280px);
  box-sizing: border-box;
  overflow: auto;
  padding: 18px 48px;
  transform: translateX(-50%);
  border: 1px solid var(--highlight);
  border-radius: 14px;
  background-color: var(--accent);
  color: var(--text);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  font-family: var(--textfont);
  text-align: center;
}

.map-description-title {
  margin: 0 0 0.6rem;
  color: var(--text);
  font-family: var(--titlefont);
  font-size: 1.2rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.map-description-content {
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.map-description-content.has-image {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-align: left;
}
.map-description-image {
  width: min(35%, 180px);
  max-height: 180px;
  object-fit: cover;
  border-radius: .4rem;
}
.map-description-text { flex: 1; min-width: 0; }
.map-location-image-label { font-family: var(--textfont); color: var(--text); }

.map-description-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--highlight);
  border-radius: 50%;
  background: var(--background);
  color: var(--text);
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.map-description-close:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .map-description-panel {
    bottom: 12px;
    max-height: 30vh;
    padding: 16px 42px;
  }
}

.parent {
  position: absolute;
}

.place-name {
  text-transform: uppercase;
  position: fixed;
  z-index: 15;
  font-family: var(--mapfont);
  font-size: 15px;
  color: var(--text);
  top: 50px;
  left: 150px;
  text-shadow: 1px 1px 1px var(--background), 2px 2px 1px var(--background),
    3px 3px 1px var(--background);
  -webkit-transform: translate(0, -150%) rotate(-12deg);
  transform: translate(0, -150%) rotate(-12deg);
  transform-origin: 0 0;
}

.maplinksbody {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.maporg {
  width: 100%;
  min-height: 90vh;
  box-sizing: border-box;
  overflow: auto;
  padding: 96px 2rem 2rem;
}

.maporg-holder {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
}

.map-tree,
.map-tree-children {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.map-tree-branch[hidden] {
  display: none !important;
}

.map-tree-children {
  margin-left: 1.25rem;
  padding-left: 0.6rem;
  border-left: 1px solid var(--highlight);
}

.map-tree-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  width: 100%;
  min-height: 2.6rem;
  box-sizing: border-box;
  padding: 0.45rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  color: var(--text);
  font-family: var(--textfont);
  text-align: left;
  text-decoration: none;
  touch-action: manipulation;
}

.map-tree-item:hover,
.map-tree-item:focus-visible {
  border-color: var(--highlight);
  color: var(--text);
  background-color: var(--accent);
  outline: none;
}

.map-tree-item[aria-expanded="true"] {
  font-weight: bold;
}

.map-tree-icon {
  flex: 0 0 1.1rem;
  width: 1.1rem;
  height: 1.1rem;
  background-color: var(--highlight);
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.map-tree-icon-world {
  -webkit-mask-image: url("Globe.svg");
  mask-image: url("Globe.svg");
}

.map-tree-icon-atlas {
  -webkit-mask-image: url("Atlas.svg");
  mask-image: url("Atlas.svg");
}

.map-tree-icon-map {
  -webkit-mask-image: url("Map.svg");
  mask-image: url("Map.svg");
}

.map-tree-root > .map-tree-row > .map-tree-item {
  font-size: 1.1rem;
  border-bottom-color: var(--highlight);
  border-radius: 0;
}

@media only screen and (max-width: 600px) {
  .maporg {
    padding: 72px 0.75rem 1rem;
  }

  .map-tree-children {
    margin-left: 0.75rem;
    padding-left: 0.4rem;
  }
}

.dmcp-holder {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  color: var(--text);
  font-family: var(--textfont);
  font-size: 1.8vh;
}

.dmcp-input {
  width: 100%;
  height: 4vh;
  font-family: var(--textfont);
  font-size: 1.8vh;
  font-weight: bold;
}

@media only screen and (max-width: 1499.99999px) {
  .dmcp-row {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
  }
  .exp-track-title {
    display: none;
  }
  .exp-res-title,
  .exp-opt,
  .exp-res-title,
  .exp-res-uses,
  .subbox {
    font-size: 1vh;
  }
}

@media only screen and (min-width: 1500px) {
  .dmcp-row {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
  }
}

.dmcp-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  width: 100vw;
}

.dmcp-section {
  width: 100%;
  height: 50vh;
  border-top: 0.1vw solid var(--highlight);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.title {
  color: var(--text);
  font-family: var(--textfont);
  font-size: 1.8vh;
  font-weight: bold;
  text-align: center;
}

.form-label {
  font-size: 1.5vh;
}

.dmcp-form {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1vh;
}

.columns {
  -webkit-box-orient: horizontal !important;
  -webkit-box-direction: normal !important;
  -ms-flex-direction: row !important;
  flex-direction: row !important;
}

.dmcp-subsection {
  width: 100%;
  height: 100%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  overflow-y: auto;
}

.player-section {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: start !important;
  -ms-flex-pack: start !important;
  justify-content: flex-start !important;
  overflow-y: auto;
}

.player-section::-webkit-scrollbar {
  width: 10px;
}

.player-section::-webkit-scrollbar-track {
  background: var(--background);
}

.player-section::-webkit-scrollbar-thumb {
  background: var(--accent);
}

.dmcp-subsection::-webkit-scrollbar {
  width: 10px;
}

.dmcp-subsection::-webkit-scrollbar-track {
  background: var(--background);
}

.dmcp-subsection::-webkit-scrollbar-thumb {
  background: var(--accent);
}

.location-list {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1vh;
}

.loc-edit-form {
  position: absolute;
  width: 50%;
  height: 49.83308vh;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  background-color: rgba(46, 46, 46, 0.5);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  z-index: 2;
  gap: 1vh;
}

.delete-btn {
  color: var(--background);
  background-color: var(--background);
  font-family: var(--textfont);
  font-size: 1.5vh;
  border: 0.05vw solid var(--highlight);
  color: var(--text);
  padding-left: 3vh;
  padding-right: 3vh;
  padding-top: 0.5vh;
  padding-bottom: 0.5vh;
  font-weight: bold;
  -webkit-transition-duration: 100ms;
  transition-duration: 100ms;
}

.delete-btn:hover {
  background-color: var(--delete);
  cursor: pointer;
}

.exit {
  position: absolute;
  height: 3vh;
  width: 3vh;
  top: 0;
  right: 0;
  background-color: var(--background);
  color: var(--text);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  border: 0.05vw solid var(--highlight);
  font-family: var(--textfont);
}

.exit:hover {
  background-color: var(--highlight);
  color: var(--background);
  cursor: pointer;
}

.formfields {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1vh;
}

.formfields textarea {
  width: 35vw;
  height: 100%;
}

.loc-edit {
  -webkit-transition-duration: 50ms;
  transition-duration: 50ms;
}

.loc-edit .fa-pencil {
  border: none !important;
  color: var(--highlight);
}

.loc-edit:hover {
  cursor: pointer;
  background-color: var(--accent);
}

.location,
.loc-headings {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 1%;
  border: 0.1vw solid var(--highlight);
}

.loc-headings {
  border: none !important;
}

.loc-headings * {
  width: 100%;
  text-align: center;
}

.location * {
  width: 100%;
  text-align: center;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.player-list {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1vh;
  width: 100%;
  height: 100%;
}

.player-headings {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  text-align: center;
}

.player-headings * {
  width: 100%;
}

.playerholder {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  border: 0.1vw solid var(--highlight);
}

.playerholder * {
  width: 100%;
  text-align: center;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.player-edit {
  -webkit-transition-duration: 50ms;
  transition-duration: 50ms;
}

.player-edit .fa-pencil {
  border: none !important;
  color: var(--highlight);
}

.player-edit:hover {
  cursor: pointer;
  background-color: var(--accent);
}

.dmcp-submit {
  font-family: "Font Awesome 5 Pro", var(--textfont);
  font-size: 1.8vh;
  background-color: var(--background);
  border: 0.05vw solid var(--highlight);
  color: var(--text);
  padding-left: 5vh;
  padding-right: 5vh;
  padding-top: 1vh;
  padding-bottom: 1vh;
  font-weight: bold;
  -webkit-transition-duration: 100ms;
  transition-duration: 100ms;
  text-align: center;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.dmcp-submit:hover {
  background-color: var(--highlight);
  color: var(--background);
  cursor: pointer;
}

.playerholder .fa-user-times {
  color: var(--delete);
}

.player-edit-form {
  position: absolute;
  width: 50%;
  height: 49.83308vh;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  background-color: rgba(46, 46, 46, 0.5);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  z-index: 2;
  gap: 1vh;
}

.player-edit-form-fields {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.player-exit {
  position: absolute;
  height: 3vh;
  width: 3vh;
  top: 0;
  right: 0;
  background-color: var(--background);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  border: 0.05vw solid var(--highlight);
}

.player-exit:hover {
  background-color: var(--highlight);
  color: var(--background);
  cursor: pointer;
}

.form-handler-text {
  color: var(--text);
  font-size: 1.8vh;
  font-family: var(--textfont);
}

.dmcp-back {
  color: var(--text);
  font-size: 1.8vh;
  text-decoration: none;
  font-family: var(--textfont);
  background-color: var(--background);
  border-radius: 5px;
  height: auto;
  width: auto;
  padding: 10px;
  font-weight: bold;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  border: 0.1vh solid var(--highlight);
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.dmcp-back:hover {
  background-color: var(--highlight);
  border: 0.1vh solid var(--highlight);
  color: var(--background);
  cursor: pointer;
}

.group {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 0.5vh;
}

.colour-holder {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 5vh;
}

.col-field-holder {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 5vh;
}

.color-input {
  width: 0;
  height: 0;
  visibility: hidden;
}

.colour-label {
  padding: 0.5vh;
  border-radius: 5px;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  border: 0.05vh solid transparent;
}

.colour-label:hover {
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
  border: 0.05vh solid var(--highlight);
  cursor: pointer;
}

#l-background {
  background-color: var(--background);
}

#l-text {
  background-color: var(--text);
  color: var(--background);
}

#l-highlight {
  background-color: var(--highlight);
}

#l-accent {
  background-color: var(--accent);
}

#l-delete {
  background-color: var(--delete);
}

#l-title {
  background-color: var(--campaign-title);
}

.colourhelp {
  height: auto !important;
  width: auto !important;
  display: inline-block !important;
  color: var(--highlight);
  text-align: center;
  padding: 0;
  margin: 0;
  font-size: 1.2vh;
}

.themebox {
  position: absolute;
  width: 50vw;
  height: 50vh;
  background-color: var(--background);
  border: 0.1vh solid var(--highlight);
  z-index: 50;
  margin: auto;
  top: 25vh;
  left: 25vw;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 4vh;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.themegroup {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 1vh;
}

.theme {
  color: var(--text);
  padding: 1vh;
  border-radius: 5px;
  border: 0.1vh solid var(--highlight);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  font-family: var(--textfont);
}

.theme::first-letter {
  text-transform: uppercase;
}

.theme:hover {
  cursor: pointer;
  background-color: var(--highlight);
  color: var(--background);
}

.truecol {
  width: 0;
  height: 0;
  visibility: hidden;
  display: none;
}

.inputfields {
  width: 0%;
}

.char-select {
  position: fixed;
  top: 0;
  width: 50vw;
  height: 5vh;
  z-index: 499;
  left: 25%;
  right: 25%;
  -webkit-box-shadow: 5px 5px 5px var(--background);
  box-shadow: 5px 5px 5px var(--background);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  opacity: 0.5;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.char-select:hover {
  opacity: 1;
}

.char-box {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  width: 100%;
  height: 100%;
  color: var(--text);
  background-color: var(--background);
  border: 0.1vh solid var(--highlight);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  font-family: var(--textfont);
}

.char-box:hover {
  cursor: pointer;
  background-color: var(--accent);
  color: var(--text);
  font-weight: bold;
}

.dm-buttons {
  position: relative;
  width: 100%;
  height: auto;
  z-index: 499;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: start;
  -ms-flex-pack: start;
  justify-content: flex-start;
  opacity: 1 !important;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.dmb-group {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  width: 100%;
}

.dmb {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  text-align: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  width: 100%;
  height: 5vh;
  font-size: 1.5vh;
  padding: 0.5vh;
  color: var(--text);
  border: 0.1vh solid;
  border-color: var(--highlight);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  font-family: var(--textfont);
}

.dmb:hover {
  cursor: pointer;
  background-color: var(--highlight);
  color: var(--background);
  font-weight: bold;
}

.dm-buttons-form {
  width: 100%;
  height: auto;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  background-color: var(--background);
  display: none;
  border: 0.1vh solid var(--highlight);
}

.dmb-form {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: start;
  -ms-flex-pack: start;
  justify-content: flex-start;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  overflow-y: auto;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  padding: 1vh;
}

.dmb-form-fields {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: start;
  -ms-flex-pack: start;
  justify-content: flex-start;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 0.5vh;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.radio-btn {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  border: 0.1vh solid var(--background);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 100%;
}

.radio-label {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  padding: 0.5vh;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  width: 100%;
  color: var(--background);
  background-color: var(--highlight);
  box-sizing: border-box;
  border: 0.1vh solid var(--background);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-weight: bold;
}

.radio-label:hover {
  cursor: pointer;
  background-color: var(--background);
  color: var(--highlight);
}

.radio-select {
  background-color: var(--background);
  color: var(--highlight);
}

.radio-label input {
  display: none;
}

.playerpanel {
  position: relative;
  min-width: 10rem;
  min-height: 100%;
  max-height: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2vh;
  margin: 0;
  box-sizing: border-box;
  background-color: var(--accent);
  color: var(--text);
  border: 1px solid var(--highlight);
  padding: 1rem;
  padding-top: 5rem;
  overflow-y: auto;
}

.toggle {
  color: var(--text);
  height: 5rem;
}

.gridCol {
  display: flex;
  flex-direction: row;
}

/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--text);
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: var(--background);
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

#gridColPicker:checked + .slider {
  background-color: var(--background);
}

#gridColPicker:checked + .slider:before {
  background-color: var(--text);
}

#gridColPicker:focus + .slider {
  box-shadow: 0 0 1px var(--background);
}

#gridColPicker:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.aoeEffects {
  width: 100%;
  font-family: var(--textfont);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  height: auto;
  padding: 0.3rem;
  z-index: 499;
  color: var(--text);
  border: 0.1vh solid var(--highlight);
}

.aoeRow {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.aoeBox {
  cursor: pointer;
  width: 100%;
  font-size: 3rem;
  aspect-ratio: 1/1;
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
}

.aoeDimension {
  width: 70%;
  font-size: 1.5rem;
  aspect-ratio: 1/1;
  text-align: center;
  background-color: var(text);
  color: var(--background);
  outline: none;
  border: 0.1vh solid var(--background);
  font-family: var(--textfont);
  border-radius: 5px;
}

.aoeFunction {
  width: 100%;
  height: 2rem;
  cursor: pointer;
  background-color: var(--highlight);
  color: var(--text);
  outline: none;
  border: 0.1vh solid var(--background);
  transition-duration: 50ms;
}

.aoeFunction:active {
  background-color: var(--text);
  color: var(--highlight);
}

.aoeTemplate {
  opacity: 0.5;
  position: absolute;
  background-color: var(--highlight);
  box-sizing: border-box;
  border: 0.2rem solid var(--background);
  aspect-ratio: 1/1;
  top: 25%;
  left: 25%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: grab;
  transform-origin: center;
  transform: rotate(0deg);
}

.aoeTemplate:active {
  cursor: grabbing;
}

.bm-marker.draggable,
.bm-name.is-dragging,
.aoeTemplate.aoeActive {
  transition: none !important;
}

body.battle-scale-preview .bm-marker {
  transition: background-color 150ms, color 150ms, box-shadow 150ms, outline-color 150ms;
}

.reticle {
  height: 5px;
  aspect-ratio: 1/1;
  background-color: var(--background);
  border-radius: 50%;
}

.toSel {
  background-color: var(--delete);
  border-color: var(--delete);
}

.square {
  border-radius: 0;
}

.circle {
  border-radius: 50%;
}

.cone {
  border-radius: 0;
  clip-path: polygon(calc(50% - 11px) -40px, calc(50% + 11px) -40px, calc(50% + 11px) 0, 50% 0, 100% 100%, 0 100%, 50% 0, calc(50% - 11px) 0);
}

.aoe-rotate-handle {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.2rem);
  width: 22px;
  height: 36px;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  color: var(--text);
  font-size: 16px;
  cursor: grab;
}

.aoe-rotate-handle::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 0;
  left: 50%;
  border-left: 2px dotted var(--text);
  transform: translateX(-50%);
}

.aoe-rotate-handle i {
  position: relative;
  line-height: 18px;
  background-color: var(--background);
  border-radius: 50%;
}

.rectangle {
  border-radius: 0;
}

.active {
  background-color: var(--highlight);
  color: var(--background);
  font-weight: bold;
}

.active:hover {
  background-color: var(--highlight) !important;
}

.battlemap-form {
  max-width: 15vw;
  text-align: center;
  height: auto;
  position: absolute;
  border: 0.1vh solid var(--highlight);
  background-color: var(--background);
  padding: 1vw;
  text-transform: lowercase;
  z-index: 1305;
}

.arrow {
  position: absolute;
  top: -0.3vh;
  left: -0.3vh;
  background-color: var(--highlight);
  -webkit-clip-path: polygon(100% 0, 0 0, 0 100%);
  clip-path: polygon(100% 0, 0 0, 0 100%);
  height: 2vh;
  width: 2vh;
  border: 0.1vh solid var(--background);
}

.close-ann-form {
  position: absolute;
  top: 0;
  right: 0;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  background-color: var(--highlight);
  height: 2vh;
  width: 2vh;
  border: 0.1vh solid var(--background);
  font-size: 0.5rem;
  color: var(--background);
  font-weight: bold;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.close-ann-form:hover {
  cursor: pointer;
  background-color: var(--background);
  border: 0.1vh solid var(--highlight);
  color: var(--text);
}

.bm-marker {
  position: absolute;
  font-size: 1.5rem;
  background-color: var(--text);
  border: 2px solid var(--marker);
  outline: 0.5vh solid transparent;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  color: var(--background);
  -webkit-transform: translateX(-50%) translateY(-50%);
  transform: translateX(-50%) translateY(-50%);
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  z-index: 50;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  text-align: center;
  font-weight: bold;
  font-family: var(--titlefont);
  -webkit-box-shadow: 5px 5px 5px var(--marker);
  box-shadow: 5px 5px 5px var(--marker);
}

.bm-marker:hover {
  cursor: pointer;
  background-color: var(--marker);
  color: var(--text);
  -webkit-box-shadow: 2px 2px 5px var(--marker);
  box-shadow: 2px 2px 5px var(--marker);
}

body.battle-view-player .bm-marker.fog-pointer-blocked:hover {
  cursor: default;
}

.bm-player {
  border-radius: 50%;
}

.bm-enemy {
  background-color: var(--marker) !important;
  color: var(--text) !important;
}

.bm-enemy:hover {
  background-color: var(--text) !important;
  color: var(--marker) !important;
}

.bm-poi:not(.has-status-colours):not(.has-portrait):hover {
  background-color: transparent !important;
  border: none !important;
  -webkit-box-shadow: none !important;
  box-shadow: none !important;
}

.bm-poi.has-status-colours:not(.has-portrait):hover {
  background-color: transparent !important;
  border: none !important;
}

.fas {
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.bm-poi:hover .fas {
  -webkit-transform: scale(1.5);
  transform: scale(1.5);
}

.bloody {
  background-size: 100%;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.bloody:hover::before {
  -webkit-transform: scale(1.5);
  transform: scale(1.5);
}

.bloody::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: url("blood.png");
  background-size: 100%;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  z-index: -1;
}

.dead {
  background-size: 100%;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.dead::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: url("dead.png");
  background-size: 100%;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  z-index: -1;
  -webkit-filter: drop-shadow(2px 2px 1px var(--delete))
    drop-shadow(-2px -2px 1px var(--delete));
  filter: drop-shadow(2px 2px 1px var(--delete))
    drop-shadow(-2px -2px 1px var(--delete));
}

.bm-name,
.bm-poi-name {
  position: absolute;
  height: 20px;
  padding: 5px;
  border-radius: 5px;
  color: var(--text);
  text-shadow: 1px 1px 1px var(--background), 2px 2px 1px var(--background),
    3px 3px 1px var(--background);
  -webkit-transform: translatey(-160%) translatex(-50%);
  transform: translatey(-160%) translatex(-50%);
  font-family: var(--titlefont);
  font-weight: bold;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  z-index: 50;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.bm-marker + .bm-name {
  --name-marker-height: var(--grid-cell, 32px);
  transform: translate(-50%, calc(-100% - var(--name-marker-height) / 2 - 4px));
  pointer-events: none;
}
.bm-marker.tiny + .bm-name { --name-marker-height: calc(var(--grid-cell, 32px) * .5); }
.bm-marker.large + .bm-name { --name-marker-height: calc(var(--grid-cell, 32px) * 2); }
.bm-marker.huge + .bm-name { --name-marker-height: calc(var(--grid-cell, 32px) * 3); }
.bm-marker.gargantuan + .bm-name { --name-marker-height: calc(var(--grid-cell, 32px) * 4); }

.right-click-form {
  width: 5em;
  height: auto;
  overflow: visible;
  background-color: var(--background);
  color: var(--text);
  position: absolute;
  pointer-events: auto;
  border: 0.1vh solid var(--highlight);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  text-align: center;
  font-family: var(--textfont);
  font-weight: bold;
  z-index: 1304;
  border-radius: 0 0.45rem 0.45rem 0.45rem;
  padding: .5rem;
}

.click-form {
  width: 100%;
  height: 100%;
  margin: 0;
}

.click-label {
  width: 100%;
  height: 100%;
}

.click-label:hover {
  background-color: var(--highlight);
  color: var(--background);
  cursor: pointer;
}

.color-marker {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 0.3vh;
}

.corow {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  width: 100%;
  height: 1.5em;
  gap: 0.3vh;
  margin-left: 0.3vh;
  margin-right: 0.3vh;
}

.colbox {
  height: 100%;
  width: 100%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  padding: 0;
  border: 0;
}

.colbox:hover,
.colbox.is-applied {
  scale: 1.2;
}

.colbox.is-applied {
  outline: 2px solid var(--text);
  outline-offset: -2px;
}

.applied-custom-colors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3vh;
  width: 100%;
}

.custom-status-color {
  width: 1.2em;
  height: 1.2em;
}

.copink {
  background-color: #f281d4;
}

.coblue {
  background-color: #2ed8db;
}

.cogreen {
  background-color: #1e884b;
}

.coyellow {
  background-color: #f9f871;
}

.copurple {
  background-color: #7a7dd5;
}

.cobrown {
  background-color: #a83900;
}

.cusco-clicker {
  cursor: pointer;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.cusco-clicker:hover {
  scale: 1.08;
}

.cusco-clicker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.cusco-clicker::-webkit-color-swatch {
  border: none;
}

.yourturn::after {
  content: "";
  position: absolute;
  border: 0.3vh solid var(--highlight);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 110%;
  height: 110%;
  z-index: -1;
  border-radius: 50%;
  -webkit-animation: pulse 800ms infinite linear;
  animation: pulse 800ms infinite linear;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

@-webkit-keyframes pulse {
  0% {
    height: 0px;
    width: 0px;
    border-color: transparent;
  }
  10% {
    height: 1%;
    width: 1%;
    border-color: var(--highlight);
  }
  90% {
    height: 90%;
    width: 90%;
  }
  100% {
    height: 100%;
    width: 100%;
  }
}

@keyframes pulse {
  0% {
    height: 0px;
    width: 0px;
    border-color: transparent;
  }
  10% {
    height: 1%;
    width: 1%;
    border-color: var(--highlight);
  }
  90% {
    height: 90%;
    width: 90%;
  }
  100% {
    height: 100%;
    width: 100%;
    border-color: transparent;
  }
}

.remove:hover {
  background-color: var(--delete);
  color: var(--text);
}

.coveractive {
  background-color: var(--accent) !important;
}

.row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
}

.dmcp-label {
  height: 100%;
  width: 30%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  text-align: center;
}

.bm-marker-test {
  position: relative;
  font-size: 1.5rem;
  height: 32px;
  width: 32px;
  border: 2px solid var(--marker);
  background-color: var(--text);
  color: var(--background);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  text-align: center;
  font-weight: bold;
  font-family: var(--titlefont);
  -webkit-box-shadow: 5px 5px 5px var(--marker);
  box-shadow: 5px 5px 5px var(--marker);
}

.bm-marker-test:hover {
  cursor: pointer;
  background-color: var(--marker);
  color: var(--text);
  -webkit-box-shadow: 2px 2px 5px var(--marker);
  box-shadow: 2px 2px 5px var(--marker);
}

.marker-row {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  border: 0.4vh solid var(--accent);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  background-color: var(--accent);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: 10%;
}

.marker-color-input {
  width: 0;
  height: 0;
  visibility: hidden;
}

.hint {
  font-size: 1vh;
  width: 100%;
  text-align: center;
}

.font-text {
  color: var(--text);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 0.5vh;
  font-family: var(--textfont);
  font-weight: bold;
  cursor: pointer;
  -webkit-transition-duration: 1.5s;
  transition-duration: 1.5s;
}

.font-text:hover {
  background-color: var(--accent);
}

.import-explain {
  height: 60vh;
  width: 40vw;
  background-color: var(--background);
  position: absolute;
  top: 20vh;
  left: 30vw;
  border: 0.1vh solid var(--highlight);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1vh;
  overflow-y: auto;
  -webkit-box-shadow: 5px 5px 15px black;
  box-shadow: 5px 5px 15px black;
  padding: 4vh;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  z-index: 10;
}

.font-explain {
  color: var(--text);
  font-family: var(--textfont);
  font-size: 1.5vh;
  padding: 1vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 100%;
  word-wrap: break-word;
}

.font-img {
  max-height: 30vh;
  max-width: 100%;
  right: 0;
  position: relative;
}

.fontrow {
  border: 0.1vh solid var(--highlight);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 100%;
}

.font-explain-exit {
  position: fixed;
  height: 3vh;
  width: 3vh;
  top: 20vh;
  left: 67.9vw;
  background-color: var(--background);
  color: var(--text);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  border: 0.05vw solid var(--highlight);
  font-family: var(--textfont);
}

.font-explain-exit:hover {
  background-color: var(--highlight);
  color: var(--background);
  cursor: pointer;
}

.fonts {
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  overflow-y: auto;
}

.dmcp-font-label {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  width: 100%;
  color: var(--text);
  font-family: var(--textfont);
  font-weight: bold;
  font-size: 1.5vh;
}

.stacker {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.stacker-section {
  width: 100%;
  height: 100%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.map-archive {
  color: var(--text);
  font-family: var(--textfont);
  background-color: var(--background);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1vh;
  width: 50vw;
  height: 50vh;
  top: 25vh;
  position: absolute;
  gap: 1vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  border: 0.05vw solid var(--highlight);
  -webkit-box-shadow: 5px 5px 15px black;
  box-shadow: 5px 5px 15px black;
  z-index: 601;
}

.map-entry {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 0.5vh;
  height: 8vh;
  width: 100%;
  border: 0.05vw solid var(--highlight);
}

.map-contents {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 0.5vh;
  width: 100%;
}

.map-form-submit {
  font-family: "Font Awesome 5 Pro", var(--textfont);
  font-size: 1.8vh;
  background-color: var(--background);
  border: 0.05vw solid var(--highlight);
  color: var(--text);
  padding-left: 0.5vh;
  padding-right: 0.5vh;
  padding-top: 0.1vh;
  padding-bottom: 0.1vh;
  font-weight: bold;
  -webkit-transition-duration: 100ms;
  transition-duration: 100ms;
  text-align: center;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.map-form-submit:hover {
  background-color: var(--highlight);
  color: var(--background);
  cursor: pointer;
}

.map-archive-form {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  height: 100%;
  width: 100%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.map-archive-headings {
  height: 3vh;
}

.map-archive-headings * {
  font-weight: bold;
}

.map-archive-exit {
  position: absolute;
  height: 3vh;
  width: 3vh;
  top: 0;
  right: 0;
  background-color: var(--background);
  color: var(--text);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  border: 0.05vw solid var(--highlight);
  font-family: var(--textfont);
}

.map-archive-exit:hover {
  background-color: var(--highlight);
  color: var(--background);
  cursor: pointer;
}

#archive-btn {
  height: 2vh;
  padding: 0;
  font-size: 1vh;
}

.drawingboard {
  position: absolute;
  pointer-events: none;
  /* background-color: hsla(281, 29%, 85%, 0.5); */
}

.drawmode {
  cursor: crosshair;
}

/* on click, set z-index to 50 */
.drawtoggle {
  width: 100%;
  height: auto;
  padding: 0.3rem;
  z-index: 499;
  color: var(--text);
  border: 0.1vh solid var(--highlight);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 0.5vh;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-family: var(--textfont);
}

.drawtoggle:hover {
  cursor: pointer;
  background-color: var(--highlight);
  color: var(--background);
  font-weight: bold;
}

.drawconfig {
  background-color: var(--background);
  width: 100%;
  margin-top: -1.5vh;
  z-index: 500;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 0.5vh;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  border: 0.1vh solid var(--highlight);
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  padding-top: 1vh;
  padding-bottom: 1vh;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.drawrow1 {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 0.5vh;
}

.drawrow2 {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.drawrow3 {
  max-width: 95%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.drawcolour-label {
  font-family: var(--textfont);
  font-weight: bold;
  color: var(--text);
  min-height: 50px;
  border-radius: 5px;
  text-align: center;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  padding-left: 6px;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  user-select: none;
}

.drawcolour-clicker {
  width: 0px !important;
  height: 0px !important;
  visibility: hidden;
}

.drawRangeLabel {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.drawsize {
  max-width: 100%;
  display: flex;
  justify-content: center;
}

.drawPrev {
  border-radius: 50%;
  width: 10px;
  height: 10px;
  aspect-ratio: 1/1;
  background-color: black;
  box-sizing: border-box;
}

.drawlabel {
  color: var(--text);
}

.activeicon {
  background-color: var(--highlight);
  color: var(--background);
}

.drawicon {
  color: var(--text);
  border: 0.1vh solid var(--highlight);
  padding: 0.2vh;
  border-radius: 5px;
}

.drawicon:hover {
  background-color: var(--highlight);
  color: var(--background);
  cursor: pointer;
}

.trashicon {
  color: var(--delete);
  border: 0.1vh solid var(--highlight);
  padding: 0.2vh;
  border-radius: 5px;
}

.trashicon:hover {
  background-color: var(--highlight);
  color: var(--background);
  cursor: pointer;
}

.eraseicon {
  color: var(--text);
  border: 0.1vh solid var(--highlight);
  padding: 0.2vh;
  border-radius: 5px;
}

.eraseicon:hover {
  background-color: var(--highlight);
  color: var(--background);
  cursor: pointer;
}

.drawsubmit {
  background-color: var(--background);
  outline: none;
  border: 0.1vh solid var(--highlight);
  color: var(--text);
  cursor: pointer;
  font-weight: bold;
  font-family: var(--textfont), "Font Awesome 5 Pro";
}

.drawsubmit:hover {
  background-color: var(--highlight);
  outline: none;
  border: 0.1vh solid var(--highlight);
  color: var(--background);
  font-family: var(--textfont), "Font Awesome 5 Pro";
}

.refreshbtn {
  position: absolute;
  height: 5vh;
  width: 5vh;
  top: 0;
  right: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  border: 0.1vh solid var(--highlight);
  background-color: var(--background);
  color: var(--text);
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.refreshbtn:hover {
  background-color: var(--highlight);
  color: var(--background);
}

.red {
  background-color: #2d2d2d !important;
}

.diceholder {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1vh;
  background-color: var(--background);
  border: 0.1vh solid var(--highlight);
  color: var(--text);
  font-family: var(--textfont);
  min-height: 280px;
  z-index: 52;
  overflow-y: hidden;
  overflow-x: hidden;
}

.diceholder:focus,
.diceholder:focus-visible {
  outline: none;
}

.dice {
  width: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 1vh;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  position: relative;
}

.outputholder:hover,
.outputholder:focus {
  background-color: var(--highlight);
  color: var(--background);
}

.outputholder:hover .diceoutput,
.outputholder:focus .diceoutput {
  background-color: var(--background);
  color: var(--highlight);
}

.diceoutput {
  background-color: var(--highlight);
  color: var(--text);
  width: 90%;
  aspect-ratio: 1/1;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  font-size: 1.2rem;
  font-weight: bold;
}

.spin {
  -webkit-transform: rotate(360deg) scale(0.3);
  transform: rotate(360deg) scale(0.3);
  -webkit-transition-duration: 350ms;
  transition-duration: 350ms;
}

.outputholder:active .diceoutput {
  background-color: var(--background);
}

.d20-output {
  -webkit-clip-path: polygon(5% 25%, 50% 0, 95% 25%, 95% 75%, 50% 100%, 5% 75%);
  clip-path: polygon(5% 25%, 50% 0, 95% 25%, 95% 75%, 50% 100%, 5% 75%);
}

.d12-output {
  -webkit-clip-path: polygon(
    35% 2%,
    65% 2%,
    80% 10%,
    100% 40%,
    100% 60%,
    80% 90%,
    65% 98%,
    35% 98%,
    20% 90%,
    0 60%,
    0 40%,
    20% 10%
  );
  clip-path: polygon(
    35% 2%,
    65% 2%,
    80% 10%,
    100% 40%,
    100% 60%,
    80% 90%,
    65% 98%,
    35% 98%,
    20% 90%,
    0 60%,
    0 40%,
    20% 10%
  );
}

.d10-output {
  -webkit-clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.d8-output {
  -webkit-clip-path: polygon(
    30% 0%,
    70% 0%,
    100% 30%,
    100% 70%,
    70% 100%,
    30% 100%,
    0% 70%,
    0% 30%
  );
  clip-path: polygon(
    30% 0%,
    70% 0%,
    100% 30%,
    100% 70%,
    70% 100%,
    30% 100%,
    0% 70%,
    0% 30%
  );
}

.d6-output {
  -webkit-clip-path: polygon(10% 10%, 90% 10%, 90% 90%, 10% 90%);
  clip-path: polygon(10% 10%, 90% 10%, 90% 90%, 10% 90%);
}

.d4-output {
  -webkit-clip-path: polygon(50% 90%, 10% 20%, 90% 20%);
  clip-path: polygon(50% 90%, 10% 20%, 90% 20%);
}

.d100-output {
  -webkit-clip-path: polygon(
    50% 0%,
    80% 10%,
    100% 35%,
    100% 70%,
    80% 90%,
    50% 100%,
    20% 90%,
    0% 70%,
    0% 35%,
    20% 10%
  );
  clip-path: polygon(
    50% 0%,
    80% 10%,
    100% 35%,
    100% 70%,
    80% 90%,
    50% 100%,
    20% 90%,
    0% 70%,
    0% 35%,
    20% 10%
  );
}

.mathholder {
  position: relative;
  width: 100%;
  height: 5vh;
}

.math {
  background-color: var(--background);
  color: var(--highlight);
  width: 50%;
  /* height: 100%; */
  text-align: center;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: pointer;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  position: absolute;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  border-radius: 5px;
}

.math:active,
.math:focus {
  background-color: var(--highlight);
  color: var(--text);
}

.adddice {
  left: 0;
}

.remdice {
  right: 0;
}

.outputholder {
  width: 100%;
  height: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding-top: 1vh;
  padding-bottom: 1vh;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: pointer;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.plus-dice {
  display: none;
}

.diebtn-holder {
  margin-top: 1rem;
  width: 100%;
  height: 2vh;
  position: relative;
}

.diebtn {
  height: 100%;
  width: 100%;
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.diebtn:hover,
.diebtn:focus {
  background-color: var(--background);
  cursor: pointer;
}

.diebtn:hover,
.diebtn:focus .fas {
  font-size: 1.5rem;
}

.visdice {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.questbody {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  position: relative;
}

.questholder {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  font-family: var(--textfont), "Font Awesome 5 Pro";
  font-weight: bold;
  border-left: 0.1rem solid var(--highlight);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.newquest-btn {
  font-family: "Font Awesome 6 Pro";
  position: absolute;
  left: 1%;
  height: 5vh;
  width: 5vh;
  font-size: 3vh;
  font-weight: 100;
  background-color: var(--background);
  color: var(--text);
  border: 0.1rem solid var(--highlight);
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.newquest-btn:hover {
  background-color: var(--accent);
}

.newquest-btn:hover * {
  -webkit-transform: rotate(180deg);
  transform: rotate(180deg);
}

.newquest-btn:focus {
  outline: none;
}

.newquest-btn:active {
  background-color: var(--highlight);
  color: var(--text);
}

@media only screen and (max-width: 1499.99999px) {
  .questholder {
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap;
    height: -webkit-fit-content;
    height: -moz-fit-content;
    height: fit-content;
    width: 90%;
    height: 85vh;
    position: relative;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    overflow-y: scroll;
  }
  .quest {
    width: 90%;
  }
  .newquest-btn {
    bottom: 1%;
    left: 50%;
    -webkit-transform: translatex(-50%);
    transform: translatex(-50%);
  }
}

@media only screen and (min-width: 1500px) {
  .newquest-btn {
    left: 1vh;
  }
  .questholder {
    position: absolute;
    left: 7vh;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    height: 95%;
    min-width: 90%;
    overflow-x: scroll;
  }
  .quest {
    width: 25rem;
  }
}

.quest {
  height: -webkit-fit-content;
  height: -moz-fit-content;
  height: fit-content;
  border: 0.1rem solid var(--highlight);
  border-radius: 0.5rem;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--highlight);
  padding: 1rem;
  position: relative;
}

.objective {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  font-family: var(--titlefont);
  color: var(--text);
  width: 100%;
  text-align: center;
}

.qtitle {
  max-width: 75%;
}

.objpoint {
  width: 3rem;
  height: 1.5rem;
}

.point-left {
  margin-right: 0.5rem;
}

.point-right {
  margin-left: 0.5rem;
  -webkit-transform: rotateY(180deg);
  transform: rotateY(180deg);
}

.reward {
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 0.1rem solid var(--highlight);
}

.fa-coins {
  font-style: normal;
  margin-right: 0.5rem;
  color: var(--highlight);
}

.notesbox {
  width: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1rem;
}

.notes {
  color: var(--text);
}

.notes:before {
  content: "\f105";
  font-family: "Font Awesome 5 Pro";
  margin-right: 0.5rem;
  font-weight: 100;
  color: var(--highlight);
}

.text-holder {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
}

.noteeditor {
  width: 90%;
  height: 2rem;
  resize: vertical;
  background-color: var(--background);
  color: var(--text);
  outline: none;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  border: 0.1rem solid var(--accent);
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.noteeditor:focus {
  border: 0.1rem solid var(--highlight);
  height: 5rem;
}

.delnote {
  height: 100%;
  width: 10%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  cursor: pointer;
}

.delnote:hover {
  background-color: var(--delete);
  color: var(--text);
}

.questedit {
  width: 100%;
  height: auto;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.qbtn-holder {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 100%;
  gap: 2rem;
}

.note-adder {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  margin-top: 0.5rem;
}

.notetext {
  width: 90%;
  height: 5rem;
  resize: vertical;
  border: 0.1rem solid var(--accent);
  border-right: 0.1rem solid transparent;
  background-color: var(--background);
  color: var(--text);
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.notetext:focus {
  outline: none;
  border: 0.1rem solid var(--highlight);
}

.notesubmit {
  font-family: "Font Awesome 6 Pro";
  color: var(--highlight);
  background-color: var(--background);
  border-left: none !important;
  border: 0.1rem solid var(--accent);
  height: 100%;
  width: 10%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  cursor: pointer;
}

.notesubmit:hover,
.notesubmit:focus {
  background-color: var(--highlight);
  color: var(--background);
  outline: none;
  border: 0.1rem solid var(--highlight);
}

.fa-solid {
  font-style: normal;
}

.quest-btn {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  background-color: var(--background);
  color: var(--highlight);
  font-size: 1rem;
  cursor: pointer;
  border: 0.05rem solid var(--highlight);
  width: 5rem;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  font-family: var(--textfont), "Font Awesome 6 Pro";
  padding: 0.3rem 0.5rem 0.3rem 0.5rem;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.quest-btn:hover,
.quest-btn:focus {
  background-color: var(--highlight);
  color: var(--background);
  outline: none;
}

.qn-edit {
  font-family: "Font Awesome 6 Pro";
}

.qn-delete:hover {
  background-color: var(--delete);
  color: var(--text);
}

.editing {
  font-weight: bold;
}

.addquest {
  width: 100%;
  height: 100%;
  position: absolute;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  background-color: rgba(46, 46, 46, 0.6);
  z-index: 5;
}

.exit-btn {
  font-family: "Font Awesome 6 Pro";
  background-color: var(--background);
  color: var(--highlight);
  border: 0.1rem solid var(--highlight);
  height: 1.5rem;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  aspect-ratio: 1/1;
  position: absolute;
  right: 0.1rem;
  top: 0.1rem;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.exit-btn:hover,
.exit-btn:focus {
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
  background-color: var(--highlight);
  color: var(--text);
  border: 0.1rem solid var(--highlight);
  outline: none;
}

.symbol {
  position: relative;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  text-align: center;
}

.quest-adder {
  position: absolute;
  min-width: 30rem;
  background-color: var(--accent);
  padding: 2rem 0 2rem 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1rem;
  z-index: 500;
}

.questform-input {
  width: 80%;
  height: 4rem;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  border: 0.1rem solid transparent;
  font-size: 1.5rem;
  color: var(--text);
  background-color: var(--background);
  font-family: var(--textfont), "Font Awesome 6 Pro";
  padding: 0 1rem 0 1rem;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.questform-input:focus {
  outline: none;
  border: 0.1rem solid var(--highlight);
}

.form-quest-btn {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  background-color: var(--background);
  color: var(--highlight);
  font-size: 1rem;
  cursor: pointer;
  border: 0.05rem solid var(--highlight);
  width: 80%;
  font-weight: bold;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  font-family: var(--textfont), "Font Awesome 6 Pro";
  padding: 0.3rem 0.5rem 0.3rem 0.5rem;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  margin-top: 1rem;
}

.form-quest-btn:hover,
.form-quest-btn:focus {
  background-color: var(--highlight);
  color: var(--background);
  outline: none;
}

.Solved {
  opacity: 0.5;
  -webkit-box-shadow: 0rem 0rem 0rem var(--highlight);
  box-shadow: 0rem 0rem 0rem var(--highlight);
  -webkit-transition-duration: 1s;
  transition-duration: 1s;
}

.Solved * {
  color: var(--highlight) !important;
}

.Solved:hover {
  opacity: 1;
  -webkit-box-shadow: 0.1rem 0.1rem 1rem var(--highlight);
  box-shadow: 0.1rem 0.1rem 1rem var(--highlight);
  -webkit-animation: glowpulse 7s infinite linear;
  animation: glowpulse 7s infinite linear;
  -webkit-transition-duration: 1s;
  transition-duration: 1s;
}

@-webkit-keyframes glowpulse {
  0% {
    -webkit-box-shadow: 0 0 0rem var(--highlight);
    box-shadow: 0 0 0rem var(--highlight);
  }
  25% {
    -webkit-box-shadow: 0.1rem 0.1rem 1rem var(--highlight);
    box-shadow: 0.1rem 0.1rem 1rem var(--highlight);
  }
  50% {
    -webkit-box-shadow: 0rem 0rem 0rem var(--highlight);
    box-shadow: 0rem 0rem 0rem var(--highlight);
  }
  75% {
    -webkit-box-shadow: 0.1rem 0.1rem 1rem var(--highlight);
    box-shadow: 0.1rem 0.1rem 1rem var(--highlight);
  }
  100% {
    -webkit-box-shadow: 0rem 0rem 0rem var(--highlight);
    box-shadow: 0rem 0rem 0rem var(--highlight);
  }
}

@keyframes glowpulse {
  0% {
    -webkit-box-shadow: 0 0 0rem var(--highlight);
    box-shadow: 0 0 0rem var(--highlight);
  }
  25% {
    -webkit-box-shadow: 0.1rem 0.1rem 1rem var(--highlight);
    box-shadow: 0.1rem 0.1rem 1rem var(--highlight);
  }
  50% {
    -webkit-box-shadow: 0rem 0rem 0rem var(--highlight);
    box-shadow: 0rem 0rem 0rem var(--highlight);
  }
  75% {
    -webkit-box-shadow: 0.1rem 0.1rem 1rem var(--highlight);
    box-shadow: 0.1rem 0.1rem 1rem var(--highlight);
  }
  100% {
    -webkit-box-shadow: 0rem 0rem 0rem var(--highlight);
    box-shadow: 0rem 0rem 0rem var(--highlight);
  }
}

.gild {
  position: absolute;
  height: 100px;
  aspect-ratio: 1/1;
}

.gild svg {
  width: 100%;
  height: 100%;
}

.gild-tl {
  top: -12px;
  left: -7px;
}

.gild-tr {
  top: -12px;
  right: -7px;
  -webkit-transform: scaleX(-1);
  transform: scaleX(-1);
}

.gild-br {
  bottom: -12px;
  right: -7px;
  -webkit-transform: scaleX(-1) scaleY(-1);
  transform: scaleX(-1) scaleY(-1);
}

.gild-bl {
  bottom: -12px;
  left: -7px;
  -webkit-transform: scaleY(-1);
  transform: scaleY(-1);
}

.heading-edit {
  background-color: var(--background);
  color: var(--text);
  outline: none;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  border: 0.1rem solid var(--accent);
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  height: 2rem;
  font-size: 1.1rem;
  font-family: var(--textfont);
}

.heading-edit:focus {
  border: 0.1rem solid var(--highlight);
}

#int {
  height: var(--marker-height);
}

.ruler {
  background-color: var(--background);
  height: var(--marker-height);
  width: 50%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  font-family: var(--textfont);
  color: var(--text);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  z-index: 500;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  position: absolute;
  -webkit-transform-origin: 50% 0%;
  transform-origin: 50% 0%;
  cursor: pointer;
}

.rulerborder {
  background-color: var(--highlight);
  opacity: 0.5;
}

.rulerborder .section {
  display: none !important;
}

.rulersphere {
  border-radius: 50%;
  -webkit-clip-path: none;
  clip-path: none;
}

.rulercone {
  border-radius: 0%;
  -webkit-clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.section {
  height: 100%;
  width: 100%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  border: 1px solid var(--highlight);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: none;
}

.rulermod {
  width: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.space {
  width: 0.3vh;
}

.rulermod-label {
  color: var(--text);
  font-family: var(--textfont);
  width: 100%;
  text-align: center;
}

.rulermod-inputs {
  width: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
}

.rulermod input {
  width: 100%;
}

.rulermod-val {
  background-color: var(--background);
  color: var(--highlight);
  border: 0.1vh solid var(--background);
  text-align: right;
  outline: none;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.rulermod-val:focus {
  border: 0.1vh solid var(--highlight);
}

.rulermod-ft {
  padding-left: 0.5vh;
  padding-right: 0.5vh;
  color: var(--text);
  font-family: var(--textfont);
}

.rulermod-btn {
  background-color: var(--background);
  color: var(--text);
  border: 0.1vh solid var(--highlight);
  cursor: pointer;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.rulermod-btn:hover,
.rulermod-btn:focus {
  background-color: var(--highlight);
  color: var(--background);
  border: 0.1vh solid var(--highlight);
}

.ruler-reset {
  position: relative;
  margin-top: 384px;
}

.initiative {
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1vh;
  width: 100%;
  max-height: 55vh;
  background-color: var(--background);
  font-family: var(--textfont);
  font-weight: bold;
  overflow-y: auto;
}

.order {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1vh;
  padding-bottom: 1vh;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.entrant {
  padding: 1vh;
  width: 90%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 1vh;
  border: 0.1vh solid var(--accent);
  color: var(--text);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  position: relative;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  -webkit-box-shadow: 0 0 0;
  box-shadow: 0 0 0;
}

.your-turn {
  -webkit-box-shadow: 0.1vh 0.1vh 0 var(--highlight);
  box-shadow: 0.1vh 0.1vh 0 var(--highlight);
}

.init-roll {
  width: 10%;
  background-color: var(--background);
  color: var(--text);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  font-family: var(--textfont), "Font Awesome 6 Pro";
  border: 0.1vh solid var(--highlight);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  cursor: pointer;
  text-align: center;
}

.init-roll:focus {
  outline: none;
  border: 0.1vh solid var(--highlight);
}

.hp {
  position: absolute;
  left: 50%;
  width: 10%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  outline: none;
  border: 0.1vh solid var(--accent);
  background-color: var(--background);
  color: var(--highlight);
  box-sizing: border-box;
  font-family: var(--textfont), "Font Awesome 6 Pro";
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  text-align: center;
  font-weight: bold;
  cursor: pointer;
}

.hp::-webkit-input-placeholder {
  color: var(--highlight);
}

.hp:-ms-input-placeholder {
  color: var(--highlight);
}

.hp::-ms-input-placeholder {
  color: var(--highlight);
}

.hp::placeholder {
  color: var(--highlight);
}

.hp:focus {
  outline: none;
  border: 0.1vh solid var(--highlight);
  background-color: var(--background);
}

.init-remove {
  color: var(--highlight);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  position: absolute;
  top: 0;
  height: 100%;
  aspect-ratio: 1/1;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  right: 0;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.init-remove:hover {
  background-color: var(--highlight);
  color: var(--background);
}

@-webkit-keyframes borderpulse {
  0% {
    border-width: 0.1vh;
  }
  50% {
    border-width: 0.3vh;
  }
  100% {
    border-width: 0.1vh;
  }
}

@keyframes borderpulse {
  0% {
    border-width: 0.1vh;
  }
  50% {
    border-width: 0.3vh;
  }
  100% {
    border-width: 0.1vh;
  }
}

.dm-panel {
  position: fixed;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  bottom: -100%;
  right: 1vh;
  width: 17vw;
  background-color: var(--background);
  border: 0.1vh solid var(--highlight);
  font-family: var(--textfont);
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  z-index: 52;
}

.dm-mode {
  opacity: 0.5 !important;
}

.dmp-label {
  background-color: var(--background);
  color: var(--text);
  height: 5vh;
  width: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  border: none;
  cursor: pointer;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  user-select: none;
  font-family: var(--textfont);
  font-size: 1.3rem;
  font-weight: bold;
}

.dmp-label:hover,
.dmp-label:focus {
  outline: none;
  background-color: var(--highlight);
  color: var(--background);
}

.dmp-icon {
  padding-left: 1vh;
  padding-right: 1vh;
  font-family: "Font Awesome 6 Pro";
  -webkit-transition-duration: 500ms;
  transition-duration: 500ms;
}

.dmp-options {
  height: auto;
  width: 100%;
  background-color: var(--background);
  color: var(--text);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.dmc-label {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 0.5vh;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.dmp-heading {
  font-weight: bold;
  text-decoration: underline;
  padding-bottom: 1vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 100%;
}

.roundheading {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 1vh;
  font-family: var(--textfont), "Font Awesome 6 Pro";
  width: 100%;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.r-mod {
  background-color: var(--background);
  color: var(--text);
  border: 0.1vh solid var(--highlight);
  font-family: var(--textfont), "Font Awesome 6 Pro";
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: pointer;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.r-mod:hover,
.r-mod:focus {
  background-color: var(--highlight);
  color: var(--background);
  outline: none;
}

.active-effects {
  max-height: 20vh;
  overflow-y: auto;
  width: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  position: relative;
  gap: 0.5vh;
  padding-bottom: 1vh;
}

.effect {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  width: 100%;
}

.effect-text-title {
  width: 90%;
  padding-left: 1vh;
  font-weight: bold;
  text-decoration: underline;
}

.effect-end-title {
  width: 10%;
  font-weight: bold;
  text-decoration: underline;
}

.effect-text {
  width: 90%;
  padding-left: 1vh;
}

.effect-end {
  width: 10%;
  text-align: center;
}

.add-effect {
  width: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
}

.add-desc {
  width: 70%;
  padding-left: 1vh;
}

.add-num {
  width: 20%;
}

.add-input {
  background-color: var(--background);
  color: var(--text);
  border: 0.1vh solid var(--highlight);
  height: 2.5vh;
}

.add-input:focus {
  outline: none;
  border: 0.1vh solid var(--highlight);
}

.effect-adder {
  background-color: var(--background);
  color: var(--text);
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  cursor: pointer;
  border: 0.1vh solid var(--highlight);
  margin-top: 0.5vh;
  padding-top: 0.5vh;
  padding-bottom: 0.5vh;
  width: 10%;
}

.effect-adder:hover,
.effect-adder:focus {
  background-color: var(--highlight);
  color: var(--background);
  outline: none;
}

.rulediv {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  position: absolute;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

#d1 {
  height: 5px;
  width: 5px;
}

#d2 {
  font-size: 1.2rem;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  padding: 0.3vh;
  aspect-ratio: 1/1;
  z-index: 51;
  background-color: var(--background);
  color: var(--highlight);
  border: 0.1vh solid var(--highlight);
  font-family: var(--textfont);
}

.line {
  background-color: var(--highlight) !important;
  -webkit-box-shadow: 0.1vh 0.1vh 0.1vh var(--background);
  box-shadow: 0.1vh 0.1vh 0.1vh var(--background);
}

.legend {
  position: absolute;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  top: 50%;
  left: 0;
  height: -webkit-fit-content;
  height: -moz-fit-content;
  height: fit-content;
  width: 15vh;
  padding: 1vh;
  border: 0.1vh solid var(--accent);
  z-index: -1;
  font-family: var(--textfont), "Font Awesome 6 Pro";
  color: var(--text);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1vh;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.leg-title {
  font-weight: bold;
  text-decoration: underline;
}

.shortcuts {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: 1vh;
}

.turnchar-p1 {
  width: 100vw;
  height: 100vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.turnchar-choose {
  position: relative;
  width: 92.7%;
  min-height: 40%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  padding: 10vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.turnchar-select {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1vh;
  top: 3vh;
  width: 100%;
  position: relative;
}

.turnchar-select #addsubject {
  width: 62vw;
  height: 5vh;
  font-family: var(--textfont);
  font-size: 1.8vh;
  font-weight: bold;
}

.turnchar-select #addnote {
  width: 62vw;
  height: 20vh;
  font-family: var(--textfont);
  font-size: 1.8vh;
  font-weight: 900;
}

.turnchar-select #turnchar-chooseubmit {
  font-family: var(--textfont);
  font-size: 1.8vh;
  background-color: var(--background);
  border: 0.05vw solid var(--highlight);
  color: var(--text);
  padding-left: 5vh;
  padding-right: 5vh;
  padding-top: 1vh;
  padding-bottom: 1vh;
  font-weight: bold;
  -webkit-transition-duration: 100ms;
  transition-duration: 100ms;
}

.turnchar-select #turnchar-chooseubmit:hover {
  background-color: var(--highlight);
  color: var(--background);
  cursor: pointer;
}

.turncharradio {
  width: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 1vh;
}

.turnchar-select input[type="radio"] {
  display: none;
}

.turnchar-select input[type="radio"]:checked + .box {
  background-color: transparent;
}

.turnchar-select input[type="radio"]:checked + .box span {
  color: var(--text);
}

.turnchar-select input[type="radio"]:checked + .box span:before {
  opacity: 1;
}

.turncharradio label {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  width: 100%;
}

.turnchar-select .box {
  width: 100%;
  height: 10vh;
  background-color: transparent;
  border: 0.05vw solid var(--highlight);
  border-radius: 5px;
  -webkit-transition: all 250ms ease;
  transition: all 250ms ease;
  will-change: transition;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  text-align: center;
  cursor: pointer;
  position: relative;
  font-family: var(--textfont);
  font-weight: 900;
}

.turnchar-select .box:active {
  -webkit-transform: translateY(10px);
  transform: translateY(10px);
}

.turnchar-select .box span {
  position: relative;
  left: 0;
  right: 0;
  -webkit-transition: all 300ms ease;
  transition: all 300ms ease;
  font-size: 1.8vh;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  color: var(--text);
  padding: 1vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.turnchar-select .box span:before {
  font-family: "Font Awesome 5 Pro";
  display: block;
  opacity: 0;
  -webkit-transition: all 300ms ease-in-out;
  transition: all 300ms ease-in-out;
  font-weight: normal;
  color: var(--highlight);
  background-color: transparent;
  width: 100%;
  height: 100%;
  position: absolute;
  font-size: 4vh;
  z-index: -1;
}

.turnchar-select .wizard span:before {
  content: "\f0d0";
}

.turnchar-select .fighter span:before {
  content: "\f6de";
}

.turnchar-select .sorcerer span:before {
  content: "\f6e8";
}

.turnchar-select .rogue span:before {
  content: "\f13e";
}

.turnchar-select .barbarian span:before {
  content: "\f6b3";
}

.turnchar-select .bard span:before {
  content: "\f6f9";
}

.turnchar-select .cleric span:before {
  content: "\f132";
}

.turnchar-select .druid span:before {
  content: "\f724";
}

.turnchar-select .monk span:before {
  content: "\f6ef";
}

.turnchar-select .paladin span:before {
  content: "\f71c";
}

.turnchar-select .ranger span:before {
  content: "\f6b9";
}

.turnchar-select .warlock span:before {
  content: "\f6e5";
}

.turnplanner-holder {
  width: 100vw;
  height: 100vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: start;
  -ms-flex-pack: start;
  justify-content: flex-start;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1vh;
  position: relative;
  overflow-y: scroll;
}

.exp-track {
  margin-top: 1vh;
  width: 80vw;
  height: 18vh;
  border: 0.1vh solid var(--highlight);
  color: var(--text);
  font-family: var(--titlefont);
  padding: 1vh;
  position: relative;
  -webkit-transition-duration: 250ms;
  transition-duration: 250ms;
}

.exp-track:hover {
  -webkit-box-shadow: var(--highlight) 0.2px 0.2px 5px,
    var(--highlight) -0.2px -0.2px 5px;
  box-shadow: var(--highlight) 0.2px 0.2px 5px,
    var(--highlight) -0.2px -0.2px 5px;
  -webkit-transition-duration: 250ms;
  transition-duration: 250ms;
}

.exp-tr {
  top: 0.5vh;
  width: 100%;
  height: 2vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  position: relative;
  gap: 50%;
}

.exp-track-title {
  font-weight: bold;
  font-size: 1.5vh;
  text-decoration: underline;
  color: var(--highlight);
}

.expres-holder {
  height: 90%;
  padding-top: 0.5vh;
  width: auto;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

.exp-res {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  padding-bottom: 1vh;
  -webkit-box-flex: 1;
  -ms-flex: 1 1;
  flex: 1 1;
  height: 4vh;
}

.exp-res-title {
  font-family: var(--textfont);
  color: var(--text);
}

.exp-res-uses {
  font-family: "Font Awesome 5 Pro";
  font-weight: bold;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 0.5vh;
  color: var(--text);
}

.resetform {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 0.5vh;
}

.resetform * {
  width: 100%;
}

.reset-btn {
  background-color: var(--background);
  color: var(--text);
  border: 0.1vh solid var(--highlight);
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  height: 2vh;
}

.reset-btn:hover,
.reset-btn:active {
  background-color: var(--highlight);
  color: var(--background);
}

.exp-reset-choices {
  background-color: var(--background);
  border: 0.1vh solid var(--highlight);
  color: var(--text);
  height: 2vh;
}

.exp-res-ind {
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  text-shadow: var(--highlight) 1px 1px 1px, var(--highlight) 1.5px 1.5px 1px,
    var(--highlight) 2px 2px 1px;
  -webkit-transition-duration: 250ms;
  transition-duration: 250ms;
}

.exp-res-ind:hover {
  -webkit-transform: scale(1.2);
  transform: scale(1.2);
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.exp-res-used {
  cursor: pointer;
  text-shadow: var(--highlight) 1px 1px 1px, var(--highlight) 1.5px 1.5px 1px,
    var(--highlight) 2px 2px 1px;
  font-weight: 100;
  color: var(--accent);
  text-shadow: none;
  -webkit-transition-duration: 250ms;
  transition-duration: 250ms;
}

.exp-res-used:hover {
  -webkit-transform: scale(1.2);
  transform: scale(1.2);
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.turnplannerbox {
  margin-top: 3vh;
  width: 80vw;
  height: auto;
  color: var(--text);
  font-family: var(--titlefont);
  padding: 1vh;
  position: relative;
  -webkit-transition-duration: 250ms;
  transition-duration: 250ms;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 1vh;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

.actionboxtitle {
  position: absolute;
  left: -50px;
  -webkit-transform: rotate(270deg);
  transform: rotate(270deg);
  color: var(--highlight);
  text-shadow: 2px 2px 5px;
}

.subbox {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 18vw;
  flex: 1 1 18vw;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: pointer;
  padding: 0.2vh;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  text-align: center;
  width: 100%;
  height: 3vh;
  border: 0.1vh solid var(--highlight);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.subbox:hover {
  color: var(--background);
  background-color: var(--highlight);
}

.actionselect {
  -webkit-box-shadow: var(--highlight) 1px 1px 5px,
    var(--highlight) -1px -1px 5px;
  box-shadow: var(--highlight) 1px 1px 5px, var(--highlight) -1px -1px 5px;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  color: var(--background);
  background-color: var(--text);
}

.instrselect {
  -webkit-box-shadow: var(--highlight) 1px 1px 5px,
    var(--highlight) -1px -1px 5px;
  box-shadow: var(--highlight) 1px 1px 5px, var(--highlight) -1px -1px 5px;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  color: var(--background);
  background-color: var(--text);
}

.bactionselect {
  -webkit-box-shadow: var(--highlight) 1px 1px 5px,
    var(--highlight) -1px -1px 5px;
  box-shadow: var(--highlight) 1px 1px 5px, var(--highlight) -1px -1px 5px;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  color: var(--background);
  background-color: var(--text);
}

.ineligible {
  color: var(--accent);
  border-color: var(--accent);
  cursor: default;
}

.ineligible:hover {
  color: var(--accent);
  background-color: var(--background);
}

.instrboxtitle {
  position: absolute;
  right: -70px;
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
  color: var(--highlight);
  text-shadow: 2px 2px 5px;
}

.bonusboxtitle {
  position: absolute;
  left: -80px;
  -webkit-transform: rotate(270deg);
  transform: rotate(270deg);
  color: var(--highlight);
  text-shadow: 2px 2px 5px;
}

.turn-submit {
  font-family: "Font Awesome 5 Pro";
  color: var(--highlight);
  font-size: 4.5vh;
  font-weight: 100;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: pointer;
  position: absolute;
  bottom: 21vh;
  width: 5vh;
  height: 5vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.turn-submit:hover {
  font-weight: 900;
}

.turn-reset {
  font-family: "Font Awesome 5 Pro";
  color: var(--highlight);
  font-size: 1.8vh;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: pointer;
  position: absolute;
  left: 23.75vw;
  bottom: 22vh;
  width: 3vh;
  height: 3vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.turn-reset:hover {
  background-color: var(--highlight);
  color: var(--background);
}

.turn-new {
  font-family: "Font Awesome 5 Pro";
  color: var(--highlight);
  font-size: 1.8vh;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: pointer;
  position: absolute;
  left: 71.25vw;
  bottom: 22vh;
  width: 3vh;
  height: 3vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.turn-new:hover {
  background-color: var(--highlight);
  color: var(--background);
}

.exp-choose {
  position: absolute;
  border: 0.1vh solid var(--highlight);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  font-family: var(--textfont);
  color: var(--text);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  padding: 0 0.2vh 0 0.2vh;
  background-color: var(--background);
}

.exp-opt {
  width: 100%;
  height: 100%;
  padding: 0.2vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  cursor: pointer;
}

.exp-opt:hover {
  background-color: var(--highlight);
  color: var(--background);
}

.lct {
  width: 15vh;
  position: absolute;
  bottom: 1vh;
  left: 1vh;
  border: 0.1vh solid var(--highlight);
  color: var(--text);
  font-size: 1.5vh;
  font-family: var(--textfont);
}

.instr-desc {
  position: absolute;
  bottom: 0.5vh;
  height: 20vh;
  width: 80vw;
  color: var(--text);
  font-family: var(--textfont);
  font-size: 1.8vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  overflow-y: scroll;
}

.instr-desc * {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 50%;
  flex: 1 1 50%;
}

.turn-adder {
  position: absolute;
  width: 90vw;
  height: 90vh;
  background-color: var(--background);
  border: 0.1vh solid var(--highlight);
  top: 5vh;
  color: var(--text);
  font-family: var(--titlefont), "Font Awesome 5 Pro";
  font-size: 1.8vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.tabox {
  width: 100%;
  height: 100%;
  border: 0.1vh solid var(--highlight);
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.tabox:hover {
  background-color: var(--highlight);
  color: var(--background);
  -webkit-transition-duration: 150ms;
  transition-duration: 150ms;
}

.turn-adder span {
  font-weight: 100;
}

.add-close {
  position: absolute;
  top: 91vh;
  font-family: "Font Awesome 6 Pro";
  color: var(--text);
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  padding: 0.5vh;
  background-color: var(--background);
  border: 0.1vh solid var(--highlight);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.add-close:hover {
  background-color: var(--highlight);
  color: var(--background);
}

.add-edit {
  position: absolute;
  top: 91vh;
  right: 0;
  font-family: "Font Awesome 6 Pro";
  color: var(--text);
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  padding: 0.5vh;
  background-color: var(--background);
  border: 0.1vh solid var(--highlight);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.add-edit:hover {
  background-color: var(--highlight);
  color: var(--background);
}

.add-edit-on {
  background-color: var(--highlight);
  color: var(--background);
}

.add-form {
  position: absolute;
  width: 95%;
  height: 95%;
  background-color: var(--background);
  border: 0.1vh solid var(--highlight);
  cursor: pointer;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 0.5vh;
}

.add-form-title {
  position: absolute;
  top: 1vh;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.add-form-input {
  width: 90%;
  height: 5vh;
  font-size: 2.5vh;
  background-color: var(--background);
  color: var(--text);
  border: 0.1vh solid var(--highlight);
}

.add-form-submit {
  font-family: var(--textfont), "Font Awesome 6 Pro";
  width: 90%;
  margin-top: 3vh;
  height: 5vh;
  font-size: 2.5vh;
  border: 0.1vh solid var(--highlight);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.add-form-submit:hover,
.add-form-submit:active {
  background-color: var(--highlight);
  color: var(--background);
}

.add-form-cancel {
  font-family: var(--textfont), "Font Awesome 6 Pro";
  width: 90%;
  height: 5vh;
  font-size: 2.5vh;
  border: 0.1vh solid var(--highlight);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.add-form-cancel:hover,
.add-form-cancel:active {
  background-color: var(--highlight);
  color: var(--background);
}

.add-form-label {
  width: 90%;
  height: 5vh;
  font-size: 1.5vh;
  background-color: var(--background);
  color: var(--text);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 1vh;
}

.add-form-check {
  height: 3vh;
  aspect-ratio: 1/1;
}

#explist-label {
  height: 2vh;
}

.edit-form {
  position: absolute;
  width: 95%;
  height: 95%;
  background-color: var(--background);
  border: 0.1vh solid var(--highlight);
  cursor: pointer;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: start;
  -ms-flex-pack: start;
  justify-content: flex-start;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 0.5vh;
}

.edit-form-title {
  position: relative;
  top: 1vh;
  margin-bottom: 2vh;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  text-align: center;
}

.edit-form-input {
  width: 90%;
  height: 5vh;
  font-size: 2.5vh;
  background-color: var(--background);
  color: var(--text);
  border: 0.1vh solid var(--highlight);
}

.edit-items {
  margin-top: 1vh;
  width: 90%;
  height: 100%;
  padding: 0.5vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1vh;
  overflow-y: scroll;
  border: 0.2vh solid var(--highlight);
}

.editable-item {
  width: 100%;
  height: 4vh !important;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 4vh;
  flex: 0 0 4vh;
  border: 0.1vh solid var(--highlight);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.editable-item:hover {
  background-color: var(--highlight);
  color: var(--background);
}

.edit-form-input {
  width: 90%;
  height: 5vh;
  font-size: 2.5vh;
  background-color: var(--background);
  color: var(--text);
  border: 0.1vh solid var(--highlight);
}

.edit-form-submit {
  font-family: var(--textfont), "Font Awesome 6 Pro";
  margin-top: 3vh;
  width: 90%;
  height: 8vh;
  font-size: 2.5vh;
  border: 0.1vh solid var(--highlight);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.edit-form-submit:hover,
.edit-form-submit:active {
  background-color: var(--highlight);
  color: var(--background);
}

.edit-btns {
  width: 90%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 1vh;
}

.edit-form-cancel {
  font-family: var(--textfont), "Font Awesome 6 Pro";
  width: 100%;
  height: 5vh;
  font-size: 2.5vh;
  border: 0.1vh solid var(--highlight);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.edit-form-cancel:hover,
.edit-form-cancel:active {
  background-color: var(--highlight);
  color: var(--background);
}

.edit-form-del {
  font-family: var(--textfont), "Font Awesome 6 Pro";
  width: 100%;
  height: 5vh;
  font-size: 2.5vh;
  border: 0.1vh solid var(--delete);
  color: var(--delete);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-transition-duration: 350ms;
  transition-duration: 350ms;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.edit-form-del:hover,
.edit-form-del:active {
  border: 0.1vh solid var(--highlight);
  background-color: var(--highlight);
  color: var(--background);
  -webkit-transition-duration: 350ms;
  transition-duration: 350ms;
}

.del-confirm {
  width: 20% !important;
  color: var(--text) !important;
  background-color: var(--delete) !important;
  -webkit-transition-duration: 350ms;
  transition-duration: 350ms;
}

.edit-form-label {
  width: 90%;
  height: 5vh;
  font-size: 1.5vh;
  background-color: var(--background);
  color: var(--text);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 1vh;
}

.edit-form-check {
  height: 3vh;
  aspect-ratio: 1/1;
}

.edit-form-spec {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--background);
}

.editform {
  width: 100%;
  height: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: start;
  -ms-flex-pack: start;
  justify-content: flex-start;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 1vh;
  overflow-y: scroll;
}

#edit-explist-label {
  height: 1vh;
}

.cbselect {
  background-color: var(--highlight);
  color: var(--text) !important;
}

.form-cb {
  width: 87%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  padding: 0.5vh;
  text-align: center;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

.erlabel {
  height: 4vh;
  width: 100%;
  -webkit-box-flex: 1;
  -ms-flex: 1 1 50%;
  flex: 1 1 50%;
  padding-top: 0.5vh;
  padding-bottom: 0.5vh;
  color: var(--highlight);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.battle-sync-status {
  position: fixed;
  z-index: 1100;
  top: 1rem;
  left: 50%;
  max-width: min(32rem, calc(100vw - 2rem));
  padding: 0.65rem 1rem;
  transform: translateX(-50%);
  color: #f3ead7;
  background: #342f28;
  border: 1px solid #bca36b;
  border-radius: 0.25rem;
  font-size: 1rem;
  font-family: var(--textfont);
}

.battle-sync-status.is-error {
  border-color: #b94a48;
}

body.battle-view-player .dm-panel {
  top: 4rem;
  right: 1rem;
  bottom: auto;
  width: min(17rem, calc(100vw - 2rem));
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
}

.monster-catalog-status {
  min-height: 1.2em;
  padding: 0.25rem 0;
  font-size: 0.85rem;
}

body.battle-view-player .dmp-label {
  display: none;
}

body.battle-view-player .dmp-options {
  display: block;
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
}

body.battle-view-player .dmp-options > :not(.initiative) {
  display: none !important;
}

body.battle-view-player .initiative {
  max-height: calc(100vh - 8rem);
  padding: 0.75rem;
  box-sizing: border-box;
}

body.battle-view-player .initiative .r-mod,
body.battle-view-player .initiative .init-roll,
body.battle-view-player .initiative .hp,
body.battle-view-player .initiative .init-remove {
  display: none !important;
}

body.battle-view-player .initiative .roundheading,
body.battle-view-player .initiative .entrant {
  justify-content: center;
}

@media only screen and (max-width: 700px) {
  body.battle-view-player .dm-panel {
    top: 4.5rem;
    right: 0.5rem;
    width: min(15rem, calc(100vw - 1rem));
    max-height: calc(100vh - 5rem);
  }
}

body.bmBody .dm-panel {
  position: fixed;
  z-index: 125;
  top: 0.55rem;
  left: 0;
  bottom: auto;
  width: 100%;
  max-width: none;
  transform: none;
  pointer-events: none;
  overflow: visible;
  background: none;
  border: 0;
}

.dm-toolbar {
  display: flex;
  box-sizing: border-box;
  width: max-content;
  max-width: calc(100vw - 1rem);
  margin: 0 auto;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem;
  color: var(--text);
  background: var(--accent);
  border: 1px solid var(--highlight);
  border-radius: 0.45rem;
  box-shadow: 0 0.25rem 0.8rem rgb(0 0 0 / 35%);
  pointer-events: auto;
}

.dm-toolbar-divider {
  flex: 0 0 1px;
  align-self: stretch;
  margin: 0.2rem 0.2rem;
  background: var(--highlight);
  opacity: 0.45;
}

.dm-tool-button,
.initiative-pin,
.initiative-minimise,
.initiative-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  min-width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 0.3rem;
  font: inherit;
  cursor: pointer;
}

.dm-tool-button:hover,
.dm-tool-button:focus-visible,
.dm-tool-button.is-active,
.dm-tool-button[aria-pressed="true"],
.initiative-pin:hover,
.initiative-minimise:hover,
.initiative-close:hover {
  color: var(--background);
  background: var(--highlight);
}

.lasso-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100%;
  height: 100%;
  display: none;
  pointer-events: none;
}

.lasso-overlay.is-visible {
  display: block;
}

.lasso-overlay path {
  fill: color-mix(in srgb, var(--highlight) 20%, transparent);
  stroke: var(--highlight);
  stroke-width: 2;
  stroke-dasharray: 6 4;
}

body.lasso-active .battle-map-viewport,
body.lasso-active .battle-map-viewport .mapholder,
body.lasso-active .battle-map-viewport .bm-marker:not(.is-selected) {
  cursor: crosshair;
}

body.lasso-active .battle-map-viewport .bm-marker.is-selected {
  cursor: grab;
}

.bm-marker.is-selected,
body.battle-view-dm .bm-marker.is-creature-hover {
  outline: 2px solid var(--highlight);
  outline-offset: 3px;
  filter: drop-shadow(0 0 6px var(--highlight)) drop-shadow(0 0 12px var(--highlight));
}

.dm-tool-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.dmp-label {
  display: none !important;
}

.dmp-options {
  display: contents;
}

.dm-tool-popover {
  position: fixed;
  z-index: 126;
  top: 4.1rem;
  left: 50%;
  max-width: min(28rem, calc(100vw - 1rem));
  max-height: calc(100vh - 5rem);
  overflow: auto;
  padding: 0.75rem;
  color: var(--text);
  background: var(--accent);
  border: 1px solid var(--highlight);
  border-radius: 0.4rem;
  box-shadow: 0 0.3rem 1rem rgb(0 0 0 / 40%);
  pointer-events: auto;
}

.dm-buttons.dm-tool-popover {
  width: min(24rem, calc(100vw - 1rem));
  transform: translateX(-50%);
}

.dm-buttons .dmb-group {
  display: none;
}

.dm-buttons-form,
.dmb-form {
  display: block;
}

.dm-initiative-panel {
  position: fixed;
  z-index: 127;
  top: 4.5rem;
  right: 0.75rem;
  left: auto;
  box-sizing: border-box;
  width: min(22rem, calc(100vw - 1.5rem));
  max-width: none;
  max-height: calc(100vh - 5.25rem);
  padding: 0.75rem;
  overflow: auto;
  transform: none;
}

.dm-initiative-panel.is-pinned {
  cursor: default;
}

.dm-initiative-panel:not(.is-pinned) {
  top: 4.1rem;
  right: auto;
  left: 50%;
  transform: translateX(-50%);
}

.initiative-panel-heading {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: -0.75rem -0.75rem 0.65rem;
  padding: 0.35rem 0.45rem 0.35rem 0.75rem;
  color: var(--text);
  background: var(--accent);
  border-bottom: 1px solid var(--highlight);
  border-radius: calc(0.4rem - 1px) calc(0.4rem - 1px) 0 0;
  touch-action: none;
}

.initiative-panel-heading strong {
  flex: 1;
}

.initiative-pin,
.initiative-minimise,
.initiative-close {
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
}

.initiative-icon-maximise,
.initiative-minimise[aria-pressed="true"] .initiative-icon-minimise {
  display: none;
}

.initiative-minimise[aria-pressed="true"] .initiative-icon-maximise {
  display: block;
}

.dm-initiative-panel.is-minimised,
body.battle-view-player .dm-initiative-panel.is-minimised {
  width: 14rem;
  min-width: 0;
  max-width: calc(100vw - 1.5rem);
  max-height: none;
  padding: 0.4rem;
  overflow: visible;
}

.dm-initiative-panel.is-minimised .initiative-panel-heading {
  margin: -0.4rem -0.4rem 0.4rem;
  padding: 0.1rem 0.3rem 0.1rem 0.5rem;
  font-size: 0.8rem;
}

.dm-initiative-panel.is-minimised .initiative-pin,
.dm-initiative-panel.is-minimised .initiative-minimise,
.dm-initiative-panel.is-minimised .initiative-close {
  width: 1.5rem;
  min-width: 1.5rem;
  height: 1.5rem;
}

.dm-initiative-panel.is-minimised .initiative-columns,
.dm-initiative-panel.is-minimised .r-mod[data-task="add"],
.dm-initiative-panel.is-minimised .r-mod[data-task="subtract"],
.dm-initiative-panel.is-minimised .entrant:not(.your-turn):not(.is-next),
.dm-initiative-panel.is-minimised .entrant .init-roll,
.dm-initiative-panel.is-minimised .entrant .hp,
.dm-initiative-panel.is-minimised .entrant .init-remove,
body.battle-view-player .dm-initiative-panel.is-minimised .roundheading {
  display: none !important;
}

.dm-initiative-panel.is-minimised .roundheading {
  gap: 0.3rem;
  font-size: 0.75rem;
}

.dm-initiative-panel.is-minimised .roundheading .r-mod {
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
}

.dm-initiative-panel.is-minimised .initiative-panel-heading + .roundheading {
  margin-bottom: 0.3rem;
}

.dm-initiative-panel.is-minimised .order {
  gap: 0.3rem;
  padding-bottom: 0;
}

.dm-initiative-panel.is-minimised .entrant {
  width: 100%;
  padding: 0.25rem 0.4rem;
  align-items: center;
  font-size: 0.85rem;
}

.dm-initiative-panel.is-minimised .entrant.your-turn::before,
.dm-initiative-panel.is-minimised .entrant.is-next::before {
  flex: 0 0 auto;
  font-size: 0.65rem;
  text-transform: uppercase;
  opacity: 0.75;
}

.dm-initiative-panel.is-minimised .entrant.your-turn::before {
  content: "Now";
}

.dm-initiative-panel.is-minimised .entrant.is-next:not(.your-turn)::before {
  content: "Next";
}

.initiative-panel-heading .initiative-pin[aria-pressed="true"] {
  color: var(--highlight);
}

.initiative-panel-heading .initiative-close {
  font-size: 1.5rem;
}

.initiative-panel-heading:active {
  cursor: move;
}

.effects-panel {
  right: 1rem;
  left: auto;
  width: min(24rem, calc(100vw - 1rem));
}

.creature-stats {
  display: flex;
  gap: 0.6rem;
  margin: 0.5rem 0;
}

.creature-stats label {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.25rem;
}

.creature-stats .creature-count {
  flex: 0 0 3.5rem;
}

.creature-stats input,
.dm-buttons .form-obj-names {
  box-sizing: border-box;
  width: 100%;
  min-height: 2rem;
  padding: 0.2rem 0.4rem;
  font: inherit;
}

.dm-buttons .dmb-form-fields,
.dm-buttons .creature-stats {
  width: 100%;
}

.dm-buttons .radio-btn {
  flex-wrap: wrap;
}

.dm-buttons .radio-label {
  flex: 0 0 33.3333%;
  padding: 0.4rem 0.25rem;
  text-align: center;
}

.initiative-columns {
  display: flex;
  gap: 1vh;
  width: 90%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 0 1vh;
  color: var(--highlight);
  font-size: 0.75rem;
  text-align: center;
}

.initiative-columns span:nth-child(1),
.initiative-columns span:nth-child(2) {
  flex: 0 0 3rem;
}

.initiative-columns span:nth-child(3) {
  flex: 1;
  padding-left: 0.25rem;
  text-align: left;
}

.dm-initiative-panel .entrant .init-roll,
.dm-initiative-panel .entrant .hp {
  position: static;
  flex: 0 0 3rem;
  width: 3rem;
  min-width: 0;
  padding: 0.1rem;
  border: 1px solid var(--highlight);
}

.dm-initiative-panel .entrant .char-name {
  flex: 1;
  min-width: 0;
  align-self: center;
  overflow-wrap: anywhere;
}

.dm-initiative-panel .entrant {
  padding-right: 3rem;
  align-items: center;
}

.dm-initiative-panel .entrant .init-roll,
.dm-initiative-panel .entrant .hp {
  height: 2rem;
  flex: 0 0 auto;
}

.dm-initiative-panel .entrant .init-remove {
  top: 50%;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  transform: translateY(-50%);
}

.marker-health-control {
  display: grid;
  gap: 0.4rem;
  padding: 0.5rem;
  border-top: 1px solid var(--highlight);
}

.marker-health-input {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

.marker-health-input input {
  width: 4rem;
  min-height: 2rem;
  text-align: center;
}

.bm-health {
  position: absolute;
  z-index: 52;
  padding: 0.15rem 0.4rem;
  transform: translate(-50%, calc(var(--health-marker-height, var(--grid-cell)) / 2 + 0.25rem));
  color: var(--text);
  background: var(--background);
  border: 1px solid var(--highlight);
  border-radius: 0.25rem;
  font: 1.25rem/1.2 var(--textfont);
  white-space: nowrap;
  pointer-events: none;
}

.battle-drawing-transparent {
  opacity: 0.2 !important;
}

.player-initiative-prompt {
  position: fixed;
  z-index: 1500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgb(0 0 0 / 65%);
}

.player-initiative-card {
  box-sizing: border-box;
  width: fit-content;
  min-width: min(16rem, 100%);
  max-width: min(20rem, 100%);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: 1.25rem;
  font-family: var(--textfont);
  color: var(--text);
  background: var(--accent);
  border: 1px solid var(--highlight);
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 2rem rgb(0 0 0 / 50%);
}

.player-initiative-card h2 {
  margin-top: 0;
}

#player-initiative-wait {
  top: 3.75rem;
  max-width: min(30rem, calc(100vw - 2rem));
  text-align: center;
}

.player-character-open:disabled {
  opacity: 0.5;
  cursor: wait;
}

.player-character-choices {
  display: grid;
  gap: 0.4rem;
}

.player-character-open,
.player-initiative-entry button {
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  color: var(--text);
  background: var(--background);
  border: 1px solid var(--highlight);
  font: inherit;
  cursor: pointer;
}

.player-initiative-entry {
  display: grid;
  gap: 0.5rem;
}

.player-initiative-entry input {
  min-height: 2.5rem;
  font: inherit;
}

body.battle-view-player .dm-panel {
  top: 4.5rem;
  right: 0.75rem;
  left: auto;
  width: auto;
  max-width: none;
  transform: none;
  overflow: visible;
  pointer-events: none;
}

body.battle-view-player .dm-toolbar,
body.battle-view-player .dm-tool-popover:not(.dm-initiative-panel) {
  display: none !important;
}

body.battle-view-player .dm-initiative-panel {
  position: fixed;
  top: 4.5rem;
  right: 0.75rem;
  left: auto;
  display: block;
  width: fit-content;
  min-width: 11rem;
  max-width: min(16rem, calc(100vw - 1.5rem));
  max-height: calc(100vh - 5.25rem);
  transform: none;
  pointer-events: auto;
}

body.battle-view-player .initiative .order {
  align-items: stretch;
}

body.battle-view-player .initiative .entrant {
  width: 100%;
  padding-right: 1vh;
}

body.battle-view-player .initiative-panel-heading .initiative-pin,
body.battle-view-player .initiative .r-mod,
body.battle-view-player .initiative .init-roll,
body.battle-view-player .initiative .hp,
body.battle-view-player .initiative .init-remove,
body.battle-view-player .marker-health-control {
  display: none !important;
}

body.battle-view-player .initiative .roundheading,
body.battle-view-player .initiative .entrant {
  justify-content: center;
}

body.battle-view-player .initiative-columns,
body.battle-view-player .dmp-heading,
body.battle-view-player .dmp-options > :not(.initiative) {
  display: none !important;
}

@media (max-width: 600px) {
  body.bmBody .dm-panel {
    top: 0.35rem;
    max-width: calc(100vw - 0.5rem);
  }

  .dm-toolbar {
    gap: 0.05rem;
    padding: 0.2rem;
  }

  .dm-tool-button {
    width: 2.15rem;
    min-width: 2.15rem;
    height: 2.4rem;
  }

  .dm-initiative-panel {
    top: 3.8rem;
    right: 0.4rem;
    max-height: calc(100vh - 4.4rem);
  }
}

@media only screen and (max-width: 900px) {
  body.has-site-navigation.bmBody {
    flex-direction: column;
    align-items: stretch;
  }

  body.has-site-navigation.bmBody .battlemapbody {
    width: auto;
    min-width: 0;
    height: auto;
  }
}

/* Marker sizes follow the grid scale: one 5 ft square per medium marker. */
:root {
  --grid-cell: 32px;
}

.bm-marker {
  width: var(--grid-cell);
  height: var(--grid-cell);
}

.bm-marker.tiny {
  width: calc(var(--grid-cell) * 0.5);
  height: calc(var(--grid-cell) * 0.5);
}

.bm-marker.medium {
  width: var(--grid-cell);
  height: var(--grid-cell);
}

.bm-marker.large {
  width: calc(var(--grid-cell) * 2);
  height: calc(var(--grid-cell) * 2);
}

.bm-marker.huge {
  width: calc(var(--grid-cell) * 3);
  height: calc(var(--grid-cell) * 3);
}

.bm-marker.gargantuan {
  width: calc(var(--grid-cell) * 4);
  height: calc(var(--grid-cell) * 4);
}

.bm-marker.tiny + .bm-name + .bm-health { --health-marker-height: calc(var(--grid-cell) * 0.5); }
.bm-marker.large + .bm-name + .bm-health { --health-marker-height: calc(var(--grid-cell) * 2); }
.bm-marker.huge + .bm-name + .bm-health { --health-marker-height: calc(var(--grid-cell) * 3); }
.bm-marker.gargantuan + .bm-name + .bm-health { --health-marker-height: calc(var(--grid-cell) * 4); }

.scale-overlay {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  height: 100%;
  cursor: nwse-resize;
  touch-action: none;
}

.dm-scale-panel {
  width: min(18rem, calc(100vw - 1rem));
  transform: translateX(-50%);
}

.dm-scale-panel .scale-help,
.dm-walls-panel .scale-help {
  margin: 0.4rem 0;
}

.dm-walls-panel,
.dm-vision-panel {
  width: min(18rem, calc(100vw - 1rem));
  transform: translateX(-50%);
}

.walls-pan-help {
  margin: 0 0 .75rem;
  font: .9rem/1.3 var(--textfont);
}

.dm-vision-panel .vision-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.dm-vision-panel #vision-range {
  width: 5rem;
}

.dm-switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: 0 0 2.6rem;
  width: 2.6rem;
  height: 1.5rem;
  margin: 0;
  background: var(--background);
  border: 1px solid var(--highlight);
  border-radius: 0.45rem;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.dm-switch::before {
  content: "";
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1rem;
  height: 1rem;
  background: var(--text);
  border-radius: 0.3rem;
  transition: transform 120ms ease, background-color 120ms ease;
}

.dm-switch:checked {
  background: var(--highlight);
}

.dm-switch:checked::before {
  background: var(--background);
  transform: translateX(1.1rem);
}

.dm-switch:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.dm-switch:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.scale-actions .walls-confirm {
  color: var(--highlight);
}

.scale-actions .walls-undo {
  color: var(--text);
}

.scale-actions .walls-clear {
  color: var(--delete);
}

.walls-modes {
  margin-bottom: 0.5rem;
}

.scale-actions .walls-modes button,
.walls-modes button {
  color: var(--text);
}

.walls-line-icon {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
  vertical-align: middle;
}

.walls-modes button[aria-pressed="true"] {
  color: var(--background);
  background: var(--highlight);
  border-color: var(--highlight);
}

.smart-settings {
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.smart-settings[hidden],
.smart-edges[hidden] {
  display: none;
}

.smart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.3rem 0;
}

.smart-radius,
.smart-grip {
  min-width: 0;
  width: 6rem;
  flex: 1;
}

.smart-area-help {
  margin: 0.35rem 0;
}

.walls-eraser-size {
  min-width: 0;
  width: 6rem;
  flex: 1;
}

.walls-eraser-settings[hidden] {
  display: none;
}

.smart-radius-value,
.smart-grip-value {
  min-width: 2.5rem;
  text-align: right;
}

.smart-status {
  margin: 0.4rem 0;
}

.smart-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  pointer-events: none;
}

.wall-overlay path.smart-preview {
  stroke: #00e1ff;
  stroke-width: 2;
  stroke-dasharray: none;
  pointer-events: none;
}

.scale-actions .walls-cancel {
  color: var(--text);
}

.fog-canvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

body:not(.battle-view-player) .fog-canvas {
  opacity: 0.5;
}

.fog-canvas.fog-pending {
  background: #000;
}

body.battle-view-player.character-vision-pending .battle-map-viewport .map-elements-holder {
  visibility: hidden;
}

body:not(.battle-view-player) .fog-canvas.fog-pending {
  display: none;
}

.wall-overlay {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 21;
  display: none;
  width: 100%;
  height: 100%;
  pointer-events: none;
  touch-action: none;
}

.wall-overlay.is-visible {
  display: block;
}

.wall-overlay.is-editing {
  pointer-events: auto;
  cursor: crosshair;
}

.wall-overlay.is-editing.is-erasing {
  cursor: cell;
}

.wall-overlay path {
  fill: none;
  stroke: var(--highlight);
  stroke-width: 4;
  stroke-dasharray: 10 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.wall-overlay path.wall-traversal-path {
  stroke: var(--accent);
}

.scale-actions {
  display: flex;
  gap: 0.5rem;
}

.scale-actions button {
  flex: 1;
  min-height: 2.2rem;
  font-size: 1.1rem;
  cursor: pointer;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 0.3rem;
}

.scale-actions .scale-confirm {
  color: var(--highlight);
}

.scale-actions .scale-cancel {
  color: var(--delete);
}

/* Scenes: DM toolbar list, load dialog and scene builder */
.dm-scenes-panel {
  width: min(22rem, calc(100vw - 1rem));
  max-height: min(70vh, 32rem);
  overflow-y: auto;
  transform: translateX(-50%);
}

.scene-add-actions {
  display: flex;
  gap: 0.4rem;
  margin: 0.4rem 0;
}

.scene-add,
.scene-add-folder {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  color: var(--highlight);
  background: transparent;
  text-decoration: none;
  border: 1px dashed var(--highlight);
  border-radius: 0.3rem;
  cursor: pointer;
  font: inherit;
}

.scene-add:hover,
.scene-add:focus-visible,
.scene-add-folder:hover,
.scene-add-folder:focus-visible {
  color: var(--background);
  background: var(--highlight);
}

.scene-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.scene-folder-help,
.scene-folder-error {
  margin: 0.4rem 0;
  font-size: 0.85rem;
}

.scene-folder-error {
  color: var(--delete);
}

.scene-folder-error:empty {
  display: none;
}

.scene-folder-header {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--highlight);
  border-radius: 0.3rem;
}

.scene-folder-toggle {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem;
  color: var(--text);
  text-align: left;
  overflow-wrap: anywhere;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.scene-folder-children:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.4rem 0 0 0.75rem;
}

.scene-root-drop {
  display: none;
  padding: 0.5rem;
  border: 1px dashed var(--highlight);
  border-radius: 0.3rem;
}

.scene-list.is-dragging .scene-root-drop {
  display: block;
}

.scene-root-drop.is-dragover,
.scene-folder-header.is-dragover {
  background: color-mix(in srgb, var(--highlight) 30%, transparent);
}

.scene-item {
  position: relative;
  display: flex;
  align-items: stretch;
}

.scene-order-list {
  display: flex;
  flex-direction: column;
}

.scene-drop-slot {
  position: relative;
  height: 0.4rem;
  flex: 0 0 0.4rem;
  transition: height 120ms ease, flex-basis 120ms ease;
}

.scene-list.is-dragging .scene-drop-slot.is-dragover {
  height: 1rem;
  flex-basis: 1rem;
}

.scene-drop-slot.is-dragover::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 2px;
  background: var(--highlight);
  transform: translateY(-50%);
}

.scene-item.is-drag-source,
.scene-folder-header.is-drag-source {
  opacity: 0.45;
}

@media (prefers-reduced-motion: reduce) {
  .scene-drop-slot {
    transition: none;
  }
}

.scene-load {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--highlight);
  border-radius: 0.3rem;
  font: inherit;
}

.scene-load:hover,
.scene-load:focus-visible {
  background: color-mix(in srgb, var(--highlight) 20%, transparent);
}

.scene-thumb {
  flex: none;
  width: 6.5rem;
  height: 4rem;
  object-fit: cover;
  background: #000;
  border-radius: 0.2rem;
}

.scene-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  font-weight: bold;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

.scene-current {
  font-size: 0.75rem;
  font-weight: normal;
  color: var(--highlight);
}

.scene-edit {
  position: absolute;
  top: 0.3rem;
  right: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 0.3rem;
}

.scene-move,
.scene-folder-move {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.3rem;
  cursor: pointer;
}

.scene-move {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
}

.scene-folder-move {
  align-self: center;
  margin: 0.3rem;
}

.scene-move:hover,
.scene-move:focus-visible,
.scene-folder-move:hover,
.scene-folder-move:focus-visible {
  color: var(--highlight);
  border-color: var(--highlight);
}

.scene-load {
  padding-right: 4rem;
}

.scene-edit:hover,
.scene-edit:focus-visible {
  color: var(--highlight);
  border-color: var(--highlight);
}

.scene-empty {
  margin: 0.4rem 0;
  opacity: 0.8;
}

.scene-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 60%);
}

.scene-dialog {
  box-sizing: border-box;
  width: min(26rem, calc(100vw - 1rem));
  padding: 1rem;
  color: var(--text);
  background: var(--background);
  border: 1px solid var(--highlight);
  border-radius: 0.5rem;
}

.scene-dialog h2 {
  margin: 0 0 0.5rem;
}

.scene-dialog-name {
  box-sizing: border-box;
  width: 100%;
  margin-bottom: 0.6rem;
}

.scene-folder-select {
  box-sizing: border-box;
  width: 100%;
  margin-bottom: 0.6rem;
}

.scene-dialog-name.is-invalid {
  outline: 2px solid var(--delete);
}

.scene-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.scene-dialog-actions button {
  flex: 1;
  min-height: 2.2rem;
  padding: 0 0.6rem;
  cursor: pointer;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 0.3rem;
  font: inherit;
}

.scene-dialog-save {
  color: var(--highlight);
}

.scene-dialog-skip {
  color: var(--text);
}

.scene-dialog-cancel {
  color: var(--delete);
}

.scene-dialog-actions button:disabled {
  opacity: 0.5;
  cursor: default;
}

.sb-scene-name {
  box-sizing: border-box;
  width: 11rem;
  min-width: 8rem;
  height: 2.2rem;
}

.sb-add-panel {
  width: min(22rem, calc(100vw - 1rem));
  transform: translateX(-50%);
}

.sb-add-panel.is-poi .creature-stats {
  display: none;
}

.sb-poi-image {
  display: none;
}

.sb-add-panel.is-poi .sb-poi-image {
  display: block;
}

.poi-image-widget {
  margin: 0.4rem 0;
  font-size: 0.8rem;
}

.poi-image-drop {
  position: relative;
  display: block;
  padding: 0.5rem;
  border: 1px dashed var(--highlight);
  border-radius: 4px;
  text-align: center;
  cursor: pointer;
}

.poi-image-drop:hover,
.poi-image-drop.is-over,
.poi-image-drop:focus-within {
  background-color: var(--highlight);
  color: var(--background);
}

.poi-image-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.poi-image-status {
  margin-top: 0.25rem;
  overflow-wrap: anywhere;
}

.poi-image-remove {
  margin-top: 0.25rem;
}

.dm-spawn-panel {
  width: min(18rem, calc(100vw - 1rem));
  transform: translateX(-50%);
}

.scale-actions .spawn-confirm {
  color: var(--highlight);
}

.scale-actions .spawn-clear {
  color: var(--delete);
}

.sb-delete {
  color: var(--delete);
}

.sb-spawn {
  position: absolute;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--highlight);
  font-size: 28px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  text-shadow: 0 0 4px #000, 0 0 2px #000;
}

.sb-spawn.hide {
  display: none;
}

body.scene-builder .mapholder.bm-dm-add,
body.scene-builder .mapholder.sb-spawn-mode {
  cursor: crosshair;
}

body.scene-builder .bm-marker {
  cursor: grab;
}

.sb-prompt {
  display: flex;
  min-height: 100vh;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  padding: 4.5rem 1rem 1rem;
}

.sb-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(34rem, 100%);
  padding: 1.25rem;
  color: var(--text);
  background: var(--accent);
  border: 1px solid var(--highlight);
  border-radius: 0.5rem;
}

.sb-card h1 {
  margin: 0 0 0.25rem;
}

.sb-card input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.4rem;
}

.sb-dropzone {
  position: relative;
  display: flex;
  min-height: 10rem;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  border: 2px dashed var(--highlight);
  border-radius: 0.4rem;
}

.sb-dropzone.is-over {
  background: color-mix(in srgb, var(--highlight) 20%, transparent);
}

.sb-dropzone:hover,
.sb-dropzone.is-over {
  box-shadow: 0 0 .75rem var(--highlight);
}

.sb-dropzone:focus-visible,
.sb-dropzone:has(input:focus-visible) {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
}

.sb-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.sb-dropzone-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  padding: 1rem;
  font-size: 1.05rem;
}

.sb-dropzone-text i {
  font-size: 2rem;
  color: var(--highlight);
}

.sb-dropzone.has-image .sb-dropzone-text {
  display: none;
}

.sb-preview {
  display: block;
  width: 100%;
  max-height: 16rem;
  object-fit: contain;
}

.sb-preview.hide {
  display: none;
}

.sb-error {
  margin: 0;
  color: var(--delete);
}

.sb-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.sb-actions .sb-back,
.sb-actions .sb-create {
  display: inline-flex;
  flex: 0 0 auto;
  width: auto;
  min-height: 2.4rem;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 0.3rem;
  font: inherit;
  text-decoration: none;
}

.sb-actions .sb-back {
  color: var(--delete);
}

.sb-actions .sb-create {
  color: var(--highlight);
}

.sb-actions .sb-create:disabled {
  opacity: 0.5;
  cursor: default;
}

.battle-placement-toast.is-error {
  color: var(--delete);
}

.bm-marker.marker-hidden,
.bm-name.marker-hidden,
.bm-health.marker-hidden {
  opacity: 0.4;
}

body.battle-view-player .marker-hidden {
  display: none !important;
}

/* Keep glyphs and icons visually centred in every button-like control */
button,
.button,
.exit,
.player-exit,
.map-archive-exit,
.font-explain-exit,
.close-ann-form,
.add-close,
.map-description-close,
.site-nav-close,
.battle-tool-close,
.initiative-close,
.initiative-pin,
.initiative-minimise,
.dm-tool-button {
  text-align: center;
}

.map-description-close,
.close-ann-form,
.exit,
.player-exit,
.map-archive-exit,
.font-explain-exit,
.site-nav-close,
.battle-tool-close,
.initiative-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.map-description-close {
  box-sizing: border-box;
}

/* Player card actions and delete confirmation */
.player-card-actions {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.25rem;
}

.player-card-name {
  padding-right: 4.5rem;
}

.player-card-edit,
.player-card-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 0.3rem;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.player-card-edit:hover,
.player-card-edit:focus-visible {
  color: var(--background);
  background: var(--highlight);
}

.player-card-delete {
  color: #e5484d;
}

.player-card-delete:hover,
.player-card-delete:focus-visible {
  color: #fff;
  background: #e5484d;
}

.player-delete-modal {
  position: fixed;
  inset: 0;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
}

.player-delete-box {
  width: min(24rem, 100%);
  padding: 1.25rem;
  text-align: center;
  color: var(--text);
  background: var(--background);
  border: 1px solid var(--highlight);
  border-radius: 12px;
  pointer-events: auto;
}

.player-delete-box h2 {
  margin: 0 0 0.75rem;
  color: var(--highlight);
  font-family: var(--titlefont);
}

.player-delete-error {
  min-height: 1.2em;
  color: #e5484d;
}

.player-delete-buttons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.player-delete-buttons button {
  min-width: 5rem;
  padding: 0.5rem 1rem;
  color: var(--text);
  background: var(--background);
  border: 1px solid var(--highlight);
  border-radius: 0.3rem;
  cursor: pointer;
}

.player-delete-buttons .player-delete-yes {
  color: #fff;
  background: #c4343a;
  border-color: #c4343a;
}

.player-delete-buttons button:hover,
.player-delete-buttons button:focus-visible {
  color: var(--background);
  background: var(--highlight);
}

/* Map directory, map pages and map modals */
.map-description-close-glyph {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
  font-size: 0;
  line-height: 0;
  color: transparent;
}

.map-description-close-glyph::before,
.map-description-close-glyph::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

.map-description-close-glyph::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.map-description-close-glyph::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.map-tree-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.map-tree-dragging { opacity: .4; }
.map-tree-drop-target.drop-inside { outline: 2px solid var(--highlight); outline-offset: 2px; }
.map-tree-drop-target.drop-before { box-shadow: 0 -3px var(--highlight); }
.map-tree-drop-target.drop-after { box-shadow: 0 3px var(--highlight); }
.map-tree-move { cursor: grab; }
.map-tree-move:active { cursor: grabbing; }
#map-move-form select {
  width: 100%;
  padding: .5rem;
  color: var(--text);
  background: var(--accent);
  border: 1px solid var(--highlight);
  font: inherit;
}

.map-tree-row > .map-tree-item {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

button.map-tree-item {
  background: transparent;
  font-size: inherit;
  cursor: pointer;
}

.map-tree-item.is-current,
.map-tree-item.is-picked {
  border-color: var(--highlight);
  background-color: var(--accent);
  font-weight: bold;
}

.map-tree-actions {
  display: none;
  flex: 0 0 auto;
  gap: 0.15rem;
  margin-left: auto;
}

body.map-editing .map-tree-actions {
  display: flex;
}

.map-edit-toggle {
  position: fixed;
  top: 0.5rem;
  right: 0.75rem;
  z-index: 22;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: var(--text);
  background: var(--accent);
  border: 1px solid var(--highlight);
  border-radius: 0.25rem;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.map-edit-toggle:hover,
.map-edit-toggle:focus-visible,
.map-edit-toggle[aria-pressed="true"] {
  color: var(--background);
  background: var(--highlight);
}

.map-tree-action,
.map-location-edit,
.map-location-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 0.3rem;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.map-tree-edit:hover,
.map-tree-edit:focus-visible,
.map-location-edit:hover,
.map-location-edit:focus-visible {
  color: var(--background);
  background: var(--highlight);
}

.map-tree-delete,
.map-location-delete {
  color: #e5484d;
}

.map-tree-delete:hover,
.map-tree-delete:focus-visible,
.map-location-delete:hover,
.map-location-delete:focus-visible {
  color: #fff;
  background: #e5484d;
}

.maplinksbody .maporg {
  padding-bottom: 7rem;
}

.map-modal-cover {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(0, 0, 0, 0.6);
}

.map-modal {
  position: fixed;
  inset: 0;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: auto;
  pointer-events: none;
}

.map-modal-box {
  box-sizing: border-box;
  width: min(30rem, 100%);
  max-height: 100%;
  overflow: auto;
  padding: 1.25rem;
  color: var(--text);
  background: var(--background);
  border: 1px solid var(--highlight);
  border-radius: 12px;
  pointer-events: auto;
}

.map-modal-box h2 {
  margin: 0 0 1rem;
  text-align: center;
  color: var(--highlight);
  font-family: var(--titlefont);
}

.map-modal-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  text-align: left;
}

.map-modal-field input[type="text"],
.map-modal-field textarea,
.map-edit-field input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  padding: 0.5rem;
  color: var(--text);
  background: var(--accent);
  border: 1px solid var(--highlight);
  border-radius: 0.3rem;
  font: inherit;
}

.map-modal-field textarea {
  resize: vertical;
}

.map-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 5rem;
  padding: 1rem;
  text-align: center;
  border: 2px dashed var(--highlight);
  border-radius: 0.5rem;
  cursor: pointer;
}

.map-dropzone.is-dragover,
.map-dropzone.has-file {
  background: var(--accent);
}

.map-dropzone:hover,
.map-dropzone.is-dragover {
  box-shadow: 0 0 .75rem var(--highlight);
}

@media (prefers-reduced-motion: no-preference) {
  .dmcp-dropzone, .sb-dropzone, .map-dropzone {
    transition: box-shadow 150ms ease;
  }
}

.map-dropzone:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
}

.map-location-image-preview {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 .6rem;
}
.map-location-image-preview[hidden] { display: none; }
.map-location-image-preview img {
  display: block;
  max-width: 100%;
  max-height: 10rem;
  border-radius: .4rem;
}
.map-location-image-remove {
  position: absolute;
  top: -.5rem;
  right: -.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #d62f35;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
  cursor: pointer;
}
.map-location-image-remove:hover,
.map-location-image-remove:focus-visible {
  background: #f04449;
}
.map-location-image-remove:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
}

.map-dropzone.has-file {
  border-style: solid;
}

.map-parent-picker {
  max-height: 12rem;
  overflow: auto;
  padding: 0.35rem;
  border: 1px solid var(--highlight);
  border-radius: 0.3rem;
}

.map-modal-error,
.map-edit-status {
  min-height: 1.2em;
  margin: 0 0 0.75rem;
  color: #e5484d;
  text-align: center;
}

.map-modal-note {
  margin: 0 0 0.75rem;
  text-align: center;
}

.map-modal-buttons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.map-modal-save,
.map-modal-cancel,
.map-modal-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5rem;
  padding: 0.5rem 1rem;
  color: var(--text);
  background: var(--background);
  border: 1px solid var(--highlight);
  border-radius: 0.3rem;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.map-modal-danger {
  color: #fff;
  background: #c4343a;
  border-color: #c4343a;
}

.map-modal-save:hover,
.map-modal-save:focus-visible,
.map-modal-cancel:hover,
.map-modal-cancel:focus-visible {
  color: var(--background);
  background: var(--highlight);
}

.map-modal-save:disabled,
.map-modal-danger:disabled {
  opacity: 0.6;
  cursor: wait;
}

body.mapbody.map-page,
body.mapbody.map-page .map-page-title,
body.mapbody.map-page .map-panel-toggle,
body.mapbody.map-page .map-description-panel,
body.mapbody.map-page .map-edit-bar,
body.mapbody.map-page .site-nav-toggle {
  touch-action: pan-x pan-y;
}

body.mapbody.map-page .map-elements-holder {
  touch-action: none;
}

body.mapbody.map-page {
  padding: 76px 17rem 20px 24px;
}

body.mapbody.map-page.map-panel-collapsed {
  padding-right: 24px;
}

body.mapbody.map-page-editing {
  padding-top: 9.5rem;
}

.map-page-title {
  position: fixed;
  top: 0.6rem;
  left: 50%;
  z-index: 20;
  box-sizing: border-box;
  max-width: calc(100vw - 24rem);
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-family: var(--titlefont);
  font-size: 1.8rem;
  line-height: 1.3;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}

.map-page-title-static {
  position: static;
  max-width: none;
  margin-bottom: 1rem;
  transform: none;
  white-space: normal;
}

.map-side-panel {
  position: fixed;
  top: 4.25rem;
  bottom: 1rem;
  z-index: 20;
  box-sizing: border-box;
  width: 15.5rem;
  padding: 0.75rem;
  overflow: auto;
  color: var(--text);
  background: var(--accent);
  border: 1px solid var(--highlight);
  border-radius: 0.5rem;
  touch-action: pan-y;
}

#map-side-panel {
  right: 0.75rem;
  font-family: var(--textfont);
}

#map-side-panel .map-side-heading {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--highlight);
}

body.map-panel-collapsed #map-side-panel {
  display: none;
}

.map-panel-toggle {
  position: fixed;
  top: 0.5rem;
  right: 0.75rem;
  z-index: 22;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: var(--text);
  background: var(--accent);
  border: 1px solid var(--highlight);
  border-radius: 0.25rem;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.map-panel-toggle:hover,
.map-panel-toggle:focus-visible {
  color: var(--background);
  background: var(--highlight);
}

.map-side-panel .map-tree-item {
  min-height: 2.2rem;
  padding: 0.3rem 0.5rem;
  font-size: 0.95rem;
}

.map-side-panel .map-tree-children {
  margin-left: 0.6rem;
  padding-left: 0.4rem;
}

.map-side-heading {
  margin: 0 0 0.6rem;
  color: var(--highlight);
  font-family: var(--titlefont);
  font-size: 1.1rem;
}

.map-location-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.map-location-item {
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 0.25rem;
}

.map-location-item:hover {
  border-color: var(--highlight);
}

.map-location-item.is-selected {
  border-color: var(--highlight);
  background: var(--background);
  box-shadow: 0 0 8px var(--highlight);
}

.map-location-name {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.4rem 0.5rem;
  color: var(--text);
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.map-location-actions {
  display: none;
  flex: 0 0 auto;
  gap: 0.15rem;
  padding-right: 0.2rem;
}

.map-location-item.is-selected .map-location-actions {
  display: flex;
}

.map-location-empty {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  text-align: center;
  opacity: 0.8;
}

.map-location-item.is-new {
  animation: map-item-grow 0.5s ease-out;
}

.marker.map-marker-grow {
  animation: map-marker-grow 0.7s ease-out;
}

@keyframes map-item-grow {
  from {
    opacity: 0;
    transform: scale(0.2);
    max-height: 0;
  }

  to {
    opacity: 1;
    transform: scale(1);
    max-height: 6rem;
  }
}

@keyframes map-marker-grow {
  from {
    scale: 0;
    opacity: 0;
  }

  60% {
    scale: 1.5;
    opacity: 1;
  }

  to {
    scale: 1;
    opacity: 1;
  }
}

.map-edit-bar {
  position: fixed;
  top: 3.4rem;
  left: 50%;
  z-index: 21;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem 0.75rem;
  box-sizing: border-box;
  width: min(48rem, calc(100vw - 24rem));
  min-width: 18rem;
  padding: 0.6rem 0.8rem;
  color: var(--text);
  background: var(--accent);
  border: 1px solid var(--highlight);
  border-radius: 0.5rem;
  transform: translateX(-50%);
}

.map-edit-field {
  display: flex;
  flex: 1 1 10rem;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
}

.map-edit-dropzone {
  flex: 2 1 12rem;
  min-height: 2.6rem;
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
}

.map-edit-buttons {
  display: flex;
  gap: 0.5rem;
}

.map-edit-hint,
.map-edit-status {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.8rem;
  text-align: center;
}

.map-edit-status {
  min-height: 0;
}

.map-page-editing .marker {
  cursor: move;
}

@media (max-width: 1000px) {
  body.mapbody.map-page {
    padding: 7rem 12px 12px;
  }

  body.mapbody.map-page.map-panel-collapsed {
    padding-right: 12px;
  }

  body.mapbody.map-page-editing {
    padding-top: 17rem;
  }

  #map-side-panel {
    z-index: 25;
    width: min(15.5rem, calc(100vw - 1.5rem));
  }

  body.mapbody.map-page .map-page-title {
    top: 3.6rem;
    left: 0.75rem;
    right: 0.75rem;
    max-width: none;
    font-size: 1.4rem;
    transform: none;
  }

  .map-edit-bar {
    top: 6.3rem;
    width: calc(100vw - 1.5rem);
    min-width: 0;
  }
}

@media (max-width: 700px) {
  .site-nav-toggle-text {
    display: none;
  }

  .site-nav-toggle {
    justify-content: center;
    width: 2.75rem;
    padding: 0;
  }
}

/* DM placement confirmation: clear the close button and enlarge its x */
.battlemap-form.dm-annotate {
  padding: 2.25rem 1rem 1rem;
}

.battlemap-form .close-ann-form {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 1.3rem;
}

/* Shared drawn x, independent of font metrics. */
.ui-xmark {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 0.9rem;
  height: 0.9rem;
}

.ui-xmark::before,
.ui-xmark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.ui-xmark::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.ui-xmark::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.exit-btn,
.walls-cancel,
.scale-cancel,
.aoeClear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

/* DM toolbar: rounded scrollbar track matching the toolbar corners */
.dm-toolbar::-webkit-scrollbar {
  height: 0.5rem;
}

.dm-toolbar::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 0 0 0.45rem 0.45rem;
}

.dm-toolbar::-webkit-scrollbar-thumb {
  background: var(--highlight);
  border-radius: 0.25rem;
}

@supports not selector(::-webkit-scrollbar) {
  .dm-toolbar {
    scrollbar-width: thin;
    scrollbar-color: var(--highlight) transparent;
  }
}

/* Dice roller: panel hugs the scaled dice holder */
.battle-tool-panels.is-compact.is-dice {
  width: min(11.75rem, calc(100vw - 1rem));
}

.battle-tool-panel .diceholder {
  width: calc(100% / 0.6 - 2px);
  border-width: 2px;
}

/* Player initiative prompt dice roll */
.player-initiative-roll-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.battle-effects-icon {
  display: block;
  width: 1.5em;
  height: 1.5em;
}

.player-initiative-modifier {
  font-weight: bold;
}

.player-initiative-roll {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  min-height: 0;
  padding: 0;
  color: var(--highlight);
  background: var(--background);
  border: 1px solid var(--highlight);
  font-size: 1.25rem;
  cursor: pointer;
}

.player-initiative-roll:hover,
.player-initiative-roll:focus-visible {
  color: var(--background);
  background: var(--highlight);
}

/* Colour labels, marker stat popup and AC field */
.battle-tool-button[hidden] {
  display: none;
}

.battle-tool-icon-img {
  display: block;
  width: 1.6rem;
  height: 1.6rem;
  object-fit: contain;
}

.colour-legend-list {
  display: grid;
  gap: 0.5rem;
}

.colour-legend-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.colour-legend-swatch {
  flex: 0 0 auto;
  display: inline-block;
  width: 1.6rem;
  height: 1.6rem;
  box-sizing: border-box;
  border: 1px solid var(--text);
  border-radius: 0.2rem;
}

.colour-legend-input {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  height: 2rem;
  padding: 0 0.5rem;
  color: var(--text);
  background: var(--accent);
  border: 1px solid var(--highlight);
  font-family: var(--textfont);
}

.marker-colour-labels {
  display: grid;
  gap: 0.2rem;
  padding: 0.35rem 0.5rem;
  color: var(--text);
  font-family: var(--textfont);
  font-size: 0.85rem;
}

.marker-colour-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.marker-colour-label .colour-legend-swatch {
  width: 0.8rem;
  height: 0.8rem;
}

.marker-stat-popup {
  position: fixed;
  z-index: 3000;
  padding: 0.35rem 0.5rem;
  color: var(--text);
  background: var(--background);
  border: 1px solid var(--highlight);
  border-radius: 0.35rem;
  box-shadow: 0 0.25rem 0.75rem rgb(0 0 0 / 45%);
  font-family: var(--textfont);
  pointer-events: none;
}

.marker-stat-table {
  border-collapse: collapse;
  text-align: center;
}

.marker-stat-table th {
  padding: 0 0.4rem;
  color: var(--highlight);
  font-size: 0.7rem;
  font-weight: normal;
}

.marker-stat-table td {
  padding: 0 0.4rem;
  color: var(--text);
  font-size: 0.9rem;
}

/* Character portraits */
.player-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 12px;
}

.player-card-header .player-card-name {
  margin: 0;
  min-width: 0;
}

.player-card-portrait {
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
  object-fit: cover;
  border: 2px solid var(--highlight);
  border-radius: 0.5rem;
}

.players-page.is-stacked .player-card-stat-groups {
  grid-template-columns: 1fr;
  gap: 10px;
}

.players-page.is-stacked .player-identity-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.player-image-field {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.player-image-preview-holder {
  position: relative;
  flex: 0 0 auto;
}

.player-image-preview-toggle {
  display: block;
  padding: 0;
  border: 0;
  border-radius: .5rem;
  background: transparent;
  cursor: pointer;
}
.player-image-preview-toggle:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 3px;
}
.player-image-preview {
  display: block;
  width: 4rem;
  height: 4rem;
  object-fit: cover;
  border: 2px solid var(--highlight);
  border-radius: 0.5rem;
}

.player-image-upload {
  position: relative;
  display: grid;
  gap: .35rem;
  padding: 1rem;
  border-radius: .4rem;
  background: var(--background);
  overflow-wrap: anywhere;
}
.player-image-upload-title { font-weight: bold; }
.player-image-upload-hint { font-size: .85rem; }
.player-image-upload input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.player-image-upload:focus-within {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
}

.player-image-remove {
  position: absolute;
  top: -.5rem;
  right: -.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 1px solid var(--highlight);
  border-radius: 50%;
  color: var(--text);
  background: var(--background);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
}
.player-image-preview-holder:hover .player-image-remove,
.player-image-preview-holder:focus-within .player-image-remove,
.player-image-preview-holder.is-active .player-image-remove {
  opacity: 1;
  pointer-events: auto;
}
.player-image-remove:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
}

.battle-tool-panel .char-row {
  display: flex;
  align-items: stretch;
  flex: 0 0 auto;
}

.battle-tool-panel .char-row .char-box {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

.bm-marker.has-portrait {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-origin: border-box;
  background-clip: border-box;
  border: 2px solid #2a2a2a !important;
  color: transparent !important;
  text-shadow: none;
  filter: drop-shadow(4px 4px 4px rgba(0, 0, 0, 0.75));
}

.bm-marker.has-portrait:hover {
  background-color: var(--text);
}

.map-archive-open {
  position: fixed;
  top: 3.75rem;
  right: 0.75rem;
  z-index: 22;
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: var(--text);
  background: var(--accent);
  border: 1px solid var(--highlight);
  border-radius: 0.25rem;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

body.map-editing .map-archive-open {
  display: inline-flex;
}

.map-archive-open:hover,
.map-archive-open:focus-visible {
  color: var(--background);
  background: var(--highlight);
}

.map-archive-list {
  margin: 0 0 1rem;
  padding: 0;
  max-height: 50vh;
  overflow-y: auto;
  list-style: none;
}

.map-archive-children {
  margin: 0;
  padding-left: 1.5rem;
  list-style: none;
}

.map-archive-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--highlight);
}

.map-archive-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.map-archive-context .map-archive-name { opacity: .7; }

.map-archive-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.15rem;
}

.map-archive-actions button,
.map-archive-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 0.3rem;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}

.map-archive-actions button:hover,
.map-archive-actions button:focus-visible,
.map-archive-actions a:hover,
.map-archive-actions a:focus-visible {
  color: var(--background);
  background: var(--highlight);
}

.map-modal,
.map-modal-box,
.map-modal-box input,
.map-modal-box textarea,
.map-modal-box button,
.map-modal-box a {
  font-family: var(--textfont);
}

.map-modal-box h2 {
  font-family: var(--titlefont);
}

.map-archive-actions .map-archive-purge {
  color: var(--delete);
}

.map-archive-actions .map-archive-purge:hover,
.map-archive-actions .map-archive-purge:focus-visible {
  color: var(--background);
  background: var(--delete);
}

.map-tree-chevron {
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  margin: 0 -0.15rem 0.2rem 0;
  border-right: 2px solid var(--highlight);
  border-bottom: 2px solid var(--highlight);
  transform: rotate(45deg);
  transition: transform 0.15s;
}

.map-tree-item[aria-expanded="true"] > .map-tree-chevron {
  margin: 0.25rem -0.15rem 0 0;
  transform: rotate(225deg);
}

/* Menu text shouldn't get selected by double-clicks */
.site-nav-toggle,
.site-sidebar,
.site-nav-backdrop {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Small screens: the placement confirmation needs a usable width */
@media (max-width: 700px) {
  .battlemap-form.dm-annotate {
    width: min(16rem, calc(100vw - 1.5rem));
    max-width: calc(100vw - 1.5rem);
    box-sizing: border-box;
    font-size: 1rem;
  }

  .battlemap-form.dm-annotate .text {
    display: block;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* DM initiative panel: stay inside the visible viewport (dvh excludes mobile browser bars) */
body.bmBody .dm-initiative-panel {
  max-height: calc(100vh - 5.25rem);
  max-height: calc(100dvh - 5.25rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.bmBody .dm-initiative-panel:not(.is-pinned) {
  max-height: calc(100vh - 4.75rem);
  max-height: calc(100dvh - 4.75rem);
}

body.bmBody .dm-initiative-panel .initiative {
  max-height: none;
  overflow-y: visible;
}

@media (max-width: 600px) {
  body.bmBody .dm-initiative-panel,
  body.bmBody .dm-initiative-panel:not(.is-pinned) {
    max-height: calc(100vh - 4.4rem);
    max-height: calc(100dvh - 4.4rem);
  }
}

/* Effects panel: description, end round and Add on one line */
.effects-panel .add-effect {
  align-items: stretch;
  gap: 0.35rem;
}

.effects-panel .add-effect .add-input {
  box-sizing: border-box;
  height: auto;
  min-height: 2rem;
  min-width: 0;
  padding: 0.25rem 0.4rem;
  font-family: var(--textfont);
}

.effects-panel .add-effect .add-desc {
  flex: 1 1 auto;
  width: auto;
}

.effects-panel .add-effect .add-num {
  flex: 0 0 5.5rem;
  width: 5.5rem;
}

.effects-panel .add-effect .effect-adder {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  padding: 0.25rem 0.8rem;
  font-family: var(--textfont);
}

/* Context menus and map markers: no text selection from long-press */
.right-click-form,
.right-click-form *,
.bm-marker,
#mapholder {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.right-click-form input[type="text"],
.right-click-form input[type="number"] {
  -webkit-user-select: text;
  user-select: text;
}

/* Initiative tracker on phones: stop above the bottom player toolbar */
@media (max-width: 600px) {
  body.bmBody .dm-initiative-panel,
  body.bmBody .dm-initiative-panel:not(.is-pinned) {
    max-height: calc(100vh - 9.5rem);
    max-height: calc(100dvh - 9.5rem);
  }

  .effects-panel {
    max-height: calc(100vh - 9.5rem);
    max-height: calc(100dvh - 9.5rem);
  }
}

/* Battle effects panel: centred on the page */
.effects-panel {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

/* Area effect templates: touch drag and rotate */
.aoeTemplate,
.aoe-rotate-handle {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

@media (pointer: coarse) {
  .aoe-rotate-handle {
    width: 36px;
    height: 48px;
    font-size: 22px;
  }

  .aoe-rotate-handle::before {
    top: 24px;
  }

  .aoe-rotate-handle i {
    line-height: 24px;
  }
}

.aoeTemplate.aoe-current {
  outline: 2px dashed var(--text);
  outline-offset: 2px;
}

/* Mobile AOE toolbar */
.aoe-mobile-bar {
  position: fixed;
  z-index: 1100;
  top: 50%;
  left: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.35rem;
  border: 1px solid var(--highlight);
  border-radius: 0.75rem;
  background-color: var(--accent);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.35);
  transform: translateY(-50%);
}

.aoe-mobile-bar.hide {
  display: none;
}

@media (min-width: 601px) {
  .aoe-mobile-bar {
    left: 4.6rem;
  }
}

.aoe-mobile-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 0.45rem;
  color: var(--text);
  background-color: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  touch-action: manipulation;
}

.aoe-mobile-button:hover,
.aoe-mobile-button:focus-visible,
.aoe-mobile-button:active {
  border-color: var(--highlight);
  color: var(--background);
  background-color: var(--highlight);
  outline: none;
}

body.aoe-mobile-active .battle-tool-button[data-tool="aoe"] {
  border-color: var(--highlight);
  color: var(--background);
  background-color: var(--highlight);
}

/* DM toolbar: never run underneath the fixed Menu button */
body.bmBody .dm-toolbar {
  max-width: calc(100vw - 18rem);
}

@media (max-width: 700px) {
  body.bmBody .dm-toolbar {
    margin: 0 0.5rem 0 8.75rem;
    max-width: calc(100vw - 9.25rem);
  }
}

/* DM toolbar: NPCs and enemies on the map */
.dm-creatures-panel {
  width: min(22rem, calc(100vw - 1rem));
  max-height: min(70vh, 32rem);
  overflow-y: auto;
  transform: translateX(-50%);
}

.creature-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.creature-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding-left: 0.35rem;
  color: var(--text);
  background: var(--background);
  border: 1px solid var(--highlight);
  font-family: var(--textfont);
}

.creature-row.is-hidden-marker {
  opacity: 0.6;
}

.creature-thumb {
  flex: 0 0 auto;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  background-color: var(--accent);
  background-size: cover;
  background-position: center;
  border: 2px solid #2a2a2a;
  border-radius: 50%;
}

.creature-name {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.creature-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creature-kind {
  font-size: 0.75rem;
  color: var(--highlight);
}

.creature-empty {
  margin: 0.4rem 0;
  opacity: 0.8;
}

.token-image-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2rem;
  padding-left: 0.7rem;
  color: var(--text);
  font: 0.85rem var(--textfont);
}

.token-image-heading,
.token-image-cell {
  box-sizing: border-box;
  flex: 0 0 3.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.6rem;
}

.token-image-cell {
  padding: 0.35rem 0.5rem;
}

.token-image-cell .dm-switch[aria-disabled="true"] {
  opacity: 0.5;
  cursor: wait;
}

.char-row .token-image-cell {
  border-bottom: 1px solid var(--highlight);
  background: var(--background);
}

.creature-row:hover,
.creature-row:focus-within {
  outline: 2px solid var(--highlight);
  filter: drop-shadow(0 0 6px var(--highlight)) drop-shadow(0 0 12px var(--highlight));
}

/*# sourceMappingURL=style.css.map */
