/* Quake Live Stats — shared stylesheet. Everything local: no CDN, no external fonts. */
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Sora";  src: url("fonts/sora.woff2")  format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #070b13;
  --bg-soft: #0b1220;
  --panel: #0f1a2c;
  --panel-2: #14233a;
  --line: rgba(181, 207, 240, 0.14);
  --line-strong: rgba(181, 207, 240, 0.28);
  --text: #f5f8ff;
  --muted: #9caec6;
  --muted-2: #71839b;
  --blue: #5aa7ff;
  --cyan: #45d5ee;
  --green: #59dda0;
  --amber: #f8ba55;
  --red: #ff7b7b;
  --brand: #ff5c5c;
  --team-red: #ff6b6b;
  --team-blue: #5aa7ff;
  --grid: rgba(181, 207, 240, 0.10);
  --radius: 16px;
  /* one colour per game mode, used for every chip, label, tab and chart of that mode */
  --m-ca: #ff9057; --m-duel: #b39bff; --m-ffa: #59dda0; --m-tdm: #f8c255;
  --m-ctf: #ff7eb6; --m-ft: #45d5ee; --m-ad: #b8e04a; --m-other: #9caec6;
  /* one colour per weapon, the game's own (cgamex86 weaponInfo, see weapons/colors.json); used for its label, numbers, bar and line */
  --w-mg: #ffff00; --w-sg: #ff7d00; --w-hmg: #cea500; --w-gl: #029012; --w-rl: #ff0101; --w-lg: #ffffba; --w-rg: #00ff00; --w-pg: #c500ff;
  --w-ng: #00ffb3; --w-cg: #b8b8b8; --w-pl: #ff007c; --w-bfg: #015aff; --w-gt: #00d8ff; --w-gh: #51aadc;
}
.m-ca { --mc: var(--m-ca); } .m-duel { --mc: var(--m-duel); } .m-ffa { --mc: var(--m-ffa); } .m-tdm { --mc: var(--m-tdm); }
.m-ctf { --mc: var(--m-ctf); } .m-ft { --mc: var(--m-ft); } .m-ad { --mc: var(--m-ad); } .m-race, .m-rr, .m-x { --mc: var(--m-other); }
.w-rl { --wc: var(--w-rl); } .w-lg { --wc: var(--w-lg); } .w-rg { --wc: var(--w-rg); } .w-pg { --wc: var(--w-pg); }
.w-sg { --wc: var(--w-sg); } .w-gl { --wc: var(--w-gl); } .w-mg { --wc: var(--w-mg); } .w-hmg { --wc: var(--w-hmg); }
.w-ng { --wc: var(--w-ng); } .w-cg { --wc: var(--w-cg); } .w-pl { --wc: var(--w-pl); } .w-bfg { --wc: var(--w-bfg); } .w-gt { --wc: var(--w-gt); } .w-gh { --wc: var(--w-gh); }

* { box-sizing: border-box; }
html { scrollbar-color: #2b3d57 var(--bg); }
body {
  margin: 0; min-width: 320px; overflow-x: hidden;
  background: linear-gradient(180deg, #08101d 0%, #070b13 420px) fixed, var(--bg);
  color: var(--text);
  font: 15px/1.5 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
svg { display: block; }
img { max-width: 100%; }
h1, h2, h3 { font-family: "Sora", "Inter", sans-serif; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 650; line-height: 1.12; }
h2 { font-size: 17px; font-weight: 600; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.dim { color: var(--muted-2); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.right { text-align: right; justify-self: end; }
.center { text-align: center; justify-self: center; }
.spacer { flex: 1; }
.flag { display: inline-block; width: 20px; height: 15px; border-radius: 3px; object-fit: cover; vertical-align: -2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14); flex: none; }
.flag.soft { opacity: 0.6; }
.flag.big { width: 36px; height: 27px; border-radius: 5px; vertical-align: 0; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(7, 11, 19, 0.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { font: 700 18px "Sora", sans-serif; letter-spacing: -0.03em; display: flex; align-items: center; gap: 10px; white-space: nowrap; cursor: default; user-select: none; }
.brand img { width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 18px rgba(255, 60, 60, 0.35); }
.brand b { color: var(--brand); font-weight: 700; }
.nav { display: flex; gap: 8px; margin-left: 26px; padding-left: 26px; border-left: 1px solid var(--line-strong); }
.nav a { padding: 9px 18px; border-radius: 12px; color: var(--muted); font: 600 15.5px "Sora", "Inter", sans-serif; letter-spacing: -0.01em;
  border: 1px solid var(--line); background: rgba(126, 164, 214, 0.04); transition: color 0.15s, background 0.15s, border-color 0.15s; }
.nav a:hover { color: var(--text); background: rgba(126, 164, 214, 0.10); border-color: var(--line-strong); }
.nav a[aria-current="page"] { color: #fff; background: linear-gradient(180deg, rgba(90, 167, 255, 0.34), rgba(90, 167, 255, 0.16));
  border-color: rgba(90, 167, 255, 0.7); box-shadow: inset 0 -2px 0 var(--blue), 0 0 20px rgba(90, 167, 255, 0.22); }
.search { position: relative; flex: 1; max-width: 340px; margin-left: auto; }
.search input { width: 100%; height: 38px; padding: 0 12px 0 36px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg-soft); outline-offset: 0; }
.search input::placeholder { color: var(--muted-2); }
.search > svg { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; color: var(--muted-2); pointer-events: none; }
.results { position: absolute; left: 0; right: 0; top: 44px; background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 12px; padding: 6px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5); max-height: 70vh; overflow: auto; }
.results[hidden] { display: none; }
.results .grp { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); padding: 8px 10px 4px; }
.results a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; }
.results a:hover { background: rgba(90, 167, 255, 0.14); }
.results .r { margin-left: auto; color: var(--muted); font-size: 13px; }
.results .none { padding: 10px; color: var(--muted); }
.results .thumb { width: 46px; flex: none; border-radius: 4px; }
.results .thumb .ph { display: none; }
.pulse { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(89, 221, 160, 0.18); flex: none; }

/* ---------- page band with artwork and headline numbers ---------- */
.band { position: relative; overflow: hidden; margin: 22px 0 18px; padding: 26px 28px; border: 1px solid var(--line); border-radius: 22px;
  background: linear-gradient(90deg, #0d1627 0%, rgba(13, 22, 39, 0.94) 48%, rgba(13, 22, 39, 0.3) 100%), url("img/hero.jpg") right -30px center / auto 160% no-repeat, #0d1627; }
.band p { margin: 8px 0 0; color: var(--muted); max-width: 56ch; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 158px)); gap: 10px; margin-top: 20px; }
.stat { padding: 10px 14px; border-radius: 13px; background: rgba(7, 11, 19, 0.62); border: 1px solid var(--line); backdrop-filter: blur(4px); }
.stat .v { font: 650 22px/1.2 "Sora", sans-serif; }
.stat .k { color: var(--muted); font-size: 12.5px; }
.stat .v .dot { display: inline-block; margin-right: 7px; vertical-align: 3px; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.seg { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 9px; color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: rgba(90, 167, 255, 0.18); color: var(--text); }
.seg button[class*="m-"] { color: color-mix(in srgb, var(--mc) 80%, var(--muted)); }
.seg button[class*="m-"]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mc); }
.seg button[class*="m-"][aria-pressed="true"] { background: color-mix(in srgb, var(--mc) 20%, transparent); color: var(--mc); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mc) 45%, transparent); }
.seg button[class*="w-"] { color: var(--wc); }
.seg button[class*="w-"][aria-pressed="true"] { background: color-mix(in srgb, var(--wc) 18%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wc) 45%, transparent); }
.field { height: 38px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg-soft); min-width: 0; }
select.field { padding-right: 8px; cursor: pointer; }
/* Accuracy on a player's page: the weapons to draw (ticked) and the shown range */
.acc-chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.acc-pick { display: grid; gap: 8px; }
.wchecks { display: grid; gap: 6px; }
@media (max-width: 640px) {      /* on a phone the weapons go back above the chart, in a row */
  .acc-chart { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .wchecks { display: flex; flex-wrap: wrap; }
}
.wchk { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); color: var(--wc); font-weight: 700; cursor: pointer; user-select: none; }
.wchk input { width: 15px; height: 15px; margin: 0; accent-color: var(--wc); cursor: pointer; }
.wchk:hover { border-color: color-mix(in srgb, var(--wc) 45%, transparent); }
.wchk:has(input:checked) { background: color-mix(in srgb, var(--wc) 16%, transparent); border-color: color-mix(in srgb, var(--wc) 50%, transparent); }
.wchk:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
input.field::placeholder { color: var(--muted-2); }
input[type="date"].field { color-scheme: dark; }
.grow { flex: 1 1 180px; }
.btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; height: 38px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line-strong); background: var(--panel); cursor: pointer; font-weight: 550; }
.btn:hover { border-color: var(--blue); }
.btn[disabled] { opacity: 0.4; cursor: default; border-color: var(--line); }
.btn.ghost { border-color: transparent; background: none; color: var(--muted); }
.btn.ghost:hover { color: var(--text); }
.btn svg { width: 15px; height: 15px; }

/* ---------- panels, chips ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel > header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px 0; }
.panel > header .sub { color: var(--muted-2); font-size: 13px; }
.panel > .body { padding: 14px 18px 18px; }
.sub { color: var(--muted-2); font-size: 12.5px; }
.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; background: rgba(126, 164, 214, 0.13); color: var(--muted); vertical-align: 1px; white-space: nowrap; }
.chip.mode { background: color-mix(in srgb, var(--mc) 17%, transparent); color: var(--mc); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mc) 32%, transparent); text-transform: uppercase; }
.chip.live { background: rgba(89, 221, 160, 0.16); color: var(--green); }
.chip.w { background: rgba(89, 221, 160, 0.16); color: var(--green); }
.chip.l { background: rgba(255, 123, 123, 0.14); color: var(--red); }
.mtxt { color: var(--mc); font-weight: 600; }
.wtxt { color: var(--wc); font-weight: 600; }
.empty { padding: 34px 18px; text-align: center; color: var(--muted); }
.skel { color: transparent; background: rgba(126, 164, 214, 0.10); border-radius: 6px; animation: sk 1.2s ease-in-out infinite; user-select: none; }
@keyframes sk { 50% { opacity: 0.45; } }
.pager { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 16px 0 6px; color: var(--muted); }
.note { color: var(--muted-2); font-size: 13px; margin: 12px 2px 0; }
.note a, .lnk { color: var(--blue); }
.note a:hover, .lnk:hover { text-decoration: underline; }
.pl { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; }
a.pl:hover { text-decoration: underline; text-decoration-color: var(--muted-2); text-underline-offset: 3px; }
.q0 { color: #8a94a6; } .q1 { color: #ff6464; } .q2 { color: #62dd7c; } .q3 { color: #ffe566; }
.q4 { color: #74abff; } .q5 { color: #62e3f0; } .q6 { color: #f083f0; } .q7 { color: inherit; }

/* ---------- player list ---------- */
.tbl { overflow: hidden; }
.tr { display: grid; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--line); min-height: 50px; }
.tr:first-child { border-top: 0; }
.tr.th { min-height: 0; padding-top: 11px; padding-bottom: 11px; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-2); font-weight: 600; }
a.tr:hover { background: rgba(90, 167, 255, 0.07); }
.cols-players { grid-template-columns: 40px minmax(0, 1fr) 118px 186px 96px; }
.cols-roster { grid-template-columns: minmax(0, 1fr) 70px 60px 60px; }
/* a finished team match: player, rating, score, kills, damage, net */
.cols-match { grid-template-columns: minmax(0, 1fr) 62px 46px 42px 62px 64px; gap: 10px; }
.cols-match.no-rt { grid-template-columns: minmax(0, 1fr) 46px 42px 62px 64px; }
.cols-match.no-sc { grid-template-columns: minmax(0, 1fr) 62px 42px 62px 64px; }
.cols-match.no-rt.no-sc { grid-template-columns: minmax(0, 1fr) 42px 62px 64px; }
.cols-match .top { font-weight: 700; color: var(--text); }
.cols-match .pcell { min-width: 0; overflow-wrap: anywhere; font-weight: 550; }
.cols-match .c-rt small { display: block; font-size: 11px; line-height: 1.1; }
.tr.th .thb { all: unset; cursor: pointer; border-radius: 4px; }
.tr.th .thb:hover, .tr.th .on .thb { color: var(--text); }
.tr.th .thb:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.tr.th .on .thb::after { content: " \25BE"; color: var(--blue); }
.sb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 18px; }
.sb-bar .filters { margin: 0; flex-basis: 100%; min-width: 0; max-width: 100%; }
.pos { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--muted-2); font-weight: 650; }
.pos.p1 { background: rgba(248, 194, 85, 0.18); color: #f8c255; box-shadow: inset 0 0 0 1px rgba(248, 194, 85, 0.5); }
.pos.p2 { background: rgba(200, 211, 224, 0.14); color: #c8d3e0; box-shadow: inset 0 0 0 1px rgba(200, 211, 224, 0.4); }
.pos.p3 { background: rgba(212, 143, 96, 0.16); color: #dc9a6c; box-shadow: inset 0 0 0 1px rgba(212, 143, 96, 0.45); }
.pname { font-weight: 600; font-size: 15.5px; }
.pname .flag { margin-right: 7px; }
.rating { font: 650 18px "Sora", sans-serif; }
.rd { color: var(--muted-2); font-size: 12px; font-weight: 500; }
.rchips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.rchip { display: inline-flex; gap: 5px; align-items: baseline; padding: 1px 7px; border-radius: 6px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text); background: color-mix(in srgb, var(--mc) 11%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mc) 24%, transparent); }
.rchip b { color: var(--mc); font-size: 10.5px; letter-spacing: 0.04em; }
.rchip.on { background: color-mix(in srgb, var(--mc) 26%, transparent); box-shadow: inset 0 0 0 1px var(--mc); }
.acc3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; }
.acc3 span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--wc); }
.acc3 .wi { width: 22px; height: 22px; }
.acc3 i { font-style: normal; color: inherit; }
.acc3 .na i { color: var(--muted-2); font-weight: 500; }
.wi { width: 18px; height: 18px; flex: none; object-fit: contain; vertical-align: middle; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6)); }
.wk { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: color-mix(in srgb, var(--wc) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wc) 40%, transparent); font-size: 8.5px; font-weight: 800; color: var(--wc); flex: none; text-transform: uppercase; }

/* ---------- match rows ---------- */
.mlist { display: grid; gap: 10px; }
.mrow { position: relative; display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 18px 12px 12px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--mc, var(--line)); border-radius: 14px; transition: border-color 0.15s, background 0.15s; }
.mrow:hover { background: var(--panel-2); border-color: color-mix(in srgb, var(--mc) 55%, var(--line)); }
.cover { position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--mc, #5aa7ff) 30%, #0b1220), #0b1220); display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .ph { font: 700 13px "Sora", sans-serif; letter-spacing: 0.04em; color: color-mix(in srgb, var(--mc, #5aa7ff) 70%, #fff); text-transform: uppercase; opacity: 0.85; padding: 0 6px; text-align: center; overflow-wrap: anywhere; }
.mwho { font-size: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; overflow-wrap: anywhere; }
.mwho .win { font-weight: 650; }
.mwho.teams { display: grid; gap: 5px; font-size: 14.5px; }
.mteam { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; }
.mteam.win { font-weight: 600; }
.mteam.lose { color: var(--muted); }
.tdot { width: 9px; height: 9px; border-radius: 3px; flex: none; display: inline-block; }
.tdot.red { background: var(--team-red); } .tdot.blu { background: var(--team-blue); }
.acc1 { display: inline-flex; align-items: center; gap: 4px; color: var(--wc); font-weight: 600; font-variant-numeric: tabular-nums; }
.acc1 .wi { width: 17px; height: 17px; }

/* ---------- scoreboard tables on the match page ---------- */
.scroll { overflow-x: auto; }
table.sb { width: 100%; border-collapse: collapse; font-size: 14px; }
.sb th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-2); font-weight: 600; text-align: right; padding: 10px 12px; white-space: nowrap; }
.sb th:first-child, .sb td:first-child { text-align: left; padding-left: 18px; }
.sb th:last-child, .sb td:last-child { padding-right: 18px; }
.sb td { padding: 9px 12px; border-top: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sb td:first-child { white-space: normal; min-width: 180px; }
.sb tbody tr:hover td { background: rgba(90, 167, 255, 0.05); }
.sb tr.grp td, .sb tr.grp:hover td { background: rgba(126, 164, 214, 0.07); font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 700; text-align: left; padding: 7px 18px; }
.sb tr.grp.red td { color: var(--team-red); box-shadow: inset 3px 0 0 var(--team-red); }
.sb tr.grp.blu td { color: var(--team-blue); box-shadow: inset 3px 0 0 var(--team-blue); }
.sb td small { display: block; color: var(--muted-2); font-size: 11.5px; font-weight: 400; }
.sb .who { display: flex; align-items: center; gap: 8px; font-weight: 550; }
.sb .top { font-weight: 700; color: var(--text); }
.sb td { color: #d7e1f0; }
.sb th .wi, .sb th .wk { display: inline-block; width: 20px; height: 20px; vertical-align: -5px; margin-right: 5px; }
.sb th .wtxt { color: var(--wc); }
.sb th .thb { all: unset; cursor: pointer; border-radius: 4px; }
.sb th .thb:hover { color: var(--text); }
.sb th .thb:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.sb th.on, .sb th.on .thb { color: var(--text); }
.sb th.on .thb::after { content: " \25BE"; color: var(--blue); }
.sb .c-pos { width: 1%; padding-right: 0; text-align: left; }
.sb td.c-pos .pos { width: 26px; height: 26px; font-size: 12.5px; }
.sb-sort { padding: 0 18px 12px; margin: 0; }
.scanning { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.scanning::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: sk 1.2s ease-in-out infinite; }
.mwho .lose { color: var(--muted); }
.mline { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; margin-top: 6px; color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.mline .map { color: var(--text); font-weight: 600; }
.mline .srv { display: inline-flex; gap: 6px; align-items: baseline; }
.mscore { text-align: right; white-space: nowrap; }
.mscore .s { font: 700 22px "Sora", sans-serif; font-variant-numeric: tabular-nums; }
.mscore .t { color: var(--muted-2); font-size: 12.5px; margin-top: 2px; }
.red { color: var(--team-red); } .blu { color: var(--team-blue); }
.fade { opacity: 0.5; }

/* ---------- live cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.lcard { display: flex; flex-direction: column; overflow: hidden; border-top: 3px solid var(--mc, var(--line)); transition: transform 0.15s, border-color 0.15s; }
.lcard:hover { transform: translateY(-2px); border-color: var(--mc); }
.lcard .thumb { border-radius: 0; aspect-ratio: 16 / 7; }
.lcard .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 11, 19, 0.15) 30%, rgba(7, 11, 19, 0.88)); }
.lcard .thumb .ph { display: none; }
.lcard .over { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 9px; display: flex; align-items: flex-end; gap: 10px; }
.lcard .over .map { font: 650 17px "Sora", sans-serif; overflow-wrap: anywhere; text-shadow: 0 1px 8px #000; }
.lcard .over .cnt { margin-left: auto; font: 700 24px/1 "Sora", sans-serif; white-space: nowrap; text-shadow: 0 1px 8px #000; }
.lcard .over .cnt small { font: 500 13px "Inter", sans-serif; color: var(--muted); }
.lcard .tag { position: absolute; z-index: 1; left: 12px; top: 10px; display: flex; gap: 6px; }
.lcard .tag .chip.mode { background: color-mix(in srgb, var(--mc) 30%, #070b13); }
.lcard .lb { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lcard .name { font-weight: 600; font-size: 15.5px; line-height: 1.35; overflow-wrap: anywhere; }
.lcard .name .flag { margin-right: 6px; }
.lcard .info { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 13.5px; margin-top: auto; align-items: baseline; }
.lcard .sc { margin-left: auto; font: 700 20px "Sora", sans-serif; }

/* ---------- player page ---------- */
.phead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 340px); gap: 18px; align-items: start; padding: 26px 0 18px; }
.phead h1 { font-size: clamp(30px, 5vw, 44px); overflow-wrap: anywhere; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 12px; color: var(--muted); font-size: 14px; }
.nbox .body { padding-top: 10px; }
.nlist { list-style: none; margin: 0; padding: 0 6px 0 0; max-height: 132px; overflow: auto; display: grid; gap: 2px; scrollbar-width: thin; }
.nlist li { display: flex; gap: 10px; align-items: baseline; padding: 3px 0; font-weight: 550; overflow-wrap: anywhere; }
.nlist small { margin-left: auto; color: var(--muted-2); font-weight: 400; white-space: nowrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { padding: 14px 16px; position: relative; overflow: hidden; }
.tile[class*="m-"] { border-top: 3px solid var(--mc); }
.tile .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-2); font-weight: 700; }
.tile[class*="m-"] .k { color: var(--mc); }
.tile .v { font: 650 28px/1.2 "Sora", sans-serif; margin-top: 4px; }
.tile .v.txt { font-size: 21px; padding-top: 4px; }
.tile .v small { font: 500 13px "Inter", sans-serif; color: var(--muted-2); }
.tile .s { color: var(--muted); font-size: 13px; }
.sg-head { margin: 4px 2px 10px; }
#sg-player:empty { display: none; }
#sg-map:empty { display: none; }
.sg-w { display: inline-flex; align-items: center; gap: 6px; }
.sg-w .wi { width: 18px; height: 18px; }
.sg-peak { margin-top: 8px; }
.sg-ev, #sg-map .grid2, #sg-player .grid2 { align-items: start; }
.sg-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.sg-legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.sg-ev select.field { height: 32px; font-size: 13px; max-width: 48%; }
.kfeed { max-height: 380px; overflow-y: auto; margin-top: 14px; display: grid; gap: 1px; font-size: 13px; }
.kr { display: grid; grid-template-columns: 40px minmax(0, 1fr) 24px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 4px 8px; border-radius: 6px; }
.kr:nth-child(odd) { background: rgba(126, 164, 214, 0.05); }
.kr .t { color: var(--muted-2); font-size: 12px; }
.kr .k { text-align: right; }
.kr .k, .kr .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kr .r { color: var(--team-red); }
.kr .b { color: var(--team-blue); }
.kr .w { display: flex; justify-content: center; }
.kr .w .wi { width: 18px; height: 18px; }
.kr .fl { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }
.kr.tk { box-shadow: inset 3px 0 0 var(--team-red); }
@media (max-width: 560px) { .kr { grid-template-columns: 36px minmax(0, 1fr) 22px minmax(0, 1fr); } .kr .fl { display: none; } }
.sg-src { white-space: nowrap; font-size: 13px; }
.sg-src svg { width: 13px; height: 13px; vertical-align: -1px; margin-left: 3px; }
.meter { height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--mc, var(--blue)) 16%, transparent); margin: 9px 0 7px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; background: var(--mc, var(--blue)); }
.form { display: flex; gap: 4px; margin-top: 9px; flex-wrap: wrap; }
.form i { width: 16px; height: 16px; border-radius: 4px; font: 700 9.5px/16px "Inter", sans-serif; text-align: center; font-style: normal; }
.form .w { background: rgba(89, 221, 160, 0.22); color: var(--green); }
.form .l { background: rgba(255, 123, 123, 0.18); color: var(--red); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.share { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; }
.share i { display: block; background: var(--mc); min-width: 3px; }
.share.thin { height: 6px; border-radius: 3px; margin-top: 10px; }

/* ---------- Games: maps and servers ---------- */
.gcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.gcard { display: flex; flex-direction: column; overflow: hidden; border-top: 3px solid var(--mc, var(--line)); transition: transform 0.15s, border-color 0.15s; }
.gcard:hover { transform: translateY(-2px); border-color: var(--mc, var(--blue)); }
.gcard .thumb { border-radius: 0; }
.gcard .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 11, 19, 0.1) 40%, rgba(7, 11, 19, 0.88)); }
.gcard .thumb .ph { position: relative; z-index: 0; }
.gcard .tag { position: absolute; z-index: 1; left: 10px; top: 9px; display: flex; gap: 5px; }
.gcard .tag .chip.mode { background: color-mix(in srgb, var(--mc) 30%, #070b13); }
.gcard .over { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 8px; }
.gcard .over .map { font: 650 17px "Sora", sans-serif; overflow-wrap: anywhere; text-shadow: 0 1px 8px #000; }
.gcard .gb { padding: 11px 13px 13px; }
.gcard .nums { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 13.5px; align-items: baseline; }
.gcard .nums b { color: var(--text); font-size: 15px; }
.gcard .sub { margin-top: 8px; }
.slist { display: grid; gap: 10px; }
.srow { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 13px 18px; border-left: 3px solid var(--mc, var(--line)); transition: background 0.15s; }
.srow:hover { background: var(--panel-2); }
.srow .sname { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.srow .share.thin { max-width: 420px; }
.snums { display: flex; gap: 22px; text-align: right; white-space: nowrap; }
.snums div { display: flex; flex-direction: column; }
.snums b { font: 650 18px "Sora", sans-serif; }
.snums span { color: var(--muted-2); font-size: 12px; }
.livebox .body { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.chart .col rect { fill: var(--series); }
.chart .col.on rect { opacity: 0.75; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--mc); }
.legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: minmax(0, 172px) minmax(0, 1fr) 54px; gap: 12px; align-items: center; }
.bar .lab { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bar .track { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--wc, var(--blue)) 14%, transparent); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 4px; background: var(--wc, var(--blue)); min-width: 2px; }
.bar .val { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.bar[class*="w-"] .val { color: var(--wc); }
.bar .extra { grid-column: 2 / 4; margin-top: -6px; color: var(--muted-2); font-size: 12px; }
.bars.wide .bar { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 36px; }
.bars.wide .lab .thumb { width: 60px; flex: none; border-radius: 6px; }
.bars.wide .lab .thumb .ph { display: none; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; --series: var(--blue); }
.chart svg { width: 100%; overflow: visible; }
.chart text { fill: var(--muted-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.chart .ln { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .ar { fill: var(--series); opacity: 0.10; }
.chart .pt { fill: var(--series); stroke: var(--panel); stroke-width: 2; }
.chart .ch { stroke: var(--line-strong); stroke-width: 1; }
.tip { position: absolute; z-index: 5; pointer-events: none; background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 9px; padding: 6px 10px; font-size: 12.5px; white-space: nowrap; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); transform: translate(-50%, -100%); }
.tip b { font-size: 14px; }
.tip[hidden] { display: none; }

/* ---------- match page ---------- */
.banner { position: relative; overflow: hidden; margin: 22px 0 14px; padding: 26px 28px; border-radius: 22px; border: 1px solid var(--line); border-top: 3px solid var(--mc, var(--line));
  background: linear-gradient(90deg, rgba(9, 15, 27, 0.97) 0%, rgba(9, 15, 27, 0.82) 45%, rgba(9, 15, 27, 0.3) 100%), var(--img, none) center / cover no-repeat, #0d1627; min-height: 170px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 24px; }
.banner h1 { overflow-wrap: anywhere; }
.board { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; padding: 22px 18px; text-align: center; }
.board .side { min-width: 0; }
.board .side .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); font-weight: 600; }
.board .side .who { font-weight: 600; font-size: 18px; margin-top: 4px; overflow-wrap: anywhere; display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.board .score { font: 700 clamp(36px, 7vw, 58px)/1 "Sora", sans-serif; display: flex; gap: 14px; align-items: center; }
.board .score .lose { opacity: 0.45; }
.board .winchip { display: inline-block; margin-top: 8px; }
.teamhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.teamhead i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.delta-up { color: var(--green); } .delta-down { color: var(--red); }
.wstats { display: grid; grid-template-columns: minmax(0, 1fr) 62px 86px 50px; gap: 7px 10px; font-size: 13.5px; align-items: center; }
.wstats .hd { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-2); font-weight: 600; }
.wstats .lab { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pcell { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 550; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-row .n { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 9px; background: var(--bg-soft); border: 1px solid var(--line); font-weight: 550; }
.chips-row small { color: var(--muted-2); font-weight: 400; }

footer { margin: 40px 0 28px; color: var(--muted-2); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 6px 18px; border-top: 1px solid var(--line); padding-top: 18px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }
.m-only { display: none; }

@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pulse span.long { display: none; }
}
@media (max-width: 860px) {
  .grid2 { grid-template-columns: 1fr; }
  .phead { grid-template-columns: 1fr; }
  .top .wrap { gap: 10px; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .top .wrap { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .search { order: 5; flex-basis: 100%; max-width: none; margin: 0; }
  .nav { margin-left: auto; padding-left: 0; border-left: 0; gap: 6px; }
  .nav a { padding: 7px 11px; font-size: 14px; }
  .pulse { display: none; }
  .band, .banner { padding: 20px 18px; margin-top: 16px; border-radius: 18px; }
  .band { background: linear-gradient(180deg, rgba(13, 22, 39, 0.9), rgba(13, 22, 39, 0.97)), url("img/hero.jpg") right -80px top -20px / auto 120% no-repeat, #0d1627; }
  .tr { padding: 10px 14px; gap: 10px; }
  .panel > header { padding: 14px 14px 0; }
  .panel > .body { padding: 12px 14px 16px; }
  .cols-players { grid-template-columns: 30px minmax(0, 1fr) 84px; }
  .cols-players > .c-acc, .cols-players > .c-last { display: none; }
  .cols-roster { grid-template-columns: minmax(0, 1fr) 56px 46px; }
  .cols-roster > .c-time { display: none; }
  .cols-match, .cols-match.no-sc { grid-template-columns: minmax(0, 1fr) 38px 34px 52px 56px; gap: 8px; }
  .cols-match.no-sc, .cols-match.no-rt.no-sc { grid-template-columns: minmax(0, 1fr) 34px 52px 56px; }
  .cols-match.no-rt { grid-template-columns: minmax(0, 1fr) 38px 34px 52px 56px; }
  .cols-match > .c-rt { display: none; }
  .mrow { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 10px 12px 10px 10px; align-items: start; }
  .mscore { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; text-align: left; }
  .mscore .t { margin: 0 0 0 auto; }
  .mwho { font-size: 15px; }
  .bar { grid-template-columns: minmax(0, 136px) minmax(0, 1fr) 48px; }
  .board { gap: 10px; padding: 18px 12px; }
  .m-only { display: inline; }
  .m-only:has(.m-last:empty) { display: none; }
  .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .filters > .field, .filters > label.sub { flex: 1 1 140px; }
  .filters > label.sub { display: flex; align-items: center; gap: 6px; }
  .filters > label.sub .field { flex: 1; min-width: 0; }
  .brand span { font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .srow { grid-template-columns: 1fr; gap: 10px; padding: 12px 14px; }
  .snums { justify-content: flex-start; text-align: left; }
  .gcards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } .lcard { transition: none; } }

.pulse[hidden] { display: none; }
.nav a { white-space: nowrap; }
@media (min-width: 721px) and (max-width: 1100px) {
  .nav { gap: 4px; padding-left: 10px; margin-left: 2px; }
  .nav a { padding: 8px 10px; font-size: 14px; }
  .search { min-width: 100px; }
}
@media (max-width: 535px) {
  .top .wrap { gap: 7px; }
  .nav { width: 100%; margin: 0; gap: 4px; flex-wrap: wrap; }
  .nav a { padding: 6px 8px; font-size: 13px; }
}

@media (max-width: 400px) {
  .nav { display: grid; grid-template-columns: auto auto auto auto; gap: 3px; }
  .nav a { padding: 6px 3px; text-align: center; font-size: 12px; }
}

/* ---------- the view the server writes: what a visitor sees until the data arrives, and what a crawler reads ---------- */
#initial-view h2 { margin: 22px 0 8px; font: 650 17px/1.3 "Sora", sans-serif; }
#initial-view ul, #initial-view ol { margin: 0; padding-left: 26px; color: var(--muted); columns: 2 320px; column-gap: 34px; }
#initial-view li { padding: 3px 0; break-inside: avoid; }
#initial-view img { display: block; max-width: 100%; height: auto; margin: 14px 0 0; border-radius: 14px; border: 1px solid var(--line); }
#initial-view .btn { margin: 18px 10px 0 0; }
#initial-view > nav { margin: 0 0 26px; color: var(--muted); }
#initial-view > nav a { color: var(--blue); }

/* ---------- touch: a name, a map or a link in the footer is at least 24 px tall, so a finger hits the one it aims for ---------- */
@media (pointer: coarse), (max-width: 720px) {
  .pl, .lnk.ell, a.chip { min-height: 24px; }
  a.chip { align-items: center; }
  footer a { display: inline-block; padding: 4px 0; }
}

/* ---------- a row of mode buttons that sits inside a wrapper scrolls within it; it used to make a profile and the Maps/Servers list wider than a phone ---------- */
@media (max-width: 720px) {
  #h-seg, #w-seg, #sg-h-seg, #c-mode-wrap { min-width: 0; max-width: 100%; }
  span:has(> .seg) { min-width: 0; max-width: 100%; }
}
