
:root{
    --rsc-primary: var(--wp--preset--color--primary, #7ac70c);
    --rsc-secondary: var(--wp--preset--color--secondary, #111827);
    --rsc-dark: var(--wp--preset--color--contrast, #121826);
    --rsc-light: var(--wp--preset--color--base, #ffffff);
    --rsc-text:#111827;
    --rsc-muted:#64748b;
    --rsc-border:#e5e7eb;
}
.rsc-dashboard,
.rsc-dashboard *{
    box-sizing:border-box;
}
.rsc-hero,.rsc-card{
    background:#ffffff;
    color:var(--rsc-text);
    border-radius:22px;
    padding:26px;
    margin:22px 0;
    box-shadow:0 14px 38px rgba(15,23,42,.12);
    border:1px solid rgba(122,199,12,.18);
}
.rsc-hero{
    border-top:6px solid var(--rsc-primary);
}
.rsc-hero h2,.rsc-card h2{
    margin:0 0 6px;
    font-size:30px;
    line-height:1.15;
    color:var(--rsc-secondary);
}
.rsc-card h3{
    color:var(--rsc-secondary);
    margin:24px 0 10px;
}
.rsc-muted{
    color:var(--rsc-muted);
}
.rsc-notice{
    background:#f0fdf4;
    color:#166534;
    border-left:5px solid var(--rsc-primary);
    padding:14px 18px;
    border-radius:12px;
    margin:15px 0;
}
.rsc-grid-2,.rsc-grid-3,.rsc-stats{
    display:grid;
    gap:14px;
}
.rsc-grid-2{
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
}
.rsc-grid-3,.rsc-stats{
    grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
}
.rsc-stats{
    margin-top:16px;
}
.rsc-stats>div{
    background:#f7fee7;
    border:1px solid rgba(122,199,12,.28);
    padding:18px;
    border-radius:18px;
}
.rsc-stats strong{
    display:block;
    font-size:28px;
    color:var(--rsc-secondary);
}
.rsc-stats span{
    color:var(--rsc-muted);
}
.rsc-form label,.rsc-card label{
    display:block;
    margin:12px 0;
    font-weight:700;
}
.rsc-form input,.rsc-form textarea,.rsc-card input{
    width:100%;
    box-sizing:border-box;
    margin-top:6px;
    padding:12px;
    border-radius:12px;
    border:1px solid #d1d5db;
    background:#fff;
    color:#111827;
}
.rsc-btn,.rsc-link-btn{
    border:0;
    border-radius:999px;
    padding:12px 20px;
    font-weight:800;
    cursor:pointer;
    background:var(--rsc-primary);
    color:#fff;
}
.rsc-btn:hover,.rsc-link-btn:hover{
    filter:brightness(.94);
}
.rsc-link-btn{
    margin-top:10px;
}
.rsc-btn-light{
    background:var(--rsc-secondary);
    color:#fff;
}
.rsc-tabs{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin:20px 0;
    padding:10px;
    background:#f8fafc;
    border:1px solid var(--rsc-border);
    border-radius:18px;
}
.rsc-tab{
    border:0;
    background:#ffffff;
    color:var(--rsc-secondary);
    border-radius:999px;
    padding:11px 16px;
    font-weight:800;
    cursor:pointer;
    box-shadow:0 2px 8px rgba(15,23,42,.08);
}
.rsc-tab.is-active{
    background:var(--rsc-primary);
    color:#ffffff;
}
.rsc-tab-panel{
    display:none;
}
.rsc-tab-panel.is-active{
    display:block;
}
.rsc-table-wrap{
    width:100%;
    overflow:visible;
    margin-bottom:28px;
}
.rsc-table{
    width:100%;
    table-layout:fixed;
    border-collapse:separate;
    border-spacing:0;
    margin:14px 0 6px;
    overflow:hidden;
    border-radius:16px;
    background:#fff;
    color:#111827;
    border:1px solid var(--rsc-border);
}
.rsc-table th,.rsc-table td{
    padding:12px 10px;
    border-bottom:1px solid var(--rsc-border);
    text-align:left;
    vertical-align:middle;
    color:#111827 !important;
    line-height:1.3;
    font-size:14px;
}
.rsc-table th{
    background:var(--rsc-primary);
    color:#fff !important;
    font-weight:900;
}
.rsc-table tr:nth-child(even) td{
    background:#fafafa;
}
.rsc-table tr:last-child td{
    border-bottom:0;
}
.rsc-table th:nth-child(1),.rsc-table td:nth-child(1){width:42px}
.rsc-table th:nth-child(2),.rsc-table td:nth-child(2){width:19%}
.rsc-table th:nth-child(3),.rsc-table td:nth-child(3){width:13%}
.rsc-table th:nth-child(4),.rsc-table td:nth-child(4){width:62px}
.rsc-table th:nth-child(5),.rsc-table td:nth-child(5){width:18%}
.rsc-table th:nth-child(6),.rsc-table td:nth-child(6){width:17%}
.rsc-table th:nth-child(7),.rsc-table td:nth-child(7){width:19%}
.rsc-rank{
    font-weight:900;
    font-size:17px;
}
.rsc-player,.rsc-value,.rsc-badge-cell{
    font-weight:800;
}
.rsc-badge-cell{
    font-size:13px;
}
.rsc-motivation-cell{
    font-size:13px;
    color:#334155 !important;
}
.rsc-progress-wrap{
    width:100%;
    min-width:0;
    background:#e5e7eb;
    border-radius:999px;
    overflow:hidden;
}
.rsc-progress{
    min-width:34px;
    background:linear-gradient(90deg,var(--rsc-primary),#22c55e);
    color:#fff !important;
    padding:6px 8px;
    text-align:center;
    font-weight:900;
    white-space:nowrap;
    font-size:12px;
}
.rsc-compliment{
    background:#f7fee7;
    border:1px solid rgba(122,199,12,.38);
    border-radius:16px;
    padding:14px;
    font-weight:800;
    color:#365314;
}
.rsc-auth{
    display:flex;
    gap:20px;
    align-items:center;
    justify-content:space-between;
}
@media(max-width:900px){
    .rsc-hero,.rsc-card{
        padding:18px;
        border-radius:18px;
    }
    .rsc-hero h2,.rsc-card h2{
        font-size:25px;
    }
    .rsc-tabs{
        display:grid;
        grid-template-columns:1fr 1fr;
    }
    .rsc-tab{
        width:100%;
    }
    .rsc-table,
    .rsc-table thead,
    .rsc-table tbody,
    .rsc-table th,
    .rsc-table td,
    .rsc-table tr{
        display:block;
        width:100% !important;
    }
    .rsc-table{
        border:0;
        background:transparent;
    }
    .rsc-table thead{
        display:none;
    }
    .rsc-table tr{
        background:#fff;
        border:1px solid var(--rsc-border);
        border-radius:16px;
        margin:0 0 14px;
        overflow:hidden;
        box-shadow:0 8px 20px rgba(15,23,42,.08);
    }
    .rsc-table td{
        display:grid;
        grid-template-columns:115px 1fr;
        gap:12px;
        padding:10px 12px;
        font-size:14px;
        border-bottom:1px solid #eef2f7;
    }
    .rsc-table td:nth-child(1)::before{content:"Platz";font-weight:900;color:var(--rsc-secondary)}
    .rsc-table td:nth-child(2)::before{content:"Spieler";font-weight:900;color:var(--rsc-secondary)}
    .rsc-table td:nth-child(3)::before{content:"Wert";font-weight:900;color:var(--rsc-secondary)}
    .rsc-table td:nth-child(4)::before{content:"Läufe";font-weight:900;color:var(--rsc-secondary)}
    .rsc-table td:nth-child(5)::before{content:"Fortschritt";font-weight:900;color:var(--rsc-secondary)}
    .rsc-table td:nth-child(6)::before{content:"Badge";font-weight:900;color:var(--rsc-secondary)}
    .rsc-table td:nth-child(7)::before{content:"Motivation";font-weight:900;color:var(--rsc-secondary)}
}
@media(max-width:520px){
    .rsc-tabs{
        grid-template-columns:1fr;
    }
    .rsc-grid-3,.rsc-stats{
        grid-template-columns:1fr;
    }
}


/* Info box */
.rsc-info-box{
    display:flex;
    gap:16px;
    position:relative;
    background:#f7fee7;
    border:1px solid rgba(122,199,12,.35);
    border-left:7px solid var(--rsc-primary);
    color:#111827;
    border-radius:20px;
    padding:20px 52px 20px 20px;
    margin:20px 0;
    box-shadow:0 12px 30px rgba(15,23,42,.10);
    animation:rscInfoIn .35s ease;
}
.rsc-info-box.is-hiding{
    opacity:0;
    transform:translateY(-8px);
    transition:opacity .4s ease, transform .4s ease;
}
.rsc-info-icon{
    width:46px;
    height:46px;
    min-width:46px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#ffffff;
    border-radius:999px;
    font-size:24px;
    box-shadow:0 6px 18px rgba(15,23,42,.10);
}
.rsc-info-content h3{
    margin:0 0 6px;
    color:var(--rsc-secondary);
    font-size:22px;
}
.rsc-info-content p{
    margin:6px 0;
    color:#374151;
}
.rsc-info-steps{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
    gap:8px;
    margin-top:12px;
}
.rsc-info-steps span{
    background:#ffffff;
    border:1px solid #e5e7eb;
    border-radius:999px;
    padding:9px 12px;
    font-weight:800;
    font-size:13px;
    color:#365314;
}
.rsc-info-small{
    font-size:13px;
    opacity:.75;
}
.rsc-info-close{
    position:absolute;
    top:14px;
    right:14px;
    width:32px;
    height:32px;
    border:0;
    border-radius:999px;
    background:var(--rsc-secondary);
    color:#ffffff;
    font-size:22px;
    line-height:1;
    cursor:pointer;
}
.rsc-info-close:hover{
    background:var(--rsc-primary);
}
@keyframes rscInfoIn{
    from{opacity:0;transform:translateY(-8px)}
    to{opacity:1;transform:translateY(0)}
}
@media(max-width:700px){
    .rsc-info-box{
        display:block;
        padding:18px 48px 18px 18px;
    }
    .rsc-info-icon{
        margin-bottom:10px;
    }
    .rsc-info-steps{
        grid-template-columns:1fr;
    }
}


/* V2 additions */
.rsc-feed{
    display:grid;
    gap:14px;
}
.rsc-feed-item{
    background:#f8fafc;
    border:1px solid #e5e7eb;
    border-radius:18px;
    padding:16px;
}
.rsc-feed-head{
    display:flex;
    justify-content:space-between;
    gap:12px;
    color:#111827;
}
.rsc-feed-head strong{
    font-size:18px;
}
.rsc-feed-head span{
    color:#64748b;
}
.rsc-feed-stats{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:12px 0;
}
.rsc-feed-stats span{
    background:#ffffff;
    border:1px solid #e5e7eb;
    border-radius:999px;
    padding:8px 11px;
    font-weight:800;
}
.rsc-feed-motivation{
    color:#365314;
    font-weight:800;
    margin:8px 0;
}
.rsc-feed-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:center;
}
.rsc-mini-btn{
    border:0;
    border-radius:999px;
    padding:8px 12px;
    background:var(--rsc-primary);
    color:#ffffff;
    font-weight:900;
    cursor:pointer;
}
.rsc-comment-form{
    display:flex;
    gap:8px;
    margin-top:10px;
}
.rsc-comment-form input{
    flex:1;
    border:1px solid #d1d5db;
    border-radius:999px;
    padding:10px 12px;
}
.rsc-level-card{
    display:flex;
    gap:14px;
    align-items:center;
    background:#f7fee7;
    border:1px solid rgba(122,199,12,.32);
    border-radius:18px;
    padding:16px;
    margin:14px 0;
}
.rsc-level-icon{
    width:52px;
    height:52px;
    border-radius:999px;
    background:#ffffff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:28px;
    box-shadow:0 8px 20px rgba(15,23,42,.08);
}
.rsc-level-card strong{
    display:block;
    color:#111827;
    font-size:20px;
}
.rsc-level-card span{
    color:#64748b;
}
.rsc-badge-grid,.rsc-fame-grid,.rsc-team-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
    gap:14px;
}
.rsc-achievement,.rsc-fame-grid>div,.rsc-team-card{
    background:#ffffff;
    border:1px solid #e5e7eb;
    border-radius:18px;
    padding:16px;
    box-shadow:0 8px 18px rgba(15,23,42,.06);
}
.rsc-achievement>div{
    font-size:34px;
}
.rsc-achievement strong,.rsc-fame-grid strong,.rsc-team-card strong{
    display:block;
    color:#111827;
    font-size:18px;
    margin:4px 0;
}
.rsc-achievement span,.rsc-fame-grid span,.rsc-fame-grid em,.rsc-team-card span,.rsc-team-card small{
    display:block;
    color:#64748b;
    font-style:normal;
}
.rsc-fame-grid>div{
    border-top:5px solid var(--rsc-primary);
}
.rsc-fame-grid span{
    font-weight:900;
    color:#365314;
}
.rsc-team-card{
    background:#f8fafc;
}
.rsc-team-card span{
    font-size:24px;
    font-weight:900;
    color:#111827;
}
.rsc-chart{
    display:flex;
    align-items:end;
    gap:10px;
    min-height:190px;
    padding:18px 8px 8px;
    overflow-x:auto;
}
.rsc-chart-bar{
    min-width:54px;
    text-align:center;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-end;
    gap:6px;
}
.rsc-chart-fill{
    width:34px;
    border-radius:999px 999px 4px 4px;
    background:linear-gradient(180deg,var(--rsc-primary),#22c55e);
}
.rsc-chart-bar strong{
    font-size:12px;
    color:#111827;
}
.rsc-chart-bar span{
    font-size:11px;
    color:#64748b;
}
@media(max-width:700px){
    .rsc-comment-form{
        display:block;
    }
    .rsc-comment-form input{
        width:100%;
        margin-bottom:8px;
    }
    .rsc-feed-head{
        display:block;
    }
}


/* V2.1 Admin + Anti-Cheat */
.rsc-warning{
    background:#fff7ed;
    border:1px solid #fed7aa;
    color:#9a3412;
    border-radius:12px;
    padding:10px 12px;
    font-weight:800;
}
.rsc-admin-stats{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
    gap:14px;
    margin:20px 0;
}
.rsc-admin-stats>div{
    background:#ffffff;
    border:1px solid #dcdcde;
    border-left:5px solid #7ac70c;
    border-radius:12px;
    padding:16px;
}
.rsc-admin-stats strong{
    display:block;
    font-size:28px;
}
.rsc-admin-stats span{
    color:#646970;
}
.rsc-admin-form{
    display:flex;
    gap:10px;
    align-items:center;
    margin:12px 0 20px;
}
.rsc-admin-form input{
    min-width:320px;
    padding:7px 10px;
}
.rsc-admin-pill{
    display:inline-block;
    background:#f0fdf4;
    color:#166534;
    border:1px solid #bbf7d0;
    border-radius:999px;
    padding:5px 10px;
    margin:3px;
    font-weight:700;
}
.rsc-admin-warning{
    color:#b45309;
    font-weight:800;
}
.rsc-admin-ok{
    color:#166534;
    font-weight:800;
}


/* V2.2 Seasons + real teams */
.rsc-admin-form-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
    align-items:end;
}
.rsc-admin-check{
    display:flex;
    gap:6px;
    align-items:center;
    font-weight:700;
}
.rsc-inline-form{
    display:flex;
    gap:8px;
    align-items:center;
}
.rsc-inline-form select{
    min-width:160px;
}
.rsc-team-label{
    display:inline-block;
    background:#f0fdf4;
    color:#166534;
    border:1px solid #bbf7d0;
    border-radius:999px;
    padding:8px 12px;
    font-weight:900;
    margin:4px 0 14px;
}


/* V2.3 Screenshot + Pace admin check */
.rsc-admin-shot{
    display:inline-flex;
    align-items:center;
    gap:8px;
    text-decoration:none;
    font-weight:700;
}
.rsc-admin-shot img{
    width:54px;
    height:54px;
    object-fit:cover;
    border-radius:8px;
    border:1px solid #dcdcde;
    background:#fff;
}
.rsc-admin-muted{
    color:#646970;
}
.rsc-pace-check{
    display:inline-flex;
    flex-direction:column;
    gap:2px;
    border-radius:10px;
    padding:7px 9px;
    font-weight:800;
    line-height:1.15;
}
.rsc-pace-check small{
    font-weight:700;
    opacity:.8;
}
.rsc-pace-ok{
    background:#dcfce7;
    color:#166534;
}
.rsc-pace-warn{
    background:#fef9c3;
    color:#854d0e;
}
.rsc-pace-bad{
    background:#fee2e2;
    color:#991b1b;
}
.rsc-pace-unknown{
    background:#f1f5f9;
    color:#475569;
}


/* V2.4 Admin edit + parentboard */
.rsc-admin-edit-row td{
    background:#f8fafc !important;
}
.rsc-admin-edit-row summary{
    cursor:pointer;
    font-weight:800;
    color:#166534;
}
.rsc-admin-edit-form{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
    gap:12px;
    align-items:end;
    padding:14px 0;
}
.rsc-admin-edit-form label{
    display:flex;
    flex-direction:column;
    gap:5px;
    font-weight:700;
}
.rsc-admin-edit-form input{
    max-width:100%;
}
.rsc-parentboard .rsc-tabs,
.rsc-parentboard .rsc-auth,
.rsc-parentboard form{
    display:none !important;
}


/* V3 Phase 1-3 */
.rsc-fab{
    position:fixed;
    right:22px;
    bottom:86px;
    z-index:9998;
    width:58px;
    height:58px;
    border-radius:50%;
    border:0;
    background:var(--rsc-primary);
    color:#fff;
    font-size:34px;
    line-height:1;
    box-shadow:0 12px 30px rgba(15,23,42,.22);
    cursor:pointer;
}
.rsc-bottom-nav{
    position:fixed;
    left:50%;
    bottom:12px;
    transform:translateX(-50%);
    z-index:9998;
    display:flex;
    gap:4px;
    background:#ffffff;
    border:1px solid #e5e7eb;
    border-radius:999px;
    padding:6px;
    box-shadow:0 14px 38px rgba(15,23,42,.16);
}
.rsc-bottom-nav button{
    border:0;
    background:transparent;
    color:#111827;
    font-weight:800;
    padding:9px 11px;
    border-radius:999px;
    cursor:pointer;
}
.rsc-bottom-nav button:hover{
    background:#f0fdf4;
}
.rsc-heatmap{
    display:grid;
    grid-template-columns:repeat(30, 1fr);
    gap:5px;
}
.rsc-heat{
    display:block;
    aspect-ratio:1/1;
    min-width:10px;
    border-radius:4px;
    background:#e5e7eb;
}
.rsc-heat-1{background:#bbf7d0}
.rsc-heat-2{background:#86efac}
.rsc-heat-3{background:#22c55e}
.rsc-heat-4{background:#166534}
.rsc-coach-list p{
    background:#f8fafc;
    border:1px solid #e5e7eb;
    border-left:5px solid var(--rsc-primary);
    border-radius:14px;
    padding:14px;
    font-weight:800;
}
.rsc-gpx-form{
    background:#f8fafc;
    border:1px solid #e5e7eb;
    border-radius:18px;
    padding:16px;
    margin-bottom:18px;
}
.rsc-map-card{
    background:#f8fafc;
    border:1px solid #e5e7eb;
    border-radius:18px;
    padding:16px;
    margin:14px 0;
}
.rsc-map-card strong,
.rsc-map-card span{
    display:block;
}
.rsc-map{
    height:280px;
    border-radius:16px;
    overflow:hidden;
    margin-top:12px;
    border:1px solid #d1d5db;
}
.rsc-share-card{
    background:linear-gradient(135deg,#ffffff,#f7fee7);
    border:2px solid var(--rsc-primary);
}
.rsc-tv{
    background:#020617;
    min-height:100vh;
    padding:30px;
}
.rsc-tv .rsc-card,
.rsc-tv .rsc-hero{
    transform:scale(1.02);
}
.rsc-tv-header{
    color:#fff;
    text-align:center;
    margin-bottom:20px;
}
.rsc-tv-header h1{
    font-size:52px;
    margin:0;
}
@media(max-width:700px){
    body:has(.rsc-dashboard){
        padding-bottom:90px;
    }
    .rsc-bottom-nav{
        width:calc(100% - 18px);
        justify-content:space-around;
    }
    .rsc-bottom-nav button{
        font-size:12px;
        padding:8px 7px;
    }
    .rsc-heatmap{
        grid-template-columns:repeat(18, 1fr);
    }
    .rsc-tv{
        padding:12px;
    }
    .rsc-tv-header h1{
        font-size:32px;
    }
}
