/* ==========================================================
   Punkteturnier: Rangliste, Lobbys, Eingabe der Turnierleitung
   ========================================================== */

.rl-seite { display: flex; flex-direction: column; gap: 0.5rem; }

.rl-kopf { display: flex; gap: 1.1rem; align-items: center; margin-bottom: 0.5rem; }
.rl-cover { width: 84px; height: 112px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); flex-shrink: 0; }
.rl-kopf h1 { margin: 0.1rem 0 0.25rem; font-size: 1.6rem; }
.rl-meta { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: center; }

.rl-status { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.12rem 0.5rem; border-radius: 999px; border: 1px solid var(--border-light); }
.rl-status--active { color: #f87171; border-color: rgba(248, 113, 113, 0.5); }
.rl-status--finished { color: var(--text-secondary); }
.rl-status--registration { color: var(--accent); border-color: rgba(0, 255, 170, 0.45); }

.rl-titel { font-size: 1.15rem; margin: 1.25rem 0 0.5rem; }
.rl-fuss { font-size: 0.8rem; margin: 0.35rem 0 0; }

.rl-kasten {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.15rem;
    line-height: 1.55;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
}

.rl-tabelle-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); }
.rl-tabelle { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.rl-tabelle th, .rl-tabelle td { padding: 0.5rem 0.65rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.rl-tabelle th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-secondary); }
.rl-tabelle tr:last-child td { border-bottom: 0; }
.rl-tabelle th.rl-fertig { color: var(--accent); }
.rl-zahl { text-align: right !important; font-variant-numeric: tabular-nums; }
.rl-tabelle sup { font-size: 0.65rem; color: var(--text-muted); margin-left: 2px; }
.rl-krone { font-size: 0.75rem; margin-left: 3px; }
.rl-ich td { background: rgba(0, 255, 170, 0.07); }
.rl-sieger td { background: rgba(251, 191, 36, 0.1); font-weight: 700; }
.rl-rangliste td:first-child { width: 3.5rem; }

.rl-lobbys { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.rl-lobby { display: flex; flex-direction: column; gap: 0.6rem; }
.rl-lobby__kopf { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; align-items: baseline; }
.rl-lobby--finale .rl-tabelle-wrap { border-color: rgba(251, 191, 36, 0.5); }

.rl-eingabe {
    background: var(--bg-card-alt);
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.rl-eingabe__kopf { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; }
.rl-eingabe__kopf label { display: flex; gap: 0.4rem; align-items: center; font-weight: 600; margin: 0; }
.rl-eingabe .form-control { padding: 0.3rem 0.45rem; width: auto; }
.rl-eingabe .rl-punkte { width: 90px; }
.rl-hilfe { font-size: 0.78rem; }
.rl-tabelle--eingabe { background: transparent; }
.rl-eingabe .btn { align-self: flex-start; }

@media (max-width: 640px) {
    .rl-lobbys { grid-template-columns: 1fr; }
    .rl-kopf { align-items: flex-start; }
    .rl-cover { width: 60px; height: 80px; }
    .rl-tabelle th, .rl-tabelle td { padding: 0.4rem 0.45rem; }
    /* Beste Runde ist nur Gleichstandsregel, auf dem Handy entbehrlich */
    .rl-rangliste th:last-child, .rl-rangliste td:last-child { display: none; }
}
