.rrtp-public-wrap {
    max-width: 680px;
    margin: 1.5rem 0;
}

.rrtp-form p {
    margin-bottom: 1rem;
}

.rrtp-form label {
    display: block;
    font-weight: 700;
    margin-bottom: .35rem;
}

.rrtp-form input {
    box-sizing: border-box;
    width: 100%;
    max-width: 420px;
    padding: .65rem .75rem;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
}

.rrtp-button,
.rrtp-form button {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    padding: .65rem 1rem;
    background: #1d2327;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.rrtp-box {
    border-radius: 8px;
    padding: .85rem 1rem;
    margin: 1rem 0;
}

.rrtp-success {
    background: #d1e7dd;
    color: #0f5132;
}

.rrtp-error {
    background: #f8d7da;
    color: #842029;
}

.rrtp-info {
    background: #cff4fc;
    color: #055160;
}

.rrtp-wrap {
    max-width: 1100px;
    margin: 1.5rem 0;
}

.rrtp-box {
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 12px 0;
    background: #fff;
}

.rrtp-success {
    border-color: #00a32a;
}

.rrtp-error {
    border-color: #d63638;
}

.rrtp-match-list {
    display: grid;
    gap: 14px;
}

.rrtp-match-card {
    border: 1px solid #dcdcde;
    border-radius: 12px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.rrtp-match-card.rrtp-locked {
    opacity: .78;
}

.rrtp-match-head,
.rrtp-match-meta,
.rrtp-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.rrtp-match-meta {
    justify-content: flex-start;
    color: #646970;
    font-size: .92rem;
    margin-top: 6px;
}

.rrtp-score-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
    align-items: end;
    margin-top: 14px;
}

.rrtp-score-row label span,
.rrtp-winner-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.rrtp-score-row input {
    width: 100%;
    max-width: 110px;
    padding: 8px;
}

.rrtp-score-separator {
    font-weight: 700;
    padding-bottom: 9px;
}

.rrtp-winner-row {
    margin-top: 12px;
}

.rrtp-winner-row select {
    max-width: 320px;
    width: 100%;
    padding: 7px;
}

.rrtp-card-actions {
    justify-content: flex-start;
    margin-top: 14px;
}

.rrtp-button {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    padding: 9px 14px;
    background: #1d2327;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.rrtp-button:hover {
    color: #fff;
}

.rrtp-badge,
.rrtp-points {
    display: inline-block;
    border-radius: 999px;
    padding: 5px 10px;
    background: #f0f0f1;
    font-size: .9rem;
}

.rrtp-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.rrtp-table th,
.rrtp-table td {
    border: 1px solid #dcdcde;
    padding: 9px 10px;
    text-align: left;
}

.rrtp-table th {
    background: #f6f7f7;
}

@media (max-width: 700px) {
    .rrtp-score-row {
        grid-template-columns: 1fr;
    }
    .rrtp-score-separator {
        display: none;
    }
    .rrtp-table {
        display: block;
        overflow-x: auto;
    }
}

.rrtp-bonus-card select,
.rrtp-bonus-card input[type="text"],
.rrtp-bonus-card input[type="number"] {
    max-width: 420px;
    width: 100%;
}
.rrtp-muted {
    color: #666;
    margin-top: -6px;
}
.rrtp-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f0f0f1;
    font-weight: 600;
}

.rrtp-standings-grid,
.rrtp-ko-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin: 1rem 0 2rem;
}

.rrtp-card {
    border: 1px solid #dcdcde;
    border-radius: 10px;
    background: #fff;
    padding: 14px;
}

.rrtp-standing-card h3,
.rrtp-ko-round h3 {
    margin-top: 0;
}

.rrtp-compact-table th,
.rrtp-compact-table td {
    padding: 6px 8px;
    font-size: .92rem;
}

.rrtp-ko-card .rrtp-match-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.rrtp-ko-teams {
    display: grid;
    gap: 6px;
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.rrtp-ko-winner {
    font-weight: 700;
}

/* v0.2.4 frontend polish */
.rrtp-wrap,
.rrtp-public-wrap {
    font-family: inherit;
    color: #1d2327;
}

.rrtp-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.rrtp-page-head h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 2rem);
}

.rrtp-kicker {
    margin: 0 0 4px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #646970;
}

.rrtp-toolbar {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(160px, 240px);
    gap: 12px;
    align-items: end;
    margin: 16px 0;
    padding: 14px;
    border: 1px solid #dcdcde;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.rrtp-toolbar label,
.rrtp-winner-row label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.rrtp-toolbar input,
.rrtp-toolbar select,
.rrtp-winner-row select,
.rrtp-score-row input,
.rrtp-form input,
.rrtp-form select {
    min-height: 42px;
    border: 1px solid #c3c4c7;
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
}

.rrtp-table-scroll {
    overflow-x: auto;
    border: 1px solid #dcdcde;
    border-radius: 14px;
    background: #fff;
}

.rrtp-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.rrtp-table th,
.rrtp-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #edf0f2;
    text-align: left;
    vertical-align: middle;
}

.rrtp-table th {
    background: #f6f7f7;
    font-size: .82rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #50575e;
}

.rrtp-table tr:last-child td {
    border-bottom: 0;
}

.rrtp-table tbody tr:hover {
    background: #fbfbfc;
}

.rrtp-pill,
.rrtp-badge,
.rrtp-points {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 800;
    line-height: 1;
}

.rrtp-pill {
    background: #f0f0f1;
    color: #1d2327;
}

.rrtp-badge {
    background: #fcf0f1;
    color: #8a2424;
}

.rrtp-points {
    background: #edfaef;
    color: #0f5132;
}

.rrtp-muted {
    color: #8c8f94;
}

.rrtp-match-card,
.rrtp-card,
.rrtp-standing-card,
.rrtp-ko-card {
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.rrtp-match-card:hover,
.rrtp-card:hover,
.rrtp-standing-card:hover,
.rrtp-ko-card:hover {
    transform: translateY(-1px);
    border-color: #c3c4c7;
    box-shadow: 0 10px 24px rgba(0,0,0,.07);
}

.rrtp-match-head strong {
    font-size: 1rem;
}

.rrtp-score-row label span {
    display: block;
    min-height: 2.4em;
    font-weight: 800;
}

.rrtp-score-row input {
    width: 100%;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 800;
}

.rrtp-score-separator {
    padding-bottom: 10px;
    font-size: 1.4rem;
    font-weight: 900;
}

.rrtp-button,
.rrtp-form button {
    font-weight: 800;
    transition: transform .14s ease, opacity .14s ease;
}

.rrtp-button:hover,
.rrtp-form button:hover {
    transform: translateY(-1px);
    opacity: .92;
}

.rrtp-button:disabled,
.rrtp-form button:disabled {
    cursor: not-allowed;
    opacity: .6;
    transform: none;
}

.rrtp-standings-grid,
.rrtp-ko-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.rrtp-ko-round {
    margin-top: 24px;
}

.rrtp-ko-teams {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}

.rrtp-ko-teams > div {
    padding: 9px 10px;
    border-radius: 10px;
    background: #f6f7f7;
    font-weight: 800;
}

.rrtp-ko-winner {
    outline: 2px solid #00a32a;
    background: #edfaef !important;
}

@media (max-width: 700px) {
    .rrtp-toolbar {
        grid-template-columns: 1fr;
    }

    .rrtp-match-head,
    .rrtp-match-meta,
    .rrtp-card-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .rrtp-score-row {
        grid-template-columns: 1fr auto 1fr;
    }
}

/* v0.2.6: farbigeres, kompakteres Frontend */
.rrtp-wrap,
.rrtp-public-wrap {
    --rrtp-blue: #2563eb;
    --rrtp-purple: #7c3aed;
    --rrtp-pink: #db2777;
    --rrtp-orange: #f97316;
    --rrtp-green: #16a34a;
    --rrtp-yellow: #facc15;
    --rrtp-soft-blue: #eff6ff;
    --rrtp-soft-purple: #f5f3ff;
    --rrtp-soft-pink: #fdf2f8;
    --rrtp-soft-orange: #fff7ed;
    --rrtp-soft-green: #f0fdf4;
    --rrtp-text: #172033;
    color: var(--rrtp-text);
}

.rrtp-wrap h1,
.rrtp-wrap h2,
.rrtp-wrap h3,
.rrtp-public-wrap h1,
.rrtp-public-wrap h2,
.rrtp-public-wrap h3 {
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: #182033;
}

.rrtp-wrap h1,
.rrtp-public-wrap h1 {
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
}

.rrtp-wrap h2,
.rrtp-public-wrap h2 {
    font-size: clamp(1.15rem, 1.8vw, 1.45rem);
}

.rrtp-wrap h3,
.rrtp-public-wrap h3 {
    font-size: clamp(1rem, 1.4vw, 1.2rem);
}

.rrtp-match-card,
.rrtp-card,
.rrtp-bonus-card,
.rrtp-ko-round,
.rrtp-box {
    border: 1px solid rgba(37, 99, 235, .14);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(239,246,255,.96), rgba(255,255,255,.9) 48%, rgba(253,242,248,.82));
    box-shadow: 0 10px 30px rgba(37, 99, 235, .08);
}

.rrtp-match-card:nth-child(4n+1) { border-top: 5px solid var(--rrtp-blue); }
.rrtp-match-card:nth-child(4n+2) { border-top: 5px solid var(--rrtp-purple); }
.rrtp-match-card:nth-child(4n+3) { border-top: 5px solid var(--rrtp-orange); }
.rrtp-match-card:nth-child(4n+4) { border-top: 5px solid var(--rrtp-green); }

.rrtp-badge,
.rrtp-points,
.rrtp-status {
    border: 0;
    color: #172033;
    background: linear-gradient(135deg, #dbeafe, #f5d0fe);
    font-weight: 750;
}

.rrtp-points {
    background: linear-gradient(135deg, #dcfce7, #fef3c7);
}

.rrtp-match-card.rrtp-locked .rrtp-badge,
.rrtp-match-card.rrtp-locked .rrtp-points {
    background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

.rrtp-button,
.rrtp-form button,
.rrtp-card-actions button {
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rrtp-blue), var(--rrtp-purple));
    box-shadow: 0 8px 18px rgba(37, 99, 235, .22);
}

.rrtp-button.secondary,
.rrtp-card-actions .button-secondary {
    background: linear-gradient(135deg, #475569, #64748b);
}

.rrtp-form input,
.rrtp-form select,
.rrtp-score-row input,
.rrtp-winner-row select,
.rrtp-toolbar input,
.rrtp-toolbar select,
.rrtp-bonus-card input,
.rrtp-bonus-card select {
    border: 1px solid rgba(37, 99, 235, .25);
    border-radius: 12px;
    background: rgba(255,255,255,.92);
}

.rrtp-table {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(37, 99, 235, .07);
}

.rrtp-table th {
    border-color: rgba(37, 99, 235, .12);
    background: linear-gradient(135deg, #dbeafe, #f5f3ff);
    color: #172033;
    font-size: .9rem;
}

.rrtp-table td {
    border-color: rgba(37, 99, 235, .10);
}

.rrtp-table tr:nth-child(even) td {
    background: rgba(239,246,255,.42);
}

.rrtp-ko-teams > div {
    background: linear-gradient(135deg, #fff7ed, #eff6ff);
    border-left: 4px solid var(--rrtp-orange);
}

.rrtp-ko-winner {
    outline: 2px solid var(--rrtp-green);
    background: linear-gradient(135deg, #dcfce7, #ecfeff) !important;
}

.rrtp-success { background: linear-gradient(135deg, #dcfce7, #ecfdf5); color: #14532d; }
.rrtp-error { background: linear-gradient(135deg, #fee2e2, #fff1f2); color: #7f1d1d; }
.rrtp-info { background: linear-gradient(135deg, #dbeafe, #ecfeff); color: #164e63; }
