/* ─── Universal Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent !important;
  outline: none !important;
}

html {
  height: 100%;
  height: -webkit-fill-available;
  overflow: hidden;
  position: fixed;
  inset: 0;
  width: 100%;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  background: #ffffff;
  outline: none !important;
}

body {
  width: 100vw;
  height: 100vh;
  height: 100%;
  height: 100dvh;
  height: -webkit-fill-available;
  overflow: hidden;
  background: #ffffff;
  position: fixed;
  inset: 0;
  touch-action: none;
  overscroll-behavior: none;
  outline: none !important;
  cursor: default !important;
}

/* ─── Screen Container ───────────────────────────────────────────────────── */
#screen-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #ffffff;
  outline: none !important;
  border: none !important;
  cursor: default !important;
}

#vnc-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #ffffff;
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  cursor: default !important;
  touch-action: none !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

/* noVNC canvas fills area with normal system mouse cursor & direct touch tracking */
#vnc-canvas-wrapper canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: fill;
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  max-width: 100%;
  max-height: 100%;
  cursor: default !important;
  touch-action: none !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

/* noVNC iframe fallback */
#vnc-canvas-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none !important;
  outline: none !important;
  display: block;
  cursor: default !important;
}

/* ─── Kill ALL noVNC UI Chrome ───────────────────────────────────────────── */
#noVNC_control_bar,
.noVNC_control_bar,
#noVNC_control_bar_handle,
.noVNC_panel,
#noVNC_status,
.noVNC_status,
#noVNC_status_bar,
#noVNC_connect_button,
#noVNC_transition_text,
.noVNC_logo,
#noVNC_logo {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

/* ─── Mobile Keyboard Bridge (Off-screen, Zero Tap Interference) ────────── */
#mobile-keyboard-input {
  position: fixed;
  bottom: -100px;
  left: -100px;
  width: 1px;
  height: 1px;
  opacity: 0.001;
  font-size: 16px;
  border: none !important;
  outline: none !important;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  z-index: -999;
  pointer-events: none !important;
}
