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

body {
  position: fixed;
  inset: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e9eefc;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

#gfx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#modeBadge {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(10px);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(8, 12, 22, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
  color: rgba(245, 248, 255, 0.92);
  font-size: 13px;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
  z-index: 3;
}

#modeBadge.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#status {
  position: fixed;
  left: calc(12px + env(safe-area-inset-left, 0px));
  top: calc(12px + env(safe-area-inset-top, 0px));
  z-index: 3;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(4, 8, 18, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
  color: rgba(236, 242, 255, 0.88);
  font: 12px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  pointer-events: none;
  display: none;
}

body.debug-ui #status {
  display: block;
}

#fallback {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  z-index: 4;
  background:
    radial-gradient(1200px 800px at 50% 40%, rgba(24, 34, 60, 0.85), rgba(4, 8, 16, 0.96)),
    #04070f;
  color: #eef3ff;
  font-size: 16px;
}
