/* Home ranking v2 (2026-11-16): tabs first (Nest / PvP / Guild / Gold / Classes / GDN), podium 1-3 + list 4-10,
   weekly nest times / hall of fame (sub-tabs), class share, GDN Challenge, compact "server status" strip at the bottom.
   Calmer pass the same day (owner: "วุ่นวาย"): fewer boxes and borders, avatar stacks instead of name chips, one accent per card.
   Loaded after home-classic.css (which keeps .classic-ranking, .rk-system-tab, .rk-bless, .rk-pool, .rk-flow).
   CSP: no inline <style>; inline style="" is only used for bar widths and the donut.
   The nest panels use one selector per index (0-23): the page shows at most 24 nests. */

.rnk {
    --c-warrior: #b4533c; --c-archer: #5b8a38; --c-sorceress: #7a4fa2; --c-cleric: #c0962a;
    --c-academic: #c4722c; --c-kali: #2c8086; --c-assassin: #3e4b70; --c-lencea: #9a5a7a; --c-machina: #5d6b78; --c-other: #8a7250;
    --rnk-ink: #3f2f1e; --rnk-muted: #8a7250; --rnk-wine: #7d414b; --rnk-gold: #c5902c; --rnk-line: #b79b6a38; --rnk-paper: #fffaf0;
}
.rnk-c-warrior { --cls: var(--c-warrior); } .rnk-c-archer { --cls: var(--c-archer); } .rnk-c-sorceress { --cls: var(--c-sorceress); }
.rnk-c-cleric { --cls: var(--c-cleric); } .rnk-c-academic { --cls: var(--c-academic); } .rnk-c-kali { --cls: var(--c-kali); }
.rnk-c-assassin { --cls: var(--c-assassin); } .rnk-c-lencea { --cls: var(--c-lencea); } .rnk-c-machina { --cls: var(--c-machina); }
.rnk-c-other { --cls: var(--c-other); }

.rnk-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rnk-muted { color: #b5a07c; }
.rnk-note { margin: 12px 0 0; color: #9a7f57; font-size: 11.5px; line-height: 1.55; }
.rnk-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 12px; color: #63383d; font-size: 16px; font-weight: 700; line-height: 1.35; }
.rnk-h span { color: var(--rnk-muted); font-size: 12px; font-weight: 500; }
.rnk-empty-line { margin: 6px 0; padding: 28px 12px; color: var(--rnk-muted); font-size: 13.5px; text-align: center; }
.rnk-empty-line b { display: block; margin-bottom: 2px; color: #6d5636; font-size: 15px; }

/* ------------------------------------------------------------------ GDN banner */
.rnk-gdn-banner { display: grid; grid-template-columns: 34px minmax(0, auto) minmax(0, 1fr) auto; align-items: center; gap: 8px 14px; margin: 0 0 14px; padding: 8px 12px 8px 14px; border-radius: 4px; background: linear-gradient(100deg, #173a2b, #2a6145 58%, #367352); color: #eaf5e6; cursor: pointer; box-shadow: inset 3px 0 0 #caa04a; transition: filter .15s; }
.rnk-gdn-banner:hover { filter: brightness(1.08); }
.rnk-gdn-banner__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #0b1f1640; color: #f1d58f; }
.rnk-gdn-banner__mark svg { width: 19px; height: 19px; }
.rnk-gdn-banner__text { display: grid; line-height: 1.3; }
.rnk-gdn-banner__text small { color: #e5c67f; font-size: 9.5px; font-weight: 700; letter-spacing: .12em; }
.rnk-gdn-banner__text b { color: #fff6dc; font-size: 15px; }
.rnk-gdn-banner__state { color: #ffd98a; font-size: 13px; font-weight: 600; }
.rnk-gdn-banner__cta { color: #fff3cf; font-size: 12.5px; font-weight: 600; white-space: nowrap; }

/* ------------------------------------------------------------------ main tabs (radio + label, no JS) */
.rnk-tabs { position: relative; }
.rnk-radio, .rnk-nest-radio, .rnk-view-radio { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rnk-tablist { --n: 3; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; margin-bottom: 22px; padding: 4px; border-radius: 4px; background: #e9d8b6a8; }
.rnk-tablist--4 { --n: 4; } .rnk-tablist--5 { --n: 5; } .rnk-tablist--6 { --n: 6; } .rnk-tablist--7 { --n: 7; }
.rnk-tab { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 8px 10px; border-radius: 3px; color: #624b2f; font-size: 14.5px; font-weight: 600; cursor: pointer; user-select: none; transition: background .15s, color .15s, box-shadow .15s; }
.rnk-tab:hover { background: #fff6e0b0; color: var(--rnk-wine); }
.rnk-tab__icon { flex: none; width: 20px; height: 20px; color: #a07a44; }
.rnk-tab__text { display: grid; line-height: 1.25; }
.rnk-tab__text small { color: #a78551; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.rnk-tab--gdn .rnk-tab__icon { color: #3f7a55; }

#rk-pve:checked ~ .rnk-tablist .rnk-tab--pve, #rk-pvp:checked ~ .rnk-tablist .rnk-tab--pvp,
#rk-guild:checked ~ .rnk-tablist .rnk-tab--guild, #rk-gold:checked ~ .rnk-tablist .rnk-tab--gold,
#rk-level:checked ~ .rnk-tablist .rnk-tab--level, #rk-classes:checked ~ .rnk-tablist .rnk-tab--classes { background: linear-gradient(180deg, #824650, #63343d); color: #f8e9c5; box-shadow: 0 3px 9px #5b2d3633, inset 0 -2px 0 #c49b51; }
#rk-gdn:checked ~ .rnk-tablist .rnk-tab--gdn { background: linear-gradient(180deg, #2f6b4b, #1c4232); color: #f3f9ee; box-shadow: 0 3px 9px #12291f33, inset 0 -2px 0 #c49b51; }
#rk-pve:checked ~ .rnk-tablist .rnk-tab--pve :is(.rnk-tab__icon, small), #rk-pvp:checked ~ .rnk-tablist .rnk-tab--pvp :is(.rnk-tab__icon, small),
#rk-guild:checked ~ .rnk-tablist .rnk-tab--guild :is(.rnk-tab__icon, small), #rk-gold:checked ~ .rnk-tablist .rnk-tab--gold :is(.rnk-tab__icon, small),
#rk-level:checked ~ .rnk-tablist .rnk-tab--level :is(.rnk-tab__icon, small), #rk-classes:checked ~ .rnk-tablist .rnk-tab--classes :is(.rnk-tab__icon, small),
#rk-gdn:checked ~ .rnk-tablist .rnk-tab--gdn :is(.rnk-tab__icon, small) { color: #e6c77f; }
#rk-pve:focus-visible ~ .rnk-tablist .rnk-tab--pve, #rk-pvp:focus-visible ~ .rnk-tablist .rnk-tab--pvp,
#rk-guild:focus-visible ~ .rnk-tablist .rnk-tab--guild, #rk-gold:focus-visible ~ .rnk-tablist .rnk-tab--gold,
#rk-level:focus-visible ~ .rnk-tablist .rnk-tab--level, #rk-classes:focus-visible ~ .rnk-tablist .rnk-tab--classes,
#rk-gdn:focus-visible ~ .rnk-tablist .rnk-tab--gdn { outline: 3px solid #b8892a; outline-offset: 2px; }

.rnk-panel { display: none; }
#rk-pve:checked ~ .rnk-panel--pve, #rk-pvp:checked ~ .rnk-panel--pvp, #rk-guild:checked ~ .rnk-panel--guild,
#rk-gold:checked ~ .rnk-panel--gold, #rk-level:checked ~ .rnk-panel--level, #rk-classes:checked ~ .rnk-panel--classes,
#rk-gdn:checked ~ .rnk-panel--gdn { display: block; animation: rnk-in .2s ease-out; }
@keyframes rnk-in { from { opacity: 0; transform: translateY(3px); } }

/* ------------------------------------------------------------------ avatars + stacks */
.rnk-ava { --cls: var(--c-other); position: relative; display: inline-grid; flex: none; place-items: center; width: 36px; height: 36px; overflow: hidden; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #fffaf0, #efe0bf); box-shadow: 0 0 0 2px var(--cls); }
.rnk-ava img { width: 100%; height: 100%; object-fit: cover; }
.rnk-ava--xs { width: 22px; height: 22px; box-shadow: 0 0 0 1.5px var(--cls); }
.rnk-ava--sm { width: 28px; height: 28px; box-shadow: 0 0 0 1.5px var(--cls); }
.rnk-ava--lg { width: 66px; height: 66px; box-shadow: 0 0 0 3px var(--cls), 0 0 0 5px var(--rnk-paper), 0 4px 12px #4c331b2e; }
.rnk-ava--mono { background: var(--cls); color: #fff8ea; font-size: 15px; font-weight: 700; line-height: 1; }
.rnk-ava--xs.rnk-ava--mono { font-size: 10px; } .rnk-ava--sm.rnk-ava--mono { font-size: 11px; } .rnk-ava--lg.rnk-ava--mono { font-size: 28px; }
.rnk-stack { display: inline-flex; align-items: center; padding-left: 3px; }
.rnk-stack .rnk-ava { box-shadow: 0 0 0 1.5px var(--cls), 0 0 0 3px var(--rnk-paper); }
.rnk-stack .rnk-ava + .rnk-ava { margin-left: -6px; }
.rnk-stack--xs .rnk-ava + .rnk-ava { margin-left: -5px; }
.rnk-stack .rnk-ava:hover { z-index: 1; }

/* guild crest (shield + first letter) */
.rnk-crest { position: relative; display: inline-grid; flex: none; place-items: center; width: 58px; height: 66px; }
.rnk-crest svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: #7d414b; stroke: #d9b467; stroke-width: 2; }
.rnk-crest b { position: relative; margin-top: -4px; color: #f8e9c5; font-size: 23px; font-weight: 800; }
.rnk-crest--sm { width: 28px; height: 32px; }
.rnk-crest--sm svg { stroke-width: 2.5; }
.rnk-crest--sm b { margin-top: -2px; font-size: 12.5px; }

/* ------------------------------------------------------------------ podium (2 | 1 | 3) */
.rnk-podium { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.14fr) minmax(0, 1fr); align-items: end; gap: 16px; margin: 20px 0 18px; padding: 0; list-style: none; }
.rnk-pod { --tint: #f6e6d6; --edge: #a9703e; position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 28px 14px 18px; border-top: 3px solid var(--edge); border-radius: 4px; background: linear-gradient(180deg, var(--tint), #fffaf000 85%); text-align: center; }
.rnk-pod--1 { --tint: #fff0c4; --edge: #c5902c; grid-row: 1; grid-column: 2; min-height: 236px; padding-top: 38px; }
.rnk-pod--2 { --tint: #eceff0; --edge: #969ea4; grid-row: 1; grid-column: 1; min-height: 210px; }
.rnk-pod--3 { grid-row: 1; grid-column: 3; min-height: 196px; }
.rnk-pod--1::before { content: ''; position: absolute; top: 9px; left: 50%; width: 28px; height: 18px; transform: translateX(-50%); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Cpath d='M1.5 4l5.5 4.5L12 1l5 7.5L22.5 4 20 15H4Z' fill='%23d9a531' stroke='%23946713' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.rnk-pod__medal { position: absolute; top: -15px; left: 12px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f6c868, #b8841f); color: #fff8e0; font-size: 14px; font-weight: 800; box-shadow: 0 0 0 2px var(--rnk-paper); font-variant-numeric: tabular-nums; }
.rnk-pod--2 .rnk-pod__medal { background: radial-gradient(circle at 35% 30%, #e3e7ea, #8a9298); }
.rnk-pod--3 .rnk-pod__medal { background: radial-gradient(circle at 35% 30%, #e0a676, #94602f); }
.rnk-pod__name { max-width: 100%; overflow: hidden; margin-top: 6px; color: var(--rnk-ink); font-size: 16px; font-weight: 700; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.rnk-pod--1 .rnk-pod__name { font-size: 18px; }
.rnk-pod__meta { max-width: 100%; overflow: hidden; color: var(--rnk-muted); font-size: 12.5px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.rnk-pod__value { margin-top: auto; padding-top: 8px; color: #7c3f49; font-size: 20px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.rnk-pod--1 .rnk-pod__value { font-size: 23px; }
.rnk-pod__sub { color: var(--rnk-muted); font-size: 12px; }
.rnk-panel--gold .rnk-pod__value::before, .rnk-panel--gold .rnk-table__num b::before { content: ''; display: inline-block; width: .7em; height: .7em; margin-right: 6px; border: 1.5px solid #a8761f; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff1b8, #f2c24f 55%, #c8901f); vertical-align: -.02em; }
.rnk-panel--gold .rnk-pod__value, .rnk-panel--gold .rnk-table__num b { color: #8a5a0e; }

/* runs podium: time is the headline, then party, one muted line, avatar stack */
.rnk-podium--runs .rnk-pod { min-height: 0; gap: 3px; padding-top: 24px; }
.rnk-podium--runs .rnk-pod--1 { padding-top: 34px; }
.rnk-pod__time { color: #7c3f49; font-size: 28px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rnk-pod--1 .rnk-pod__time { font-size: 32px; }
.rnk-podium--runs .rnk-pod__name { margin-top: 4px; font-size: 14.5px; }
.rnk-podium--runs .rnk-stack { margin-top: 10px; }

/* ------------------------------------------------------------------ list 4-10: plain rows, one hairline between */
.rnk-table { width: 100%; margin: 0; border-collapse: collapse; color: var(--rnk-ink); font-size: 14px; }
.rnk-table th { padding: 0 10px 6px; border: 0; border-bottom: 1px solid #b79b6a66; color: #9a7f57; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-align: left; white-space: nowrap; }
.rnk-table td { padding: 10px; border: 0; border-bottom: 1px solid var(--rnk-line); background: transparent; vertical-align: middle; transition: background .15s; }
.rnk-table tbody tr:last-child td { border-bottom: 0; }
.rnk-table tbody tr:hover td { background: #fff4dc90; }
.rnk-table__rank { width: 48px; }
.rnk-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #efe2c4; color: #6d5636; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rnk-table__who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.rnk-table__name { display: grid; min-width: 0; }
.rnk-table__name b { overflow: hidden; font-size: 15px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.rnk-table__inline { display: none; color: var(--rnk-muted); font-size: 11.5px; line-height: 1.45; }
.rnk-table td.rnk-table__opt { color: #6d5636; font-size: 13px; }
.rnk-table__num { text-align: right !important; white-space: nowrap; }
.rnk-table__num b { color: #7c3f49; font-size: 15.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rnk-table__num small { margin-left: 8px; color: var(--rnk-muted); font-size: 12px; }
.rnk-table__time { width: 92px; }
.rnk-table__time b { color: #7c3f49; font-size: 15.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rnk-table__party { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; }
.rnk-table__party > b { font-size: 14.5px; }
.rnk-table__date { width: 90px; white-space: nowrap; }

/* ------------------------------------------------------------------ PvE: sub-tabs, week, nest picker */
.rnk-pve__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.rnk-views { --ctl: 44px; box-sizing: border-box; display: inline-flex; flex: none; align-items: stretch; gap: 2px; height: var(--ctl); margin: 0; padding: 4px; border: 1px solid #b79b6a99; border-radius: 99px; background: #efe2c4; }
.rnk-view { display: flex; align-items: center; margin: 0; padding: 0 18px; border-radius: 99px; color: #6d5636; font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; user-select: none; transition: background .15s, color .15s; }
.rnk-view:hover { color: var(--rnk-wine); }
#rk-pv-week:checked ~ .rnk-pve__bar .rnk-view--week, #rk-pv-hall:checked ~ .rnk-pve__bar .rnk-view--hall { background: var(--rnk-paper); color: var(--rnk-wine); box-shadow: 0 1px 2px #6e4a251f; }
#rk-pv-week:focus-visible ~ .rnk-pve__bar .rnk-view--week, #rk-pv-hall:focus-visible ~ .rnk-pve__bar .rnk-view--hall { outline: 3px solid #b8892a; outline-offset: 1px; }
#rk-pv-week:checked ~ .rnk-nest .rnk-nest__hall, #rk-pv-hall:checked ~ .rnk-nest .rnk-nest__week { display: none; }
.rnk-pve__meta { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 0 auto; }
.rnk-week { color: var(--rnk-muted); font-size: 12px; }
.rnk-info { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid #b08b50; border-radius: 50%; color: #8a6a35; font-size: 11px; font-weight: 700; line-height: 1; cursor: help; }
.rnk-info:focus-visible { outline: 2px solid #b8892a; outline-offset: 2px; }
.rnk-info::after { content: attr(data-tip); position: absolute; z-index: 5; top: calc(100% + 8px); right: -6px; width: min(320px, 80vw); padding: 9px 11px; border-radius: 4px; background: #3f2a22; color: #f6ead6; font-size: 12px; font-weight: 400; line-height: 1.55; text-align: left; box-shadow: 0 6px 16px #0004; opacity: 0; visibility: hidden; transform: translateY(-3px); transition: opacity .15s, transform .15s, visibility .15s; pointer-events: none; }
.rnk-info:hover::after, .rnk-info:focus::after { opacity: 1; visibility: visible; transform: none; }

/* nest picker: one native <select> (desktop + phones), styled; chevron = data: SVG (img-src allows data:) */
.rnk-nest-pick { position: relative; display: flex; flex: 1 1 260px; max-width: 420px; margin: 0; padding: 0; }
.rnk-nest-pick[hidden] { display: none; }
.rnk-nest-select { box-sizing: border-box; width: 100%; height: 44px; margin: 0; padding: 0 42px 0 18px; border: 1px solid #b79b6a99; border-radius: 99px; background: var(--rnk-paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d414b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 15px center / 16px no-repeat; color: var(--rnk-wine); font: inherit; font-size: 15px; font-weight: 700; line-height: 1.3; text-overflow: ellipsis; cursor: pointer; appearance: none; -webkit-appearance: none; transition: border-color .15s, box-shadow .15s; }
.rnk-nest-select:hover { border-color: var(--rnk-wine); }
.rnk-nest-select:focus-visible { outline: 3px solid #b8892a; outline-offset: 2px; }
.rnk-nest-select optgroup { color: #8a6a35; font-style: normal; font-weight: 700; }
.rnk-nest-select option { color: var(--rnk-ink); font-weight: 500; }
/* no-JS fallback: plain links (radio labels); hidden once ranking.js shows the select */
.rnk-nest-links { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; color: var(--rnk-muted); font-size: 13px; }
.rnk-pve__bar.has-select .rnk-nest-links { display: none; }
.rnk-nest-link { color: var(--rnk-wine); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rnk-nest { display: none; }
#rk-nest-0:checked ~ .rnk-nest--0, #rk-nest-1:checked ~ .rnk-nest--1, #rk-nest-2:checked ~ .rnk-nest--2, #rk-nest-3:checked ~ .rnk-nest--3, #rk-nest-4:checked ~ .rnk-nest--4, #rk-nest-5:checked ~ .rnk-nest--5, #rk-nest-6:checked ~ .rnk-nest--6, #rk-nest-7:checked ~ .rnk-nest--7, #rk-nest-8:checked ~ .rnk-nest--8, #rk-nest-9:checked ~ .rnk-nest--9, #rk-nest-10:checked ~ .rnk-nest--10, #rk-nest-11:checked ~ .rnk-nest--11, #rk-nest-12:checked ~ .rnk-nest--12, #rk-nest-13:checked ~ .rnk-nest--13, #rk-nest-14:checked ~ .rnk-nest--14, #rk-nest-15:checked ~ .rnk-nest--15, #rk-nest-16:checked ~ .rnk-nest--16, #rk-nest-17:checked ~ .rnk-nest--17, #rk-nest-18:checked ~ .rnk-nest--18, #rk-nest-19:checked ~ .rnk-nest--19, #rk-nest-20:checked ~ .rnk-nest--20, #rk-nest-21:checked ~ .rnk-nest--21, #rk-nest-22:checked ~ .rnk-nest--22, #rk-nest-23:checked ~ .rnk-nest--23 { display: block; }
#rk-nest-0:checked ~ .rnk-pve__bar .rnk-nest-link--0, #rk-nest-1:checked ~ .rnk-pve__bar .rnk-nest-link--1, #rk-nest-2:checked ~ .rnk-pve__bar .rnk-nest-link--2, #rk-nest-3:checked ~ .rnk-pve__bar .rnk-nest-link--3, #rk-nest-4:checked ~ .rnk-pve__bar .rnk-nest-link--4, #rk-nest-5:checked ~ .rnk-pve__bar .rnk-nest-link--5, #rk-nest-6:checked ~ .rnk-pve__bar .rnk-nest-link--6, #rk-nest-7:checked ~ .rnk-pve__bar .rnk-nest-link--7, #rk-nest-8:checked ~ .rnk-pve__bar .rnk-nest-link--8, #rk-nest-9:checked ~ .rnk-pve__bar .rnk-nest-link--9, #rk-nest-10:checked ~ .rnk-pve__bar .rnk-nest-link--10, #rk-nest-11:checked ~ .rnk-pve__bar .rnk-nest-link--11, #rk-nest-12:checked ~ .rnk-pve__bar .rnk-nest-link--12, #rk-nest-13:checked ~ .rnk-pve__bar .rnk-nest-link--13, #rk-nest-14:checked ~ .rnk-pve__bar .rnk-nest-link--14, #rk-nest-15:checked ~ .rnk-pve__bar .rnk-nest-link--15, #rk-nest-16:checked ~ .rnk-pve__bar .rnk-nest-link--16, #rk-nest-17:checked ~ .rnk-pve__bar .rnk-nest-link--17, #rk-nest-18:checked ~ .rnk-pve__bar .rnk-nest-link--18, #rk-nest-19:checked ~ .rnk-pve__bar .rnk-nest-link--19, #rk-nest-20:checked ~ .rnk-pve__bar .rnk-nest-link--20, #rk-nest-21:checked ~ .rnk-pve__bar .rnk-nest-link--21, #rk-nest-22:checked ~ .rnk-pve__bar .rnk-nest-link--22, #rk-nest-23:checked ~ .rnk-pve__bar .rnk-nest-link--23 { color: var(--rnk-ink); font-weight: 700; text-decoration: none; }
#rk-nest-0:focus-visible ~ .rnk-pve__bar .rnk-nest-link--0, #rk-nest-1:focus-visible ~ .rnk-pve__bar .rnk-nest-link--1, #rk-nest-2:focus-visible ~ .rnk-pve__bar .rnk-nest-link--2, #rk-nest-3:focus-visible ~ .rnk-pve__bar .rnk-nest-link--3, #rk-nest-4:focus-visible ~ .rnk-pve__bar .rnk-nest-link--4, #rk-nest-5:focus-visible ~ .rnk-pve__bar .rnk-nest-link--5, #rk-nest-6:focus-visible ~ .rnk-pve__bar .rnk-nest-link--6, #rk-nest-7:focus-visible ~ .rnk-pve__bar .rnk-nest-link--7, #rk-nest-8:focus-visible ~ .rnk-pve__bar .rnk-nest-link--8, #rk-nest-9:focus-visible ~ .rnk-pve__bar .rnk-nest-link--9, #rk-nest-10:focus-visible ~ .rnk-pve__bar .rnk-nest-link--10, #rk-nest-11:focus-visible ~ .rnk-pve__bar .rnk-nest-link--11, #rk-nest-12:focus-visible ~ .rnk-pve__bar .rnk-nest-link--12, #rk-nest-13:focus-visible ~ .rnk-pve__bar .rnk-nest-link--13, #rk-nest-14:focus-visible ~ .rnk-pve__bar .rnk-nest-link--14, #rk-nest-15:focus-visible ~ .rnk-pve__bar .rnk-nest-link--15, #rk-nest-16:focus-visible ~ .rnk-pve__bar .rnk-nest-link--16, #rk-nest-17:focus-visible ~ .rnk-pve__bar .rnk-nest-link--17, #rk-nest-18:focus-visible ~ .rnk-pve__bar .rnk-nest-link--18, #rk-nest-19:focus-visible ~ .rnk-pve__bar .rnk-nest-link--19, #rk-nest-20:focus-visible ~ .rnk-pve__bar .rnk-nest-link--20, #rk-nest-21:focus-visible ~ .rnk-pve__bar .rnk-nest-link--21, #rk-nest-22:focus-visible ~ .rnk-pve__bar .rnk-nest-link--22, #rk-nest-23:focus-visible ~ .rnk-pve__bar .rnk-nest-link--23 { outline: 3px solid #b8892a; outline-offset: 2px; }
.rnk-hall-note { margin: 0 0 -6px; color: var(--rnk-muted); font-size: 12px; }
.rnk-hidden-note { margin: 8px 0 14px; padding: 9px 12px; border-left: 3px solid #3f7a55; background: #e6f0e299; color: #2f5a40; font-size: 13px; line-height: 1.5; }

/* ------------------------------------------------------------------ classes */
.rnk-classes { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px 34px; align-items: start; }
.rnk-classes__chart { display: grid; justify-items: center; gap: 14px; padding-top: 4px; text-align: center; }
.rnk-classes__cap p { margin: -6px 0 0; color: var(--rnk-muted); font-size: 12.5px; }
.rnk-classes__cap .rnk-h { justify-content: center; margin-bottom: 8px; }
.rnk-donut { position: relative; width: 200px; height: 200px; border-radius: 50%; box-shadow: 0 0 0 4px var(--rnk-paper), 0 8px 18px #6e4a251f; }
.rnk-donut__hole { position: absolute; inset: 23%; display: grid; place-content: center; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fffaf0, #f3e6c6); text-align: center; }
.rnk-donut__hole b { color: #63383d; font-size: 28px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rnk-donut__hole small { color: var(--rnk-muted); font-size: 12px; }
.rnk-cbars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; margin: 0; padding: 0; list-style: none; }
.rnk-cbar { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 12px; }
.rnk-cbar .rnk-ava { width: 34px; height: 34px; }
.rnk-cbar__body { display: grid; min-width: 0; }
.rnk-cbar__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rnk-cbar__top b { color: var(--rnk-ink); font-size: 14.5px; }
.rnk-cbar__top span { color: var(--rnk-muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rnk-cbar__top strong { color: var(--cls); font-size: 14.5px; }
.rnk-cbar__track { display: block; height: 6px; margin: 5px 0 4px; overflow: hidden; border-radius: 99px; background: #eadbbb; }
.rnk-cbar__track i { display: block; height: 100%; border-radius: inherit; background: var(--cls); }
.rnk-cbar__jobs { overflow: hidden; color: var(--rnk-muted); font-size: 11.5px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.rnk-classes__note { grid-column: 1 / -1; }

/* ------------------------------------------------------------------ GDN Challenge */
.rnk-gdn__hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 14px 22px; padding: 20px 22px; border-radius: 5px; background: radial-gradient(120% 160% at 0 0, #2f6b4b, #1c4232 55%, #11281e); color: #eaf5e6; box-shadow: inset 3px 0 0 #caa04a; }
.rnk-gdn__mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #0b1f1640; color: #f1d58f; }
.rnk-gdn__mark svg { width: 36px; height: 36px; }
.rnk-gdn__text { display: grid; gap: 3px; min-width: 0; }
.rnk-gdn__text small, .rnk-gdn__head small { color: #e5c67f; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; }
.rnk-gdn__head small { color: #3f7a55; }
.rnk-gdn__text h3 { margin: 0; color: #fff6dc; font-size: 22px; font-weight: 800; line-height: 1.25; }
.rnk-gdn__reveal { margin: 2px 0 0; color: #ffd98a; font-size: 14.5px; font-weight: 700; }
.rnk-gdn__note { margin: 0; color: #bcd6c2; font-size: 12px; line-height: 1.5; }
.rnk-count { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; }
.rnk-count > small { color: #bcd6c2; font-size: 11.5px; font-weight: 600; }
.rnk-count__units { display: flex; gap: 6px; }
.rnk-count__units span { display: grid; justify-items: center; min-width: 56px; padding: 7px 6px 5px; border-radius: 4px; background: #0b1f1655; }
.rnk-count__units b { color: #fff3cf; font-size: 26px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rnk-count__units small { color: #bcd6c2; font-size: 10.5px; }
.rnk-count__done { max-width: 280px; margin: 0; color: #ffd98a; font-size: 12.5px; text-align: center; }
.rnk-count.is-done .rnk-count__units { opacity: .55; }
.rnk-gdn__entered { margin-top: 20px; }
.rnk-gdn__head .rnk-h { margin: 2px 0 0; }
.rnk-entered { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 0; padding: 0; list-style: none; }
.rnk-entered > li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 10px 2px; border-bottom: 1px solid var(--rnk-line); }
.rnk-entered__who { display: grid; min-width: 0; }
.rnk-entered__who b { overflow: hidden; color: var(--rnk-ink); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.rnk-entered__who small { color: var(--rnk-muted); font-size: 12px; }

/* ------------------------------------------------------------------ server status strip (compact Blessing + Gold) */
.rnk-status { margin-top: 30px; padding-top: 20px; border-top: 1px solid #b79b6a55; }
.rnk-status__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 12px; }
.rnk-status__head small { color: #a78551; font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.rnk-status__head h3 { margin: 0; color: #63383d; font-size: 17px; font-weight: 700; }
.rnk-status__grid { display: grid; gap: 14px; }
.rnk-status__grid--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.rnk-status .rk-bless, .rnk-status .rk-pool { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 12px; margin: 0; padding: 16px 16px 14px; }
.rnk-status .rk-bless__stone { flex-basis: 40px; width: 40px; height: 44px; }
.rnk-status .rk-bless__title strong { font-size: 17px; }
.rnk-status .rk-bless__title p { font-size: 11.5px; }
.rnk-status .rk-bless__slot { gap: 6px; padding: 9px 11px; }
.rnk-status .rk-bless__who b { font-size: 15px; }
.rnk-status .rk-bless__time { padding-top: 6px; }
.rnk-status .rk-bless__time b { font-size: 16px; }
.rnk-status .rk-bless__note, .rnk-status .rk-flow__note { font-size: 11px; }
.rnk-status .rk-pool__coin { flex-basis: 44px; width: 44px; height: 44px; }
.rnk-status .rk-pool__main strong { font-size: 25px; }
.rnk-status .rk-pool__parts { gap: 8px; }
.rnk-status .rk-pool__part { grid-template-columns: 24px minmax(0, 1fr); column-gap: 7px; padding: 7px 9px; }
.rnk-status .rk-pool__icon { width: 24px; height: 24px; }
.rnk-status .rk-pool__icon svg { width: 14px; height: 14px; }
.rnk-status .rk-pool__part dd { font-size: 13.5px; }
.rnk-status .rk-flow { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-top: 10px; }
.rnk-status .rk-flow__num b { font-size: 16px; }
.rnk-status .rk-flow__bars { height: 40px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
    .rnk-tablist--6, .rnk-tablist--7 { --n: 3; }
}
@media (max-width: 993px) {
    .rnk-classes { grid-template-columns: minmax(0, 1fr); }
    .rnk-classes__chart { grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-items: start; text-align: left; }
    .rnk-classes__cap .rnk-h { justify-content: flex-start; }
    .rnk-status__grid--2 { grid-template-columns: minmax(0, 1fr); }
    .rnk-gdn__hero { grid-template-columns: 52px minmax(0, 1fr); }
    .rnk-gdn__mark { width: 52px; height: 52px; }
    .rnk-gdn__mark svg { width: 28px; height: 28px; }
    .rnk-count { grid-column: 1 / -1; justify-items: start; }
}
@media (max-width: 760px) {
    .rnk-tablist--4 { --n: 2; } .rnk-tablist--5, .rnk-tablist--6, .rnk-tablist--7 { --n: 3; }
    .rnk-tab { flex-direction: column; gap: 3px; min-height: 56px; padding: 7px 4px; font-size: 13px; text-align: center; }
    .rnk-tab__text { justify-items: center; }
    .rnk-tab__icon { width: 19px; height: 19px; }
    .rnk-gdn-banner { grid-template-columns: 34px minmax(0, 1fr) auto; }
    .rnk-gdn-banner__state { grid-column: 2 / -1; grid-row: 2; }
    .rnk-gdn-banner__cta { grid-column: 3; grid-row: 1; }
    .rnk-nest-pick { flex-basis: 100%; max-width: none; }
    /* podium stacks 1, 2, 3 as compact rows */
    .rnk-podium { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 16px; }
    .rnk-pod, .rnk-pod--1, .rnk-pod--2, .rnk-pod--3 { grid-column: 1; grid-row: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "ava name value" "ava meta sub"; align-items: center; gap: 0 12px; min-height: 0; padding: 12px 12px 12px 22px; border-top: 0; border-left: 3px solid var(--edge); text-align: left; background: linear-gradient(100deg, var(--tint), #fffaf000 80%); }
    .rnk-pod--1::before { display: none; }
    .rnk-pod__medal { top: 50%; left: -14px; width: 26px; height: 26px; font-size: 12.5px; transform: translateY(-50%); }
    .rnk-pod .rnk-ava--lg, .rnk-pod .rnk-crest { grid-area: ava; }
    .rnk-pod .rnk-ava--lg { width: 46px; height: 46px; box-shadow: 0 0 0 2px var(--cls), 0 0 0 4px var(--rnk-paper); }
    .rnk-pod .rnk-crest { width: 40px; height: 46px; }
    .rnk-pod .rnk-crest b { font-size: 17px; }
    .rnk-pod__name, .rnk-pod--1 .rnk-pod__name { grid-area: name; margin: 0; font-size: 15.5px; }
    .rnk-pod__meta { grid-area: meta; }
    .rnk-pod__value, .rnk-pod--1 .rnk-pod__value { grid-area: value; margin: 0; padding: 0; font-size: 17px; text-align: right; }
    .rnk-pod__sub { grid-area: sub; text-align: right; }
    .rnk-podium--runs .rnk-pod, .rnk-podium--runs .rnk-pod--1 { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name time" "meta stack"; padding-top: 12px; }
    .rnk-pod__time, .rnk-pod--1 .rnk-pod__time { grid-area: time; font-size: 20px; text-align: right; }
    .rnk-podium--runs .rnk-stack { grid-area: stack; justify-self: end; margin-top: 4px; }
    /* list: hide guild / date columns, repeat them under the party */
    .rnk-table th.rnk-table__opt, .rnk-table td.rnk-table__opt { display: none; }
    .rnk-table__inline { display: block; }
    .rnk-table th, .rnk-table td { padding-inline: 6px; }
    .rnk-table__rank { width: 38px; }
    .rnk-num { width: 26px; height: 26px; font-size: 12px; }
    .rnk-table__num b, .rnk-table__time b { font-size: 14.5px; }
    .rnk-table__num small { display: block; margin: 0; }
    .rnk-table__time { width: 70px; }
    .rnk-entered { grid-template-columns: minmax(0, 1fr); }
    .rnk-cbars { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
    .rnk-classes__chart { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
    .rnk-classes__cap .rnk-h { justify-content: center; }
    .rnk-donut { width: 170px; height: 170px; }
    .rnk-gdn__hero { padding: 16px 14px; }
    .rnk-count__units { gap: 5px; }
    .rnk-count__units span { min-width: 50px; }
    .rnk-count__units b { font-size: 22px; }
    .rnk-pve__meta { margin-left: 0; }
    .rnk-table__who { gap: 8px; }
    .rnk-table__who .rnk-ava { width: 30px; height: 30px; }
    .rnk-table__name b { font-size: 14px; }
    .rnk-status .rk-pool__parts { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .rnk-tab, .rnk-table td, .rnk-gdn-banner, .rnk-nest-select, .rnk-view, .rnk-info::after { transition: none; }
    #rk-pve:checked ~ .rnk-panel--pve, #rk-pvp:checked ~ .rnk-panel--pvp, #rk-guild:checked ~ .rnk-panel--guild,
    #rk-gold:checked ~ .rnk-panel--gold, #rk-level:checked ~ .rnk-panel--level, #rk-classes:checked ~ .rnk-panel--classes,
    #rk-gdn:checked ~ .rnk-panel--gdn { animation: none; }
}
