        .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }
        body { background: #e8e8e8; margin: 0; font-family: Arial, sans-serif; display:flex; flex-direction:column; align-items:center; min-height:100vh; }
        form { width:fit-content; max-width:100%; flex:1 0 auto; }
        /* Toolbar */
        .toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 20px; flex-wrap:wrap; background:#f5f5f5; border-bottom:1px solid #ddd; margin-bottom:4px; }
        .toolbar-left,.toolbar-center,.toolbar-right { display:flex; align-items:center; gap:10px; }
        .lang-dropdown { position:relative; display:inline-block; }
        .lang-current { background:#fff; color:#333; border:1px solid #ccc; border-radius:4px; padding:4px 8px; font-size:11px; cursor:pointer; display:flex; align-items:center; gap:4px; white-space:nowrap; }
        .lang-current:hover { border-color:#2e7d32; }
        .lang-current .fi { font-size:12px; }
        .lang-list { display:none; position:absolute; top:100%; right:0; background:#fff; border:1px solid #ccc; border-radius:6px; box-shadow:0 4px 16px rgba(0,0,0,.15); z-index:9999; min-width:140px; max-height:300px; overflow-y:auto; margin-top:2px; }
        .lang-dropdown.open .lang-list { display:block; }
        .lang-list a { display:flex; align-items:center; gap:6px; padding:6px 12px; font-size:12px; color:#333; cursor:pointer; text-decoration:none; white-space:nowrap; }
        .lang-list a:hover { background:#e8f5e9; }
        .lang-list .fi { font-size:14px; }
        body.dark-theme .lang-current { background:#2a2a2a; color:#e0e0e0; border-color:#444; }
        body.dark-theme .lang-list { background:#2a2a2a; border-color:#444; }
        body.dark-theme .lang-list a { color:#e0e0e0; }
        body.dark-theme .lang-list a:hover { background:#333; }
        .site-logo { display:flex; align-items:center; text-decoration:none; flex-shrink:0; }
        .site-logo:hover { opacity:0.8; }
        .toolbar-title { margin:0; font-size:14px; font-weight:600; color:#555; }
        .title-count { color:#222; font-size:18px; font-weight:700; }
        .title-sep { color:#999; margin:0 4px; }
        .title-page { color:#999; font-size:12px; }
        .live-dot { display:inline-block; width:8px; height:8px; background:#4caf50; border-radius:50%; margin-right:6px; animation:livePulse 2s ease infinite; }
        @keyframes livePulse { 0%,100%{opacity:1;box-shadow:0 0 0 0 rgba(230,81,0,0.4)} 50%{opacity:.8;box-shadow:0 0 0 6px rgba(230,81,0,0)} }
        .live-logo { display:inline; text-decoration:none; }
        .live-favicon { width:12px; height:12px; vertical-align:middle; margin-right:4px; animation:livePulse 2s ease infinite; border-radius:50%; }

        /* Search */
        .search-wrap { position:relative; display:flex; align-items:center; }
        .search-wrap input { background:#fff; color:#333; border:1px solid #ccc; border-radius:4px; padding:6px 28px 6px 10px; font-size:12px; width:400px; outline:none; transition:border-color 0.2s; }
        .search-wrap input:focus { border-color:#1565C0; box-shadow:0 0 0 3px rgba(21,101,192,0.15); }
        .search-clear { position:absolute; right:6px; top:50%; transform:translateY(-50%); background:none; border:none; color:#999; font-size:16px; cursor:pointer; padding:0 4px; line-height:1; }

        /* Mode toggle */
        .mode-toggle { display:inline-flex; gap:0; border:1px solid #ccc; border-radius:4px; overflow:hidden; }
        .mode-btn { padding:6px 14px; border:none; background:#eee; color:#555; cursor:pointer; font-size:12px; font-weight:600; transition:all 0.2s; }
        .mode-btn:hover { background:#ddd; color:#333; }
        .mode-btn.mode-active { background:#2e7d32; color:#fff; }

        /* Завершённые и пре-матч строки */
        tr.row-finished td { color: #999; background:#f9f9f9; }
        tr.row-prematch td { color: #666; }
        .min-ft { background:#757575; color:#fff; border-radius:3px; padding:1px 4px; font-size:11px; }

        /* Пагинация */
        #pagingBar button { background:#2e7d32; color:#fff; border:none; border-radius:4px; cursor:pointer; font-size:13px; }
        #pagingBar button:disabled { background:#444; cursor:default; }

        table.live-table { width:100%; min-width:1500px; white-space:nowrap; border-collapse:collapse; font-size:12px; background:#fff; border:1px solid #ddd; }
        table.live-table th { background:#f0f0f0; color:#333; padding:3px 5px; text-align:center; white-space:nowrap; border-bottom:2px solid #bbb; }
        table.live-table th i.ph, table.live-table th i.ti, table.live-table th i.bi { font-size:18px; line-height:1; vertical-align:middle; color:#444; }
        table.live-table th.sort-hdr:hover i { color:#2e7d32; }
        table.live-table td { padding:2px 5px; border-bottom:1px solid #e0e0e0; vertical-align:middle; }
        table.live-table tr:hover { background:#f5f5f5 !important; }

        /* Power bar */
        .dom-wrap { width:100%; min-width:130px; }
        .dom-thick-bar { display:flex; height:20px; border-radius:4px; overflow:hidden; }
        .dom-home { background:#2196F3; }
        .dom-away { background:#ddd; }
        .dom-seg  { display:flex; align-items:center; justify-content:center;
                    font-size:9px; font-weight:bold; overflow:hidden; white-space:nowrap; transition:width .4s; }
        .dom-seg.dom-home { color:#fff; }
        .dom-seg.dom-away { color:#555; }
        .dom-click { cursor:pointer; }
        .dom-click:hover { filter:brightness(1.15); }
        .dom-fav-losing { outline: 1px solid #880E4F; outline-offset: -1px; border-radius: 4px; }

        /* Цвета строк */
        .row-home-dominant  { background:#fff; }
        .row-away-dominant  { background:#fff; }
        .row-balanced       { background:#fff; }
        .row-high-activity  { border-left:3px solid #f44336 !important; }

        /* Watched строки */
        .watched-row     { background:#e3f2fd !important; }
        .watched-finished { }

        /* Статистика */
        .stat-neutral { color:#444; }
        .stat-dom-h { color:#1565C0; font-weight:bold; }
        .stat-dom-a { color:#bf360c; font-weight:bold; }
        .stat-weak { color:#444; }

        /* Коэффициенты */
        .odds-line      { white-space:nowrap; font-size:11px; padding:2px 6px; }
        .odds-live-td   { position:relative; }
        .odds-live-td .odds-pre-row { margin-bottom:2px; border-bottom:1px solid #e0e0e0; padding-bottom:2px; }
        .odds-badge-row { line-height:1; margin-bottom:1px; }
        .odds-nums      { white-space:nowrap; }
        .odds-tag    { display:inline-block; font-weight:bold; border-radius:2px;
                       letter-spacing:.4px; }
        .odds-live { background:#2e7d32; color:#fff; font-size:8px; padding:1px 5px; }
        .odds-pre  { background:#90a4ae; color:#fff; font-size:6px; padding:1px 3px; }
        .odds-pre-row { font-size:9px; color:#aaa; line-height:1.4; white-space:nowrap; margin-bottom:1px; }
        .pre-p1 { color:#4caf50; }
        .pre-x  { color:#999; }
        .pre-p2 { color:#ef9a9a; }
        .pre-tl { color:#aaa; font-weight:bold; }
        .pre-to { color:#4caf50; }
        .pre-tu { color:#ef9a9a; }
        .odds-p1 { color:#1b5e20; font-weight:bold; }
        .odds-x  { color:#555; }
        .odds-p2 { color:#b71c1c; font-weight:bold; }
        .odds-hdp-lbl  { color:#888; font-size:9px; text-transform:uppercase; }
        .odds-hdp-line { color:#1565c0; font-weight:bold; margin:0 3px; }
        .odds-hdp-h    { color:#1b5e20; font-weight:bold; }
        .odds-hdp-a    { color:#b71c1c; font-weight:bold; }
        .odds-hdp-sep  { color:#aaa; margin:0 2px; }
        .arb-tot-row   { font-size:9px; color:#666; margin-top:1px; text-align:right; }
        .arb-tot-line  { color:#333; font-weight:bold; }
        .arb-tot-o     { color:#1b5e20; font-weight:bold; }
        .arb-tot-u     { color:#b71c1c; font-weight:bold; }
        .arb-tot-vol   { color:#1565c0; margin-left:3px; }
        .arb-bold      { font-weight:bold; font-size:11px; }
        .form-td       { text-align:center; font-size:9px; padding:2px 4px; white-space:nowrap; }
        .form-gd       { font-weight:bold; font-size:9px; }
        .gd-gf         { color:#1b5e20; }
        .gd-ga         { color:#b71c1c; }
        .gd-sep        { color:#aaa; margin:0 1px; }
        .gd-pos        { color:#1b5e20; }
        .gd-neg        { color:#b71c1c; }
        .gd-zero       { color:#888; }
        .form-icons    { line-height:1.2; }
        .form-icons span { display:inline-block; width:12px; height:12px; line-height:12px; text-align:center;
                           border-radius:2px; font-size:8px; font-weight:bold; color:#fff; margin:0 1px; }
        .fm-W          { background:#4caf50; }
        .fm-D          { background:#ff9800; }
        .fm-L          { background:#f44336; }
        .tot-sep  { color:#888; margin:0 4px; }
        .tot-line { font-weight:bold; color:#333; }
        .tot-o    { color:#1b5e20; }
        .tot-u    { color:#b71c1c; }
        .odds-mv     { font-size:9px; color:#888; margin-right:2px; white-space:nowrap; }
        .odds-mv-up  { color:#c62828; }
        .odds-mv-dn  { color:#2e7d32; }

        /* Блок команд. max-width обязателен — иначе длинная строка трендов раздувает колонку auto-layout'ом */
        .teams-block { padding:2px 6px; vertical-align:middle; min-width:280px; max-width:340px; }
        .league-row-v2 { text-align:center; font-size:10px; color:#444; font-weight:500; letter-spacing:0.3px;
                         white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.3; }
        .league-link-v2 { color:#444; text-decoration:none; }
        .league-link-v2:hover { text-decoration:underline; }
        .teams-row-v2 { display:flex; align-items:center; justify-content:center; gap:6px; white-space:nowrap; }
        .team-name-h  { font-size:13px; font-weight:500; text-align:right; flex:1; overflow:hidden; text-overflow:ellipsis; }
        .team-name-a  { font-size:13px; font-weight:500; text-align:left; flex:1; overflow:hidden; text-overflow:ellipsis; }
        .score-center-v2 { font-size:14px; font-weight:700; color:#222; flex-shrink:0; padding:0 8px; }
        .alert-score-inline { font-size:8px; color:#888; font-weight:400; }
        .bottom-row-v2 { text-align:center; font-size:8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.3; margin-top:1px; }
        .live-strat-lbl { color:#2e7d32; font-weight:600; font-size:8px; float:right; margin-left:6px; }
        .stream-icon { font-size:11px; text-decoration:none; opacity:0.7; float:left; margin-right:4px; }
        .stream-icon:hover { opacity:1; }
        .preview-icon { cursor:pointer; font-size:12px; float:left; margin-right:6px; position:relative; opacity:0.8; }
        .preview-icon:hover { opacity:1; }
        .preview-tip { min-width:400px; max-width:550px; white-space:normal !important; line-height:1.6; font-size:14px; padding:16px !important; max-height:500px; overflow-y:auto; }
        .trend-tip { min-width:220px; max-width:440px; white-space:normal; }
        .team-main-td { max-width:240px; overflow:hidden; padding:2px 5px; }
        .league-lbl   { font-size:9px; color:#666; font-weight:600; white-space:nowrap;
                        overflow:hidden; text-overflow:ellipsis; line-height:1.3; }
        .team-names   { white-space:normal; word-break:break-word;
                        font-size:13px; line-height:1.4; }
        .team-sep     { color:#bbb; margin:0 3px; }
        .sq-stat { font-size:10px; color:#888; margin-top:1px; }
        .sq-imp  { padding:0 1px; }
        .sq-weak { color:#e74c3c; font-weight:bold; }
        .sq-miss { font-size:8px; color:#e74c3c; vertical-align:super; }
        .sq-cell { font-size:10px; color:#888; text-align:center; }
        .sq-miss-cell { color:#e74c3c; font-weight:bold; }
        .hdk-td { text-align:center; white-space:nowrap; }
        .hdk-hover { position: relative; cursor: pointer; }
        .hdk-tooltip {
            display: none;
            position: fixed;
            z-index: 9999;
            background: #fff;
            color: #333;
            border: 1px solid #ccc;
            border-radius: 6px;
            padding: 6px 8px;
            min-width: 220px;
            max-width: 420px;
            box-shadow: 0 4px 16px rgba(0,0,0,0.15);
            font-size: 10px;
            line-height: 1.4;
        }
        .miss-tip { min-width:280px; max-width:420px; }
        .miss-cols { display:flex; gap:12px; }
        .miss-col { flex:1; min-width:120px; }
        .miss-hdr { font-weight:700; font-size:10px; margin-bottom:3px; padding-bottom:2px; border-bottom:1px solid #ddd; }
        .miss-row { padding:1px 0; white-space:nowrap; }
        .miss-key { color:#e74c3c; font-weight:700; }
        .linepa-info  { font-size:9px; color:#888; white-space:nowrap; overflow:hidden;
                        text-overflow:ellipsis; line-height:1.3; margin-top:1px; }
        .live-info    { font-size:9px; color:#2e7d32; font-weight:bold; white-space:nowrap; overflow:hidden;
                        text-overflow:ellipsis; line-height:1.3; margin-top:2px; }
        .trend-info   { font-size:10px; color:#1565C0; white-space:nowrap; overflow:hidden;
                        text-overflow:ellipsis; line-height:1.3; margin-top:4px; }
        .cards-row    { font-size:10px; line-height:1.4; margin-top:1px; }
        .cards-sep    { color:#bbb; margin:0 3px; }
        .add-td       { text-align:center; padding:0 2px; }
        .add-btn      { font-size:14px; font-weight:bold; line-height:1;
                        padding:1px 6px; border:1px solid #bbb; border-radius:3px;
                        background:#f5f5f5; color:#555; cursor:pointer; transition:all .15s; }
        .add-btn:hover { background:#e3f2fd; border-color:#64b5f6; color:#1565c0; }
        .add-btn.added { background:#2e7d32; border-color:#2e7d32; color:#fff; cursor:default; }
        .add-btn.error { background:#c62828; border-color:#c62828; color:#fff; }

        /* Карточки */
        .card-icon   { display:inline-block; width:6px; height:9px; border-radius:1px;
                       margin-left:2px; vertical-align:middle; }
        .card-icon-y { background:#fdd835; border:1px solid #c6a000; }
        .card-icon-r { background:#f44336; border:1px solid #b71c1c; }

        /* Минута */
        .min-td { cursor:pointer; }
        .min-td:hover .minute-badge { filter:brightness(1.3); }
        .minute-badge { display:inline-block; background:#546e7a; color:#fff; border-radius:10px;
            padding:2px 7px; font-size:10px; font-weight:bold; }

        /* Activity badge */
        .act-high { background:#e53935; color:#fff; border-radius:3px; padding:1px 6px; font-weight:bold; }
        .act-med  { background:#fb8c00; color:#fff; border-radius:3px; padding:1px 6px; font-weight:bold; }
        .act-low  { background:#aaa;    color:#fff; border-radius:3px; padding:1px 6px; }

        .score-big { font-size:15px; font-weight:bold; text-align:center; }
        .alert-score { font-size:9px; color:#888; font-weight:normal; margin-top:1px; }
        .no-data { text-align:center; padding:30px; color:#888; font-size:14px; }

        th.sort-hdr { cursor:pointer; user-select:none; }
        th.sort-hdr:hover { background:#ddd !important; }
        /* Ссылка-обёртка над иконкой шапки — клик по иконке ведёт на пункт FAQ, обычный клик по th сортирует */
        .hdr-icon-link { color:inherit; text-decoration:none; display:inline-block; }
        .hdr-icon-link:hover { color:#1565C0; }
        th.sort-active { background:#1565C0 !important; color:#fff !important; }

        /* Flashscore-стиль статистики */
        .sv-cell { cursor:default; padding:0 !important; overflow:visible; }
        .stat-bars-td { padding:2px 3px !important; min-width:135px; max-width:160px; vertical-align:top; cursor:pointer; overflow:hidden; }
        .stat-popup { min-width:220px; max-width:270px; padding:10px 14px !important; border-radius:10px !important; }
        .stat-bar-row { position:relative; height:18px; margin:3px 0; font-size:9px; font-weight:600; background:#e8e8e8; border-radius:4px; overflow:hidden; }
        .sb-h { position:absolute; left:0; top:0; bottom:0; border-radius:4px 0 0 4px; box-shadow:inset 0 1px 0 rgba(255,255,255,0.25); }
        .sb-a { position:absolute; right:0; top:0; bottom:0; border-radius:0 4px 4px 0; box-shadow:inset 0 1px 0 rgba(255,255,255,0.25); }
        .sb-val-h { position:absolute; left:5px; top:0; height:100%; display:flex; align-items:center; color:#fff; z-index:1; font-size:10px; font-weight:700; text-shadow:0 1px 1px rgba(0,0,0,0.3); }
        .sb-val-a { position:absolute; right:5px; top:0; height:100%; display:flex; align-items:center; color:#fff; z-index:1; font-size:10px; font-weight:700; text-shadow:0 1px 1px rgba(0,0,0,0.3); }
        .sb-lbl { position:absolute; left:50%; top:0; height:100%; display:flex; align-items:center; transform:translateX(-50%); font-size:8px; color:#fff; font-weight:700; z-index:2; text-shadow:0 1px 2px rgba(0,0,0,0.6); }
        .mom-svg { display:block; width:100%; overflow:hidden; }
        .sv   { font-size:7px; width:78px; display:inline-block; vertical-align:top; }

        /* Popup статистики */
        #sv-popup { position:fixed; display:none; z-index:9999; pointer-events:none;
            background:#fff; border:1px solid #ddd; border-radius:8px;
            padding:8px 12px; box-shadow:0 4px 20px rgba(0,0,0,.22);
            font-size:13px; min-width:190px; }
        .sp-r { display:flex; align-items:center; margin-bottom:2px; }
        .sp-h { width:32px; text-align:right; font-weight:bold; }
        .sp-l { flex:1; text-align:center; color:#888; font-size:10px; padding:0 6px; white-space:nowrap; }
        .sp-a { width:32px; font-weight:bold; }
        .sp-b { display:flex; height:4px; margin-bottom:5px; border-radius:2px; overflow:hidden; }
        .sp-bh { background:#42a5f5; }
        .sp-ba { background:#e0e0e0; }
        .sv-r { display:flex; align-items:center; line-height:1.3; }
        .sv-h { width:15px; text-align:right; font-weight:bold; flex-shrink:0; }
        .sv-l { flex:1; text-align:center; color:#888; padding:0 3px; white-space:nowrap; }
        .sv-a { width:15px; text-align:left; font-weight:bold; flex-shrink:0; }
        .sv-b { display:flex; width:100%; height:3px; margin:0 0 2px; overflow:hidden; border-radius:1px; }
        .sv-bh { background:#42a5f5; }
        .sv-ba { background:#e0e0e0; }

        /* Следить */
        .watch-td { text-align:center; }
        .watch-cb { width:16px; height:16px; cursor:pointer; accent-color:#1565C0; }

        /* Sticky thead */
        table.live-table thead th { position:sticky; top:0; z-index:10;
            box-shadow:0 1px 3px rgba(0,0,0,.12); }

        /* Цвет минуты по периоду */
        .min-pre   { background:#78909c !important; }
        .min-early { background:#b2ebf2 !important; color:#37474f !important; }
        .min-1h    { background:#00ACC1 !important; }
        .min-2h    { background:#0097A7 !important; }
        .min-et    { background:#c2185b !important; }

        /* Pulse bar */
        .pulse-wrap { position:relative; background:#ddd; border-radius:4px;
                      height:18px; min-width:58px; overflow:hidden;
                      display:flex; align-items:center; }
        .pulse-fill { position:absolute; left:0; top:0; bottom:0;
                      border-radius:4px; min-width:3px; }
        .pulse-fill.act-high { background:#e53935; }
        .pulse-fill.act-med  { background:#fb8c00; }
        .pulse-fill.act-low  { background:#9e9e9e; }
        .pulse-lbl { position:relative; z-index:1; font-size:10px; font-weight:bold;
                     width:100%; text-align:center; color:#fff; line-height:18px; }
        .pulse-lbl.act-low { color:#333; }

        /* Тренд */
        .trend-td { text-align:center; width:28px; font-size:14px; }
        .trend-up { color:#2e7d32; }
        .trend-dn { color:#c62828; }
        .trend-eq { color:#bdbdbd; }

        /* Фильтры */
        .live-filters { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
        .filter-btn { cursor:pointer; border:1px solid #ccc; background:#f5f5f5; border-radius:4px;
                      padding:3px 10px; font-size:11px; user-select:none; white-space:nowrap; }
        .filter-btn:hover { background:#e0e0e0; }
        .filter-btn.f-active { background:#1565C0; color:#fff; border-color:#1565C0; }

        /* Notification stack */
        #notif-container { position:fixed; bottom:16px; left:16px; z-index:10000;
                           display:flex; flex-direction:column; gap:8px; align-items:flex-start; }
        .notif-card      { display:flex; align-items:flex-start; gap:10px;
                           padding:10px 12px 10px 16px; border-radius:8px; color:#fff;
                           font-size:13px; font-weight:bold; max-width:340px;
                           box-shadow:0 4px 18px rgba(0,0,0,.4);
                           animation:notif-in .2s ease; }
        .notif-goal      { background:#2e7d32; }
        .notif-power     { background:#e65100; }
        .notif-pulse     { background:#1565c0; }
        .notif-msg       { flex:1; line-height:1.4; word-break:break-word; }
        .notif-close     { cursor:pointer; font-size:15px; line-height:1; padding:1px 0 0 4px;
                           opacity:.7; flex-shrink:0; }
        .notif-close:hover { opacity:1; }
        @keyframes notif-in { from { opacity:0; transform:translateY(12px); }
                               to   { opacity:1; transform:translateY(0); } }

        /* Score flash animation */
        @keyframes scoreFlash { 0%,100%{background:transparent} 30%{background:#a5d6a7} }
        .score-flash { animation:scoreFlash 1.8s ease; }
        .score-big-v2.score-flash { animation:scoreFlash 1.8s ease; }

        /* Notification click highlight */
        @keyframes notifHL { 0%{background:#fff176} 100%{background:transparent} }
        .notif-highlight td { animation:notifHL 3s ease forwards; }

        /* ArbWorld */
        .arb-vol-td  { text-align:center; white-space:nowrap; font-size:11px; padding:4px 3px; }
        .arb-flow-td { text-align:center; white-space:nowrap; font-size:10px; padding:4px 3px; }
        .arb-vol-num { font-weight:600; color:#1565C0; font-size:11px; }
        .arb-side    { font-weight:700; font-size:10px; padding:1px 4px; border-radius:3px; }
        .arb-h       { color:#1565C0; }
        .arb-x       { color:#666; }
        .arb-a       { color:#e65100; }
        .arb-h.arb-side { background:#e3f2fd; }
        .arb-x.arb-side { background:#f5f5f5; }
        .arb-a.arb-side { background:#fff3e0; }
        .arb-max     { font-weight:700; }
        .arb-dc      { font-size:8px; color:#9c27b0; font-weight:600; margin-left:2px; vertical-align:super; }
        /* Arb History Popup */
        .goal-popup { position:absolute; z-index:10000; background:#fff; border:1px solid #ccc;
            border-radius:8px; box-shadow:0 4px 16px rgba(0,0,0,0.18); padding:8px 12px;
            font-size:11px; min-width:180px; max-width:300px; display:none; pointer-events:auto; }
        .goal-popup b { font-size:12px; }
        .gp-header { text-align:center; margin-bottom:4px; white-space:nowrap; }
        .teams-row-v2 { cursor:default; }
        .goal-tbl { width:100%; border-collapse:collapse; margin-top:6px; }
        .goal-tbl td { padding:3px 4px; font-size:11px; white-space:nowrap; vertical-align:middle; }
        .gl-home { text-align:right; width:45%; }
        .gl-away { text-align:left; width:45%; }
        .gl-score { text-align:center; width:10%; color:#1565C0; font-weight:700; font-size:12px; padding:2px 8px; }
        .gl-min { color:#888; font-size:10px; }
        .gl-assist { color:#888; font-size:10px; }
        .gl-og { color:#c62828; font-weight:700; font-size:10px; }
        .arb-popup { position:absolute; z-index:9999; background:#fff; border:1px solid #ccc;
            border-radius:6px; box-shadow:0 4px 16px rgba(0,0,0,0.15); max-height:320px; overflow-y:auto;
            min-width:300px; display:none; }
        .arb-hist-tbl { width:100%; border-collapse:collapse; font-size:10px; color:#333; }
        .arb-hist-tbl th { background:#f5f5f5; color:#666; padding:3px 6px; text-align:center;
            border-bottom:1px solid #ddd; position:sticky; top:0; }
        .arb-hist-tbl td { padding:2px 6px; text-align:center; border-bottom:1px solid #eee; }
        .arb-hist-tbl tr:hover { background:#f0f4ff; }
        .arb-hist-tbl .arb-max { color:#1565C0; font-weight:700; }
        .arb-hist-tbl .arb-vol-up { color:#2e7d32; }
        .arb-hist-tbl .arb-vol-dn { color:#c62828; }

        /* ================= DARK THEME ================= */
        body.dark-theme { background:#1a1a1a; color:#e0e0e0; }
        body.dark-theme form { background:transparent; }
        body.dark-theme .toolbar { background:#222; border-bottom:1px solid #333; }
        body.dark-theme .toolbar-title { color:#bbb; }
        body.dark-theme .title-count { color:#fff; }
        body.dark-theme .title-page,
        body.dark-theme .title-sep { color:#777; }
        body.dark-theme .search-wrap input { background:#2a2a2a; color:#e0e0e0; border-color:#444; }
        body.dark-theme .search-wrap input:focus { border-color:#2e7d32; }
        body.dark-theme .filter-btn { background:#2a2a2a; color:#bbb; border-color:#444; }
        body.dark-theme .filter-btn.f-active { background:#2e7d32; color:#fff; }
        body.dark-theme .mode-btn { background:#2a2a2a; color:#bbb; border-color:#444; }
        body.dark-theme .mode-btn.mode-active { background:#2e7d32; color:#fff; border-color:#2e7d32; }
        body.dark-theme #datePicker { background:#2a2a2a !important; color:#e0e0e0 !important; border-color:#444 !important; }

        /* Grid: cover background for all cells, including inline-styled ones */
        body.dark-theme table.live-table { background:#1f1f1f !important; color:#e0e0e0; border-color:#333 !important; }
        body.dark-theme table.live-table thead th { background:#2a2a2a !important; color:#ccc !important; border-bottom-color:#444 !important; }
        body.dark-theme table.live-table th i.ph,
        body.dark-theme table.live-table th i.ti,
        body.dark-theme table.live-table th i.bi { color:#bbb; }
        body.dark-theme table.live-table tbody tr { background:#1f1f1f; }
        body.dark-theme table.live-table tbody tr td { background:#1f1f1f !important; color:#e0e0e0 !important; border-bottom-color:#2a2a2a !important; }
        body.dark-theme table.live-table tbody tr:nth-child(even) td { background:#252525 !important; }
        body.dark-theme table.live-table tbody tr:hover td { background:#2c2c2c !important; }
        body.dark-theme table.live-table tr.row-finished td { background:#161616 !important; color:#888 !important; }
        body.dark-theme table.live-table tr.row-prematch td { background:#1a1a1a !important; color:#999 !important; }
        body.dark-theme table.live-table tr.watched-row td { background:#1d2e1d !important; }
        body.dark-theme table.live-table tr.watched-finished td { background:#161616 !important; color:#888 !important; }

        /* Make all dim-text vars work in dark mode (override CSS variables defined in Site.css) */
        body.dark-theme { --bg:#1f1f1f; --text:#e0e0e0; --text-dim:#999; --green-p1:#66bb6a; --red-p2:#ef5350; }
        body.dark-theme .league-name,
        body.dark-theme .team-name-h,
        body.dark-theme .team-name-a,
        body.dark-theme .team-names { color:#e0e0e0 !important; }
        body.dark-theme .min-td,
        body.dark-theme .min-td span { color:#e0e0e0; }
        body.dark-theme .pre-p1,
        body.dark-theme .pre-x,
        body.dark-theme .pre-p2,
        body.dark-theme .pre-tl,
        body.dark-theme .pre-to,
        body.dark-theme .pre-tu { color:#aaa; }
        body.dark-theme .form-td,
        body.dark-theme .form-td * { color:#e0e0e0; }
        body.dark-theme .gd-zero { color:#999; }
        body.dark-theme .hdk-td,
        body.dark-theme .sq-cell { color:#ccc; }
        body.dark-theme a { color:#7fb3ff; }
        body.dark-theme .sync-td a,
        body.dark-theme .sync-td span { color:#9ec5fe; }
        body.dark-theme .arb-popup,
        body.dark-theme .arb-hist-tbl { background:#222; border-color:#444; color:#e0e0e0; }
        body.dark-theme .arb-hist-tbl th { background:#2a2a2a; color:#aaa; border-bottom-color:#444; }
        body.dark-theme .arb-hist-tbl td { border-bottom-color:#333; }
        body.dark-theme .arb-hist-tbl tr:hover { background:#2a2a2a; }
        body.dark-theme .stat-popup,
        body.dark-theme .hdk-tooltip { background:#2a2a2a !important; color:#e0e0e0 !important; border-color:#444 !important; }
        body.dark-theme #pagingBar { color:#bbb; }
        body.dark-theme #pagingBar button { background:#2a2a2a; color:#e0e0e0; border:1px solid #444; }
        body.dark-theme .lang-btn,
        body.dark-theme .theme-btn { background:#2a2a2a; color:#e0e0e0; border-color:#444; }

        /* Lang/theme toolbar buttons */
        .lang-toggle, .theme-toggle-inline {
            display:inline-flex; align-items:center; gap:4px;
        }
        .lang-btn, .theme-btn {
            background:#fff; color:#333; border:1px solid #ccc; border-radius:4px;
            padding:5px 9px; font-size:11px; font-weight:600; cursor:pointer;
            transition: all 0.15s;
        }
        .lang-btn.active { background:#2e7d32; color:#fff; border-color:#2e7d32; }
        .lang-btn:hover { border-color:#2e7d32; }
        .theme-btn { padding:5px 9px; font-size:14px; line-height:1; }
        .theme-btn:hover { border-color:#2e7d32; }

        /* ================= MOBILE variant E (hybrid) ================= */
        /* На desktop: wrap = display:contents — вообще не влияет на layout (прозрачен для flexbox/table). На mobile: реальный блок с overflow. */
        .live-table-wrap { display: contents; }

        @media (max-width: 768px) {
            .live-table-wrap { display: block; position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
            /* fixed layout заставляет браузер уважать width у th. Требуется ЯВНАЯ width — с width:auto fixed игнорируется.
               Сумма всех 15 колонок ≈ 880px. Пользователь свайпает по горизонтали. */
            table.live-table { min-width: 880px !important; width: 880px !important; table-layout: fixed !important; }
            /* Разрешить перенос длинных команд; overflow обрезает вместо растяжения */
            table.live-table td { overflow: hidden; text-overflow: ellipsis; }
            .teams-block { overflow: hidden; }
            .teams-block > div, .teams-block .row, .teams-block span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

            /* Sticky thead не дружит с horizontal overflow на iOS Safari */
            table.live-table thead th { position: static; box-shadow: none; }

            /* Компактные шрифты/паддинги */
            table.live-table th, table.live-table td { padding: 3px 1px; font-size: 10px; }

            /* ВСЕ колонки — явные ширины. !important обязателен: inline-style на <th> + table-layout:fixed */
            /* Minute — компактно: уменьшенный бейдж без лишнего padding */
            table.live-table thead th:nth-child(1) { width: 26px !important; min-width: 0 !important; }       /* Minute */
            .minute-badge { padding: 1px 4px !important; font-size: 9px !important; border-radius: 7px !important; }
            table.live-table thead th:nth-child(2) { width: 86px !important; min-width: 0 !important; }       /* Line */
            table.live-table thead th[colspan="3"] { width: 170px !important; min-width: 0 !important; }      /* Teams (colspan=3) — места побольше под названия команд */
            .teams-block { min-width: 0 !important; max-width: 170px !important; font-size: 11px; }
            .team-name-h, .team-name-a { font-size: 11px !important; }
            table.live-table th[data-sort="Activity"]  { width: 34px !important; }
            table.live-table th[data-sort="Dominance"] { width: 44px !important; }
            table.live-table th[data-sort="Pwd"]       { width: 34px !important; }
            /* Star — последняя th */
            table.live-table thead th:last-child       { width: 26px !important; }
            /* Секундарные (overflow справа, доступны свайпом) */
            table.live-table th[data-i18n-title="hdr_stat_tt"]     { width: 90px !important; min-width: 0 !important; }
            table.live-table th#formSortHdr                         { width: 70px !important; }
            table.live-table th[data-i18n-title="hdr_handicap_tt"]  { width: 50px !important; }
            table.live-table th[data-sort="TotHit"]                 { width: 50px !important; }
            table.live-table th[data-sort="SquadDiff"]              { width: 42px !important; }
            table.live-table th[data-sort="Missing"]                { width: 32px !important; }
            table.live-table th[data-sort="ArbVolume"]              { width: 58px !important; }
            table.live-table th[data-sort="ArbDominance"]           { width: 62px !important; }

            /* Bars уменьшить */
            .pulse-wrap { width: 32px; height: 16px; min-width: 32px; }
            .pulse-lbl { font-size: 9px; line-height: 16px; }
            .dom-wrap { min-width: 40px; }
            .dom-thick-bar { height: 16px; }
            .dom-seg { font-size: 8px; }

            /* Секундарные 8: визуальная граница + светлый фон */
            table.live-table th.sec-col,
            table.live-table td.sec-col {
                background: #fafafa;
                font-size: 9px;
            }
            table.live-table th.sec-col:first-of-type,
            table.live-table td.sec-col:first-of-type {
                border-left: 2px solid #ffc107;
            }

            /* Fade + стрелка-подсказка на правом краю wrap */
            .live-table-wrap::before {
                content: '';
                position: absolute; top: 0; right: 0;
                width: 30px; height: 100%;
                background: linear-gradient(to right, transparent, rgba(255,255,255,0.85));
                pointer-events: none; z-index: 2;
                transition: opacity 0.3s;
            }
            .live-table-wrap::after {
                content: '\2192';
                position: absolute; top: 40px; right: 6px;
                background: #ffc107; color: #333;
                padding: 2px 8px; border-radius: 12px;
                font-size: 13px; font-weight: 700;
                pointer-events: none; z-index: 3;
                animation: mobile-scroll-hint 1.4s ease-in-out infinite;
            }
            .live-table-wrap.scrolled::before,
            .live-table-wrap.scrolled::after { opacity: 0; animation: none; }

            @keyframes mobile-scroll-hint {
                0%, 100% { opacity: 0.55; transform: translateX(0); }
                50%      { opacity: 1;    transform: translateX(-3px); }
            }

            /* Footer — viewport width, не шире таблицы */
            .footer-inner { padding: 10px 12px; font-size: 10px; gap: 8px; }

            /* Toolbar — на desktop 400px search + много кнопок, на mobile они создают horizontal scroll всей страницы */
            .toolbar { padding: 8px 10px !important; gap: 6px !important; }
            .toolbar-left, .toolbar-center, .toolbar-right { gap: 6px !important; flex-wrap: wrap !important; }
            .toolbar-center { flex: 1 1 100%; order: 3; }
            .search-wrap input { width: 100% !important; max-width: 100%; box-sizing: border-box; }
        }

        /* Dark theme: градиент fade перевернуть на тёмный */
        @media (max-width: 768px) {
            body.dark-theme .live-table-wrap::before {
                background: linear-gradient(to right, transparent, rgba(30,30,30,0.9));
            }
            body.dark-theme table.live-table th.sec-col,
            body.dark-theme table.live-table td.sec-col {
                background: #252525;
            }
        }
