        html {
            scroll-behavior: smooth;
        }

        /* ===== Адаптивный слой (для корректной вставки в тему WordPress) ===== */
        #pbsTestRoot,
        #pbsTestRoot *,
        #pbsTestRoot *::before,
        #pbsTestRoot *::after {
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
        }

        #pbsTestRoot {
            overflow-x: hidden;
            width: 100%;
        }

        #pbsTestRoot img,
        #pbsTestRoot svg {
            max-width: 100%;
            height: auto;
        }

        #pbsTestRoot .diagram,
        #pbsTestRoot .svg {
            width: 100%;
            height: auto;
            display: block;
        }

        /* Canvas: Chart.js использует свои inline-стили, их это правило не
           перебивает, а вот "рукописный" canvas #sanCanvas без этого правила
           вылезал за пределы экрана на узких устройствах */
        #pbsTestRoot canvas {
            max-width: 100%;
            height: auto;
            display: block;
            margin: 0 auto;
        }

        /* Планшеты и узкие ноутбуки */
        @media (max-width: 768px) {
            #pbsTestRoot .test_wrapper {
                margin: 15px auto 80px auto !important;
                padding: 8px;
            }

            #pbsTestRoot .compatGauge--small {
                min-width: 130px;
            }
        }

        @media (max-width: 480px) {
            #pbsTestRoot {
                font-size: 14px;
            }

            #pbsTestRoot .test_wrapper {
                margin: 10px auto 60px auto !important;
                padding: 6px;
            }

            /* Инпуты и "селекты" не меньше 16px, иначе iOS Safari
               автоматически зумит страницу при фокусе на поле */
            #pbsTestRoot input,
            #pbsTestRoot .choiseSell,
            #pbsTestRoot .choiseSell2 {
                font-size: 16px;
            }

            /* Ряд кнопок-оценок теста САН: разрешаем перенос,
               чтобы кнопки не сжимались в кашу на очень узких экранах */
            #pbsTestRoot .btnWrapper {
                padding: 0 5px;
                -ms-flex-wrap: wrap;
                flex-wrap: wrap;
                row-gap: 8px;
            }

            #pbsTestRoot .mainPageBtnWrapper {
                padding: 10px;
            }

            #pbsTestRoot .compatGauge--small {
                width: 44%;
            }

            #pbsTestRoot .compatGauge--big {
                width: 96%;
            }
        }

        @media (max-width: 360px) {
            #pbsTestRoot .btn {
                width: 26px;
                padding: 4px;
            }
        }
        /* ===== конец адаптивного слоя ===== */

        body {
            margin: 0;
            padding: 0;
            border: 0;
            font-family: ReithSans, Arial, Helvetica, freesans, sans-serif;
            font-size: 16px;
            line-height: 1.3;
            background: #f4f1f1;
        }

        a {
            text-align: left;
            font-size: 20px;
            font-weight: bold;
            color: white;
            text-decoration: none;
            padding: 10px;
            margin: 5px;
        }

        a:hover {
            background: #3e4199;
        }

        h2 {
            text-align: center;
            color: darkred;
            margin: 10px;
        }

        h3,
        h4 {
            text-align: center;
            color: rgb(39, 10, 229);
        }

        .test_wrapper {
            max-width: 800px;
            border-radius: 15px;
            border: 1px solid rgba(196, 193, 188, 0.401);
            background: -o-linear-gradient(135deg, rgba(171, 190, 175, 0.401), rgba(196, 255, 209, 0.401), rgba(221, 235, 184, 0.401));
            background: linear-gradient(-45deg, rgba(171, 190, 175, 0.401), rgba(196, 255, 209, 0.401), rgba(221, 235, 184, 0.401));
            -webkit-box-shadow: 3px 3px 10px rgba(31, 4, 236, 0.18);
            box-shadow: 3px 3px 10px rgba(31, 4, 236, 0.18);
            padding: 10px;
            margin: 20px auto 120px auto !important;
        }

        .testHeader {
            width: 100%;
            position: relative;
        }

        .svg {
            height: -webkit-fit-content;
            height: -moz-fit-content;
            height: fit-content;
            margin-bottom: 20px;
            width: 100%;
            border-radius: 10px;
        }

        .headerH1 {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            color: white;
            text-shadow: 3px 3px 6px #3a673cc9;
        }

        .stop-1 {
            -webkit-animation: colors 12s infinite;
            animation: colors 12s infinite;
            -webkit-animation-delay: -3;
            animation-delay: -3;
        }

        .stop-2 {
            -webkit-animation: colors 12s infinite;
            animation: colors 12s infinite;
            -webkit-animation-delay: -3;
            animation-delay: -3;
        }

        .stop-3 {
            -webkit-animation: colors 12s infinite;
            animation: colors 12s infinite;
            -webkit-animation-delay: -6;
            animation-delay: -6;
        }

        @-webkit-keyframes colors {
            15% {
                stop-color: crimson;
            }

            30% {
                stop-color: gold;
            }

            45% {
                stop-color: teal;
            }

            60% {
                stop-color: yellowgreen;
            }

            75% {
                stop-color: orangered;
            }

            90% {
                stop-color: purple;
            }
        }

        @keyframes colors {
            15% {
                stop-color: crimson;
            }

            30% {
                stop-color: gold;
            }

            45% {
                stop-color: teal;
            }

            60% {
                stop-color: yellowgreen;
            }

            75% {
                stop-color: orangered;
            }

            90% {
                stop-color: purple;
            }
        }

        .audio_mark_block {
            margin: 0 5px 20px auto;
            height: 30px;
            max-width: 185px;
            width: -webkit-fit-content;
            width: -moz-fit-content;
            width: fit-content;
            border: 1px solid #cfcdcd;
            border-radius: 20px;
            background: rgba(174, 195, 175, 0.401);
            -webkit-box-shadow: 3px 3px 10px rgba(87, 86, 86, 0.18);
            box-shadow: 3px 3px 10px rgba(87, 86, 86, 0.18);
            -webkit-transition: background .2s ease;
            -o-transition: background .2s ease;
            transition: background .2s ease;
        }

        .audio_mark {
            cursor: pointer;
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: end;
            -ms-flex-pack: end;
            justify-content: flex-end;
            width: 100%;
            height: 100%;
            padding: 0 12px 0 14px;
            outline: none;
        }

        .audio_mark_text {
            font-size: 12px;
            font-weight: bold;
            color: #b35918db;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-right: 8px;
            -webkit-transition: color .2s ease;
            -o-transition: color .2s ease;
            transition: color .2s ease;
        }

        .audio_mark_dot {
            -webkit-box-flex: 0;
            -ms-flex: 0 0 18px;
            flex: 0 0 18px;
            width: 18px;
            height: 18px;
            border: 4px solid #817df5;
            border-radius: 50%;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            background: #ff8b51;
            -webkit-transition: background .2s ease, border-color .2s ease;
            -o-transition: background .2s ease, border-color .2s ease;
            transition: background .2s ease, border-color .2s ease;
        }

        .audio_mark2 .audio_mark_text {
            color: #2b3fb0;
        }

        .audio_mark2 .audio_mark_dot {
            border-color: #2b3fb0;
            background: transparent;
        }

        .blockWrapper {
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-pack: center;
            -ms-flex-pack: center;
            justify-content: center;
            -webkit-box-align: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-orient: vertical;
            -webkit-box-direction: normal;
            -ms-flex-direction: column;
            flex-direction: column;
            width: 98%;
            border: 1px solid rgba(187, 184, 181, 0.401);
            background: rgb(232, 238, 234);
            border-radius: 15px;
            padding: 10px;
            margin-bottom: 20px;
            -webkit-box-shadow: 4px 4px 10px rgba(81, 81, 81, 0.18);
            box-shadow: 4px 4px 10px rgba(81, 81, 81, 0.18);
        }

        .mainPageBtnWrapper {
            width: 95%;
            margin-bottom: 40px;
            display: inline-block;
            text-align: center;
            padding: 20px;
            border-radius: 15px;
        }

        .btnStart {
            font-size: 20px;
            color: blue;
            margin: 20px auto;
            border: none;
            border-radius: 35px;
            border: 1px solid rgba(62, 146, 206, 0.562);
            padding: 6px 22px 5px 22px;
            background: rgba(99, 181, 239, 0.562);
            -webkit-box-shadow: 3px 3px 10px rgba(31, 4, 236, 0.401);
            box-shadow: 3px 3px 10px rgba(31, 4, 236, 0.401);
        }

        .btnStart:hover {
            cursor: pointer;
            color: white;
            background: rgba(46, 91, 226, 0.624);
        }

        .mainPageBtn {
            position: relative;
            margin: 10px;
        }

        .mainPageBtn span {
            color: rgb(35, 5, 156);
            position: absolute;
            font-family: sans-serif;
            font-size: 14px;
            line-height: 1.4;
            bottom: 0;
            left: 50%;
            -webkit-transform: translateX(-50%);
            -ms-transform: translateX(-50%);
            transform: translateX(-50%);
            width: 260px;
            max-width: 80vw;
            word-wrap: break-word;
            overflow-wrap: break-word;
            padding: 10px;
            border-radius: 10px;
            background: rgb(255, 255, 255);
            -webkit-box-shadow: 3px 3px 10px rgba(31, 4, 236, 0.2);
            box-shadow: 3px 3px 10px rgba(31, 4, 236, 0.2);
            visibility: hidden;
            opacity: 0;
            z-index: 2;
        }

        .mainPageBtn span:before {
            /* Треугольничек */
            content: '';
            width: 0;
            height: 0;
            border-left: 11px solid transparent;
            border-right: 11px solid transparent;
            border-top: 11px solid rgb(255, 255, 255);
            position: absolute;
            bottom: -10px;
            left: 50%;
            -webkit-transform: translateX(-50%);
            -ms-transform: translateX(-50%);
            transform: translateX(-50%);
        }

        .mainPageBtn:hover span,
        .mainPageBtn:focus-visible span {
            bottom: 50px;
            visibility: visible;
            opacity: 1;
            -webkit-animation: spanAnimation .5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            animation: spanAnimation .5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }

        @-webkit-keyframes spanAnimation {
            0% {
                bottom: 0;
                opacity: 0;
            }

            100% {
                bottom: 50px;
                opacity: 1;
            }
        }

        @keyframes spanAnimation {
            0% {
                bottom: 0;
                opacity: 0;
            }

            100% {
                bottom: 50px;
                opacity: 1;
            }
        }

        .formWrapper {
            display: -ms-grid;
            display: grid;
            grid-gap: 2px;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            border-radius: 15px;
            padding: 10px;
        }

        .form {
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-pack: center;
            -ms-flex-pack: center;
            justify-content: center;
            -webkit-box-align: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-orient: vertical;
            -webkit-box-direction: normal;
            -ms-flex-direction: column;
            flex-direction: column;
            margin: 5px auto;
            padding: 20px 10px;
            background: rgb(240, 244, 240);
            border: 1px solid rgba(176, 177, 177, 0.401);
            -webkit-box-shadow: 3px 3px 10px rgb(73, 119, 82);
            box-shadow: 3px 3px 10px rgb(73, 119, 82);
            border-radius: 10px;
            width: -webkit-fit-content;
            width: -moz-fit-content;
            width: fit-content;
        }

        .arrow {
            text-align: center;
            font-size: 50px;
            color: blue;
            margin: -25px;
        }

        input {
            width: 85px;
            border: 1px solid rgb(213, 210, 210);
            border-radius: 5px;
            padding: 7px;
        }

        input::-webkit-input-placeholder {
            color: #c90505;
        }

        input::-moz-placeholder {
            color: #c90505;
        }

        input:-ms-input-placeholder {
            color: #c90505;
        }

        input::-ms-input-placeholder {
            color: #c90505;
        }

        input::placeholder {
            color: #c90505;
        }

        table {
            margin: 10px;
        }

        .choiseSell {
            position: relative;
            padding: 5px;
            background: rgb(255, 255, 255);
            border: 1px solid rgb(213, 210, 210);
            border-radius: 5px;
        }

        .choiseSell:hover .ul {
            display: block;
            top: 25px;
            height: 200px;
            opacity: 1;
            -webkit-animation: ulAnimation .5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            animation: ulAnimation .5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }

        @-webkit-keyframes ulAnimation {
            0% {
                top: 200px;
                height: 0px;
                opacity: 0;
            }

            100% {
                top: 25px;
                height: 200px;
                opacity: 1;
            }
        }

        @keyframes ulAnimation {
            0% {
                top: 200px;
                height: 0px;
                opacity: 0;
            }

            100% {
                top: 25px;
                height: 200px;
                opacity: 1;
            }
        }

        .choiseSell::before {
            content: attr(data-content);
            color: #c90505;
            font-size: 14px;
        }

        .choiseSell2::before {
            content: attr(data-content);
            color: #000000;
            font-size: 16px;
        }

        .ul {
            display: none;
            opacity: 0;
            position: absolute;
            top: 200px;
            left: 50px;
            list-style-type: none;
            height: 0px;
            overflow: auto;
            padding: 0;
            margin: 0;
            color: transparent;
            font-size: 16px;
            border-radius: 10px;
            z-index: 9;
        }

        .li {
            padding: 0 25px 0 20px;
            background: #ffffff;
            color: #2e00fa;
            z-index: 99;
        }

        .li:hover {
            background: rgb(179, 250, 198);
            z-index: 99;
        }

        .liForList {
            margin-bottom: 7px;
        }

        .btnBlock {
            width: 90%;
            border: 1px solid rgba(180, 180, 180, 0.401);
            background: -o-linear-gradient(135deg, rgba(0, 197, 39, 0.21), rgba(147, 224, 163, 0.21), rgba(0, 181, 36, 0.21));
            background: linear-gradient(-45deg, rgba(0, 197, 39, 0.21), rgba(147, 224, 163, 0.21), rgba(0, 181, 36, 0.21));
            padding: 10px;
            border-radius: 15px;
            margin: 10px;
            -webkit-box-shadow: 4px 4px 10px rgba(45, 45, 45, 0.18);
            box-shadow: 4px 4px 10px rgba(45, 45, 45, 0.18);
        }

        .sanMob {
            width: 100%;
            padding: 10px 0 !important;
        }

        .btnWrapper {
            padding: 0 20px;
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -ms-flex-pack: distribute;
            justify-content: space-around;
            margin-bottom: 20px;
        }

        .btn {
            width: 30px;
            color: blue;
            margin: 10px 0;
            border: 1px solid rgba(11, 130, 214, 0.562);
            border-radius: 50%;
            padding: 5px;
            background: rgba(99, 181, 239, 0.562);
            -webkit-box-shadow: 3px 3px 10px rgba(31, 4, 236, 0.401);
            box-shadow: 3px 3px 10px rgba(31, 4, 236, 0.401);
            z-index: 1;
        }

        .btn:hover {
            background: rgba(46, 91, 226, 0.624);
            cursor: pointer;
            color: white;
        }

        .btnMini {
            font-size: 20px;
            background: none;
            border: 1px solid #03078c;
            border-radius: 15px;
            color: #03078c;
            -webkit-box-shadow: none;
            box-shadow: none;
            cursor: pointer;
            padding: 2px 10px;
            margin: 0 10px;
        }

        .btnMini:hover {
            padding: 2px 8.5px;
            border: 1px solid rgb(173, 4, 4);
            color: rgb(173, 4, 4);
            font-weight: bold;
        }

        .diagramBlock {
            width: 100%;
            margin-bottom: 40px;
        }

        .diagram {
            border: 1px solid rgb(190, 188, 188);
            border-radius: 2%;
            -webkit-box-shadow: 3px 3px 10px rgb(164, 164, 164);
            box-shadow: 3px 3px 10px rgb(164, 164, 164);
        }

        /* ===== Диаграмма совместимости (циферблаты со стрелками) ===== */
        .compatCard {
            max-width: 620px;
            margin: 0 auto;
            border: 1px solid rgb(190, 188, 188);
            border-radius: 12px;
            overflow: hidden;
            -webkit-box-shadow: 3px 3px 10px rgb(164, 164, 164);
            box-shadow: 3px 3px 10px rgb(164, 164, 164);
            background: #fff;
        }

        .compatCard__head {
            background: #eae6db;
            padding: 16px 20px;
        }

        .compatCard__title {
            margin: 0 0 10px 0;
            text-align: center;
            font-style: italic;
            font-weight: bold;
            color: #b92406;
        }

        .compatCard__persons {
            font-style: italic;
            font-weight: bold;
            color: #190574;
            font-size: 14px;
            line-height: 1.5;
        }

        .compatGauges {
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-pack: center;
            -ms-flex-pack: center;
            justify-content: center;
            -webkit-box-align: start;
            -ms-flex-align: start;
            align-items: flex-start;
            gap: 10px;
            flex-wrap: wrap;
            padding: 20px 10px 4px 10px;
        }

        .compatGauges--main {
            padding-top: 0;
        }

        .compatGauge {
            text-align: center;
        }

        .compatGauge--small {
            width: 42%;
            max-width: 230px;
            min-width: 160px;
        }

        .compatGauge--big {
            width: 90%;
            max-width: 420px;
        }

        .compatGauge__svg {
            width: 100%;
            height: auto;
            display: block;
        }

        .compatGauge__needle {
            -webkit-transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
            -o-transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
            transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .compatGauge__endLabel {
            font-family: sans-serif;
            font-weight: bold;
            font-size: 15px;
            fill: #262626;
        }

        .compatGauge__zeroLabel {
            font-family: sans-serif;
            font-weight: bold;
            font-size: 17px;
            fill: #262626;
        }

        .compatGauge--big .compatGauge__endLabel,
        .compatGauge--big .compatGauge__zeroLabel {
            font-size: 19px;
        }

        .compatGauge__value {
            font-weight: bold;
            font-size: 22px;
            margin-top: -6px;
        }

        .compatGauge--big .compatGauge__value {
            font-size: 40px;
            margin-top: -10px;
        }

        .compatGauge__value--year {
            color: #2d2fa8;
        }

        .compatGauge__value--month {
            color: #227a2e;
        }

        .compatGauge__value--general {
            color: #d8460a;
        }

        .compatGauge__label {
            font-weight: bold;
            font-size: 14px;
            line-height: 1.25;
        }

        .compatGauge--big .compatGauge__label {
            font-size: 20px;
        }

        .compatGauge__label--year {
            color: #2d2fa8;
        }

        .compatGauge__label--month {
            color: #227a2e;
        }

        .compatGauge__label--general {
            color: #d8460a;
        }

        .compatCard__foot {
            background: #eae6db;
            padding: 14px 16px;
            text-align: center;
            font-style: italic;
            font-weight: bold;
            font-size: 15px;
            color: #190574;
        }

        .compatCard__foot span {
            font-style: italic;
        }

        .overflow {
            height: 200px;
            width: 80%;
            overflow: auto;
            margin: 10px;
            padding: 5px 10px;
            margin-bottom: 20px;
            border: 1px solid rgba(184, 156, 122, 0.401);
            -webkit-box-shadow: 3px 3px 10px rgb(164, 164, 164);
            box-shadow: 3px 3px 10px rgb(164, 164, 164);
            background: rgba(216, 193, 165, 0.401);
            border-radius: 10px;
        }

        .overflow::-webkit-scrollbar {
            width: 10px;
        }

        .overflow::-webkit-scrollbar-track {
            -webkit-box-shadow: 5px 5px 5px -5px rgb(139, 127, 89) inset;
            background: #f9f9fd;
            border-radius: 10px;
        }

        .overflow::-webkit-scrollbar-thumb {
            border-radius: 10px;
            background: -webkit-gradient(linear, left top, left bottom, from(#b37d32), to(#cbae85));
            background: linear-gradient(180deg, #b37d32, #cbae85);
        }

        .display_NONE {
            display: none;
        }

        .el_show {
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-pack: center;
            -ms-flex-pack: center;
            justify-content: center;
            -webkit-box-align: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-orient: vertical;
            -webkit-box-direction: normal;
            -ms-flex-direction: column;
            flex-direction: column;
            -webkit-animation: blockOpacity 1.0s cubic-bezier(.25, .1, .25, 1);
            animation: blockOpacity 1.0s cubic-bezier(.25, .1, .25, 1);
        }

        @-webkit-keyframes blockOpacity {
            0% {
                opacity: 0;
            }

            100% {
                opacity: 1;
            }
        }

        @keyframes blockOpacity {
            0% {
                opacity: 0;
            }

            100% {
                opacity: 1;
            }
        }

.compatibility-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, sans-serif;
    padding: 10px;
}

.rings-row {
    display: flex;
    justify-content: space-evenly; /* Равномерные отступы от краев и между элементами */
    align-items: center;
    width: 100%;
}

.rings-row--small {
    margin-bottom: 30px;
}

/* Маленькие кольца: 20% ширины блока */
.ring-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20%;
    min-width: 80px;
}

/* Большое кольцо: 60% ширины блока */
.ring-card--large {
    width: 60%;
    min-width: 180px;
}

.ring-chart-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;       /* центрирование по вертикали */
    justify-content: center;   /* центрирование по горизонтали */
}

.ring-label {
    margin-top: 10px;
    font-size: clamp(12px, 1.5vw, 15px);
    font-weight: 500;
    color: #333;
    text-align: center;
}

.ring-label--large {
    font-weight: 600;
    font-size: clamp(15px, 2.2vw, 20px);
}

@media (max-width: 480px) {
    .rings-row--small {
        flex-wrap: wrap;
        gap: 15px 0;
    }
    
    .ring-card {
        width: 28%;
    }

    .ring-card--large {
        width: 80%; /* На очень узких экранах смартфонов расширяем до 80%, чтобы не было мелким */
    }
}
