html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Prevent browser gestures from interfering with app */
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    /* Prevent double-tap zoom */
    -ms-touch-action: manipulation;
}

/* Prevent pull-to-refresh on mobile */
body {
    overscroll-behavior: none;
}

/* Canvas should handle its own touch events */
canvas {
    touch-action: none;
}

/* WORKAROUND: Compose for Web renders UI to <canvas> and creates a hidden
   <textarea> off-screen to capture keyboard input. In Android WebView
   (Telegram, VK, Instagram in-app browsers) the keyboard never opens because
   the WebView skips invisible/off-screen inputs. Setting opacity to 0.01
   makes the textarea "visible enough" for WebView to trigger the keyboard,
   while staying invisible to the user. caret-color:transparent hides the
   blinking cursor that would otherwise appear at the textarea position.
   Does NOT affect desktop browsers or iOS WebView (they handle it fine).
   Tested: Telegram Android WebView — Feb 2026. */
textarea {
    opacity: 0.01 !important;
    caret-color: transparent !important;
}