/* Keep the document fixed; only explicitly marked lists may scroll. */
html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

body {
    position: fixed;
    inset: 0;
}

* {
    touch-action: none;
    overscroll-behavior: none;
    -webkit-user-drag: none;
}

[data-vertical-scroll],
[data-vertical-scroll] * {
    touch-action: pan-y;
}

[data-vertical-scroll] {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

/* A long press on a lane (holding a long note) must not start a text
   selection, whose loupe and handles then follow the finger, nor open the
   iOS callout. Text fields keep their own selection. */
@media (any-pointer: coarse) {
    * {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }

    input,
    textarea,
    [contenteditable] {
        -webkit-user-select: text;
        user-select: text;
        -webkit-touch-callout: default;
    }
}

/* Prevent iOS from zooming into small text fields on focus. */
@media (pointer: coarse) {
    input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
    textarea,
    select {
        font-size: max(16px, 1em) !important;
    }
}
