/* Rankings in the forum-gamification style (owner 2026-11-04; mockup handoff/forum-gamify/d-leaderboard.png).
   Loaded by /rankings only (views/pages/rankings.ts). The level emblem (.lv1 + .t-* tiers, views/partials/levelemblem.ts)
   and the chips (.gchip) are kept self-contained here so the forum's leaderboard can mirror them. Tokens: chrome.css. */

/* ---------- tiers: ring colours (emblem, podium place, division pill) ---------- */
.t-bronze { --ring-a: #e3b183; --ring-b: #9a5f2c; --ring-c: #5a3513; --tx: #ffe2c4; }
.t-silver { --ring-a: #f4f6ff; --ring-b: #a9b1cc; --ring-c: #5e6580; --tx: #f1f3ff; }
.t-gold { --ring-a: #ffe9a8; --ring-b: #f0b84a; --ring-c: #8a5513; --tx: #ffdf9a; }
.t-rune { --ring-a: #e1d4ff; --ring-b: #a78bfa; --ring-c: #5b3fb0; --tx: #e6dcff; }
.t-lantern { --ring-a: #ffd7a0; --ring-b: #f5733a; --ring-c: #a3201f; --tx: #ffd9a8; }

/* ---------- level emblem, variant 1: gold-ringed numeric roundel ---------- */
.lv1 { position: relative; display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: conic-gradient(from 210deg, var(--ring-a), var(--ring-b) 25%, var(--ring-c) 50%, var(--ring-b) 75%, var(--ring-a));
  box-shadow: 0 0 0 2px var(--aet-bg), 0 4px 10px rgba(0, 0, 0, .6); }
.lv1::before { content: ""; position: absolute; inset: 3px; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #2a2c58, #12142b 70%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.lv1 b { position: relative; font: 700 13.5px/1 var(--aet-font-display); color: var(--tx); letter-spacing: 0; text-shadow: 0 1px 0 #000; }
.lv1--sm { width: 24px; height: 24px; }
.lv1--sm::before { inset: 2.5px; }
.lv1--sm b { font-size: 10.5px; }
.lv1--lg { width: 44px; height: 44px; box-shadow: 0 0 0 3px var(--aet-bg), 0 6px 16px rgba(0, 0, 0, .6), 0 0 22px -6px var(--ring-b); }
.lv1--lg::before { inset: 4px; }
.lv1--lg b { font-size: 17px; }

/* ---------- chips ---------- */
.gchip { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; max-width: 100%; padding: 2px 11px 2px 4px; border-radius: 99px;
  background: rgba(11, 13, 26, .7); border: 1px solid var(--aet-border-strong); font: 600 .8rem/1.2 var(--aet-font); color: var(--aet-text); }
.gchip > span { white-space: nowrap; } /* guild names: 12 characters at most */
.gchip .muted { color: var(--aet-faint); font-weight: 500; }
.gchip .kingdom { padding-left: 4px; }
.gchip:has(> .muted:first-child) { padding-left: 11px; }
.div-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; font: 700 .7rem/1 var(--aet-font);
  letter-spacing: .1em; text-transform: uppercase; color: var(--tx); background: rgba(11, 13, 26, .7);
  border: 1px solid var(--ring-b); box-shadow: 0 0 10px -4px var(--ring-b); white-space: nowrap; }
.you { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; margin-left: 4px; border-radius: 99px; vertical-align: 2px;
  font: 700 .64rem/1 var(--aet-font); letter-spacing: .1em; text-transform: uppercase; color: #1a1208;
  background: linear-gradient(135deg, var(--aet-amber-soft), var(--aet-amber)); }
.guild-mark--lg { width: 64px; height: 48px; }
.mark-ph { display: inline-grid; place-items: center; color: var(--aet-amber); }
.mark-ph svg { width: 22px; height: 22px; }

/* class colours (same as the account page's class badges) */
.cls--warrior { color: #fca5a5; }
.cls--ninja { color: #86efac; }
.cls--sura { color: #c4b5fd; }
.cls--shaman { color: #93c5fd; }
.cls--lycan { color: #fcd34d; }

/* ---------- head: centred title, lead, segmented tabs ---------- */
.rk-hero { padding: 40px 0 22px; text-align: center; border-bottom: 1px solid var(--aet-border); background: rgba(17, 19, 40, .55); }
.rk-hero .page-title { margin-bottom: 6px; }
.rk-hero .page-lead { margin: 0 auto; }
.rk-tabs { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 100%; margin-top: 18px; padding: 4px; border-radius: 12px;
  background: rgba(10, 11, 24, .7); border: 1px solid var(--aet-border); }
.rk-tab { padding: 8px 18px; border-radius: 9px; font-weight: 600; font-size: .92rem; color: var(--aet-muted); text-decoration: none; }
.rk-tab:hover { color: #fff; background: rgba(167, 139, 250, .1); }
.rk-tab[aria-current="page"] { color: #fff; background: rgba(167, 139, 250, .18); box-shadow: inset 0 -2px 0 var(--aet-amber); }
.rk-updated { margin: 0 0 6px; text-align: center; font-size: .85rem; color: var(--aet-faint); }

/* ---------- podium: 2 - 1 - 3 ---------- */
.podium { list-style: none; margin: 30px 0 22px; padding: 0; display: grid; grid-template-columns: 1fr 1.12fr 1fr; gap: 16px; align-items: end; }
.pod { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 16px 20px; text-align: center;
  border-radius: var(--aet-radius); background: rgba(17, 19, 40, .86); border: 1px solid var(--aet-border); box-shadow: var(--aet-shadow); }
.pod--1 { order: 2; padding-top: 38px; padding-bottom: 26px; border-color: rgba(255, 179, 71, .5);
  background: linear-gradient(170deg, rgba(255, 179, 71, .13), rgba(17, 19, 40, .9) 55%); box-shadow: 0 24px 60px -24px rgba(245, 168, 58, .35); }
.pod--2 { order: 1; }
.pod--3 { order: 3; }
.pod.me { box-shadow: 0 0 0 2px rgba(245, 168, 58, .55), var(--aet-shadow); }
.pod__pos { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  font: 700 .95rem/1 var(--aet-font-display); color: #1a1208; background: linear-gradient(135deg, var(--ring-a), var(--ring-b)); box-shadow: 0 0 0 3px var(--aet-bg); }
.pod__portrait { position: relative; display: grid; place-items: center; width: 84px; height: 96px; margin-bottom: 12px; border-radius: 12px;
  background: radial-gradient(circle at 50% 30%, rgba(245, 168, 58, .2), transparent 60%), linear-gradient(160deg, #2a1c3c, #12142b);
  border: 1px solid var(--ring-b); box-shadow: inset 0 0 0 3px var(--aet-bg), inset 0 0 0 4px rgba(240, 184, 74, .2); }
.pod--1 .pod__portrait { width: 96px; height: 110px; }
.pod__portrait > svg { width: 44px; height: 44px; margin-bottom: 8px; }
.pod__portrait--mark > img, .pod__portrait--mark > .mark-ph { margin-bottom: 12px; }
.pod__lv { position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); line-height: 0; }
.pod__name { margin-top: 6px; font: 700 1.1rem/1.2 var(--aet-font-display); color: #fff; letter-spacing: .03em; overflow-wrap: anywhere; }
.pod--1 .pod__name { font-size: 1.25rem; }
.pod__sub { font-size: .85rem; color: var(--aet-muted); }
.pod__score { font-size: .85rem; color: var(--aet-muted); }
.pod__score b { font: 700 1.05rem/1 var(--aet-font); color: var(--aet-amber-soft); }
.pod__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 2px; }

/* ---------- table ---------- */
.lb-card { border-radius: var(--aet-radius); background: rgba(17, 19, 40, .86); border: 1px solid var(--aet-border); box-shadow: var(--aet-shadow); padding: 10px 16px 6px; }
.lb { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .95rem; }
.lb th { padding: 10px 12px; text-align: left; font: 600 .7rem/1 var(--aet-font); letter-spacing: .14em; text-transform: uppercase; color: var(--aet-faint); white-space: nowrap; }
.lb td { padding: 10px 12px; border-top: 1px solid var(--aet-border); vertical-align: middle; }
.lb .pos { width: 52px; text-align: center; font: 700 1rem/1 var(--aet-font-display); color: var(--aet-muted); font-variant-numeric: tabular-nums; }
.lb th.pos { font: 600 .7rem/1 var(--aet-font); }
.lb .lv { width: 56px; }
.lb .stat { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lb td.stat b { color: var(--aet-amber-soft); }
.lb-row:hover td { background: var(--aet-surface-hover); }
.who__icon { display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 10px; vertical-align: middle;
  background: rgba(245, 168, 58, .08); border: 1px solid var(--aet-border-strong); }
.who__icon svg { width: 22px; height: 22px; }
.who__icon--mark { width: 44px; background: rgba(8, 9, 20, .5); }
.who__txt { display: inline-flex; flex-direction: column; gap: 2px; margin-left: 12px; vertical-align: middle; min-width: 0; }
.who__name { font-weight: 600; color: #fff; overflow-wrap: anywhere; }
.who__sub { font-size: .8rem; color: var(--aet-faint); }
.who__chips { display: none; }
.lb tr.me td { background: rgba(245, 168, 58, .08); border-top-color: rgba(245, 168, 58, .35); }
.lb tr.me td:first-child { box-shadow: inset 3px 0 0 var(--aet-amber); }
.lb tr.lb-gap td { padding: 4px 12px; text-align: left; padding-left: 26px; font-weight: 700; color: var(--aet-faint); letter-spacing: .1em; }
.lb tr.lb-gap + tr.me td, .lb tr.me + tr.lb-gap td { border-top-color: rgba(245, 168, 58, .35); }

/* ---------- pager ---------- */
.rk-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; margin-top: 18px; }
.rk-pager__at { font-size: .9rem; color: var(--aet-muted); }
.rk-pager .is-off { opacity: .4; pointer-events: none; }

.rk-phone { display: none; }

/* tablets: the podium tighter */
@media (max-width: 900px) {
  .podium { gap: 10px; }
  .pod { padding-left: 10px; padding-right: 10px; }
}

/* ---------- phones: the podium stacks (1, 2, 3), the table becomes cards ---------- */
@media (max-width: 720px) {
  .rk-hero { padding: 28px 0 18px; }
  .rk-tab { padding: 8px 12px; font-size: .88rem; }
  .podium { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 26px; }
  .pod, .pod--1 { order: 0; padding: 24px 14px 18px; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; row-gap: 6px;
    align-items: center; text-align: left; }
  .pod__pos { left: 18px; transform: none; top: -13px; width: 28px; height: 28px; }
  .pod__portrait, .pod--1 .pod__portrait { grid-row: 1 / span 4; width: 72px; height: 84px; margin: 0 0 10px; }
  .pod__portrait > svg { width: 34px; height: 34px; margin-bottom: 18px; }
  .pod__portrait--mark > img { margin-bottom: 18px; }
  .pod__lv { bottom: -12px; }
  .pod__lv .lv1--lg { width: 38px; height: 38px; }
  .pod__lv .lv1--lg b { font-size: 15px; }
  .pod__name, .pod--1 .pod__name { margin: 0; font-size: 1.1rem; }
  .pod__chips { justify-content: flex-start; }
  .lb-card { padding: 0; background: none; border: 0; box-shadow: none; }
  .lb, .lb tbody { display: block; }
  .lb thead { display: none; } /* the rows are cards: each says what it is (the column labels sit in its chips) */
  .lb tr.lb-row { display: grid; grid-template-columns: 24px 32px minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 0 0 10px; padding: 12px;
    border-radius: 12px; background: rgba(17, 19, 40, .86); border: 1px solid var(--aet-border); }
  .lb tr.lb-row td { display: block; padding: 0; border: 0; background: none; width: auto; }
  .lb tr.lb-row td.rk-desk { display: none; }
  .lb tr.me { border-color: rgba(245, 168, 58, .55); background: linear-gradient(160deg, rgba(245, 168, 58, .12), rgba(17, 19, 40, .9) 60%);
    box-shadow: inset 3px 0 0 var(--aet-amber); }
  .lb tr.me td, .lb tr.me td:first-child { background: none; box-shadow: none; }
  .lb tr.lb-gap { display: block; margin: -2px 0 8px; }
  .lb tr.lb-gap td { display: block; padding: 0 0 0 22px; border: 0; }
  .lb .pos { width: auto; text-align: left; }
  .lb tr.lb-row td.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .who__icon { width: 30px; height: 30px; border-radius: 8px; }
  .who__icon svg { width: 18px; height: 18px; }
  .who__icon--mark { width: 40px; height: 32px; }
  .who__txt { display: flex; margin-left: 0; flex: 1; }
  .who__chips.rk-phone { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
  .who__chips .gchip { min-height: 26px; padding-right: 9px; font-size: .74rem; gap: 6px; }
  .who__chips .gchip:has(> .muted:first-child) { padding-left: 9px; }
  .who__chips .div-pill { height: 26px; }
  .lb .stat { align-self: center; }
  .stat__lbl.rk-phone { display: block; max-width: 72px; margin-top: 3px; font: 600 .6rem/1.2 var(--aet-font); letter-spacing: .08em; text-transform: uppercase;
    color: var(--aet-faint); white-space: normal; }
  .lb-row:hover td { background: none; }
}
