/* =====================================================================
   Стили пакета форм (tools/assets/css/forms.css)
   ---------------------------------------------------------------------
   Все правила ограничены префиксом tf- (tools forms), поэтому файл
   безопасно подключать к любой готовой странице: он не переопределяет
   чужие классы.

   Цвета берутся из CSS-переменных темы, если они заданы на странице
   (--acc, --acc-2, --text, --muted, --stroke, --radius и т. д.).
   Если переменных нет — работает фирменная палитра по умолчанию.

   Совместимость: обычный CSS без сборки и препроцессоров.
   ===================================================================== */

.tf-form,
.tf-quiz,
.tf-modal,
.tf-toast {
    --tf-acc:       var(--acc, #54cd03);
    --tf-acc-2:     var(--acc-2, #43a802);
    --tf-acc-deep:  var(--acc-deep, #2f7d02);
    --tf-ink:       var(--ink, #04140b);
    --tf-text:      var(--text, #e9f7ee);
    --tf-muted:     var(--muted, #a4c2b0);
    --tf-muted-2:   var(--muted-2, #7d9c88);
    --tf-panel:     var(--panel, rgba(190, 255, 150, .045));
    --tf-panel-2:   var(--panel-2, rgba(190, 255, 150, .075));
    --tf-stroke:    var(--stroke, rgba(190, 255, 150, .11));
    --tf-stroke-2:  var(--stroke-2, rgba(190, 255, 150, .19));
    --tf-radius:    var(--radius, 22px);
    --tf-radius-sm: var(--radius-sm, 14px);
    --tf-font:      var(--font, "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif);
    --tf-err:       #ff7a6b;
    --tf-ok:        #7ce65a;
    --tf-grad:      linear-gradient(120deg, #a8ef5c 0%, #54cd03 45%, #43a802 100%);
}

/* Запасной фон для страниц без тёмной темы (только внутри окна пакета) */
.tf-form {
    position: relative;
    display: block;
    font-family: var(--tf-font);
    color: var(--tf-text);
    box-sizing: border-box;
}

.tf-form *,
.tf-form *::before,
.tf-form *::after,
.tf-quiz *,
.tf-quiz *::before,
.tf-quiz *::after {
    box-sizing: border-box;
}

/* ---------- Заголовки формы ---------- */
.tf-form__title {
    margin: 0 0 6px;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 800;
    color: var(--tf-text);
}

.tf-form__sub {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--tf-muted);
}

/* Компактный вариант формы «подбор по VIN»: блоки VIN и фото СТС идут
   подряд, разделитель «или» разводит их по смыслу. */
.tf-form--vin .tf-field + .tf-field {
    margin-top: 4px;
}

/* ---------- Поля ---------- */
.tf-field {
    display: block;
    margin: 0 0 14px;
}

.tf-field > label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tf-muted);
}

.tf-field input[type="text"],
.tf-field input[type="tel"],
.tf-field input[type="email"],
.tf-field input[type="search"],
.tf-field textarea {
    display: block;
    width: 100%;
    padding: 13px 15px;
    font: inherit;
    font-size: 15px;
    line-height: 1.35;
    color: var(--tf-text);
    background: rgba(4, 14, 9, .55);
    border: 1px solid var(--tf-stroke-2);
    border-radius: var(--tf-radius-sm);
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
    -webkit-appearance: none;
    appearance: none;
}

.tf-field textarea {
    min-height: 88px;
    resize: vertical;
}

.tf-field input::placeholder,
.tf-field textarea::placeholder {
    color: var(--tf-muted-2);
    opacity: .8;
}

.tf-field input:focus,
.tf-field textarea:focus {
    border-color: var(--tf-acc);
    background: rgba(4, 20, 11, .75);
    box-shadow: 0 0 0 3px rgba(84, 205, 3, .16);
}

.tf-field input:required:invalid:not(:placeholder-shown),
.tf-field textarea:required:invalid:not(:placeholder-shown) {
    border-color: rgba(255, 122, 107, .55);
}

.tf-field__hint {
    display: block;
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--tf-muted-2);
}

.tf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Поле-ловушка для ботов: спрятано, но не через display:none —
   часть ботов пропускает такие поля. */
.tf-trap {
    position: absolute !important;
    left: -9999px !important;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}
/* ---------- Способы связи: радиокнопки-плитки ---------- */
.tf-ways {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 4px 0 16px;
}

.tf-way {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 12px;
    font-size: 13.5px;
    line-height: 1.3;
    color: var(--tf-muted);
    background: var(--tf-panel);
    border: 1px solid var(--tf-stroke);
    border-radius: var(--tf-radius-sm);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.tf-way input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}

.tf-way__text::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 7px;
    vertical-align: -2px;
    border: 2px solid var(--tf-stroke-2);
    border-radius: 50%;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.tf-way:hover {
    border-color: var(--tf-stroke-2);
    color: var(--tf-text);
}

.tf-way input:checked ~ .tf-way__text {
    color: var(--tf-text);
}

.tf-way input:checked ~ .tf-way__text::before {
    border-color: var(--tf-acc);
    box-shadow: inset 0 0 0 3px var(--tf-acc);
}

.tf-way input:focus-visible ~ .tf-way__text::before {
    box-shadow: 0 0 0 3px rgba(84, 205, 3, .25);
}

/* ---------- Согласие с политикой ---------- */
.tf-consent {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--tf-muted);
    cursor: pointer;
}

.tf-consent input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}

.tf-consent__box {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border: 1.5px solid var(--tf-stroke-2);
    border-radius: 5px;
    background: rgba(4, 14, 9, .55);
    transition: background .18s ease, border-color .18s ease;
}

.tf-consent input:checked + .tf-consent__box {
    background-color: var(--tf-acc);
    border-color: var(--tf-acc);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.8' fill='none' stroke='%23041409' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: 14px 14px;
    background-position: center;
    background-repeat: no-repeat;
}

.tf-consent input:focus-visible + .tf-consent__box {
    box-shadow: 0 0 0 3px rgba(84, 205, 3, .25);
}

.tf-consent__text a,
.tf-consent a {
    color: var(--tf-acc);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---------- Кнопки мессенджеров под формой ---------- */
.tf-mess {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 14px 0 0;
}

.tf-mess__note {
    font-size: 12px;
    line-height: 1.4;
    color: var(--tf-muted-2);
}

.tf-mess__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tf-mess__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--tf-text);
    text-decoration: none;
    background: var(--tf-panel-2);
    border: 1px solid var(--tf-stroke-2);
    border-radius: 99px;
    transition: border-color .16s ease, background .16s ease;
}

.tf-mess__item:hover {
    border-color: var(--tf-acc);
    background: rgba(84, 205, 3, .14);
}

.tf-mess__item span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tf-acc);
}

.tf-mess__item--whatsapp span { background: #25d366; }
.tf-mess__item--telegram span { background: #2aabee; }
.tf-mess__item--max      span { background: #7c5cff; }
.tf-mess__item--viber    span { background: #7360f2; }

/* ---------- Кнопка и статус ---------- */
.tf-actions {
    margin: 0;
}

.tf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px 20px;
    font: inherit;
    font-size: 15.5px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    color: var(--tf-ink);
    background: var(--tf-grad);
    border: 0;
    border-radius: var(--tf-radius-sm);
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
    box-shadow: 0 12px 26px -16px rgba(84, 205, 3, .8);
}

.tf-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 16px 30px -16px rgba(84, 205, 3, .9);
}

.tf-btn:active {
    transform: translateY(0);
}

.tf-btn[disabled] {
    opacity: .72;
    cursor: default;
    transform: none;
    filter: none;
}

.tf-btn--block {
    display: flex;
    width: 100%;
}

.tf-btn--ghost {
    color: var(--tf-text);
    background: var(--tf-panel);
    border: 1px solid var(--tf-stroke-2);
    box-shadow: none;
}

.tf-status {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.45;
}

.tf-status:empty {
    display: none;
}

.tf-status--ok {
    color: var(--tf-ok);
}

.tf-status--err {
    color: var(--tf-err);
}

.tf-note {
    margin: 12px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--tf-muted-2);
}

.tf-note a {
    color: var(--tf-acc);
    text-decoration: none;
}

.tf-note a:hover {
    text-decoration: underline;
}

/* ---------- Сообщение после отправки без JavaScript ---------- */
.tf-flash {
    margin: 0 0 16px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--tf-text);
    background: var(--tf-panel);
    border: 1px solid var(--tf-stroke-2);
    border-radius: var(--tf-radius-sm);
}

.tf-flash--ok {
    border-color: rgba(124, 230, 90, .45);
    background: rgba(124, 230, 90, .1);
}

.tf-flash--err {
    border-color: rgba(255, 122, 107, .45);
    background: rgba(255, 122, 107, .1);
}

/* =====================================================================
   Квиз подбора стекла
   ===================================================================== */
.tf-quiz {
    font-family: var(--tf-font);
    color: var(--tf-text);
    background: var(--tf-panel);
    border: 1px solid var(--tf-stroke);
    border-radius: var(--tf-radius);
    padding: 22px;
    box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .75);
}

.tf-quiz__top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.tf-quiz__cap {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--tf-acc);
}

.tf-quiz__cap--link {
    text-decoration: none;
    border-bottom: 1px dashed rgba(84, 205, 3, .45);
}

.tf-quiz__cap--link:hover {
    border-bottom-color: var(--tf-acc);
}

.tf-quiz__count {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--tf-muted-2);
    text-transform: uppercase;
}

.tf-quiz__bar {
    height: 6px;
    margin: 0 0 18px;
    border-radius: 99px;
    background: rgba(190, 255, 150, .1);
    overflow: hidden;
}

.tf-quiz__bar span {
    display: block;
    height: 100%;
    width: 20%;
    border-radius: inherit;
    background: var(--tf-grad);
    transition: width .28s ease;
}

.tf-quiz__panel {
    display: none;
}

.tf-quiz__panel.is-active {
    display: block;
    animation: tf-fade .22s ease both;
}

@keyframes tf-fade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

.tf-quiz__q {
    margin: 0 0 14px;
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--tf-text);
}

.tf-quiz__opts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0 0 4px;
}

.tf-quiz__opt {
    display: block;
    width: 100%;
    padding: 14px 14px;
    font: inherit;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
    color: var(--tf-text);
    background: rgba(4, 14, 9, .5);
    border: 1px solid var(--tf-stroke-2);
    border-radius: var(--tf-radius-sm);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.tf-quiz__opt small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--tf-muted-2);
}

.tf-quiz__opt:hover {
    border-color: var(--tf-acc);
    background: rgba(84, 205, 3, .1);
    transform: translateY(-1px);
}

.tf-quiz__opt.is-selected {
    border-color: var(--tf-acc);
    background: rgba(84, 205, 3, .16);
    box-shadow: inset 0 0 0 1px rgba(84, 205, 3, .35);
}

.tf-quiz__select {
    display: block;
    width: 100%;
    padding: 13px 15px;
    font: inherit;
    font-size: 15px;
    color: var(--tf-text);
    background: rgba(4, 14, 9, .55);
    border: 1px solid var(--tf-stroke-2);
    border-radius: var(--tf-radius-sm);
    outline: none;
}

.tf-quiz__select:focus {
    border-color: var(--tf-acc);
    box-shadow: 0 0 0 3px rgba(84, 205, 3, .16);
}

.tf-quiz__select option {
    color: #0b1d13;
    background: #f2fbf4;
}

.tf-quiz__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.tf-quiz__nav .tf-btn {
    flex: 1 1 140px;
}

.tf-quiz__back {
    flex: 0 0 auto;
    padding: 15px 18px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--tf-muted);
    background: transparent;
    border: 1px solid var(--tf-stroke-2);
    border-radius: var(--tf-radius-sm);
    cursor: pointer;
    transition: color .16s ease, border-color .16s ease;
}

.tf-quiz__back:hover {
    color: var(--tf-text);
    border-color: var(--tf-acc);
}

.tf-quiz__hint {
    margin: -6px 0 16px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--tf-muted-2);
}

.tf-quiz__label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tf-muted);
}

.tf-quiz__input {
    display: block;
    width: 100%;
    margin: 0 0 0;
    padding: 13px 15px;
    font: inherit;
    font-size: 15px;
    color: var(--tf-text);
    background: rgba(4, 14, 9, .55);
    border: 1px solid var(--tf-stroke-2);
    border-radius: var(--tf-radius-sm);
    outline: none;
}

.tf-quiz__input::placeholder {
    color: var(--tf-muted-2);
}

.tf-quiz__input:focus {
    border-color: var(--tf-acc);
    box-shadow: 0 0 0 3px rgba(84, 205, 3, .16);
}

.tf-quiz__next {
    flex: 1 1 140px;
    padding: 15px 20px;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    color: var(--tf-ink);
    background: var(--tf-grad);
    border: 0;
    border-radius: var(--tf-radius-sm);
    cursor: pointer;
    transition: filter .16s ease, transform .16s ease;
}

.tf-quiz__next:hover {
    filter: brightness(1.06);
}

.tf-quiz__noscript {
    margin: 0 0 14px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--tf-text);
    background: rgba(255, 122, 107, .1);
    border: 1px solid rgba(255, 122, 107, .4);
    border-radius: var(--tf-radius-sm);
}

.tf-quiz__noscript a {
    color: var(--tf-acc);
}

/* Сводка выбранного */
.tf-quiz__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 14px;
}

.tf-quiz__chip {
    display: inline-block;
    padding: 6px 10px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--tf-text);
    background: rgba(84, 205, 3, .14);
    border: 1px solid rgba(84, 205, 3, .3);
    border-radius: 99px;
}

/* Экран «спасибо» */
.tf-quiz__result {
    text-align: center;
    padding: 8px 4px 4px;
}

.tf-quiz__result-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background-color: var(--tf-acc);
    background-image: linear-gradient(120deg, #a8ef5c 0%, #54cd03 45%, #43a802 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.8' fill='none' stroke='%23041409' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: 100% 100%, 26px 26px;
    background-position: center;
    background-repeat: no-repeat;
}

.tf-quiz__result h3 {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 800;
    color: var(--tf-text);
}

.tf-quiz__result p {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--tf-muted);
}

.tf-quiz__result .tf-quiz__summary {
    justify-content: center;
}

.tf-quiz__result-btn {
    margin-bottom: 10px;
    text-decoration: none;
}

.tf-quiz__reset {
    display: inline-block;
    padding: 6px 4px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--tf-muted);
    background: transparent;
    border: 0;
    border-bottom: 1px dashed var(--tf-stroke-2);
    cursor: pointer;
}

.tf-quiz__reset:hover {
    color: var(--tf-text);
    border-bottom-color: var(--tf-acc);
}
/* =====================================================================
   Загрузка файлов (фото СТС, документы)
   ===================================================================== */
.tf-drop {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(4, 14, 9, .45);
    border: 1px dashed var(--tf-stroke-2);
    border-radius: var(--tf-radius-sm);
    transition: border-color .18s ease, background .18s ease;
}

.tf-drop.is-drag,
.tf-drop:hover {
    border-color: var(--tf-acc);
    background: rgba(84, 205, 3, .08);
}

.tf-drop__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.tf-drop__label {
    display: flex;
    flex: 1 1 200px;
    align-items: center;
    gap: 12px;
    min-width: 0;
    cursor: pointer;
}

.tf-drop__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background-color: rgba(84, 205, 3, .12);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 16V4m0 0L7.5 8.5M12 4l4.5 4.5M4 15v3a2 2 0 002 2h12a2 2 0 002-2v-3' fill='none' stroke='%2354cd03' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: 22px 22px;
    background-position: center;
    background-repeat: no-repeat;
}

.tf-drop__body {
    min-width: 0;
}

.tf-drop__title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--tf-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tf-drop__hint {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--tf-muted-2);
}

.tf-drop__clear {
    flex: 0 0 auto;
    padding: 7px 12px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--tf-err);
    background: transparent;
    border: 1px solid rgba(255, 122, 107, .45);
    border-radius: 99px;
    cursor: pointer;
}

.tf-drop__clear:hover {
    background: rgba(255, 122, 107, .12);
}

.tf-drop__clear[hidden] {
    display: none;
}

/* Разделитель «или» между VIN и фото СТС */
.tf-vin__input {
    font-family: "SFMono-Regular", Consolas, "Courier New", monospace;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.tf-vin__or {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 14px;
    font-size: 12px;
    color: var(--tf-muted-2);
    text-transform: lowercase;
}

.tf-vin__or::before,
.tf-vin__or::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--tf-stroke);
}
/* =====================================================================
   Модальное окно (форма внутри .tf-modal)
   ===================================================================== */
.tf-modal {
    position: fixed;
    inset: 0;
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity .18s ease;
    -webkit-overflow-scrolling: touch;
}

.tf-modal[hidden] {
    display: none;
}

.tf-modal.is-open {
    opacity: 1;
}

.tf-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(2, 8, 5, .74);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.tf-modal__win {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #08150f;
    border: 1px solid var(--tf-stroke-2);
    border-radius: var(--tf-radius);
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9);
    transform: translateY(14px) scale(.99);
    transition: transform .2s ease;
}

.tf-modal.is-open .tf-modal__win {
    transform: none;
}

.tf-modal__body {
    padding: 26px 24px 22px;
}

.tf-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    font: inherit;
    font-size: 20px;
    line-height: 1;
    color: var(--tf-muted);
    background: var(--tf-panel);
    border: 1px solid var(--tf-stroke);
    border-radius: 50%;
    cursor: pointer;
    transition: color .16s ease, border-color .16s ease;
}

.tf-modal__close:hover {
    color: var(--tf-text);
    border-color: var(--tf-acc);
}

.tf-modal .tf-form__title {
    padding-right: 34px;
}

body.is-modal-open {
    overflow: hidden;
}

/* =====================================================================
   Всплывающие уведомления (toast)
   ===================================================================== */
.tf-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 9995;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 520px;
    padding: 13px 18px;
    font-family: var(--tf-font, "Manrope", Arial, sans-serif);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #e9f7ee;
    background: #0c1b12;
    border: 1px solid rgba(84, 205, 3, .45);
    border-radius: 14px;
    box-shadow: 0 24px 50px -22px rgba(0, 0, 0, .9);
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.tf-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.tf-toast--err {
    border-color: rgba(255, 122, 107, .5);
}

.tf-toast--err .tf-toast__icon {
    color: #ff7a6b;
}

.tf-toast__icon {
    flex: 0 0 auto;
    font-size: 16px;
    color: #7ce65a;
}

.tf-toast__msg {
    flex: 1 1 auto;
    min-width: 0;
}

.tf-toast__close {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    padding: 0;
    font: inherit;
    font-size: 17px;
    line-height: 1;
    color: var(--tf-muted, #a4c2b0);
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
}

.tf-toast__close:hover {
    color: #e9f7ee;
}

/* =====================================================================
   Адаптивность
   ===================================================================== */
@media (max-width: 560px) {
    .tf-row,
    .tf-ways,
    .tf-quiz__opts {
        grid-template-columns: 1fr;
    }

    .tf-quiz {
        padding: 18px 16px;
        border-radius: 14px;
    }

    .tf-modal {
        padding: 12px;
        align-items: flex-end;
    }

    .tf-modal__win {
        max-width: 100%;
        max-height: calc(100vh - 24px);
        border-radius: 14px;
    }

    .tf-modal__body {
        padding: 22px 18px 18px;
    }

    .tf-toast {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
        transform: translateY(20px);
    }

    .tf-toast.is-visible {
        transform: none;
    }
}

/* Уважаем настройку «меньше анимации» в системе */
@media (prefers-reduced-motion: reduce) {
    .tf-quiz__panel.is-active,
    .tf-toast,
    .tf-modal,
    .tf-modal__win,
    .tf-quiz__bar,
    .tf-btn {
        animation: none !important;
        transition: none !important;
    }
}