:root {
    --green-900: #0b332d;
    --green-800: #145246;
    --green-700: #206a5d;
    --green-500: #2f936f;
    --grass: #81b214;
    --sand: #f1f1e8;
    --paper: #fffdf3;
    --ink: #15211f;
    --muted: #62706c;
    --line: rgba(11, 51, 45, .14);
    --live: #a61f1f;
    --soon: #0a6846;
    --finished: #4d5653;
    --shadow: 0 18px 50px rgba(10, 38, 33, .16);
    --radius-xl: 28px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --site-header-height: 60px;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
    min-height: 100%;
    margin: 0;
    color: var(--ink);
    font-family: "Trebuchet MS", "Lucida Sans Unicode", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 245, 160, .55), transparent 34rem),
        linear-gradient(135deg, #7fb312 0%, #6ca111 36%, #17594e 100%);
}

a { color: inherit; }

img { max-width: 100%; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--site-header-height);
    padding: 0 16px;
    background: var(--green-900);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    letter-spacing: -.03em;
}

.brand img { border-radius: 9px; }

.page-shell {
    width: min(1320px, calc(100% - 24px));
    margin: 24px auto 48px;
}

h1, h2, p { margin-top: 0; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

h1 {
    margin-bottom: 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 6vw, 4.8rem);
    line-height: .95;
    letter-spacing: -.07em;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 22px;
    align-items: start;
}

.match-content { min-width: 0; }

.date-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,.72);
    box-shadow: 0 10px 26px rgba(10, 38, 33, .08);
}

.date-button,
.date-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 42px;
    border-radius: 999px;
    font-weight: 900;
    text-decoration: none;
}

.date-button {
    min-width: 132px;
    padding: 8px 14px;
    background: var(--green-700);
    color: #fff;
}

.date-button::before,
.date-button::after {
    content: "";
    width: .48rem;
    height: .48rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    flex: 0 0 auto;
}

.date-button::before,
.date-button--next::before,
.date-button--prev::after { display: none; }

.date-button--prev::before {
    display: block;
    transform: rotate(135deg);
}

.date-button--next::after {
    display: block;
    transform: rotate(-45deg);
}

.date-button.is-disabled {
    background: rgba(98, 112, 108, .24);
    color: rgba(21, 33, 31, .52);
}

.date-current {
    padding: 8px 12px;
    color: var(--green-900);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.competition-card {
    overflow: clip;
    margin-bottom: 18px;
    border: 1px solid rgba(255,255,255,.52);
    border-radius: var(--radius-xl);
    background: var(--paper);
    box-shadow: var(--shadow);
    animation: reveal .28s ease both;
}

.competition-head {
    position: sticky;
    top: var(--site-header-height);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    background: linear-gradient(90deg, var(--green-800), var(--green-700));
    color: #fff;
}

.competition-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.competition-title img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255,255,255,.9);
    padding: 2px;
}

.competition-title h2 {
    margin: 0;
    font-size: clamp(.98rem, 2vw, 1.18rem);
    line-height: 1.1;
}

.competition-head span {
    flex: 0 0 auto;
    color: rgba(255,255,255,.78);
    font-size: .86rem;
    font-weight: 800;
}

.match-list { display: grid; }

.match-row {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) minmax(112px, auto);
    gap: 12px;
    align-items: center;
    min-height: 78px;
    padding: 10px 14px;
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.68);
}

.match-row--no-diffusers {
    grid-template-columns: 78px minmax(0, 1fr);
}

.match-row:first-child { border-top: 0; }
.match-row--soon .match-time { background: rgba(31,143,95,.12); color: var(--soon); }
.match-row--live .match-time { background: rgba(209,45,45,.12); color: var(--live); }
.match-row--finished .match-time { background: rgba(102,112,109,.14); color: var(--finished); }

.match-time {
    display: grid;
    place-items: center;
    min-height: 58px;
    border-radius: var(--radius-md);
    font-weight: 950;
}

.match-time small {
    color: currentColor;
    font-size: .72rem;
    font-weight: 900;
    line-height: 1;
    opacity: .78;
}

.match-time strong {
    margin-top: 2px;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--live);
    color: #fff;
    font-size: .66rem;
    letter-spacing: .08em;
}

.match-main { min-width: 0; }

.team-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 2px 0;
    font-weight: 850;
}

.team-line img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex: 0 0 auto;
}

.team-line span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score {
    min-width: 28px;
    padding: 3px 6px;
    border-radius: 8px;
    background: var(--green-900);
    color: #fff;
    text-align: center;
    font-size: .86rem;
}

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

.broadcast-line > img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex: 0 0 auto;
}

.broadcast-line div { min-width: 0; }
.broadcast-line strong,
.broadcast-line span,
.broadcast-line small { display: block; }
.broadcast-line strong { font-weight: 900; }
.broadcast-line span,
.broadcast-line small { color: var(--muted); }

.diffusers {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.diffusers:empty { display: none; }

.diffusers a,
.diffusers span {
    display: inline-grid;
    place-items: center;
    width: 58px;
    height: 38px;
    border: 1px solid rgba(11, 51, 45, .12);
    border-radius: 10px;
    background: #fff;
}

.diffusers img {
    width: 52px;
    height: 30px;
    object-fit: contain;
}

.side-panel {
    position: sticky;
    top: 86px;
    display: grid;
    gap: 14px;
}

.panel-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,.48);
    border-radius: var(--radius-xl);
    background: rgba(255,255,255,.84);
    box-shadow: 0 12px 30px rgba(10, 38, 33, .12);
}

.panel-card--soft { background: rgba(241,241,232,.88); }

.panel-card h2 {
    margin-bottom: 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    letter-spacing: -.04em;
}

.panel-card p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.45;
}

.sport-picker,
.date-picker {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-weight: 800;
}

.empty-state {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
    padding: 26px;
    border: 1px solid rgba(255,255,255,.52);
    border-radius: var(--radius-xl);
    background: rgba(255,255,255,.86);
    box-shadow: var(--shadow);
}

.empty-state strong { font-size: 1.25rem; }
.empty-state span { color: var(--muted); }

@keyframes reveal {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
    .content-grid { grid-template-columns: 1fr; }

    .side-panel {
        position: static;
    }
}

@media (max-width: 680px) {
    .page-shell { width: min(100% - 12px, 1320px); margin-top: 8px; }

    .date-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 10px;
        padding: 8px;
        border-radius: 18px;
    }

    .date-current {
        grid-column: 1 / -1;
        grid-row: 1;
        min-height: 30px;
        padding: 2px 8px;
        font-size: .9rem;
    }

    .date-button {
        min-width: 0;
        min-height: 38px;
        padding: 7px 10px;
        font-size: .9rem;
    }

    .competition-head {
        top: var(--site-header-height);
        align-items: center;
        padding: 7px 10px;
    }

    .competition-head span { display: none; }

    .match-row {
        grid-template-columns: 64px minmax(0, 1fr) minmax(86px, 28vw);
        gap: 8px;
        align-items: center;
        padding: 10px;
    }

    .match-row--no-diffusers {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .match-time { min-height: 54px; }

    .diffusers {
        min-width: 0;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .diffusers a,
    .diffusers span {
        flex: 0 0 auto;
    }
}
