.bounce {
    display: block;
    width: min(100%, 520px);
    aspect-ratio: 1;
    margin: 0 auto;
    cursor: crosshair;
    /* Жесты на canvas не должны скроллить, зумить или вызывать меню. */
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.bounce-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    max-width: 520px;
    margin: 1rem auto 0;
}

.bounce-caption {
    width: 100%;
    margin-bottom: -.25rem;
    font-size: .75rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .45);
    text-align: center;
}

.bounce-gravity {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.bounce-gravity .form-range {
    width: 10rem;
}

/* Bootstrap красит бегунок в primary; приводим к цвету границы мира. */
.bounce-gravity .form-range::-webkit-slider-thumb {
    background-color: #ffc107;
}

.bounce-gravity .form-range::-moz-range-thumb {
    background-color: #ffc107;
}

/* Правила для разных движков раздельно: незнакомый селектор отменил бы всё правило. */
.bounce-gravity .form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 1px #101215, 0 0 0 .25rem rgba(255, 193, 7, .25);
}

.bounce-gravity .form-range:focus::-moz-range-thumb {
    box-shadow: 0 0 0 1px #101215, 0 0 0 .25rem rgba(255, 193, 7, .25);
}

.bounce-gravity output {
    min-width: 2.5em;
    font-variant-numeric: tabular-nums;
}
