.er-page-layout {
    --er-side-top: 88px;
    flex: 1 0 auto;
    min-width: 0;
}

.er-page-layout > main { min-width: 0; }

.er-side-panel {
    box-sizing: border-box;
    min-width: 0;
    background: #0b1828;
    border: 1px solid #25374d;
    border-radius: 8px;
    color: #e6edf7;
    font: 400 14px/1.4 system-ui, sans-serif;
}

.er-side-panel h2 {
    margin: 0;
    padding: 13px 14px 10px;
    color: #e9c88e;
    font: 700 12px/1.4 system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.er-side-panel :is(ul, li) { list-style: none; margin: 0; padding: 0; }
.er-side-panel li + li, .er-side-panel section { border-top: 1px solid #23344a; }

.er-side-panel a {
    display: block;
    color: inherit;
    text-decoration: none;
    padding: 9px 14px;
    overflow-wrap: anywhere;
}

.er-side-panel a:hover { background: #14263b; color: #f2d6a5; }
.er-side-panel a:focus-visible { outline: 2px solid #e9c88e; outline-offset: -3px; }

.er-side-panel :is(time, .er-side-match-detail, [data-match-message]) {
    color: #9cacbf;
    font-size: 11px;
}

.er-side-panel time { display: block; }
.er-side-news li a { display: flex; align-items: center; gap: 10px; }
.er-side-news li a > span { min-width: 0; }
.er-side-thumbnail {
    flex: 0 0 auto;
    width: 54px;
    height: 42px;
    object-fit: cover;
    border-radius: 4px;
    background: #14263b;
}

.er-side-matches li a { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.er-side-teams { display: grid; gap: 3px; min-width: 0; }
.er-side-team { display: flex; align-items: center; gap: 7px; }
.er-side-team-badge { display: grid; place-items: center; flex: 0 0 20px; height: 20px; }
.er-side-team-badge img { display: block; width: 20px; height: 20px; object-fit: contain; }
.er-side-match-detail { flex-shrink: 0; white-space: nowrap; }
.er-side-match-detail.er-side-live { color: #ff9395; }
.er-side-panel [data-match-message] { margin: 0; padding: 6px 14px 11px; }
.er-side-panel .er-side-more { border-top: 1px solid #23344a; color: #e9c88e; font-size: 12px; }
.er-side-panel [hidden] { display: none !important; }

@media (min-width: 1200px) {
    .er-side-news li a { gap: 8px; font-size: 13px; }
    .er-side-thumbnail { width: 42px; height: 34px; }
    .er-side-team { font-size: 13px; }
    html:has(.er-page-layout), body:has(.er-page-layout) { overflow-x: clip; }
    .er-page-layout {
        display: grid;
        grid-template-columns: clamp(185px, 15vw, 235px) minmax(0, 1fr) clamp(185px, 15vw, 235px);
        align-items: start;
        gap: 18px;
        width: min(1660px, calc(100% - 40px));
        margin-inline: auto;
        padding-bottom: 24px;
    }

    .er-page-layout > main { grid-area: 1 / 2; width: 100% !important; justify-self: center; }
    .er-side-news { grid-area: 1 / 1; }
    .er-side-matches { grid-area: 1 / 3; }
    .er-side-panel {
        position: sticky;
        top: var(--er-side-top);
        margin-top: 20px;
        max-height: calc(100dvh - var(--er-side-top) - 16px);
        overflow: auto;
    }
}

@media (max-width: 1199px) {
    .er-side-panel { width: min(700px, calc(100% - 32px)); margin: 16px auto; }
}
