/* BloxComp UI — leaderboard rows, profile header and stat strip. Uses the shared tokens in site.css :root. */
/* "Blood Arena" look on C's ladder layout. Everything here is scoped to its own classes (.ladder / .lr / .seg /
   .lb-* / .lcat / .phead / .pstat*) so it never fights site.css. Chamfers: rows and small plates clip themselves
   (nothing inside them pops out); anything holding a focusable link or a popup draws its chamfered plate on a
   ::before layer instead, so focus rings and tooltips are never clipped. */


/* ---------- page header: title + red rule, sub line, C's segmented view switch ---------- */
.lb-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 22px; margin: 0 0 16px; }
.panel .lb-top h1 { display: flex; align-items: center; gap: 12px; margin: 0; min-width: 0; }
.panel .lb-top h1::after { content: ""; flex: 1 1 24px; min-width: 24px; height: 2px; background: linear-gradient(90deg, var(--hot), transparent); }
.lb-sub { grid-column: 1; margin: 0; color: var(--muted); font-size: .86rem; }
.lb-top .seg { grid-column: 2; grid-row: 1 / span 2; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg a { position: relative; overflow: hidden; padding: 10px 24px 10px 16px; font: 800 .74rem/1 var(--label); letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; color: var(--text); background: var(--plate); box-shadow: inset 0 0 0 1px rgba(var(--tint-rgb), .22);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); transition: background-color .15s, box-shadow .15s; }
.seg a:hover { background: var(--plate-2); box-shadow: inset 0 0 0 1px rgba(var(--tint-rgb), .55); }
.seg a.on { background: var(--hot); color: var(--hot-ink); box-shadow: none; }
/* the diagonal white slash on the active segment */
.seg a.on::after { content: ""; position: absolute; right: 12px; top: -6px; bottom: -6px; width: 5px; background: rgba(var(--tint-rgb), .34);
  transform: skewX(-24deg); box-shadow: -8px 0 0 rgba(var(--tint-rgb), .14); }
/* clip-path would cut a normal outline: draw the focus ring inside the shape */
.seg a:focus-visible { outline: 3px solid var(--gold); outline-offset: -6px; }

/* ---------- filter bar: native selects (enhanced by site.js when it runs) + Find a player ---------- */
.lb-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.25fr) auto; align-items: end; gap: 12px 14px; margin: 0 0 18px; position: relative; z-index: 3; }
.lb-filters label { display: flex; flex-direction: column; gap: 7px; min-width: 0; font: 800 .64rem/1 var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.lb-filters select { width: 100%; }
/* the search input itself carries the site's control look (site.css); the box only positions the icon */
.lb-find-box { position: relative; display: block; color: var(--placeholder); }
.lb-find-box:focus-within { color: var(--text); }
.lb-find-box .ic { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); pointer-events: none; z-index: 1; }
.lb-find-box input { width: 100%; min-height: 42px; padding-left: 38px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.lb-find-box input::placeholder { color: var(--placeholder); font-weight: 600; }
.lb-actions { display: flex; gap: 8px; align-items: center; }
.lb-crumbs { margin: -4px 0 14px; }

/* ---------- the ladder: chamfered slab rows ---------- */
.ladder { --lad-cols: 58px minmax(0, 1fr) 64px 84px; display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.ladder-full.ladder-elo { --lad-cols: 64px minmax(0, 1fr) minmax(0, 150px) minmax(0, 140px) 64px 58px 64px 86px; }
.ladder-full.ladder-fruit { --lad-cols: 64px minmax(0, 1fr) 80px 64px 64px 86px; }
.ladder-sm { --lad-cols: 52px minmax(0, 1fr) 30px 58px 72px; }
.ladder-sm .lr-fruit a span, .ladder-sm .lr-head .lr-fruit [aria-hidden] { display: none; } /* icon only in the short list (the link keeps its title) */
.ladder-mini { --lad-cols: 46px minmax(0, 1fr) auto; gap: 5px; }
.ladder-fruits { --lad-cols: 50px minmax(0, 1fr) auto 64px; }

.lr { --lad-tint: var(--row-blood-rgb, var(--blood-rgb)); --lad-tint-a: .42; --lad-wash: transparent; --lad-rim: var(--frame);
  position: relative; display: grid; grid-template-columns: var(--lad-cols); align-items: center; gap: 10px; min-height: 54px; padding: 0 16px 0 0; min-width: 0;
  /* white frame + rim along the two clipped corners too (the inset box-shadow can't follow a diagonal) */
  background: linear-gradient(135deg, var(--lad-rim) 0 8.5px, var(--rim) 8.5px 9.2px, transparent 9.2px) left top / 14px 14px no-repeat,
              linear-gradient(315deg, var(--lad-rim) 0 8.5px, var(--rim) 8.5px 9.2px, transparent 9.2px) right bottom / 14px 14px no-repeat,
              linear-gradient(90deg, var(--lad-wash), transparent 46%),
              linear-gradient(90deg, rgba(var(--lad-tint), var(--lad-tint-a)), rgba(var(--lad-tint), .06) 58%, transparent),
              linear-gradient(90deg, var(--plate-2), var(--plate));
  box-shadow: inset 0 0 0 2px var(--lad-rim), inset 0 0 0 3px var(--rim);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: box-shadow .15s; }
.lr > :not(.sr-only) { position: relative; min-width: 0; }  /* cells paint above the row's ::before slash */
.lr:not(.lr-head):hover, .lr:not(.lr-head):focus-within { --lad-rim: var(--frame); --lad-tint-a: .62; }
/* the signed-in viewer's own row: hot rim + A's diagonal slash */
.lr.is-me { --lad-rim: rgba(var(--hot-rgb), .95); }
.lr.is-me::before { content: ""; position: absolute; top: -8px; bottom: -8px; right: 30%; width: 9px; background: rgba(var(--tint-rgb), .1);
  transform: skewX(-24deg); box-shadow: -15px 0 0 rgba(var(--tint-rgb), .05), 0 0 0 1px rgba(var(--hot-rgb), .25); pointer-events: none; }
.lr.is-provisional > :not(.lr-player), .lr.is-provisional .lr-link { opacity: .72; }

/* rank numeral block, slanted right edge */
/* the number block gets the same outline as the rows: a 2px white frame (::before) around a plate with the thin
   blood rim (::after), both cut to the block's slanted right edge; --rk-fill is the plate (gold/silver/bronze on top 3) */
.lr-rank { --rk-fill: var(--chip-bg); position: relative; isolation: isolate; align-self: stretch; display: grid; place-items: center; padding-right: 11%;
  font: 400 1.8rem/1 var(--display); letter-spacing: .02em; color: var(--text); text-shadow: 0 2px 0 var(--ts-color); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lr:not(.lr-head) .lr-rank::before, .lr:not(.lr-head) .lr-rank::after { content: ""; position: absolute; pointer-events: none; }
.lr:not(.lr-head) .lr-rank::before { inset: 0; z-index: -2; background: var(--frame); clip-path: polygon(0 0, 100% 0, 78% 100%, 0 100%); }
.lr:not(.lr-head) .lr-rank::after { inset: 2px; z-index: -1; background: var(--rk-fill);
  clip-path: polygon(0 0, calc(100% - 1px) 0, calc(78% - 2px) 100%, 0 100%); }
.lr-rank.is-long { font-size: 1.2rem; }
.lr-top-1 .lr-rank { --rk-fill: linear-gradient(180deg, #ffe07a, var(--gold) 55%, #d9a400); color: #1a0e00; text-shadow: 0 1px 0 rgba(255, 255, 255, .45); }
.lr-top-2 .lr-rank { --rk-fill: linear-gradient(180deg, #f4f6f9, var(--silver) 55%, #a9b0ba); color: #111; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.lr-top-3 .lr-rank { --rk-fill: linear-gradient(180deg, #f5bd8a, var(--bronze) 55%, #b86d30); color: #1a0a00; text-shadow: 0 1px 0 rgba(255, 255, 255, .35); }
.lr-top-1 .lr-title { color: var(--gold); }
.lr-top-2 .lr-title { color: var(--silver); }
.lr-top-3 .lr-title { color: var(--bronze); }
.lr-rank-ic img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .7)); }

/* player: avatar, name + rank title, tier hexagon, provisional tag */
.lr-player { display: flex; align-items: center; gap: 10px; }
.lr-link { display: flex; align-items: center; gap: 11px; min-width: 0; color: var(--text); text-decoration: none; }
.lr-name { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lr-nm { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lr-nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; font-size: .96rem; }
.lr-link:hover .lr-nm b { text-decoration: underline; text-decoration-color: var(--hot); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.lr-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 .6rem/1.2 var(--label); font-style: normal; letter-spacing: .14em; text-transform: uppercase;
  color: #ff6b6b; color: color-mix(in srgb, var(--hot) 58%, var(--text)); }
.lr-prov { flex: none; padding: 3px 9px 3px 6px; font: 800 .56rem/1 var(--label); letter-spacing: .12em; text-transform: uppercase; color: #e6e6e6; background: #3a3a40;
  clip-path: polygon(0 0, 100% 0, calc(100% - 5px) 100%, 0 100%); }

/* small hexagon tier emblem: white frame, tier-colored core */
.hexb { flex: none; display: inline-grid; place-items: center; width: 23px; height: 26px; background: rgba(255, 255, 255, .9);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.hexb b { display: grid; place-items: center; width: calc(100% - 4px); height: calc(100% - 4px); padding-top: 1px; font: 400 .74rem/1 var(--display); color: #140000;
  background: var(--hexc); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.hexb-s { --hexc: linear-gradient(160deg, #ff7a7a, #d8141c); }
.hexb-a { --hexc: linear-gradient(160deg, #ffc27a, #f07f14); }
.hexb-b { --hexc: linear-gradient(160deg, #ffe98a, #e7b90f); }
.hexb-c { --hexc: linear-gradient(160deg, #8ff0b3, #25b862); }
.hexb-d { --hexc: linear-gradient(160deg, #f1f3f6, #a9b0ba); }

/* platform · region / crew */
.lr-from { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--muted); }
.lr-from > span, .lr-crew { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-from a { color: var(--text-soft); text-decoration: none; }
.lr-from a:hover { text-decoration: underline; }
.lr-from i { margin: 0 6px; font-style: normal; opacity: .55; }
.lr-crew { font-weight: 800; letter-spacing: .02em; }
.lr-none { color: var(--placeholder); }

/* main fruit */
.lr-fruit a { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-soft); text-decoration: none; font-weight: 600; font-size: .9rem; }
.lr-fruit a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-fruit a:hover span { text-decoration: underline; }
.lr-fruit img { width: 26px; height: 26px; flex: none; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .7)); }

/* numbers */
.lr-wl, .lr-pct, .lr-24h { text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lr-wl { color: var(--muted); font-weight: 600; font-size: .9rem; }
.lr-pct { font-weight: 800; font-size: .9rem; }
.lr-elo { text-align: right; white-space: nowrap; font: 400 1.45rem/1 var(--display); letter-spacing: .04em; text-shadow: 0 2px 0 var(--ts-color); font-variant-numeric: tabular-nums; }
.lr-elo small { margin-left: 2px; font: 800 .6em/1 var(--label); letter-spacing: .1em; color: var(--muted); text-shadow: none; }
.lr-elo-pct { font-size: 1.2rem; }
.dl { font: 800 .82rem/1 var(--label); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dl-up { color: var(--ok); }
.dl-down { color: var(--lost); }
.dl-flat, .dl-none { color: var(--placeholder); }

/* column header row */
.lr.lr-head { min-height: 0; padding-bottom: 2px; background: none; box-shadow: none; clip-path: none;
  font: 800 .62rem/1 var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--placeholder); }
.lr-head .lr-rank, .lr-head .lr-elo { font: inherit; letter-spacing: inherit; text-shadow: none; background: none; clip-path: none; color: inherit; }
.lr-head .lr-rank { padding-right: 11%; }
.lr-head .lr-from, .lr-head .lr-wl, .lr-head .lr-pct { font: inherit; color: inherit; }

/* compact (homepage) and mini (category cards, crews, matches, profile fruits) variants */
.ladder-sm .lr { min-height: 48px; }
.ladder-sm .lr-rank { font-size: 1.45rem; }
.ladder-sm .lr-elo { font-size: 1.25rem; }
.ladder-mini .lr { min-height: 44px; gap: 9px; padding-right: 12px; }
.ladder-mini .lr-rank { font-size: 1.3rem; }
.ladder-mini .lr-elo { font-size: 1.15rem; }
.ladder-mini .av-wrap { width: 28px; height: 28px; }
.ladder-mini .lr-nm b { font-size: .9rem; }
.ladder-crews .lr.is-building > :not(.lr-rank) { opacity: .7; }
.ladder-crews .crew-ic { flex: none; }
.ladder-empty { padding: 26px 14px; background: var(--plate); box-shadow: inset 0 0 0 1px rgba(var(--tint-rgb), .14);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }

/* match results: #id block | winner side | VS | loser side, time on a second line */
.ladder-matches .lr.mr { grid-template-columns: 74px minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: auto auto; row-gap: 3px; min-height: 50px; padding: 7px 12px 7px 0; }
.mr .mr-id { grid-row: 1 / span 2; margin: -7px 0; padding-left: 6px; font-size: .92rem; letter-spacing: .04em; }
.mr-side { display: flex; align-items: center; gap: 6px; }
.mr-p1 { flex-direction: row-reverse; }  /* names face each other across the VS */
.mr-side a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; font-size: .9rem; color: var(--text); text-decoration: none; }
.mr-side a:hover { text-decoration: underline; }
.mr-side.lost a { color: var(--muted); }
.mr-side.tie a { color: var(--tie); }
.mr-w { flex: none; padding: 3px 8px 3px 5px; font: 800 .54rem/1 var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--hot-ink); background: var(--hot);
  clip-path: polygon(0 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }
.mr-d { flex: none; font: 700 .74rem/1 var(--label); font-variant-numeric: tabular-nums; color: var(--placeholder); }
.mr-d.up { color: var(--ok); }
.mr-d.down { color: var(--lost); }
.mr-vs { font: 400 .95rem/1 var(--display); color: var(--hot); text-shadow: 0 2px 0 var(--ts-color); }
.mr-when { grid-column: 2 / -1; grid-row: 2; text-align: center; font-size: .7rem; letter-spacing: .04em; color: var(--placeholder); }
.mr.is-removed > :not(.mr-id) { opacity: .5; }
.mr.is-removed .mr-side a { text-decoration: line-through; }
.mr-won .mr-id { box-shadow: inset 4px 0 0 var(--ok); }
.mr-lost .mr-id { box-shadow: inset 4px 0 0 var(--danger); }
.mr-tie .mr-id { box-shadow: inset 4px 0 0 var(--gold); }

/* ---------- fruit / platform / region cards: A's framed plates ---------- */
.lcat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.lcat { position: relative; isolation: isolate; padding: 16px 16px 14px; min-width: 0; }
.lcat::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--frame) 85%, transparent);
  clip-path: polygon(var(--ch) 0, 100% 0, 100% calc(100% - var(--ch)), calc(100% - var(--ch)) 100%, 0 100%, 0 var(--ch)); }
.lcat::after { content: ""; position: absolute; inset: 2px; z-index: -1; background: linear-gradient(280deg, var(--fade), var(--panel-solid) 75%);
  box-shadow: inset 0 0 0 1px var(--rim), inset 0 0 30px var(--inset-shadow);
  clip-path: polygon(calc(var(--ch) - 1px) 0, 100% 0, 100% calc(100% - var(--ch) + 1px), calc(100% - var(--ch) + 1px) 100%, 0 100%, 0 calc(var(--ch) - 1px)); }
.lcat.is-empty::before { background: color-mix(in srgb, var(--frame) 35%, transparent); }
.lcat.is-empty > * { opacity: .7; }
.panel .lcat .lcat-h { margin: 0 0 12px; font: inherit; text-transform: none; text-shadow: none; }
.lcat-h a { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.lcat-ic { display: grid; place-items: center; width: 42px; height: 42px; font-size: 1.3rem; background: var(--chip-bg); box-shadow: inset 0 0 0 1px rgba(var(--tint-rgb), .22);
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px); }
.lcat-ic img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .7)); }
.lcat-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 400 1.3rem/1 var(--display); letter-spacing: .03em; text-shadow: 0 2px 0 var(--ts-color); }
.lcat-t small, .lcat-n small { display: block; font: 800 .58rem/1 var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); text-shadow: none; }
.lcat-n { text-align: right; font: 400 1.3rem/1 var(--display); text-shadow: 0 2px 0 var(--ts-color); }
.lcat-n small { margin-top: 4px; }
.lcat-h a:hover .lcat-t { text-decoration: underline; text-decoration-color: var(--hot); text-decoration-thickness: 2px; }

/* ---------- profile header: cover strip, identity, badges, stat strip ---------- */
.phead { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr); padding: 2px; min-width: 0; }
.phead::before { content: ""; position: absolute; inset: 0; z-index: -3; background: var(--frame);
  clip-path: polygon(var(--ch) 0, 100% 0, 100% calc(100% - var(--ch)), calc(100% - var(--ch)) 100%, 0 100%, 0 var(--ch)); }
.phead::after { content: ""; position: absolute; inset: 2px; z-index: -3; background: linear-gradient(280deg, var(--fade), var(--panel-solid) 75%);
  box-shadow: inset 0 0 0 1px var(--rim), inset 0 0 40px var(--inset-shadow);
  clip-path: polygon(calc(var(--ch) - 1px) 0, 100% 0, 100% calc(100% - var(--ch) + 1px), calc(100% - var(--ch) + 1px) 100%, 0 100%, 0 calc(var(--ch) - 1px)); }
/* the cover is the player's own card color / background art (site.css .profile-card.art-card2 rules),
   laid behind the identity row only, shown as-is (no dark fade) */
.phead-cover { position: absolute; z-index: -2; grid-row: 1 / 2; grid-column: 1 / 2; inset: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; overflow: hidden;
  clip-path: polygon(calc(var(--ch) - 1px) 0, 100% 0, 100% 100%, 0 100%, 0 calc(var(--ch) - 1px)); }
.phead-cover::before { content: ""; position: absolute; top: -20px; bottom: -20px; right: 14%; width: 26px; background: rgba(var(--tint-rgb), .12);
  transform: skewX(-24deg); box-shadow: -38px 0 0 rgba(var(--tint-rgb), .06), 34px 0 0 rgba(var(--hot-rgb), .35); }
.phead-id { grid-row: 1; grid-column: 1; display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px 20px; padding: clamp(46px, 7vw, 92px) clamp(16px, 2.4vw, 28px) 18px; min-width: 0; }
.phead-id .av-xl { align-self: flex-end; }
.phead-main { flex: 1 1 240px; min-width: 0; }
.phead-name { margin: 0 0 10px; font: 400 clamp(2rem, 4.6vw, 3.3rem)/1 var(--display); letter-spacing: .03em; color: #fff; overflow-wrap: anywhere;
  text-shadow: 0 3px 0 #000, 0 6px 22px rgba(0, 0, 0, .7); }
.phead-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.pbadge { display: inline-flex; align-items: center; gap: 5px; padding: 6px 13px 6px 9px; font: 800 .64rem/1 var(--label); letter-spacing: .14em; text-transform: uppercase;
  color: var(--text); background: var(--chip-bg); box-shadow: inset 0 0 0 1px rgba(var(--tint-rgb), .3); clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.pbadge .ic { width: 12px; height: 12px; }
.pbadge-rank { background: #fff; color: #000; box-shadow: none; }
.pbadge-top1 { background: var(--gold); color: #1a0e00; }
.pbadge-top2 { background: var(--silver); color: #111; }
.pbadge-top3 { background: var(--bronze); color: #1a0a00; }
.pbadge-hot { background: var(--hot); color: var(--hot-ink); box-shadow: none; }
.pbadge-streak { background: #0d4a2a; color: #b6ffd2; box-shadow: inset 0 0 0 1px rgba(61, 220, 132, .55); }
.pbadge-white { background: #fff; color: #000; box-shadow: none; }
.pbadge-muted { background: #34343a; color: #e6e6e6; }
.pbadge-bad { background: #7a0a10; color: #fff; box-shadow: inset 0 0 0 1px var(--danger); }
.phead-id .exclusive-kilo { align-self: center; margin: 0; }
.phead-id .profile-edit { align-self: flex-start; margin-left: auto; }

.pstats { grid-row: 2; grid-column: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 2px clamp(16px, 2.4vw, 28px) 20px; }
.pstat { position: relative; isolation: isolate; min-width: 0; padding: 10px 13px 11px; }
.pstat::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--plate-2); box-shadow: inset 0 0 0 1px rgba(var(--tint-rgb), .18);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); }
.pstat-elo::before { background: linear-gradient(135deg, rgba(var(--hot-rgb), .38), var(--plate-2) 62%); box-shadow: inset 0 0 0 1px rgba(var(--hot-rgb), .85); }
.pstat dt { margin: 0 0 7px; font: 800 .6rem/1 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.pstat dd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; min-width: 0; }
.pstat dd b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 clamp(1.3rem, 2.3vw, 1.75rem)/1.1 var(--display); letter-spacing: .04em; text-shadow: 0 2px 0 var(--ts-color); }
/* the rank hexagon beside the ELO: bigger, and its letter keeps the emblem's own font (not the big ELO number's) */
.pstat dd .hexb { width: 30px; height: 34px; }
.pstat dd .hexb b { min-width: 0; overflow: visible; white-space: normal; padding-top: 2px; font: 400 1rem/1 var(--display); letter-spacing: 0; text-shadow: none; color: #140000; }
.pstat-sub { flex-basis: 100%; display: flex; align-items: center; gap: 6px; }
.pstat-note { font: 700 .6rem/1 var(--label); letter-spacing: .12em; text-transform: uppercase; color: var(--placeholder); }
.pstat-fruit a { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); text-decoration: none; }
.pstat-fruit a:hover b { text-decoration: underline; text-decoration-color: var(--hot); }
.pstat-fruit img { width: 30px; height: 30px; flex: none; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .7)); }
.phead > .rank-badges, .phead > .phead-note { grid-column: 1; margin: 0; padding: 0 clamp(16px, 2.4vw, 28px) 20px; }
.phead > .rank-badges + .phead-note { margin-top: -8px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .ladder-full.ladder-elo { --lad-cols: 60px minmax(0, 1fr) minmax(0, 130px) 64px 56px 62px 80px; }
  .ladder-full .lr-from { display: none; }
  .pstats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .lb-top { grid-template-columns: minmax(0, 1fr); }
  .lb-top .seg { grid-column: 1; grid-row: auto; }
  .lb-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lb-find { grid-column: 1 / span 2; }
  .ladder-full.ladder-elo { --lad-cols: 52px minmax(0, 1fr) 30px 56px 50px 58px 72px; }
  .ladder-full .lr-fruit a span, .ladder-full .lr-head .lr-fruit [aria-hidden] { display: none; } /* icon only (the link keeps its title) */
}
@media (max-width: 560px) {
  .lb-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-f:nth-of-type(3), .lb-find, .lb-actions { grid-column: 1 / -1; }
  .seg a { padding: 9px 18px 9px 12px; font-size: .68rem; letter-spacing: .1em; }
  .lr { gap: 7px; padding-right: 10px; }
  .ladder-full.ladder-elo { --lad-cols: 46px minmax(0, 1fr) 42px 48px 60px; }
  .ladder-full.ladder-elo .lr-fruit, .ladder-full.ladder-elo .lr-wl { display: none; }
  .ladder-full.ladder-fruit { --lad-cols: 46px minmax(0, 1fr) 52px 48px 60px; }
  .ladder-full.ladder-fruit .lr-pct { display: none; }
  .ladder-sm { --lad-cols: 44px minmax(0, 1fr) 48px 60px; }
  .ladder-sm .lr-fruit { display: none; }
  .lr-rank { font-size: 1.45rem; }
  .lr-rank.is-long { font-size: 1rem; }
  .lr-elo { font-size: 1.2rem; }
  .lr-player .hexb { display: none; }
  .lr-link { gap: 8px; }
  .lr-player .av-wrap { width: 30px; height: 30px; }
  .ladder-matches .lr.mr { grid-template-columns: 58px minmax(0, 1fr) auto minmax(0, 1fr); }
  .mr .mr-id { font-size: .78rem; }
  .pstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pstat-elo { grid-column: 1 / -1; }
  .phead-id .profile-edit { position: absolute; top: 12px; right: 12px; margin: 0; }
}

@media (forced-colors: active) {
  .lr:not(.lr-head), .ladder-empty, .seg a, .lcat, .pstat, .phead, .pbadge, .mr-w { border: 1px solid CanvasText; }
  .seg a.on { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .hexb, .phead-cover { forced-color-adjust: none; }
}
