html, body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    background: #fafafa;
    font-family: system-ui, -apple-system, sans-serif;
    position: relative;
    touch-action: manipulation;
}

#ComposeTarget {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

#ComposeTarget canvas {
    touch-action: manipulation;
    outline: none;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* iOS Safari: 16px+ avoids zoom-on-focus; compose backing fields inherit this */
input, textarea, select {
    font-size: 16px;
    touch-action: manipulation;
}

#ComposeTarget input,
#ComposeTarget textarea {
    min-height: 44px;
}
