html, body {
  margin: 0;
  height: 100%;
  background: #1d3b14;
  color: #f4f4ef;
  font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

#stage {
  position: relative;
  flex: 1;
  min-height: 0;
}

canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  touch-action: none;
}

#bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
  background: #142a0e;
  border-top: 2px solid #0c1a08;
}

#hint {
  flex: 1;
  font-size: 12px;
  color: #a9c99a;
  letter-spacing: 0.04em;
}

#bar button {
  width: 44px;
  height: 36px;
  font: inherit;
  font-size: 16px;
  color: #f4f4ef;
  background: #2c5320;
  border: 2px solid #0c1a08;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  touch-action: none;
}

#bar button:active { filter: brightness(1.4); }

/* Pause bars drawn in CSS so every phone shows them; while paused the button shows ▶. */
#pause:not(.paused)::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 14px;
  border-left: 4px solid currentColor;
  border-right: 4px solid currentColor;
  box-sizing: border-box;
  vertical-align: middle;
}
#pause.idle { opacity: 0.35; }
