/* ── Rangliste (Website) — Inhouse-Schaufenster Block IS3 · BAUPLAN-WEBSITE ─────────────────────────────────────────
   Figma YRUirscc0yHUgTS69n5bDU Section 286:14321 (W-R1 286:14324 · W-R2 363:21010 · M-R1 359:20648 · Zustaende 364:21480).
   Praefix `lr-` (die alten `.lb-*` aus style.css gehoeren der Vorgaengerseite). Nur Tokens aus style.css + Bausteine tw.css.
   Raster wie tw-rumpf: Tabelle | Haarlinie | rechte Spalte 360. ≤ 1080 einspaltig (Du-Karte VOR der Tabelle), ≤ 600 = 430er. */

.lr-main { padding-bottom: 120px; }
/* Glow blutet links bis an den Fensterrand (nicht nur bis an die 1440er-Kante von main) und laeuft vor der Fusszeile weich aus. */
.lr-main::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: calc(50% - 50vw); pointer-events: none; z-index: -1;
    background: radial-gradient(1100px 900px at -240px 85%, rgba(124, 92, 255, .09), rgba(124, 92, 255, 0) 70%);
    -webkit-mask-image: linear-gradient(#000 calc(100% - 200px), transparent); mask-image: linear-gradient(#000 calc(100% - 200px), transparent); }
.lr-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Kopf ── */
.lr-kopf { margin-bottom: 40px; }
.lr-steuer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lr-steuer-w { display: flex; align-items: center; gap: 12px; }
.lr-season select { min-width: 120px; }
.lr-suche { position: relative; display: flex; align-items: center; width: 150px; }
.lr-suche svg { position: absolute; left: 12px; color: var(--w45); pointer-events: none; }
.lr-suche .tw-feld { height: 40px; padding-left: 34px; border-radius: 10px; background: transparent; font-size: 13px; }
.lr-suche .tw-feld::-webkit-search-cancel-button { filter: invert(1); opacity: .5; }

/* ── Podest Top 3 (W-R1) = Kern-Baustein TW.sf.podest (.tw-sf-podest/.tw-sf-pd in tw.css, seit Design-QoL 41) — hier nur Abstand,
      Dimmung beim Laden und die Zugaben der Rangliste (Bilanz: Prozent weiss; ≤ 600 nur bei #1) ── */
.lr-podest { margin-bottom: 40px; }
.lr-podest .zahl .rest .wr { color: var(--w100); font-weight: 600; }

/* ── Trend ▲/▼ seit gestern ── */
.lr-tr { font: 600 12px/16px var(--font-brand); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lr-tr.auf { color: var(--gruen); }
.lr-tr.ab { color: var(--red); }
.lr-tr.null { color: var(--w25); font-weight: 400; }

/* ── Rumpf: Tabelle | Haarlinie | rechte Spalte ── */
.lr-rumpf { display: grid; grid-template-columns: minmax(0, 1fr) 1px 360px; column-gap: 40px;
    grid-template-areas: "tab linie du" "tab linie cl" "tab linie rk"; grid-template-rows: auto auto 1fr; align-items: start;
    transition: opacity .15s; }
.lr-tabelle { grid-area: tab; min-width: 0; }
.lr-vline { grid-area: linie; align-self: stretch; }
.lr-du-w { grid-area: du; min-width: 0; }
.lr-cl-w { grid-area: cl; min-width: 0; }
.lr-rk-w { grid-area: rk; min-width: 0; }
.lr-du-w:not(:empty), .lr-cl-w:not(:empty) { margin-bottom: 36px; }
.lr-rumpf.ohne-rechts { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tab"; }
.lr-rumpf.ohne-rechts > .lr-vline, .lr-rumpf.ohne-rechts > .lr-du-w, .lr-rumpf.ohne-rechts > .lr-cl-w, .lr-rumpf.ohne-rechts > .lr-rk-w { display: none; }
.lr-dimm { opacity: .5; pointer-events: none; }

/* Tabelle (W-R1): # · Player · Rank · GDR ↓ · Trend · W / L · Win % · Games */
.lr-tab { display: flex; flex-direction: column; }
.lr-z { display: grid; grid-template-columns: 36px minmax(0, 1.5fr) minmax(0, 1.25fr) 64px 48px 92px 64px 58px; align-items: center;
    column-gap: 8px; min-height: 52px; padding: 0 12px; border-bottom: 1px solid var(--w08); box-sizing: border-box;
    font: 400 14px/18px var(--font-brand); color: var(--w70); text-decoration: none; }
a.lr-z:hover { background: var(--w03); color: var(--w70); }
a.lr-z:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lr-z.kopf { min-height: 40px; font: 600 11px/14px var(--font-brand); letter-spacing: .66px; text-transform: uppercase; color: var(--w45); }
.lr-z > .nr { color: var(--w45); font-weight: 500; text-align: center; }
.lr-z.top > .nr { color: var(--w100); font-weight: 700; }
.lr-z .sp { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lr-z .sp .tw-ava { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px; }
.lr-z .sp b { font-weight: 600; color: var(--w100); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-z .sp em { font-style: normal; }
.lr-z .sp .lr-ohne-ava { width: 32px; flex: 0 0 32px; }   /* S3: Anonym ohne Kreis, Namen bleiben buendig */
.lr-z.anon .sp b { font-weight: 400; color: var(--w70); }
.lr-z .rg { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lr-z .rg .rn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-z .gdr { text-align: right; font-weight: 700; color: var(--w100); }
.lr-z.kopf .gdr { color: var(--w100); }
.lr-z .trd, .lr-z .wl, .lr-z .wr, .lr-z .gm { text-align: center; white-space: nowrap; }
.lr-z.du { background: rgba(124, 92, 255, .10); box-shadow: inset 2px 0 0 var(--violett); }
.lr-z.du .sp b { color: var(--violett-text); }
.lr-z.skel { grid-template-columns: 36px 1fr 120px 64px; column-gap: 16px; }
.lr-z.skel i { display: block; height: 12px; border-radius: 6px; background: var(--w06); }
.lr-z.skel i:nth-child(2) { width: 60%; }
.lr-tab-fuss { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; }
.lr-wp { display: inline-block; flex: 0 0 auto; object-fit: contain; }
.lr-wp.leer { filter: grayscale(1); opacity: .45; }

.lr-satz { padding: 36px 0; border-top: 1px solid var(--w08); border-bottom: 1px solid var(--w08); font: 400 15px/22px var(--font-brand);
    color: var(--w70); margin: 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.lr-satz p { margin: 0; }
.lr-fehler { display: flex; align-items: center; gap: 12px; padding: 24px 0; border-top: 1px solid var(--w08); border-bottom: 1px solid var(--w08);
    font: 500 15px/20px var(--font-brand); color: var(--w100); }
.lr-fehler > span { flex: 1 1 auto; }
.lr-fehler svg { color: var(--w70); flex: 0 0 auto; }

/* ── Rechte Spalte: Karten ── */
.lr-karte { display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid var(--w08); border-radius: 12px;
    background: var(--w03); box-sizing: border-box; }
.lr-pfeil { font-size: 13px; }
.lr-login .tw-h2 { font-size: 22px; line-height: 28px; }
.lr-login .tw-klein { font-size: 14px; line-height: 20px; color: var(--w70); }
.lr-du-k { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.lr-du-k .tw-cap { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-du-rang { display: flex; align-items: center; gap: 16px; }
.lr-du-rang > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 auto; }
.lr-du-rang b { font: 600 22px/1.2 var(--font-brand); color: var(--w100); }
.lr-du-rang .tw-klein { color: var(--w70); }
.lr-du-rang .lr-tr { font-size: 14px; }
.lr-fort-bar.tw-bar { height: 4px; width: 100%; }
.lr-fort-bar.tw-bar i { background: var(--gruen); }
.lr-privat { display: flex; align-items: center; gap: 6px; }
.lr-um-l { display: flex; flex-direction: column; gap: 4px; }
.lr-um-l .tw-cap { margin: 6px 0 4px; }
.lr-um { display: grid; grid-template-columns: 22px 24px minmax(0, 1fr) auto; align-items: center; gap: 10px; height: 36px;
    padding: 0 8px; border-radius: 8px; color: var(--w100); text-decoration: none; font: 500 14px/18px var(--font-brand); }
.lr-um .nr { color: var(--w45); font-size: 13px; text-align: center; }
.lr-um .tw-ava { width: 24px; height: 24px; border-radius: 6px; }
.lr-um b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-um .ab { color: var(--w70); font-size: 13px; }
.lr-um.ich { background: rgba(124, 92, 255, .16); }
.lr-um.ich b { color: var(--violett-text); font-weight: 600; }
a.lr-um:hover { background: var(--w04); }
.lr-verlauf { display: flex; flex-direction: column; gap: 10px; }
.lr-verlauf .tw-cap { margin-top: 6px; }
.lr-linie { width: 100%; height: 56px; overflow: visible; }
.lr-linie path { fill: none; stroke: var(--gruen); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.lr-linie circle { fill: var(--violett-text); }
.lr-verlauf-z { display: flex; justify-content: space-between; font: 500 12px/14px var(--font-brand); color: var(--w45); }
.lr-verlauf-z .ende { color: var(--violett-text); }

.lr-cl { gap: 16px; }
.lr-cl-z { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; color: var(--w100); text-decoration: none; }
.lr-cl-z .tw-ava { width: 32px; height: 32px; border-radius: 50%; }
.lr-cl-z .t, .lr-cl-z .z { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lr-cl-z .t b { font: 600 14px/18px var(--font-brand); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-cl-z .t span { font: 400 12px/15px var(--font-brand); color: var(--w45); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-cl-z .z { align-items: flex-end; }
.lr-cl-z .z b { font: 700 13px/16px var(--font-brand); color: var(--gruen); white-space: nowrap; }
.lr-cl-z .z span { font: 400 11px/14px var(--font-brand); color: var(--w45); white-space: nowrap; }
a.lr-cl-z:hover .t b { color: var(--violett-text); }

.lr-rk { display: flex; flex-direction: column; gap: 4px; }
.lr-rk-k { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.lr-rk-z { display: grid; grid-template-columns: 32px minmax(0, 1fr) 64px 32px; align-items: center; gap: 10px; min-height: 48px; }
.lr-rk-z .t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lr-rk-z .t b { font: 500 13px/16px var(--font-brand); color: var(--w100); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-rk-z .t span { font: 400 11px/14px var(--font-brand); color: var(--w45); }
.lr-rk-bar.tw-bar { height: 3px; width: 100%; }
.lr-rk-bar.tw-bar i { background: var(--violett-text); }
.lr-rk-z .n { text-align: right; font: 600 13px/16px var(--font-brand); color: var(--w100); }

/* ── ≤ 1240: einspaltig, Du-Karte vor der Tabelle (ISZ: bis 1240 statt 1080 — daneben die 360-px-Spalte liess der Tabelle mit
   ihren 8 Spalten unter ~1240 px kaum Platz fuer Namen) ── */
@media (max-width: 1240px) {
    .lr-rumpf, .lr-rumpf.ohne-rechts { grid-template-columns: minmax(0, 1fr); grid-template-areas: "du" "tab" "cl" "rk"; grid-template-rows: none; }
    .lr-vline { display: none; }
    .lr-du-w:not(:empty) { margin-bottom: 32px; }
    .lr-cl-w:not(:empty) { margin: 40px 0 32px; }
    .lr-rk-w { margin-top: 8px; }
    .lr-cl-w:empty + .lr-rk-w { margin-top: 40px; }
}
@media (max-width: 860px) {
    .lr-z { grid-template-columns: 32px minmax(0, 1.5fr) minmax(0, 1fr) 60px 44px 84px 54px; }
    .lr-z .gm { display: none; }
}

/* ── ≤ 600 = 430er (M-R1): Umschalter volle Breite, Season + Suche in einer Reihe, #1 voll, #2/#3 halb ── */
@media (max-width: 600px) {
    .lr-kopf { margin-bottom: 24px; }
    .lr-steuer, .lr-steuer-w { width: 100%; }
    .lr-steuer-w { flex-wrap: wrap; gap: 10px; }
    .lr-steuer { gap: 10px; flex-wrap: wrap; }
    .lr-modi { width: 100%; box-sizing: border-box; }
    .lr-modi button { flex: 1 1 0; justify-content: center; }
    .lr-season select { min-width: 0; height: 36px; }
    .lr-suche { flex: 1 1 0; width: auto; min-width: 0; }
    .lr-suche .tw-feld { height: 36px; }
    .lr-steuer { display: grid; grid-template-columns: auto minmax(0, 1fr); }
    .lr-steuer-w { display: contents; }
    .lr-modi { grid-column: 1 / -1; }

    .lr-podest { margin-bottom: 24px; }
    .lr-podest .tw-sf-pd:not(.p1) .oben .main, .lr-podest .tw-sf-pd:not(.p1) .zahl .rest, .lr-podest .tw-sf-pd:not(.p1) .wer .rg { display: none; }
    .lr-podest .zahl .g b { font-size: 22px; }
    .lr-podest .tw-sf-pd.p1 .zahl .g b { font-size: 28px; }

    .lr-z { grid-template-columns: 24px minmax(0, 1fr) 26px 46px 34px; column-gap: 8px; padding: 0 6px; min-height: 48px; font-size: 13px; }
    .lr-z .rg .rn, .lr-z .wl, .lr-z .wr, .lr-z .gm { display: none; }
    .lr-z.kopf .rg { font-size: 0; }
    .lr-z .sp { gap: 8px; }
    .lr-z .sp .tw-ava { width: 26px; height: 26px; flex-basis: 26px; border-radius: 7px; }
    .lr-z .sp .lr-ohne-ava { width: 26px; flex-basis: 26px; }
    .lr-z .rg .lr-wp { width: 22px; height: 22px; }
    .lr-z.skel { grid-template-columns: 24px 1fr 46px; }
    .lr-z.skel i:nth-child(4) { display: none; }
    .lr-tab-fuss { margin-top: 20px; }
    .lr-karte { padding: 16px; }
    .lr-um.weit { display: none; }
    .lr-du-rang b { font-size: 18px; }
    .lr-du-rang .lr-wp { width: 48px; height: 48px; }
    .lr-rk-z { grid-template-columns: 28px minmax(0, 1fr) 56px 28px; min-height: 42px; }
    .lr-rk-z .lr-wp { width: 28px; height: 28px; }
    .lr-fehler { flex-wrap: wrap; }
}
