html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: #d8d2c4;
  font: 14px/1.4 ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;
}

#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

/* No border or padding on the canvas: SDL maps mouse coordinates against it. */
#canvas {
  display: block;
  border: 0;
  padding: 0;
  background: #000;
  outline: none;
  image-rendering: pixelated;
  /* width/height are set by harness.js to the largest 4:3 box that fits. */
}

#overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.82);
  text-align: center;
  cursor: pointer;
}

#overlay[hidden] { display: none; }
.cta:focus-visible { outline: 2px solid #f0e6d0; outline-offset: 3px; }
#overlay:hover .cta, .cta:focus-visible { background: #c8402c; }
.cta:active { transform: translateY(1px); }
#overlay.busy { cursor: progress; }
.cta:disabled, #overlay.busy .cta { background: #3a3530; color: #a39a8c; cursor: progress; }

.title {
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0e6d0;
}

.cta {
  display: inline-block;
  padding: 10px 22px;
  background: #a33522;
  color: #fff;
  border: 0;
  border-radius: 2px;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: background 120ms ease-out;
}

.status { min-height: 1.4em; color: #bdb4a4; }

.bar {
  display: block;
  width: min(320px, 80vw);
  height: 4px;
  background: #2a2622;
  visibility: hidden;
}
.busy .bar { visibility: visible; }
#bar-fill { display: block; height: 100%; width: 0; background: #c8402c; }

.keys {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: #a39a8c;
}
.keys b { color: #e6dccb; font-weight: 600; }

.legal { font-size: 11px; color: #8a8276; }
.legal a { color: #bdb4a4; }
.legal a:hover, .legal a:focus-visible { color: #fff; }

@media (max-height: 360px) {
  .keys, .legal { display: none; }
}
