* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: #f5f5f5;
    color: #000;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

.app-container {
    max-width: min(100%, 620px);
    margin: 0 auto;
    padding: 32px 24px;
}

.year-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.year-tab {
    padding: 10px 24px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #666;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    outline: none;
}

.year-tab:hover {
    border-color: #333;
    color: #333;
}

.year-tab.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.social-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-tab-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

/* Цветные иконки соцсетей остаются видимыми на чёрном фоне активного таба */
.year-tab.active .social-tab-logo {
    filter: none;
}

.companies-section {
    width: 100%;
    background: #fff;
    border: 1px solid #e0e0e0;
}

.legend {
    padding: 14px 16px;
    font-size: 13px;
    color: #666;
    border-bottom: 1px solid #e0e0e0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.bookmakers-list {
    list-style: none;
}

.bookmaker-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.bookmakers-list--with-er .bookmaker-item {
    grid-template-columns: minmax(0, 1fr) auto auto;
    column-gap: 14px;
}

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

.bookmaker-item--head {
    background: #fafafa;
}

.bookmaker-head-title {
    font-size: 12px;
    color: #7a7a7a;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.bookmaker-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.bookmaker-logo-wrap {
    position: relative;
    flex: 0 0 37px;
    width: 37px;
    height: 37px;
    border-radius: 50%;
    background: #fff;
    overflow: hidden;
    flex-shrink: 0;
    isolation: isolate;
}

.bookmaker-logo-wrap--empty {
    background: #f0f0f0;
    border: 1px dashed #d8d8d8;
}

/* Увеличение + cover + круг: обрезаем типичные белые поля в файлах логотипов */
.bookmaker-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--bookmaker-logo-zoom, 115%);
    height: var(--bookmaker-logo-zoom, 115%);
    max-width: none;
    transform: translate(-50%, -50%);
    object-fit: cover;
    object-position: center;
}

.bookmaker-name {
    font-size: 16px;
    color: #000;
    font-weight: 600;
    min-width: 0;
}

.bookmaker-value {
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #000;
    text-align: right;
}

.bookmaker-value--head {
    font-size: 12px;
    color: #7a7a7a;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.bookmaker-value--er {
    min-width: 4.8em;
}

@media (max-width: 768px) {
    .app-container {
        padding: 20px 12px;
    }

    .year-tabs {
        gap: 8px;
        margin-bottom: 18px;
    }

    .year-tab {
        padding: 8px 16px;
        font-size: 14px;
    }

    .bookmaker-item {
        padding: 12px 14px;
    }

    .bookmakers-list--with-er .bookmaker-item {
        column-gap: 10px;
    }

    .bookmaker-name {
        font-size: 15px;
    }

    .bookmaker-value {
        font-size: 16px;
    }

    .bookmaker-value--head {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 16px 10px;
    }

    .year-tab {
        padding: 7px 14px;
        font-size: 13px;
    }

    .social-tab-logo {
        width: 22px;
        height: 22px;
    }

    .bookmaker-value--head {
        font-size: 12px;
    }
}
