html, body {
  margin: 0;
  padding: 0;
  background: #0a0a0a;
  color: #4af626;
  font-family: ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;
  height: 100%;
}

#topbar {
  padding: 8px 10px 4px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#topbar .prompt { color: #4af626; font-weight: bold; }
#topbar .cmd { color: #e8e8e8; }
#status { color: #7a7a7a; margin-left: 8px; font-size: 12px; }
#status.busy::after {
  content: "\2588";
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

#resetbtn {
  float: right;
  min-width: 44px;
  height: 22px;
  padding: 0 8px;
  background: #1c1c1c;
  color: #7a7a7a;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
}
#resetbtn.armed { background: #4af626; color: #0a0a0a; }

#screen_wrap {
  width: 100%;
  overflow: hidden;
  background: #000;
}
#screen_container {
  position: relative;
  transform-origin: top left;
}
#screen_text {
  white-space: pre;
  font: 14px monospace;
  color: #ccc;
}
#screen_text, #screen_text * { cursor: text; }
#screen_canvas { display: none; }

.phone_keyboard {
  position: fixed;
  left: -1000px;
  top: 0;
  opacity: 0;
  width: 10px;
  height: 1px;
}

#keybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 6px;
  padding: 8px;
  background: #111;
  border-top: 1px solid #2a2a2a;
  -webkit-overflow-scrolling: touch;
  z-index: 10;
}
#keybar button {
  flex: 0 0 auto;
  min-width: 44px;
  height: 40px;
  padding: 0 10px;
  background: #1c1c1c;
  color: #4af626;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  font-family: inherit;
  font-size: 15px;
}
#keybar button:active { background: #2c2c2c; }
#keybar button.armed { background: #4af626; color: #0a0a0a; }

body { padding-bottom: 64px; }

@media (max-width: 480px) {
  #topbar { white-space: normal; }
  #status { display: block; margin: 2px 0 0 0; }
}
