@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../typefaces/fraunces-700.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../typefaces/ibm-plex-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../typefaces/ibm-plex-sans-600.woff2") format("woff2");
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #e6dfd4;
  color: #2a261f;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}

.shell {
  box-sizing: border-box;
  width: min(1100px, calc(100% - 24px));
  height: 100vh;
  margin: 0 auto;
  padding: 16px 0 18px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.title {
  margin: 0 auto 4px;
  text-align: center;
  flex: 0 0 auto;
}
.title img {
  width: min(100%, 420px);
  height: auto;
  display: inline-block;
  vertical-align: middle;
}

.game-intro {
  text-align: center;
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 12px;
  color: #5c564c;
  flex: 0 0 auto;
}

.well-wrap {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  background: #161410;
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(42, 38, 31, 0.28);
  overflow: hidden;
}

#game {
  width: 100%;
  height: 100%;
  background: #161410;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#game canvas.term {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
#game canvas.scale-2 { zoom: 0.5; }
#game canvas.scale-3 { zoom: calc(100% / 3); }
#game canvas.scale-4 { zoom: 0.25; }

.button-bar {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  z-index: 2;
}
.button-bar button {
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 10px;
  background: #2a261f;
  border: 1px solid #3a342c;
  color: #9a9084;
  border-radius: 2px;
  padding: 2px 6px;
}
.button-bar:hover button {
  color: #efe8dc;
  border-color: #8a7a66;
  cursor: pointer;
}
.button-bar button:hover {
  color: #c4a46a;
  border-color: #c4a46a;
}

.below {
  flex: 0 0 auto;
  padding-top: 14px;
}
.game-explanation {
  font-size: 14px;
  line-height: 1.6;
  color: #2a261f;
  margin: 0 0 12px;
}
.game-explanation .important { font-weight: 600; }
hr {
  border: 0;
  border-top: 1px solid #d4c8b4;
  margin: 16px 0;
}
.game-credit {
  font-size: 13px;
  line-height: 1.6;
  color: #5c564c;
}
.game-credit a { color: #2a261f; }
