/* Скрипт 1 - Оптимизированная версия */

:focus {
    outline: none;
}

.clear {
    clear: both;
}

.numercols {
    max-width: 950px;
    margin: auto;
}

.numercol {
    float: left;
    width: 40%;
    padding: 5px 10px 5px;
    margin: 0 5%;
    box-sizing: border-box;
    font-size: 16px;
}

.numercol.man, .numercol.woman, .numercol.soyuzbtn {
    padding: 0px 20px;
}

.numercol100, .numercol100 table {
    width: 100%;
    padding: 0;
    margin: 0;
}

.numercol:nth-of-type(3), .numercol:nth-of-type(3) td, 
.numercol100 td, .numercol.man .res td, .numercol.woman .res td {
    line-height: 26px;
}

.numercol:nth-of-type(3) img {
    width: calc(100% + 60px);
    margin: 0 -30px;
}

.numercol:nth-of-type(2), .soyuz .numercol {
    text-align: center;
    line-height: normal;
}

.numercol input {
    width: 60px !important;
    border: 2px solid #667eea !important;
    border-radius: 6px;
    line-height: 45px;
    display: inline-block;
    margin: 0px 5px 10px 0;
    text-align: center;
    font-size: 28px !important;
    padding: 0 !important;
    font-family: "Arial";
}

.numercol input[name=y] {
    margin-right: 0px;
    width: 90px !important;
}

.numercol input.nonact {
    border-color: #eeeeee !important;
}

.res .numercol input {
    margin: 0px 10px 0 0;
}

.inputintro {
    margin: 0 0 30px 0;
}

.inputintro span {
    text-transform: uppercase;
}

/* Центрированные кнопки */
.inputbtn {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 auto;
    max-width: 400px;
}

.inputbtn button {
    width: calc(33.3333% - 10px);
    box-sizing: border-box;
    border: 5px solid #fff;
    border-radius: 60px;
    background-color: #8671cc;
    color: #ffffff;
    font-weight: 300;
    font-size: 40px;
    cursor: pointer;
    outline: none;
    padding: 0;
    text-align: center;
    font-family: "Arial";

}

.inputbtn button:nth-of-type(10) {
    width: calc(66.6666% - 10px);
}

/* Специальные стили для блока с кнопками ввода */
.soyuzbtn {
    text-align: center;
    width: 100% !important;
    float: none !important;
    margin: 20px auto !important;
    padding: 0 !important;
    max-width: 300px !important;
    clear: both;
    display: block;
}

.soyuzbtn .inputbtn {
    max-width: 300px;
}

/* Стили для кнопок в результатах */
.numercol.res .inputbtn,
.man .res .inputbtn,
.woman .res .inputbtn {
    margin-top: 30px;
    max-width: 300px;
}

.numercol.res .inputbtn button:nth-of-type(10),
.numercol.res .inputbtn button:nth-of-type(11) {
    display: none;
}

.numercol.res button,
.man .res button,
.woman .res button {
    background-color: #ffffff00;
    color: #4D4D4D;
    font-weight: 300;
    font-size: 24px;
    word-break: break-all;
}

/* Границы для кнопок в таблице 3x3 */
.numercol.res button:nth-of-type(5),
.man .res button:nth-of-type(5),
.woman .res button:nth-of-type(5) {
    border: 2px solid #ddd;
    border-radius: 0px;
}

.numercol.res button:nth-of-type(1),
.man .res button:nth-of-type(1),
.woman .res button:nth-of-type(1) {
    border-right: 2px solid #ddd;
    border-bottom: 2px solid #ddd;
    border-top: 2px solid #ffffff00;
    border-left: 2px solid #ffffff00;
    border-radius: 0px;
}

.numercol.res button:nth-of-type(2),
.man .res button:nth-of-type(2),
.woman .res button:nth-of-type(2) {
    border-right: 2px solid #ddd;
    border-bottom: 2px solid #ddd;
    border-left: 2px solid #ddd;
    border-top: 2px solid #ffffff00;
    border-radius: 0px;
}

.numercol.res button:nth-of-type(3),
.man .res button:nth-of-type(3),
.woman .res button:nth-of-type(3) {
    border-bottom: 2px solid #ddd;
    border-left: 2px solid #ddd;
    border-top: 2px solid #ffffff00;
    border-right: 2px solid #ffffff00;
    border-radius: 0px;
}

.numercol.res button:nth-of-type(4),
.man .res button:nth-of-type(4),
.woman .res button:nth-of-type(4) {
    border-top: 2px solid #ddd;
    border-bottom: 2px solid #ddd;
    border-right: 2px solid #ddd;
    border-left: 2px solid #ffffff00;
    border-radius: 0px;
}

.numercol.res button:nth-of-type(6),
.man .res button:nth-of-type(6),
.woman .res button:nth-of-type(6) {
    border-top: 2px solid #ddd;
    border-bottom: 2px solid #ddd;
    border-left: 2px solid #ddd;
    border-right: 2px solid #ffffff00;
    border-radius: 0px;
}

.numercol.res button:nth-of-type(7),
.man .res button:nth-of-type(7),
.woman .res button:nth-of-type(7) {
    border-top: 2px solid #ddd;
    border-right: 2px solid #ddd;
    border-left: 2px solid #ffffff00;
    border-bottom: 2px solid #ffffff00;
    border-radius: 0px;
}

.numercol.res button:nth-of-type(8),
.man .res button:nth-of-type(8),
.woman .res button:nth-of-type(8) {
    border-right: 2px solid #ddd;
    border-top: 2px solid #ddd;
    border-left: 2px solid #ddd;
    border-bottom: 2px solid #ffffff00;
    border-radius: 0px;
}

.numercol.res button:nth-of-type(9),
.man .res button:nth-of-type(9),
.woman .res button:nth-of-type(9) {
    border-top: 2px solid #ddd;
    border-left: 2px solid #ddd;
    border-bottom: 2px solid #ffffff00;
    border-right: 2px solid #ffffff00;
    border-radius: 0px;
}

/* Прочие стили */
.numercol .res.sudseg {
    color: blue;
}

.numercol .res.volseg {
    color: red;
}

.cross_dt {
    color: #800000;
    font: 400 18px Arial;
    padding: 20px 0;
    text-align: center;
}

.calcagane {
    display: none;
    cursor: pointer;
    background-color: #752da5;
    padding: 14px 0;
    text-align: center;
    font: 300 20px Arial;
    color: #ffffff;
    clear: both;
    border-radius: 90px;
    margin: 10px 40px 50px 40px;
}

.man .res,
.woman .res {
    display: none;
}

.man div.res,
.woman div.res {
    margin-left: 0px;
}

.man .res table tr:first-child td,
.woman .res table tr:first-child td {
    padding-top: 30px;
}

.soyuzbtn .moretxt,
.soyuzagane {
    display: none;
    text-align: left;
    line-height: 1.6;
}

.soyuzagane {
    display: none;
    cursor: pointer;
    background: rgb(var(--theme-important_button));
    width: 250px;
    margin-left: auto;
    margin-right: auto;
    padding: 14px 0;
    text-align: center;
    font: 300 20px Arial;
    color: #ffffff;
    clear: both;
    border-radius: 60px;
    margin-bottom: 40px;
}

.woman .inputintro {
    opacity: 0;
}

.pol {
    margin: 5px 2px 30px 2px;
    width: calc(33.3333% - 4px);
    border: 1px solid #7FB2FF;
    border-radius: 3px;
    box-sizing: border-box;
    height: 50px;
    color: #7FB2FF;
    line-height: 50px;
    display: inline-block;
    cursor: pointer;
}

.pol.sel {
    color: #fff;
    background-color: #7FB2FF;
}

img.graf {
    max-width: 100%;
}

/* Адаптивные стили */
@media screen and (max-width: 820px) {
    .numercol {
        width: 50%;
        margin: 0;
        padding: 20px 10px 30px;
    }
    .numercol100 {
        width: 100%;
    }
}

@media screen and (max-width: 660px) {
    .numercol {
        width: 80%;
        margin: 0 10%;
        padding: 20px 10px 30px;
    }
    .numercol100 {
        padding: 20px 5px;
    }
    .man .inputintro,
    .woman .inputintro {
        margin: 10px auto;
    }
}

@media screen and (max-width: 420px) {
    .numercol {
        width: 100%;
        margin: 0;
        padding: 20px 10px 30px;
    }
    .numercol100 {
        padding: 20px 5px;
    }
    .inputbtn button {
        width: calc(33.3333% - 8px);
        
        font-size: 35px;
    }
    .inputbtn button:nth-of-type(10) {
        width: calc(66.6666% - 8px);
    }
    .soyuzbtn .inputbtn {
        max-width: 280px;
    }
}

@media screen and (max-width: 360px) {
    .tab {
        padding: 20px 0px;
        font-size: 18px;
    }
    .numercol100 {
        padding: 20px 5px;
    }
}

@media screen and (max-width: 340px) {
    .numercol input {
        width: 20%;
        box-sizing: border-box;
        margin-right: 1%;
        font-size: 30px !important;
    }
    .numercol input[name=y] {
        margin-right: 0px;
        width: 40%;
    }
    .inputbtn button {
        font-size: 30px;
    }
    .soyuzbtn .inputbtn {
        max-width: 260px;
    }
}

@media screen and (max-width: 300px) {
    .tab {
        font-size: 16px;
    }
}