﻿/* CSS переменные */
        :root {
            --sidebar-width: 250px;
            --sidebar-collapsed-width: 60px;
            --header-height: 70px;
            --transition-duration: 0.3s;

            /* ===== Цветовая палитра (RGB-триплеты) =====
               Использование: rgb(var(--x)) или rgb(var(--x) / 0.5).
               Значения — тёмная тема. Светлая тема в будущем переопределит эти переменные. */
            --color-bg: 15 15 19;
            --color-bg-soft: 21 21 29;
            --color-card: 30 30 40;
            --color-card-soft: 42 42 56;
            --color-card-line: 34 34 44;
            --color-text: 248 250 252;
            --color-text-secondary: 229 231 235;
            --color-text-soft: 209 213 219;
            --color-text-muted: 156 163 175;
            --color-text-faint: 107 114 128;
            --color-text-fainter: 75 85 99;
            --color-text-dark: 31 41 55;
            --color-text-strong: 255 255 255;
            --color-overlay-white: 255 255 255;
            --color-overlay-black: 0 0 0;
            --accent-primary: 59 130 246;
            --accent-primary-light: 96 165 250;
            --accent-primary-dark: 37 99 235;
            --accent-primary-deep: 29 78 216;
            --accent-primary-deepest: 30 58 138;
            --accent-purple: 139 92 246;
            --accent-purple-light: 124 58 237;
            --accent-purple-dark: 109 40 217;
            --accent-gold: 253 185 39;
            --accent-indigo: 102 126 234;
            --accent-indigo-dark: 79 70 229;
            --accent-indigo-deep: 118 75 162;
            --color-purple-lakers: 85 37 131;
            --color-purple-deep: 59 31 94;
            --color-success: 52 211 153;
            --color-success-strong: 34 197 94;
            --color-success-deep: 16 185 129;
            --color-success-pale: 134 239 172;
            --color-danger: 239 68 68;
            --color-danger-strong: 220 38 38;
            --color-danger-light: 248 113 113;
            --color-danger-pale: 252 165 165;
            --color-warning: 245 158 11;
            --color-warning-light: 251 191 36;
            --color-warning-dark: 217 119 6;
            --accent-pink: 236 72 153;
            --accent-pink-light: 249 168 212;
        }
        
        /* Базовые стили */
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        
        body {
            font-family: 'Inter', sans-serif;
            background: rgb(var(--color-bg));
            color: rgb(var(--color-text));
            overflow-x: hidden;
            line-height: 1.5;
            position: relative;
        }
        
        /* Утилитарные классы */
        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }
        
        .focus\:outline-none:focus {
            outline: 2px solid rgb(var(--accent-primary));
            outline-offset: 2px;
        }
        
        /* Основные компоненты */
        .strict-bg {
            background: linear-gradient(160deg, rgb(var(--color-bg)) 0%, rgb(var(--color-bg-soft)) 100%);
        }
        
        .strict-card {
            background: rgb(var(--color-card) / 0.7);
            backdrop-filter: blur(10px);
            border: 1px solid rgb(var(--color-overlay-white) / 0.08);
            box-shadow: 0 4px 20px rgb(var(--color-overlay-black) / 0.2);
            transition: all var(--transition-duration) ease;
        }
        
        .strict-card:hover {
            box-shadow: 0 8px 30px rgb(var(--color-overlay-black) / 0.3);
            transform: translateY(-2px);
        }
        
        .strict-nav {
            background: rgb(var(--color-bg) / 0.95);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid rgb(var(--color-overlay-white) / 0.08);
        }
        
        .strict-button {
            background: linear-gradient(135deg, rgb(var(--accent-primary)) 0%, rgb(var(--accent-primary-deep)) 100%);
            border: none;
            position: relative;
            overflow: hidden;
            transition: all var(--transition-duration) ease;
        }
        
        .strict-button:hover {
            background: linear-gradient(135deg, rgb(var(--accent-primary-dark)) 0%, rgb(var(--accent-primary-deep)) 100%);
            box-shadow: 0 4px 15px rgb(var(--accent-primary) / 0.3);
        }
        
        .strict-button-secondary {
            background: rgb(var(--color-overlay-white) / 0.05);
            border: 1px solid rgb(var(--color-overlay-white) / 0.1);
            transition: all var(--transition-duration) ease;
        }
        
        .strict-button-secondary:hover {
            background: rgb(var(--color-overlay-white) / 0.1);
            border-color: rgb(var(--color-overlay-white) / 0.2);
        }
        
        .accent-text {
            background: linear-gradient(90deg, rgb(var(--accent-primary)), rgb(var(--accent-purple)));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .strict-divider {
            height: 1px;
            background: linear-gradient(90deg, transparent, rgb(var(--accent-primary) / 0.3), transparent);
        }
        
        /* Индикатор LIVE */
        .live-indicator {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: rgb(var(--color-danger));
            position: relative;
        }
        
        .live-indicator::after {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            border-radius: 50%;
            background: rgb(var(--color-danger));
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0% {
                transform: scale(1);
                opacity: 0.8;
            }
            70% {
                transform: scale(2);
                opacity: 0;
            }
            100% {
                transform: scale(2);
                opacity: 0;
            }
        }
        
        /* Табы */
        .strict-tabs {
            display: flex;
            background: rgb(var(--color-overlay-white) / 0.05);
            border-radius: 8px;
            padding: 4px;
        }
        
        .strict-tab {
            flex: 1;
            text-align: center;
            padding: 8px 16px;
            border-radius: 6px;
            cursor: pointer;
            transition: all var(--transition-duration);
            font-weight: 500;
        }
        
        .strict-tab.active {
            background: rgb(var(--accent-primary));
            color: white;
        }
        
        /* Прогресс-бары */
        .strict-progress {
            height: 4px;
            background: rgb(var(--color-overlay-white) / 0.1);
            border-radius: 2px;
            overflow: hidden;
        }
        
        .strict-progress-bar {
            height: 100%;
            background: linear-gradient(90deg, rgb(var(--accent-primary)), rgb(var(--accent-purple)));
            border-radius: 2px;
        }
        
        /* Сетка с тонкими линиями */
        .grid-lines {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-image: 
                linear-gradient(rgb(var(--accent-primary) / 0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgb(var(--accent-primary) / 0.03) 1px, transparent 1px);
            background-size: 40px 40px;
            pointer-events: none;
            z-index: -1;
        }
        
        /* Стили для карточек */
        .news-card,
        .stream-card {
            background: rgb(var(--color-card) / 0.7);
            border-radius: 12px;
            overflow: hidden;
            transition: all var(--transition-duration) ease;
            border: 1px solid rgb(var(--color-overlay-white) / 0.08);
        }
        
        .news-card:hover,
        .stream-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgb(var(--color-overlay-black) / 0.3);
        }
        
        .news-badge {
            position: absolute;
            top: 12px;
            left: 12px;
            background: rgb(var(--accent-primary));
            color: white;
            padding: 4px 10px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 600;
            z-index: 1;
        }
        
        .news-image {
            height: 120px;
            width: 100%;
            object-fit: cover;
            background: linear-gradient(135deg, rgb(var(--accent-indigo)) 0%, rgb(var(--accent-indigo-deep)) 100%);
        }
        
        /* Стили для бокового меню */
        .sidebar {
            transition: all var(--transition-duration) ease;
            position: sticky;
            top: calc(var(--header-height) + 20px);
            height: auto;
            max-height: calc(100vh - var(--header-height) - 40px);
            overflow-y: auto;
            width: var(--sidebar-width);
            flex-shrink: 0;
            align-self: flex-start;
        }
        
        .sidebar.collapsed {
            width: var(--sidebar-collapsed-width);
        }
        
        .sidebar.collapsed .menu-text {
            display: none;
        }
        
        .sidebar.collapsed .menu-item {
            justify-content: center;
            padding: 10px 0;
        }
        
        .sidebar.collapsed .menu-item .material-icons-outlined {
            margin-right: 0;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        
        .sidebar.collapsed .league-menu-btn .material-icons-outlined:last-child {
            display: none;
        }
        
        .menu-item {
            display: flex;
            align-items: center;
            padding: 10px 14px;
            border-radius: 8px;
            transition: all var(--transition-duration);
            color: rgb(var(--color-text-muted));
            cursor: pointer;
            font-size: 0.9rem;
        }
        
        .menu-item:hover {
            background: rgb(var(--accent-primary) / 0.1);
            color: rgb(var(--accent-primary));
        }
        
        .menu-item.active {
            background: rgb(var(--accent-primary) / 0.2);
            color: rgb(var(--accent-primary-light));
        }

        /* Неактивные пункты меню (для гостей): видно, но не кликается */
        .menu-item-disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }
        .menu-item-disabled:hover {
            background: none;
            color: inherit;
        }

.menu-item.inactive {
    opacity: 0.45;
    color: rgb(var(--color-text-muted));
    cursor: default;
    pointer-events: none;
}

.menu-item.inactive:hover {
    background: transparent;
    color: rgb(var(--color-text-muted));
}
        
        .menu-divider {
            height: 1px;
            background: rgb(var(--color-overlay-white) / 0.1);
            margin: 6px 0;
        }
        
        .menu-item .material-icons-outlined {
            font-size: 1.1rem;
            margin-right: 12px;
        }
        
        /* Стили для авторов трансляций */
        .stream-author {
            display: flex;
            align-items: center;
            padding: 12px;
            border-top: 1px solid rgb(var(--color-overlay-white) / 0.08);
        }
        
        .author-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            margin-right: 10px;
            object-fit: cover;
            background: linear-gradient(135deg, rgb(var(--accent-indigo)) 0%, rgb(var(--accent-indigo-deep)) 100%);
        }
        
        /* Компактный хедер */
        .compact-header {
            padding-top: 0.75rem;
            padding-bottom: 0.75rem;
            height: var(--header-height);
        }

        .logo a {
            display: inline-flex;
            align-items: center;
        }

        .logo-img {
            height: 2.75rem;
            width: auto;
            display: block;
        }

        .logo-black-img {
            display: none;
        }

        .light-theme .logo-white-img {
            display: none;
        }

        .light-theme .logo-black-img {
            display: block;
        }
        
        .compact-nav-item {
            padding: 0.5rem 1rem;
            font-size: 0.875rem;
        }
        
        .compact-button {
            padding: 0.5rem 1rem;
            font-size: 0.875rem;
        }
        
        .compact-icon-button {
            padding: 0.5rem;
        }
        
        /* Мобильная навигация */
        .mobile-bottom-nav {
            display: none;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgb(var(--color-bg));
            border-top: 1px solid rgb(var(--color-overlay-white) / 0.08);
            z-index: 100;
            padding: 8px 0;
        }
        
        .mobile-nav-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 5px 0;
            color: rgb(var(--color-text-muted));
            font-size: 10px;
        }
        
        .mobile-nav-item.active {
            color: rgb(var(--accent-primary));
        }
        
.mobile-nav-item .material-icons-outlined {
    font-size: 22px;
    margin-bottom: 2px;
}

/* Мобильная смена лиги (нижнее меню) */
.mobile-league-switch {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px 4px;
    color: rgb(var(--color-text-muted));
    font-size: 10px;
    cursor: pointer;
}

.mobile-league-switch .material-icons-outlined {
    font-size: 22px;
    margin-bottom: 2px;
    color: rgb(var(--accent-primary));
}

#mobileLeagueSelect {
    background: transparent;
    border: none;
    color: rgb(var(--color-text-muted));
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    max-width: 92px;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

#mobileLeagueSelect option {
    background: rgb(var(--color-card));
    color: rgb(var(--color-text));
}
        
        /* Модальные окна */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgb(var(--color-overlay-black) / 0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            padding: 20px;
        }
        
        .modal-overlay.hidden {
            display: none !important;
        }
        
        /* Модалка авторизации всегда поверх */
        #loginModal {
            z-index: 2000;
        }
        
        .modal-content {
            max-height: 90%;
            overflow: auto;
            border-radius: 12px;
        }
        
        .profile-tab {
            padding: 12px 16px;
            border-radius: 6px;
            cursor: pointer;
            transition: all var(--transition-duration);
        }
        
        .profile-tab.active {
            background: rgb(var(--accent-primary));
            color: white;
        }
        
        /* Видео контейнер */
        .video-container {
            position: relative;
            width: 100%;
            height: 0;
            padding-bottom: 56.25%; /* 16:9 aspect ratio */
        }
        
        .video-container iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border-radius: 8px;
        }
        
        /* Кастомные скроллбары */
        ::-webkit-scrollbar {
            width: 6px;
        }
        
        ::-webkit-scrollbar-track {
            background: rgb(var(--color-card) / 0.5);
        }
        
        ::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, rgb(var(--accent-primary)), rgb(var(--accent-purple)));
            border-radius: 3px;
        }
        
        /* Светлая тема */
        .light-theme {
            background: linear-gradient(160deg, rgb(var(--color-text)) 0%, #e2e8f0 100%);
            color: rgb(var(--color-text-dark));
        }
        
        .light-theme .strict-card {
            background: rgb(var(--color-overlay-white) / 0.8);
            border: 1px solid rgb(var(--color-overlay-black) / 0.08);
            color: rgb(var(--color-text-dark));
        }
        
        .light-theme .strict-nav {
            background: rgb(var(--color-text) / 0.95);
            border-bottom: 1px solid rgb(var(--color-overlay-black) / 0.08);
        }
        
        .light-theme .strict-button-secondary {
            background: rgb(var(--color-overlay-black) / 0.05);
            border: 1px solid rgb(var(--color-overlay-black) / 0.1);
        }
        
        .light-theme .strict-button-secondary:hover {
            background: rgb(var(--color-overlay-black) / 0.1);
            border-color: rgb(var(--color-overlay-black) / 0.2);
        }
        
        .light-theme .strict-divider {
            background: linear-gradient(90deg, transparent, rgb(var(--accent-primary) / 0.2), transparent);
        }
        
        .light-theme .strict-tabs {
            background: rgb(var(--color-overlay-black) / 0.05);
        }
        
        .light-theme .strict-progress {
            background: rgb(var(--color-overlay-black) / 0.1);
        }
        
        .light-theme .news-card,
        .light-theme .stream-card {
            background: rgb(var(--color-overlay-white) / 0.8);
            border: 1px solid rgb(var(--color-overlay-black) / 0.08);
            color: rgb(var(--color-text-dark));
        }
        
        .light-theme .menu-item:hover {
            background: rgb(var(--accent-primary) / 0.1);
        }
        
        .light-theme .menu-item.active {
            background: rgb(var(--accent-primary) / 0.2);
        }
        
        .light-theme .menu-divider {
            background: rgb(var(--color-overlay-black) / 0.1);
        }
        
        /* Светлая тема для текста в различных элементах */
        .light-theme .text-white {
            color: rgb(var(--color-text-dark)) !important;
        }
        
        .light-theme .text-gray-400 {
            color: rgb(var(--color-text-faint)) !important;
        }
        
        .light-theme .text-gray-300 {
            color: rgb(var(--color-text-fainter)) !important;
        }
        
        .light-theme .text-gray-500 {
            color: rgb(var(--color-text-faint)) !important;
        }
        
        .light-theme .bg-dark-950 {
            color: rgb(var(--color-text-dark)) !important;
        }
        
        .light-theme .partner-card {
            background: rgb(var(--color-overlay-white) / 0.9) !important;
            color: rgb(var(--color-text-dark)) !important;
        }
        
        .light-theme .partner-content h3 {
            color: rgb(var(--color-text-dark)) !important;
        }
        
        .light-theme .partner-content p {
            color: rgb(var(--color-text-faint)) !important;
        }
        
        .light-theme .compact-card {
            color: rgb(var(--color-text-dark)) !important;
        }
        
        .light-theme .stream-author {
            border-top-color: rgb(var(--color-overlay-black) / 0.08);
        }
        
        .light-theme .stream-author div {
            color: rgb(var(--color-text-dark)) !important;
        }
        
        .light-theme .stream-author .text-gray-400 {
            color: rgb(var(--color-text-faint)) !important;
        }
        
        .light-theme .review-item {
            color: rgb(var(--color-text-dark)) !important;
        }
        
        .light-theme .review-item h3 {
            color: rgb(var(--color-text-dark)) !important;
        }
        
        .light-theme .review-item p {
            color: rgb(var(--color-text-faint)) !important;
        }
        
        .light-theme table th {
            color: rgb(var(--color-text-fainter)) !important;
        }
        
        .light-theme table td {
            color: rgb(var(--color-text-dark)) !important;
        }
        
        /* ===== Светлая тема: турниры, кнопки, таблицы, паттерны ===== */
        
        /* Фоновый паттерн (сетка + свечения) */
        .grid-lines {
            background-image:
                radial-gradient(circle at 18% 12%, rgb(var(--accent-primary) / 0.07) 0, transparent 38%),
                radial-gradient(circle at 82% 78%, rgb(var(--accent-purple) / 0.06) 0, transparent 38%),
                linear-gradient(rgb(var(--accent-primary) / 0.035) 1px, transparent 1px),
                linear-gradient(90deg, rgb(var(--accent-primary) / 0.035) 1px, transparent 1px);
            background-size: auto, auto, 40px 40px, 40px 40px;
        }
        
        .light-theme .grid-lines {
            background-image:
                radial-gradient(circle at 18% 12%, rgb(var(--accent-primary) / 0.09) 0, transparent 38%),
                radial-gradient(circle at 82% 78%, rgb(var(--accent-purple) / 0.08) 0, transparent 38%),
                linear-gradient(rgb(var(--accent-primary) / 0.06) 1px, transparent 1px),
                linear-gradient(90deg, rgb(var(--accent-primary) / 0.06) 1px, transparent 1px);
            background-size: auto, auto, 40px 40px, 40px 40px;
        }
        
        /* Меню турнира (вкладки) */
        .light-theme .tourney-tabs-nav {
            background: rgb(var(--color-overlay-white) / 0.85);
            border-color: rgb(var(--color-overlay-black) / 0.1);
        }
        
        .light-theme .tourney-tab {
            color: rgb(var(--color-text-fainter));
        }
        
        .light-theme .tourney-tab:hover {
            color: rgb(var(--color-text-dark));
            background: rgb(var(--color-overlay-black) / 0.05);
        }
        
        .light-theme .tourney-tab.content-filter__item--active {
            color: rgb(var(--color-text-strong));
            background: rgb(var(--accent-primary-dark));
        }
        
        /* Кнопки кругов */
        .light-theme .tourney-lap-btn {
            color: rgb(var(--color-text-fainter));
            background: rgb(var(--color-overlay-white) / 0.85);
            border-color: rgb(var(--color-overlay-black) / 0.12);
        }
        
        .light-theme .tourney-lap-btn:hover {
            color: rgb(var(--color-text-dark));
            background: rgb(var(--color-overlay-black) / 0.05);
        }
        
        .light-theme .tourney-lap-btn.active {
            color: rgb(var(--color-text-strong));
            background: rgb(var(--accent-primary-dark));
            border-color: rgb(var(--accent-primary-dark));
        }
        
        /* Панель смены лиги */
        .light-theme .league-menu-panel {
            background: rgb(var(--color-overlay-white) / 0.95);
            border-color: rgb(var(--color-overlay-black) / 0.1);
        }
        
        /* Поиск и поля форм */
        .light-theme .tourney-search,
        .light-theme .form-control {
            background: rgb(var(--color-overlay-white) / 0.9);
            border-color: rgb(var(--color-overlay-black) / 0.15);
            color: rgb(var(--color-text-dark));
        }
        
        .light-theme .tourney-search::placeholder,
        .light-theme .form-control::placeholder {
            color: rgb(var(--color-text-faint));
        }
        
        /* Синие кнопки и цветные бейджи — текст белый в обеих темах */
        .light-theme .strict-button,
        .light-theme .strict-button .text-white,
        .light-theme .tourney-reg-btn,
        .light-theme .tourney-notice-btn,
        .light-theme .bg-gradient-to-r .text-white {
            color: rgb(var(--color-text-strong)) !important;
        }
        
        /* Заголовок «Официальные партнеры чемпионата» — чёрный в светлой теме */
        .light-theme .accent-text {
            background: none;
            background-clip: border-box;
            -webkit-background-clip: border-box;
            -webkit-text-fill-color: rgb(var(--color-text-dark));
            color: rgb(var(--color-text-dark));
        }
        
        /* Рамки таблиц */
        .light-theme .divide-gray-800 > :not([hidden]) ~ :not([hidden]) {
            border-color: rgb(209 213 219 / var(--tw-divide-opacity, 1)) !important;
        }
        
        .light-theme .tourney-table thead th {
            border-bottom-color: rgb(var(--color-overlay-black) / 0.12);
            color: rgb(var(--color-text-fainter));
        }
        
        .light-theme .tourney-table tbody td {
            border-bottom-color: rgb(var(--color-overlay-black) / 0.08);
            color: rgb(var(--color-text-dark));
        }
        
        .light-theme .tourney-table tbody tr:hover {
            background: rgb(var(--accent-primary) / 0.05);
        }
        
        .light-theme .tourney-table a {
            color: rgb(var(--color-text-dark));
        }
        
        .light-theme .tourney-table a:hover {
            color: rgb(var(--accent-primary-dark));
        }
        
        .light-theme .tourney-info-table td {
            border-bottom-color: rgb(var(--color-overlay-black) / 0.08);
        }
        
        .light-theme .tourney-info-table td:first-child {
            color: rgb(var(--color-text-fainter));
        }
        
        /* Стили для поиска */
        .search-container {
            position: relative;
            transition: all var(--transition-duration) ease;
        }

        .search-form {
            display: flex;
            align-items: center;
            background: rgb(var(--color-overlay-white) / 0.05);
            border: 1px solid rgb(var(--color-overlay-white) / 0.1);
            border-radius: 12px;
            overflow: hidden;
            transition: all var(--transition-duration) ease;
            width: 100%;
            max-width: 400px;
        }

        .search-form:focus-within {
            border-color: rgb(var(--accent-primary));
            background: rgb(var(--color-overlay-white) / 0.08);
            box-shadow: 0 0 0 3px rgb(var(--accent-primary) / 0.1);
        }

        .search-input {
            flex: 1;
            padding: 12px 16px;
            background: transparent;
            border: none;
            color: white;
            font-size: 14px;
            font-family: inherit;
            outline: none;
            width: 100%;
        }

        .search-input::placeholder {
            color: rgb(var(--color-text-muted));
            transition: color var(--transition-duration) ease;
        }

        .search-form:focus-within .search-input::placeholder {
            color: rgb(var(--color-text-faint));
        }

        .search-button {
            background: transparent;
            border: none;
            padding: 12px 16px;
            color: rgb(var(--color-text-muted));
            cursor: pointer;
            transition: all var(--transition-duration) ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .search-button:hover {
            color: rgb(var(--accent-primary));
            background: rgb(var(--accent-primary) / 0.1);
        }

        .search-results {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: rgb(var(--color-card) / 0.98);
            backdrop-filter: blur(20px);
            border: 1px solid rgb(var(--color-overlay-white) / 0.1);
            border-radius: 12px;
            margin-top: 8px;
            box-shadow: 0 20px 40px rgb(var(--color-overlay-black) / 0.4);
            z-index: 1000;
            max-height: 400px;
            overflow-y: auto;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all 0.3s ease;
        }

        .search-results.active {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .search-result-item {
            padding: 12px 16px;
            border-bottom: 1px solid rgb(var(--color-overlay-white) / 0.05);
            cursor: pointer;
            transition: all var(--transition-duration) ease;
            display: flex;
            align-items: center;
        }

        .search-result-item:hover {
            background: rgb(var(--accent-primary) / 0.1);
        }

        .search-result-item:last-child {
            border-bottom: none;
        }

        .search-result-avatar {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: white;
            margin-right: 12px;
            flex-shrink: 0;
        }

        .search-result-content {
            flex: 1;
            min-width: 0;
        }

        .search-result-title {
            font-weight: 600;
            color: white;
            font-size: 14px;
            margin-bottom: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .search-result-subtitle {
            color: rgb(var(--color-text-muted));
            font-size: 12px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .search-result-type {
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 4px;
            margin-left: 8px;
            background: rgb(var(--accent-primary) / 0.2);
            color: rgb(var(--accent-primary));
            font-weight: 600;
        }

        .no-results {
            padding: 20px;
            text-align: center;
            color: rgb(var(--color-text-muted));
        }

        /* Стили для хлебных крошек */
        .breadcrumb {
            display: flex;
            align-items: center;
            margin-bottom: 1.5rem;
            font-size: 0.875rem;
            color: rgb(var(--color-text-muted));
        }

        .breadcrumb-item {
            display: flex;
            align-items: center;
        }

        .breadcrumb-item:not(:last-child)::after {
            content: "/";
            margin: 0 0.5rem;
            color: rgb(var(--color-text-faint));
        }

        .breadcrumb-item a {
            color: rgb(var(--color-text-muted));
            text-decoration: none;
            transition: color var(--transition-duration) ease;
        }

        .breadcrumb-item a:hover {
            color: rgb(var(--accent-primary));
        }

        .breadcrumb-item span {
            color: rgb(var(--accent-primary));
            font-weight: 500;
        }

        /* Стили для слайдера партнеров */
        .partners-slider {
            position: relative;
            overflow: hidden;
        }

        .partners-track {
            display: flex;
            transition: transform 0.3s ease;
            gap: 1rem;
        }

        .partner-slide {
            flex: 0 0 85%;
            min-width: 0;
        }

        .partner-card {
            background: rgb(var(--color-card) / 0.7);
            border-radius: 12px;
            padding: 1rem;
            display: flex;
            align-items: center;
            border: 1px solid rgb(var(--color-overlay-white) / 0.08);
        }

        .partner-logo-wrap {
            width: 5.5rem;
            height: 5.5rem;
            padding: 5px;
            border-radius: 0.75rem;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            margin-right: 0.75rem;
            overflow: hidden;
            background: rgb(var(--color-overlay-white) / 0.06);
            border: 1px solid rgb(var(--color-overlay-white) / 0.08);
        }

        .partner-logo {
            width: 100%;
            height: 100%;
            object-fit: contain;
            padding: 0.25rem;
        }

        .partner-logo.light {
            display: none;
        }

        .partner-logo-placeholder {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: rgb(var(--color-text-strong));
            font-weight: bold;
            font-size: 1.25rem;
            background: linear-gradient(135deg, rgb(var(--accent-primary)), rgb(var(--accent-purple)));
        }

        .light-theme .partner-logo-wrap {
            background: rgb(var(--color-overlay-black) / 0.04);
            border-color: rgb(var(--color-overlay-black) / 0.08);
        }

        .light-theme .partner-logo.dark {
            display: none;
        }

        .light-theme .partner-logo.light {
            display: block;
        }

        /* Слайдер партнеров на главной */
        .partners-track {
            display: flex;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            gap: 16px;
            padding-bottom: 8px;
            scrollbar-width: none;
            -ms-overflow-style: none;
            -webkit-overflow-scrolling: touch;
        }

        .partners-track::-webkit-scrollbar {
            display: none;
        }

        .partner-slide {
            flex: 0 0 100%;
            max-width: 100%;
            scroll-snap-align: start;
        }

        @media (min-width: 768px) {
            .partner-slide {
                flex: 0 0 calc((100% - 32px) / 3);
                max-width: calc((100% - 32px) / 3);
            }
        }

        .partners-controls {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-top: 12px;
        }

        .partner-dots {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .partner-arrow {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            border: 1px solid rgb(var(--color-overlay-white) / 0.15);
            background: rgb(var(--color-overlay-white) / 0.05);
            color: rgb(var(--color-text-muted));
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .partner-arrow .material-icons-outlined {
            font-size: 18px;
        }

        .partner-arrow:hover {
            background: rgb(var(--accent-primary) / 0.15);
            color: rgb(var(--color-text-strong));
            border-color: rgb(var(--accent-primary) / 0.4);
        }

        .partner-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: rgb(var(--color-overlay-white) / 0.15);
            border: none;
            cursor: pointer;
            transition: all 0.2s ease;
            padding: 0;
        }

        .partner-dot.active {
            background: rgb(var(--accent-primary));
            width: 16px;
            border-radius: 4px;
        }

        /* Ссылка «Все партнеры» (иконка-список) */
        .partner-all-link {
            margin-left: 20px;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            border: 1px solid rgb(var(--color-overlay-white) / 0.15);
            background: rgb(var(--color-overlay-white) / 0.05);
            color: rgb(var(--color-text-muted));
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            transition: all 0.2s ease;
        }

        .partner-all-link .material-icons-outlined {
            font-size: 18px;
        }

        .partner-all-link:hover {
            background: rgb(var(--accent-primary) / 0.15);
            color: rgb(var(--color-text-strong));
            border-color: rgb(var(--accent-primary) / 0.4);
        }

        .light-theme .partner-all-link {
            border-color: rgb(var(--color-overlay-black) / 0.15);
            background: rgb(var(--color-overlay-black) / 0.04);
            color: rgb(var(--color-text-fainter));
        }

        .light-theme .partner-all-link:hover {
            background: rgb(var(--accent-primary) / 0.12);
            color: rgb(var(--color-text-dark));
        }

        .light-theme .partner-arrow {
            border-color: rgb(var(--color-overlay-black) / 0.15);
            background: rgb(var(--color-overlay-black) / 0.04);
            color: rgb(var(--color-text-fainter));
        }

        .light-theme .partner-arrow:hover {
            background: rgb(var(--accent-primary) / 0.12);
            color: rgb(var(--color-text-dark));
        }

        .light-theme .partner-dot {
            background: rgb(var(--color-overlay-black) / 0.15);
        }

        .light-theme .partner-dot.active {
            background: rgb(var(--accent-primary-dark));
        }

/* Оценка судьи/секретаря — мячики */
.match-ball-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    cursor: pointer;
    color: rgb(var(--color-overlay-white) / 0.25);
    transition: all 0.2s ease;
}

.match-ball-icon .material-icons-outlined {
    font-size: 18px;
}

.match-ball-icon.active,
.match-rating-balls:hover .match-ball-icon {
    color: rgb(var(--color-warning-light));
}

.match-rating-balls .match-ball-icon:hover ~ .match-ball-icon {
    color: rgb(var(--color-overlay-white) / 0.25);
}

.light-theme .match-ball-icon {
    color: rgb(var(--color-overlay-black) / 0.25);
}

.light-theme .match-ball-icon.active,
.light-theme .match-rating-balls:hover .match-ball-icon {
    color: rgb(var(--color-warning));
}

/* Оценка доступна только за последний матч в активном турнире */
.match-rating[data-locked="1"] .match-ball-icon,
.match-rating[data-locked="1"] .match-rating-balls:hover .match-ball-icon {
    cursor: not-allowed;
    color: rgb(var(--color-overlay-white) / 0.22);
    opacity: 0.55;
}

.light-theme .match-rating[data-locked="1"] .match-ball-icon,
.light-theme .match-rating[data-locked="1"] .match-rating-balls:hover .match-ball-icon {
    color: rgb(var(--color-overlay-black) / 0.22);
}
        .home-review-bg {
            background:
                radial-gradient(circle at 20% 20%, rgb(var(--accent-primary) / 0.35) 0, transparent 45%),
                radial-gradient(circle at 80% 80%, rgb(var(--accent-purple) / 0.3) 0, transparent 45%),
                linear-gradient(135deg, rgb(var(--accent-primary-deepest)) 0%, rgb(var(--accent-primary-deep)) 45%, rgb(var(--accent-indigo-dark)) 100%);
            position: relative;
            overflow: hidden;
        }

        .home-review-bg::before {
            content: "";
            position: absolute;
            inset: 0;
            background-image:
                linear-gradient(rgb(var(--color-overlay-white) / 0.06) 1px, transparent 1px),
                linear-gradient(90deg, rgb(var(--color-overlay-white) / 0.06) 1px, transparent 1px);
            background-size: 18px 18px;
            pointer-events: none;
        }

        /* Строка тега партнера — фиксированная высота, чтобы названия были на одном уровне */
        .partner-tag-line {
            height: 24px;
            overflow: hidden;
            margin-bottom: 6px;
        }

        /* Тег/заголовок партнера (титульный, технический и т.п.) */
        .partner-tag {
            display: inline-block;
            vertical-align: middle;
            margin-left: 6px;
            padding: 2px 10px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 600;
            line-height: 1;
            letter-spacing: 0.03em;
            text-transform: uppercase;
            color: rgb(var(--accent-primary-light));
            background: rgb(var(--accent-primary) / 0.12);
            border: 1px solid rgb(var(--accent-primary) / 0.25);
        }

        /* Строка партнера (страница партнеров) */
        .partner-row {
            padding: 1.5rem;
        }

        .partner-row .partner-logo-wrap {
            width: 8rem;
            height: 8rem;
        }

        .partner-row-link {
            word-break: break-all;
        }

        .partner-desc-full {
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            transition: all 0.2s ease;
        }

        .partner-desc-full.expanded {
            -webkit-line-clamp: unset;
            display: block;
            overflow: visible;
        }

        .partner-expand-btn {
            background: none;
            border: none;
            cursor: pointer;
            padding: 0;
        }

        .partner-expand-btn:hover {
            text-decoration: underline;
        }

        .partner-content {
            flex: 1;
            margin-right: 0.75rem;
        }

        .partner-content h3 {
            font-size: 1rem;
            font-weight: bold;
            color: white;
            margin-bottom: 0.25rem;
        }

        .partner-content p {
            font-size: 0.75rem;
            color: rgb(var(--color-text-muted));
        }

        .partner-link {
            color: rgb(var(--accent-primary));
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .slider-dots {
            display: flex;
            justify-content: center;
            margin-top: 1rem;
            gap: 0.5rem;
        }

        .slider-dot {
            width: 0.5rem;
            height: 0.5rem;
            border-radius: 50%;
            background: rgb(var(--color-overlay-white) / 0.2);
            cursor: pointer;
            transition: all var(--transition-duration) ease;
        }

        .slider-dot.active {
            background: rgb(var(--accent-primary));
            transform: scale(1.2);
        }

        /* МОБИЛЬНАЯ ВЕРСИЯ */
        @media (max-width: 768px) {
            .mobile-bottom-nav {
                display: flex;
            }
            
            .mobile-menu {
                display: none;
            }
            
            .mobile-menu.active {
                display: block;
            }
            
            body {
                padding-bottom: 70px;
            }
            
            .sidebar {
                position: static;
                height: auto;
                margin-bottom: 1rem;
                width: 100% !important;
            }
            
            .main-content {
                width: 100% !important;
                margin-left: 0 !important;
            }
            
            .main-container {
                flex-direction: column;
                max-width: 100%;
            }
            
            /* Скрываем левое меню в мобильной версии */
            .sidebar {
                display: none;
            }
            
            .sidebar.mobile-active {
                display: block;
                position: fixed;
                top: var(--header-height);
                left: 0;
                right: 0;
                bottom: 0;
                z-index: 90;
                width: 100% !important;
                height: calc(100vh - var(--header-height));
                background: rgb(var(--color-bg)) !important;
                backdrop-filter: blur(20px);
                -webkit-backdrop-filter: blur(20px);
                padding: 20px;
                overflow-y: auto;
            }
            
            .sidebar-placeholder {
                display: none;
            }

            /* Стили для кнопки закрытия в мобильном меню */
            .mobile-close-btn {
                display: block !important;
            }
            
            .desktop-toggle-btn {
                display: none !important;
            }

            /* Стили для поиска в мобильной версии */
            .search-container {
                position: static;
                width: auto;
                margin: 0;
                order: 2;
            }

            .search-form {
                display: none;
            }

            .mobile-search-button {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 40px;
                height: 40px;
                border-radius: 10px;
                background: rgb(var(--color-overlay-white) / 0.05);
                color: rgb(var(--color-text-muted));
                cursor: pointer;
                transition: all var(--transition-duration) ease;
                border: 1px solid rgb(var(--color-overlay-white) / 0.1);
                margin-left: 8px;
            }

            .mobile-search-button:hover {
                background: rgb(var(--color-overlay-white) / 0.1);
                color: rgb(var(--accent-primary));
                border-color: rgb(var(--accent-primary) / 0.3);
            }

            .mobile-search-form {
                display: none;
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                height: var(--header-height);
                background: rgb(var(--color-bg) / 0.98);
                backdrop-filter: blur(20px);
                border-bottom: 1px solid rgb(var(--color-overlay-white) / 0.1);
                z-index: 1001;
                padding: 0 16px;
                align-items: center;
            }

            .mobile-search-form.active {
                display: flex;
                animation: slideDown 0.3s ease;
            }

            .mobile-search-input {
                flex: 1;
                background: transparent;
                border: none;
                color: white;
                font-size: 16px;
                padding: 0 16px;
                outline: none;
                height: 100%;
            }

            .mobile-search-input::placeholder {
                color: rgb(var(--color-text-muted));
            }

            .mobile-search-close {
                background: transparent;
                border: none;
                color: rgb(var(--color-text-muted));
                cursor: pointer;
                padding: 8px;
                border-radius: 6px;
                transition: all var(--transition-duration) ease;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            .mobile-search-close:hover {
                color: white;
                background: rgb(var(--accent-primary) / 0.2);
            }

            .mobile-search-results {
                position: fixed;
                top: var(--header-height);
                left: 0;
                right: 0;
                bottom: 0;
                background: rgb(var(--color-card) / 0.98);
                backdrop-filter: blur(20px);
                z-index: 1000;
                overflow-y: auto;
                padding: 16px;
                display: none;
            }

            .mobile-search-results.active {
                display: block;
            }

            .search-active .logo,
            .search-active .user-actions,
            .search-active .mobile-search-button {
                display: none !important;
            }

            /* Показываем заголовки в мобильном меню всегда */
            .sidebar.mobile-active .menu-text {
                display: inline !important;
            }

            /* Хлебные крошки в мобильной версии */
            .breadcrumb {
                font-size: 0.75rem;
                margin-bottom: 1rem;
                overflow-x: auto;
                white-space: nowrap;
                padding-bottom: 0.5rem;
            }

            .breadcrumb-item:not(:last-child)::after {
                margin: 0 0.25rem;
            }

            /* Кнопка профиля в мобильной версии */
            .profile-button-mobile {
                width: 40px;
                height: 40px;
                border-radius: 10px;
                display: flex;
                align-items: center;
                justify-content: center;
            }
            
            /* Перемещение кнопки поиска вправо к кнопке логина */
            .user-actions {
                display: flex;
                align-items: center;
                order: 1;
            }
            
            .logo {
                order: 0;
            }
            
            .search-container {
                order: 2;
            }
        }
        
        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Основная сетка с плавающим меню */
        .main-container {
            display: flex;
            transition: all var(--transition-duration) ease;
            max-width: 88rem;
            margin: 0 auto;
            gap: 1.5rem;
            align-items: flex-start;
        }
        
        .main-content {
            flex: 1;
            transition: all var(--transition-duration) ease;
            min-width: 0;
            padding-bottom: 1.5rem;
        }

        /* Стили для фиксированного меню при прокрутке */
        .sidebar.fixed {
            position: fixed;
            top: calc(var(--header-height) + 20px);
            z-index: 40;
        }

        .sidebar-placeholder {
            width: var(--sidebar-width);
            flex-shrink: 0;
            transition: all var(--transition-duration) ease;
        }

        .sidebar-placeholder.collapsed {
            width: var(--sidebar-collapsed-width);
        }

        /* Стили для аватаров по умолчанию */
        .default-avatar {
            background: linear-gradient(135deg, rgb(var(--accent-indigo)) 0%, rgb(var(--accent-indigo-deep)) 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
        }

        /* Стили для выравнивания кнопки сворачивания меню */
        .sidebar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }

        .sidebar-header.collapsed {
            justify-content: center;
        }

        /* Светлая тема для поиска */
        .light-theme .search-form {
            background: rgb(var(--color-overlay-white) / 0.9);
            border-color: rgb(var(--color-overlay-black) / 0.1);
        }

        .light-theme .search-form:focus-within {
            background: rgb(var(--color-overlay-white) / 0.95);
            border-color: rgb(var(--accent-primary));
        }

        .light-theme .search-input {
            color: rgb(var(--color-text-dark));
        }

        .light-theme .search-input::placeholder {
            color: rgb(var(--color-text-faint));
        }

        .light-theme .search-results {
            background: rgb(var(--color-overlay-white) / 0.98);
            border-color: rgb(var(--color-overlay-black) / 0.1);
        }

        .light-theme .search-result-item:hover {
            background: rgb(var(--accent-primary) / 0.08);
        }

        .light-theme .search-result-title {
            color: rgb(var(--color-text-dark));
        }

        .light-theme .search-result-subtitle {
            color: rgb(var(--color-text-faint));
        }

        .light-theme .mobile-search-form {
            background: rgb(var(--color-text) / 0.98);
        }

        .light-theme .mobile-search-input {
            color: rgb(var(--color-text-dark));
        }

        .light-theme .mobile-search-results {
            background: rgb(var(--color-overlay-white) / 0.98);
        }

        /* Десктоп версия - скрываем крестик и мобильные элементы поиска */
        @media (min-width: 769px) {
            .mobile-close-btn {
                display: none !important;
            }
            
            .desktop-toggle-btn {
                display: flex !important;
            }
            
            .mobile-search-button {
                display: none !important;
            }
            
            .mobile-search-form {
                display: none !important;
            }
            
            .search-container {
                width: 400px;
            }

            /* Исправление двойного меню в десктопной версии */
            .sidebar nav:first-of-type {
                display: block !important;
            }
            
            .sidebar nav:not(:first-of-type) {
                display: none !important;
            }
        }

        /* Скрываем элементы при активном поиске в мобильной версии */
        .search-active .logo,
        .search-active .user-actions {
            display: none !important;
        }
        
        /* Стили для достижений */
        .achievement-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 1rem;
        }
        
        .achievement-card {
            background: rgb(var(--color-card) / 0.7);
            border-radius: 12px;
            padding: 1rem;
            text-align: center;
            border: 1px solid rgb(var(--color-overlay-white) / 0.08);
            transition: all var(--transition-duration) ease;
        }
        
        .achievement-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgb(var(--color-overlay-black) / 0.3);
        }
        
        .achievement-icon {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 0.75rem;
        }
        
        .achievement-progress {
            height: 4px;
            background: rgb(var(--color-overlay-white) / 0.1);
            border-radius: 2px;
            overflow: hidden;
            margin-bottom: 0.5rem;
        }
        
        .achievement-progress-bar {
            height: 100%;
            background: linear-gradient(90deg, rgb(var(--accent-primary)), rgb(var(--accent-purple)));
            border-radius: 2px;
        }
        
        /* Стили для команд */
        .current-teams {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        
        .team-card {
            display: flex;
            align-items: center;
            padding: 0.75rem;
            background: rgb(var(--color-overlay-white) / 0.05);
            border-radius: 8px;
        }
        
        .team-logo {
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            margin-right: 0.75rem;
        }
        
        /* Стили для компактных табов */
        .compact-tab {
            padding: 0.5rem 1rem;
            border-radius: 6px;
            cursor: pointer;
            transition: all var(--transition-duration);
            font-weight: 500;
            white-space: nowrap;
        }
        
        .compact-tab.active {
            background: rgb(var(--accent-primary));
            color: white;
        }

        /* Табы активности: адаптивная горизонтальная прокрутка */
        .activity-tablist {
            display: flex;
            gap: 4px;
            padding: 8px;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
        }

        .activity-tablist::-webkit-scrollbar {
            display: none;
        }

        .activity-tablist .compact-tab {
            flex: 1 0 auto;
            font-size: 0.8rem;
        }

        @media (max-width: 480px) {
            .activity-tablist .compact-tab {
                flex: 0 0 auto;
                padding: 0.5rem 0.85rem;
            }
        }

        /* Список задач: адаптив для мобильных */
        @media (max-width: 640px) {
            #tasksTab {
                padding: 0.75rem 0.5rem !important;
            }

            #tasksTab .task-item {
                padding: 0.5rem 0.6rem;
                gap: 0.6rem;
                border-radius: 10px;
            }

            #tasksTab .task-icon {
                width: 2.25rem;
                height: 2.25rem;
                font-size: 0.9rem;
                border-radius: 8px;
            }

            #tasksTab .task-title {
                font-size: 0.85rem;
            }

            #tasksTab .task-description {
                font-size: 0.72rem;
            }

            #tasksTab .task-action .strict-button,
            #tasksTab .task-action .form-control {
                font-size: 0.72rem;
                padding-top: 0.4rem;
                padding-bottom: 0.4rem;
            }
        }
        
        /* Стили для сетки в один ряд */
        .single-row-grid {
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            gap: 0.5rem;
            align-items: center;
        }
        
        /* Стили для ввода счета */
        .score-input {
            background: rgb(var(--color-overlay-white) / 0.05);
            border: 1px solid rgb(var(--color-overlay-white) / 0.1);
            border-radius: 4px;
            text-align: center;
            font-weight: 600;
        }
        
        .score-input:focus {
            outline: none;
            border-color: rgb(var(--accent-primary));
        }
        
        /* Стили для задач */
        .tasks-container {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        
        .task-item {
            background: rgb(var(--color-card) / 0.7);
            border-radius: 12px;
            padding: 1rem;
            border: 1px solid rgb(var(--color-overlay-white) / 0.08);
            transition: all var(--transition-duration) ease;
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        
        .task-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgb(var(--color-overlay-black) / 0.3);
        }
        
        .task-icon {
            width: 3rem;
            height: 3rem;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            flex-shrink: 0;
        }
        
        .task-content {
            flex: 1;
        }
        
        .task-title {
            font-weight: 600;
            font-size: 0.9rem;
            margin-bottom: 0.25rem;
            color: white;
        }
        
        .task-description {
            font-size: 0.75rem;
            color: rgb(var(--color-text-muted));
            margin-bottom: 0.5rem;
        }
        
        .task-reward {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.75rem;
            color: rgb(var(--color-warning-light));
        }
        
        .task-action {
            flex-shrink: 0;
        }
        
        .task-completed {
            opacity: 0.7;
            background: rgb(var(--color-success-strong) / 0.1);
            border-color: rgb(var(--color-success-strong) / 0.3);
        }
        
        /* Стили для контактов партнеров */
        .partner-contacts {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            margin-top: 0.5rem;
        }
        
        .partner-contact {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.75rem;
            color: rgb(var(--color-text-muted));
        }
        
        .partner-contact a {
            color: rgb(var(--accent-primary));
            text-decoration: none;
            transition: color var(--transition-duration) ease;
        }
        
        .partner-contact a:hover {
            color: rgb(var(--accent-primary-light));
        }

/* Фикс: модальные окна скрываются классом .hidden */
.modal-overlay.hidden {
    display: none !important;
}

/* Фиксированная кнопка смены лиги */
.league-switcher {
    position: fixed;
    bottom: 96px;
    left: 16px;
    z-index: 45;
}

.league-switcher-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgb(var(--accent-primary-dark));
    color: rgb(var(--color-text-strong));
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    border: none;
    box-shadow: 0 8px 24px rgb(var(--color-overlay-black) / 0.45);
    transition: background 0.2s ease;
}

.league-switcher-btn:hover {
    background: rgb(var(--accent-primary-deep));
}

.league-switcher-panel {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    width: 240px;
    max-height: 340px;
    overflow-y: auto;
    background: rgb(var(--color-card));
    border: 1px solid rgb(var(--color-card-soft));
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 12px 32px rgb(var(--color-overlay-black) / 0.5);
    display: none;
}

.league-switcher-panel.open {
    display: block;
}

.league-switcher-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border-radius: 8px;
    color: rgb(var(--color-text-secondary));
    font-size: 13px;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: background 0.2s ease;
}

.league-switcher-item:hover {
    background: rgb(var(--color-overlay-white) / 0.06);
}

.league-switcher-item.active {
    background: rgb(var(--accent-primary-dark));
    color: rgb(var(--color-text-strong));
}

/* Пункт меню выбора лиги */
.league-menu-wrap {
    position: relative;
}

.league-menu-btn {
    color: rgb(var(--accent-primary-light));
    background: rgb(var(--accent-primary) / 0.12);
    border: 1px solid rgb(var(--accent-primary) / 0.25);
    border-radius: 8px;
    cursor: pointer;
}

.league-menu-btn:hover {
    background: rgb(var(--accent-primary) / 0.18);
}

.league-menu-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    padding: 6px;
    background: rgb(var(--color-card));
    border: 1px solid rgb(var(--color-card-soft));
    border-radius: 8px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 60;
    box-shadow: 0 12px 30px rgb(var(--color-overlay-black) / 0.5);
}

.league-menu-panel.open {
    display: block;
}

/* Фиксированные размеры изображений в виджетах */
.home-match-logo {
    width: 1.7rem;
    height: 1.7rem;
}

.home-avatar {
    width: 2rem;
    height: 2rem;
}

/* Адаптивность для небольших телефонов */
@media (max-width: 480px) {
    body {
        overflow-x: hidden;
    }

    .compact-header {
        padding-left: 8px;
        padding-right: 8px;
    }

    .logo a {
        font-size: 1rem;
        width: auto;
        height: auto;
    }

    .logo-img {
        height: 2rem;
    }

    .user-actions .strict-button {
        padding: 6px 10px;
        font-size: 12px;
    }

    .user-actions .material-icons-outlined {
        font-size: 14px;
    }

    .main-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .strict-card {
        padding: 1rem;
    }

    .league-switcher {
        bottom: 84px;
        left: 12px;
    }

    .league-switcher-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .league-switcher-panel {
        width: 210px;
    }
}

/* Заголовки групп в результатах поиска */
.search-result-group-title {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(var(--color-text-muted));
    background: rgb(var(--color-overlay-white) / 0.03);
    border-top: 1px solid rgb(var(--color-overlay-white) / 0.06);
}

.search-result-group-title:first-child {
    border-top: none;
}

/* Кнопка "Посмотреть все" в результатах поиска */
.search-result-view-all {
    display: block;
    padding: 10px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: rgb(var(--accent-primary));
    border-top: 1px solid rgb(var(--color-overlay-white) / 0.06);
    text-decoration: none;
    transition: background 0.2s ease;
}

.search-result-view-all:hover {
    background: rgb(var(--accent-primary) / 0.08);
}

/* Полная страница результатов поиска */
.sr-logo {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.sr-logo-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgb(var(--accent-primary)), rgb(var(--accent-purple)));
    color: rgb(var(--color-text-strong));
    font-weight: 700;
}

.sr-team {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgb(var(--color-overlay-white) / 0.03);
    border: 1px solid rgb(var(--color-overlay-white) / 0.06);
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.sr-team:hover {
    background: rgb(var(--color-overlay-white) / 0.06);
    border-color: rgb(var(--accent-primary) / 0.4);
}

.sr-team-info {
    display: flex;
    flex-direction: column;
}

.sr-team-name {
    color: rgb(var(--color-text-strong));
    font-weight: 600;
    font-size: 14px;
}

.sr-team-meta {
    color: rgb(var(--color-text-muted));
    font-size: 12px;
}

.sr-match {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgb(var(--color-overlay-white) / 0.03);
    border: 1px solid rgb(var(--color-overlay-white) / 0.06);
    text-decoration: none;
    color: rgb(var(--color-text-secondary));
    font-size: 14px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.sr-match:hover {
    background: rgb(var(--color-overlay-white) / 0.06);
    border-color: rgb(var(--accent-primary) / 0.4);
}

.sr-match-score {
    font-weight: 700;
    color: rgb(var(--accent-primary));
}

.sr-match-date {
    color: rgb(var(--color-text-muted));
    font-size: 12px;
}

.sr-review {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgb(var(--color-overlay-white) / 0.03);
    border: 1px solid rgb(var(--color-overlay-white) / 0.06);
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.sr-review:hover {
    background: rgb(var(--color-overlay-white) / 0.06);
    border-color: rgb(var(--accent-primary) / 0.4);
}

.sr-review-title {
    color: rgb(var(--color-text-strong));
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.sr-review-date {
    color: rgb(var(--color-text-muted));
    font-size: 12px;
}

/* Хлебные крошки (speedbar) */
.speedbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: rgb(var(--color-text-faint));
    margin-bottom: 16px;
}

.speedbar a {
    color: rgb(var(--color-text-muted));
    text-decoration: none;
    transition: color 0.2s ease;
}

.speedbar a:hover {
    color: rgb(var(--accent-primary));
}

/* Навигация турнира */
.tourney-tabs-nav {
    border: 1px solid rgb(var(--color-card-soft));
    border-radius: 12px;
    background: rgb(var(--color-card));
    padding: 4px;
}

.tourney-tab {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: rgb(var(--color-text-muted));
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.tourney-tab:hover {
    color: rgb(var(--color-text-strong));
    background: rgb(var(--color-overlay-white) / 0.04);
}

.tourney-tab.content-filter__item--active {
    color: rgb(var(--color-text-strong));
    background: rgb(var(--accent-primary-dark));
}

.tourney-league-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 16px 0;
}

.tourney-league-card {
    width: 100%;
}

@media (min-width: 768px) {
    .tourney-league-card {
        width: calc(33.333% - 12px);
    }
}

.tourney-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 1024px) {
    .tourney-layout {
        flex-direction: row;
        align-items: flex-start;
    }
}

.tourney-sidebar {
    width: 100%;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .tourney-sidebar {
        width: 300px;
    }
}

/* Контентная колонка страниц турнира */
.col-sm-9,
.col-sm-12,
.review-page {
    flex: 1;
    min-width: 0;
}

.site-content {
    padding: 16px 0;
}

/* Таблицы турнира */
.tourney-table-wrap {
    overflow-x: auto;
}

.tourney-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
}

.tourney-table thead th {
    text-align: center;
    padding: 10px 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(var(--color-text-muted));
    border-bottom: 1px solid rgb(var(--color-card-soft));
    white-space: nowrap;
}

.tourney-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid rgb(var(--color-card-line));
    color: rgb(var(--color-text-secondary));
}

.tourney-table tbody tr:hover {
    background: rgb(var(--color-overlay-white) / 0.03);
}

/* Чередование строк таблицы */
.tourney-table tbody tr:nth-child(odd) {
    background: rgb(var(--color-overlay-white) / 0.02);
}

.light-theme .tourney-table tbody tr:nth-child(odd) {
    background: rgb(var(--color-overlay-black) / 0.02);
}

/* Серия последних матчей (точки) — цвета Lakers: золото (победа) / пурпур (поражение) */
.series-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0 2px;
    vertical-align: middle;
}

.series-win {
    background: rgb(var(--accent-gold));
    box-shadow: 0 0 4px rgb(var(--accent-gold) / 0.6);
}

.series-lose {
    background: rgb(var(--color-purple-lakers));
    box-shadow: 0 0 6px rgb(var(--color-purple-lakers) / 0.7);
    border: 1px solid rgb(var(--color-overlay-white) / 0.18);
}

/* Стрелки изменения позиции */
.position-col {
    width: 28px;
}

.position-arrow {
    font-size: 12px;
}

.arrow-up {
    color: rgb(var(--color-success-strong));
}

.arrow-down {
    color: rgb(var(--color-danger));
}

.arrow-stay {
    color: rgb(var(--color-text-faint));
}

.tourney-table a {
    color: rgb(var(--color-text-secondary));
    text-decoration: none;
    transition: color 0.2s ease;
}

.tourney-table a:hover {
    color: rgb(var(--accent-primary-light));
}

.tac {
    text-align: center;
}

.mobile_hide,
.hide_mobile {
}

@media (max-width: 768px) {
    .mobile_hide,
    .hide_mobile {
        display: none;
    }
}

/* Кнопки кругов */
.tourney-lap-btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: rgb(var(--color-text-muted));
    background: rgb(var(--color-card));
    border: 1px solid rgb(var(--color-card-soft));
    text-decoration: none;
    transition: all 0.2s ease;
}

.tourney-lap-btn:hover {
    color: rgb(var(--color-text-strong));
    background: rgb(var(--color-card-soft));
}

.tourney-lap-btn.active {
    color: rgb(var(--color-text-strong));
    background: rgb(var(--accent-primary-dark));
    border-color: rgb(var(--accent-primary-dark));
}

/* Поиск в таблицах */
.tourney-search {
    width: 100%;
    max-width: 320px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgb(var(--color-card-soft));
    background: rgb(var(--color-bg-soft));
    color: rgb(var(--color-text-secondary));
    font-size: 14px;
    font-family: inherit;
}

.tourney-search:focus {
    outline: none;
    border-color: rgb(var(--accent-primary));
}

/* Информационные таблицы (общая информация) */
.tourney-info-table {
    width: 100%;
    font-size: 14px;
}

.tourney-info-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgb(var(--color-card-line));
}

.tourney-info-table td:first-child {
    color: rgb(var(--color-text-muted));
    width: 45%;
}

/* Карточки команд (участники) */
.team-card-item:hover {
    transform: translateY(-2px);
    border-color: rgb(var(--accent-primary));
}

/* Сетка списка турниров */
.tourney-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Сетка плей-офф (bracket) */
.tournament-bracket {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding-bottom: 16px;
}

.tournament-bracket__round {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 220px;
}

.tournament-bracket__round-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(var(--color-text-muted));
    margin: 0 0 4px;
}

.tournament-bracket__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.tournament-bracket__match {
    background: rgb(var(--color-card));
    border: 1px solid rgb(var(--color-card-soft));
    border-radius: 10px;
    padding: 8px;
}

.tournament-bracket__caption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: rgb(var(--color-text-muted));
    padding: 0 6px 4px;
}

.tournament-bracket__caption a {
    color: rgb(var(--color-text-muted));
    text-decoration: none;
}

.tournament-bracket__caption a:hover {
    color: rgb(var(--accent-primary-light));
}

.tournament-bracket__table {
    width: 100%;
    border-collapse: collapse;
}

.tournament-bracket__country {
    padding: 4px 6px;
    color: rgb(var(--color-text-secondary));
    font-size: 13px;
}

.tournament-bracket__score {
    text-align: right;
    padding: 4px 6px;
    white-space: nowrap;
}

.tournament-bracket__number {
    color: rgb(var(--color-text-strong));
    font-weight: 600;
}

.tournament-bracket__team.winner .tournament-bracket__country,
.tournament-bracket__team.winner .tournament-bracket__number {
    color: rgb(var(--accent-primary-light));
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.float-right {
    float: right;
}

/* Формы (совместимость с Bootstrap-классами) */
.form-control {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgb(var(--color-card-soft));
    background: rgb(var(--color-bg-soft));
    color: rgb(var(--color-text-secondary));
    font-size: 14px;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: rgb(var(--accent-primary));
}

.form-group {
    margin-bottom: 12px;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-primary {
    background: rgb(var(--accent-primary-dark));
    color: rgb(var(--color-text-strong));
}

.btn-primary:hover {
    background: rgb(var(--accent-primary-deep));
}

.btn-success {
    background: #16a34a;
    color: rgb(var(--color-text-strong));
}

.btn-danger {
    background: rgb(var(--color-danger-strong));
    color: rgb(var(--color-text-strong));
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Сетка Bootstrap (совместимость) */
.col-xs-12,
.col-sm-12,
.col-md-12 {
    width: 100%;
}

.col-sm-6,
.col-md-4,
.col-md-6 {
    width: 100%;
}

@media (min-width: 768px) {
    .col-sm-6 {
        width: 50%;
    }

    .col-md-4 {
        width: 33.333%;
    }

    .col-md-6 {
        width: 50%;
    }
}

/* Сетка списка новостей */
.news-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

/* Пагинация */
.dle-navigation {
    padding: 20px 0;
    grid-column: 1 / -1;
}

.dle-nav-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.dle-nav-pages a,
.dle-nav-pages span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 14px;
    margin: 0 2px;
}

.dle-nav-pages a {
    color: rgb(var(--color-text-secondary));
    background: rgb(var(--color-card));
    border: 1px solid rgb(var(--color-card-soft));
    text-decoration: none;
    transition: all 0.2s ease;
}

.dle-nav-pages a:hover {
    background: rgb(var(--color-card-soft));
    color: rgb(var(--color-text-strong));
    border-color: rgb(var(--accent-primary));
}

.dle-nav-pages span {
    color: rgb(var(--color-text-strong));
    background: rgb(var(--accent-primary-dark));
    font-weight: 600;
}

.dle-nav-pages span.nav_ext {
    background: transparent;
    border: none;
    color: rgb(var(--color-text-muted));
    min-width: auto;
    padding: 0 4px;
}

/* ============================================
   СТРАНИЦА КОМАНДЫ (дизайн по .team)
   ============================================ */

/* Градиенты для цветов */
.gradient-blue { background: linear-gradient(135deg, rgb(var(--accent-primary)) 0%, rgb(var(--accent-primary-deep)) 100%); }
.gradient-red { background: linear-gradient(135deg, rgb(var(--color-danger)) 0%, rgb(var(--color-danger-strong)) 100%); }
.gradient-green { background: linear-gradient(135deg, rgb(var(--color-success-deep)) 0%, #059669 100%); }
.gradient-purple { background: linear-gradient(135deg, rgb(var(--accent-purple)) 0%, rgb(var(--accent-purple-light)) 100%); }
.gradient-yellow { background: linear-gradient(135deg, rgb(var(--color-warning)) 0%, rgb(var(--color-warning-dark)) 100%); }
.gradient-indigo { background: linear-gradient(135deg, #6366f1 0%, rgb(var(--accent-indigo-dark)) 100%); }
.gradient-pink { background: linear-gradient(135deg, #ec4899 0%, #db2777 100%); }
.gradient-teal { background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%); }
.gradient-orange { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); }
.gradient-cyan { background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%); }

/* Универсальные классы для аватаров и иконок */
.avatar-circle {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(var(--color-text-strong));
    font-weight: bold;
}

.avatar-sm { width: 2rem; height: 2rem; font-size: 0.75rem; }
.avatar-md { width: 2.5rem; height: 2.5rem; font-size: 0.875rem; }
.avatar-lg { width: 3rem; height: 3rem; font-size: 1rem; }

.icon-sm { width: 1.5rem; height: 1.5rem; font-size: 0.75rem; }
.icon-md { width: 2rem; height: 2rem; font-size: 1rem; }
.icon-lg { width: 2.5rem; height: 2.5rem; font-size: 1.25rem; }

/* Компактные классы для отступов и текста */
.p-compact { padding: 0.75rem; }
.px-compact { padding-left: 0.75rem; padding-right: 0.75rem; }
.py-compact { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.text-compact { font-size: 0.875rem; }
.text-xs-compact { font-size: 0.75rem; }

/* Карточка матча */
.card-match { border-left-width: 4px; }
.card-match-blue { border-left-color: rgb(var(--accent-primary)); }
.card-match-red { border-left-color: rgb(var(--color-danger)); }
.card-match-green { border-left-color: rgb(var(--color-success-deep)); }
.card-match-purple { border-left-color: rgb(var(--accent-purple)); }

/* Фоновые градиенты для потоков */
.stream-bg-red { background: linear-gradient(to right, rgb(var(--color-danger) / 0.3), rgb(var(--color-danger-strong) / 0.3)); }
.stream-bg-blue { background: linear-gradient(to right, rgb(var(--accent-primary) / 0.3), rgb(var(--accent-primary-dark) / 0.3)); }
.stream-bg-purple { background: linear-gradient(to right, rgb(var(--accent-purple) / 0.3), rgb(var(--accent-purple-light) / 0.3)); }

/* Фото игрока */
.player-photo {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, rgb(var(--color-card)) 0%, rgb(var(--color-card-soft)) 100%);
}

.player-photo-modal img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgb(var(--color-overlay-black) / 0.5);
}

@media (max-width: 768px) {
    .player-photo {
        width: 72px;
        height: 72px;
    }
}

/* Карточка игрока (состав / дозаявки / фанаты) */
.player-card {
    position: relative;
    background: rgb(var(--color-card) / 0.7);
    border-radius: 12px;
    border: 1px solid rgb(var(--color-overlay-white) / 0.08);
    padding: 1rem;
    text-align: center;
    transition: all var(--transition-duration) ease;
}

.player-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgb(var(--color-overlay-black) / 0.3);
    border-color: rgb(var(--accent-primary) / 0.3);
}

.player-card-status {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgb(var(--accent-primary) / 0.9);
    color: rgb(var(--color-text-strong));
    font-weight: 600;
    z-index: 1;
    white-space: nowrap;
}

.player-card-status .green {
    color: rgb(var(--color-success-pale));
}

.player-card-status .blue {
    color: #bfdbfe;
}

.player-card .btn,
.player-card a.btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 6px;
    color: rgb(var(--color-text-secondary));
    background: rgb(var(--color-overlay-white) / 0.06);
    border: 1px solid rgb(var(--color-overlay-white) / 0.1);
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 2px;
}

.player-card .btn:hover,
.player-card a.btn:hover {
    background: rgb(var(--accent-primary) / 0.15);
    border-color: rgb(var(--accent-primary) / 0.4);
    color: rgb(var(--color-text-strong));
}

/* Шестеренка управления игроком */
.player-gear-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(var(--color-overlay-white) / 0.06);
    border: 1px solid rgb(var(--color-overlay-white) / 0.1);
    color: rgb(var(--color-text-muted));
    cursor: pointer;
    transition: all var(--transition-duration) ease;
    z-index: 2;
}

.player-gear-btn:hover {
    background: rgb(var(--accent-primary) / 0.15);
    color: rgb(var(--accent-primary-light));
    border-color: rgb(var(--accent-primary) / 0.4);
}

.player-gear-menu {
    position: absolute;
    top: 40px;
    right: 8px;
    width: 180px;
    background: rgb(var(--color-card));
    border: 1px solid rgb(var(--color-overlay-white) / 0.1);
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 20px 40px rgb(var(--color-overlay-black) / 0.4);
    z-index: 40;
    text-align: left;
}

/* Карточка игрока с открытым меню шестерёнки: поднимаем её stacking context
   (у .strict-card backdrop-filter создаёт свой контекст, из-за чего меню
   соседней карточки могло перекрываться следующей карточкой игрока) */
.user_search.player-gear-open,
.player-card.player-gear-open {
    z-index: 5;
}

.player-gear-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    font-size: 0.75rem;
    color: rgb(var(--color-text));
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s ease;
    margin: 0;
}

.player-gear-item:hover {
    background: rgb(var(--color-overlay-white) / 0.06);
}

.player-gear-item.danger {
    color: rgb(var(--color-danger-light));
}

.player-gear-item.danger:hover {
    background: rgb(var(--color-danger) / 0.1);
}

.player-gear-divider {
    height: 1px;
    background: rgb(var(--color-overlay-white) / 0.08);
    margin: 6px 4px;
}

.player-gear-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-size: 0.7rem;
    color: rgb(var(--color-text-muted));
    line-height: 1.4;
}

.player-gear-meta .material-icons-outlined {
    font-size: 0.9rem;
    color: rgb(var(--color-text-faint));
}

.team-staff-divider {
    height: 1px;
    background: rgb(var(--color-overlay-white) / 0.06);
}

/* Страница редактирования команды */
.edit-file-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 8px;
    background: rgb(var(--color-overlay-white) / 0.05);
    border: 1px dashed rgb(var(--color-overlay-white) / 0.2);
    color: rgb(var(--color-text-muted));
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-duration) ease;
}

.edit-file-label:hover {
    border-color: rgb(var(--accent-primary));
    color: rgb(var(--accent-primary-light));
    background: rgb(var(--accent-primary) / 0.1);
}

.edit-file-label input {
    display: none;
}

.team-role-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgb(var(--accent-primary) / 0.15);
    color: rgb(var(--accent-primary-light));
    font-size: 0.68rem;
    font-weight: 600;
    margin-top: 4px;
}

/* Результаты поиска игроков */
.search-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgb(var(--color-overlay-white) / 0.04);
    border: 1px solid rgb(var(--color-overlay-white) / 0.08);
    color: rgb(var(--color-text-secondary));
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-duration) ease;
}

.search-user-item:hover {
    background: rgb(var(--accent-primary) / 0.1);
    border-color: rgb(var(--accent-primary) / 0.35);
    color: rgb(var(--color-text-strong));
}

.search-user-foto {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-user-name {
    display: block;
    color: rgb(var(--color-text-secondary));
    font-size: 0.8rem;
}

.search-user-birth {
    display: block;
    color: rgb(var(--color-text-muted));
    font-size: 0.7rem;
    margin-top: 2px;
}

.search-user-item .material-icons-outlined {
    color: rgb(var(--accent-primary));
}

/* Замена фото игрока внутри шестерёнки */
.player-gear-menu .edit-file-label {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 2px 0;
    padding: 8px 10px;
    font-size: 0.75rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgb(var(--color-text));
    cursor: pointer;
    transition: background 0.3s ease;
}

.player-gear-menu .edit-file-label:hover {
    background: rgb(var(--color-overlay-white) / 0.06);
}

.player-gear-menu .edit-file-label input {
    display: none;
}

/* Логотип спонсора */
.partner-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

/* Профиль пользователя (userinfo.tpl) */
.timezoneselect,
.twofactorselect,
select.form-control {
    width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    background: rgb(var(--color-overlay-white) / 0.05);
    border: 1px solid rgb(var(--color-overlay-white) / 0.1);
    color: rgb(var(--color-text));
    font-size: 0.8rem;
    outline: none;
}

.timezoneselect:focus,
.twofactorselect:focus,
select.form-control:focus {
    border-color: rgb(var(--accent-primary));
}

.timezoneselect option,
.twofactorselect option,
select.form-control option {
    background: rgb(var(--color-card));
    color: rgb(var(--color-text));
}

.xfields {
    width: 100%;
    border-collapse: collapse;
}

.xfields td {
    padding: 6px 0;
    color: rgb(var(--color-text-secondary));
    font-size: 0.8rem;
    vertical-align: middle;
}

.xfields input[type="text"],
.xfields input[type="password"],
.xfields select,
.xfields textarea {
    width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    background: rgb(var(--color-overlay-white) / 0.05);
    border: 1px solid rgb(var(--color-overlay-white) / 0.1);
    color: rgb(var(--color-text));
    font-size: 0.8rem;
    outline: none;
}

.xfields input:focus,
.xfields select:focus,
.xfields textarea:focus {
    border-color: rgb(var(--accent-primary));
}

.ignore-list-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    margin: 2px;
    border-radius: 8px;
    background: rgb(var(--color-overlay-white) / 0.05);
    border: 1px solid rgb(var(--color-overlay-white) / 0.08);
}

.profile-team-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgb(var(--color-overlay-white) / 0.04);
    border: 1px solid rgb(var(--color-overlay-white) / 0.07);
    font-size: 0.8rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.profile-team-item:hover {
    border-color: rgb(var(--accent-primary) / 0.45);
    background: rgb(var(--color-overlay-white) / 0.08);
    transform: translateY(-1px);
}

.profile-team-item .material-icons-outlined {
    color: rgb(var(--accent-primary));
    flex-shrink: 0;
}

.profile-team-item span:nth-child(2) {
    flex: 1;
    min-width: 0;
}

/* Навигация по турниру (страницы редактирования) */
.tourney-nav {
    background: rgb(var(--color-overlay-white) / 0.03);
    border: 1px solid rgb(var(--color-overlay-white) / 0.07);
}

.tourney-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgb(var(--color-overlay-white) / 0.04);
    border: 1px solid rgb(var(--color-overlay-white) / 0.08);
    color: rgb(var(--color-text-secondary));
    font-size: 0.75rem;
    text-decoration: none;
    transition: all var(--transition-duration) ease;
}

.tourney-nav-link:hover {
    background: rgb(var(--accent-primary) / 0.12);
    border-color: rgb(var(--accent-primary) / 0.35);
    color: rgb(var(--color-text-strong));
}

.tourney-nav-sep {
    width: 1px;
    height: 18px;
    background: rgb(var(--color-overlay-white) / 0.12);
    margin: 0 4px;
}

/* Иконка уведомления (info.tpl / msgbox) */
.info-icon {
    width: 56px;
    height: 56px;
}

/* Шахматка: подсветка строки и столбца при наведении */
.tourney-table tr.shakhmat-row-active td {
    background: rgb(var(--accent-primary) / 0.08);
}

.tourney-table td.shakhmat-col-active {
    background: rgb(var(--accent-primary) / 0.08);
}

.tourney-table td.shakhmat-col-active.shakhmat-row-active {
    background: rgb(var(--accent-primary) / 0.18);
}

/* Редактирование матча */
.add_address {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgb(var(--color-overlay-white) / 0.04);
    border: 1px solid rgb(var(--color-overlay-white) / 0.08);
    color: rgb(var(--color-text-secondary));
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-duration) ease;
}

.add_address:hover {
    background: rgb(var(--accent-primary) / 0.12);
    border-color: rgb(var(--accent-primary) / 0.35);
    color: rgb(var(--color-text-strong));
}

.remove_address {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgb(var(--color-danger) / 0.08);
    border: 1px solid rgb(var(--color-danger) / 0.2);
    color: rgb(var(--color-danger-pale));
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-duration) ease;
}

.remove_address:hover {
    background: rgb(var(--color-danger) / 0.15);
    border-color: rgb(var(--color-danger) / 0.4);
    color: rgb(var(--color-text-strong));
}

/* Статистика матча: сетка полей игрока */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

@media (max-width: 768px) {
    .stat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stat_input input[type="checkbox"] {
    accent-color: rgb(var(--accent-primary));
}

.team-stat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* Сообщение о сохранении */
#saveResultMsg.success-message {
    border-color: rgb(var(--color-success-deep) / 0.3);
    background: rgb(var(--color-success-deep) / 0.08);
    color: rgb(var(--color-success-pale));
}

#saveResultMsg.error-message {
    border-color: rgb(var(--color-danger) / 0.3);
    background: rgb(var(--color-danger) / 0.08);
    color: rgb(var(--color-danger-pale));
}

/* Выпадающий список с поиском (судья/секретарь) */
.searchable-select {
    position: relative;
}

.searchable-select-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    background: rgb(var(--color-overlay-white) / 0.05);
    border: 1px solid rgb(var(--color-overlay-white) / 0.1);
    color: rgb(var(--color-text));
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-duration) ease;
}

.searchable-select-btn:hover,
.searchable-select-btn:focus {
    border-color: rgb(var(--accent-primary));
    outline: none;
}

.searchable-select-btn .material-icons-outlined {
    color: rgb(var(--color-text-muted));
    font-size: 1rem;
    flex-shrink: 0;
}

.searchable-select-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 50;
    background: rgb(var(--color-card));
    border: 1px solid rgb(var(--color-overlay-white) / 0.1);
    border-radius: 10px;
    box-shadow: 0 20px 40px rgb(var(--color-overlay-black) / 0.4);
    padding: 6px;
}

.searchable-select-search {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 6px;
    background: rgb(var(--color-overlay-white) / 0.05);
    border: 1px solid rgb(var(--color-overlay-white) / 0.1);
    color: rgb(var(--color-text));
    font-size: 0.75rem;
    outline: none;
}

.searchable-select-search:focus {
    border-color: rgb(var(--accent-primary));
}

.searchable-select-search::placeholder {
    color: rgb(var(--color-text-faint));
}

.searchable-select-list {
    max-height: 240px;
    overflow-y: auto;
}

.searchable-select-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: rgb(var(--color-text-secondary));
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.searchable-select-option:hover {
    background: rgb(var(--accent-primary) / 0.12);
    color: rgb(var(--color-text-strong));
}

.searchable-select-option.selected {
    background: rgb(var(--accent-primary) / 0.18);
    color: rgb(var(--accent-primary-light));
    font-weight: 600;
}

/* Страница матча: крупный счёт */
.match-score .game-result__score-result {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.match-score .game-result__score-result--winner {
    color: rgb(var(--color-success));
}

.match-score .game-result__score-result--loser {
    color: rgb(var(--color-danger-light));
}

.match-score .game-result__score-dash {
    color: rgb(var(--color-text-faint));
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 4px;
}

@media (min-width: 768px) {
    .match-score .game-result__score-result {
        font-size: 2.5rem;
    }

    .match-score .game-result__score-dash {
        font-size: 2rem;
        margin: 0 6px;
    }
}

/* Лучшие игроки матча: номер места */
.best-player-rank {
    position: absolute;
    top: -6px;
    left: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgb(var(--accent-primary));
    color: rgb(var(--color-text-strong));
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgb(var(--color-overlay-black) / 0.3);
}

/* Компактная статистика игрока */
.player-stats {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgb(var(--color-text-muted));
    white-space: nowrap;
}

.ps-sep {
    color: rgb(var(--color-text-fainter));
    font-weight: 400;
}

.ps-total {
    color: rgb(var(--accent-primary-light));
    font-size: 0.8rem;
    font-weight: 700;
}

.roster-table tbody td {
    padding: 5px 10px;
    border-bottom: 1px solid rgb(var(--color-overlay-white) / 0.04);
}

.roster-table tbody tr:last-child td {
    border-bottom: none;
}

/* Лучшие по амплуа */
.role-badge {
    position: absolute;
    top: -6px;
    left: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgb(var(--accent-primary));
    color: rgb(var(--color-text-strong));
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgb(var(--color-overlay-black) / 0.3);
}

.mvp-card {
    border-color: rgb(var(--color-warning) / 0.35) !important;
    background: rgb(var(--color-warning) / 0.06) !important;
}

.mvp-card .role-badge {
    background: rgb(var(--color-warning));
}

/* Карточка MVP на всю ширину */
.mvp-trophy {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgb(var(--color-overlay-black) / 0.3);
}

.mvp-trophy .material-icons-outlined {
    font-size: 2.2rem;
}

.mvp-fullwidth {
    border-color: rgb(var(--color-warning) / 0.4) !important;
    background: rgb(var(--color-warning) / 0.06) !important;
}

/* Спонсор матча */
.match-sponsor {
    display: flex;
    flex-direction: column;
}

.match-sponsor-placeholder {
    min-height: 240px;
    border: 2px dashed rgb(var(--color-overlay-white) / 0.12);
    background: rgb(var(--color-overlay-white) / 0.03);
}

/* Спонсор создан и включён — картинка растягивается на всю свободную область,
   название выводится строкой ниже картинки */
.match-sponsor-list {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-height: 260px;
}

.match-sponsor-list .match-sponsor-fill {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
}

.match-sponsor-list .match-sponsor-fill + .match-sponsor-fill {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgb(var(--color-overlay-white) / 0.12);
}

.match-sponsor-list .match-sponsor-media {
    position: relative;
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.match-sponsor-list .match-sponsor-media img.match-sponsor-logo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.match-sponsor-list .match-sponsor-media .match-sponsor-logo--empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    font-size: 3.5rem;
    font-weight: 700;
    color: rgb(var(--color-text-strong));
    background: linear-gradient(135deg, rgb(var(--accent-primary)) 0%, rgb(var(--accent-purple)) 100%);
    border-radius: 16px;
}

.match-sponsor-list .match-sponsor-title {
    padding-top: 8px;
    line-height: 1.3;
    text-decoration: none;
}

/* Админ-панель: сортировка партнеров drag&drop */
#partnerSortTable tbody tr[data-id] {
    cursor: grab;
}

#partnerSortTable tbody tr.partner-row-dragging {
    opacity: 0.4;
    background: rgba(59, 130, 246, 0.18) !important;
    cursor: grabbing !important;
}

#partnerSortTable tbody tr.partner-drop-line td {
    padding: 0 !important;
    height: 5px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.95) 15%, rgba(59, 130, 246, 0.95) 85%, transparent);
    border-radius: 3px;
}

/* Кнопка «Смотреть» (трансляция матча) */
.stream-watch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgb(var(--color-danger)) 0%, rgb(var(--color-danger-strong)) 100%);
    color: rgb(var(--color-text-strong));
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgb(var(--color-danger-strong) / 0.35);
    transition: all var(--transition-duration) ease;
}

.stream-watch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgb(var(--color-danger-strong) / 0.45);
    color: rgb(var(--color-text-strong));
}

.stream-watch-btn .material-icons-outlined {
    font-size: 1.2rem;
}

.stream-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgb(var(--color-text-strong));
    animation: stream-live-pulse 1.2s ease-in-out infinite;
}

@keyframes stream-live-pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.75);
    }
}

/* Карточка трансляции на главной (структура из .other, тёмная тема) */
.stream-card {
    padding: 16px;
    position: relative;
}

.stream-thumb {
    border-radius: 12px;
    height: 140px;
    background: linear-gradient(135deg, #0b1220 0%, #1c2c4d 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all var(--transition-duration) ease;
}

a.block:hover .stream-thumb {
    background: linear-gradient(135deg, #111c33 0%, #223c66 100%);
}

.stream-thumb .material-icons-outlined {
    font-size: 46px;
    color: rgb(var(--color-overlay-white) / 0.85);
}

.badge-live {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgb(var(--color-danger) / 0.15);
    color: rgb(var(--color-danger-light));
    font-size: 11px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 999px;
    z-index: 1;
}

.badge-live .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgb(var(--color-danger));
    animation: stream-live-pulse 1.4s infinite;
}

.badge-live.badge-soon {
    background: rgb(var(--accent-primary) / 0.15);
    color: rgb(var(--accent-primary-light));
}

.badge-live .dot.dot-soon {
    background: rgb(var(--accent-primary));
    animation: none;
}

.stream-thumb .viewers {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgb(var(--color-overlay-black) / 0.5);
    color: rgb(var(--color-text-strong));
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    display: flex;
    gap: 4px;
    align-items: center;
}

.stream-person {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgb(var(--color-overlay-white) / 0.08);
}

.avatar-round {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgb(var(--accent-primary) / 0.15);
    color: rgb(var(--accent-primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

/* Название команды в карточке матча: перенос до 2 строк */
.match-team-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
    word-break: break-word;
    min-width: 0;
}

/* Буква-аватар команды в карточке трансляции */
.stream-team-letter {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: rgb(var(--accent-primary) / 0.15);
    color: rgb(var(--accent-primary-light));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Список команд в модальном окне (игрок / фанат) */
.team-list-item {
    transition: all var(--transition-duration) ease;
}

.team-list-item:hover {
    border-color: rgb(var(--accent-primary) / 0.4) !important;
    background: rgb(var(--accent-primary) / 0.06) !important;
}

/* Чекбоксы на страницах редактирования */
.admin-checkbox {
    width: 16px;
    height: 16px;
    accent-color: rgb(var(--accent-primary));
    flex-shrink: 0;
}

/* Карточка обзора матча на главной */
.home-review-card {
    transition: all var(--transition-duration) ease;
}

/* Меньший отступ карточек на главной (обзоры и публикации) —
   перебивает Tailwind p-* и .strict-card padding на мобильных */
.home-review-card,
.home-pub-card {
    padding: 12px !important;
}

.home-review-card:hover {
    border-color: rgb(var(--accent-primary) / 0.4) !important;
    background: rgb(var(--accent-primary) / 0.04) !important;
}

/* Шапка команды */
.team-header-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    font-weight: 800;
    font-size: 1.5rem;
    color: rgb(var(--color-text-strong));
}

.team-header-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1.25rem;
}

@media (min-width: 768px) {
    .team-stats-row {
        grid-template-columns: repeat(6, 1fr);
    }
}

.team-stat {
    background: rgb(var(--color-overlay-white) / 0.04);
    border: 1px solid rgb(var(--color-overlay-white) / 0.07);
    border-radius: 12px;
    padding: 0.75rem 0.5rem;
    text-align: center;
}

.team-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: rgb(var(--color-text-strong));
    line-height: 1.2;
}

.team-stat-label {
    font-size: 0.7rem;
    color: rgb(var(--color-text-muted));
    margin-top: 2px;
}

/* Выпадающее меню настроек команды */
.team-menu-root {
    position: relative;
    z-index: 30;
}

.team-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 240px;
    background: rgb(var(--color-card));
    border: 1px solid rgb(var(--color-overlay-white) / 0.1);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 20px 40px rgb(var(--color-overlay-black) / 0.4);
    z-index: 60;
}

.team-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    font-size: 0.8rem;
    color: rgb(var(--color-text));
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.team-dropdown-item:hover {
    background: rgb(var(--color-overlay-white) / 0.06);
}

.team-dropdown-item.danger {
    color: rgb(var(--color-danger-light));
}

.team-dropdown-item.danger:hover {
    background: rgb(var(--color-danger) / 0.1);
}

/* Таблицы (таблица лиги, статистика игроков, календарь) */
.team-table {
    width: 100%;
    font-size: 0.8rem;
    border-collapse: collapse;
}

.team-table thead th {
    text-align: left;
    padding: 8px 10px;
    color: rgb(var(--color-text-muted));
    font-weight: 500;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgb(var(--color-overlay-white) / 0.08);
}

.team-table tbody td {
    padding: 8px 10px;
    color: rgb(var(--color-text-secondary));
    border-bottom: 1px solid rgb(var(--color-overlay-white) / 0.05);
}

.team-table tbody tr:last-child td {
    border-bottom: none;
}

.team-table tbody tr:hover {
    background: rgb(var(--color-overlay-white) / 0.03);
}

.team-table td.tac,
.team-table th.tac {
    text-align: center;
}

.team-table tbody tr td[colspan] {
    background: rgb(var(--color-overlay-white) / 0.03);
    color: rgb(var(--color-text-muted));
    font-weight: 600;
    text-align: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.team-table tr.b {
    background: rgb(var(--accent-primary) / 0.08);
}

.team-table tr.b td {
    color: rgb(var(--accent-primary-light));
    font-weight: 600;
}

.team-table a {
    color: rgb(var(--color-text-secondary));
    text-decoration: none;
    transition: color 0.2s ease;
}

.team-table a:hover {
    color: rgb(var(--accent-primary));
}

/* Последний матч — счёт (обёртка из last_match.php) */
.team-last-match .game-result__score-result {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.team-last-match .game-result__score-result--winner {
    color: rgb(var(--color-success));
}

.team-last-match .game-result__score-result--loser {
    color: rgb(var(--color-danger-light));
}

.team-last-match .game-result__score-dash {
    color: rgb(var(--color-text-faint));
    margin: 0 2px;
    font-weight: 600;
}

/* Информация о команде */
.team-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgb(var(--color-overlay-white) / 0.06);
    font-size: 0.85rem;
    gap: 12px;
}

.team-info-row:last-child {
    border-bottom: none;
}

.team-info-label {
    color: rgb(var(--color-text-muted));
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.team-info-label .material-icons-outlined {
    font-size: 1rem;
}

.team-info-value {
    color: rgb(var(--color-text));
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

.team-info-value a {
    color: rgb(var(--accent-primary));
    text-decoration: none;
}

.team-info-value a:hover {
    color: rgb(var(--accent-primary-light));
}

/* Руководство команды */
.team-staff-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgb(var(--color-overlay-white) / 0.06);
}

.team-staff-row:last-child {
    border-bottom: none;
}

.team-staff-badge {
    display: inline-block;
    font-size: 0.65rem;
    padding: 2px 10px;
    border-radius: 999px;
    margin-top: 4px;
}

/* Контактные карточки (капитан / менеджер) */
.team-contact-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgb(var(--color-overlay-white) / 0.04);
    border: 1px solid rgb(var(--color-overlay-white) / 0.07);
    border-radius: 12px;
    margin-top: 10px;
}

.team-contact-card img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.team-contact-card a {
    color: rgb(var(--accent-primary));
    text-decoration: none;
}

.team-contact-card a:hover {
    color: rgb(var(--accent-primary-light));
}

.team-contact-meta {
    font-size: 0.75rem;
    color: rgb(var(--color-text-muted));
    margin-top: 2px;
    line-height: 1.5;
}

.team-contact-meta li {
    list-style: none;
}

/* Плашки активных турниров */
.active-tourney-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px 12px;
    border-radius: 14px;
    background: rgb(var(--color-card) / 0.7);
    border: 1px solid rgb(var(--color-overlay-white) / 0.08);
    color: rgb(var(--color-text-secondary));
    text-decoration: none;
    transition: all var(--transition-duration) ease;
    gap: 8px;
    min-height: 110px;
}

.active-tourney-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgb(var(--color-overlay-black) / 0.3);
    border-color: rgb(var(--accent-primary));
    color: rgb(var(--color-text-secondary));
}

.active-tourney-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgb(var(--accent-primary) / 0.15);
    color: rgb(var(--accent-primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
}

.active-tourney-title {
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.25;
}

.active-tourney-meta {
    font-size: 0.7rem;
    color: rgb(var(--color-text-muted));
}

/* Кнопка «Турниры» / «Регистрация» и модальное окно активных турниров */
.active-tourneys-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    background: transparent;
    color: rgb(var(--color-text-muted));
    font-size: 0.9rem;
    font-weight: 400;
    border: none;
    cursor: pointer;
    transition: all var(--transition-duration);
    text-align: left;
}

.active-tourneys-btn:hover {
    background: rgb(var(--accent-primary) / 0.1);
    color: rgb(var(--accent-primary));
}

.active-tourneys-btn .material-icons-outlined {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-right: 12px;
}

.active-tourneys-label {
    flex: 1;
    text-align: left;
}

.active-tourneys-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgb(var(--color-overlay-white) / 0.06);
    color: rgb(var(--color-text-faint));
    font-size: 0.7rem;
    font-weight: 500;
    flex-shrink: 0;
}

.tourney-modal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgb(var(--color-card) / 0.7);
    border: 1px solid rgb(var(--color-overlay-white) / 0.08);
    color: rgb(var(--color-text-secondary));
    flex-wrap: wrap;
    text-decoration: none;
    transition: all var(--transition-duration) ease;
}

.tourney-modal-item:hover {
    border-color: rgb(var(--accent-primary));
    background: rgb(var(--accent-primary) / 0.08);
}

/* Компактные ссылки меню турнира под каждым турниром */
.tourney-modal-links {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tourney-modal-link {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: rgb(var(--color-text-secondary));
    background: rgb(var(--accent-primary) / 0.10);
    border: 1px solid rgb(var(--accent-primary) / 0.2);
    text-decoration: none;
    transition: all 0.2s ease;
}

.tourney-modal-link:hover {
    color: rgb(var(--color-text-strong));
    background: rgb(var(--accent-primary));
    border-color: rgb(var(--accent-primary));
}

/* Кнопка «Регистрация» в модальном окне турниров */
.tourney-reg-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgb(var(--accent-primary)) 0%, rgb(var(--accent-primary-deep)) 100%);
    color: rgb(var(--color-text-strong));
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all var(--transition-duration) ease;
}

.tourney-reg-btn:hover {
    background: linear-gradient(135deg, rgb(var(--accent-primary-dark)) 0%, rgb(var(--accent-primary-deep)) 100%);
    color: rgb(var(--color-text-strong));
}

/* Переключатель лиг */
.league-toggle {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.league-toggle-btn {
    width: 100%;
    padding: 6px 10px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid rgb(var(--color-overlay-white) / 0.15);
    color: rgb(var(--color-text-muted));
    font-size: 0.75rem;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-duration) ease;
    white-space: normal;
    line-height: 1.3;
}

.league-toggle-btn:hover {
    border-color: rgb(var(--accent-primary));
    color: rgb(var(--color-text-strong));
}

.league-toggle-btn.active {
    background: rgb(var(--accent-primary) / 0.15);
    border-color: rgb(var(--accent-primary));
    color: rgb(var(--color-text-strong));
}

/* Шаги регистрации */
.reg-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.reg-step {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgb(var(--color-overlay-white) / 0.04);
    border: 1px solid rgb(var(--color-overlay-white) / 0.08);
    color: rgb(var(--color-text-muted));
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-duration) ease;
}

.reg-step.active {
    background: rgb(var(--accent-primary) / 0.15);
    border-color: rgb(var(--accent-primary));
    color: rgb(var(--color-text-strong));
}

.reg-step.done {
    background: rgb(var(--color-success-deep) / 0.1);
    border-color: rgb(var(--color-success-deep) / 0.3);
    color: rgb(var(--color-success));
}

.reg-step.done:hover {
    border-color: rgb(var(--color-success));
}

/* Карточка выбора лиги */
.reg-league-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    background: rgb(var(--color-card) / 0.7);
    border: 1px solid rgb(var(--color-overlay-white) / 0.08);
    color: rgb(var(--color-text-secondary));
    text-decoration: none;
    transition: all var(--transition-duration) ease;
}

.reg-league-card:hover {
    border-color: rgb(var(--accent-primary));
    background: rgb(var(--accent-primary) / 0.08);
}

/* Женские лиги — розовое обрамление */
.reg-league-card--women {
    border-color: rgb(var(--accent-pink) / 0.55);
    background: rgb(var(--accent-pink) / 0.06);
}

.reg-league-card--women:hover {
    border-color: rgb(var(--accent-pink));
    background: rgb(var(--accent-pink) / 0.12);
    box-shadow: 0 0 0 3px rgb(var(--accent-pink) / 0.15);
}

/* Единое уведомление об отсутствии данных */
.empty-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px 20px;
    border-radius: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

.empty-notice .material-icons-outlined {
    font-size: 2rem;
    color: var(--blue);
    opacity: 0.7;
}

/* Вы уже с ними играли */
.played-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.played-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgb(var(--color-overlay-white) / 0.03);
    border: 1px solid rgb(var(--color-overlay-white) / 0.06);
}

.played-name {
    font-size: 0.8rem;
    color: rgb(var(--color-text-secondary));
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Вы уже с ними играли — collapse по чемпионатам */
.played-group {
    border: 1px solid rgb(var(--color-overlay-white) / 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.played-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 12px;
    background: rgb(var(--color-overlay-white) / 0.04);
    border: none;
    color: rgb(var(--color-text-secondary));
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-duration) ease;
}

.played-toggle:hover {
    background: rgb(var(--accent-primary) / 0.1);
}

.played-toggle .expand-icon {
    transition: transform var(--transition-duration) ease;
    color: rgb(var(--color-text-muted));
}

.played-group.open .expand-icon {
    transform: rotate(180deg);
}

.played-collapse {
    display: none;
    padding: 6px 8px;
}

.played-group.open .played-collapse {
    display: block;
}

/* Hero «Создай историю своей команды» на странице турнира */
.tourney-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 24px 28px;
    border-radius: 18px;
    background: linear-gradient(120deg, var(--blue-soft) 0%, var(--navy) 60%);
    border: 1px solid var(--line);
}

.tourney-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background-image: repeating-linear-gradient(90deg, rgb(var(--color-text-strong)) 0 2px, transparent 2px 90px);
    pointer-events: none;
}

.tourney-hero::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -70px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 2px dashed rgb(var(--color-overlay-white) / 0.18);
    animation: hero-orbit 22s linear infinite;
    pointer-events: none;
}

@keyframes hero-orbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.tourney-hero > * {
    position: relative;
    z-index: 1;
}

.tourney-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgb(var(--accent-primary)) 0%, rgb(var(--accent-primary-deep)) 100%);
    color: rgb(var(--color-text-strong));
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgb(var(--accent-primary-deep) / 0.4);
    transition: all var(--transition-duration) ease;
    animation: hero-btn-pulse 2.4s ease-in-out infinite;
}

.tourney-hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgb(var(--accent-primary-deep) / 0.55);
    color: rgb(var(--color-text-strong));
}

@keyframes hero-btn-pulse {
    0%, 100% { box-shadow: 0 8px 24px rgb(var(--accent-primary-deep) / 0.4); }
    50% { box-shadow: 0 8px 34px rgb(var(--accent-primary) / 0.7); }
}

/* Уведомление «Турнир не начался» (единый стиль на вкладках) */
.tourney-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 40px 24px;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid var(--line);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tourney-notice::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image: repeating-linear-gradient(90deg, rgb(var(--color-text-strong)) 0 2px, transparent 2px 90px);
    pointer-events: none;
}

.tourney-notice-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--blue-soft);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tourney-notice-icon .material-icons-outlined {
    font-size: 30px;
}

.tourney-notice-text {
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 460px;
    line-height: 1.5;
}

.tourney-notice-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgb(var(--accent-primary)) 0%, rgb(var(--accent-primary-deep)) 100%);
    color: rgb(var(--color-text-strong));
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 8px 24px rgb(var(--accent-primary-deep) / 0.4);
    transition: all var(--transition-duration) ease;
}

.tourney-notice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgb(var(--accent-primary-deep) / 0.55);
    color: rgb(var(--color-text-strong));
}

/* ===== Toast-уведомления rgdevAlert (контейнер и карточка) ===== */
#rgdevToastContainer {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 24rem;
    max-height: calc(100vh - 2.5rem);
    overflow-y: auto;
    overflow-x: hidden;
    pointer-events: none;
    padding-right: 4px;
    scrollbar-width: thin;
}
#rgdevToastContainer::-webkit-scrollbar { width: 5px; }
#rgdevToastContainer::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

/* На ПК тосты показываем ниже шапки (#mainHeader) */
@media (min-width: 769px) {
    #rgdevToastContainer {
        top: calc(var(--header-height) + 0.75rem);
        max-height: calc(100vh - var(--header-height) - 1.5rem);
    }
}

#rgdevToastContainer .rgdev-toast {
    pointer-events: auto;
    background-color: rgb(var(--color-card));
    border: 1px solid rgb(var(--color-card-soft));
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgb(var(--color-overlay-black) / 0.5);
    opacity: 0;
    transform: translateX(0.75rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#rgdevToastContainer .rgdev-toast.show {
    opacity: 1;
    transform: translateX(0);
}

#rgdevToastContainer .rgdev-toast.rgdev-toast-success { border-color: rgb(var(--color-success-deep) / 0.4); }
#rgdevToastContainer .rgdev-toast.rgdev-toast-error { border-color: rgb(var(--color-danger) / 0.4); }
#rgdevToastContainer .rgdev-toast.rgdev-toast-info { border-color: rgb(var(--accent-primary) / 0.4); }
#rgdevToastContainer .rgdev-toast.rgdev-toast-warning { border-color: rgb(var(--color-warning) / 0.4); }

#rgdevToastContainer .rgdev-toast-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#rgdevToastContainer .rgdev-toast-success .rgdev-toast-icon { background: rgb(var(--color-success-deep) / 0.15); color: rgb(var(--color-success)); }
#rgdevToastContainer .rgdev-toast-error .rgdev-toast-icon { background: rgb(var(--color-danger) / 0.15); color: rgb(var(--color-danger-light)); }
#rgdevToastContainer .rgdev-toast-info .rgdev-toast-icon { background: rgb(var(--accent-primary) / 0.15); color: rgb(var(--accent-primary-light)); }
#rgdevToastContainer .rgdev-toast-warning .rgdev-toast-icon { background: rgb(var(--color-warning) / 0.15); color: rgb(var(--color-warning-light)); }

#rgdevToastContainer .rgdev-toast-title { font-size: 0.875rem; font-weight: 600; }
#rgdevToastContainer .rgdev-toast-success .rgdev-toast-title { color: rgb(var(--color-success)); }
#rgdevToastContainer .rgdev-toast-error .rgdev-toast-title { color: rgb(var(--color-danger-light)); }
#rgdevToastContainer .rgdev-toast-info .rgdev-toast-title { color: rgb(var(--accent-primary-light)); }
#rgdevToastContainer .rgdev-toast-warning .rgdev-toast-title { color: rgb(var(--color-warning-light)); }

#rgdevToastContainer .rgdev-toast-message { color: rgb(var(--color-text-soft)); font-size: 0.875rem; word-break: break-word; }
#rgdevToastContainer .rgdev-toast-link { display: inline-block; margin-top: 6px; color: rgb(var(--accent-primary-light)); font-size: 0.8125rem; font-weight: 600; text-decoration: none; }
#rgdevToastContainer .rgdev-toast-link:hover { text-decoration: underline; }
#rgdevToastContainer .rgdev-toast-close { color: rgb(var(--color-text-faint)); background: none; border: none; cursor: pointer; flex-shrink: 0; padding: 0; }
#rgdevToastContainer .rgdev-toast-close:hover { color: rgb(var(--color-text-strong)); }

        /* Содержимое полной новости (fullstory.tpl) */
        .post__content {
            font-size: 0.95rem;
            line-height: 1.75;
            color: rgb(var(--color-text-soft));
        }
        .post__content p {
            margin: 0 0 1rem;
        }
        .post__content img {
            max-width: 100%;
            height: auto;
            border-radius: 12px;
            margin: 1rem 0;
        }
        .post__content a {
            color: rgb(var(--accent-primary-light));
            text-decoration: underline;
            text-underline-offset: 3px;
            transition: color 0.2s ease;
        }
        .post__content a:hover {
            color: #93c5fd;
        }
        .post__content h1, .post__content h2, .post__content h3, .post__content h4 {
            color: rgb(var(--color-text));
            font-weight: 700;
            margin: 1.5rem 0 0.75rem;
            line-height: 1.3;
        }
        .post__content blockquote {
            border-left: 3px solid rgb(var(--accent-primary));
            padding: 0.5rem 1rem;
            margin: 1rem 0;
            color: rgb(var(--color-text-muted));
            font-style: italic;
            background: rgb(var(--color-overlay-white) / 0.03);
            border-radius: 0 8px 8px 0;
        }
        .post__content ul, .post__content ol {
            margin: 0 0 1rem 1.25rem;
        }
        .post__content li {
            margin-bottom: 0.35rem;
        }
        .post__content table {
            width: 100%;
            max-width: 100%;
            overflow-x: auto;
            display: block;
            border-collapse: collapse;
            margin: 1rem 0;
        }
        .post__content table th, .post__content table td {
            border: 1px solid rgb(var(--color-overlay-white) / 0.12);
            padding: 0.5rem 0.75rem;
            font-size: 0.85rem;
        }
        .post__content iframe {
            max-width: 100%;
            border-radius: 12px;
            margin: 1rem 0;
        }

        /* Кнопки-фильтры драфта */
        .draft-filter-btn {
            padding: 6px 14px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 600;
            color: rgb(var(--color-text-muted));
            background: rgb(var(--color-overlay-white) / 0.04);
            border: 1px solid rgb(var(--color-overlay-white) / 0.08);
            cursor: pointer;
            white-space: nowrap;
            transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
        }
        .draft-filter-btn:hover {
            color: rgb(var(--color-text));
            border-color: rgb(var(--accent-primary) / 0.45);
            background: rgb(var(--color-overlay-white) / 0.07);
        }
        .draft-filter-btn.active {
            color: rgb(var(--accent-primary-light));
            background: rgb(var(--accent-primary) / 0.15);
            border-color: rgb(var(--accent-primary) / 0.45);
        }

        /* Блок «Забери своё» (баллы турнира) */
        .tourney-points-card {
            position: relative;
            overflow: hidden;
            border-radius: 16px;
            border: 1px solid rgb(var(--accent-primary) / 0.35);
            background: linear-gradient(135deg, rgb(var(--accent-primary) / 0.14), rgb(var(--accent-purple) / 0.12) 50%, rgb(var(--accent-primary) / 0.14));
            background-size: 300% 300%;
            animation: tourney-points-bg 9s ease infinite;
            box-shadow: 0 0 24px rgb(var(--accent-primary) / 0.12);
        }
        @keyframes tourney-points-bg {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }

        .tourney-points-inner {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            flex-wrap: wrap;
            padding: 1.5rem;
        }

        .tourney-points-icon {
            width: 54px;
            height: 54px;
            border-radius: 14px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, rgb(var(--color-warning)), rgb(var(--color-warning-light)));
            color: rgb(var(--color-card));
            animation: tourney-points-pulse 2.6s ease-in-out infinite;
        }
        .tourney-points-icon .material-icons-outlined {
            font-size: 28px;
        }
        @keyframes tourney-points-pulse {
            0%, 100% { box-shadow: 0 0 16px rgb(var(--color-warning) / 0.35); transform: scale(1); }
            50% { box-shadow: 0 0 30px rgb(var(--color-warning) / 0.6); transform: scale(1.06); }
        }

        .tourney-points-text {
            flex: 1;
            min-width: 240px;
        }
        .tourney-points-text p {
            color: #cbd5e1;
            font-size: 0.85rem;
            line-height: 1.6;
            margin: 0;
        }

        .tourney-points-btn {
            flex-shrink: 0;
            padding: 12px 22px;
            border-radius: 12px;
            font-weight: 600;
            font-size: 0.85rem;
            color: rgb(var(--color-text-strong));
            background: linear-gradient(135deg, rgb(var(--accent-primary)), rgb(var(--accent-purple)));
            border: none;
            cursor: pointer;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            box-shadow: 0 4px 18px rgb(var(--accent-primary) / 0.35);
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .tourney-points-btn .material-icons-outlined {
            font-size: 16px;
            margin-right: 6px;
        }
        .tourney-points-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 24px rgb(var(--accent-primary) / 0.5);
        }

        .tourney-points-shimmer {
            position: absolute;
            top: 0;
            left: -100%;
            width: 55%;
            height: 100%;
            background: linear-gradient(105deg, transparent, rgb(var(--color-overlay-white) / 0.07), transparent);
            transform: skewX(-20deg);
            animation: tourney-points-shimmer 4.5s ease-in-out infinite;
            pointer-events: none;
        }
        @keyframes tourney-points-shimmer {
            0% { left: -100%; }
            55%, 100% { left: 150%; }
        }

        .tourney-points-card::after {
            content: "✦";
            position: absolute;
            top: 14px;
            right: 38%;
            font-size: 16px;
            color: rgb(var(--color-warning) / 0.45);
            animation: tourney-points-float 5s ease-in-out infinite;
            pointer-events: none;
        }
        @keyframes tourney-points-float {
            0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.35; }
            50% { transform: translateY(-16px) rotate(25deg); opacity: 0.85; }
        }

        .tourney-points-btn:disabled {
            cursor: not-allowed;
            opacity: 0.6;
            transform: none;
            box-shadow: 0 2px 10px rgb(var(--accent-primary) / 0.2);
        }
        .tourney-points-btn:disabled:hover {
            transform: none;
            box-shadow: 0 2px 10px rgb(var(--accent-primary) / 0.2);
        }

        /* Блок «Оплата взноса» (текст из настроек турнира, опция pay_text) */
        .tourney-pay-card {
            position: relative;
            overflow: hidden;
            border-radius: 16px;
            border: 1px solid rgb(var(--color-success) / 0.35);
            background: linear-gradient(135deg, rgb(var(--color-success) / 0.13), rgb(var(--accent-primary) / 0.1) 50%, rgb(var(--color-success) / 0.13));
            box-shadow: 0 0 18px rgb(var(--color-success) / 0.12);
        }
        .tourney-pay-inner {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
            padding: 1.25rem;
        }
        .tourney-pay-icon {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, rgb(var(--color-success)), rgb(var(--color-success-deep)));
            color: rgb(var(--color-card));
        }
        .tourney-pay-icon .material-icons-outlined {
            font-size: 24px;
        }
        .tourney-pay-text {
            flex: 1;
            min-width: 240px;
            color: #cbd5e1;
            font-size: 0.85rem;
            line-height: 1.7;
        }

        /* ===== Тема Lakers (пурпур rgb(var(--color-purple-lakers)) + золото rgb(var(--accent-gold))) =====
           Тёмная тема на базе основного дизайна. Включается при нажатии «Сменить тему».
           Синие акценты заменяются на оттенки пурпура через переменные
           --accent-primary / --accent-primary-light. */
        .lakers-theme {
            --accent-primary: 85 37 131;
            --accent-primary-light: 124 58 237;
            /* Тёмный градиент сверху (как в базовой теме) + едва заметные пурпурно-золотые свечения */
            background:
                radial-gradient(circle at 15% 8%, rgb(var(--accent-primary) / 0.08) 0, transparent 45%),
                radial-gradient(circle at 85% 90%, rgb(var(--accent-gold) / 0.05) 0, transparent 40%),
                linear-gradient(160deg, rgb(var(--color-bg)) 0%, rgb(var(--color-bg-soft)) 100%);
            background-color: #12101a;
        }

        .lakers-theme .strict-card,
        .lakers-theme .news-card,
        .lakers-theme .stream-card,
        .lakers-theme .partner-card {
            background: rgb(var(--color-lakers-card) / 0.92);
            border-color: rgb(var(--color-overlay-white) / 0.08);
        }

        /* Акцентные цвета: пурпур и золото Lakers */
        .lakers-theme .text-primary-400 { color: #c4b5fd !important; }
        .lakers-theme .text-primary-500 { color: rgb(var(--accent-gold)) !important; }
        .lakers-theme .text-primary-600 { color: #eab308 !important; }
        .lakers-theme .text-yellow-500 { color: rgb(var(--accent-gold)) !important; }
        .lakers-theme .bg-primary-400 { background-color: rgb(var(--accent-primary-light)) !important; }
        .lakers-theme .bg-primary-500 { background-color: rgb(var(--accent-primary)) !important; }
        .lakers-theme .bg-primary-600 { background-color: rgb(var(--color-purple-deep)) !important; }

        /* Кнопки и градиенты */
        .lakers-theme .strict-button {
            background: linear-gradient(135deg, rgb(var(--accent-primary)) 0%, rgb(var(--accent-primary-light)) 100%) !important;
        }
        .lakers-theme .strict-button:hover {
            background: linear-gradient(135deg, rgb(var(--accent-gold)) 0%, rgb(var(--color-warning-dark)) 100%) !important;
            box-shadow: 0 4px 15px rgb(var(--accent-gold) / 0.3) !important;
        }
        .lakers-theme .gradient-blue {
            background: linear-gradient(135deg, rgb(var(--accent-primary)) 0%, rgb(var(--accent-primary-light)) 100%) !important;
        }
        .lakers-theme .from-blue-500 { --tw-gradient-from: rgb(var(--accent-primary)) var(--tw-gradient-from-position) !important; }
        .lakers-theme .to-blue-700 { --tw-gradient-to: rgb(var(--color-purple-deep)) var(--tw-gradient-to-position) !important; }

        /* Скроллбар */
        .lakers-theme ::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, rgb(var(--accent-primary)), rgb(var(--accent-gold))) !important;
        }

        /* Разделители и фоновая сетка */
        .lakers-theme .strict-divider {
            background: linear-gradient(90deg, transparent, rgb(var(--accent-gold) / 0.25), transparent);
        }
        .lakers-theme .grid-lines {
            background-image:
                radial-gradient(circle at 18% 12%, rgb(var(--accent-primary) / 0.08) 0, transparent 38%),
                radial-gradient(circle at 82% 78%, rgb(var(--accent-gold) / 0.05) 0, transparent 38%),
                linear-gradient(rgb(var(--accent-purple) / 0.05) 1px, transparent 1px),
                linear-gradient(90deg, rgb(var(--accent-purple) / 0.05) 1px, transparent 1px);
            background-size: auto, auto, 40px 40px, 40px 40px;
        }

        /* Меню */
        .lakers-theme .menu-item:hover { background: rgb(var(--accent-gold) / 0.12); color: rgb(var(--accent-gold)); }
        .lakers-theme .menu-item.active { background: rgb(var(--accent-gold) / 0.18); color: rgb(var(--accent-gold)); }

        /* Турнирные вкладки и кнопки кругов */
        .lakers-theme .tourney-tab.content-filter__item--active {
            background: rgb(var(--accent-primary));
        }
        .lakers-theme .tourney-lap-btn.active {
            background: rgb(var(--accent-primary));
            border-color: rgb(var(--accent-primary));
            color: rgb(var(--color-text-strong));
        }

        /* Турнирная таблица */
        .lakers-theme .tourney-table a:hover { color: rgb(var(--accent-gold)); }
        .lakers-theme .tourney-table tbody tr:hover { background: rgb(var(--accent-primary) / 0.30); }
        .lakers-theme .tourney-table thead th { color: #e9d5ff; }

        /* Поиск и партнёры */
        .lakers-theme .search-form:focus-within { border-color: rgb(var(--accent-gold)); }
        .lakers-theme .search-result-item:hover { background: rgb(var(--accent-primary) / 0.30); }
        .lakers-theme .partner-all-link:hover,
        .lakers-theme .partner-arrow:hover { background: rgb(var(--accent-gold) / 0.12); color: rgb(var(--accent-gold)); }
        .lakers-theme .partner-dot.active { background: rgb(var(--accent-primary)); }

        /* Блок «Возможно вы искали» в поиске (при фокусе на поле) */
        .search-suggest-title {
            padding: 10px 16px 2px;
            font-size: 11px;
            font-weight: 600;
            color: rgb(var(--color-text-muted));
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .search-suggest-subtitle {
            padding: 0 16px 8px;
            font-size: 12px;
            font-weight: 600;
            color: rgb(var(--accent-primary-light));
        }
        .lakers-theme .search-suggest-subtitle {
            color: rgb(var(--accent-gold));
        }
        .search-suggest-avatar {
            background: linear-gradient(135deg, rgb(var(--accent-purple)) 0%, rgb(var(--accent-purple-dark)) 100%) !important;
            font-size: 18px;
        }
        .lakers-theme .search-suggest-avatar {
            background: linear-gradient(135deg, rgb(var(--accent-primary)) 0%, rgb(var(--accent-primary-light)) 100%) !important;
        }

        /* Синие элементы → оттенки пурпура Lakers */
        .lakers-theme .league-menu-btn {
            color: rgb(var(--accent-primary-light));
            background: rgb(var(--accent-primary) / 0.12);
            border-color: rgb(var(--accent-primary) / 0.25);
        }
        .lakers-theme .league-menu-btn:hover {
            background: rgb(var(--accent-primary) / 0.18);
        }
        .lakers-theme .accent-text {
            background: linear-gradient(90deg, rgb(var(--accent-primary)), rgb(var(--accent-gold)));
            background-clip: text;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .lakers-theme .partner-tag-line {
            color: rgb(var(--accent-primary-light));
        }
        .lakers-theme .partner-contact a {
            color: rgb(var(--accent-primary-light));
        }
        .lakers-theme .partner-contact a:hover {
            color: rgb(var(--accent-primary-light));
        }
        .lakers-theme .speedbar a:hover {
            color: rgb(var(--accent-primary));
        }
        .lakers-theme .text-blue-400,
        .lakers-theme .text-blue-500 { color: rgb(var(--accent-primary-light)) !important; }
        .lakers-theme .border-blue-500 { border-color: rgb(var(--accent-primary)) !important; }
        .lakers-theme .bg-blue-500\/20 { background-color: rgb(var(--accent-primary) / 0.2) !important; }
        .lakers-theme .from-blue-600\/15 { --tw-gradient-from: rgb(var(--accent-primary) / 0.15) var(--tw-gradient-from-position) !important; }
        .lakers-theme .home-review-bg {
            background:
                radial-gradient(circle at 20% 20%, rgb(var(--accent-primary) / 0.35) 0, transparent 45%),
                radial-gradient(circle at 80% 80%, rgb(var(--accent-purple) / 0.3) 0, transparent 45%),
                linear-gradient(135deg, #2a1040 0%, rgb(var(--accent-primary)) 45%, rgb(var(--accent-primary-light)) 100%);
        }
        .lakers-theme .team-table a:hover { color: rgb(var(--accent-primary)); }
        .lakers-theme .team-table tr.b { background: rgb(var(--accent-primary) / 0.08); }
        .lakers-theme .team-table tr.b td { color: rgb(var(--accent-primary-light)); }
        .lakers-theme .best-player-rank { background: rgb(var(--accent-primary)); }
        .lakers-theme .profile-tab.active,
        .lakers-theme .compact-tab.active,
        .lakers-theme .strict-tab.active {
            background: rgb(var(--accent-primary));
            color: rgb(var(--color-text-strong));
        }
        .lakers-theme .active-tourneys-btn:hover {
            background: rgb(var(--accent-primary) / 0.10);
            color: rgb(var(--accent-primary));
        }
        .lakers-theme .ps-total {
            color: rgb(var(--accent-primary-light));
        }
        .lakers-theme .home-review-card:hover {
            border-color: rgb(var(--accent-primary) / 0.40) !important;
            background: rgb(var(--accent-primary) / 0.04) !important;
        }
        .lakers-theme .partner-tag {
            color: rgb(var(--accent-primary-light));
            background: rgb(var(--accent-primary) / 0.12);
            border-color: rgb(var(--accent-primary) / 0.25);
        }
        .lakers-theme .partner-logo-placeholder {
            background: linear-gradient(135deg, rgb(var(--accent-primary)), rgb(var(--accent-primary-light)));
        }
        .lakers-theme .active-tourney-icon {
            background: rgb(var(--accent-primary) / 0.15);
            color: rgb(var(--accent-primary-light));
        }

        /* Цветная кнопка «Перейти в бота» */
        .max-bot-link {
            display: inline-block;
            padding: 2px 10px;
            border-radius: 8px;
            background: linear-gradient(135deg, rgb(var(--accent-primary)), rgb(var(--accent-purple)));
            color: rgb(var(--color-text-strong)) !important;
            font-weight: 600;
            text-decoration: none;
            transition: opacity 0.2s ease;
            vertical-align: middle;
        }
        .max-bot-link:hover {
            opacity: 0.85;
        }
        .lakers-theme .max-bot-link {
            background: linear-gradient(135deg, rgb(var(--accent-primary)), rgb(var(--accent-gold)));
        }

        /* Бейдж счётчика новых ответов в меню */
        .menu-badge {
            margin-left: auto;
            min-width: 20px;
            height: 20px;
            padding: 0 6px;
            border-radius: 9999px;
            background: linear-gradient(135deg, rgb(var(--color-warning)), rgb(var(--color-danger)));
            color: rgb(var(--color-text-strong));
            font-size: 11px;
            font-weight: 700;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            box-shadow: 0 0 8px rgb(var(--color-danger) / 0.5);
        }
        .sidebar.collapsed .menu-badge {
            display: none !important;
        }

        /* Колокольчик уведомлений в шапке */
        #notifyBell {
            position: relative;
        }
        #notifyBell .material-icons-outlined,
        .admin-head-icon {
            font-size: 1.725rem !important;
        }
        #notifyBell .menu-badge {
            position: absolute;
            top: -5px;
            right: -6px;
            margin-left: 0;
            min-width: 17px;
            height: 17px;
            padding: 0 4px;
            font-size: 10px;
        }

        /* Страница «Команда РГ»: табы по турнирам */
        .teamrg-avatar-7 {
            width: 7rem;
            height: 7rem;
        }

        /* Блок «Организаторы» — особый фон */
        #teamrg-organizers {
            background:
                radial-gradient(circle at 15% 10%, rgb(var(--accent-primary) / 0.22) 0, transparent 45%),
                radial-gradient(circle at 85% 90%, rgb(var(--accent-gold) / 0.12) 0, transparent 40%),
                rgb(var(--color-card) / 0.6);
            border: 1px solid rgb(var(--accent-primary) / 0.25);
        }
        .lakers-theme #teamrg-organizers {
            background:
                radial-gradient(circle at 15% 10%, rgb(var(--accent-primary) / 0.35) 0, transparent 45%),
                radial-gradient(circle at 85% 90%, rgb(var(--accent-gold) / 0.18) 0, transparent 40%),
                rgb(var(--color-card) / 0.6);
        }

        /* Рамка с телефоном организатора (пользователь 1) */
        .teamrg-organizer-contact {
            margin-top: 12px;
            width: 100%;
            padding: 10px 12px;
            border-radius: 12px;
            border: 1px solid rgb(var(--accent-primary) / 0.35);
            background: rgb(var(--accent-primary) / 0.10);
            text-align: center;
        }
        .teamrg-organizer-contact a {
            display: block;
        }
        .teamrg-tab {
            padding: 6px 12px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            color: rgb(var(--color-text-muted));
            background: rgb(var(--color-overlay-white) / 0.04);
            border: 1px solid rgb(var(--color-overlay-white) / 0.1);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .teamrg-tab:hover {
            color: rgb(var(--color-text-strong));
            background: rgb(var(--accent-primary) / 0.12);
        }
        .teamrg-tab.active {
            color: rgb(var(--color-text-strong));
            background: rgb(var(--accent-primary-dark));
            border-color: rgb(var(--accent-primary-dark));
        }
        .lakers-theme .teamrg-tab:hover {
            background: rgb(var(--accent-gold) / 0.15);
        }
        .lakers-theme .teamrg-tab.active {
            background: rgb(var(--accent-primary));
            border-color: rgb(var(--accent-primary));
        }
        .teamrg-panel {
            display: none;
        }
        .teamrg-panel.active {
            display: block;
        }
        .teamrg-table-wrap {
            overflow-x: auto;
            border: 1px solid rgb(var(--color-card-soft));
            border-radius: 12px;
        }
        .teamrg-table {
            width: 100%;
            border-collapse: collapse;
        }
        .teamrg-table thead th {
            padding: 10px 12px;
            text-align: left;
            font-size: 12px;
            font-weight: 600;
            color: rgb(var(--color-text-muted));
            border-bottom: 1px solid rgb(var(--color-card-soft));
            background: rgb(var(--color-overlay-white) / 0.02);
        }
        .teamrg-table tbody td {
            padding: 10px 12px;
            font-size: 13px;
            color: rgb(var(--color-text-soft));
            border-bottom: 1px solid rgb(var(--color-overlay-white) / 0.05);
        }
        .teamrg-table tbody tr:last-child td {
            border-bottom: none;
        }
        .teamrg-table tbody tr:nth-child(odd) {
            background: rgb(var(--color-overlay-white) / 0.02);
        }
        .teamrg-table tbody tr:hover {
            background: rgb(var(--accent-primary) / 0.06);
        }
        .lakers-theme .teamrg-table tbody tr:hover {
            background: rgb(var(--accent-primary) / 0.25);
        }
        .teamrg-empty {
            color: rgb(var(--color-text-muted));
            font-size: 13px;
            padding: 16px;
            text-align: center;
        }

        /* ПК: увеличенный хедер */
        @media (min-width: 769px) {
            :root {
                --header-height: 85px;
            }
            .compact-header {
                padding-top: 1rem;
                padding-bottom: 1rem;
            }
            .logo-img {
                height: 3.75rem;
            }
        }

        /* Недостающие Tailwind-утилиты */
        .w-9 { width: 2.25rem; }
        .h-9 { height: 2.25rem; }

        /* Мобильная версия: модалка турниров не перекрывает нижнее меню */
        @media (max-width: 768px) {
            /* Нижняя навигация поверх модалки турниров — меню остаётся видимым и кликабельным */
            .mobile-bottom-nav:has(~ #tourneysModal:not(.hidden)) {
                z-index: 1100;
            }

            #tourneysModal {
                align-items: flex-start;
                padding: 0;
            }
            #tourneysModal .modal-content {
                height: 100%;
                max-height: calc(100vh - 76px - env(safe-area-inset-bottom, 0px));
                border-radius: 0;
                margin: 0;
            }
            #tourneysModal .modal-content > .flex-1 {
                padding: 1.25rem 1rem;
            }
            #tourneysModal .tourney-modal-item {
                padding: 14px;
            }
            /* Выпадающая панель лиги в пределах экрана */
            .league-menu-panel {
                max-height: 55vh;
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                z-index: 70;
            }
            .mobile-league-switch select {
                max-width: 100%;
            }
        }

        /* Модальное окно выбора лиги (мобильная версия) */
        #matches, #standings {
            scroll-margin-top: calc(var(--header-height) + 70px);
        }
        .league-mobile-item {
            display: block;
            width: 100%;
            padding: 10px 14px;
            border-radius: 10px;
            font-size: 13px;
            font-weight: 600;
            color: rgb(var(--color-text-secondary));
            background: rgb(var(--color-card) / 0.5);
            border: 1px solid rgb(var(--color-overlay-white) / 0.08);
            transition: all 0.2s ease;
        }
        .league-mobile-item:hover {
            background: rgb(var(--accent-primary) / 0.12);
            color: rgb(var(--color-text-strong));
        }
        .league-mobile-item--active {
            background: rgb(var(--accent-primary));
            border-color: rgb(var(--accent-primary));
            color: rgb(var(--color-text-strong));
        }

        /* Модальное окно подписок */
        .subscription-item {
            border: 1px solid rgb(var(--color-overlay-white) / 0.08);
            border-radius: 12px;
            padding: 12px 14px;
            margin-bottom: 10px;
            background: rgb(var(--color-card) / 0.4);
        }
        .subscription-head {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 8px;
        }
        .subscription-logo {
            width: 2.75rem;
            height: 2.75rem;
            border-radius: 12px;
            object-fit: cover;
            flex-shrink: 0;
        }
        .subscription-logo-fallback {
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, rgb(var(--accent-primary)), rgb(var(--accent-purple)));
            color: rgb(var(--color-text-strong));
            font-weight: 700;
        }
        .subscription-name {
            font-weight: 600;
            color: rgb(var(--color-text-strong));
            font-size: 14px;
        }
        .subscription-name:hover {
            color: rgb(var(--accent-primary-light));
        }
        .subscription-meta {
            color: rgb(var(--color-text-faint));
            font-size: 12px;
        }
        .subscription-match {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 10px;
            border-radius: 10px;
            background: rgb(var(--accent-primary) / 0.06);
            border: 1px solid rgb(var(--accent-primary) / 0.15);
            margin-top: 6px;
        }
        .subscription-match-icon {
            color: rgb(var(--accent-primary-light));
            font-size: 18px;
        }
        .subscription-match-info {
            flex: 1;
            min-width: 0;
        }
        .subscription-match-teams {
            font-size: 13px;
            color: rgb(var(--color-text-secondary));
            font-weight: 600;
        }
        .subscription-match-date {
            font-size: 12px;
            color: rgb(var(--color-text-faint));
            display: flex;
            align-items: center;
            gap: 4px;
            margin-top: 2px;
        }
        .subscription-nomatch {
            font-size: 12px;
            color: rgb(var(--color-text-faint));
            padding: 6px 10px;
            font-style: italic;
        }

        /* Файлы (документы турнира): иконка расширения + дата */
        .tourney-file-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 12px;
            border-radius: 10px;
            border: 1px solid rgb(var(--color-overlay-white) / 0.08);
            background: rgb(var(--color-card) / 0.4);
            margin-bottom: 8px;
        }
        .tourney-file-icon {
            width: 42px;
            height: 42px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            font-weight: 800;
            letter-spacing: 0.02em;
            color: rgb(var(--color-text-strong));
            flex-shrink: 0;
        }
        .tourney-file-icon--pdf { background: #dc2626; }
        .tourney-file-icon--doc, .tourney-file-icon--docx { background: #2563eb; }
        .tourney-file-icon--xls, .tourney-file-icon--xlsx { background: #16a34a; }
        .tourney-file-icon--file { background: rgb(var(--accent-purple)); }
        .tourney-file-info {
            flex: 1;
            min-width: 0;
        }
        .tourney-file-name {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: rgb(var(--color-text-secondary));
            word-break: break-word;
        }
        .tourney-file-name:hover {
            color: rgb(var(--accent-primary-light));
        }
        .tourney-file-date {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 11px;
            color: rgb(var(--color-text-faint));
            margin-top: 2px;
        }
        .tourney-file-date .material-icons-outlined {
            font-size: 14px;
            color: rgb(var(--accent-primary-light));
        }

/* Женские лиги в «Участниках» — розовое обрамление */
.tourney-lap-women {
    border: 1px solid rgb(var(--accent-pink) / 0.55) !important;
    color: rgb(var(--accent-pink)) !important;
}
.tourney-lap-women.btn-danger {
    background: rgb(var(--accent-pink)) !important;
    border-color: rgb(var(--accent-pink)) !important;
    color: #fff !important;
}
.team-card-item-women {
    border-color: rgb(var(--accent-pink) / 0.55) !important;
    background: rgb(var(--accent-pink) / 0.06) !important;
}
.team-card-item-women:hover {
    border-color: rgb(var(--accent-pink)) !important;
    box-shadow: 0 0 0 3px rgb(var(--accent-pink) / 0.15);
}

/* Уведомления: тосты в strict-card */
.notify-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.notify-item {
    transition: all .2s ease;
}
.notify-item.unread {
    border-color: rgb(var(--accent-primary) / 0.35) !important;
    background: rgb(var(--accent-primary) / 0.05) !important;
}
.notify-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, rgb(var(--accent-primary)), #8b5cf6);
}
.notify-item {
    position: relative;
    overflow: hidden;
}
.notify-item.read {
    opacity: 0.75;
}

.rgdev-toast.notify-history-open { cursor: pointer; border-color: rgb(var(--accent-primary) / 0.4); }

/* Двойные галочки «прочитано»: клик отмечает непрочитанным, ховер оранжевый */
.notify-unread-toggle {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #9ca3af;
    border-radius: 8px;
    padding: 2px 6px;
    cursor: pointer;
    transition: all .2s ease;
    line-height: 1;
}
.notify-unread-toggle:hover {
    border-color: rgb(var(--color-warning) / 0.6);
    background: rgb(var(--color-warning) / 0.12);
    color: #fbbf24;
}

/* Тост с действиями ниже: кнопки на всю ширину под контентом */
.rgdev-toast.notify-toast-item { flex-wrap: wrap; }
.rgdev-toast.notify-toast-item .notify-toast-actions { flex-basis: 100%; }

/* Меню админки только на страницах /wv/admin (переключает .admin-page на body) */
#adminSidebarNav { display: none; }
body.admin-page #adminSidebarNav { display: block; }
body.admin-page #userSidebarNav { display: none; }

/* LIVE — первый пункт меню, выделенный цветом (лента актуального) */
#liveMenuBtn {
    background: linear-gradient(135deg, #c2410c 0%, #f97316 55%, #fb923c 100%);
    color: #fff;
    border-radius: 10px;
    border: 1px solid rgba(251, 146, 60, 0.45);
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.25);
}
#liveMenuBtn:hover {
    background: linear-gradient(135deg, #9a3412 0%, #ea580c 55%, #f97316 100%);
    border-color: rgba(251, 146, 60, 0.65);
}
#liveMenuBtn .live-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: #fff;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    animation: live-pulse 1.8s infinite;
    flex-shrink: 0;
}
@keyframes live-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
.live-current-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 9999px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    font-size: 12px;
    font-weight: 600;
}

/* Компактная настройка LIVE */
#liveModal .form-control {
    font-size: 13px;
    padding: 8px 10px;
}
#liveModal .live-current-chip {
    max-width: 100%;
    overflow-wrap: anywhere;
}
@media (max-width: 480px) {
    #liveModal .modal-content { padding: 16px; }
    #liveModal h3 { font-size: 15px; }
}

/* Аккордеон на странице настроек */
.adm-acc-block {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}
.adm-acc-block summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    color: #e5e7eb;
    font-weight: 600;
    font-size: 14px;
    list-style: none;
    user-select: none;
}
.adm-acc-block summary::-webkit-details-marker { display: none; }
.adm-acc-block summary:hover { background: rgba(255, 255, 255, 0.04); }
.adm-acc-block[open] .adm-acc-arrow { transform: rotate(90deg); }
.adm-acc-arrow {
    color: rgb(var(--accent-gold, 253, 185, 39));
    transition: transform 0.2s ease;
    font-size: 12px;
}
.adm-acc-block .adm-table-wrap { border-top: 1px solid rgba(255, 255, 255, 0.06); }

/* Логотип спонсора на странице команды (лого спонсора → лого команды → квадрат) */
.team-sponsor-logo {
    width: 11rem;
    height: 11rem;
    margin-right: 2rem;
    object-fit: contain;
    border-radius: 12px;
    flex-shrink: 0;
    background: rgb(var(--color-card, 23, 25, 35));
    padding: 6px;
}
.team-sponsor-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #1e3a8a);
    padding: 0;
}
@media (max-width: 640px) {
    .team-sponsor-logo {
        width: 8rem;
        height: 8rem;
        margin-right: 1rem;
    }
}

/* ═══════════════════════════════════════════
   Блог «Мысли РГ» (/wv/blog/)
   ═══════════════════════════════════════════ */

/* Цветная иконка огня в боковом меню */
.menu-item .blog-fire-icon {
    font-size: 1.25rem;
    background: linear-gradient(135deg, #ff6d00 0%, #ff2d55 45%, #ffd600 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #ff6d00;
    filter: drop-shadow(0 0 6px rgba(255, 109, 0, 0.45));
}

/* Кнопки шапки блога: контент по центру */
.blog-page-header button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    line-height: 1;
}

/* Шапка блога */
.blog-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.blog-fire-badge {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    background: linear-gradient(135deg, #ff6d00 0%, #ff2d55 50%, #ffd600 110%);
    box-shadow: 0 6px 18px rgba(255, 60, 0, 0.35);
}
.blog-fire-badge .material-icons-outlined { font-size: 26px; color: #fff; }
.blog-page-title {
    font-family: 'Caveat', cursive !important;
    font-size: 2rem;
    line-height: 1.1;
    background: linear-gradient(120deg, #ffd600, #ff6d00 55%, #ff2d55);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Автор записи — ФИО стилевым шрифтом */
.blog-author-name {
    font-family: 'Caveat', cursive !important;
    font-size: 1.45rem;
    line-height: 1.05;
    font-weight: 700;
    color: #fff;
}
.lakers-theme .blog-author-name { color: rgb(var(--accent-gold, 253, 185, 39)); }
.blog-post-title { line-height: 1.25; }
.blog-post {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    margin-bottom: 2rem;
}

/* Карточка профиля владельца блога */
.blog-owner-card {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid rgb(var(--color-overlay-white, 255, 255, 255) / 0.06);
}
.blog-owner-card:hover {
    border-color: rgb(var(--accent-primary, 96, 165, 250) / 0.4);
    box-shadow: 0 10px 30px rgba(255, 60, 0, 0.12);
}
.blog-owner-name {
    font-family: 'Caveat', cursive !important;
    font-size: 1.35rem;
    line-height: 1.1;
    font-weight: 700;
    color: #fff;
}
.lakers-theme .blog-owner-name { color: rgb(var(--accent-gold, 253, 185, 39)); }

/* Markdown-типографика записей */
.blog-md { color: rgb(var(--color-text, 209, 213, 219)); font-size: 0.95rem; line-height: 1.7; word-break: break-word; }
.blog-md > *:first-child { margin-top: 0; }
.blog-md > *:last-child { margin-bottom: 0; }
.blog-md h1, .blog-md h2, .blog-md h3, .blog-md h4 {
    color: #fff;
    font-weight: 700;
    line-height: 1.25;
    margin: 1.1em 0 0.5em;
}
.blog-md h1 { font-size: 1.5rem; }
.blog-md h2 { font-size: 1.3rem; }
.blog-md h3 { font-size: 1.12rem; }
.blog-md h4 { font-size: 1rem; }
.blog-md p { margin: 0.6em 0; }
.blog-md a { color: rgb(var(--accent-primary, 96, 165, 250)); text-decoration: underline; }
.blog-md a:hover { color: rgb(var(--accent-primary-light, 147, 197, 253)); }
.blog-md img {
    display: block;
    margin: 0.8em auto;
    max-width: 100%;
    max-height: 420px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    cursor: zoom-in;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.blog-md img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
}
.blog-md ul {
    margin: 0.6em 0;
    padding-left: 1.5em;
    list-style-type: disc;
    list-style-position: outside;
}
.blog-md ol {
    margin: 0.6em 0;
    padding-left: 1.5em;
    list-style-type: decimal;
    list-style-position: outside;
}
.blog-md li { margin: 0.2em 0; display: list-item; }
.blog-md ul ul, .blog-md ol ol, .blog-md ul ol, .blog-md ol ul { margin: 0.2em 0; padding-left: 1.2em; }
.blog-md ul li::marker, .blog-md ol li::marker { color: rgb(var(--accent-primary, 96, 165, 250)); }
.blog-md blockquote {
    border-left: 3px solid rgb(var(--accent-primary, 96, 165, 250));
    padding: 0.3em 0.9em;
    margin: 0.7em 0;
    color: rgb(var(--color-text-faint, 156, 163, 175));
    background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.04);
    border-radius: 0 10px 10px 0;
}
.blog-md code {
    background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.08);
    padding: 0.15em 0.4em;
    border-radius: 6px;
    font-size: 0.85em;
}
.blog-md pre {
    background: #0b1020;
    border: 1px solid rgb(var(--color-overlay-white, 255, 255, 255) / 0.08);
    padding: 0.8em 1em;
    border-radius: 10px;
    overflow-x: auto;
    margin: 0.7em 0;
}
.blog-md pre code { background: none; padding: 0; }
.blog-md hr { border: 0; border-top: 1px solid rgb(var(--color-overlay-white, 255, 255, 255) / 0.12); margin: 1em 0; }
.blog-md table { border-collapse: collapse; width: 100%; margin: 0.7em 0; }
.blog-md th, .blog-md td { border: 1px solid rgb(var(--color-overlay-white, 255, 255, 255) / 0.12); padding: 0.4em 0.7em; text-align: left; }

/* Реакции */
.blog-reactions { display: flex; align-items: center; gap: 6px; }
.blog-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid rgb(var(--color-overlay-white, 255, 255, 255) / 0.1);
    background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.04);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.blog-reaction-btn:hover { transform: translateY(-2px); border-color: rgb(var(--color-overlay-white, 255, 255, 255) / 0.25); }
.blog-reaction-emoji { font-size: 1.1rem; line-height: 1; }
.blog-reaction-count { font-size: 0.8rem; font-weight: 600; color: rgb(var(--color-text-faint, 156, 163, 175)); }
.blog-reaction-btn.active {
    border-color: rgb(var(--accent-primary, 96, 165, 250) / 0.6);
    background: rgb(var(--accent-primary, 96, 165, 250) / 0.12);
    box-shadow: 0 0 0 3px rgb(var(--accent-primary, 96, 165, 250) / 0.12);
}
.blog-reaction-btn.active .blog-reaction-count { color: #fff; }

/* Ссылка на комментарии */
.blog-comments-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgb(var(--color-text-faint, 156, 163, 175));
    font-size: 0.85rem;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 999px;
    transition: color 0.2s ease;
}
.blog-comments-link:hover { color: rgb(var(--accent-primary-light, 147, 197, 253)); }

/* Палитра смайлов */
.blog-emoji-palette { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.blog-emoji-btn {
    border: 1px solid rgb(var(--color-overlay-white, 255, 255, 255) / 0.08);
    background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.04);
    border-radius: 9px;
    padding: 3px 7px;
    font-size: 1.15rem;
    line-height: 1.3;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
}
.blog-emoji-btn:hover { transform: scale(1.2); background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.1); }

/* Комментарии */
.blog-comment { transition: box-shadow 0.3s ease; }
.blog-comment-form textarea { min-height: 72px; }
.blog-comment-delete { flex-shrink: 0; }

/* Якоря комментариев (уведомления ведут на #comment-{id}) */
[id^="comment-"] { scroll-margin-top: 84px; }

/* Цитирование комментариев — ветка */
.blog-comment.is-thread {
    margin-left: 28px;
    position: relative;
    border-left: 3px solid rgb(var(--accent-primary, 96, 165, 250) / 0.35);
}
.blog-comment.is-thread::before {
    content: '';
    position: absolute;
    top: -11px;
    left: -17px;
    width: 17px;
    height: 13px;
    border-left: 2px solid rgb(var(--accent-primary, 96, 165, 250) / 0.3);
    border-bottom: 2px solid rgb(var(--accent-primary, 96, 165, 250) / 0.3);
    border-bottom-left-radius: 8px;
}
@media (max-width: 640px) {
    .blog-comment.is-thread { margin-left: 16px; }
    .blog-comment.is-thread::before { height: 13px; }
}
.blog-comment-thread {
    margin-top: 10px;
    border: 1px solid rgb(var(--color-overlay-white, 255, 255, 255) / 0.12);
    background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.05);
    border-radius: 10px;
    padding: 8px 10px;
}
.blog-comment-thread-head { gap: 6px; }
.blog-comment-thread-author { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blog-comment-quote { flex-shrink: 0; }
.blog-comment-quote-chip {
    gap: 8px;
    border: 1px solid rgb(var(--accent-primary, 96, 165, 250) / 0.35);
    background: rgb(var(--accent-primary, 96, 165, 250) / 0.08);
    border-radius: 10px;
    padding: 5px 10px;
}
.blog-comment-quote-chip .blog-comment-quote-author {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.blog-subscriber-item { color: rgb(var(--color-text, 229, 231, 235)); }

/* Голосования в записях блога */
.blog-poll-option { border-radius: 8px; padding-left: 6px; padding-right: 6px; }
.blog-poll-option:hover { background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.04); }

#blogPollOptionsPreview .text-\[11px\] { font-size: 11px; }

/* Общий «Поделиться»: логотипы каналов в попапе */
#rgdevShareOverlay .rgdev-share-grid {
    display: grid;
    grid-template-columns: repeat(6, 46px);
    gap: 10px;
}
@media (max-width: 420px) {
    #rgdevShareOverlay .rgdev-share-grid {
        grid-template-columns: repeat(3, 46px);
    }
}
#rgdevShareOverlay .rgdev-share-logo {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.15s ease, background 0.15s ease;
}
#rgdevShareOverlay .rgdev-share-logo:hover {
    transform: scale(1.07);
    background: rgba(255, 255, 255, 0.12);
}
#rgdevShareOverlay .rgdev-share-logo svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
#rgdevShareOverlay .rgdev-share-logo i {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}
#rgdevShareOverlay .rgdev-share-max-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}
/* Блок предпросмотра отправляемого сообщения */
#rgdevShareOverlay .rgdev-share-preview {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 10px 12px;
}
#rgdevShareOverlay .rgdev-share-preview-body {
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 96px;
    overflow-y: auto;
    color: #d1d5db;
    font-size: 13px;
    line-height: 1.35;
}
/* Иконки действий «Поделиться на устройстве» / «Скопировать ссылку» */
#rgdevShareOverlay .rgdev-share-act {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #d1d5db;
    transition: transform 0.15s ease, background 0.15s ease;
}
#rgdevShareOverlay .rgdev-share-act:hover {
    transform: scale(1.07);
    background: rgba(255, 255, 255, 0.12);
}
#rgdevShareOverlay .rgdev-share-act i {
    font-size: 20px;
}

/* Редактор */
.blog-editor-toolbar { padding-bottom: 2px; }
.blog-toolbar-divider {
    width: 1px;
    height: 20px;
    background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.14);
    flex-shrink: 0;
    margin: 0 3px;
}
/* Единый стиль кнопок тулбара: одинаковая высота, контент строго по центру */
.blog-editor-toolbar > button,
.blog-editor-toolbar .blog-emoji-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 30px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1;
    vertical-align: middle;
}
.blog-editor-toolbar > button .material-icons-outlined,
.blog-editor-toolbar .blog-emoji-btn .material-icons-outlined {
    font-size: 17px;
}
.blog-md-btn {
    width: 34px;
    padding-left: 4px;
    padding-right: 4px;
    flex-shrink: 0;
}
.blog-md-btn:hover { background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.1); }
#blogPostContent { min-height: 200px; resize: vertical; }
#blogPreviewBox .blog-md img { max-height: 420px; }

/* Настройки: поиск пользователей */
.blog-user-search-drop {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 50;
    background: rgb(var(--color-card, 23, 25, 35));
    border: 1px solid rgb(var(--color-overlay-white, 255, 255, 255) / 0.12);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}
.blog-user-search-item { cursor: pointer; border-bottom: 1px solid rgb(var(--color-overlay-white, 255, 255, 255) / 0.05); }
.blog-user-search-item:last-child { border-bottom: 0; }
.blog-user-search-item:hover { background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.05); }

.blog-block-chip {
    background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.04);
    border: 1px solid rgb(var(--color-overlay-white, 255, 255, 255) / 0.08);
    border-radius: 999px;
    padding: 4px 6px 4px 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}
.blog-block-chip .text-sm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Светлая тема */
.light-theme .blog-md { color: rgb(var(--color-text, 31, 41, 55)); }
.light-theme .blog-md h1, .light-theme .blog-md h2, .light-theme .blog-md h3, .light-theme .blog-md h4 { color: rgb(var(--color-text, 17, 24, 39)); }
.light-theme .blog-md pre { background: #f3f4f6; }
.light-theme .blog-post-title { color: rgb(var(--color-text, 17, 24, 39)); }

/* Последний комментарий на главной блога (карточка в виде комментария) */
.blog-last-comment {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgb(var(--color-card-line) / 0.7);
    border-radius: 12px;
    background: rgb(var(--color-card-soft) / 0.5);
    color: rgb(var(--color-text-faint, 156, 163, 175));
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.blog-last-comment:hover {
    border-color: rgb(var(--accent-primary) / 0.4);
    background: rgb(var(--color-card-soft) / 0.8);
    color: rgb(var(--color-text, 209, 213, 219));
}
.blog-last-comment-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Прозрачная линия-разделитель постов */
.blog-post-divider {
    border-color: rgb(var(--color-overlay-white, 255, 255, 255) / 0.04) !important;
}

/* Модалка «Реакции» (владелец) */
.blog-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.blog-modal {
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}
.blog-reactions-group + .blog-reactions-group { border-top: 1px solid rgb(var(--color-overlay-white, 255, 255, 255) / 0.06); }
.blog-reactions-user { text-decoration: none; }

/* Лайтбокс картинок блога */
.blog-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 130;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.blog-lightbox-img {
    max-width: 94vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    cursor: zoom-out;
}
.blog-lightbox-close {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 131;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.1);
    border: 1px solid rgb(var(--color-overlay-white, 255, 255, 255) / 0.2);
    cursor: pointer;
    transition: background 0.2s ease;
}
.blog-lightbox-close:hover { background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.2); }
.blog-lightbox-overlay .blog-lightbox-caption {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90vw;
    color: rgb(var(--color-text-faint, 156, 163, 175));
    font-size: 0.8rem;
    text-align: center;
    padding: 4px 14px;
    border-radius: 999px;
    background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.08);
}

/* Меню записи (шестерёнка) */
.blog-post-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}
.blog-post-menu-btn:hover { background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.08); }
.blog-post-menu-drop { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5); }
.blog-menu-item { cursor: pointer; }
.blog-menu-item:hover { background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.06); }
.blog-menu-item .material-icons-outlined { color: rgb(var(--color-text-faint, 156, 163, 175)); }
.blog-menu-item:hover .material-icons-outlined { color: rgb(var(--color-text, 209, 213, 219)); }
.blog-menu-item.text-red-400 .material-icons-outlined,
.blog-menu-item.text-red-400:hover .material-icons-outlined { color: rgb(248, 113, 113); }
.blog-menu-divider { height: 1px; background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.08); }

/* Пагинация блога */
.blog-pager {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 2rem;
}
.blog-pager-btn {
    min-width: 34px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.blog-pager-current { cursor: default; pointer-events: none; }

/* ═══════════════════════════════════════════
   Debug-режим: просмотр сайта под пользователем
   ═══════════════════════════════════════════ */

/* Активный режим — нижний бар */
.rg-debug-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 9px 16px;
    background: #161a26;
    border-top: 1px solid rgb(var(--color-overlay-white, 255, 255, 255) / 0.1);
    color: rgb(var(--color-text-faint, 156, 163, 175));
    font-size: 0.8rem;
}
.rg-debug-bar b { color: #fff; font-weight: 600; }
.rg-debug-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6d00, #ff2d55);
    box-shadow: 0 0 8px rgba(255, 60, 0, 0.6);
    flex-shrink: 0;
}
.rg-debug-exit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgb(var(--color-overlay-white, 255, 255, 255) / 0.15);
    background: rgb(248, 113, 113 / 0.14);
    color: rgb(248, 113, 113);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}
.rg-debug-exit:hover { background: rgb(248, 113, 113 / 0.24); }

/* Панель выбора пользователя (открывается из пункта меню «Debug», только суперадмин) */
.rg-debug-panel {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 201;
    width: 340px;
    max-width: calc(100vw - 24px);
    max-height: 84vh;
    background: rgb(var(--color-card, 23, 25, 35));
    border: 1px solid rgb(var(--color-overlay-white, 255, 255, 255) / 0.12);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    padding: 14px;
}
.rg-debug-panel:not(.hidden) {
    display: flex;
    flex-direction: column;
}
.rg-debug-panel-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}
.rg-debug-panel-hint {
    font-size: 0.72rem;
    color: rgb(var(--color-text-faint, 156, 163, 175));
    margin-bottom: 10px;
    line-height: 1.35;
}
.rg-debug-panel .form-control { margin-bottom: 8px; }
.rg-debug-results {
    max-height: 240px;
    overflow-y: auto;
    flex: 1;
}
.rg-debug-empty {
    padding: 10px 12px;
    font-size: 0.75rem;
    color: rgb(var(--color-text-faint, 156, 163, 175));
}
.rg-debug-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    color: rgb(var(--color-text, 209, 213, 219));
}
.rg-debug-user:hover { background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.06); }
.rg-debug-panel-close {
    margin-top: 10px;
    padding: 6px 0;
    text-align: center;
    font-size: 0.75rem;
    color: rgb(var(--color-text-faint, 156, 163, 175));
    cursor: pointer;
    border-top: 1px solid rgb(var(--color-overlay-white, 255, 255, 255) / 0.08);
}
.rg-debug-panel-close:hover { color: rgb(248, 113, 113); }

/* ===== Личные сообщения: плавающий виджет ===== */
.msg-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 45;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgb(var(--accent-primary)) 0%, rgb(var(--accent-primary-deep)) 100%);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 24px rgb(var(--accent-primary) / 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.msg-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgb(var(--accent-primary) / 0.5);
}
.msg-fab-icon { font-size: 18px; }
#msgFab .menu-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    margin-left: 0;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    font-size: 11px;
}

/* Подсказка «Новые сообщения» рядом с FAB (появляется при загрузке, исчезает через 3 с) */
.msg-fab-hint {
    position: fixed;
    right: 84px;
    bottom: 24px;
    z-index: 45;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgb(var(--color-card));
    border: 1px solid rgb(var(--color-card-line));
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    color: rgb(var(--color-text-strong));
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.msg-fab-hint.show {
    opacity: 1;
    transform: translateX(0);
}
.msg-fab-hint.hide {
    opacity: 0;
    transform: translateX(8px);
}
.msg-fab-hint-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgb(var(--accent-primary));
    box-shadow: 0 0 6px rgb(var(--accent-primary) / 0.7);
    flex-shrink: 0;
}

.msg-panel {
    position: fixed;
    right: 22px;
    bottom: 92px;
    z-index: 44;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100vh - 130px);
    display: flex;
    flex-direction: column;
    background: rgb(var(--color-card));
    border: 1px solid rgb(var(--color-card-line));
    border-radius: 16px;
    box-shadow: 0 20px 50px rgb(0 0 0 / 0.5);
    overflow: hidden;
}
.msg-panel.hidden { display: none !important; }
.msg-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid rgb(var(--color-card-line));
}
.msg-panel-title {
    flex: 1;
    font-weight: 700;
    color: rgb(var(--color-text-strong));
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.msg-icon-btn {
    display: flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    color: rgb(var(--color-text-soft));
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.msg-icon-btn:hover {
    background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.06);
    color: rgb(var(--color-text-strong));
}
.msg-panel-body { flex: 1; overflow-y: auto; }
.msg-loading {
    padding: 24px;
    text-align: center;
    color: rgb(var(--color-text-faint, 156, 163, 175));
    font-size: 0.85rem;
}
.msg-panel-foot {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid rgb(var(--color-card-line));
}
.msg-panel-foot.hidden { display: none !important; }
#msgInput {
    flex: 1;
    resize: none;
    max-height: 120px;
    background: rgb(var(--color-bg));
    border: 1px solid rgb(var(--color-card-line));
    border-radius: 10px;
    padding: 9px 12px;
    color: rgb(var(--color-text-strong));
    font-size: 0.875rem;
    line-height: 1.4;
    outline: none;
}
#msgInput:focus { border-color: rgb(var(--accent-primary) / 0.6); }
.msg-send-btn {
    display: flex;
    width: 40px;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, rgb(var(--accent-primary)) 0%, rgb(var(--accent-primary-deep)) 100%);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}
.msg-send-btn:hover { opacity: 0.9; }
.msg-send-btn:disabled { opacity: 0.5; cursor: default; }

.msg-dialog-row-wrap {
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgb(var(--color-card-line) / 0.6);
}
.msg-dialog-row-wrap:last-child { border-bottom: none; }
.msg-dialog-row {
    display: flex;
    flex: 1;
    min-width: 0;
    gap: 10px;
    align-items: center;
    padding: 11px 14px;
    background: none;
    border: none;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.msg-dialog-row:hover { background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.05); }
.msg-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: rgb(var(--color-card-soft));
}
.msg-dialog-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.msg-dialog-name {
    font-weight: 600;
    color: rgb(var(--color-text-strong));
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.msg-dialog-preview {
    color: rgb(var(--color-text-faint, 156, 163, 175));
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.msg-empty { font-style: italic; }
.msg-dialog-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.msg-dialog-time { color: rgb(var(--color-text-faint, 156, 163, 175)); font-size: 0.7rem; }
.msg-row-badge.menu-badge { position: static; margin-left: 0; }

/* Кнопка удаления диалога (только иконка, по наведению) */
.msg-dialog-del {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 8px;
    flex-shrink: 0;
    background: none;
    border: none;
    border-radius: 8px;
    color: rgb(var(--color-text-faint, 156, 163, 175));
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.msg-dialog-row-wrap:hover .msg-dialog-del { opacity: 1; }
.msg-dialog-del:hover {
    color: #f87171;
    background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.06);
}
.msg-dialog-del .material-icons-outlined { font-size: 18px; }

/* Подтверждение удаления диалога */
.msg-dialog-confirm {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
    flex-shrink: 0;
}
.msg-dialog-confirm span {
    font-size: 0.72rem;
    font-weight: 700;
    color: #f87171;
    white-space: nowrap;
}
.msg-dialog-confirm button {
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid;
}
.msg-confirm-yes {
    background: rgba(239, 68, 68, 0.9);
    border-color: transparent;
    color: #fff;
}
.msg-confirm-yes:hover { background: rgb(239, 68, 68); }
.msg-confirm-no {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.25);
    color: #d1d5db;
}
.msg-confirm-no:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.msg-row { display: flex; gap: 8px; padding: 9px 14px; align-items: flex-start; }
.msg-row-own { justify-content: flex-end; }
.msg-row-in .msg-avatar { width: 34px; height: 34px; }
.msg-bubble-wrap { display: flex; flex-direction: column; max-width: 75%; min-width: 60px; }
.msg-row-own .msg-bubble-wrap { align-items: flex-end; }
.msg-bubble-meta { display: flex; gap: 8px; align-items: baseline; margin: 0 2px 3px; }
.msg-row-own .msg-bubble-meta { justify-content: flex-end; }
.msg-name { font-size: 0.72rem; font-weight: 600; color: rgb(var(--accent-primary-light)); }
.msg-time { font-size: 0.68rem; color: rgb(var(--color-text-faint, 156, 163, 175)); }
.msg-bubble {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.45;
    word-break: break-word;
}
.msg-bubble-in {
    background: rgb(var(--color-card-soft));
    color: rgb(var(--color-text-soft));
    border-top-left-radius: 4px;
}
.msg-bubble-own {
    background: linear-gradient(135deg, rgb(var(--accent-primary-dark)) 0%, rgb(var(--accent-primary-deep)) 100%);
    color: #fff;
    border-top-right-radius: 4px;
}
.msg-link { color: #7dd3fc; text-decoration: underline; }
.msg-bubble-own .msg-link { color: #e0f2fe; }
.msg-report {
    display: flex;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: rgb(var(--color-text-faint, 156, 163, 175));
    cursor: pointer;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.15s ease;
    align-self: center;
    flex-shrink: 0;
}
.msg-row:hover .msg-report { opacity: 1; }
.msg-report:hover { color: #f87171; background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.06); }
.msg-report[disabled] { opacity: 0.3; cursor: default; }

.msg-new-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 14px;
    background: none;
    border: none;
    border-bottom: 1px solid rgb(var(--color-card-line) / 0.6);
    color: rgb(var(--accent-primary-light));
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}
.msg-new-btn:hover { background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.05); }
.msg-compose { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.msg-search-input {
    width: 100%;
    background: rgb(var(--color-bg));
    border: 1px solid rgb(var(--color-card-line));
    border-radius: 10px;
    padding: 10px 12px;
    color: rgb(var(--color-text-strong));
    font-size: 0.875rem;
    outline: none;
}
.msg-search-input:focus { border-color: rgb(var(--accent-primary) / 0.6); }
.msg-search-results { display: flex; flex-direction: column; gap: 4px; }
.msg-search-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: none;
    background: none;
    border-radius: 10px;
    color: rgb(var(--color-text-strong));
    text-align: left;
    cursor: pointer;
    font-size: 0.85rem;
}
.msg-search-user:hover { background: rgb(var(--color-overlay-white, 255, 255, 255) / 0.06); }
.msg-search-user img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.msg-search-empty { color: rgb(var(--color-text-faint, 156, 163, 175)); font-size: 0.78rem; padding: 6px 2px; }

@media (max-width: 640px) {
    .msg-panel {
        right: 12px;
        left: 12px;
        width: auto;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 92px);
        height: 60vh;
        max-height: calc(100vh - 140px);
    }
    .msg-fab {
        right: 16px;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 78px);
        width: 48px;
        height: 48px;
    }
    .msg-fab-hint {
        right: 76px;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 78px);
    }
    .rg-debug-panel {
        left: 12px;
        right: 12px;
        width: auto;
        transform: none;
        top: 80px;
    }
}

/* ===== «Все уведомления»: timeline (модальное окно) ===== */
.ntl-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}
.ntl-time {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 76px;
    flex-shrink: 0;
    padding-top: 5px;
}
.ntl-time::after {
    content: '';
    position: absolute;
    top: 17px;
    bottom: -14px;
    left: 50%;
    width: 2px;
    margin-left: -1px;
    background: rgb(var(--color-card-line));
}
.ntl-row:last-child .ntl-time::after { display: none; }
.ntl-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgb(var(--color-card-soft));
    border: 2px solid rgb(var(--color-text-faint, 156, 163, 175));
    flex-shrink: 0;
}
.ntl-unread .ntl-dot {
    background: rgb(var(--accent-primary));
    border-color: rgb(var(--accent-primary));
    box-shadow: 0 0 8px rgb(var(--accent-primary) / 0.7);
}
.ntl-date {
    font-size: 0.66rem;
    line-height: 1.2;
    color: rgb(var(--color-text-faint, 156, 163, 175));
    text-align: center;
}
.ntl-card {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgb(var(--color-card-line));
    border-radius: 10px;
    background: rgb(var(--color-card-soft) / 0.5);
}
.ntl-unread .ntl-card {
    border-color: rgb(var(--accent-primary) / 0.45);
    background: rgb(var(--accent-primary) / 0.07);
}
.ntl-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: rgb(var(--color-text-strong));
    margin-bottom: 3px;
}
.ntl-link {
    color: rgb(var(--color-text-strong));
    text-decoration: none;
}
.ntl-link:hover { color: rgb(var(--accent-primary-light)); }
.ntl-title-text { color: rgb(var(--color-text-strong)); }
.ntl-text {
    font-size: 0.76rem;
    line-height: 1.4;
    color: rgb(var(--color-text-soft));
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}
.ntl-foot {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}
.ntl-open {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid rgb(var(--color-card-line));
    border-radius: 6px;
    padding: 4px 10px;
    color: rgb(var(--accent-primary-light));
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.ntl-open:hover {
    border-color: rgb(var(--accent-primary) / 0.5);
    color: rgb(var(--accent-primary));
}
.notify-all-toggle {
    flex-shrink: 0;
    background: none;
    border: 1px solid rgb(var(--color-card-line));
    border-radius: 6px;
    padding: 4px 10px;
    color: rgb(var(--color-text-soft));
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
}
.notify-all-toggle:hover {
    border-color: rgb(var(--accent-primary) / 0.5);
    color: rgb(var(--accent-primary-light));
}
.notify-all-toggle:disabled { opacity: 0.5; cursor: default; }
.notify-all-empty {
    padding: 16px;
    text-align: center;
    color: rgb(var(--color-text-faint, 156, 163, 175));
    font-size: 0.78rem;
}

/* Кнопка «Прочитать все» в модальном окне — неактивна, когда нет непрочитанных */
#notifyAllReadBtn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.75);
}

/* ===== Панель над тостами уведомлений: «Скрыть» / «Посмотреть все» ===== */
.notify-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto;
}
.notify-topbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #e5e7eb;
    transition: all 0.2s ease;
}
.notify-topbar-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.notify-topbar-hide:hover {
    border-color: rgba(248, 113, 113, 0.5);
    color: #f87171;
    background: rgba(248, 113, 113, 0.12);
}
.notify-topbar-all {
    background: linear-gradient(135deg, rgb(var(--accent-primary)), rgb(var(--accent-primary-deep)));
    border-color: transparent;
    color: #fff;
}
.notify-topbar-all:hover {
    box-shadow: 0 4px 14px rgb(var(--accent-primary) / 0.4);
    background: linear-gradient(135deg, rgb(var(--accent-primary-light)), rgb(var(--accent-primary)));
}

