css/kalimba.css
html {
    /* Отключает двойной тап по экрану */
    touch-action: manipulation;
}

.kalimba-container {
    display: flex;
    flex-direction: row;
    align-items: top;
    user-select: none;
    touch-action: none;
}

/* Для телефонов */
@media (min-width: 0px) {
    .kalimba-container {
        /* Отступы между между клавишами */
        justify-content: space-evenly;
    }
}

/* Для ПК */
@media (min-width: 768px) {
    .kalimba-container {
        justify-content: center;
    }
}

.key-zone {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    overflow: hidden;

}

.key {
    /* background-color: #038a58; */
    /* border-color: #038a58; */
    width: 100%;
    height: 100%;
    /* margin: 2px; */

    border: none;
    border: solid;
    border-width: 2px;
    border-radius: 4px 4px 20px 20px;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    overflow: hidden;

    --primary-bg: color-mix(in hsl, var(--primary), #000000 3%);
    border-color: var(--primary-bg);
    background-color: var(--primary-bg);
}



/* Для телефонов */
@media (min-width: 0px) {
    .key {
        margin: 2px;
    }

    .key-zone {
        width: 50px;
        padding: 2px;
    }
}

/* Для ПК */
@media (min-width: 768px) {
    .key {
        margin: 5px;
    }

    .key-zone {
        width: 50px;
        padding: 5px;
    }
}

.note-text {
    /* background: linear-gradient(#06ca82, #039761); */
    /* color: #b5ffff; */

    font-size: large;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    line-height: 1em;

    width: 100%;
    height: 100%;
    display: flex;
    border-radius: 4px 4px 4px 4px;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 40px;
    white-space: pre-wrap;
}

.note-text {
    --primary-gradient: color-mix(in hsl, var(--primary), #ffffff 10%);
    background: linear-gradient(var(--primary), var(--primary-gradient));
    color: var(--primary-inverse);
}

.key-click {
    animation: shake2 1s;
    transform: translate3d(0, 0, 0);
    perspective: 1000px;
}

.kalimba-container {
    margin-top: 0.3em;
    margin-bottom: 0.3em;
}

.note-keyboard-key {
    flex-grow: 1;
    padding: 5px;
    font-size: 0.8em;
    font-style: italic;
    color: rgba(0, 0, 0, 0.5);
}

.note-letter {
    margin-top: 0.3em;
    margin-bottom: 0.3em;
}

.note-letter sub {
    font-size: x-small;
    font-weight: normal;
}

.kb_container {
  display: flex;
  flex-direction: column;
  text-align: center;
  max-width: 648px;
  font-weight: bold;
  padding-top: 8px;
  margin: auto;
}

.kb_row {
    display: flex;
    justify-content: space-between;
}

.kb_key {
    padding: 5px;
    text-align: center;
    display: inline-block;
    white-space: nowrap;
    border: var(--border-width) solid var(--form-element-border-color);
    background-color: var(--form-element-background-color);
    border-radius: var(--border-radius);
    margin: 2px 2px 0 0;
    width: 0px;
}

.used {
    background: var(--primary);
    color: var(--primary-inverse);
}

@media (max-width: 767px) {
    .kb_container {
        font-size: 0.8em;
    }
    .kb_key {
        padding: 3px;
    }
}
@media (max-width: 480px) {
    .kb_container {
        font-size: 0.5em;
    }
}

select {
    margin-bottom: 0px;
}


@media (min-width: 768px) {
    /* @media (min-width: 992px) { */
    .option-volume {
        width: 32%;
        display: inline-block;
        margin-right: 1.2%;
    }
    .option-baseNote {
        width: 32%;
        display: inline-block;
        margin-right: 1.2%;
    }
    .option-keys {
        width: 32%;
        display: inline-block;
    }
    .option-soundfonts {
        width: 48%;
        margin-right: 3%;
        display: inline-block;
    }
    .option-localization {
        width: 48%;
        display: inline-block;
    }
}


@media (min-width: 575px) and (max-width: 767px) {
    .option-baseNote {
        width: 48%;
        display: inline-block;
        margin-right: 3%;
    }
    .option-keys {
        width: 48%;
        display: inline-block;
    }
    .option-soundfonts {
        width: 48%;
        margin-right: 3%;
        display: inline-block;
    }
    .option-localization {
        width: 48%;
        display: inline-block;
    }
}
@media (min-width: 768px) {
    .option-arrangement {
        display: flex;
    }
}

#range-volume {
    margin-bottom: 0px;
}
#range-baseNote {
    margin-bottom: 0px;
}
#range-keys {
    margin-bottom: 0px;
}

@keyframes shake2 {
    /*
        Вибрация построена на основе следующей формулы
        f(x) = (-0.093*x + 0,0927) * COS(100*x) * 1.2^(-10*x) 
        https://www.desmos.com/calculator/aorly47ttb 
    */
    0% {transform: translate3d(0.093em, 0, 0);}
    4% {transform: translate3d(-0.085em, 0, 0);}
    8% {transform: translate3d(0.077em, 0, 0);}
    12% {transform: translate3d(-0.071em, 0, 0);}
    16% {transform: translate3d(0.064em, 0, 0);}
    20% {transform: translate3d(-0.059em, 0, 0);}
    24% {transform: translate3d(0.053em, 0, 0);}
    28% {transform: translate3d(-0.048em, 0, 0);}
    32% {transform: translate3d(0.044em, 0, 0);}
    36% {transform: translate3d(-0.04em, 0, 0);}
    40% {transform: translate3d(0.036em, 0, 0);}
    44% {transform: translate3d(-0.032em, 0, 0);}
    48% {transform: translate3d(0.029em, 0, 0);}
    52% {transform: translate3d(-0.026em, 0, 0);}
    56% {transform: translate3d(0.023em, 0, 0);}
    60% {transform: translate3d(-0.021em, 0, 0);}
    64% {transform: translate3d(0.018em, 0, 0);}
    68% {transform: translate3d(-0.016em, 0, 0);}
    72% {transform: translate3d(0.014em, 0, 0);}
    76% {transform: translate3d(-0.013em, 0, 0);}
    80% {transform: translate3d(0.011em, 0, 0);}
    84% {transform: translate3d(-0.009em, 0, 0);}
    88% {transform: translate3d(0.008em, 0, 0);}
    92% {transform: translate3d(-0.007em, 0, 0);}
    96% {transform: translate3d(0.006em, 0, 0);}
    100% {transform: translate3d(-0.005em, 0, 0);}
}

input[type=range][orient=vertical] {
    writing-mode: vertical-lr;
    width: 16px;
    height: 48px;
    margin-top: 2px;
    margin-bottom: 4px;
}

/* Настраиваем трек в Chrome, Opera, Safari, Edge */
input[type=range][orient=vertical]::-webkit-slider-runnable-track {
    width: 5px;
}

/* Настраиваем трек в Mozilla Firefox */
input[type=range][orient=vertical]::-moz-range-track {
    /* В Firefox высота трека отличается от других браузеров */
    height: auto;
    width: 5px;
}

/* Настраиваем ползунок в Chrome, Opera, Safari, Edge */
input[type=range][orient=vertical]::-webkit-slider-thumb {
    height: 23px;
    width: 23px;
    margin: 0 0 0 -9px;
}

/* Настраиваем ползунок в Firefox (он там почему то больше) */
input[type=range][orient=vertical]::-moz-range-thumb {
    height: 19px;
    width: 19px;
    margin: 0 0 0 -3px;
}

/* Меняем фон всех ползунков на текущий цвет темы */
input[type=range]::-moz-range-thumb {
    background: var(--primary);
}

input[type=range]::-webkit-slider-thumb {
    background: var(--primary);
}

.tune-label {
    display: flex;
    flex-direction: column;
    min-width: 40px;
    align-items: center;
}

@media (max-width: 991px) {
    .tune-label {
        min-width: 30px;
    }
}

.tune-field {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
}

/* Стиль для режима "Полный экран" */
.fullscreen {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    --color: var(--primary-inverse);
    height: -webkit-fill-available;
    margin: 0;
    margin-bottom: var(--spacing);
    padding: 3vh;
}

/* ** ** ** ** ** ** ** ** ** ** ** */
/* ** ПАНЕЛЬ КНОПОК ПОД КАЛИМБОЙ ** */
/* ** ** ** ** ** ** ** ** ** ** ** */

/* Блок с кнопками под калимбой */
.buttons-container {
    margin-top: 1em;
    display: flex;
    height: 100%;
    justify-content: center;
    align-items: flex-end;
}

.buttons-container .button {
    position: relative;
    overflow: hidden;
    background: var(--primary);
    padding: 0;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 0.5em;
}

.icon {
    width: 30px;
    position: absolute;
}

.loader {
    position: absolute;
    width: 30px;
    height: 30px;
    background: var(--primary);
    --anim-load-duration: 2s;
    opacity: 0;
}

.anim-spin .loader {
    opacity: 1;
    animation: spin var(--anim-load-duration) linear infinite;
}

.anim-load .loader circle {
    animation: dash var(--anim-load-duration) linear infinite;
}

.anim-load .loader {
    opacity: 1;
    transform: rotate(-90deg);
}

@keyframes spin {
    100% { transform: rotate(360deg);}
}

@keyframes dash {
    0% { stroke-dashoffset: 100; }
    100% { stroke-dashoffset: 0; }
}


/* ** ** ** ** ** ** ** ** ** ** ** */
/* ** ** ** ** ** ** ** ** ** ** ** */
/* ** ** ** ** ** ** ** ** ** ** ** */