.tvw-spiele {
    --tvw-bg: #1C1C1C;
    --tvw-card: #262626;
    --tvw-text: #fff;
    --tvw-muted: #b5b5b5;
    --tvw-accent: #C22937;
    color: var(--tvw-text);
    font-family: inherit;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* Theme-Stile für Listen, Überschriften und Links zurücksetzen */
.tvw-spiele ul,
.tvw-spiele li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tvw-spiele p {
    margin: 0;
    color: inherit;
}

.tvw-spiele h3 {
    margin: 0;
    padding: 0;
    color: var(--tvw-text);
    font-size: 1.1em;
    line-height: 1.3;
}

.tvw-spiele strong {
    color: var(--tvw-text);
    font-weight: 700;
}

.tvw-spiele .tvw-spiele__badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 3px;
    background: var(--tvw-accent);
    color: #fff;
    font-size: 0.85em;
    font-weight: 700;
}

.tvw-spiele .tvw-spiele__ort {
    color: var(--tvw-muted);
    font-size: 0.85em;
}

.tvw-spiele .tvw-spiele__ort--heim {
    color: var(--tvw-text);
    font-weight: 700;
}

.tvw-spiele .tvw-spiele__halle,
.tvw-spiele .tvw-spiele__hinweis,
.tvw-spiele .tvw-spiele__gegen {
    color: var(--tvw-muted);
    font-size: 0.9em;
}

.tvw-spiele .tvw-spiele__leer {
    padding: 16px;
    background: var(--tvw-card);
    border-left: 4px solid var(--tvw-accent);
}

/* Karten */
.tvw-spiele .tvw-spiele__karten {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 16px;
}

.tvw-spiele .tvw-spiele__karte {
    margin: 0;
    list-style: none;
    padding: 16px;
    background: var(--tvw-card);
    border-top: 4px solid var(--tvw-accent);
    border-radius: 4px;
}

.tvw-spiele .tvw-spiele__kopf {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.tvw-spiele__karte .tvw-spiele__zeit {
    margin-bottom: 8px;
    font-weight: 700;
}

.tvw-spiele__karte .tvw-spiele__team {
    display: block;
}

.tvw-spiele__karte .tvw-spiele__gegen {
    display: block;
    margin: 2px 0;
}

.tvw-spiele__karte .tvw-spiele__halle {
    margin-top: 8px;
}

.tvw-spiele__karte .tvw-spiele__hinweis {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #3a3a3a;
}

/* Wochenübersicht */
.tvw-spiele .tvw-spiele__seiten {
    display: flex;
    align-items: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    transition: height .25s ease;
}

/* Scrollbalken nur ausblenden, wenn das Skript Pfeile und Punkte anbietet */
.tvw-spiele[data-tvw-ready] .tvw-spiele__seiten {
    scrollbar-width: none;
}

.tvw-spiele[data-tvw-ready] .tvw-spiele__seiten::-webkit-scrollbar {
    display: none;
}

.tvw-spiele .tvw-spiele__seite {
    flex: 0 0 100%;
    min-width: 0;
    scroll-snap-align: start;
}

.tvw-spiele .tvw-spiele__stand {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 700;
}

.tvw-spiele .tvw-spiele__ergebnis {
    font-size: 1.5em;
    line-height: 1.1;
    white-space: nowrap;
}

.tvw-spiele .tvw-spiele__status--offen {
    color: var(--tvw-muted);
    font-size: 0.9em;
    font-weight: 400;
}

.tvw-spiele .tvw-spiele__steuerung {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.tvw-spiele .tvw-spiele__steuerung[hidden] {
    display: none;
}

.tvw-spiele .tvw-spiele__punkte {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.tvw-spiele button.tvw-spiele__pfeil,
.tvw-spiele button.tvw-spiele__punkt {
    min-width: 0;
    min-height: 0;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #fff;
    text-shadow: none;
    cursor: pointer;
}

.tvw-spiele button.tvw-spiele__pfeil {
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0 0 4px;
    border-radius: 3px;
    background: var(--tvw-accent);
    font-size: 28px;
    line-height: 1;
}

@media (hover: hover) {
    .tvw-spiele button.tvw-spiele__pfeil:hover {
        background: #fff;
        color: var(--tvw-bg);
    }
}

.tvw-spiele button.tvw-spiele__pfeil:disabled {
    background: var(--tvw-card);
    color: #777;
    cursor: default;
}

.tvw-spiele button.tvw-spiele__punkt {
    position: relative;
    width: 24px;
    height: 44px;
    padding: 0;
}

.tvw-spiele button.tvw-spiele__punkt::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: #666;
}

.tvw-spiele button.tvw-spiele__punkt[aria-current="true"]::before {
    background: #fff;
}

.tvw-spiele button:focus-visible,
.tvw-spiele .tvw-spiele__seiten:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .tvw-spiele .tvw-spiele__seiten {
        transition: none;
    }
}

/* Wochenübersicht mit Bild: links das Bild, rechts 2 x 3 Kacheln in Bildhöhe */
.tvw-spiele-bild {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.tvw-spiele-bild.tvw-spiele-bild--mit-bild {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}

/* Das Bild füllt die Zeile: mindestens 2:3, bei höheren Kacheln entsprechend höher zugeschnitten */
.tvw-spiele-bild .tvw-spiele-bild__foto {
    position: relative;
    margin: 0;
}

.tvw-spiele-bild .tvw-spiele-bild__foto::before {
    content: "";
    display: block;
    padding-top: 150%;
}

.tvw-spiele-bild .tvw-spiele-bild__foto img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    object-fit: cover;
    object-position: center top;
    border-radius: 4px;
}

.tvw-spiele-bild .tvw-spiele .tvw-spiele__seite {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tvw-spiele-bild .tvw-spiele .tvw-spiele__karte {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 14px;
    overflow: hidden;
}

.tvw-spiele-bild .tvw-spiele .tvw-spiele__kopf {
    margin-bottom: 6px;
}

.tvw-spiele-bild .tvw-spiele .tvw-spiele__stand {
    margin-bottom: 4px;
}

.tvw-spiele-bild .tvw-spiele__karte .tvw-spiele__team,
.tvw-spiele-bild .tvw-spiele__karte .tvw-spiele__gegen {
    display: inline;
}

.tvw-spiele-bild .tvw-spiele__karte .tvw-spiele__gegen {
    margin: 0 4px;
}

.tvw-spiele-bild .tvw-spiele__karte .tvw-spiele__halle {
    margin-top: 4px;
}

/* Neben dem Bild: Kacheln füllen die Bildhöhe, die Steuerung steht darunter */
.tvw-spiele-bild.tvw-spiele-bild--mit-bild.tvw-spiele-bild--steuerung {
    padding-bottom: 60px;
}

.tvw-spiele-bild--mit-bild .tvw-spiele-bild__spiele {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tvw-spiele-bild--mit-bild .tvw-spiele.tvw-spiele--woche {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.tvw-spiele-bild--mit-bild .tvw-spiele .tvw-spiele__seiten {
    flex: 1;
    min-height: 0;
    align-items: stretch;
}

.tvw-spiele-bild--mit-bild .tvw-spiele .tvw-spiele__seite {
    grid-template-rows: repeat(var(--tvw-zeilen, 3), minmax(0, 1fr));
    height: 100%;
}

.tvw-spiele-bild--mit-bild .tvw-spiele .tvw-spiele__steuerung {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    margin-top: 12px;
}

@media (max-width: 699px) {
    .tvw-spiele-bild.tvw-spiele-bild--mit-bild.tvw-spiele-bild--steuerung {
        padding-bottom: 0;
    }

    .tvw-spiele-bild.tvw-spiele-bild--mit-bild {
        grid-template-columns: minmax(0, 1fr);
    }

    .tvw-spiele-bild .tvw-spiele-bild__foto {
        display: none;
    }

    .tvw-spiele-bild .tvw-spiele .tvw-spiele__seiten {
        align-items: flex-start;
    }

    .tvw-spiele-bild .tvw-spiele .tvw-spiele__seite {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        height: auto;
    }

    .tvw-spiele-bild--mit-bild .tvw-spiele .tvw-spiele__steuerung {
        position: static;
        margin-top: 16px;
    }
}

/* Liste */
.tvw-spiele.tvw-spiele--liste {
    padding: 16px;
    background: var(--tvw-bg);
}

.tvw-spiele .tvw-spiele__tag + .tvw-spiele__tag {
    margin-top: 24px;
}

.tvw-spiele .tvw-spiele__datum {
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--tvw-accent);
}

.tvw-spiele .tvw-spiele__zeile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 16px;
    padding: 10px 12px;
    margin: 0 0 4px;
    list-style: none;
    background: var(--tvw-card);
    border-radius: 3px;
}

.tvw-spiele__zeile .tvw-spiele__zeit {
    min-width: 5.5em;
    font-weight: 700;
}

.tvw-spiele__zeile .tvw-spiele__paarung {
    flex: 1 1 240px;
}

.tvw-spiele__zeile .tvw-spiele__hinweis {
    flex-basis: 100%;
}

@media (max-width: 600px) {
    .tvw-spiele .tvw-spiele__zeile {
        flex-direction: column;
        align-items: flex-start;
    }

    .tvw-spiele__zeile .tvw-spiele__paarung {
        flex-basis: auto;
    }
}

/* Button */
.tvw-spiele .tvw-spiele__mehr {
    margin-top: 20px;
}

.tvw-spiele a.tvw-spiele__button {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 3px;
    background: var(--tvw-accent);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.tvw-spiele a.tvw-spiele__button:hover,
.tvw-spiele a.tvw-spiele__button:focus {
    background: #fff;
    color: var(--tvw-bg);
}

.tvw-spiele a.tvw-spiele__button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
