::-ms-input-placeholder {
    color: rgba(192, 192, 192, 0.7);
}
:-ms-input-placeholder {
    color: rgba(192, 192, 192, 0.5);
}
::-moz-placeholder {
    color: rgba(192, 192, 192, 0.7);
}
:-moz-placeholder {
    color: rgba(192, 192, 192, 0.7);
}
::-webkit-input-placeholder {
    color: rgba(192, 192, 192, 0.7);
}
:placeholder-shown {
    color: rgba(192, 192, 192, 0.7);
}
::placeholder {
    color: rgba(192, 192, 192, 0.7);
}

body {
    font: 20px Monaco, monospace;
    margin: 0;
}
button {
    color: inherit;
}
.wrapper {
    display:  grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto 1fr;
    gap: 40px;
    padding: 40px;
    box-sizing: border-box;
    height: 100vh;
}
.caption {
    grid-column-end: span 2;
    font-family: sans-serif;
    text-align: center;
    font-size: 24px;
}
.caption>span:first-child {
    font-weight: bold;
}

.mask {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    grid-column-end: span 2;
    justify-self: center;
}

.mask>label {
    display: flex;
    gap: 10px;
}
.mask .buttons {
    display: flex;
    gap: 10px;
}
.mask input,
.mask button {
    border: 1px solid rgba(192, 192, 192, 0.7);
    box-sizing: border-box;
    font-size: 24px;
    border-radius: 4px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.mask button {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mask input {
    width: 48px;
    text-transform: uppercase;
}

.words {
    overflow: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-content: flex-start;
    justify-content: center;
}
.words span {
    padding: 0 6px;
    display: flex;
    height: 30px;
    line-height: 30px;
}

.chars {
    display:  grid;
    grid-template-columns: repeat(11, auto);
    gap: 20px;
}
@media (max-width: 1100px) {
    .wrapper {
        gap: 30px;
        padding: 30px;
    }
    .mask {
        flex-wrap: wrap;
        justify-content: center;
    }
    .mask .buttons {
        width: 100%;
        justify-content: center;
    }
    .chars {
        grid-template-columns: repeat(7, auto);
        gap: 20px;
    }
    h2 {
        margin: 0 0 16px;
        font-size: 20px;
    }
}

.abc {
    display: grid;
    grid-template-rows: repeat(3, auto) 1fr;
    gap: 20px;
    height: 100%;
    overflow: auto;
    padding-right: 20px;
}
.char {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    cursor:  pointer;
    box-shadow: 0 0 5px 0 #0004;
    position: relative;
}
.char_t.active {
    color: mediumseagreen;
    box-shadow: 0 0 5px 0 mediumseagreen;
}
.char_f.active {
    color: crimson;
    box-shadow: 0 0 5px 0 crimson;
}

.char.disable {
    cursor: auto;
    color: silver;
    box-shadow: none;
}
.has {
    color: orange;
    font-weight: bold;
}
.words span {
    padding: 0 6px;
}
.green {
    color: forestgreen;
    font-weight: bold;
    border: 1px solid;
}
.del {
    border: 1px solid;
}
.test {
    color: mediumseagreen;
}
.strange {
    color: brown;
}
.name {
    color: deepskyblue;
}
.tooltip {
    position: absolute;
    bottom: -7px;
    right: -7px;
    font-size: .5rem;
    background-color: rgba(192, 192, 192, 0.5);
    display: flex;
    padding: 0.1rem 0.2rem;
    /* color: #fff; */
    font-weight: 900;
    line-height: 1;
    border-radius: 4px;
}
table {
    user-select: none;
    overflow: auto;
    width: 100%;
}
td {
    padding: 4px 10px;
    text-align: center;
}
th {
    background-color: silver;
}
thead th {
    padding: 4px 6px;
    cursor: pointer;
}
thead th.ASC {
    color: forestgreen;
}
thead th.DSC {
    color: red;
}
.stats {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}
.stats+table {
    display: none;
}

.stats.active+table {
    display: table;
}
.mark {
    display: grid;
    gap: 10px;
}
.popup-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: none;
    background: rgba(192, 192, 192, 0.9);
    backdrop-filter: blur(1px);
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.popup-wrapper.active {
    display: flex;
}
.info {
    cursor: pointer;
    position: absolute;
    border: 1px solid silver;
    border-radius: 50%;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}
.popup {
    width: 90vw;
    max-width: 600px;
    max-height: 70vh;
    overflow: auto;
    background: #fff;
    padding: 30px;
    box-sizing: border-box;
    border-radius: 8px;
    font-size: 18px;
    display: grid;
    gap: 20px;
    position: relative;
}
.popup button {
    cursor: pointer;
    border: 1px solid silver;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    font-size: 16px;
    justify-content: center;
    align-items: center;
    display: inline-flex;
}
.close-popup {
    position: absolute;
    border-radius: 50%;
    top: 10px;
    right: 10px;
    font-size: 20px;
}
.popup h2 {
    font-size: 24px;
    margin: 0;
    text-align: center;
}
.popup p {
    margin: 0;
}
@media (max-width: 700px) {
    .popup {
        padding: 20px;
        font-size: 12px;
        gap: 10px;
    }
    .popup h2 {
        font-size: 20px;
    }
    .popup .close-popup {
        border-radius: 50%;
    }
    .vowels2Btn :not(:first-child) {
        display: none;
    }
    .vowels3Btn :not(:first-child) {
        display: none;
    }
    .vowels4Btn :not(:first-child) {
        display: none;
    }
    .wrapper {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
        padding: 10px;
        gap: 16px;
        justify-content: center;
        align-content: flex-start;
        grid-template-rows: auto auto auto 1fr;
    }
    .mark {
        display: none;
    }
    .caption {
        grid-column-end: span 1;
    }
    .caption span:nth-child(2) {
        display: none;
    }
    .mask button {
        height: 30px;
        font-size: 16px;
    }
    .mask input {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    .mask .buttons {
        flex-wrap: wrap;
        width: 240px;
    }
    .buttons button {
        width: 40px;
    }
    .buttons .randBtn {
        width: 240px;
    }
    .buttons button:last-child {
        display: none;
    }
    .mask {
        grid-column-end: span 1;
    }
    h2 {
        text-align: center;
        font-size: 16px;
    }
    .abc {
        padding-right: 0;
        gap: 0
    }
    .abc>:first-child {
        margin-bottom: 20px;
    }
    .abc>:nth-child(2) {
        padding-bottom: 8px;
    }
    .chars {
        grid-template-columns: repeat(11, auto);
        justify-content: center;
        gap: 8px;
    }
    .char {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    .char .tooltip {
        display: none;
    }
    .abc>:last-child {
        display: none;
    }
    .words {
        font-size: 14px;
        gap: 8px;
    }
    .words span {
        padding: 0 4px;
        height: 20px;
        line-height: 20px;
    }
    .green {
        color: black;
        border: none;
    }
    .test {
        color: black;
    }
    .strange {
        color: black;
    }
    .name {
        color: black;
    }
    .info {
        right: 8px;
    }
}
