/* Collector Leaderboard (public-site/card-leaders.js). Prefix .clb-*. */
.clb { display: grid; gap: 14px; font-family: "Barlow Condensed", system-ui, sans-serif; color: #fff; min-width: 0; }
.clb-chips { position: relative; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px 2px 4px; scroll-behavior: smooth; }
.clb-chips::-webkit-scrollbar { display: none; }
.clb-chip { flex: 0 0 auto; height: 38px; padding: 0 16px !important; border-radius: 999px; cursor: pointer; white-space: nowrap;
    border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); color: #b9c0cb; font: 700 16px/1 "Barlow Condensed", sans-serif; letter-spacing: .04em; transition: background .15s, color .15s, border-color .15s; }
.clb-chip:hover { color: #fff; border-color: rgba(255,255,255,.25); }
.clb-chip.on { color: #1c1405; border-color: transparent; background: linear-gradient(135deg, #f6d77a, #cf961f); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 6px 18px rgba(228,174,57,.25); }

.clb-panel { display: grid; gap: 12px; padding: 18px; border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012)), #111318; border: 1px solid rgba(255,255,255,.08); }
.clb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 18px; flex-wrap: wrap; }
.clb-head h3 { margin: 0; font: 800 26px/1 "Barlow Condensed", sans-serif; letter-spacing: .03em; text-transform: uppercase; }
.clb-head p { margin: 5px 0 0; font: 500 15px/1.25 "Barlow Condensed", sans-serif; color: #8d95a5; }
.clb-me { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(240,205,124,.08); border: 1px solid rgba(240,205,124,.3); white-space: nowrap; }
.clb-me span { font: 700 12px/1 "Barlow Condensed", sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #c9a24a; }
.clb-me b { font: 800 19px/1 "Barlow Condensed", sans-serif; color: #fff; }
.clb-me em { font: 500 14px/1 "Barlow Condensed", sans-serif; font-style: normal; color: #a9b0bc; }
.clb-me.off { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.1); } .clb-me.off b { font-size: 15px; font-weight: 600; color: #a9b0bc; }

.clb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: none; }
.clb-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 50px; padding: 6px 14px 6px 8px; border-radius: 12px; background: rgba(255,255,255,.025); }
.clb-row:nth-child(even) { background: rgba(255,255,255,.012); }
.clb-row.top { background: linear-gradient(90deg, var(--mt, rgba(240,205,124,.12)), rgba(255,255,255,.015) 60%); }
.clb-row.t1 { --mt: rgba(240,205,124,.15); } .clb-row.t2 { --mt: rgba(200,208,220,.12); } .clb-row.t3 { --mt: rgba(205,127,62,.13); }
.clb-rank { justify-self: center; font: 700 17px/1 "Barlow Condensed", sans-serif; color: #7f8794; font-variant-numeric: tabular-nums; }
.clb-medal { justify-self: center; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font: 800 16px/1 "Barlow Condensed", sans-serif; color: #1a1306;
    background: radial-gradient(circle at 35% 28%, #fff6d8, #f0cd7c 35%, #b98418 75%, #7a5410); box-shadow: 0 0 0 2px rgba(0,0,0,.5), 0 0 0 3px rgba(255,236,190,.5), 0 4px 12px rgba(240,205,124,.35); text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.clb-medal.m2 { color: #1a1d22; background: radial-gradient(circle at 35% 28%, #ffffff, #d9dee6 35%, #9aa1ad 75%, #5b616b); box-shadow: 0 0 0 2px rgba(0,0,0,.5), 0 0 0 3px rgba(240,244,250,.45), 0 4px 12px rgba(200,208,220,.25); }
.clb-medal.m3 { color: #24130a; background: radial-gradient(circle at 35% 28%, #ffe2c4, #e0995c 35%, #a0592a 75%, #5e3014); box-shadow: 0 0 0 2px rgba(0,0,0,.5), 0 0 0 3px rgba(255,214,180,.4), 0 4px 12px rgba(205,127,62,.3); }
.clb-who { display: grid; gap: 3px; min-width: 0; }
.clb-who b { font: 700 19px/1.05 "Barlow Condensed", sans-serif; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clb-who small { font: 500 14px/1.1 "Barlow Condensed", sans-serif; color: #8d95a5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clb-val { display: inline-flex; align-items: baseline; gap: 5px; justify-self: end; white-space: nowrap; }
.clb-val b { font: 800 20px/1 "Barlow Condensed", sans-serif; color: #f0cd7c; font-variant-numeric: tabular-nums; }
.clb-val small { font: 600 13px/1 "Barlow Condensed", sans-serif; color: #8d95a5; letter-spacing: .04em; }
.clb-row:not(.top) .clb-val b { color: #e6e9ee; }
.clb-grades { display: inline-flex; align-items: center; gap: 4px; }
.clb-grades em { font: 700 17px/1 "Barlow Condensed", sans-serif; font-style: normal; color: #e6e9ee; margin-right: 6px; }
.clb-g { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 4px; border-radius: 6px; font: 800 14px/1 "Barlow Condensed", sans-serif; font-style: normal; }
.clb-g.g10 { color: #1c1405; background: linear-gradient(135deg, #fff1c4, #f0cd7c 45%, #c98a12); }
.clb-g.g9 { color: #0c1a2c; background: linear-gradient(135deg, #e6f3ff, #a9cfff 50%, #5b8fd6); }
.clb-more { justify-self: center; height: 40px; padding: 0 22px !important; font-size: 16px; }

.clb-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 14px; width: 100%; max-width: 1000px; margin: 6px auto 0; }
.clb-cc { position: relative; display: grid; gap: 6px; justify-items: center; cursor: zoom-in; min-width: 0; }
.clb-cc .tc-card { width: 100%; }
.clb-cc:focus-visible { outline: 2px solid #f0cd7c; outline-offset: 4px; border-radius: 12px; }
.clb-ccrank { position: absolute; z-index: 3; top: -8px; left: -6px; min-width: 30px; height: 24px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center;
    font: 800 14px/1 "Barlow Condensed", sans-serif; color: #fff; background: #1b1e24; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 4px 10px rgba(0,0,0,.5); }
.clb-ccrank.m1 { color: #1a1306; border: 0; background: linear-gradient(135deg, #fff1c4, #f0cd7c 45%, #c98a12); }
.clb-ccrank.m2 { color: #1a1d22; border: 0; background: linear-gradient(135deg, #ffffff, #d9dee6 45%, #9aa1ad); }
.clb-ccrank.m3 { color: #24130a; border: 0; background: linear-gradient(135deg, #ffe2c4, #e0995c 45%, #a0592a); }
.clb-cctag { max-width: 100%; font: 500 14px/1.1 "Barlow Condensed", sans-serif; color: #8d95a5; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clb-cctag b { color: #fff; font-weight: 700; }
.clb-ccsub { margin-top: -4px; font: 500 12px/1.1 "Barlow Condensed", sans-serif; color: #6f7784; text-align: center; }
.clb-cc.mine .clb-cctag b { color: #f0cd7c; }

.clb-empty { margin: 0; padding: 22px 10px; text-align: center; font: 500 16px/1.3 "Barlow Condensed", sans-serif; color: #8d95a5; }
.clb-empty.gen { display: grid; gap: 6px; padding: 26px 14px; border-radius: 14px; border: 1px dashed rgba(240,205,124,.3); background: radial-gradient(60% 100% at 50% 0%, rgba(240,205,124,.08), transparent); }
.clb-empty.gen b { font: 800 20px/1.1 "Barlow Condensed", sans-serif; color: #f0cd7c; letter-spacing: .03em; }
.clb-note { margin: 0; text-align: center; font: 500 14px/1.2 "Barlow Condensed", sans-serif; color: #8d95a5; }
.clb-foot { margin: -4px 0 0; text-align: center; font: 500 13px/1.2 "Barlow Condensed", sans-serif; color: #6f7784; letter-spacing: .03em; }
.clb-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 34px 0; color: #8d95a5; font: 500 16px/1 "Barlow Condensed", sans-serif; }
.clb-loading span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.15); border-top-color: #f0cd7c; animation: clbSpin .8s linear infinite; }
@keyframes clbSpin { to { transform: rotate(360deg); } }

@media (max-width: 900px) { .clb-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) {
    .clb { gap: 10px; }
    .clb-chips { margin: 0 -12px; padding: 2px 12px 4px; }
    .clb-chip { height: 34px; padding: 0 13px !important; font-size: 15px; }
    .clb-panel { padding: 12px 10px; gap: 10px; border-radius: 16px; }
    .clb-head h3 { font-size: 22px; }
    .clb-head p { font-size: 14px; }
    .clb-me { padding: 6px 12px; }
    .clb-row { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; min-height: 44px; padding: 5px 10px 5px 4px; }
    .clb-medal { width: 28px; height: 28px; font-size: 15px; }
    .clb-who b { font-size: 17px; }
    .clb-who small { font-size: 13px; }
    .clb-val b { font-size: 17px; }
    .clb-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
    /* small cards: same trims as the profile page's 3-up grid (cards.css .pf-cards) */
    .clb-cc .tc-info, .clb-cc .tc-top { display: none !important; }
    .clb-cc .tc-inner { grid-template-rows: 1fr auto auto !important; padding: 7px !important; gap: 4px !important; }
    .clb-cc .tc-art { min-height: 0; }
    .clb-cc .tc-name { font-size: 13px !important; }
    .clb-cc .tc-rar { display: none !important; } /* the border color already says the rarity; the value gets the room */
    .clb-cc .tc-foot { justify-content: flex-end; }
    .clb-cc .tc-val { font-size: 12.5px !important; }
    .clb-cc .tc-foot { gap: 4px; }
    .clb-cc .tc-fin { transform: scale(.72); transform-origin: top right; }
    .clb-cc .tc-grade { transform: scale(.8); transform-origin: top left; }
    .clb-cctag { font-size: 13px; }
    .clb-ccrank { top: -7px; left: -4px; min-width: 26px; height: 21px; font-size: 13px; }
}

/* phones: the six boards as a 3 × 2 grid, no sideways swiping (owner 11/3: "most players won't even know to scroll it to the side") */
@media (max-width: 760px) {
  .clb-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; gap: 6px; }
  .clb-chip { min-width: 0; height: 36px; padding: 0 6px !important; font-size: 14px !important; overflow: hidden; text-overflow: ellipsis; border-radius: 12px; }
}
