* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  color: #000;
  background: #fff;
  background-image: url("../assets/dither.png");
  background-size: 4px 4px;
  background-repeat: repeat;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  font: 16px/1.3 Chicago, Geneva, "Lucida Grande", Helvetica, sans-serif;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  font-smooth: never;
  font-kerning: none;
  font-synthesis: none;
  user-select: none;
}
#app, #stage {
  height: 100%;
  background: transparent;
}
#stage { position: relative; }

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.screen.game {
  background: #000;
}
.hidden { display: none !important; }

.bubble {
  position: relative;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  max-width: min(640px, 92vw);
  max-height: 90%;
  overflow: auto;
  padding: 18px 20px 28px;
  box-shadow: 4px 4px 0 #000;
  image-rendering: pixelated;
}
.bubble > .tail {
  position: absolute;
  left: 28px;
  bottom: -16px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 16px 12px 0 2px;
  border-color: #000 transparent transparent transparent;
  filter: drop-shadow(4px 0 0 #000);
}
.bubble > .tail:after {
  content: "";
  position: absolute;
  left: -9px;
  top: -16px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 12px 9px 0 0;
  border-color: #fff transparent transparent transparent;
}
.bubble h1 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: normal;
  text-align: left;
}
.credit {
  margin: 10px 0 0;
  text-align: left;
  font-size: 16px;
}
.title-art {
  display: block;
  width: min(560px, 80vw);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border: 2px solid #000;
}
.end-art {
  width: min(360px, 70vw);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
  margin: 0 0 12px;
  border: 2px solid #000;
}
.btns {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.bitbtn {
  background: #fff;
  color: #000;
  border: 2px solid #000;
  border-radius: 0;
  padding: 8px 16px;
  font: inherit;
  min-width: 108px;
  box-shadow: 2px 2px 0 #000;
  cursor: pointer;
  -webkit-font-smoothing: none;
  font-smooth: never;
}
.bitbtn.default { outline: 2px solid #000; outline-offset: 2px; }
.bitbtn:hover, .bitbtn:focus {
  background: #000;
  color: #fff;
  outline: none;
}
.bitbtn:active {
  box-shadow: none;
  transform: translate(2px, 2px);
}

#class-list {
  max-height: min(48vh, 420px);
  overflow: auto;
  border: 2px solid #000;
  padding: 0;
}
#class-list label {
  display: block;
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 2px solid #000;
}
#class-list label:last-child { border-bottom: 0; }
#class-list label:hover { background: #000; color: #fff; }
#class-list label:has(input:checked) { background: #000; color: #fff; }
#class-list input { accent-color: #000; }
.blurb { font-size: 16px; }
.name-row { margin: 14px 0 0; }
#hero-name {
  font: inherit;
  border: 2px solid #000;
  border-radius: 0;
  padding: 6px 8px;
  width: 220px;
  background: #fff;
  color: #000;
  -webkit-font-smoothing: none;
  font-smooth: never;
  box-shadow: 2px 2px 0 #000;
}

#game-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
#view {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: crosshair;
  background: #fff;
  touch-action: none;
}

#help-text {
  white-space: pre-wrap;
  font: inherit;
  min-height: 80px;
  margin: 0;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

html.dark .screen.game, html.dark #game-stage { background: #000; }
