/* Player profiles and the player search. Built on the site and wiki tokens (site.css, wiki.css). */
.players-shell { width: min(100% - 32px, 1240px); margin: 0 auto; padding: 24px 0 72px; display: grid; gap: 24px; }
/* A grid item is never narrower than its content unless told: without this the tab strip widened the whole page on a phone. */
.players-shell > * { min-width: 0; }
.players-back { display: inline-flex; align-items: center; gap: 8px; justify-self: start; color: var(--gold); text-decoration: none; font: 700 .9rem/1 var(--font-label); letter-spacing: .14em; text-transform: uppercase; }
.players-back .icon { width: 16px; height: 16px; }

/* Panels on the profile (the page does not load wiki.css). */
.pro-card { padding: clamp(16px, 2vw, 22px); background: var(--panel); border: 1px solid var(--line-soft); border-radius: 6px; min-width: 0; }
.pro-card__title { margin: 0 0 14px; color: var(--ink); font: 400 1.4rem/1 var(--font-display); letter-spacing: .02em; text-transform: uppercase; }
.pro-label { color: var(--ink-3); font: 700 .78rem/1 var(--font-label); letter-spacing: .14em; text-transform: uppercase; }
.pro-empty { margin: 0; color: var(--ink-3); }

/* The hero: the player's picture, their name set large, what they are, whether they are in game, their level. */
.pro-hero {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: clamp(16px, 3vw, 32px); padding: clamp(18px, 3vw, 32px);
    background: radial-gradient(circle at 0% 0%, oklch(0.8 0.135 78 / .12), transparent 55%), linear-gradient(170deg, var(--panel-2), var(--bg-deep));
    border: 1px solid var(--line); border-radius: 6px;
}
.pro-hero__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; }
.pro-hero__type { margin: 0; color: var(--ink-2); font-size: 1.05rem; }
.pro-hero__type b { color: var(--blight); font: 700 1.05rem/1 var(--font-label); letter-spacing: .12em; text-transform: uppercase; }
.pro-hero__level { display: grid; justify-items: end; gap: 6px; text-align: right; }
.pro-hero__level strong { color: var(--gold); font: 400 clamp(3.6rem, 8vw, 6rem)/.82 var(--font-display); font-variant-numeric: tabular-nums; }

/* The time switch, and the band of headline numbers. */
.pro-bar { display: flex; justify-content: flex-end; }
.pro-seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg-deep); border: 1px solid var(--line-soft); border-radius: 6px; }
/* Five profile tabs are wider than a phone: the strip scrolls sideways instead of pushing the page wide. */
.pro-tabs .pro-seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.pro-tabs .pro-seg::-webkit-scrollbar { display: none; }
.pro-tabs .pro-seg a { flex: none; }
.pro-seg a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; color: var(--ink-2); text-decoration: none; border-radius: 4px; font: 700 .8rem/1 var(--font-label); letter-spacing: .12em; text-transform: uppercase; }
.pro-seg a:hover { color: var(--ink); }
.pro-seg a[aria-current="true"] { color: var(--gold-ink); background: var(--gold); }
.pro-band { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 6px; }
.pro-band div { padding: 16px 18px; border-right: 1px solid var(--line-soft); min-width: 0; }
.pro-band div:last-child { border-right: 0; }
.pro-band dt { color: var(--ink-3); font: 700 .78rem/1 var(--font-label); letter-spacing: .14em; text-transform: uppercase; }
.pro-band dd { margin: 8px 0 0; color: var(--ink); font: 400 clamp(1.8rem, 3vw, 2.4rem)/1 var(--font-display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.pro-cols { display: grid; gap: 16px; }
.pro-cols--wide { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.pro-cols--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* The kill mix: one bar split by kind of kill, and its legend. */
.pro-mix { display: flex; height: 22px; margin-bottom: 10px; overflow: hidden; border-radius: 4px; }
.pro-mix i { display: block; flex: 1 1 0; min-width: 3px; }
.pro-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 16px; padding: 0; list-style: none; color: var(--ink-2); font: 600 .85rem/1 var(--font-label); letter-spacing: .04em; }
.pro-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; vertical-align: -1px; }
.pro-tone--blight { background: var(--blight); }
.pro-tone--zombie { background: oklch(0.72 0.12 150); }
.pro-tone--boss { background: var(--ember); }
.pro-tone--npc { background: var(--gold); }
.pro-tone--scientist { background: oklch(0.7 0.09 230); }
.pro-tone--animal { background: oklch(0.66 0.09 55); }
.pro-tone--vehicle { background: oklch(0.82 0.01 95); }

/* Top-N lists: name, a bar against the first, the number. */
.pro-rows { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.pro-rows li { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.pro-rows span { overflow: hidden; color: var(--ink-2); text-overflow: ellipsis; white-space: nowrap; }
.pro-rows small { color: var(--ink-3); font-size: .8rem; }
.pro-rows i { display: block; height: 7px; border-radius: 2px; background: var(--gold); }
.pro-rows--blight i { background: var(--blight); }
.pro-rows--ember i { background: var(--ember); }
.pro-rows--green i { background: oklch(0.72 0.12 150); }
.pro-rows b { color: var(--ink); font: 700 1rem/1 var(--font-label); letter-spacing: .03em; font-variant-numeric: tabular-nums; }

.pro-wipes { display: flex; align-items: end; gap: 10px; height: 136px; }
.pro-wipes__one { flex: 1 1 0; display: grid; align-content: end; gap: 6px; height: 100%; min-width: 0; text-align: center; }
.pro-wipes__one i { display: block; border-radius: 3px 3px 0 0; background: oklch(0.8 0.135 78 / .35); }
.pro-wipes__one.is-now i { background: var(--gold); }
.pro-wipes__one small { color: var(--ink-3); font: 600 .72rem/1 var(--font-label); letter-spacing: .04em; font-variant-numeric: tabular-nums; }

/* Every number, folded away under the panels. */
.pro-every { display: grid; gap: 16px; }
.pro-every summary { display: flex; align-items: baseline; gap: 12px; padding: 14px 18px; cursor: pointer; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 6px; font: 400 1.4rem/1 var(--font-display); letter-spacing: .02em; text-transform: uppercase; }
.pro-every summary span { color: var(--ink-3); font: 700 .78rem/1 var(--font-label); letter-spacing: .14em; }
.pro-every[open] summary { margin-bottom: 16px; border-color: var(--line); }
.pro-every .pro-levels__list { margin-bottom: 16px; }
.pro-hero__avatar {
    display: grid; place-items: center; width: clamp(80px, 12vw, 128px); aspect-ratio: 1; overflow: hidden; color: var(--gold);
    background: var(--bg-deep); border: 2px solid var(--gold); border-radius: var(--w-radius); font: 400 clamp(2.4rem, 5vw, 3.6rem)/1 var(--font-display);
}
.pro-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.pro-hero__main { display: grid; gap: 10px; min-width: 0; }
.pro-hero__name {
    margin: 0; color: var(--ink); font: 400 clamp(2.4rem, 6vw, 4.6rem)/.95 var(--font-display); letter-spacing: .01em;
    text-transform: uppercase; overflow-wrap: anywhere; text-wrap: balance;
}
.pro-status { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--ink-2); font: 700 .85rem/1 var(--font-label); letter-spacing: .14em; text-transform: uppercase; }
.pro-status__dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); }
.pro-status--online { color: var(--blight); }
.pro-status--online .pro-status__dot { background: var(--blight); box-shadow: 0 0 0 4px var(--blight-soft); }
.pro-vip {
    display: inline-flex; align-items: center; gap: 8px; justify-self: start; margin: 0; padding: 7px 12px; color: var(--gold-ink);
    background: var(--gold); border-radius: 999px; font: 700 .9rem/1 var(--font-label); letter-spacing: .1em; text-transform: uppercase;
}
.pro-vip .icon { width: 16px; height: 16px; }
.pro-vip span { font-weight: 600; opacity: .8; }

.pro-title { margin: 0 0 12px; color: var(--ink); font: 400 clamp(1.5rem, 2.6vw, 2rem)/1 var(--font-display); letter-spacing: .03em; text-transform: uppercase; }

/* Levels: the numbers players grind for, as big as the page allows. */
.pro-levels__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.pro-level { display: grid; align-content: start; gap: 6px; padding: 16px 18px; background: var(--w-panel); border: 1px solid var(--w-line-soft); border-radius: var(--w-radius); }
.pro-level__label { color: var(--ink-2); font: 700 .8rem/1.2 var(--font-label); letter-spacing: .14em; text-transform: uppercase; }
.pro-level__value { color: var(--gold); font: 400 clamp(2.2rem, 4vw, 3rem)/1 var(--font-display); }
.pro-level small { color: var(--ink-3); font-size: .85rem; }

/* Board places: one chip per board where the player is in the top 100, with the place this wipe and all time. */
.pro-places__list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pro-place {
    display: inline-flex; align-items: baseline; gap: 10px; padding: 10px 14px; color: var(--ink); text-decoration: none;
    background: var(--w-panel); border: 1px solid var(--w-line-soft); border-radius: var(--w-radius); transition: border-color .2s ease-out;
}
.pro-place:hover, .pro-place:focus-visible { border-color: var(--w-gold); }
.pro-place__rank { color: var(--gold); font: 400 1.6rem/1 var(--font-display); letter-spacing: .02em; }
.pro-place__board { font-weight: 700; }
.pro-place__at { display: inline-flex; align-items: baseline; gap: 6px; }
.pro-place small { color: var(--ink-3); font: 700 .75rem/1 var(--font-label); letter-spacing: .14em; text-transform: uppercase; }

/* Everything else: this wipe beside all time. */
.pro-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; align-items: start; }
.pro-table table { width: 100%; border-collapse: collapse; }
.pro-table th, .pro-table td { padding: 10px 0; border-bottom: 1px solid var(--w-line-soft); text-align: right; }
.pro-table tbody tr:last-child th, .pro-table tbody tr:last-child td { border-bottom: 0; }
.pro-table thead th { padding-top: 0; color: var(--ink-3); font: 700 .75rem/1 var(--font-label); letter-spacing: .14em; text-transform: uppercase; }
.pro-table tbody th { padding-right: 12px; color: var(--ink-2); font-weight: 600; text-align: left; overflow-wrap: anywhere; }
.pro-table td { width: 28%; color: var(--ink); font: 700 1.05rem/1 var(--font-label); letter-spacing: .04em; font-variant-numeric: tabular-nums; white-space: nowrap; }

.pro-note, .pro-coins { display: flex; align-items: flex-start; gap: 12px; }
.pro-note p, .pro-coins p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.pro-note .icon, .pro-coins .icon { flex: none; width: 22px; height: 22px; color: var(--gold); }
.pro-coins b { margin-right: 6px; color: var(--gold); font: 400 1.6rem/1 var(--font-display); letter-spacing: .02em; }
.pro-coins span { display: block; color: var(--ink-3); font-size: .9rem; }
.pro-hidden { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--ink-2); }
.pro-hidden .icon { flex: none; width: 18px; height: 18px; color: var(--ember); }

/* Search */
.players-search { display: flex; gap: 10px; }
.players-search input {
    flex: 1 1 auto; min-width: 0; min-height: 56px; padding: 0 16px; color: var(--ink); background: oklch(0.14 0.01 90);
    border: 1px solid var(--w-line); border-radius: var(--w-radius); font: 500 1.05rem/1 var(--font-body);
}
.players-search input:focus { outline: none; border-color: var(--w-gold); box-shadow: 0 0 0 3px oklch(0.83 0.15 85 / .18); }
.players-search .btn { min-height: 56px; }
.players-error { margin: 0; color: var(--danger); font-weight: 600; }
.players-empty { margin: 0; color: var(--ink-2); }
.players-list__rows { display: grid; margin: 0; padding: 0; list-style: none; }
.players-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--w-line-soft); }
.players-list__rows li:last-child .players-row { border-bottom: 0; }
.players-row:hover .players-row__name { color: var(--gold); }
.players-row__initial {
    display: grid; place-items: center; flex: none; width: 40px; height: 40px; color: var(--gold); background: var(--bg-deep);
    border: 1px solid var(--w-line); border-radius: var(--w-radius); font: 400 1.2rem/1 var(--font-display);
}
.players-row__name { flex: 1 1 auto; min-width: 0; font: 400 1.3rem/1.1 var(--font-display); letter-spacing: .03em; text-transform: uppercase; overflow-wrap: anywhere; transition: color .2s; }

@media (max-width: 1020px) {
    .pro-cols--wide, .pro-cols--three { grid-template-columns: minmax(0, 1fr); }
    .pro-band { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pro-band div:nth-child(3) { border-right: 0; }
    .pro-band div:nth-child(-n + 3) { border-bottom: 1px solid var(--line-soft); }
}
@media (max-width: 560px) {
    .pro-hero { grid-template-columns: 1fr; }
    .pro-hero__level { justify-items: start; text-align: left; }
    .pro-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pro-band div { border-right: 0; border-bottom: 1px solid var(--line-soft); }
    .pro-rows li { grid-template-columns: minmax(0, 8rem) minmax(0, 1fr) auto; }
    .players-search { flex-direction: column; }
    .players-row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
    .players-row__name, .pro-place { transition: none; }
}

/* The title under a player's name (profile, collection, badges). */
.pro-wear {
    justify-self: start; margin: 0; padding: 5px 12px; color: var(--wear, var(--gold)); border: 1px solid currentColor; border-radius: 99px;
    background: color-mix(in oklch, var(--wear, var(--gold)) 12%, transparent);
    font: 700 .9rem/1.1 var(--font-label); letter-spacing: .14em; text-transform: uppercase;
}
