
body[data-learning-page="leaderboards"] .learning-page-content { min-width:0; }
.leagues-heading { display:block; margin:0 0 22px; }
.leagues-tabs { display:flex; gap:8px; margin-bottom:20px; }
.leagues-tabs button { flex:1; border:1px solid var(--adventure-outline, #c6b68b); background:var(--adventure-paper, #fff9eb); color:var(--adventure-ink, #303d2c); border-radius:12px; min-height:44px; padding:10px 8px; font-size:15px; font-weight:600; font-family:inherit; }
.leagues-tabs button[aria-pressed="true"] { border-color:var(--crp-hsk-border, #c6a04a); background:var(--adventure-gold, #e7ba59); color:var(--crp-hsk-selected-text, #4b3517); }
.leagues-panel { border:1px solid var(--adventure-outline, #c6b68b); border-radius:18px; background:var(--adventure-paper, #fff9eb); overflow:hidden; margin-bottom:16px; }
.leagues-panel-head { padding:20px; border-bottom:1px solid #e5e7eb; }
.leagues-panel h2 { margin:0; font-size:22px; line-height:1.3; overflow-wrap:anywhere; }
.leagues-panel h3 { font-size:17px; margin:0 0 12px; }
.leagues-title-row { display:flex; align-items:center; gap:14px; }
.leagues-title-row img { width:48px; height:48px; object-fit:contain; }
.leagues-meta { color:var(--adventure-muted, #677058); font-size:14px; line-height:1.5; margin:8px 0 0; }
.leagues-empty,.leagues-form,.leagues-rules { padding:20px; }
.leagues-empty p { margin:0 0 16px; color:var(--adventure-ink, #303d2c); line-height:1.5; }
.leagues-action { min-height:44px; border:1px solid var(--adventure-forest, #365c39); border-radius:12px; padding:11px 16px; background:var(--adventure-forest, #365c39); color:var(--adventure-paper, #fff9eb); font-size:15px; font-weight:600; font-family:inherit; display:inline-flex; align-items:center; justify-content:center; text-decoration:none; cursor:pointer; }
.leagues-action.secondary { background:var(--adventure-paper, #fff9eb); color:var(--adventure-forest, #365c39); }
.leagues-action.danger { background:var(--adventure-paper, #fff9eb); border-color:#cbd5e1; color:#b91c1c; }
.leagues-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.leagues-form label { display:block; font-size:15px; font-weight:600; margin-bottom:8px; }
.leagues-form input { box-sizing:border-box; display:block; width:100%; min-height:48px; padding:12px; color:var(--adventure-ink, #303d2c); background:var(--adventure-paper, #fff9eb); border:1px solid var(--adventure-outline, #c6b68b); border-radius:12px; font-size:16px; }
.leagues-form .leagues-action { margin-top:12px; }
.leagues-list { list-style:none; padding:0; margin:0; }
.leagues-row { display:flex; align-items:center; gap:12px; padding:14px 18px; min-height:64px; box-sizing:border-box; background:var(--adventure-soft, #eee6ce); border-bottom:1px solid #edf0f4; }
.leagues-row:last-child { border:0; }
.leagues-rank { min-width:24px; font-size:17px; font-weight:700; text-align:center; color:var(--adventure-muted, #677058); }
.leagues-avatar { width:38px; height:38px; flex:0 0 38px; object-fit:contain; border:1px solid var(--adventure-outline, #c6b68b); border-radius:50%; background:#f8fafc; }
.leagues-person { flex:1; min-width:0; }
.leagues-person strong { font-size:16px; display:block; overflow-wrap:anywhere; }
.leagues-person small { display:block; color:var(--adventure-muted, #677058); font-size:12px; margin-top:3px; }
.leagues-xp { white-space:nowrap; font-size:15px; font-weight:700; color:var(--adventure-ink, #303d2c); }
.leagues-boundary { padding:9px 18px; background:#f0fdf4; color:#166534; font-size:13px; font-weight:600; border-bottom:1px solid #bbf7d0; }
.leagues-boundary.demotion { background:#fff7ed; color:#9a3412; border-color:#fed7aa; }
.leagues-rules { color:var(--adventure-muted, #677058); font-size:13px; line-height:1.5; border-top:1px solid #e5e7eb; }
.leagues-rules summary { cursor:pointer; font-weight:600; color:var(--adventure-ink, #303d2c); min-height:28px; }
.leagues-message { color:#166534; font-size:14px; line-height:1.5; margin-bottom:14px; }
.leagues-message.error { color:#b91c1c; }
.leagues-invitation { padding:18px 20px; border-bottom:1px solid #e5e7eb; overflow-wrap:anywhere; }
.leagues-invitation:last-child { border-bottom:0; }
.leagues-invitation strong { display:block; }
.leagues-confirm { padding:16px; border:1px solid var(--adventure-outline, #c6b68b); border-radius:12px; margin-top:14px; }
.leagues-panel button,.leagues-tabs button,.leagues-action { font-family:inherit; transition:transform 160ms ease-out,opacity 160ms ease-out; -webkit-tap-highlight-color:transparent; }
.leagues-panel button:active,.leagues-tabs button:active,.leagues-action:active { transform:scale(.985); opacity:.9; }
.leagues-panel button:disabled { opacity:.55; cursor:wait; }
.leagues-panel :focus-visible,.leagues-tabs :focus-visible { outline:3px solid var(--adventure-outline, #c6b68b); outline-offset:3px; }
@media(hover:hover) { .leagues-panel button:hover:not(:disabled),.leagues-tabs button:hover,.leagues-action:hover { transform:translateY(-2px); } }
@media(prefers-reduced-motion:reduce) { .leagues-panel button,.leagues-tabs button,.leagues-action { transition:none; transform:none!important; } }
@media(max-width:420px) { .leagues-row { padding:12px; gap:9px; } .leagues-panel-head,.leagues-empty,.leagues-form { padding:16px; } }
html[data-theme="dark"] .leagues-panel { background:var(--adventure-paper, #29372c); border-color:var(--adventure-outline, #718063); color:var(--adventure-ink, #f4efda); }
html[data-theme="dark"] .leagues-row { background:var(--adventure-soft, #354430); color:var(--adventure-ink, #f4efda); }

.leagues-country { display:inline-block; margin-left:7px; font-size:18px; line-height:1.2; vertical-align:baseline; white-space:nowrap; }

@property --league-border-angle { syntax:"<angle>"; initial-value:0deg; inherits:false; }
.leagues-podium { position:relative; isolation:isolate; margin:8px; border:1px solid var(--podium-border); border-radius:14px; padding:14px 10px; }
.leagues-podium:last-child { border:1px solid var(--podium-border); }
.leagues-podium::before { content:""; position:absolute; inset:-1px; border-radius:inherit; padding:2px; pointer-events:none; background:conic-gradient(from var(--league-border-angle),var(--podium-border) 0deg 225deg,var(--podium-color) 275deg,var(--podium-light) 310deg,var(--podium-dark) 335deg,var(--podium-border) 360deg); -webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0); -webkit-mask-composite:xor; mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0); mask-composite:exclude; animation:league-border-run 4s linear infinite; }
.leagues-podium.is-gold { --podium-color:#e7b83e; --podium-light:#fff2b2; --podium-dark:#95600e; --podium-border:#e2c678; }
.leagues-podium.is-silver { --podium-color:#b7c2d1; --podium-light:#f5f8fc; --podium-dark:#65738a; --podium-border:#b8c3d2; }
.leagues-podium.is-bronze { --podium-color:#c88b55; --podium-light:#f9dbb8; --podium-dark:#8b512b; --podium-border:#d1a27b; }
.leagues-podium .leagues-rank { display:flex; flex:0 0 30px; min-width:30px; align-items:center; justify-content:center; }
.leagues-crown { display:block; width:32px; height:32px; overflow:visible; }
@keyframes league-border-run { to { --league-border-angle:360deg; } }
@media(prefers-reduced-motion:reduce) { .leagues-podium::before { animation:none; } }
@media(max-width:420px) { .leagues-podium { padding:12px 9px; gap:8px; } }

.leagues-countdown { display:flex; align-items:center; justify-content:center; gap:16px; width:fit-content; max-width:100%; box-sizing:border-box; margin:18px auto 0; padding:12px 18px; border:2px solid var(--adventure-outline, #c6b68b); border-radius:16px; background:var(--adventure-paper, #fff9eb); color:var(--adventure-forest, #365c39); }
.leagues-countdown > img { width:40px; height:40px; flex:0 0 40px; }
.leagues-countdown-digits { display:flex; align-items:flex-start; gap:8px; }
.leagues-countdown-unit { display:flex; flex-direction:column; align-items:center; gap:5px; }
.leagues-countdown-unit > span { font-family:ui-monospace,"SFMono-Regular",Consolas,monospace; font-size:26px; line-height:1; font-weight:700; font-variant-numeric:tabular-nums; }
.leagues-countdown-unit small { color:var(--adventure-muted, #677058); font-size:10px; font-weight:600; line-height:1; text-transform:uppercase; letter-spacing:.06em; }
.leagues-countdown-separator { color:var(--adventure-gold, #e7ba59); font-size:22px; line-height:26px; font-weight:600; }
@media(max-width:420px) { .leagues-countdown { gap:10px; padding:12px; } .leagues-countdown-digits { gap:5px; } .leagues-countdown-unit > span { font-size:23px; } .leagues-countdown-separator { line-height:23px; } .leagues-countdown > img { width:34px; height:34px; flex-basis:34px; } }
html[data-theme="dark"] .leagues-countdown { background:var(--adventure-paper, #29372c); border-color:var(--adventure-outline, #718063); color:var(--adventure-ink, #f4efda); }
html[data-theme="dark"] .leagues-countdown-unit small { color:#cbd5e1; }
@media(max-width:360px) { .leagues-countdown { gap:8px; padding:10px; } .leagues-countdown > img { width:28px; height:28px; flex-basis:28px; } .leagues-countdown-digits { gap:3px; } .leagues-countdown-unit > span { font-size:20px; } .leagues-countdown-unit small { font-size:9px; } .leagues-countdown-separator { font-size:18px; line-height:20px; } }

.leagues-first-place { margin:12px 8px 8px; }
.leagues-first-place > .leagues-countdown { position:relative; z-index:1; margin:0 auto -1px; max-width:calc(100% - 24px); border-bottom-left-radius:0; border-bottom-right-radius:0; }
.leagues-first-place > .leagues-podium { margin:0; }

.leagues-list { overflow-anchor:none; }
.leagues-row { position:relative; }
.leagues-xp { font-variant-numeric:tabular-nums; }
