@font-face {
  font-family: "8-Bit Wonder";
  src: url("fonts/8-Bit Wonder.ttf");
}

body {
  display: flex;
  justify-content: center;
  background: #708090;
  font-family: sans-serif;
  user-select: none;
}

main {
  position: relative;
  width: 1024px;
  height: 768px;
  overflow: hidden;
}

[v-cloak] {
  display: none;
}

p {
  margin: 2px 0;
}

#splash {
  position: absolute;
  z-index: 100;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#background {
  position: absolute;
  top: -10px;
  left: -10px;
  filter: blur(5px);
}

.bit {
  font-family: "8-Bit Wonder";
  -webkit-font-smoothing: none;
}

.title {
  position: relative;
  font-size: 64px;
  color: #e6c585;
  text-shadow: 5px 5px 0 #4729a3;
  margin-bottom: 75px;
}

.menu {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.option {
  position: relative;
  font-size: 24px;
  color: #e6c585;
  text-shadow: 2px 2px 0 #4729a3;
  padding: 25px;
  cursor: pointer;
}

.inverted {
  color: #4729a3;
  text-shadow: 2px 2px 0 #e6c585;
}

.selector {
  position: absolute;
  left: -25px;
  -webkit-font-smoothing: auto;
}

#alert {
  width: 600px;
  line-height: 1.2;
}

.panel {
  border: 1px solid black;
  background: #dfefff;
}

#top-panel {
  display: flex;
  margin-bottom: 5px;
}

#top-left {
  width: 248px;
  height: 512px;
  margin-right: 5px;
}

#top-center {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 512px;
  height: 512px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#top-right {
  width: 248px;
  height: 512px;
  margin-left: 5px;
}

#bottom-panel {
  display: flex;
}

#bottom-left {
  width: 248px;
  height: 247px;
  margin-right: 5px;
}

#bottom-center {
  width: 512px;
  height: 247px;
  overflow-y: scroll;
  overflow-x: hidden;
}

#bottom-right {
  width: 248px;
  height: 247px;
  margin-left: 5px;
}

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

.space {
  position: relative;
  width: 32px;
  height: 32px;
}

.active {
  position: absolute;
  z-index: 30;
  box-sizing: border-box;
  border: 8px solid transparent;
  border-image-source: url('img/active.png');
  border-image-slice: 8;
  border-image-width: 8px;
  border-image-outset: 7px;
}

.terrain {
  position: absolute;
}

.highlight {
  position: absolute;
  z-index: 10;
  box-shadow: inset 0 0 1px white;
}

.unit {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  cursor: pointer;
}

#ground-panel {
  position: absolute;
  z-index: 80;
  background: tan;
  border: 3px solid #6b491c;
  border-radius: 10px;
  padding: 15px;
}

.ground-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.ground-item:last-of-type {
  margin-bottom: 0;
}

.ground-item img {
  margin-right: 10px;
}

.ground-item .item-info {
  background: #e8dac6;
  border-radius: 5px;
  padding: 6px 8px;
}

.ground-item p:first-of-type {
  margin-bottom: 4px;
}

.item-info p {
  margin: 0;
}

.item-info span {
  margin-left: 10px;
}

.ui {
  margin: 10px 10px 25px 10px;
}

.flex {
  display: flex;
}

.center {
  align-items: center;
}

.center .icon {
  bottom: 1px;
}

.heading {
  height: 18px;
  margin: 5px 0;
  font-weight: bold;
}

.icon {
  position: relative;
  bottom: 2px;
  vertical-align: middle;
  width: 18px;
  height: 18px;
  margin-right: 5px;
}

.heart-container {
  display: flex;
  justify-content: flex-end;
}

.hearts {
  width: 58px;
  margin: 0;
}

.sprite {
  object-fit: none;
  object-position: 0 -160px;
}

.tiny {
  width: 14px;
  height: 14px;
  margin: 0;
}

.columns {
  width: 50%;
}

.col70 {
  width: 70%;
}

.col60 {
  width: 60%;
}

.col40 {
  width: 40%;
}

.col30 {
  width: 30%;
}

.col40 .icon {
  margin-right: 0;
}

.big {
  font-size: 50px;
  line-height: 40px;
  margin-left: 10px;
}

.bold {
  font-weight: bold;
}

.buff {
  color: #00aaff;
}

.debuff {
  color: #aa00ff;
}

.red {
  color: #e60000;
}

.ground-info .heading {
  margin-bottom: 9px;
}

.unit-info {
  padding: 2px 4px 2px 4px;
  border: 2px dashed rgb(0,0,0);
  border: 2px dashed rgba(0,0,0,0);
  border-radius: 10px;
  margin: -9px 4px 21px 4px;
}

.drop-zone {
  border-color: #bfbfbf;
}

.drop-hover {
  border-color: #808080;
}

#action-buttons {
  display: flex;
  width: 100%;
}

.btn-holder {
  width: 40px;
  height: 40px;
  margin-right: 5px;
}

#end-holder {
  width: 180px;
  height: 35px;
  margin-top: 5px;
  background-image: url('img/btn-end-disabled.png');
}

.button {
  cursor: pointer;
}

.equipment {
  display: flex;
  margin-top: 10px;
}

.item-holder {
  width: 66px;
  margin-right: 10px;
}

.slot-container {
  display: flex;
  flex-wrap: wrap;
  width: 64px;
}

.item-slot {
  position: relative;
  width: 32px;
  height: 32px;
}

.item {
  position: relative;
}

#item-tip {
  position: absolute;
  z-index: 90;
  top: -1px;
  left: 37px;
  width: fit-content;
  white-space: nowrap;
  background: #e8dac6;
  border: 3px solid #39240e;
  padding: 3px 5px;
}

#item-tip:before {
  content:'';
  position: absolute;
  right: 100%;
  top: 4px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-right: 17px solid #39240e;
  border-bottom: 10px solid transparent;
}

#item-tip:after {
  content:'';
  position: absolute;
  right: 100%;
  top: 7px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-right: 12px solid #e8dac6;
  border-bottom: 7px solid transparent;
}

#helper {
  position: relative;
  width: fit-content;
  height: fit-content;
  white-space: nowrap;
}

#helper span {
  position: relative;
  font-size: 24px;
  font-weight: bold;
  vertical-align: middle;
  border-radius: 5px;
  margin-right: 5px;
}

#helper img {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

#event-log {
  position: relative;
}

.event.dialog {
  margin: 18px 10px;
}

.event.dialog:first-child {
  margin-top: 0;
  padding-top: 18px;
}

.event.dialog:nth-child(even) {
  margin-bottom: 19px;
}

.event.dialog:last-child {
  min-height: 211px;
}

.event.action:last-child {
  min-height: 242px;
}

.content {
  display: flex;
}

.dialog .content {
  align-items: center;
}

.action .content {
  padding: 5px 10px;
}

.event .icon {
  bottom: 1px;
  left: 1px;
  margin 0;
}

.align-left {
  justify-content: flex-start;
}

.align-right {
  justify-content: flex-end;
}

.portrait {
  width: 96px;
  height: 96px;
  object-fit: none;
  object-position: 0 0;
}

.flip {
  transform: scaleX(-1);
}

.message {
  position: relative;
  padding: 8px 10px;
}

.message:before {
  content:"";
  position: absolute;
  bottom: 0px;
  width: 14px;
  height: 14px;
  background: inherit;
}

.message:after {
  content:"";
  position: absolute;
  bottom: 5px;
  width: 17px;
  height: 17px;
  background: #dfefff;
  border-radius: 50%;
}

.align-left .message {
  margin-left: 20px;
  border-radius: 8px 8px 8px 0;
}

.align-left .message:before {
  right: 100%;
  border-bottom-left-radius: 100% 70%;
}

.align-left .message:after {
  right: 100%;
}

.align-right .message {
  margin-right: 20px;
  border-radius: 8px 8px 0 8px;
}

.align-right .message:before {
  left: 100%;
  border-bottom-right-radius: 100% 70%;
}

.align-right .message:after {
  left: 100%;
}

.tutorial {
  position: relative;
  padding: 8px 10px;
  background: #4080bf;
  color: white;
  border-radius: 8px;
}

#triangle {
  position: relative;
  top: 1px;
  display: inline-block;
  margin-left: 5px;
}

/* space before */
.sb:before {
  content: ' ';
  white-space: pre;
}

/* space after */
.sa:after {
  content: ' ';
  white-space: pre;
}

.event .critical:before {
  content: 'in ';
  font-weight: normal;
  color: black;
  white-space: pre;
}

.event .critical:after {
  content: ' condition';
  font-weight: normal;
  color: black;
  white-space: pre;
}

.tgl-switch {
  width: 54px;
  height: 22px;
  margin-left: 5px;
  border-radius: 50% 50% 10px 10px;
  background: linear-gradient(to right, #704706, #996108 10px, #996108 44px, #c27b0a);
}

.tgl-holder {
  position: relative;
  display: inline-flex;
  width: 54px;
  height: 20px;
  align-items: center;
  border-radius: 10px;
  background: #e6c585;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.5s;
}

.tgl-slider {
  position: absolute;
  left: -32px;
  display: flex;
  width: 84px;
  height: 16px;
  transition: left 0.5s;
}

.tgl-text {
  width: 34px;
  font-size: 0.9em;
  font-weight: bold;
  color: #4729a3;
  text-align: center;
  transition: color 0.5s;
}

.tgl-handle {
  width: 16px;
  height: 16px;
  background: #c27b0a;
  border-radius: 50%;
  box-shadow: 0 1px 1px #704706;
}

.tgl-holder.tgl-on {
  background: #4729a3;
}

.tgl-slider.tgl-on {
  left: 2px;
}

.tgl-text.tgl-on {
  color: #e6c585;
}

.banner {
  width: 300px;
}

#banner-back {
  position: absolute;
  z-index: 100;
  height: 36px;
  display: flex;
  align-self: center;
  align-items: center;
}

#banner-fore {
  display: flex;
  height: 28px;
  align-items: center;
}

#banner-text {
  text-align: center;
  font-size: 1.2em;
  font-weight: bold;
  font-style: italic;
}

.screen {
  position: absolute;
  z-index: 100;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.outcome-holder {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scene {
  margin-top: 64px;
}

/* Dynamic Classes */

.healthy {
  color: #259925;
}

.wounded {
  color: #d98c00;
}

.critical {
  color: #e60000;
}

.defeated {
  color: #8b0000;
}

.fade1 {
  opacity: 1;
}

.fade2 {
  opacity: 0.875;
}

.fade3 {
  opacity: 0.75;
}

.fade4 {
  opacity: 0.625;
}

.fade5 {
  opacity: 0.5;
}

.fade6 {
  opacity: 0.375;
}

.fade7 {
  opacity: 0.25;
}

.fade8 {
  opacity: 0.125;
}

.fade9 {
  opacity: 0;
}

.ui-draggable {
  cursor: -webkit-grab;
}

.ui-draggable-dragging {
  cursor: -webkit-grabbing;
}

/* Transition Classes */

.fade-enter-active, .fade-leave-active {
  transition: opacity 250ms ease-in-out;
}

.fade-slow-enter-active, .fade-slow-leave-active {
  transition: opacity 500ms ease-in-out;
}

.fade-glacial-enter-active, .fade-glacial-leave-active {
  transition: opacity 2000ms ease-in-out;
}

.fade-enter, .fade-leave-to, .fade-slow-enter, .fade-slow-leave-to .fade-glacial-enter, .fade-glacial-leave-to {
  opacity: 0;
}

.banner-enter {
  left: 100%;
}

.banner-enter-active {
  transition: left 1s cubic-bezier(.5, 1, .5, 1);
}

.banner-enter-to, .banner-leave {
  left: calc(50% - 150px);
}

.banner-leave-active {
  transition: left 1s cubic-bezier(.5, 0, .5, 0);
}

.banner-leave-to {
  left: -300px;
}

.moveEast-enter-active {
  transition: left 200ms linear;
  z-index: 25;
}

.moveEast-enter {
  left: -32px;
}

.moveSouth-enter-active {
  transition: top 200ms linear;
  z-index: 25;
}

.moveSouth-enter {
  top: -32px;
}

.moveWest-enter-active {
  transition: left 200ms linear;
  z-index: 25;
}

.moveWest-enter {
  left: 32px;
}

.moveNorth-enter-active {
  transition: top 200ms linear;
  z-index: 25;
}

.moveNorth-enter {
  top: 32px;
}

.sayGoodbye-leave-active {
  transition: opacity 1s 500ms;
}

.sayGoodbye-leave-to {
  opacity: 0;
}

.outcome-enter-active {
  transition: opacity 3s linear;
}

.outcome-enter {
  opacity: 0;
}

/* Shadow DOM */

::-webkit-scrollbar {
  width: 8px;
  border: 1px solid rgba(0, 0, 0, 0);
}

::-webkit-scrollbar-thumb {
  background: #69c;
  border-radius: 4px;
}