/* PRE-LAUNCH: Roboto via Google Fonts CDN. TODO before launch: self-host Roboto
   and remove this @import (see data/logos/../ note / memory). */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;800;900&display=swap');

.rankit-embed {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}

.rankit-score-widget,
.rankit-frame {
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
}

.rankit-score-widget {
    background: linear-gradient(180deg, #1e50a8 0%, #17439a 55%, #123f8f 100%);
    max-height: 100vh;
    padding: 1.5rem 1.25rem 3rem;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}

.rankit-score-inner {
    max-width: 360px;
    margin: 0 auto;
}

/* Header / logo */
.rankit-score-header {
    text-align: center;
    padding: 1rem 0 2rem;
}
.rankit-score-header .rankit-logo-text {
    font-size: 1.6rem;
    letter-spacing: 8px;
    font-weight: 800;
}

/* Section date badge */
.rankit-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: #6b8f45;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.6rem;
}
.rankit-score-badge svg { width: 13px; height: 13px; }

/* Section headings */
.rankit-score-heading {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
}
.rankit-score-subheading {
    color: #7aa6e2;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0.15rem 0 0.9rem;
}
.rankit-score-section { margin-bottom: 2rem; }

/* Card */
.rankit-score-card {
    background: #ffffff;
    border: 1px solid #e5e9f1;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(20, 40, 90, 0.06);
}
.rankit-score-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.75rem 1.25rem;
}
.rankit-score-card-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 0.7rem 1rem;
    background: #f6f8fc;
    border-top: 1px solid #e5e9f1;
    color: #15294d;
    font-size: 24px;
    font-weight: 700;
    font-family: Roboto, Arial, Helvetica, sans-serif;
}
.rankit-score-card-footer span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #5b6a86;
    font-size: 0.78rem;
}
.rankit-score-card-footer svg { width: 13px; height: 13px; color: #1e50a8; }

/* Team block */
.rankit-score-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
}
.rankit-score-team-logo {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
    padding: 3px;
    box-sizing: border-box;
}
.rankit-score-team-name {
    color: #15294d;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

/* Center separator / score */
.rankit-score-vs {
    color: #15294d;
    font-size: 1.4rem;
    font-weight: 400;
    padding-bottom: 1.6rem; /* align with logos */
}
.rankit-score-result {
    color: #15294d;
    font-size: 1.7rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Player analysis card */
.rankit-score-player-body {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem 1.75rem;
    padding: 1rem 1.1rem 1.2rem;
}
.rankit-score-player-top {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    flex: 0 0 250px;
}
.rankit-score-player-headtext {
    flex: 1;
    min-width: 0;
}
.rankit-score-player-portrait {
    position: relative;
    width: 68px;
    height: 80px;
    flex-shrink: 0;
}
.rankit-score-player-img {
    width: 68px;
    height: 84px;
    border-radius: 10px;
    object-fit: cover;
    object-position: top center;
    flex-shrink: 0;
    background: #eef2f9;
    border: 1px solid #e5e9f1;
    box-shadow: 0 2px 6px rgba(20, 40, 90, 0.1);
}
.rankit-score-player-name {
    color: #15294d;
    font-size: 0.95rem;
    font-weight: 800;
}
.rankit-score-player-meta {
    color: #5b6a86;
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.5;
}

/* Player name line: jersey number badge + name */
.rankit-score-player-nameline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}
.rankit-jersey {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 0.35rem;
    border-radius: 7px;
    background: #0071a1;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    box-shadow: 0 1px 2px rgba(20, 40, 90, 0.25);
    flex-shrink: 0;
}

/* Position chip (abbreviation) + age */
.rankit-score-player-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.rankit-pos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    padding: 0.14rem 0.42rem;
    border-radius: 6px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.rankit-pos-badge--gk,
.rankit-pos-badge--def,
.rankit-pos-badge--mid,
.rankit-pos-badge--att { color: #1e50a8; background: #e6edfb; }
.rankit-score-player-age {
    color: #5b6a86;
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Per-player match stats: goals, assists, clean sheet */
.rankit-score-player-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.rankit-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    line-height: 1;
}
.rankit-stat svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}
.rankit-stat--goal {
    color: #1e50a8;
    background: #e6edfb;
}
.rankit-stat--assist {
    color: #8a5a00;
    background: #fdf1dc;
}
.rankit-stat--yellow-card {
    color: #806000;
    background: #fff8d6;
}
.rankit-stat--yellow-red-card {
    color: #985500;
    background: #fff0dd;
}
.rankit-stat--red-card {
    color: #b02a2a;
    background: #fde8e8;
}
.rankit-potm-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.48rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
}
.rankit-potm-badge--editorial {
    color: #755800;
    background: #ffe680;
    box-shadow: 0 0 0 1px #e4bf32 inset;
}
.rankit-potm-badge--reader {
    color: #fff;
    background: #1e50a8;
}
.rankit-player-portrait-honors {
    position: absolute;
    right: -5px;
    bottom: -5px;
    display: flex;
    align-items: center;
    gap: 2px;
}
.rankit-potm-marker {
    width: 21px;
    height: 21px;
    box-sizing: border-box;
    justify-content: center;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 0.65rem;
    box-shadow: 0 2px 5px rgba(20, 40, 90, 0.22);
}
.rankit-potm-showcase {
    margin: 0.85rem 0 1rem;
    padding: 0.85rem;
    border: 1px solid #e1e6ef;
    border-radius: 12px;
    background: linear-gradient(145deg, #fffdf3 0%, #f7faff 100%);
}
.rankit-potm-showcase-title {
    margin: 0 0 0.65rem;
    color: #15294d;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.45px;
    text-transform: uppercase;
}
.rankit-potm-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.65rem;
}
.rankit-potm-showcase-card {
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-areas: "image label" "image name" "image note";
    gap: 0.08rem 0.65rem;
    align-items: center;
    width: 100%;
    padding: 0.65rem;
    border: 1px solid #e1e6ef;
    border-radius: 10px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.rankit-potm-showcase-card:hover {
    transform: translateY(-1px);
    border-color: #b9cae8;
    box-shadow: 0 5px 14px rgba(20, 40, 90, 0.1);
}
.rankit-potm-showcase-card img {
    grid-area: image;
    width: 44px;
    height: 54px;
    border-radius: 10px;
    object-fit: cover;
    object-position: top center;
    background: #eef2fb;
}
.rankit-potm-showcase-label { grid-area: label; font-size: 0.58rem; font-weight: 900; text-transform: uppercase; }
.rankit-potm-showcase-label--editorial { color: #8a6500; }
.rankit-potm-showcase-label--reader { color: #1e50a8; }
.rankit-potm-showcase-name { grid-area: name; color: #15294d; font-size: 0.82rem; font-weight: 800; }
.rankit-potm-showcase-note { grid-area: note; color: #7a879f; font-size: 0.65rem; font-weight: 600; }
.rankit-stat--cleansheet {
    color: #1e7a3c;
    background: #e5f6ea;
}
.rankit-score-player-ratings {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    flex: 0 1 auto;
    min-width: 240px;
    margin-left: auto;
    padding-left: 0.1rem;
}
.rankit-score-notes {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.6rem 1.8rem;
}
.rankit-score-note {
    min-width: 60px;
}
.rankit-score-note--mine {
    padding: 0.3rem 0.6rem;
    background: #eef1f6;
    border: 1px solid #dde2ea;
    border-radius: 10px;
}
.rankit-score-note--mine .rankit-score-rating-label {
    color: #5b6a86;
}
.rankit-rating-action {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    width: max-content;
    max-width: 100%;
}
.rankit-rating-action .rankit-score-rating-label {
    width: 100%;
}
/* Narrow (embedded) widths: stack identity + ratings */
@media (max-width: 560px) {
    .rankit-score-player-top {
        flex-basis: 100%;
    }
    .rankit-score-player-ratings {
        flex-basis: auto;
        width: max-content;
        max-width: 100%;
        min-width: 0;
        margin-left: auto;
        align-items: flex-start;
    }
    .rankit-score-notes {
        justify-content: flex-start;
    }
    .rankit-rating-action {
        gap: 0.45rem;
    }
}
.rankit-score-rating-label {
    color: #5b6a86;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.rankit-score-rating-value {
    color: #15294d;
    font-size: 1.05rem;
    font-weight: 800;
    margin-top: 0.1rem;
}
.rankit-score-rating-sub {
    color: #6b7791;
    font-size: 0.66rem;
    margin-top: 0.1rem;
}
/* Note colours by grade level (German school scale 1..6) */
.rankit-score-rating-value.rankit-note--1 { color: #28a745; } /* sehr gut */
.rankit-score-rating-value.rankit-note--2 { color: #57b23f; } /* gut */
.rankit-score-rating-value.rankit-note--3 { color: #e0a800; } /* befriedigend */
.rankit-score-rating-value.rankit-note--4 { color: #fd7e14; } /* ausreichend */
.rankit-score-rating-value.rankit-note--5 { color: #dc3545; } /* mangelhaft/ungenÃƒÆ’Ã‚Â¼gend */
.rankit-header .rankit-header-content,
.rankit-score-header .rankit-header-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}
.rankit-header .rankit-burger-menu,
.rankit-score-header .rankit-burger-menu {
    justify-self: start;
    color: #fff;
    cursor: pointer;
}

.rankit-rating-button {
    background-color: #003399;
    color: #fff;
    border: none;
    padding: 0.45rem 0.7rem;
    border-radius: 0.4rem;
    font-size: 1rem;
    font-weight: 700;
    min-width: 2.4rem;
    min-height: 2.4rem;
}

.rankit-rating-button:disabled {
    opacity: 0.6;
    background-color: #666;
}

/* Rating button gradient from green (1) to red (6) */
.rankit-rating-button[data-rating="1"] {
    background-color: #28a745; /* Green */
}

.rankit-rating-button[data-rating="2"] {
    background-color: #6bc75e; /* Light green */
}

.rankit-rating-button[data-rating="3"] {
    background-color: #ffc107; /* Yellow */
}

.rankit-rating-button[data-rating="4"] {
    background-color: #fd7e14; /* Orange */
}

.rankit-rating-button[data-rating="5"] {
    background-color: #dc3545; /* Red-orange */
}

.rankit-rating-button[data-rating="6"] {
    background-color: #dc3545; /* Red */
}

/* Match Manager Styles */
body {
    background-color: #f8f9fa;
}

.mm-overview h1,
.hero h1 {
    text-align: center;
    color: #003399;
    font-size: 5rem;
    font-weight: bold;
    margin: 2rem 0;
}

.dropdown-container {
    text-align: center;
    margin-bottom: 2rem;
}

.dropdown-container label {
    color: #003399;
    font-weight: 600;
    margin-right: 0.5rem;
}

#match-select {
    padding: 0.5rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 0.25rem;
    background-color: #ffffff;
    color: #333;
    font-size: 1rem;
    min-width: 200px;
}

.teams-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.team-container {
    flex: 1;
    max-width: 500px;
    background-color: #ffffff;
    border-radius: 0.5rem;
    border: 1px solid #e0e0e0;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.team-container h2 {
    color: #003399;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
    border-bottom: 2px solid #003399;
    padding-bottom: 0.5rem;
}

.players-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #003399;
}

.player-picture {
    width: 50px;
    height: 75px;
    object-fit: cover;
    border: 3px solid #003399;
    border-radius: 0.25rem;
    background-color: #003399;
    flex-shrink: 0;
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.player-name {
    font-size: 1.125rem;
    font-weight: bold;
    color: #003399;
}

.player-number {
    font-size: 0.875rem;
    font-weight: 600;
    color: #003399;
}

.player-position {
    font-size: 0.875rem;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .teams-container {
        flex-direction: column;
    }

    .team-container {
        max-width: 100%;
    }
}
/* Match Data Table Styles */
.match-data-container {
    background-color: #ffffff;
    border-radius: 0.5rem;
    border: 1px solid #e0e0e0;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.match-data-title {
    color: #003399;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
    border-bottom: 2px solid #003399;
    padding-bottom: 0.5rem;
}

.match-data-table-wrapper {
    overflow-x: auto;
}

.match-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
}

.match-data-table thead th {
    background-color: #003399;
    color: #ffffff;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.match-data-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
}

.match-data-table tbody tr:hover {
    background-color: #f8f9fa;
}

.match-data-table tbody tr:last-child td {
    border-bottom: none;
}

#save-button {
    display: block;
    margin: 1.5rem auto 0;
    padding: 0.75rem 2rem;
    font-size: 1rem;
}


/* Goalscorers line under the scoreline */
.rankit-match-goals {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0.6rem 0 0.2rem;
    text-align: center;
}
.rankit-match-goals svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #1e50a8;
}
.rankit-match-goals-text {
    color: #15294d;
    font-size: 0.8rem;
    font-weight: 700;
}

.rankit-match-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0.3rem 0 0.9rem;
}
.rankit-match-details span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}
.rankit-match-details svg {
    display: inline-block;
    flex-shrink: 0;
}

/* Anmelde-Aufforderung */
.rankit-anmelde-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
    padding: 2rem 1.5rem;
}
.rankit-anmelde-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #0071a1;
    border: 1px solid #0071a1;
    margin-bottom: 0.4rem;
}
.rankit-anmelde-icon svg {
    width: 24px;
    height: 24px;
    color: #fff;
}
.rankit-anmelde-body .rankit-score-heading {
    color: #15294d;
}
.rankit-anmelde-body .rankit-score-subheading {
    color: #0071a1;
}
.rankit-anmelde-text {
    color: #5b6a86;
    font-size: 0.82rem;
    line-height: 1.5;
    margin: 0;
}
.rankit-anmelde-text strong { color: #15294d; }
.rankit-anmelde-button {
    margin-top: 0.8rem;
    background: #0071a1;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.6rem 1.6rem;
    border-radius: 8px;
    transition: background 0.2s ease;
}
.rankit-anmelde-button:hover { background: #005b81; }

.rankit-anmelde-actions {
    margin-top: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.rankit-anmelde-login,
.rankit-anmelde-register {
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}
.rankit-anmelde-login { color: #0071a1; }
.rankit-anmelde-login:hover { color: #005b81; }
.rankit-anmelde-register { color: #c0392b; }
.rankit-anmelde-register:hover { color: #96291d; }
.rankit-anmelde-actions-sep {
    color: #9aa6bd;
    font-size: 0.78rem;
}

/* Teaser overlay: shows a real (but locked) preview of the current match that
   fades into the login/register card, instead of hiding everything behind a
   flat lock screen - meant to improve login/registration conversion. */
.rankit-frame-body { position: relative; }
.rankit-main.rankit-teaser-locked {
    max-height: 260px;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
}
.rankit-anmelde-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 90px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 1.1rem 1.4rem;
    box-sizing: border-box;
}
.rankit-anmelde-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(238, 242, 248, 0) 0%, rgba(238, 242, 248, 0.85) 40%, #eef2f8 68%);
    pointer-events: none;
}
.rankit-anmelde-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 360px;
    background: #ffffff;
    border: 1px solid #e5e9f1;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(20, 40, 90, 0.18);
}
.rankit-anmelde-card .rankit-anmelde-body { padding: 1.5rem 1.25rem; }

/* ÃƒÆ’Ã…â€œbergang beim Umschalten zwischen Liste und Detailansicht */
.rankit-main,
.match-list-container {
    transition: opacity 0.42s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
}
.rankit-view-hidden {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
}

.match-item{
    cursor: pointer;
}

.rankit-nav-button {
    background: none;
    border: 1px solid currentColor;
    border-radius: 0.25rem;
    padding: 0.25rem 0.2rem;
    max-width: 75px;
    font-size: 0.8rem;
    color: inherit;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.rankit-nav-button:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}
.rankit-nav-button:active { transform: translateY(0); }

/* ===========================================================================
   Smooth & chill polish
   =========================================================================== */

/* Single widget frame: header + content + footer in one element */
.rankit-frame {
    width: 100%;
    max-width: none;
    margin: 1.5rem 0;
    box-sizing: border-box;
    container-type: inline-size;
    container-name: rankit-frame;
    background: #eef2f8;
    border: 1px solid #dde3ee;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(20, 40, 90, 0.12);
}
.rankit-frame--standalone {
    width: min(100%, 700px) !important;
    max-width: 700px !important;
    margin-left: auto;
    margin-right: auto;
}
.rankit-frame--standalone .rankit-score-player-body {
    column-gap: 1rem;
}
.rankit-frame--standalone .rankit-score-player-top {
    flex: 0 1 220px;
    min-width: 0;
}
.rankit-frame--standalone .rankit-score-player-ratings {
    flex: 0 0 270px;
    width: 270px;
    min-width: 0;
}
@media (max-width: 560px) {
    .rankit-frame--standalone .rankit-score-player-top {
        flex-basis: 100%;
    }
    .rankit-frame--standalone .rankit-score-player-ratings {
        flex: 0 1 auto;
        width: max-content;
        max-width: 100%;
    }
}
.rankit-frame-body {
    padding: 1rem 1.1rem 1.4rem;
}
.rankit-potm-showcase-card:disabled {
    opacity: 1;
    cursor: default;
}
/* In an embedded article the widget can be narrower than the browser window.
   Stack the rating area based on the actual frame width, so a wrapped block
   stays left-aligned instead of being pushed to the right by margin-left:auto. */
@container rankit-frame (max-width: 560px) {
    .rankit-score-player-top {
        flex-basis: 100%;
    }
    .rankit-score-player-ratings {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        margin-left: 0;
        padding-left: 0;
    }
    .rankit-score-notes {
        gap: 0.6rem 1.2rem;
    }
    .rankit-rating-action {
        width: 100%;
    }
}
/* On mobile the rounded frame corners read too close to the host page's
   own cards/nav - go edge-to-edge with square corners instead. */
@media (max-width: 640px) {
    .rankit-frame {
        border-radius: 0;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Keep the desktop widget slightly larger without making its responsive
   layout switch to the narrow one at regular article widths. */
@media (min-width: 641px) {
    .rankit-frame,
    .rankit-score-widget {
        zoom: 1.1;
    }
    .rankit-score-player-body {
        flex-wrap: nowrap;
        gap: 0.75rem;
    }
    .rankit-score-player-top {
        flex: 1 1 0;
        min-width: 0;
    }
    .rankit-score-player-ratings {
        flex: 0 0 330px;
        width: 330px;
        min-width: 0;
        margin-left: 0;
    }
    .rankit-score-notes {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 0.5rem;
    }
    .rankit-score-note {
        min-width: 74px;
    }
}

/* Desktop: on top of the general zoom, the reader-facing grade/note values,
   age labels and the Stimmen/Lesernote/Meine-Note row felt too small - bump
   just those font-sizes up a bit more (not buttons/badges). */
@media (min-width: 641px) {
    .rankit-score-rating-value { font-size: 1.2rem; }
    .rankit-history-note-val { font-size: 1rem; }
    .rankit-lb-note-val { font-size: 1.15rem; }
    .rankit-rank-compare-value { font-size: 1.25rem; }
    .rankit-stat-tile-value { font-size: 1.3rem; }
    .rankit-score-player-age,
    .rankit-profile-metatext {
        font-size: 0.82rem;
    }
    .rankit-score-rating-label { font-size: 0.78rem; }
    .rankit-score-rating-sub { font-size: 0.8rem; }
    .rankit-potm-showcase-title { font-size: 0.92rem; }
    .rankit-potm-showcase-label { font-size: 0.7rem; }
    .rankit-potm-showcase-name { font-size: 0.98rem; }
    .rankit-potm-showcase-note { font-size: 0.8rem; }
}

/* Fine header bar (inside the frame) */
.rankit-header {
    background: #0071a1;
    border-bottom: 1px solid rgba(98, 150, 255, 0.45);
    padding: 0.75rem 1.1rem;
}
.rankit-header .rankit-header-content {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    gap: 0.5rem;
}

/* Centered wordmark logo */
.rankit-logo {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
    user-select: none;
}
/* NW co-branding badge: small round icon shown next to the rankIt wordmark */
.rankit-nw-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}
.rankit-nw-badge svg { display: block; }
.rankit-logo-text {
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: #fff;
    line-height: 1;
}
.rankit-logo-accent { color: #7aa6e2; }
.rankit-header-spacer { justify-self: end; }

/* Burger menu: deliberately NOT a plain 3-line hamburger (that's the host
   page's own nav icon) - a labelled pill with 3 dots, so it reads clearly
   as rankIt's own menu control rather than a duplicate site nav. */
.rankit-header .rankit-burger-menu {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: auto;
    height: 34px;
    padding: 0 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.rankit-header .rankit-burger-menu:hover {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.55);
}
.rankit-header .rankit-burger-menu:active { transform: scale(0.94); }
.rankit-header .rankit-burger-menu:focus-visible {
    outline: none;
    border-color: #7aa6e2;
    box-shadow: 0 0 0 3px rgba(122, 166, 226, 0.4);
}
.rankit-burger-dots {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}
.rankit-burger-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}
.rankit-burger-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}
.rankit-header .rankit-burger-menu.is-open { background: rgba(255, 255, 255, 0.28); }
.rankit-header .rankit-burger-menu.is-open .rankit-burger-dots span:nth-child(1) { transform: translateX(1px) scale(0.8); }
.rankit-header .rankit-burger-menu.is-open .rankit-burger-dots span:nth-child(3) { transform: translateX(-1px) scale(0.8); }

/* Nav dropdown: Aktuelles Spiel / Alle Spiele / Top-Spieler */
.rankit-nav-wrap { position: relative; justify-self: start; }
.rankit-nav-menu[hidden] { display: none; }
.rankit-nav-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    min-width: 190px;
    background: #fff;
    border: 1px solid #e5e9f1;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(20, 40, 90, 0.22);
    padding: 0.35rem;
    animation: rankit-card-in 0.18s ease both;
}
.rankit-nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.6rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: #15294d;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}
.rankit-nav-item:hover { background: #eef2f9; }
.rankit-nav-item svg { width: 16px; height: 16px; color: #1e50a8; flex-shrink: 0; }

/* Match list styled as a clean menu panel */
.match-list-container {
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
    padding: 1rem 1.1rem 1.5rem;
}
.match-list-title {
    color: #15294d;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0.25rem 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid #dde3ee;
}
.match-list[hidden] { display: none; }
.match-list {
    /* Reset host-page ul/ol styling (e.g. article-content list rules for
       max-width/width/margin-left/list-style-type) that would otherwise
       leak in, since host pages can define arbitrary selectors we have
       no control over. */
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Liste / Kalender toggle above the match list */
.rankit-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}
.rankit-list-toggle {
    display: inline-flex;
    border: 1px solid #dde3ee;
    border-radius: 10px;
    overflow: hidden;
}
.rankit-list-toggle-btn {
    border: none;
    background: #fff;
    color: #5b6a86;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.45rem 1rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.rankit-list-toggle-btn + .rankit-list-toggle-btn { border-left: 1px solid #dde3ee; }
.rankit-list-toggle-btn.is-active { background: #1e50a8; color: #fff; }
.rankit-list-toggle-btn:hover:not(.is-active) { background: #eef2f9; }
.rankit-calendar-export {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #1e50a8;
    text-decoration: none;
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    background: #eef3ff;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}
.rankit-calendar-export[hidden] { display: none; }
.rankit-calendar-export:hover { background: #1e50a8; color: #fff; }
.rankit-calendar-export svg { width: 14px; height: 14px; }

/* Match calendar: one card per month with a Mon-Sun day grid */
.rankit-calendar[hidden] { display: none; }
.rankit-calendar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.rankit-calendar-month {
    background: #fff;
    border: 1px solid #e3e8f2;
    border-radius: 12px;
    padding: 0.9rem 0.9rem 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.rankit-calendar-month-title {
    color: #15294d;
    font-size: 0.9rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
}
.rankit-calendar-weekdays,
.rankit-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.rankit-calendar-weekdays {
    margin-bottom: 0.3rem;
}
.rankit-calendar-weekdays span {
    text-align: center;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #9aa5bd;
}
.rankit-calendar-cell {
    position: relative;
    min-height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    padding: 3px 2px;
    border-radius: 8px;
    background: #f7f9fc;
}
.rankit-calendar-cell--empty { background: transparent; }
.rankit-calendar-daynum {
    font-size: 0.62rem;
    font-weight: 600;
    color: #8794ac;
}
.rankit-calendar-cell--today .rankit-calendar-daynum {
    color: #1e50a8;
    font-weight: 800;
}
.rankit-calendar-cell--today {
    box-shadow: inset 0 0 0 1.5px #6296FF;
}
.rankit-calendar-cell--match {
    background: #eef3ff;
}
button.rankit-calendar-match.match-item {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    border: none;
    border-left: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.15s ease;
}
button.rankit-calendar-match.match-item:hover { transform: scale(1.12); }
.rankit-calendar-logo {
    width: 22px;
    height: 22px;
}
.rankit-calendar-ha {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    font-size: 0.55rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    margin-right: 3px;
}
.rankit-calendar-ha--home { background: #1e7a3c; }
.rankit-calendar-ha--away { background: #8a5a00; }
@media (max-width: 420px) {
    .rankit-calendar-cell { min-height: 34px; }
    .rankit-calendar-logo { width: 18px; height: 18px; }
    .rankit-calendar-ha { width: 12px; height: 12px; font-size: 0.5rem; margin-right: 2px; }
}
.match-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: #fff;
    border: 1px solid #e3e8f2;
    border-left: 4px solid #6296FF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.match-item:hover {
    background: #f5f8ff;
    border-left-color: #003399;
    box-shadow: 0 6px 16px rgba(0, 51, 153, 0.12);
}
.match-item .match-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    color: #003399;
    font-size: 0.9rem;
}
.match-item .match-teams .team-name {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}
.match-item .match-teams .team-home { justify-content: flex-start; }
.match-item .match-teams .team-away { justify-content: flex-end; }
.match-item .match-teams .team-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.match-item .match-score {
    flex-shrink: 0;
    min-width: 44px;
    text-align: center;
    background: #eef3ff;
    color: #003399;
    border: 1px solid #d3e0fb;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.15rem 0.55rem;
    border-radius: 8px;
    white-space: nowrap;
}
.match-item .match-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #55627d;
    font-size: 0.73rem;
    font-weight: 500;
}
.match-item .match-info .separator { opacity: 0.5; }
.match-item .match-info .time {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.match-item .match-info .time svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}
.match-matchday {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #6296FF;
}
.match-relative {
    margin-left: auto;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: #e6edfb;
    color: #1e50a8;
    font-size: 0.62rem;
    font-weight: 800;
}
.rankit-score-matchday {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #1e50a8;
    padding: 0.5rem 0.75rem 0;
}

/* ---------------------------------------------------------------------------
   Spielinfos card
   --------------------------------------------------------------------------- */
.rankit-match-info {
    background: #ffffff;
    border: 1px solid #e5e9f1;
    border-radius: 14px;
    padding: 1rem 1.1rem 1.1rem;
    margin-bottom: 1.1rem;
    box-shadow: 0 2px 8px rgba(20, 40, 90, 0.06);
}
.rankit-match-draft-notice {
    margin: 1rem 0;
    padding: 1rem 1.1rem;
    border: 1px solid #ead7a4;
    border-radius: 12px;
    background: #fff9e8;
    color: #765800;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}
.rankit-match-infohead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.rankit-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(1rem);
    z-index: 100;
    padding: 0.65rem 1.2rem;
    background: #15294d;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(20, 40, 90, 0.3);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}
.rankit-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.rankit-toast.is-hidden { opacity: 0; transform: translateX(-50%) translateY(1rem); }
.rankit-share-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 12px;
    background: #0071a1;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 12px rgba(30, 80, 168, 0.25);
}
.rankit-share-cta:hover { transform: translateY(-2px); filter: brightness(1.1); }
.rankit-share-cta svg { width: 20px; height: 20px; flex-shrink: 0; }
.rankit-match-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #1e50a8;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.rankit-match-label svg { width: 14px; height: 14px; }

/* Heim/AuswÃƒÆ’Ã‚Â¤rts badge */
.rankit-venue-badge,
.match-venue {
    flex-shrink: 0;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
}
.rankit-venue-badge--home,
.match-venue--home { color: #1e50a8; background: #e6edfb; }
.rankit-venue-badge--away,
.match-venue--away { color: #5a6b8a; background: #eceff5; }
.rankit-venue-badge--pokal,
.match-competition--pokal { color: #8a5a00; background: #fdf1dc; }

.rankit-match-scoreline {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}
.rankit-match-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}
.rankit-match-team {
    color: #15294d;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}
.rankit-match-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 0.3rem 0.7rem;
    background: #6296FF;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
}
.rankit-match-events {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.4rem;
    width: min(100%, 680px);
    margin: -0.15rem auto 0.85rem;
    padding: 0.7rem 0;
    border-top: 1px solid #edf0f5;
    border-bottom: 1px solid #edf0f5;
}
.rankit-match-events::before {
    content: "";
    position: absolute;
    top: 0.55rem;
    bottom: 0.55rem;
    left: 50%;
    width: 1px;
    background: #e7ebf2;
}
.rankit-match-events-side {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}
.rankit-match-events-side--home { align-items: flex-end; text-align: right; }
.rankit-match-events-side--away { align-items: flex-start; text-align: left; }
.rankit-match-event {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    max-width: 100%;
    color: #253653;
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1.25;
}
.rankit-match-event-icon { flex-shrink: 0; font-size: 0; line-height: 1; }
.rankit-match-event-icon::before { font-size: 0.78rem; }
.rankit-match-event--goal .rankit-match-event-icon::before { content: "\26BD"; }
.rankit-match-event--yellow-red .rankit-match-event-icon::before { content: "\1F7E8\1F7E5"; }
.rankit-match-event--red .rankit-match-event-icon::before { content: "\1F7E5"; }
.rankit-match-event-player {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rankit-match-event-minute { flex-shrink: 0; color: #1e50a8; font-weight: 850; }
.rankit-match-event--yellow-red .rankit-match-event-minute,
.rankit-match-event--red .rankit-match-event-minute { color: #a12a2a; }
.rankit-match-goals-text { font-size: 0; }
.rankit-match-goals-text::before { content: "\26BD\00A0"; font-size: 0.8rem; }
.rankit-match-goals-text .rankit-match-scorers { font-size: 0.8rem; }
@media (max-width: 480px) {
    .rankit-match-events { gap: 1rem; }
    .rankit-match-event { font-size: 0.67rem; }
}

/* ---------------------------------------------------------------------------
   Club logo slot (fixed area; image if present, else initials placeholder)
   --------------------------------------------------------------------------- */
.rankit-club-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    box-sizing: border-box;
}
.rankit-club-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0;
    box-sizing: border-box;
}
.rankit-club-logo-fallback {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #6b7a99;
    text-transform: uppercase;
}
.rankit-club-logo--lg {
    width: 46px;
    height: 46px;
}
.rankit-club-logo--lg .rankit-club-logo-fallback {
    font-size: 0.95rem;
    color: #123f8f;
}

.rankit-match-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1.2rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e9edf4;
}
.rankit-match-detail {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #4f5d78;
    font-size: 0.76rem;
    font-weight: 600;
}
.rankit-match-detail svg {
    width: 13px;
    height: 13px;
    color: #1e50a8;
    flex-shrink: 0;
}
.rankit-match-detail--relative {
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #e6edfb;
    color: #1e50a8;
    font-size: 0.7rem;
    font-weight: 800;
}

.rankit-match-note {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
    width: auto !important;
    margin: 0.9rem 0 0 !important;
    padding: 0.6rem 0.75rem !important;
    background: #eef3ff !important;
    border-left: 3px solid #1e50a8 !important;
    border-radius: 8px !important;
    color: #33456b !important;
    font-size: 0.74rem !important;
    line-height: 1.5 !important;
}
.rankit-match-note-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: #1e50a8;
}

/* "Meine Note" value gets a subtle accent so it stands out from the others */
.rankit-my-rating { color: #1e50a8; }

/* Score / player cards: gentle hover lift */
.rankit-score-card {
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}
.rankit-score-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(20, 40, 90, 0.14);
    border-color: #c2d2ef;
}

/* Staggered fade-in for player cards when a match is rendered */
.rankit-players-list .rankit-score-card {
    animation: rankit-card-in 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.rankit-players-list .rankit-score-card:nth-child(1) { animation-delay: 0.04s; }
.rankit-players-list .rankit-score-card:nth-child(2) { animation-delay: 0.10s; }
.rankit-players-list .rankit-score-card:nth-child(3) { animation-delay: 0.16s; }
.rankit-players-list .rankit-score-card:nth-child(4) { animation-delay: 0.22s; }
.rankit-players-list .rankit-score-card:nth-child(5) { animation-delay: 0.28s; }
.rankit-players-list .rankit-score-card:nth-child(6) { animation-delay: 0.34s; }
.rankit-players-list .rankit-score-card:nth-child(n+7) { animation-delay: 0.40s; }

@keyframes rankit-card-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Match info block gently fades in */
.rankit-match-info {
    animation: rankit-fade-in 0.45s ease both;
}
@keyframes rankit-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Rating buttons: springy hover / press */
.rankit-rating-button {
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.2s ease,
                box-shadow 0.2s ease,
                opacity 0.2s ease;
}
.rankit-rating-button:not(:disabled):hover {
    transform: translateY(-2px) scale(1.06);
    filter: brightness(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}
.rankit-rating-button:not(:disabled):active {
    transform: translateY(0) scale(0.96);
}

/* Reader rating value updates get a subtle pulse via .rankit-rating-value */
.rankit-rating-value {
    transition: color 0.3s ease, transform 0.3s ease;
}
.rankit-pulse {
    animation: rankit-pulse 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes rankit-pulse {
    0%   { transform: scale(1); color: #fff; }
    40%  { transform: scale(1.28); color: #9ec2ff; }
    100% { transform: scale(1); color: #fff; }
}

/* Confirmation flash on the rating button that was pressed */
.rankit-rating-button--picked {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.65);
    filter: brightness(1.2);
}

/* Match list items: smooth hover slide */
.match-item {
    /* Reset host-page list/paragraph styling (e.g. article-content li,p
       rules) that would otherwise leak in and distort this li, since host
       pages can define arbitrary selectors we have no control over. */
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    font-size: 1rem !important;
    line-height: normal !important;
    border-radius: 10px;
    padding: 0.7rem 0.85rem !important;
    margin: 0 !important;
    transition: background 0.25s ease,
                border-color 0.25s ease,
                box-shadow 0.25s ease,
                transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.match-item:hover {
    transform: translateX(4px);
}

/* Anmelde button: add a small lift on hover */
.rankit-anmelde-button {
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.rankit-anmelde-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Debug card: collapsible, muted, out of the way */
.rankit-debug-card {
    width: 100%;
    max-width: none;
    margin: 1.5rem 0 2rem;
    box-sizing: border-box;
    background: #0f1830;
    color: #cdd6ee;
    border: 1px solid #26375f;
    border-radius: 12px;
    overflow: hidden;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}
.rankit-debug-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: #9ec2ff;
    user-select: none;
    transition: background 0.2s ease;
}
.rankit-debug-summary::-webkit-details-marker { display: none; }
.rankit-debug-summary:hover { background: rgba(158, 194, 255, 0.08); }
.rankit-debug-summary svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #6296FF;
    transition: transform 0.3s ease;
}
.rankit-debug-card[open] .rankit-debug-summary svg { transform: rotate(15deg); }
.rankit-debug-summary::after {
    content: "ÃƒÂ¢Ã¢â‚¬â€œÃ‚Â¸";
    margin-left: auto;
    transition: transform 0.25s ease;
    color: #6b7aa0;
}
.rankit-debug-card[open] .rankit-debug-summary::after { transform: rotate(90deg); }
.rankit-debug-pre {
    margin: 0;
    padding: 1rem;
    max-height: 420px;
    overflow: auto;
    border-top: 1px solid #26375f;
    background: #0b1226;
    font-size: 0.72rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    color: #b8c4e4;
}

/* =========================================================
   Player detail profile
   ========================================================= */
.rankit-open-profile { cursor: pointer; border-radius: 10px; transition: background 0.15s ease; }
.rankit-open-profile:hover { background: rgba(30, 80, 168, 0.05); }
.rankit-open-profile:focus-visible { outline: 2px solid #1e50a8; outline-offset: 2px; }

.rankit-profile {
    padding: 0.75rem 0.9rem 1.25rem;
    animation: rankit-card-in 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.rankit-profile-empty {
    padding: 1.25rem;
    text-align: center;
    color: #6b7791;
    font-size: 0.85rem;
}
.rankit-profile-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #eef2f9;
    color: #1e50a8;
    border: 1px solid #dbe3f1;
    border-radius: 999px;
    padding: 0.4rem 0.85rem 0.4rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 0.9rem;
    transition: background 0.15s ease, transform 0.15s ease;
}
.rankit-profile-back:hover { background: #e2eafa; transform: translateX(-2px); }
.rankit-profile-back svg { width: 16px; height: 16px; }

/* Hero */
.rankit-profile-hero {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #16336b 0%, #1e50a8 100%);
    border-radius: 14px;
    color: #fff;
    margin-bottom: 1rem;
}
.rankit-profile-photo {
    width: 84px;
    height: 104px;
    object-fit: cover;
    object-position: top center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}
.rankit-profile-headtext { flex: 1; min-width: 0; }
.rankit-profile-nameline { display: flex; align-items: center; gap: 0.5rem; }
.rankit-profile-nameline .rankit-jersey {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: none;
}
.rankit-profile-name { margin: 0; font-size: 1.25rem; font-weight: 800; }
.rankit-profile-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.45rem;
}
.rankit-profile-tags .rankit-pos-badge { color: #16336b; background: #fff; }
.rankit-profile-metatext { font-size: 0.75rem; color: rgba(255, 255, 255, 0.85); font-weight: 600; }
.rankit-profile-badges { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.7rem; }
.rankit-profile-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.16);
    border: none;
    border-radius: 999px;
    padding: 0.28rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: inherit;
    white-space: nowrap;
    color: #fff;
}
.rankit-profile-pill--rank {
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}
.rankit-profile-pill--rank:hover { background: rgba(255, 255, 255, 0.28); transform: translateY(-1px); }
.rankit-profile-pill--neu { background: #28a745; color: #fff; }
.rankit-profile-pill svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
/* Stat tiles */
.rankit-profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.rankit-stat-tile {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.7rem 0.6rem;
    background: #fff;
    border: 1px solid #e5e9f1;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(20, 40, 90, 0.05);
}
.rankit-stat-tile-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #5b6a86;
}
.rankit-stat-tile-value { display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem; font-size: 1.15rem; font-weight: 800; color: #15294d; }
.rankit-stat-tile-value svg { width: 16px; height: 16px; flex-shrink: 0; }
.rankit-stat-tile-value.rankit-note--1 { color: #28a745; }
.rankit-stat-tile-value.rankit-note--2 { color: #57b23f; }
.rankit-stat-tile-value.rankit-note--3 { color: #e0a800; }
.rankit-stat-tile-value.rankit-note--4 { color: #fd7e14; }
.rankit-stat-tile-value.rankit-note--5 { color: #dc3545; }

/* Generic profile card */
.rankit-profile-card {
    background: #fff;
    border: 1px solid #e5e9f1;
    border-radius: 14px;
    padding: 0.9rem 1rem 1.1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(20, 40, 90, 0.06);
}
.rankit-profile-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.rankit-profile-card-title { margin: 0; font-size: 0.95rem; font-weight: 800; color: #15294d; }

/* Chart */
.rankit-chart-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.rankit-chart-series, .rankit-chart-range { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.rankit-chart-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    border: 1px solid #dbe3f1;
    background: #f4f7fc;
    color: #8794ac;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.rankit-chart-toggle::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--series-color, #888);
    opacity: 0.35;
}
.rankit-chart-toggle.is-active {
    background: #fff;
    color: #15294d;
    border-color: var(--series-color, #1e50a8);
    box-shadow: 0 1px 4px rgba(20, 40, 90, 0.1);
}
.rankit-chart-toggle.is-active::before { opacity: 1; }
.rankit-chart-range-btn {
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    border: 1px solid #dbe3f1;
    background: #f4f7fc;
    color: #8794ac;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.rankit-chart-range-btn.is-active { background: #1e50a8; color: #fff; border-color: #1e50a8; }
.rankit-chart { width: 100%; }
.rankit-chart-svg-holder { width: 100%; }
.rankit-chart-svg { width: 100%; height: auto; display: block; }
.rankit-chart-grid { stroke: #eef2f8; stroke-width: 1; }
.rankit-chart-axis { fill: #9aa6bd; font-size: 9px; font-weight: 700; }
.rankit-chart-axis--pokal { fill: #8a5a00; }

/* Ranking */
.rankit-rank-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.rankit-rank-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, #16336b 0%, #1e50a8 100%);
    border-radius: 12px;
    color: #fff;
    min-width: 96px;
}
.rankit-rank-num { font-size: 1.6rem; font-weight: 900; line-height: 1; }
.rankit-rank-sub { font-size: 0.62rem; font-weight: 600; opacity: 0.85; margin-top: 0.25rem; text-align: center; }
.rankit-rank-compare { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; }
.rankit-rank-compare-item { display: flex; flex-direction: column; gap: 0.15rem; }
.rankit-rank-compare-label { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: #5b6a86; }
.rankit-rank-compare-value { font-size: 1.1rem; font-weight: 800; color: #15294d; }
.rankit-rank-compare-value.rankit-note--1 { color: #28a745; }
.rankit-rank-compare-value.rankit-note--2 { color: #57b23f; }
.rankit-rank-compare-value.rankit-note--3 { color: #e0a800; }
.rankit-rank-compare-value.rankit-note--4 { color: #fd7e14; }
.rankit-rank-compare-value.rankit-note--5 { color: #dc3545; }
.rankit-diff--good { color: #28a745; }
.rankit-diff--bad { color: #dc3545; }

/* History legend - explains L/R/M once above the list */
.rankit-history-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eef2fb;
}
.rankit-history-legend-item { font-size: 0.68rem; font-weight: 700; color: #8794ac; }

/* History list */
.rankit-history { display: flex; flex-direction: column; gap: 0.4rem; }
.rankit-history-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.6rem;
    border: 1px solid #eef2f8;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.rankit-history-row:hover { background: #f6f9ff; border-color: #c2d2ef; transform: translateX(2px); }
.rankit-history-match { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.rankit-history-logo {
    width: 22px;
    height: 22px;
    margin-right: -0.15rem;
}
.rankit-history-logo .rankit-club-logo-fallback { font-size: 0.55rem; }
.rankit-history-st { font-size: 0.62rem; font-weight: 800; color: #8794ac; min-width: 34px; }
.rankit-history-opp { display: flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; font-weight: 700; color: #15294d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rankit-history-ha { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 4px; font-size: 0.58rem; font-weight: 800; color: #fff; flex-shrink: 0; }
.rankit-history-ha--home { background: #1e7a3c; }
.rankit-history-ha--away { background: #8a5a00; }
.rankit-history-res { font-size: 0.78rem; font-weight: 800; color: #5b6a86; }
.rankit-history-stats { display: flex; gap: 0.3rem; }
.rankit-history-stats .rankit-stat { font-size: 0.62rem; padding: 0.12rem 0.35rem; }
.rankit-history-notes { display: flex; gap: 0.55rem; }
.rankit-history-note { display: flex; flex-direction: column; align-items: center; gap: 0.05rem; }
.rankit-history-note-label { font-size: 0.55rem; font-weight: 700; color: #9aa6bd; }
.rankit-history-note-val { font-size: 0.85rem; font-weight: 800; color: #15294d; }
.rankit-history-note-val.rankit-note--1 { color: #28a745; }
.rankit-history-note-val.rankit-note--2 { color: #57b23f; }
.rankit-history-note-val.rankit-note--3 { color: #e0a800; }
.rankit-history-note-val.rankit-note--4 { color: #fd7e14; }
.rankit-history-note-val.rankit-note--5 { color: #dc3545; }

@media (max-width: 560px) {
    .rankit-profile-stats { grid-template-columns: repeat(2, 1fr); }
    .rankit-history-row { grid-template-columns: 1fr auto; }
    .rankit-history-stats { display: none; }
}

/* =========================================================
   Top-Spieler leaderboard
   ========================================================= */
.rankit-leaderboard {
    padding: 0.75rem 0.9rem 1.25rem;
    animation: rankit-card-in 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.rankit-leaderboard-head { margin-bottom: 0.75rem; }
.rankit-leaderboard-title { margin: 0; font-size: 1.15rem; font-weight: 800; color: #15294d; }
.rankit-leaderboard-sub { margin: 0.2rem 0 0; font-size: 0.78rem; color: #5b6a86; }

.rankit-leaderboard-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.9rem;
}
.rankit-lb-filter {
    padding: 0.32rem 0.75rem;
    border-radius: 999px;
    border: 1px solid #dbe3f1;
    background: #f4f7fc;
    color: #5b6a86;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.rankit-lb-filter.is-active { background: #1e50a8; color: #fff; border-color: #1e50a8; }
.rankit-lb-filter--neu { margin-left: 0.3rem; border-color: #bfe6cb; color: #1e7a3c; }
.rankit-lb-filter--neu.is-active { background: #28a745; color: #fff; border-color: #28a745; }
.rankit-neu-badge {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #1e7a3c;
    background: #e5f6ea;
    padding: 0.12rem 0.4rem;
    border-radius: 5px;
}

.rankit-leaderboard-sorts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
}
.rankit-lb-sort-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #8794ac;
    margin-right: 0.15rem;
}
.rankit-lb-sort {
    padding: 0.26rem 0.6rem;
    border-radius: 999px;
    border: 1px solid #dbe3f1;
    background: #f4f7fc;
    color: #5b6a86;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.rankit-lb-sort.is-active { background: #16336b; color: #fff; border-color: #16336b; }

.rankit-sun { display: inline-flex; gap: 0.3rem; }
.rankit-sun span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    padding: 0.1rem 0.4rem;
    border-radius: 5px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #fff;
}
.rankit-sun-s { background: #28a745; }
.rankit-sun-u { background: #8794ac; }
.rankit-sun-n { background: #dc3545; }

.rankit-lb-list { display: flex; flex-direction: column; gap: 0.55rem; }
.rankit-lb-row[hidden] { display: none; }
.rankit-lb-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: #fff;
    border: 1px solid #e5e9f1;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.rankit-lb-row:hover { background: #f6f9ff; border-color: #c2d2ef; transform: translateX(2px); }
.rankit-lb-rank {
    flex-shrink: 0;
    min-width: 30px;
    font-size: 0.95rem;
    font-weight: 900;
    color: #8794ac;
    text-align: center;
}
.rankit-lb-row:nth-child(1) .rankit-lb-rank { color: #d4af37; }
.rankit-lb-row:nth-child(2) .rankit-lb-rank { color: #a7a7ad; }
.rankit-lb-row:nth-child(3) .rankit-lb-rank { color: #b08d57; }
.rankit-lb-photo {
    width: 44px;
    height: 54px;
    border-radius: 10px;
    object-fit: cover;
    object-position: top center;
    flex-shrink: 0;
    background: #eef2f9;
    border: 1px solid #e5e9f1;
    box-shadow: 0 2px 6px rgba(20, 40, 90, 0.1);
}
.rankit-lb-info { flex: 1; min-width: 0; }
.rankit-lb-nameline { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.rankit-lb-name { font-size: 0.88rem; font-weight: 800; color: #15294d; }
.rankit-lb-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.3rem;
    font-size: 0.68rem;
    color: #8794ac;
    font-weight: 600;
}
.rankit-lb-stats .rankit-stat { font-size: 0.62rem; padding: 0.12rem 0.35rem; }
.rankit-lb-notes { display: flex; gap: 0.9rem; flex-shrink: 0; }
.rankit-lb-note { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; }
.rankit-lb-note-label { font-size: 0.58rem; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; color: #9aa6bd; }
.rankit-lb-note-val { font-size: 1rem; font-weight: 800; color: #15294d; }
.rankit-lb-note-val.rankit-note--1 { color: #28a745; }
.rankit-lb-note-val.rankit-note--2 { color: #57b23f; }
.rankit-lb-note-val.rankit-note--3 { color: #e0a800; }
.rankit-lb-note-val.rankit-note--4 { color: #fd7e14; }
.rankit-lb-note-val.rankit-note--5 { color: #dc3545; }

@media (max-width: 560px) {
    .rankit-lb-notes { gap: 0.6rem; }
    .rankit-lb-stats { display: none; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
