html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #1f1f1f;
  color: #eee;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#out {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

#out canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  outline: none;
  touch-action: none;
}

/* Avalonia's WASM uses a hidden HTML input for IME and virtual-keyboard
   handling. iOS Safari auto-zooms on focus whenever an input is smaller
   than 16px, so force the threshold and keep the keyboard from triggering
   a stuck zoom. */
input, textarea, [contenteditable] {
  font-size: 16px !important;
}

#loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 16px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #444;
  border-top-color: #6cf;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
