@charset "UTF-8";
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}
.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    height: var(--header-height);
    position: relative;
    top: 0;
    z-index: var(--z-sticky);
    transition: background-color var(--transition-base), border-color var(--transition-base);
}
.header-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
}
.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: var(--font-size-xl);
    flex-shrink: 0;
}
.header-logo img {
    width: 160px;
    height: auto;
    image-rendering: auto;
}
.header-logo .logo-light { display: block; }
.header-logo .logo-dark { display: none; }
[data-theme="dark"] .header-logo .logo-light { display: none; }
[data-theme="dark"] .header-logo .logo-dark { display: block; }
.auth-logo .logo-light { display: block; }
.auth-logo .logo-dark { display: none; }
[data-theme="dark"] .auth-logo .logo-light { display: none; }
[data-theme="dark"] .auth-logo .logo-dark { display: block; }
.header-nav {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: nowrap;
    order: 1;
}
.header-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    transition: color var(--transition-fast), background-color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}
.header-nav a:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}
.header-nav .has-submenu { position: relative; }
.header-nav .nav-submenu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    white-space: nowrap;
    transition: color var(--transition-fast), background-color var(--transition-fast);
}
.header-nav .nav-submenu-toggle .chevron { font-size: var(--font-size-xs); transition: transform var(--transition-fast); }
.has-submenu.open > .nav-submenu-toggle .chevron { transform: rotate(180deg); }

.header-nav .nav-submenu {
    position: absolute;
    top: calc(100% + var(--space-sm));
    left: 0;
    min-width: 230px;
    padding: var(--space-xs);
    display: flex;
    flex-direction: column;
    gap: var(--space-hairline);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity var(--transition-popup), transform var(--transition-popup), visibility var(--transition-popup);
    z-index: var(--z-sticky);
}
.header-nav .nav-submenu a {
    width: 100%;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    padding: var(--space-12);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    white-space: nowrap;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}
.header-nav .nav-submenu a:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}
.has-submenu.open > .nav-submenu-toggle {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}
.has-submenu.open > .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (hover: hover) {
    .header-nav .has-submenu:hover > .nav-submenu-toggle {
        color: var(--text-primary);
        background-color: var(--bg-tertiary);
    }
    .header-nav .has-submenu:hover > .nav-submenu-toggle .chevron {
        transform: rotate(180deg);
    }
    .header-nav .has-submenu:hover > .nav-submenu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.header-nav .has-submenu:focus-within > .nav-submenu-toggle {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}
.header-nav .has-submenu:focus-within > .nav-submenu-toggle .chevron {
    transform: rotate(180deg);
}
.header-nav .has-submenu:focus-within > .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-nav.open {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    transform: none !important;
    pointer-events: auto !important;
    z-index: var(--z-sticky) !important;
}
.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
    order: 2;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.theme-toggle:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color-strong);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }
[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.btn-login {
    background: var(--bg-inverse);
    color: var(--text-inverse);
    border: none;
    height: 44px;
    padding: 0 var(--space-md);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    transition: opacity var(--transition-fast), background var(--transition-fast);
    white-space: nowrap;
    line-height: 1;
}
.btn-login i {
    line-height: 1;
    font-size: var(--font-size-lg);
}
.btn-login:hover {
    opacity: 0.9;
    color: var(--text-inverse);
    background: var(--bg-inverse);
}
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
}
/* Тап всегда попадает в кнопку, а не в иконку внутри неё */
.mobile-menu-toggle i {
    pointer-events: none;
}
.header-nav .mobile-theme-toggle {
    display: none;
}
.mobile-nav-actions {
    display: none;
}
.site-main {
    flex: 1 0 auto;
    padding: var(--gap-section) 0;
}
.site-main > .container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: var(--space-3xl) 0 calc(var(--space-lg) + env(safe-area-inset-bottom, 0px)) 0;
    margin-top: var(--space-xl);
    flex-shrink: 0;
}
.footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}
.footer-brand p {
    color: var(--footer-text);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    margin: var(--space-md) 0;
}
.footer-column h3 {
    color: var(--footer-heading);
    font-size: var(--font-size-base);
    margin-bottom: var(--space-md);
    font-weight: 600;
}
.footer-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
.notice-card {
    max-width: 500px;
    margin: var(--space-3xl) auto;
    padding: var(--space-2xl);
}
.notice-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
}
.notice-message {
    line-height: 1.6;
    margin-bottom: var(--space-xl);
    font-size: var(--font-size-lg);
}
.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.footer-column a {
    color: var(--footer-link);
    font-size: var(--font-size-sm);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.footer-column a:hover {
    color: var(--footer-link-hover);
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--footer-text);
    font-size: var(--font-size-sm);
}
.footer-social {
    display: flex;
    gap: var(--space-md);
}
.footer-social a {
    color: var(--footer-text);
    font-size: 1.4rem;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
}
.footer-social a:hover {
    opacity: 1;
    color: var(--footer-text);
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}
.verify-code-inline { margin-top: var(--space-sm); }
.verify-code-inline-row { display: flex; gap: var(--space-sm); align-items: center; }
.form-control.verify-code-input-inline { width: 120px; text-align: center; font-size: 1.2rem; letter-spacing: 4px; font-family: monospace; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0 var(--space-md);
    height: var(--btn-height);
    font-family: inherit;
    font-size: var(--font-size-sm);
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
    white-space: nowrap;
    user-select: none;
}
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
/* Поле выбора файла спрятано как .u-visually-hidden — кольцо фокуса рисуем на кнопке-обёртке:
   у самого поля оно попадает в невидимую коробку. */
.btn:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.btn--primary { background: var(--accent-primary); color: var(--text-inverse); }
.btn--primary:hover { background: var(--accent-primary-hover); color: var(--text-inverse); }
.btn--secondary { background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--border-color); }
.btn--secondary:hover { background: var(--border-color); }
.btn--success { background: var(--accent-success); color: var(--text-inverse); }
.btn--success:hover { background: var(--accent-success-hover); color: var(--text-inverse); }
.btn--danger { background: var(--accent-danger); color: var(--text-inverse); }
.btn--danger:hover { background: var(--accent-danger-hover); color: var(--text-inverse); }
.btn--warning { background: var(--accent-warning); color: var(--text-inverse); }
.btn--warning:hover { background: var(--accent-warning-hover); color: var(--text-inverse); }
.btn--outline-primary { background: transparent; color: var(--accent-primary); border-color: var(--accent-primary); }
.btn--outline-primary:hover { background: var(--accent-primary); color: var(--text-inverse); border-color: var(--accent-primary); }
.btn--outline-danger { background: transparent; color: var(--accent-danger); border-color: var(--accent-danger); }
.btn--outline-danger:hover { background: var(--accent-danger); color: var(--text-inverse); border-color: var(--accent-danger); }
.btn--xs { height: var(--btn-height-xs); padding: 0 var(--space-sm); font-size: var(--font-size-xs); }
.btn--sm { height: var(--btn-height-sm); padding: 0 var(--space-sm); font-size: var(--font-size-xs); }
.form-group { margin-bottom: var(--field-gap); }
.form-group label, .form-label, .filter-group label, .collection-filter-label {
    display: block;
    margin-bottom: var(--label-gap);
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
}
.form-group label.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.form-control,
.form-input,
.form-select,
.filter-select-trigger,
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group input[type="search"],
.form-group input[type="date"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    height: var(--input-height);
    padding: 0 var(--space-md);
    font-family: inherit;
    font-size: var(--font-size-base);
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
textarea.form-control, textarea.form-input, textarea.form-select, .form-group textarea { height: auto; min-height: var(--textarea-min-height); padding: var(--space-sm) var(--space-md); resize: vertical; }
/* Скроллбар в формах — свой, в стиле сайта: тонкая прозрачная дорожка и ползунок из палитры.
   Firefox и Chromium берут стандартные scrollbar-width/scrollbar-color (в Chromium они отменяют
   ::-webkit-scrollbar), Safari псевдоэлементы не понимает — поэтому нужны оба варианта.
   Список один на все прокручиваемые места форм; панели подсказок и выпадающих списков объявлены
   в services-core.css, но цвета скроллбара живут здесь — рядом с остальными стилями форм.
   Лента и списки чата тоже здесь: chat.css — автономный контур, но токены скроллбара общие. */
:is(textarea, .filter-select-dropdown, .autocomplete-results, .profile-city-suggestions, .pet-select-dropdown, .pair-create-search-results, .modal, .pet-modal-body, .journal-editor, .chat-messages, .chat-dialog-list, .chat-suggest) { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track); }
:is(textarea, .filter-select-dropdown, .autocomplete-results, .profile-city-suggestions, .pet-select-dropdown, .pair-create-search-results, .modal, .pet-modal-body, .journal-editor, .chat-messages, .chat-dialog-list, .chat-suggest)::-webkit-scrollbar { width: var(--scrollbar-size); height: var(--scrollbar-size); background: var(--scrollbar-track); }
:is(textarea, .filter-select-dropdown, .autocomplete-results, .profile-city-suggestions, .pet-select-dropdown, .pair-create-search-results, .modal, .pet-modal-body, .journal-editor, .chat-messages, .chat-dialog-list, .chat-suggest)::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: var(--radius-full); }
:is(textarea, .filter-select-dropdown, .autocomplete-results, .profile-city-suggestions, .pet-select-dropdown, .pair-create-search-results, .modal, .pet-modal-body, .journal-editor, .chat-messages, .chat-dialog-list, .chat-suggest)::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }
/* Кроме `.form-group select` и `.form-select` — ещё и `select.form-control`: такие селекты стоят вне
   `.form-group` (например, «Пол» и карточки родителей на форме выпуска документа, в голых `<div>`
   и `.ped-parent-block`), и раньше они получали коробку от `.form-control`, но системную стрелку. */
.form-group select,
.form-select,
select.form-control,
.filter-select-trigger {
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23738276' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: var(--select-gutter);
}
.form-control:focus,
.form-input:focus,
.form-select:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: var(--focus-ring);
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .form-group textarea:focus {
    box-shadow: var(--focus-ring);
}
.form-control:disabled,
.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background: var(--bg-tertiary);
    cursor: not-allowed;
    opacity: 0.7;
}
.form-control.is-invalid, .form-group input.is-invalid,
.form-group select.is-invalid, .form-group textarea.is-invalid { border-color: var(--accent-danger); }
.form-hint { display: block; margin-top: var(--space-xs); color: var(--text-muted); font-size: var(--font-size-xs); }
/* Подсказка-абзац: стоит перед группой полей или разделом, а не под конкретным полем */
.form-hint--section { margin: 0 0 var(--space-sm); font-size: var(--font-size-sm); }
.form-hint--section a { color: var(--text-link); text-decoration: none; }
.form-hint--section a:hover { text-decoration: underline; }
/* Вводная подсказка в модальном окне — над содержимым, с отступом до него */
.form-hint--intro { margin: 0 0 var(--space-md); font-size: var(--font-size-sm); }
/* Подсказка под радиокнопкой: смещение под текст метки */
.form-hint--offset { margin-top: var(--space-sm); margin-left: var(--space-xl); font-size: var(--font-size-sm); }
/* Подсказка шага мастера регистрации */
.form-hint--step { margin: 0 0 var(--space-md); font-size: var(--font-size-sm); color: var(--text-secondary); line-height: 1.4; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.required { color: var(--accent-danger); }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* Своя панель выпадающего списка. Раскрывающийся список нативного <select> рисует операционная
   система, и CSS до него не достаёт, поэтому блок в main.js строит рядом свою панель, а нативный
   select оставляет в форме визуально скрытым: значение уходит в форму как обычно, и без JS всё
   работает системным списком. Правила живут в style.css, а не в services-core.css: списки есть на всех
   публичных страницах, а services-core.css грузится не везде (например, форма выпуска документа).
   Коробка триггера — из общего правила `.form-control` выше (height, border, стрелка). */
.filter-select { position: relative; }
.filter-select .filter-select-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-align: left;
    cursor: pointer;
}
.filter-select .filter-select-trigger:disabled { cursor: not-allowed; opacity: 0.7; }
.filter-select .filter-select-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-select.is-open .filter-select-trigger,
.filter-select .filter-select-trigger:focus-visible { border-color: var(--accent-primary); box-shadow: var(--focus-ring); outline: none; }
.filter-select .filter-select-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + var(--space-xs));
    /* Ровно по ширине поля: панель не должна быть шире закрытой коробки, иначе узкие
       колонки фильтров (например, «Категория» в чек-листах) выглядят разъехавшимися. */
    left: 0;
    right: 0;
    z-index: var(--z-dropdown);
    margin: 0;
    padding: var(--space-xs) 0;
    list-style: none;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
}
.filter-select.is-open .filter-select-dropdown { display: block; animation: popup-in var(--transition-popup) both; }
/* Внизу места не хватило (низ экрана, модалка) — панель раскрывается вверх от поля */
.filter-select.is-open.filter-select--up .filter-select-dropdown { top: auto; bottom: calc(100% + var(--space-xs)); }
@media (max-width: 900px) {
    .filter-select.is-open.filter-select--up .filter-select-dropdown { top: calc(100% + var(--space-xs)); bottom: auto; }
}
.filter-select .filter-select-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    /* Место под галочку справа: она абсолютная и не отнимает ширину у текста пункта */
    padding: var(--space-12) var(--space-28) var(--space-12) var(--space-md);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    cursor: pointer;
}
.filter-select .filter-select-option-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-select .filter-select-option:hover,
.filter-select .filter-select-option.is-active { background: var(--bg-secondary); }
.filter-select .filter-select-option[aria-selected="true"] { color: var(--accent-primary); font-weight: 600; }
.filter-select .filter-select-option .la-check { position: absolute; right: var(--space-sm); top: 50%; translate: 0 -50%; visibility: hidden; color: var(--accent-primary); font-size: var(--font-size-sm); }
.filter-select .filter-select-option[aria-selected="true"] .la-check { visibility: visible; }
/* Нативный селект остаётся в форме (отправляет значение), но не виден и не ловит клики.
   `:disabled` в списке — потому что общее правило `.form-group select:disabled` (opacity 0.7)
   специфичнее и иначе проступало бы сквозь нашу коробку. */
.filter-select .filter-select-native,
.filter-select .filter-select-native:disabled {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
/* Флажки и радио — единый компонент на нативном input.
   appearance: none снимает системный вид и открывает псевдоэлементы у самого input
   (Chrome/Safari/Firefox с 2017), поэтому разметку больше не нужно оборачивать
   скриптом (.ios-checkbox + .checkbox-wrapper/.checkbox-bg/.checkbox-icon). */
input[type="checkbox"],
input[type="radio"] {
    /* Контур галочки — тот же, что был в инлайн-SVG (M4 12L10 18L20 6).
       Цвет в data-URI не важен: маска использует только альфа-канал,
       а цвет приходит из background-color (он темизируется токеном). */
    --checkbox-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4 12L10 18L20 6' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    -webkit-appearance: none;
    appearance: none;
    display: inline-grid;
    place-content: center;
    width: var(--checkbox-size);
    height: var(--checkbox-size);
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    border: var(--checkbox-border-width) solid var(--accent-primary);
    border-radius: var(--radius-md);
    background-color: transparent;
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}
input[type="radio"] { border-radius: var(--radius-full); }
input[type="checkbox"]:hover,
input[type="radio"]:hover { transform: scale(1.05); }
input[type="checkbox"]:active,
input[type="radio"]:active { transform: scale(0.95); }
input[type="checkbox"]:checked,
input[type="radio"]:checked { background-color: var(--accent-primary); animation: checkbox-bounce var(--transition-base); }
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible { outline: var(--checkbox-border-width) solid var(--accent-primary); outline-offset: var(--checkbox-border-width); }
input[type="checkbox"]:disabled,
input[type="radio"]:disabled { opacity: 0.5; cursor: not-allowed; }
input[type="checkbox"]::after {
    content: '';
    width: calc(var(--checkbox-size) * 0.7);
    height: calc(var(--checkbox-size) * 0.7);
    background-color: var(--text-on-accent);
    -webkit-mask: var(--checkbox-mark) center / contain no-repeat;
    mask: var(--checkbox-mark) center / contain no-repeat;
    transform: scale(0);
    transition: transform var(--transition-fast);
}
input[type="checkbox"]:checked::after { transform: scale(1); }
input[type="radio"]::after {
    content: '';
    width: calc(var(--checkbox-size) * 0.4);
    height: calc(var(--checkbox-size) * 0.4);
    border-radius: var(--radius-full);
    background-color: var(--text-on-accent);
    transform: scale(0);
    transition: transform var(--transition-fast);
}
input[type="radio"]:checked::after { transform: scale(1); }
@keyframes checkbox-bounce { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

.checkbox { display: inline-flex; align-items: center; gap: var(--space-sm); cursor: pointer; user-select: none; }
.checkbox.u-items-start input { margin-top: var(--space-xs); align-self: flex-start; }
.form-group label.checkbox { display: inline-flex; margin-bottom: 0; font-weight: 400; }
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--card-padding);
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-md); padding-bottom: var(--space-md); border-bottom: 1px solid var(--border-color); }
.card-title { margin: 0 0 var(--space-lg); font-size: var(--font-size-xl); font-weight: 700; }
.alert { position: relative; padding: var(--space-md) var(--space-lg); padding-right: var(--space-2xl); border-radius: var(--radius-md); margin-bottom: var(--space-md); border-left: 4px solid; display: flex; align-items: center; gap: var(--space-sm); font-size: var(--font-size-sm); }

.alert-success { background: rgba(76, 140, 90, 0.10); color: var(--accent-success); border-left-color: var(--accent-success); }
.alert-danger, .alert-error { background: rgba(181, 77, 77, 0.10); color: var(--accent-danger); border-left-color: var(--accent-danger); }
.alert-warning { background: rgba(196, 138, 44, 0.12); color: var(--accent-warning); border-left-color: var(--accent-warning); }
.alert-info { background: rgba(58, 138, 155, 0.10); color: var(--accent-info); border-left-color: var(--accent-info); }
.alert-close { position: absolute; top: 50%; right: var(--space-md); transform: translateY(-50%); background: transparent; border: none; font-size: var(--font-size-xl); cursor: pointer; color: inherit; opacity: 0.6; line-height: 1; padding: 0; }
.alert-close:hover { opacity: 1; }
.badge { display: inline-flex; align-items: center; padding: var(--space-hairline) var(--space-12); font-size: var(--font-size-xs); font-weight: 600; border-radius: var(--radius-full); background: var(--bg-tertiary); color: var(--text-secondary); line-height: 1.4; }

.badge-primary { background: rgba(61, 122, 82, 0.14); color: var(--accent-primary); }
.badge-success { background: rgba(76, 140, 90, 0.16); color: var(--accent-success); }
.badge-danger { background: rgba(181, 77, 77, 0.16); color: var(--accent-danger); }
.badge-warning { background: rgba(196, 138, 44, 0.18); color: var(--accent-warning); }
.badge-info { background: rgba(58, 138, 155, 0.16); color: var(--accent-info); }
.chip { display: inline-flex; align-items: center; gap: var(--space-xs); padding: var(--space-xs) var(--space-12); background: var(--bg-tertiary); color: var(--text-primary); border-radius: var(--radius-full); font-size: var(--font-size-sm); text-decoration: none; transition: background-color var(--transition-fast), color var(--transition-fast); }
.chip-thumb { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border-color); background: var(--bg-secondary); }
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.table { width: 100%; border-collapse: collapse; background: var(--bg-primary); }
.table th, .table td { padding: var(--space-sm) var(--space-md); text-align: left; border-bottom: 1px solid var(--border-color); font-size: var(--font-size-sm); }
.table th { background: var(--bg-secondary); font-weight: 600; color: var(--text-secondary); font-size: var(--font-size-xs); text-transform: uppercase; letter-spacing: 0.5px; }
.table tbody tr { transition: background-color var(--transition-fast); }
.table tbody tr:hover { background: var(--bg-secondary); }
.pagination { --pagination-control-size: var(--space-40); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-sm); margin: var(--space-lg) 0; }

.pagination a, .pagination span { min-width: var(--pagination-control-size); height: var(--pagination-control-size); padding: 0 var(--space-xs); display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--radius-full); font-size: var(--font-size-sm); text-decoration: none; color: var(--text-secondary); background: transparent; transition: color var(--transition-fast), background-color var(--transition-fast); }
.pagination a:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.pagination .active, .pagination .pagination-current { background: var(--accent-primary); color: var(--text-inverse); pointer-events: none; }
.pagination .disabled, .pagination .pagination-disabled { opacity: 0.35; pointer-events: none; }
.pagination .pagination-jump-first, .pagination .pagination-jump-last { display: none; }
.pagination .pagination-arrow { padding: 0; }
.pagination .pagination-arrow i { font-size: var(--font-size-lg); }
.pagination a:focus-visible { outline: var(--space-hairline) solid var(--accent-primary); outline-offset: var(--space-hairline); }
.pagination .pagination-ellipsis { display: inline-flex; align-items: center; justify-content: center; min-width: var(--space-md); height: var(--pagination-control-size); color: var(--text-muted); }

@media (max-width: 480px) {
    .pagination { --pagination-control-size: var(--space-36); gap: var(--space-xs); flex-wrap: nowrap; }
    .pagination .pagination-tail { display: none; }
}
.modal { background: var(--bg-primary); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: var(--space-lg); }
.modal-footer { padding: var(--space-md) var(--space-lg); border-top: 1px solid var(--border-color); display: flex; gap: var(--space-sm); justify-content: flex-end; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.align-center { align-items: center; }
.text-success { color: var(--accent-success); }
.text-danger { color: var(--accent-danger); }
.text-warning { color: var(--accent-warning); }
.mb-0 { margin-bottom: 0; }
.py-3xl {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
}
.icon-ghost {
    font-size: 5rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}
.btn--vk {
    background: var(--oauth-vk);
    border-color: var(--oauth-vk);
    color: var(--text-on-brand);
}
.btn--vk:hover {
    background: var(--oauth-vk-hover);
    border-color: var(--oauth-vk-hover);
    color: var(--text-on-brand);
}
.btn--yandex {
    background: var(--oauth-yandex);
    border-color: var(--oauth-yandex);
    color: var(--text-on-brand);
}
.btn--yandex:hover {
    background: var(--oauth-yandex-hover);
    border-color: var(--oauth-yandex-hover);
    color: var(--text-on-brand);
}
.btn--link {
    background: none;
    border-color: transparent;
    color: var(--text-link);
}
.btn--link:hover {
    background: none;
    border-color: transparent;
    color: var(--text-link-hover);
    text-decoration: underline;
}
.lh-base { line-height: var(--line-height); }
.btn--full { width: 100%; justify-content: center; }
.text-xs { font-size: var(--font-size-xs); }
.color-link { color: var(--text-link); }
@media (max-width: 1100px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xl);
    }
}
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }
}

@media (max-width: 1279px) {
    .mobile-menu-toggle {
        display: inline-flex;
        transition: background-color var(--transition-fast);
    }
    .mobile-menu-toggle:hover { background: var(--bg-tertiary); }
    .header-logo {
        flex-shrink: 1;
    }
    .header-nav {
        position: absolute;
        top: calc(var(--header-height) + var(--space-xs));
        right: var(--container-padding);
        left: auto;
        width: 320px;
        max-width: calc(100vw - var(--container-padding) * 2);
        background: var(--header-bg);
        border: 1px solid var(--header-border);
        border-radius: var(--radius-lg);
        flex-direction: column;
        padding: var(--space-sm);
        box-shadow: var(--shadow-lg);
        align-items: stretch;
        /* Скрытие — через visibility, а не display: от display:none переход не запускается,
           и панель появлялась рывком (visibility:hidden убирает ссылки и из Tab-порядка).
           Раскрытие/закрытие задаёт .header-nav.open ниже. */
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px) scale(0.98);
        transform-origin: top right;
        transition: opacity var(--transition-menu), transform var(--transition-menu), visibility var(--transition-menu);
    }
    .header-nav a {
        width: 100%;
        padding: var(--space-sm) var(--space-md);
        border-radius: var(--radius-md);
        font-size: var(--font-size-base);
        min-height: 44px;
        display: flex;
        align-items: center;
        gap: var(--space-md);
    }
    .header-nav a i {
        font-size: var(--font-size-xl);
        width: 1.2em;
        text-align: center;
        flex-shrink: 0;
        line-height: 1;
    }

    /* Пункты в бургер-панели на 769–1279px: те же мобильные стили, что и на
       смартфонах, иначе кнопка «Проверка» не растягивается на всю ширину */
    .header-nav .has-submenu { width: 100%; }
    .header-nav .nav-submenu-toggle {
        width: 100%;
        min-height: 44px;
        padding: var(--space-sm) var(--space-md);
        border-radius: var(--radius-md);
        font-size: var(--font-size-base);
        justify-content: flex-start;
    }
    .header-nav .nav-submenu-toggle i.las:first-child { font-size: var(--font-size-xl); width: 1.2em; text-align: center; flex-shrink: 0; }
    .nav-submenu-toggle .chevron { margin-left: auto; }
    .header-nav .nav-submenu {
        position: static;
        display: none;
        min-width: 0;
        margin-top: var(--space-sm);
        box-shadow: none;
        border: none;
        border-radius: var(--radius-md);
        background: var(--bg-tertiary);
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    .header-nav .has-submenu.open > .nav-submenu { display: flex; }
    .header-nav .nav-submenu a {
        min-height: 40px;
        font-size: var(--font-size-base);
        white-space: normal;
        padding-left: calc(var(--space-md) * 1.8);
    }

    .header-actions .theme-toggle:not(.mobile-theme-toggle) {
        display: none;
    }
    .header-nav .mobile-theme-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: var(--radius-full);
        background: transparent;
        border: 1px solid var(--border-color);
        color: var(--text-secondary);
        font-size: var(--font-size-lg);
        padding: 0;
        transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    }
    .header-nav .mobile-theme-toggle:hover {
        background: var(--bg-tertiary);
        color: var(--text-primary);
        border-color: var(--border-color-strong);
    }
    .mobile-nav-actions {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: var(--space-sm);
        justify-content: center;
        margin-top: var(--space-sm);
        padding: var(--space-sm) 0 0;
        border-top: 1px solid var(--border-color);
    }
    .header-actions {
        gap: var(--space-xs);
    }
    .user-menu-trigger {
        max-width: none;
    }
    .user-dropdown {
        right: 0;
        min-width: 260px;
    }
    .header-actions {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    .user-menu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    .user-menu-trigger {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    .footer-column:last-child {
        display: none;
    }
    .footer-column a {
        font-size: var(--font-size-base);
        padding: var(--space-sm) 0;
    }
    .footer-column h3 {
        font-size: var(--font-size-base);
    }
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .site-footer {
        padding-bottom: calc(var(--space-sm) + env(safe-area-inset-bottom, 0px));
    }

    body.is-yandex .site-footer {
        padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    }
    .site-main > .container {
        padding: var(--space-md);
    }
}
@media (max-width: 480px) {
    .header-nav {
        width: auto;
        right: var(--space-sm);
        left: var(--space-sm);
        max-width: none;
    }
    .user-dropdown {
        min-width: 0;
        width: calc(100vw - var(--container-padding) * 2);
        right: 0;
    }
}

.lightbox-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.92); z-index: var(--z-lightbox); justify-content: center; align-items: center; opacity: 0; transition: opacity var(--transition-base); pointer-events: none; }
.lightbox-overlay.active { display: flex; opacity: 1; pointer-events: auto; }
.lightbox-content { position: relative; max-width: 90vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; }
.lightbox-image { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: var(--radius-md); box-shadow: var(--shadow-xl); }
.lightbox-caption { margin-top: var(--space-md); color: var(--text-inverse); font-size: var(--font-size-sm); text-align: center; max-width: 80vw; }
.lightbox-close { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,0.5); border: none; color: #fff; font-size: 28px; cursor: pointer; line-height: 1; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0; transition: background var(--transition-fast); z-index: 1; }
.lightbox-close:hover { background: rgba(0,0,0,0.8); }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.4); color: #fff; border: none; font-size: 28px; cursor: pointer; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0; transition: background var(--transition-fast); z-index: 1; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(0,0,0,0.7); }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-trigger { cursor: pointer; transition: transform var(--transition-fast); }
.lightbox-trigger:hover { transform: scale(1.02); }
.breadcrumbs { margin-bottom: var(--space-md); overflow-wrap: anywhere; opacity: 0.75; }
.breadcrumbs:hover { opacity: 1; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-xs); font-size: var(--font-size-xs); }
.breadcrumbs li { display: flex; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.breadcrumbs li:not(:last-child)::after { content: '›'; margin: 0 var(--space-xs); color: var(--text-muted); flex-shrink: 0; font-size: var(--font-size-sm); }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; overflow-wrap: anywhere; transition: color var(--transition-fast); }
.breadcrumbs a:hover { color: var(--text-primary); text-decoration: none; }
.avatar-svg { display: block; width: 100%; height: 100%; }

.user-menu { position: relative; }
.user-menu-trigger { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-xs) var(--space-sm) var(--space-xs) var(--space-xs); background: transparent; border: 1px solid var(--border-color); border-radius: var(--radius-full); cursor: pointer; color: var(--text-primary); font-size: var(--font-size-sm); font-weight: 500; transition: background-color var(--transition-fast), border-color var(--transition-fast); max-width: 220px; }
.user-menu-trigger:hover { background: var(--bg-tertiary); border-color: var(--border-color-strong); }
.user-menu-trigger .user-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.user-menu-trigger .user-avatar-placeholder { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-primary); color: var(--text-inverse); display: flex; align-items: center; justify-content: center; font-size: var(--font-size-sm); font-weight: 600; flex-shrink: 0; }
.user-menu-trigger .chevron { font-size: var(--font-size-xs); color: var(--text-muted); transition: transform var(--transition-fast); flex-shrink: 0; }
.user-menu.open .user-menu-trigger .chevron { transform: rotate(180deg); }
/* Высота триггера: аватар 32 + padding 2×4 + рамка 2. Отступ сверху считаем так,
   чтобы низ меню совпал с панелью бургер-меню: header-height + space-xs. */
.user-dropdown { position: absolute; top: calc(100% + (var(--header-height) - 42px) / 2 + var(--space-xs)); right: 0; min-width: 240px; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-8px) scale(0.98); transform-origin: top right; transition: opacity var(--transition-menu), transform var(--transition-menu), visibility var(--transition-menu); z-index: var(--z-sticky); overflow: hidden; }
.user-menu.open .user-dropdown { opacity: 1; visibility: visible; transform: none; }
.user-dropdown-header { padding: var(--space-md); border-bottom: 1px solid var(--border-color); background: var(--bg-secondary); }
.user-dropdown-header .user-info { display: flex; align-items: center; gap: var(--space-sm); }
.user-dropdown-header .user-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.user-dropdown-header .user-avatar-placeholder { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: var(--font-size-lg); font-weight: 600; flex-shrink: 0; }
.user-dropdown-header .user-details { overflow: hidden; line-height: 1.15; }
.user-dropdown-header .user-fullname { font-weight: 600; color: var(--text-primary); font-size: var(--font-size-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-dropdown-header .user-username { color: var(--text-muted); font-size: var(--font-size-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-dropdown-menu { padding: var(--space-xs) 0; list-style: none; margin: 0; }
.user-dropdown-menu li a, .user-dropdown-menu li button { display: flex; align-items: center; gap: var(--space-sm); width: 100%; padding: var(--space-sm) var(--space-md); background: transparent; border: none; color: var(--text-primary); font-size: var(--font-size-sm); text-decoration: none; cursor: pointer; text-align: left; font-family: inherit; transition: background var(--transition-fast); }
.user-dropdown-menu li a:hover, .user-dropdown-menu li button:hover { background: var(--bg-tertiary); }
.user-dropdown-menu li a i, .user-dropdown-menu li button i { font-size: var(--font-size-lg); color: var(--text-muted); width: 20px; text-align: center; flex-shrink: 0; }
.user-dropdown-menu .badge { margin-left: auto; }
.user-dropdown-menu .divider { height: 1px; background: var(--border-color); margin: var(--space-xs) 0; }
.user-dropdown-menu .logout-btn { color: var(--accent-danger); }
.user-dropdown-menu .logout-btn i { color: var(--accent-danger); }

@media (min-width: 769px) {
    .user-dropdown-header .user-fullname { font-size: 16px; }
    .user-dropdown-header .user-username { font-size: 14px; }
    .user-dropdown-header .user-avatar-placeholder { font-size: 21px; }
    .user-dropdown-menu li a, .user-dropdown-menu li button { font-size: 16px; }
    .user-dropdown-menu li a i, .user-dropdown-menu li button i { font-size: 21px; }
}
@media (max-width: 768px) {
    .user-dropdown-header .user-fullname { font-size: 16px; }
    .user-dropdown-header .user-username { font-size: 14px; }
    .user-dropdown-header .user-avatar-placeholder { font-size: 21px; }
    .user-dropdown-menu li a, .user-dropdown-menu li button { font-size: 17px; }
    .user-dropdown-menu li a i, .user-dropdown-menu li button i { font-size: 22px; }
}
.btn--info {
    background:var(--accent-info);
    color:var(--text-inverse);
}
.btn--info:hover {
    background:var(--accent-info);
    opacity:0.9;
}
.autocomplete-warning-header {
    padding: var(--space-xs) var(--space-md);
    background: var(--accent-warning-bg);
    color: var(--accent-warning);
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-bottom: 1px solid var(--accent-warning);
}
.autocomplete-item-forbidden {
    padding: var(--space-12) var(--space-md);
    cursor: pointer;
    border-bottom: 1px solid var(--accent-warning);
    background: var(--accent-warning-bg);
    transition: background var(--transition-fast);
}
.autocomplete-item-forbidden:hover {
    background:var(--accent-warning-bg-hover);
}
.autocomplete-item {
    padding: var(--space-12) var(--space-md);
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}
.autocomplete-item:hover {
    background:var(--bg-secondary);
}
.autocomplete-item--redbook {
    background: var(--accent-warning-bg);
    border-bottom-color: var(--accent-warning);
}
.autocomplete-item--redbook:hover {
    background: var(--accent-warning-bg-hover);
}
.toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    padding: var(--space-xs) 0;
    user-select: none;
}
.toggle-switch input[type="checkbox"] {
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    width: 44px;
    height: 24px;
    border: 0;
    background: var(--border-color);
    border-radius: var(--radius-full);
    position: relative;
    cursor: pointer;
    transition: background var(--transition-fast);
    flex-shrink: 0;
    margin: 0;
    vertical-align: middle;
}
.toggle-switch input[type="checkbox"]::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--bg-primary);
    border-radius: 50%;
    transition: transform var(--transition-fast);
    box-shadow: var(--shadow-sm);
}
.toggle-switch input[type="checkbox"]:checked {
    background: var(--accent-primary);
}
.toggle-switch input[type="checkbox"]:checked::before {
    transform: translateX(20px);
}
.toggle-switch input[type="checkbox"]:focus {
    outline: none;
    box-shadow: var(--focus-ring);
}
.toggle-switch input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
/* У переключателя своя геометрия — эффекты общего флажка (галочка, масштаб, отскок) не нужны */
.toggle-switch input[type="checkbox"]::after { content: none; }
.toggle-switch input[type="checkbox"]:hover,
.toggle-switch input[type="checkbox"]:active { transform: none; }
.toggle-switch input[type="checkbox"]:checked { animation: none; }
.toggle-text {
    font-weight: 500;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    z-index: var(--z-popup);
    display: flex;
    justify-content: center;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.97);
    transition: opacity var(--transition-menu), transform var(--transition-menu), visibility var(--transition-menu);
}
@media (max-width: 768px) {
    .cookie-popup {
        left: 16px !important;
        right: 16px !important;
        bottom: 20px !important;
        overflow: hidden;
        border-radius: var(--radius-lg) !important;
    }
    .cookie-popup__card {
        border-radius: var(--radius-lg) !important;
    }
}
.cookie-popup.is-visible {
    display: flex;
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
}
body.cookie-popup-visible .push-prompt {
    bottom: 120px;
}
@media (max-width: 768px) {
    body.cookie-popup-visible .push-prompt {
        bottom: 140px;
    }
}
/* кликабельна только карточка: контейнер на всю ширину пропускает клики */
.cookie-popup__card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-xl);
    box-shadow: var(--shadow-lg);
    max-width: 720px;
    width: 100%;
    overflow: hidden;
    pointer-events: auto;
}
.cookie-popup__content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
    min-width: 0;
}
.cookie-popup__text {
    flex: 1;
    min-width: 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: var(--line-height);
}
.cookie-popup__text p {
    margin: 0;
}
.cookie-popup__text .link-animated {
    color: var(--text-link);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--transition-fast);
}
.cookie-popup__text .link-animated:hover {
    color: var(--text-link-hover);
}
.cookie-popup__button {
    flex-shrink: 0;
    padding: var(--space-sm) var(--space-xl);
    background: var(--accent-primary);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
    white-space: nowrap;
}
.cookie-popup__button:hover {
    background: var(--accent-primary-hover);
}
.cookie-popup__button--secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.cookie-popup__button--secondary:hover {
    background: var(--bg-tertiary);
}
.cookie-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .cookie-popup {
        bottom: env(safe-area-inset-bottom, 0px);
        left: 0;
        right: 0;
    }
    .cookie-popup__card {
        flex-direction: column;
        text-align: center;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        padding: var(--space-md);
        gap: var(--space-sm);
    }
    .cookie-popup__content {
        flex-direction: column;
        gap: var(--space-md);
    }
}
/* Второй вид попапа — «Настройки cookie» (колонка вместо строки).
   Объявлено после мобильного медиазапроса: иначе он перекрывает gap на узких экранах. */
.cookie-popup__content--settings {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-12);
}
.cookie-popup__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cookie-popup__status {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}
.cookie-popup__status--on {
    color: var(--accent-primary);
}
.cookie-popup__note {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}
.contact-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}
.scroll-top {
    position: fixed;
    bottom: calc(var(--space-xl) + env(safe-area-inset-bottom, 0px));
    right: max(var(--space-xl), calc((100vw - var(--container-max)) / 2 - 60px));
    z-index: var(--z-sticky);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--transition-base), transform var(--transition-base), background var(--transition-fast);
    font-size: var(--font-size-lg);
    pointer-events: none;
}
.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.scroll-top:hover {
    background: var(--accent-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
@media (max-width: 640px) {
    .scroll-top {
        bottom: calc(var(--space-md) + env(safe-area-inset-bottom, 0px));
        right: max(var(--space-md), calc((100vw - var(--container-max)) / 2 - 48px));
        width: 44px;
        height: 44px;
        font-size: var(--font-size-base);
    }
    .scroll-top.visible {
        opacity: 0.7;
    }
}
/* скрыта, пока под ней ссылка/кнопка — класс вешает main.js */
.scroll-top.scroll-top--hidden {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
}
.badge--count[hidden] {
    display: none;
}

.badge--count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 var(--space-xs);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.badge--count.badge-danger {
    background: var(--accent-danger);
    color: var(--text-inverse);
}

.user-menu-badge {
    margin-left: auto;
}

/* Бейдж у аватарки компактнее меню: 16px, сидит на углу аватара */
.user-notif-badge {
    position: absolute;
    bottom: var(--space-hairline);
    left: 24px;
    min-width: 16px;
    height: 16px;
    padding: 0 var(--space-hairline);
    border-radius: var(--radius-full);
    font-size: 0.625rem;
    line-height: 1;
    justify-content: center;
    z-index: var(--z-base);
    box-shadow: var(--shadow-xs);
}
.link-button {
    background: none; border: none; color: inherit;
    cursor: pointer; padding: 0; font: inherit;
    text-decoration: underline;
}
.footer-logo { color: var(--footer-heading); }
.footer-logo img { height: 36px; width: auto; }
.user-dropdown-menu .user-dropdown-admin-link,
.user-dropdown-menu .user-dropdown-admin-link i { color: var(--accent-danger); }

.confirm-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: var(--z-popup); display: flex; align-items: center; justify-content: center; padding: var(--space-lg); padding-bottom: calc(var(--space-lg) + env(safe-area-inset-bottom, 0px)); opacity: 0; visibility: hidden; transition: opacity var(--transition-popup), visibility var(--transition-popup); }
.confirm-overlay.is-open { opacity: 1; visibility: visible; }
.confirm-modal { background: var(--bg-primary); border-radius: var(--radius-lg); padding: var(--space-xl); max-width: 420px; width: 100%; box-shadow: var(--shadow-xl); transform: translateY(8px) scale(0.97); transition: transform var(--transition-popup); }
.confirm-overlay.is-open .confirm-modal { transform: none; }
.confirm-modal p { margin: 0 0 var(--space-lg); font-size: var(--font-size-base); line-height: 1.5; color: var(--text-primary); white-space: pre-line; }
.confirm-actions { display: flex; gap: var(--space-sm); justify-content: flex-end; }

.crop-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: var(--z-popup); display: flex; align-items: center; justify-content: center; padding: var(--space-lg); padding-bottom: calc(var(--space-lg) + env(safe-area-inset-bottom, 0px)); opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s; }
.crop-overlay.is-open { opacity: 1; visibility: visible; }
.crop-modal { background: var(--bg-primary); border-radius: var(--radius-lg); padding: var(--space-lg); max-width: 560px; width: 100%; max-height: calc(100vh - 48px); overflow-y: auto; box-shadow: var(--shadow-xl); }
.crop-modal-title { margin: 0 0 var(--space-xs); font-size: var(--font-size-lg); font-weight: 700; color: var(--text-primary); }
.crop-modal-img-wrap { height: 50vh; min-height: 240px; max-height: 420px; background: var(--bg-tertiary); border-radius: var(--radius-md); overflow: hidden; }
.crop-modal-img-wrap img { display: block; max-width: 100%; }
.crop-modal-toolbar { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-sm); margin-top: var(--space-md); }
.crop-modal-zoom { display: flex; align-items: center; justify-content: center; gap: var(--space-md); }
.crop-modal-zoom-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border-color); background: var(--bg-primary); color: var(--text-primary); font-size: var(--font-size-xl); line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.crop-modal-zoom-btn:hover { border-color: var(--accent-primary); }
.crop-modal-actions { display: flex; gap: var(--space-sm); }
.crop-modal-actions .btn { flex: 1; justify-content: center; }
@media (max-width: 768px) {
    .site-header { position: sticky; }
}

.theme-segmented { display: none; gap: var(--space-hairline); padding: var(--space-xs); background: var(--bg-tertiary); border-radius: var(--radius-lg); }
.theme-seg-btn { flex: 1; height: 36px; display: flex; align-items: center; justify-content: center; border: none; background: transparent; color: var(--text-muted); border-radius: calc(var(--radius-lg) - 2px); cursor: pointer; font-size: var(--font-size-lg); transition: background var(--transition-fast), color var(--transition-fast); }
.theme-seg-btn:not(.active):hover { background: var(--bg-secondary); color: var(--text-primary); }
.theme-seg-btn.active { background: var(--bg-primary); color: var(--text-primary); box-shadow: var(--shadow-xs); }
@media (max-width: 1279px) { .theme-segmented { display: flex; } .header-actions .theme-toggle[data-desktop-toggle] { display: none; } }

.img-delete-btn { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,0.6); color: #fff; border: none; border-radius: 50%; width: 22px; height: 22px; font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.img-delete-parent { position: relative; display: inline-block; transition: opacity var(--transition-fast); }

.user-action-btn { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-full); }

.l-grid-full { grid-column: 1 / -1; }

.btn:active { transform: scale(0.97); }

.header-nav a:active { background: var(--bg-tertiary); }
.org-catalog-card:active { border-color: var(--accent-primary); opacity: 1; }
.user-menu-trigger:active { background: var(--bg-tertiary); }
.home-block-link:active { color: var(--text-link-hover); opacity: 0.7; }
a:active { opacity: 0.8; }
.mobile-menu-toggle:active, .theme-toggle:active, .pwa-back-btn:active { background: var(--bg-tertiary); }
.scroll-top:active { transform: scale(0.9); }
.cookie-popup__button:active { opacity: 0.85; }
.pagination a:active { background: var(--bg-tertiary); }
.chip:active { opacity: 0.8; }

.push-prompt {
  position: fixed !important;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-popup);
  display: flex;
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-md) var(--space-20);
  padding-right: var(--space-36);
  max-width: 480px;
  width: calc(100vw - 32px);
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  font-size: 0.95rem;
}
@media (max-width: 768px) {
  .push-prompt {
    left: 16px !important;
    right: 16px !important;
    transform: none !important;
    width: auto !important;
    max-width: none !important;
    bottom: 20px !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color, #e5e7eb) !important;
    padding-right: var(--space-36) !important;
  }
}
.push-prompt-text { color: var(--text-primary); flex: 1; line-height: 1.4; font-size: 0.95rem; }
.push-dismiss {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-12);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: var(--space-hairline) var(--space-xs);
  line-height: 1;
}
.push-dismiss:hover { color: var(--text-primary); }
.push-enable-btn { padding: var(--space-12) var(--space-20) !important; font-size: 0.95rem !important; flex-shrink: 0; white-space: nowrap; }

.animal-check-page { max-width: 700px; margin: 0 auto; }
.animal-check-suggestions { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); z-index: var(--z-dropdown); overflow: hidden; display: none; text-align: left; }
.animal-check-suggestions.is-open { display: block; }
.animal-check-suggestions .suggestion-item { display: block; padding: var(--space-sm) var(--space-md); text-decoration: none; color: var(--text-primary); cursor: pointer; border-bottom: 1px solid var(--border-color); transition: background var(--transition-fast); }
.animal-check-suggestions .suggestion-item:last-child { border-bottom: none; }
.animal-check-suggestions .suggestion-item:hover { background: var(--bg-secondary); }
.animal-check-suggestions .suggestion-item--forbidden { color: var(--accent-danger, #b54d4d); }
.animal-check-suggestions .suggestion-item--redbook { color: var(--accent-warning, #c48a2c); }

.check-card { border-radius: var(--radius-lg); padding: var(--space-lg); border: 1px solid var(--border-color); margin-bottom: var(--space-lg); }
.check-card--forbidden { background: rgba(181, 77, 77, 0.06); border-color: var(--accent-danger, #b54d4d); }
.check-card--allowed { background: rgba(61, 122, 82, 0.06); border-color: var(--accent-primary, #3d7a52); }
.check-card--redbook { background: var(--accent-warning-bg, rgba(196, 138, 44, 0.12)); border-color: var(--accent-warning, #c48a2c); }
.check-status { font-size: var(--font-size-lg); font-weight: 700; margin-bottom: var(--space-xs); display: flex; align-items: center; gap: var(--space-xs); }
.check-card--forbidden .check-status { color: var(--accent-danger, #b54d4d); }
.check-card--allowed .check-status { color: var(--accent-primary, #3d7a52); }
.check-card--redbook .check-status { color: var(--accent-warning, #c48a2c); }
.check-species { font-size: var(--font-size-lg); margin-bottom: var(--space-sm); }
.check-disclaimer { display: flex; gap: var(--space-md); align-items: center; font-size: var(--font-size-xs); color: var(--text-muted); margin-top: var(--space-md); padding: var(--space-sm) var(--space-md); background: var(--bg-secondary); border-radius: var(--radius-md); }
.check-disclaimer i { font-size: var(--font-size-base); color: var(--accent-primary); flex-shrink: 0; line-height: 1; }
.check-liability { margin-top: var(--space-lg); margin-bottom: var(--space-lg); padding: var(--space-md) var(--space-lg); background: var(--bg-secondary); border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.check-liability h2 { font-size: var(--font-size-base); margin-bottom: var(--space-sm); }
.check-liability p { margin-bottom: var(--space-xs); }
.check-liability ul { margin: 0; padding-left: var(--space-lg); color: var(--text-muted); }
.check-liability li { margin-bottom: var(--space-xs); }

.home-check-widget { text-align: center; padding: var(--space-lg); margin: 0 auto var(--space-lg); max-width: 640px; }
.home-check-form { display: flex; gap: var(--space-sm); max-width: 480px; margin: var(--space-md) auto 0; position: relative; }
.home-check-input { position: relative; flex: 1; }
.home-check-form .form-control { flex: 1; width: 100%; height: 48px; min-height: 48px; font-size: 16px; appearance: none; -webkit-appearance: none; box-sizing: border-box; }
.home-check-form .btn { height: 48px; min-height: 48px; box-sizing: border-box; }
@media (max-width: 768px) {
    .home-check-form { flex-direction: column; }
    .home-check-form .btn { width: 100%; }
    .home-check-input { flex: none; width: 100%; }
    .home-check-form .form-control { flex: none; width: 100%; height: 48px; min-height: 48px; font-size: 16px; appearance: none; -webkit-appearance: none; box-sizing: border-box; }
    .home-check-form .btn { height: 48px; min-height: 48px; box-sizing: border-box; }
}

.pwa-back-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    flex-shrink: 0;
}
.pwa-back-btn:hover { background: var(--bg-tertiary); }
body.pwa-mode .pwa-back-btn { display: inline-flex; }

.scanner-nav-link { display: none; }
@media (max-width: 768px) { .scanner-nav-link { display: list-item; } }
body.pwa-mode .scanner-nav-link { display: list-item; }
body.pwa-mode .site-header {
    padding-top: max(env(safe-area-inset-top, 0px), env(titlebar-area-height, 0px));
}

@media (max-width: 768px) {

    .site-main { padding: var(--space-md) 0; }
    .site-main > .container { border-radius: var(--radius-md); }
}

@media (max-width: 480px) {
    .header-logo img { width: 140px; height: auto; }
    .btn-login { padding: 0 var(--space-12); font-size: var(--font-size-xs); }
}

[data-theme="dark"] .alert-success { background: rgba(77, 184, 123, 0.12); }
[data-theme="dark"] .alert-danger,
[data-theme="dark"] .alert-error { background: rgba(242, 122, 122, 0.10); }
[data-theme="dark"] .alert-warning { background: var(--accent-warning-bg); }
[data-theme="dark"] .alert-info { background: rgba(79, 193, 217, 0.10); }
[data-theme="dark"] .badge-primary { background: rgba(110, 207, 141, 0.16); }
[data-theme="dark"] .badge-success { background: rgba(77, 184, 123, 0.18); }
[data-theme="dark"] .badge-danger { background: rgba(242, 122, 122, 0.16); }
[data-theme="dark"] .badge-warning { background: var(--accent-warning-bg); }
[data-theme="dark"] .badge-info { background: rgba(79, 193, 217, 0.16); }

.pwa-pull-indicator {
    position: fixed;
    left: 50%;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 20px;
    z-index: var(--z-sticky);
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -56px);
    transition: transform 0.25s ease, opacity 0.2s ease;
    will-change: transform;
}
.pwa-pull-indicator i { transition: transform 0.2s ease; }
.pwa-pull-armed .pwa-pull-indicator { color: var(--accent-primary, #2f7a4a); }
.pwa-pull-indicator.spinning {
    transform: translate(-50%, calc(var(--header-height) + 12px));
    opacity: 1;
}

@media print {
    .scroll-top, .cookie-popup, .push-prompt, #pushPrompt,
    .pwa-pull-indicator, .confirm-overlay,
    .user-dropdown, .profile-share-wrap, .profile-share-drop, .autosave-indicator { display: none !important; }
}

@media (hover: none) {
    a:active, button:active { opacity: 0.7; }
}

.avatar-group {
    --ag-size: 44px;
    --ag-lift: -4px;
    --ag-dur: 320ms;
    --ag-ease-in: cubic-bezier(0.22, 1, 0.36, 1);
    --ag-ease-out: cubic-bezier(0.34, 3.85, 0.64, 1);
    --ag-scale: 1.05;
    --ag-falloff: 0.45;
    display: flex;
    align-items: center;
}
.avatar-group {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
}
.avatar-group-item {
    position: relative;
    z-index: 1;
    width: var(--ag-size);
    height: var(--ag-size);
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    margin-right: -12px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform-origin: center;
    transform: translateY(var(--ag-shift, 0px)) scale(var(--ag-active, 1));
    transition: transform var(--ag-dur) var(--ag-ease-in);
    will-change: transform;
}
.avatar-group-item:last-child { margin-right: 0; }
.avatar-group-item:hover { z-index: 2; }

.avatar-group-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.avatar-group-item i {
    font-size: calc(var(--ag-size) * 0.36);
    line-height: 1;
    color: rgba(255, 255, 255, 0.9);
}
.avatar-group-item:nth-child(6n+1) { background: #3d7a52; }
.avatar-group-item:nth-child(6n+2) { background: #2f6d5a; }
.avatar-group-item:nth-child(6n+3) { background: #7a8c3d; }
.avatar-group-item:nth-child(6n+4) { background: #b08a3d; }
.avatar-group-item:nth-child(6n+5) { background: #3d6d7a; }
.avatar-group-item:nth-child(6n+6) { background: #6b5a7a; }

.avatar-group-extra {
    position: relative;
    z-index: 2;
    height: var(--ag-size);
    min-width: var(--ag-size);
    padding: 0 0.5em;
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-primary);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: calc(var(--ag-size) * 0.34);
    font-weight: 600;
    white-space: nowrap;
}

.join-cta-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin: 0 0 var(--space-xs);
    color: var(--text-primary);
}
.join-cta-text {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin: 0 0 var(--space-lg);
}
.join-cta-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.join-cta-wrap {
    margin-top: var(--space-2xl);
    padding: var(--space-xl) var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    .avatar-group-item { transition: none; }
    .header-nav, .nav-submenu, .user-dropdown, .cookie-popup,
    .confirm-overlay, .confirm-modal { transition: none; }
}

.home-check-widget--featured {
    background: #1a2e22;
    color: #f3efe4;
    border-radius: var(--radius-xl);
    padding: var(--space-2xl) var(--space-lg);
    margin: var(--space-40) 0 44px;
    max-width: none;
    position: relative;
}

[data-theme="dark"] .home-check-widget--featured {
    background: #152329;
}

[data-theme="dark"] .home-check-widget--featured .home-check-form .btn--primary {
    background: #152329;
}
[data-theme="dark"] .home-check-widget--featured .home-check-form .btn--primary:hover {
    background: #1b2d33;
}
.home-check-widget--featured .check-widget-inner {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
}
.check-widget-icon {
    color: #8fb89c;
    margin-bottom: var(--space-md);
    display: flex;
    justify-content: center;
}
.check-widget-img {
    width: 60px;
    height: auto;
    display: block;
}
.home-check-widget--featured h1,
.home-check-widget--featured h2 {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 var(--space-12);
    line-height: 1.3;
}
.home-check-widget--featured > .check-widget-inner h1,
.home-check-widget--featured > .check-widget-inner h2 { margin: 0 0 var(--space-12); }
.home-check-widget--featured .check-widget-inner > p {
    color: #c9d6cb;
    font-size: 15px;
    margin: 0 0 var(--space-lg);
    line-height: 1.6;
}
.home-check-widget--featured .home-check-form {
    display: flex;
    gap: 0;
    max-width: 560px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: var(--space-sm);
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.35);
}
.home-check-widget--featured .home-check-form:focus-within {
    box-shadow: 0 0 0 3px rgba(143, 184, 156, 0.35), 0 12px 30px -10px rgba(0, 0, 0, 0.35);
}
/* Панель подсказок позиционируем от формы, а не от поля (базовое `.home-check-input` ниже/выше
   задаёт position: relative — здесь снимаем): иначе панель растягивается по содержимому и
   выступает вправо за карточку. Сейчас она ровно по ширине белой карточки. */
.home-check-widget--featured .home-check-input { position: static; }
.home-check-widget--featured .home-check-form .form-control {
    width: 100%;
    height: 48px;
    min-height: 48px;
    border: none;
    background: transparent;
    padding: 0 var(--space-md);
    font-size: 16px;
    color: #1a2e22;
    box-sizing: border-box;
    box-shadow: none;
}
.home-check-widget--featured .home-check-form .form-control:focus {
    outline: none;
    border: none;
    box-shadow: none;
}
.home-check-widget--featured .home-check-form .form-control::placeholder { color: #9aa79e; }
.home-check-widget--featured .home-check-form .form-control--cert {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}
.home-check-widget--featured .home-check-form .btn--primary {
    height: 48px;
    min-height: 48px;
    padding: 0 var(--space-28);
    border-radius: var(--radius-md);
    background: #1a2e22;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
}
.home-check-widget--featured .home-check-form .btn--primary:hover { background: #254435; }
.check-widget-examples {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
    align-items: center;
    margin-top: var(--space-md);
}
.check-widget-examples-label {
    font-size: 13px;
    color: #a9bcae;
    margin-right: var(--space-hairline);
}
.check-example-chip {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #f3efe4;
    border-radius: var(--radius-full);
    padding: var(--space-sm) var(--space-md);
    font-size: 13.5px;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--transition-fast);
}
.check-example-chip:hover { background: rgba(255, 255, 255, 0.16); }
.check-widget-trust {
    margin-top: var(--space-lg);
    font-size: 12.5px;
    color: #8fa393;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    white-space: nowrap;
}
.check-widget-trust i { font-size: 14px; }
@media (max-width: 520px) {
    .home-check-widget--featured { padding: var(--space-40) var(--space-20); }
    .check-widget-trust { font-size: clamp(9px, 2.9vw, 12.5px); }
    .check-widget-trust i { font-size: 12px; }
}
.home-check-widget--featured .animal-check-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.25);
    text-align: left;
    overflow: hidden;
    z-index: var(--z-dropdown);
    margin-top: var(--space-sm);
}
/* Панель позиционируется от формы (обёртка поля position: static выше), поэтому совпадает по ширине
   с белой карточкой и не вылезает вправо за поле: прежде `width: max-content` давала выступ до 177px
   на десктопе, а на телефоне обрезала длинные названия. На узком экране карточка — колонка
   «поле + кнопка», и список начинается под ней: кнопка «Проверить» остаётся видимой. */
.home-check-widget--featured .animal-check-suggestions .suggestion-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: 11px var(--space-md);
    font-size: 14.5px;
    color: #22261f;
    text-decoration: none;
    border-bottom: 1px solid #f0eee6;
    font-family: inherit;
}
.home-check-widget--featured .animal-check-suggestions .suggestion-item:last-child { border-bottom: none; }
.home-check-widget--featured .animal-check-suggestions .suggestion-item:hover { background: #f7f5ee; }
.home-check-widget--featured .suggestion-item--forbidden { color: #b23a2e; }
.home-check-widget--featured .suggestion-item--redbook { color: #8a5a12; }
.home-check-widget--featured .suggestion-item--forbidden::after {
    content: "запрещён";
    flex-shrink: 0;
    font-size: 11px;
    background: #fdeceb;
    color: #b23a2e;
    padding: var(--space-hairline) var(--space-sm);
    border-radius: var(--radius-full);
    margin-left: var(--space-sm);
}
.home-check-widget--featured .suggestion-item--redbook::after {
    content: "нужно разрешение";
    flex-shrink: 0;
    font-size: 11px;
    background: #fdf1de;
    color: #8a5a12;
    padding: var(--space-hairline) var(--space-sm);
    border-radius: var(--radius-full);
    margin-left: var(--space-sm);
}

@media (max-width: 560px) {
    .home-check-widget--featured .home-check-form { flex-direction: column; padding: var(--space-sm); }
    .home-check-widget--featured .home-check-form .btn--primary { margin-top: var(--space-sm); width: 100%; }
    .home-check-widget--featured { padding: var(--space-36) var(--space-md); margin: var(--space-28) 0 var(--space-36); }
    .home-check-widget--featured h1,
    .home-check-widget--featured h2 { font-size: 22px; }
}
