html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
}

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

/* Fixed 1280x800 drawing buffer; CSS size set by JS to letterbox/pillarbox. */
#game {
  display: block;
  background: #000;
  image-rendering: auto;
  cursor: default;
}

#loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0f1a3c;
  color: #f0d98a;
  font-family: "Consolas", "Courier New", monospace;
  z-index: 10;
}
#loading .title { font-size: 42px; letter-spacing: 4px; margin-bottom: 18px; }
#loading .bar-bg { width: 420px; height: 18px; background: #12203a; border: 1px solid #325a8c; }
#loading .bar-fill { height: 100%; width: 0%; background: #ffc832; transition: width 0.1s linear; }
#loading .pct { margin-top: 10px; font-size: 15px; color: #4a708c; }

/* Rotate hint for portrait mobile */
#rotate-hint {
  position: fixed; inset: 0; z-index: 99999;
  display: none; align-items: center; justify-content: center;
  background: #000; color: #f0d98a;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 22px; text-align: center; padding: 2em;
}
@media screen and (orientation: portrait) and (max-width: 900px) {
  #rotate-hint { display: flex !important; }
  #wrap { display: none !important; }
}
