.nigsoft-keyboard {
    position: fixed;
    left: 50%;
    bottom: 0;
    width: min(980px, 100vw);
    padding: 10px 12px 14px;
    transform: translate(-50%, 110%);
    background: #17212b;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 45px rgba(0,0,0,.38);
    z-index: 2147483646;
    transition: transform .18s ease;
    touch-action: manipulation;
    user-select: none;
}

.nigsoft-keyboard.is-visible {
    transform: translate(-50%, 0);
}

.nigsoft-keyboard__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    padding: 2px 5px 9px;
    font-size: 15px;
}

.nigsoft-keyboard__header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nigsoft-keyboard__repair,
.nigsoft-keyboard__close {
    min-height: 36px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    touch-action: manipulation;
}

.nigsoft-keyboard__repair {
    padding: 7px 12px;
    background: #1f6feb;
    font-size: 14px;
    font-weight: 800;
}

.nigsoft-keyboard__close {
    width: 42px;
    background: #d9534f;
    font-size: 25px;
    line-height: 1;
}

.nigsoft-keyboard__row {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin: 7px 0;
}

.nigsoft-keyboard__key {
    flex: 1 1 0;
    min-width: 52px;
    min-height: 52px;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: #f8fafc;
    color: #111827;
    font-size: 20px;
    font-weight: 800;
    box-shadow: 0 3px 0 #aab4bf;
    cursor: pointer;
    touch-action: manipulation;
}

.nigsoft-keyboard__key:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #aab4bf;
}

.nigsoft-keyboard__key--action {
    background: #dbe7f4;
    font-size: 15px;
}

.nigsoft-keyboard__key--space {
    flex: 4 1 0;
}

.nigsoft-keyboard__key--hide {
    background: #1f6feb;
    color: #fff;
}

.nigsoft-keyboard-recovery {
    position: fixed;
    right: 16px;
    bottom: 16px;
    min-width: 64px;
    min-height: 58px;
    padding: 7px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 2px solid rgba(255,255,255,.85);
    border-radius: 16px;
    background: #1f6feb;
    color: #fff;
    box-shadow: 0 8px 25px rgba(0,0,0,.3);
    font-size: 23px;
    font-weight: 900;
    cursor: pointer;
    z-index: 2147483647;
    touch-action: manipulation;
}

.nigsoft-keyboard-recovery span {
    font-size: 11px;
    line-height: 1;
}

.nigsoft-keyboard.is-visible ~ .nigsoft-keyboard-recovery {
    bottom: 355px;
}

body.nigsoft-keyboard-open {
    padding-bottom: 360px !important;
}

@media (max-width: 700px) {
    .nigsoft-keyboard__key {
        min-width: 34px;
        min-height: 46px;
        padding: 6px;
        font-size: 17px;
    }

    .nigsoft-keyboard {
        padding-left: 6px;
        padding-right: 6px;
    }

    .nigsoft-keyboard__row {
        gap: 4px;
        margin: 5px 0;
    }

    .nigsoft-keyboard-recovery {
        right: 8px;
        bottom: 8px;
    }
}
