/* Match the homepage journal palette, paper texture, and navigation. */
:root {
  --bg:#e9dfc5; --panel:#e2d5b6; --ink:#30382b; --muted:#70664f;
  --line:#65553838; --acid:#465c38; --paper:#f3e9d0; --rust:#8b4430;
  --display:'Palatino Linotype','Book Antiqua',Palatino,Georgia,serif;
  --gutter:clamp(22px,5.2vw,100px);
  color-scheme:light;
}
.community-page::after { opacity:.11; mix-blend-mode:multiply; }
.community-page::before { content:''; position:fixed; inset:0; pointer-events:none; z-index:10; box-shadow:inset 0 0 95px #77552718; }
::selection { background:#536346; color:var(--paper); }
.community-page .section-shell { max-width:1700px; }
.community-page .masthead { min-height:88px; background:#eee4cd55; border-color:var(--line); }
.community-page .main-nav { font-size:14px; gap:32px; }
.community-page .main-nav a { padding-block:14px; }
.community-page .nav-download { min-height:46px; padding:12px 22px; border-color:#65553870; font-size:13px; background:#f9efda40; }
.community-page .nav-download:hover { color:var(--ink); background:#ded1b4; border-color:var(--acid); }
.community-page .mobile-menu { top:100%; background:#eee3c9; border-color:var(--line); box-shadow:0 14px 24px #4c3a251a; }
.community-page .menu-toggle { flex-direction:column; align-items:center; justify-content:center; gap:6px; }
.community-page .menu-toggle span { margin:0; flex-shrink:0; }
.community-page .menu-toggle[aria-expanded=true] span:first-child { transform:translateY(3.5px) rotate(45deg); }
.community-page .menu-toggle[aria-expanded=true] span:last-child { transform:translateY(-3.5px) rotate(-45deg); }
.community-page .section-kicker { color:#786b4e; }
.community-page .section-kicker i { background:#7a8556; transform:rotate(45deg); width:5px; height:5px; }
.community-page .outline-text { color:#68734a; -webkit-text-stroke:0; font-style:italic; }
.community-page .skip-link { color:var(--paper); }
.community-page a:focus-visible,.community-page button:focus-visible { outline:2px solid var(--acid); outline-offset:5px; }
.community-page .footer-top { border-color:var(--line); }
.community-page .footer-top>p { color:#78694e; font:italic 18px/1.4 var(--display); }
.community-page .footer-bottom,.community-page .footer-bottom nav { color:#70664f; }
.community-page .footer-bottom a:hover { color:var(--acid); }
@media(max-width:1150px) { .community-page .main-nav { gap:22px; font-size:12px; } }
@media(max-width:820px) { .community-page .masthead { min-height:76px; } .community-page .menu-toggle:not([hidden]) { display:flex; } }
@media(max-width:580px) {
  .community-page .masthead { gap:17px; padding-inline:20px; }
  .community-page .brand { font-size:23px; gap:8px; }
  .community-page .nav-download { min-height:42px; padding:10px 12px; font-size:11px; }
}

/* Leaderboard and player pages share the homepage's typography, color, and navigation. */
.community-page { min-height:100svh; display:flex; flex-direction:column; background:radial-gradient(ellipse at 90% 0%,#faf0d8a6,transparent 40%),var(--bg); }
.community-page .masthead { position:relative; flex-shrink:0; }
.community-page .main-nav a[aria-current="page"],.community-page .mobile-menu a[aria-current="page"] { color:var(--acid); }
.community-page .main-nav a[aria-current="page"] { text-decoration:underline; text-underline-offset:8px; text-decoration-thickness:1px; }
.community-main { width:100%; flex:1; padding-top:57px; padding-bottom:72px; }
.community-heading { margin-bottom:40px; animation:community-arrive .65s var(--ease) both; }
.community-eyebrow { display:flex; justify-content:space-between; align-items:center; gap:22px; margin-bottom:27px; }
.community-eyebrow .server-state { color:#596549; white-space:nowrap; font-size:10px; letter-spacing:.08em; }
.community-heading-row { display:flex; align-items:flex-end; justify-content:space-between; gap:40px; }
.community-heading h1 { font:400 clamp(52px,6.5vw,110px)/1.04 var(--display); letter-spacing:-.055em; text-wrap:balance; margin-left:-3px; }
.community-heading-row>p { color:var(--ink); font-size:15px; line-height:1.55; flex-shrink:0; padding-bottom:5px; }
.community-heading-row>p>span { color:var(--muted); }
.community-footnote { display:flex; align-items:center; justify-content:space-between; gap:24px; padding-top:25px; margin-top:32px; border-top:1px solid var(--line); font-size:10px; letter-spacing:.1em; color:var(--muted); }
.community-footnote>a { font-size:12px; color:var(--ink); letter-spacing:0; }
.community-footnote>a>span { display:inline-block; margin-left:16px; color:var(--acid); }
.community-footnote>a:hover { color:var(--acid); }
.community-footer { width:100%; border-top:1px solid var(--line); background:#d7c8a957; }
.community-footer .back-top { font-size:10px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.service-message { color:#70664f; padding:24px 0; line-height:1.6; }

/* Data is still rendered by site.js; rank numbers remain meaningful data. */
.leaderboard-shell { position:relative; border-top:1px solid var(--line); }
.leaderboard-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:24px; padding:22px 0; }
.leaderboard-tabs { display:flex; gap:4px; }
.leaderboard-tabs button { position:relative; min-height:46px; padding:12px 24px; background:transparent; border:1px solid transparent; color:#625e4b; font-size:12px; font-weight:600; transition:color .16s,background .16s,border-color .16s; }
.leaderboard-tabs button:hover { background:#6555380c; color:var(--ink); }
.leaderboard-tabs button[aria-selected="true"] { background:var(--acid); border-color:var(--acid); color:#fff5df; }
.leaderboard-tabs button:focus-visible { outline-offset:3px; }
.leaderboard-toolbar-meta { display:flex; align-items:center; gap:24px; }
.leaderboard-born-filter { display:flex; align-items:center; gap:12px; color:#70664f; font-size:10px; text-transform:uppercase; letter-spacing:.07em; }
.leaderboard-born-filter input { min-height:44px; width:155px; min-width:0; padding:10px 12px; border:1px solid #65553850; border-radius:0; font:12px var(--body); color:var(--ink); background:#f3e9d0; color-scheme:light; }
.leaderboard-born-filter input:focus-visible { outline:1px solid var(--acid); outline-offset:3px; }
.leaderboard-updated { max-width:160px; color:#70664f; font-size:10px; line-height:1.5; }
.leaderboard-table-wrap { max-height:720px; overflow:auto; border:1px solid var(--line); scrollbar-width:thin; scrollbar-color:#8a8d68 #e2d5b6; }
.leaderboard-table-wrap:focus-visible { outline-offset:4px; }
.leaderboard-table { width:100%; border-collapse:separate; border-spacing:0; table-layout:fixed; font-variant-numeric:tabular-nums; }
.leaderboard-table thead { position:sticky; top:0; z-index:2; background:#ded2b5; }
.leaderboard-table th,.leaderboard-table td { padding:18px 26px; text-align:left; border-bottom:1px solid #65553826; }
.leaderboard-table thead th { color:#596047; font-size:9px; font-weight:600; letter-spacing:.14em; text-transform:uppercase; }
.leaderboard-table thead th:first-child { width:106px; }
.leaderboard-table thead th:last-child { width:150px; }
.leaderboard-table tbody tr { transition:background .15s; }
.leaderboard-table tbody tr:nth-child(even) { background:#65553805; }
.leaderboard-table tbody tr:hover { background:#465c380c; }
.leaderboard-table tbody tr:last-child>* { border-bottom:0; }
.leaderboard-table tbody th { font-size:15px; font-weight:600; overflow:hidden; }
.leaderboard-table tbody td { font-size:17px; }
.leaderboard-table .is-ranked { text-align:right; color:var(--acid); }
.leaderboard-table tbody .is-ranked { font-family:var(--body); font-weight:600; font-size:24px; }
.rank-number { color:#70664f; font-size:12px; }
.leaderboard-table tbody tr:nth-child(-n+3) .rank-number { color:var(--acid); }
.character-link { display:block; width:100%; overflow:hidden; padding:0; background:none; color:var(--ink); text-align:left; font:inherit; text-overflow:ellipsis; white-space:nowrap; }
.character-link:hover { color:var(--acid); }
.character-link:focus-visible { outline-offset:5px; }
.leaderboard-message { padding:56px 24px!important; text-align:center!important; color:#70664f; font-size:14px!important; line-height:1.6; }
.leaderboard-shell[aria-busy="true"] .leaderboard-table tbody { opacity:.45; }

/* Preserve the existing dialog, focus trap, and profile request selectors. */
body.profile-open { overflow:hidden; }
.profile-modal { position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:24px; }
.profile-modal-backdrop { position:absolute; inset:0; background:#383c2c70; backdrop-filter:blur(6px); }
.profile-card { position:relative; width:min(100%,660px); max-height:calc(100svh - 48px); overflow:auto; overscroll-behavior:contain; color:var(--ink); background:#f3e9d0; border:1px solid #65553850; border-top:2px solid var(--acid); box-shadow:0 25px 120px #45382138; animation:community-arrive .2s var(--ease) both; }
.profile-card:focus { outline:none; }
.profile-card-header { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:34px 32px 30px; border-bottom:1px solid var(--line); background:linear-gradient(120deg,#465c3807,transparent); }
.profile-card-header>div { min-width:0; }
.profile-card-header p { margin:0 0 10px; color:var(--acid); font-size:10px; letter-spacing:.14em; text-transform:uppercase; }
.profile-card-header h2 { margin:0; font:400 clamp(36px,5vw,60px)/1.08 var(--display); letter-spacing:-.01em; overflow-wrap:anywhere; }
.profile-close { align-self:flex-start; flex-shrink:0; display:grid; place-items:center; width:44px; height:44px; background:#65553808; border:1px solid var(--line); color:var(--ink); font-size:27px; line-height:1; }
.profile-close:hover { background:var(--acid); color:#fff5df; }
.profile-content { padding:28px 32px 32px; }
.profile-message { padding:32px 0; color:#70664f; font-size:15px; line-height:1.6; }
.profile-message.is-error { color:#8b4430; }
.profile-status-row { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:24px; }
.profile-status,.profile-title-badge { display:inline-flex; align-items:center; gap:8px; font-size:10px; letter-spacing:.07em; text-transform:uppercase; }
.profile-status { color:#70664f; }
.profile-status>span { width:6px; height:6px; border-radius:50%; background:#777a62; }
.profile-status.is-online { color:var(--acid); }
.profile-status.is-online>span { background:var(--acid); box-shadow:0 0 10px #465c3820; }
.profile-title-badge { --rarity:#625e4b; color:var(--rarity); padding:7px 10px; border:1px solid color-mix(in srgb,var(--rarity) 40%,transparent); background:color-mix(in srgb,var(--rarity) 6%,transparent); overflow-wrap:anywhere; }
.profile-title-badge[data-rarity="common"] { --rarity:#59615f; }
.profile-title-badge[data-rarity="uncommon"] { --rarity:#396d40; }
.profile-title-badge[data-rarity="rare"] { --rarity:#22638b; }
.profile-title-badge[data-rarity="epic"] { --rarity:#72508d; }
.profile-title-badge[data-rarity="legendary"] { --rarity:#835d19; }
.profile-title-badge[data-rarity="mythical"] { --rarity:#9b3d63; }
.profile-title-badge[data-rarity="heroic"] { --rarity:#ff6060; color:#fff; background:linear-gradient(90deg,#8d2727,#171010); }
.profile-facts { margin:0; border-top:1px solid var(--line); }
.profile-facts>div { display:grid; grid-template-columns:120px minmax(0,1fr); border-bottom:1px solid var(--line); }
.profile-facts dt,.profile-facts dd { margin:0; padding:18px 0; }
.profile-facts dt { color:#70664f; font-size:10px; letter-spacing:.08em; text-transform:uppercase; }
.profile-facts dd { color:var(--ink); font-size:15px; overflow-wrap:anywhere; }
.profile-pvp { margin-top:25px; padding:20px; border:1px solid var(--line); background:#65553805; }
.profile-pvp h3 { margin:0 0 8px; color:#465c38; font-size:10px; letter-spacing:.1em; text-transform:uppercase; }
.profile-pvp p { color:#70664f; font-size:13px; }
@keyframes community-arrive { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
@media(min-width:1600px) { .leaderboard-toolbar { padding-block:28px; } }
@media(max-width:1150px) {
  .leaderboard-toolbar { gap:16px; }
  .leaderboard-tabs button { padding-inline:17px; }
  .leaderboard-toolbar-meta { gap:16px; }
  .leaderboard-updated { max-width:125px; }
  .community-heading-row>p { font-size:13px; }
}
@media(max-width:1000px) {
  .leaderboard-toolbar-meta { width:100%; justify-content:space-between; }
  .leaderboard-updated { max-width:none; text-align:right; }
  .community-heading h1 { font-size:clamp(60px,8.1vw,100px); }
  .community-heading-row { gap:24px; }
  .community-heading-row>p { display:none; }
}
@media(max-width:820px) {
  .community-main { padding-top:42px; padding-bottom:48px; }
  .community-heading { margin-bottom:30px; }
  .community-heading h1 { font-size:clamp(56px,9vw,82px); }
  .community-eyebrow { margin-bottom:23px; }
  .community-eyebrow .server-state { font-size:8px; }
  .leaderboard-tabs { width:100%; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); }
  .leaderboard-tabs button { min-width:0; padding:12px 5px; font-size:11px; }
  .community-footer .back-top { font-size:9px; }
  .community-page.community-enhanced .main-nav { display:none; }
  .community-page:not(.community-enhanced) .masthead { flex-wrap:wrap; padding-block:18px; gap:18px; }
  .community-page:not(.community-enhanced) .main-nav { display:flex; position:static; inset:auto; order:3; width:100%; padding:0; flex-wrap:wrap; gap:20px; font-size:11px; }
}
@media(max-width:580px) {
  .community-main { padding-top:35px; }
  .community-eyebrow { align-items:flex-start; gap:14px; }
  .community-eyebrow .section-kicker { font-size:8px; line-height:1.5; letter-spacing:1px; }
  .community-eyebrow .server-state { font-size:7px; letter-spacing:.04em; padding-top:2px; }
  .community-heading h1 { font-size:clamp(42px,9.4vw,58px); margin-left:-1px; }
  .community-heading { margin-bottom:24px; }
  .leaderboard-toolbar { padding:18px 0; }
  .leaderboard-toolbar-meta { gap:14px; }
  .leaderboard-born-filter { flex-direction:column; align-items:flex-start; gap:7px; font-size:8px; }
  .leaderboard-born-filter input { width:151px; }
  .leaderboard-updated { max-width:118px; font-size:9px; }
  .leaderboard-table th,.leaderboard-table td { padding:18px 15px; }
  .leaderboard-table thead th:first-child { width:58px; }
  .leaderboard-table thead th:last-child { width:90px; }
  .leaderboard-table thead th { font-size:8px; letter-spacing:.06em; }
  .leaderboard-table tbody th { font-size:13px; }
  .leaderboard-table tbody .is-ranked { font-size:22px; }
  .rank-number { font-size:10px; }
  .community-footnote { flex-wrap:wrap; gap:14px; font-size:8px; line-height:1.6; }
  .community-footnote>a { font-size:11px; }
  .profile-modal { padding:14px; }
  .profile-card { max-height:calc(100svh - 28px); }
  .profile-card-header { padding:24px 21px; gap:16px; }
  .profile-content { padding:23px 21px; }
  .profile-facts>div { grid-template-columns:85px minmax(0,1fr); }
  .profile-facts dd { font-size:13px; }
  .profile-card-header h2 { font-size:40px; }
}
@media(max-width:360px) {
  .community-heading h1 { font-size:10.8vw; }
  .community-eyebrow { flex-wrap:wrap; gap:12px; margin-bottom:20px; }
  .leaderboard-tabs button { font-size:10px; padding-inline:3px; }
  .leaderboard-toolbar-meta { gap:10px; }
  .leaderboard-born-filter input { width:139px; }
}
@media(prefers-reduced-motion:reduce) {
  .community-page *,.community-page *::before,.community-page *::after { animation:none!important; scroll-behavior:auto!important; }
  .community-page .leaderboard-tabs button,.community-page .leaderboard-table tbody tr { transition:none; }
}
