/* Overlay matches — the player's Matches / Maps / Encounters / Weapons tabs,
   the /match/:id page and /matches. Rendered by js/overlay-match.js,
   js/player-overlay.js, js/match.js and js/matches.js. */
@layer tokens {
  :root { --r-md: 12px; --cash: var(--hi); --row: var(--s1); --row-alt: var(--s2); --row-hover: var(--s3); --band: var(--s2); }
}
@layer components {
/* ---------------------------------------------------------------------------
   Overlay matches: player tabs (Matches, Maps, Encounters, Weapons) and the
   /match/:id page. Both render through js/overlay-match.js.
   --------------------------------------------------------------------------- */
.ovm-kpis { margin-bottom: 20px; }
.ovm-kpi-name { font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ovm-place { display: inline-block; min-width: 28px; margin-right: 8px; font: 700 1.1rem/1 var(--f-display); color: var(--ink-2); font-stretch: 78%; }
.ovm-plat { display: inline-flex; align-items: center; color: var(--ink-3); margin-left: 6px; }
.ovm-plat .i { font-size: 15px; }
.ovm-class { display: inline-grid; place-items: center; width: 20px; height: 20px; flex-shrink: 0; border-radius: 3px; background: var(--s4); color: var(--ink); font: 700 .7rem/1 var(--f-display); font-stretch: 78%; }
.ovm-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.ovm-nowrap { white-space: nowrap; }
.ovm-teamsub { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.ovm-teamsub .chip { padding-block: 0; height: 20px; font-size: .6875rem; }
.ovm-matches .ovm-open { white-space: nowrap; }
.ovm-player { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.ovm-player .club { flex-shrink: 0; }
.ovm-rank { display: inline-flex; align-items: center; flex-shrink: 0; }
.ovm-note { padding: 10px 18px 14px; }
.ovm-sub { display: flex; align-items: center; gap: 8px; margin: 24px 0 10px; font: 700 1.2rem/1 var(--f-display); letter-spacing: .02em; text-transform: uppercase; color: var(--ink); font-stretch: 78%; }
.ovm-sub .i { display: none; }

/* Matches list: each match a tile of its own, the result down its left edge
   and a green wash on the wins. A row opens the match in a dialog. */
.ovm-matches { border-collapse: separate; border-spacing: 0 8px; margin-top: -8px; }
.panel .tbl-wrap:has(> .ovm-matches) { padding: 0 14px 6px; background: var(--s1); }
.ovm-matches thead th { background: transparent; height: 34px; color: var(--ink-3); font-size: .75rem; }
.ovm-matches tbody td { background: #26262f !important; height: 64px; border-block: 1px solid #ffffff0a; }
.ovm-matches tbody td:first-child { border-left: 1px solid #ffffff0a; border-radius: var(--r-sm) 0 0 var(--r-sm); box-shadow: inset 4px 0 0 var(--ink-4); }
.ovm-matches tbody td:last-child { border-right: 1px solid #ffffff0a; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.ovm-matches tbody tr.is-win td { background: #1d3a2c !important; border-color: #3ddc8433; }
.ovm-matches tbody tr.is-win td:first-child { box-shadow: inset 4px 0 0 var(--up); }
.ovm-matches tbody tr.is-loss td:first-child { box-shadow: inset 4px 0 0 var(--down); }
.ovm-matches tbody tr:hover td { background: var(--s3) !important; }
.ovm-matches tbody tr.is-win:hover td { background: #234634 !important; }
.ovm-matches tbody tr.ovm-row { cursor: pointer; }
.ovm-caret { font-size: 18px; color: var(--ink-3); vertical-align: middle; transition: color .15s; }
tr.ovm-row:hover .ovm-caret { color: var(--acc); }

/* The match dialog: a sheet from the bottom on a wide screen, centred on a phone. */
.tf-modal.ovm-sheet { place-items: end center; padding: 0; grid-template-columns: minmax(0, 1fr); }
.tf-modal.ovm-sheet .tf-modal-panel { width: min(1440px, 100%); min-width: 0; height: min(90vh, 940px); max-height: 90vh;
  border-radius: 14px 14px 0 0; animation: sheetUp .34s var(--ease); }
@keyframes sheetUp { from { transform: translateY(100%); } }
.ovm-sheet .modal-h { align-items: center; padding: 16px 22px; background: var(--s2); border-radius: 14px 14px 0 0; }
.ovm-sheet .tf-modal-title h3 { display: flex; align-items: baseline; gap: 12px; font-size: 2rem; line-height: 1; }
.ovm-sheet-arena { font: 600 1rem var(--f-ui); text-transform: none; letter-spacing: 0; color: var(--ink-2); }
.ovm-sheet .tf-modal-title .cc-meta { margin-top: 4px; color: var(--ink-3); font-size: .8rem; }
.ovm-sheet .tf-modal-body { padding: 0; }
.ovm-sheet-top { display: grid; gap: 12px; padding: 16px 22px 4px; }
.ovm-sheet-chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* Tabs stay in view while the scoreboard scrolls under them; centred, like a
   Career / Scoreboard / Rounds switch. */
.ovm-sheet-tabs { position: sticky; top: 0; z-index: 2; margin-top: 8px; padding: 0 22px; background: var(--s1); border-bottom: 1px solid var(--line-2); justify-content: center; }
.ovm-sheet-tabs .tab { flex: 1 1 0; justify-content: center; max-width: 320px; }
.ovm-sheet-pane { padding: 18px 22px 26px; }
.ovm-sheet-card { border-radius: var(--r-md); background: var(--s1); overflow: hidden; }
.ovm-sheet tr a.pc-name .pn-name, .ovm-sheet a.pc-name:hover .pn-name { color: var(--ink); }
.ovm-sheet tbody tr:not(.ovm-me):hover > td { background: inherit; }

@media (max-width: 700px) {
  .ovm-sheet .modal-h { padding: 14px 16px; border-radius: var(--r-lg) var(--r-lg) 0 0; align-items: flex-start; }
  .ovm-sheet .tf-modal-title h3 { flex-direction: column; gap: 2px; font-size: 1.35rem; }
  .ovm-sheet-label { display: none; }
  .ovm-sheet .modal-tools .btn { width: 36px; padding: 0; justify-content: center; }
  .ovm-sheet-top { padding: 14px 16px 2px; }
  .ovm-sheet-tabs { padding: 0 8px; }
  .ovm-sheet-pane { padding: 14px 16px 20px; }
}

/* The scoreboard: one block per team, the team colour down its side and
   washed across its header band. */
.ovm-team { --team: var(--ink-4); position: relative; border-radius: var(--r-md); background: var(--s1); overflow: hidden; }
.ovm-team + .ovm-team { margin-top: 10px; }
.ovm-table { min-width: 760px; table-layout: fixed; }
.ovm-table th:first-child { width: 34%; }
.ovm-table th:nth-child(n+6):nth-child(-n+8) { width: 9%; }
.ovm-table th:first-child, .ovm-table td:first-child { padding-left: 18px; }
.ovm-table tbody td:first-child { box-shadow: inset 4px 0 0 var(--team); }
.ovm-table tbody td { background: color-mix(in srgb, var(--team) 5%, var(--row)); }
.ovm-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--team) 5%, var(--row-alt)); }
.ovm-table tbody td:first-child { background: linear-gradient(90deg, color-mix(in srgb, var(--team) 22%, var(--row)), color-mix(in srgb, var(--team) 5%, var(--row))); }
.ovm-table tbody tr:nth-child(even) td:first-child { background: linear-gradient(90deg, color-mix(in srgb, var(--team) 22%, var(--row-alt)), color-mix(in srgb, var(--team) 5%, var(--row-alt))); }
.ovm-team-head th { color: var(--ink); font-weight: 600; background: color-mix(in srgb, var(--team) 34%, var(--s1)); }
.ovm-team-head th:first-child { font: 700 1.05rem/1 var(--f-display); letter-spacing: .03em; text-transform: uppercase; font-stretch: 78%; }
.ovm-cash { margin-left: 10px; color: var(--cash); font: 700 .85rem var(--f-ui); }
.ovm-table tfoot td { font-size: .75rem; background: var(--s1); }
tr.ovm-me > td, li.ovm-me { background: #3b3522 !important; }
tr.ovm-me > td:first-child { background: linear-gradient(90deg, #6b5a1f, #3b3522) !important; }

.ovm-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px; background: var(--bg); border-radius: var(--r-md); overflow: hidden; }
.ovm-facts > div { padding: 12px 16px; background: var(--s1); min-width: 0; }
.ovm-facts dt { font-size: .78rem; font-weight: 600; color: var(--ink-3); }
.ovm-facts dd { margin-top: 3px; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }

/* Weapons */
.ovm-weapon { display: flex; align-items: center; gap: 10px; }
.ovm-weapon-img { width: 56px; height: 32px; object-fit: contain; flex-shrink: 0; }
.ovm-weapon-none { display: grid; place-items: center; color: var(--ink-4); background: var(--s3); border-radius: 4px; }
.ovm-share { display: inline-flex; align-items: center; gap: 8px; }

/* Maps: one row per arena, its picture washed across the name cell. */
.ovm-maprow { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ovm-map-thumb { display: grid; place-items: center; width: 104px; height: 58px; flex-shrink: 0; overflow: hidden; border-radius: var(--r-xs);
  background: var(--s3); color: var(--ink-4); }
.ovm-map-thumb img { width: 100%; height: 100%; object-fit: cover; }

.ovm-map-title { font: 700 1.2rem/1.1 var(--f-display); letter-spacing: .02em; text-transform: uppercase; font-stretch: 78%; }
.ovm-maprows td { height: 74px; }
.ovm-map-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 10px; padding: 16px; }
.ovm-map-stats dt { font-size: .75rem; font-weight: 600; color: var(--ink-3); }
.ovm-map-stats dd { margin-top: 2px; font: 700 1.2rem/1.1 var(--f-display); color: var(--ink); font-variant-numeric: tabular-nums; font-stretch: 78%; }

/* Encounters: the group switch sits in the card head. */
.ovm-seg { border-bottom: 0; gap: 2px; }
.ovm-seg .tab { height: 40px; padding-block: 0; font-size: .85rem; }

/* Teams in finishing order (TF.ovm.standings): one tile per team, the
   placement in a block of the team colour. Shared by /match and the dialog. */
.ovm-standings { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; list-style: none; margin: 0; padding: 0; }
.ovm-standings li { --team: var(--ink-4); display: flex; align-items: center; gap: 12px; min-width: 0; padding: 8px 12px 8px 8px;
  border-radius: var(--r-sm); background: linear-gradient(90deg, color-mix(in srgb, var(--team) 26%, var(--s1)), color-mix(in srgb, var(--team) 6%, var(--s1))); }
.ovm-st-place { display: grid; place-items: center; width: 44px; height: 40px; flex-shrink: 0; border-radius: 0; clip-path: var(--lean);
  background: var(--team); color: #fff; font: 800 1.6rem/1 var(--f-display); text-shadow: 0 1px 2px #0006; font-stretch: 78%; }
.ovm-st-body { display: grid; gap: 4px; min-width: 0; }
.ovm-st-name { font: 700 1.05rem/1 var(--f-display); letter-spacing: .03em; text-transform: uppercase; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-stretch: 78%; }
.ovm-st-meta { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ovm-st-cash { color: var(--gold); font-weight: 700; }
.ovm-st-dot { color: var(--ink-4); }
.ovm-st-win { margin-left: auto; font-size: 20px; color: var(--gold); }

/* /match/:id */
.ovm-banner .banner-inner { padding-top: 28px; }
.ovm-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; }
.ovm-kicker { font: 700 .9rem var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--acc-hi); font-stretch: 78%; }
.ovm-arena { margin-top: 6px; font: 600 1.05rem var(--f-ui); color: var(--ink-2); }
.ovm-arena a:hover { color: #fff; }
.ovm-banner .ovm-standings { margin-top: 18px; }
.ovm-head-side { display: grid; justify-items: end; gap: 10px; }
.ovm-when { display: grid; justify-items: end; }
.ovm-label { font-size: .75rem; color: var(--ink-3); font-weight: 600; }
.ovm-big { font: 700 1.8rem/1.1 var(--f-display); color: var(--ink); font-stretch: 78%; }
.ovm-actions { display: flex; align-items: center; gap: 8px; }
/* Teams tab: one card per team — a band in the team colour, the team's
   numbers, then each player with their own line. Two teams face each other. */
.ovm-teamcards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); align-items: start; }
.ovm-tc { --team: var(--ink-4); border-radius: var(--r-lg); background: var(--s1); overflow: hidden; }
.ovm-tc-head {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 18px 18px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--team) 42%, var(--s1)), color-mix(in srgb, var(--team) 10%, var(--s1)));
}
.ovm-tc-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ovm-tc-id b { font: 800 1.45rem/1 var(--f-display); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-stretch: 78%; }
.ovm-tc-id span { color: #ffffffb3; font-size: .78rem; font-weight: 500; }
.ovm-tc-id em { font-style: normal; font-weight: 700; color: var(--cash); }
.ovm-tc-head .ovm-st-win { font-size: 26px; }
.ovm-tc-share { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #00000040; }
.ovm-tc-share i { display: block; height: 100%; background: var(--team); transform-origin: left; animation: none; }
.ovm-tc-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 12px 8px; border-bottom: 1px solid var(--line); }
.ovm-tc-stats > div { padding: 0 10px; min-width: 0; }
.ovm-tc-stats > div + div { border-left: 1px solid var(--line); }
.ovm-tc-stats dt { font: 700 .72rem var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-stretch: 78%; }
.ovm-tc-stats dd { margin-top: 2px; font: 700 1.3rem/1.1 var(--f-display); font-variant-numeric: tabular-nums; font-stretch: 78%; }
.ovm-tc-roster { padding: 6px 0 8px; }
.ovm-tc-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px 44px 44px 54px; align-items: center; gap: 4px; min-height: 40px; padding: 0 18px; font-variant-numeric: tabular-nums; }
.ovm-tc-row > span:not(.ovm-tc-who), .ovm-tc-row > b { text-align: right; }
.ovm-tc-row > span:not(.ovm-tc-who) { color: var(--ink-2); font-weight: 600; }
.ovm-tc-row.is-head { min-height: 30px; font: 700 .72rem var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-stretch: 78%; }
.ovm-tc-row.is-head > span { color: var(--ink-3); font-weight: 700; }
.ovm-tc-row.is-head > span:first-child { text-align: left; }
/* Inside the match dialog the cards sit on the panel colour: lift them a step. */
.ovm-sheet :is(.ovm-tc, .ovm-dcard, .ovm-did) { background: var(--s2); }
.ovm-sheet .ovm-dhead, .ovm-sheet .ovm-darena:not(.has-art) { background: var(--s3); }
.ovm-tc-row:not(.is-head):nth-child(odd) { background: #ffffff05; }
.ovm-tc-row.ovm-me { background: #3b3522 !important; box-shadow: inset 3px 0 0 var(--cash); }
.ovm-tc-who { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.ovm-tc-who .pc-name { min-width: 0; }
.ovm-top {
  flex-shrink: 0; height: 18px; padding: 0 8px; display: inline-grid; place-items: center; clip-path: var(--lean);
  background: var(--cash); color: #1d1400; font: 800 .72rem/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; font-stretch: 78%; }

/* Lobby: who joined after the start, left or came back. A tag by the name on
   the scoreboard and team cards (a player who left dimmed, numbers as last
   seen), and a tab of its own: the count, round by round, a card per team. */
.ovm-lobby-tag {
  flex-shrink: 0; height: 18px; padding: 0 7px; display: inline-grid; place-items: center; clip-path: var(--lean);
  background: var(--up-a12); color: var(--up); font: 800 .7rem/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; font-stretch: 78%; }
.ovm-lobby-tag.is-left { background: #ffffff12; color: var(--ink-3); }
.ovm-lobby-tag.is-back { background: #ffc82e1f; color: var(--gold); }
tr.ovm-left > td, .ovm-tc-row.ovm-left, .ovm-lb-row.ovm-left { color: var(--ink-3); }
tr.ovm-left .pc-name, .ovm-tc-row.ovm-left .pc-name, .ovm-lb-row.ovm-left .pc-name { opacity: .6; }

.ovm-lb { display: grid; gap: 16px; }
/* The count: four tiles, each tinted in the colour of what it counts. */
.ovm-lb-sum { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.ovm-lb-tile { --k: var(--acc-hi); display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-lg);
  background: linear-gradient(100deg, color-mix(in srgb, var(--k) 16%, var(--s1)), var(--s1) 70%); }
.ovm-lb-tile.is-joined { --k: var(--up); }
.ovm-lb-tile.is-left { --k: var(--down); }
.ovm-lb-tile.is-back { --k: var(--gold); }
.ovm-lb-ic { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; clip-path: var(--lean);
  background: color-mix(in srgb, var(--k) 22%, transparent); color: var(--k); }
.ovm-lb-ic .i { font-size: 22px; }
.ovm-lb-tx { display: grid; gap: 2px; min-width: 0; }
.ovm-lb-tx small { font: 700 .72rem var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-stretch: 78%; }
.ovm-lb-tx b { font: 800 1.9rem/1 var(--f-display); font-variant-numeric: tabular-nums; font-stretch: 78%; }
.ovm-lb-tx em { font-style: normal; font-size: .75rem; color: var(--ink-3); }

/* Round by round: one stop per round on a rail, who came in at it and who
   went out after it. */
.ovm-lb-card { border-radius: var(--r-lg); background: var(--s1); overflow: hidden; }
.ovm-lb-h { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; background: var(--band);
  font: 700 1.05rem var(--f-display); letter-spacing: .04em; text-transform: uppercase; font-stretch: 78%; }
.ovm-lb-h .i { font-size: 18px; color: var(--acc-hi); }
.ovm-lb-h small { margin-left: auto; font: 500 .78rem var(--f-ui); letter-spacing: 0; text-transform: none; color: var(--ink-3); font-stretch: 100%; }
.ovm-lb-rail { list-style: none; margin: 0; padding: 18px 18px 16px; display: grid; grid-template-columns: repeat(var(--n), minmax(150px, 1fr)); gap: 12px; overflow-x: auto; }
.ovm-lb-rail li { position: relative; display: grid; align-content: start; gap: 12px; min-width: 0; }
/* The rail: from each stop to the next. */
.ovm-lb-rail li:not(:last-child)::after { content: ''; position: absolute; top: 15px; left: 44px; right: -12px; height: 2px; background: var(--line); }
.ovm-lb-node { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 32px; clip-path: var(--lean);
  background: var(--s3); color: var(--ink-2); font: 800 1rem/1 var(--f-display); font-stretch: 78%; }
.ovm-lb-rail li.is-moved .ovm-lb-node { background: var(--acc); color: #fff; }
.ovm-lb-moves { display: flex; flex-wrap: wrap; align-content: start; gap: 6px; }
.ovm-lb-after { flex-basis: 100%; margin-top: 2px; font: 700 .68rem var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); font-stretch: 78%; }
.ovm-lb-none { font-size: .78rem; color: var(--ink-4); }
.ovm-lb-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; height: 26px; padding: 0 9px 0 7px; border-radius: var(--r-sm);
  background: var(--up-a12); color: var(--up); font-size: .78rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovm-lb-chip .i { flex-shrink: 0; font-size: 15px; }
.ovm-lb-chip.is-left { background: color-mix(in srgb, var(--down) 14%, transparent); color: var(--down); }
.ovm-lb-chip.is-back { background: #ffc82e1f; color: var(--gold); }

/* A card per team (the Teams tab's card): each player's story and numbers. */
.ovm-lb-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 40px 40px 52px; align-items: center; gap: 8px; min-height: 44px; padding: 4px 18px; font-variant-numeric: tabular-nums; }
.ovm-lb-row:not(.is-head):nth-child(odd) { background: #ffffff05; }
.ovm-lb-row.ovm-me { background: #3b3522 !important; }
.ovm-lb-row > span:nth-child(n+3), .ovm-lb-row > b { text-align: right; }
.ovm-lb-row > span:nth-child(n+3) { color: var(--ink-2); font-weight: 600; }
.ovm-lb-row.is-head { min-height: 30px; font: 700 .72rem var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-stretch: 78%; }
.ovm-lb-row.is-head > span { color: var(--ink-3); font-weight: 700; }
.ovm-lb-what { display: flex; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
.ovm-lb-ev { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink-2); white-space: nowrap; }
.ovm-lb-ev::before { content: ''; width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: var(--up); }
.ovm-lb-ev.is-left::before { background: var(--down); }
.ovm-lb-ev.is-back::before { background: var(--gold); }
.ovm-lb > .ovm-round-note { margin: 0; }
.ovm-sheet :is(.ovm-lb-tile, .ovm-lb-card) { background-color: var(--s2); }
.ovm-sheet .ovm-lb-tile { background: linear-gradient(100deg, color-mix(in srgb, var(--k) 16%, var(--s2)), var(--s2) 70%); }
@media (max-width: 620px) {
  .ovm-lb-row { grid-template-columns: minmax(0, 1fr) 34px 34px 46px; padding: 6px 12px; }
  .ovm-lb-row .ovm-lb-what { grid-column: 1 / -1; grid-row: 2; }
  .ovm-lb-row.is-head > span:nth-child(2) { display: none; }
  .ovm-lb-h small { display: none; }
  /* Two tiles a line, compact. */
  .ovm-lb-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ovm-lb-tile { gap: 10px; padding: 10px 12px; }
  .ovm-lb-ic { width: 34px; height: 34px; }
  .ovm-lb-tx b { font-size: 1.5rem; }
  .ovm-lb-tx em { display: none; }
  /* The rounds one under the other, the rail running down. */
  .ovm-lb-rail { grid-template-columns: 1fr; gap: 14px; padding: 14px 12px; overflow: visible; }
  .ovm-lb-rail li { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
  .ovm-lb-rail li:not(:last-child)::after { top: 32px; bottom: -14px; left: 21px; right: auto; width: 2px; height: auto; }
}

/* Details tab: arena, match and timing as three cards, the id on its own line. */
.ovm-details { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-items: start; }
.ovm-dcard { border-radius: var(--r-lg); background: var(--s1); overflow: hidden; }
.ovm-dhead { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; background: var(--band); font: 700 1.05rem var(--f-display); letter-spacing: .04em; text-transform: uppercase; font-stretch: 78%; }
.ovm-dhead .i { font-size: 18px; color: var(--acc-hi); }
.ovm-darena { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 46px; padding: 12px 18px; background: var(--band); }
.ovm-darena.has-art { min-height: 120px; }
.ovm-darena.has-art::before { content: ''; position: absolute; inset: 0; z-index: -2; background: var(--art) center / cover no-repeat; }
.ovm-darena.has-art::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #0e0e1222, #0e0e12e6); }
.ovm-darena small { font: 700 .72rem var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--acc-hi); font-stretch: 78%; }
.ovm-darena b { font: 800 1.6rem/1 var(--f-display); text-transform: uppercase; font-stretch: 78%; }
.ovm-darena a:hover { color: var(--acc-hi); }
.ovm-dlist > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; padding: 6px 18px; }
.ovm-dlist > div:nth-child(even) { background: #ffffff05; }
.ovm-dlist dt { color: var(--ink-3); font-size: .82rem; }
.ovm-dlist dd { text-align: right; font-weight: 700; overflow-wrap: anywhere; }
.ovm-did { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding: 10px 12px 10px 18px; border-radius: var(--r-lg); background: var(--s1); }
.ovm-did > span { font: 700 .78rem var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-stretch: 78%; }
.ovm-did code { flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: var(--ink-2); font-size: .82rem; overflow-wrap: anywhere; }

@media (max-width: 620px) {
  .ovm-tc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 10px; }
  .ovm-tc-stats > div:nth-child(4) { border-left: 0; }
  .ovm-tc-row { grid-template-columns: minmax(0, 1fr) 30px 30px 30px 44px; padding: 0 12px; }
  .ovm-tc-who .ovm-plat { display: none; }
}
@media (max-width: 900px) {
  .ovm-head { grid-template-columns: 1fr; align-items: start; }
  .ovm-head-side, .ovm-when { justify-items: start; }
  .ovm-map-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------------------
   /matches: the latest games, one column per mode (js/matches.js)
   --------------------------------------------------------------------------- */
.mxs-search { margin-top: 20px; max-width: 760px; }
.mxs-query { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--ink-2); }
.mxs-query .i { color: var(--ink-3); font-size: 18px; }
.mxs-query .btn { margin-left: auto; }
.mxs-groups { display: grid; gap: 34px; }
.mxs-group { min-width: 0; }
.mxs-group-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; font: 800 1.65rem/1 var(--f-display); text-transform: uppercase; letter-spacing: .01em; font-stretch: 78%; }
.mxs-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.mxs-card { border-radius: var(--r-md); background: var(--s1); overflow: hidden; cursor: pointer; transition: background .15s, box-shadow .15s; }
.mxs-card:hover { box-shadow: 0 0 0 1px var(--line-3); }
.mxs-card:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.mxs-card-head { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--s2); }
.mxs-card-ic { display: grid; place-items: center; width: 32px; height: 30px; flex-shrink: 0; border-radius: 0; clip-path: var(--lean); background: var(--acc); color: #fff; }
.mxs-card-ic .i { font-size: 17px; }
.mxs-card-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.mxs-card-title b { font: 700 1rem var(--f-display); text-transform: uppercase; letter-spacing: .02em; color: var(--ink); font-stretch: 78%; }
.mxs-card-title span { font-size: .6875rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mxs-view { margin-left: auto; flex-shrink: 0; height: 28px; padding: 0 10px; font-size: .72rem; }
.mxs-teams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; background: var(--bg); }
.mxs-team { --team: var(--ink-4); background: color-mix(in srgb, var(--team) 7%, var(--s1)); box-shadow: inset 3px 0 0 var(--team); min-width: 0; }
.mxs-team-head { display: flex; align-items: center; gap: 4px; padding: 6px 10px; background: color-mix(in srgb, var(--team) 26%, var(--s1)); }
.mxs-team-head .ovm-place { min-width: 20px; margin-right: 2px; font-size: .85rem; color: #fff; }
.mxs-team-name { font: 700 .82rem/1 var(--f-display); letter-spacing: .03em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-stretch: 78%; }
.mxs-cash { margin-left: auto; color: var(--gold); font-size: .68rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.mxs-player { display: flex; align-items: center; gap: 7px; padding: 5px 10px; min-width: 0; }
.mxs-player + .mxs-player { border-top: 1px solid #0000002e; }
.mxs-player .ovm-class { width: 17px; height: 17px; font-size: .62rem; }
.mxs-player-main { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.mxs-player-main .pc-name { font-size: .74rem; }
.mxs-player-main .pn-name { overflow: hidden; text-overflow: ellipsis; }
.mxs-kda { font-size: .64rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mxs-player .ovm-plat { margin-left: auto; }
.mxs-player .ovm-plat svg, .mxs-player .ovm-plat .i { width: 12px; height: 12px; font-size: 12px; }
@media (max-width: 980px) { .mxs-cards { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) {
  .mxs-teams { grid-template-columns: minmax(0, 1fr); }
  .mxs-card-head { flex-wrap: wrap; }
}

/* ---- match rounds (js/overlay-match.js) ------------------------------------- */
.ovm-rounds { flex-wrap: wrap; margin-bottom: 12px; }
.ovm-round-note { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; color: var(--ink-3); font-size: .8rem; }
.ovm-round-note .i { font-size: 16px; color: var(--ink-4); }
tr[data-round-row] { cursor: pointer; }
tr[data-round-row]:hover td { background: var(--row-hover); }
.ovm-variant { display: inline-flex; align-items: center; gap: 5px; }
.ovm-variant img { width: 14px; height: 14px; object-fit: contain; }



}

/* ---- the player's recorded matches, as a list of cards ----------------- */
@layer components {
  .mlist { display: flex; flex-direction: column; gap: 8px; }
  .mrow {
    --rc: var(--ink-4);
    position: relative; display: grid; align-items: center; gap: 16px;
    grid-template-columns: 56px 112px minmax(140px, 1.3fr) minmax(150px, 1fr) auto 72px 36px;
    padding: 10px 12px 10px 0; border-radius: var(--r-lg); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line);
    cursor: pointer; overflow: hidden; transition: background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
  }
  .mrow::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--rc); }
  .mrow:hover, .mrow:focus-visible { background: var(--s2); box-shadow: inset 0 0 0 1px var(--line-2); outline: none; }
  .mrow:active { transform: scale(.997); }
  .mrow.is-win { --rc: var(--up); background: linear-gradient(90deg, color-mix(in srgb, var(--up) 9%, var(--s1)), var(--s1) 40%); }
  .mrow.is-loss { --rc: var(--down); background: linear-gradient(90deg, color-mix(in srgb, var(--down) 8%, var(--s1)), var(--s1) 40%); }
  .mr-result { justify-self: center; font: 900 15px/1 var(--f-display); font-stretch: 78%; text-transform: uppercase; color: var(--rc); }
  .mrow:not(.is-win):not(.is-loss) .mr-result { color: var(--ink-2); }
  .mr-arena { width: 112px; height: 60px; border-radius: 8px; overflow: hidden; background: var(--s3); display: grid; place-items: center; color: var(--ink-4); }
  .mr-arena img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out); }
  .mrow:hover .mr-arena img { transform: scale(1.06); }
  .mr-main, .mr-team-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .mr-main b, .mr-team-main b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mr-main small, .mr-team-main small { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mr-main .mr-when { color: var(--ink-4); font-family: var(--f-mono); font-size: 11px; }
  .mr-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .mr-place { flex: none; min-width: 34px; height: 26px; display: grid; place-items: center; border-radius: 6px; background: var(--s3); font: 850 14px/1 var(--f-display); font-stretch: 76%; }
  .mrow.is-win .mr-place, .mr-place:is(:first-child) { }
  .mr-stats { display: grid; grid-template-columns: repeat(4, 38px); gap: 4px; }
  .mr-stat { display: flex; flex-direction: column; align-items: center; gap: 3px; }
  .mr-stat small { font: 600 10px/1 var(--f-mono); color: var(--ink-4); }
  .mr-stat b { font: 750 15px/1 var(--f-display); font-stretch: 80%; font-variant-numeric: tabular-nums; }
  .mr-kd { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
  .mr-kd small { font: 600 10px/1 var(--f-mono); color: var(--ink-4); }
  .mr-kd b { font: 900 22px/1 var(--f-display); font-stretch: 72%; }
  .mr-open { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: var(--ink-3); transition: background var(--t-fast), color var(--t-fast); }
  .mr-open:hover { background: var(--s4); color: var(--ink); }
  .mlist-more { display: flex; justify-content: center; margin-top: 4px; }
  @media (max-width: 1000px) {
    .mrow { grid-template-columns: 48px 84px minmax(0, 1fr) auto 60px; gap: 12px; }
    .mr-team, .mr-open { display: none; }
    .mr-arena { width: 84px; height: 48px; }
  }
  @media (max-width: 560px) {
    .mrow { grid-template-columns: 44px minmax(0, 1fr) 56px; padding-right: 12px; }
    .mr-arena, .mr-stats { display: none; }
  }
}
@layer components { .mrow.is-first { --rc: var(--hi); } .mrow.is-first .mr-result { color: var(--hi); } }

/* ---- scoreboard & match sheet, quieter: the team colour is an accent, not a fill ---- */
@layer components {
  .ovm-team { background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
  .ovm-table tbody td, .ovm-table tbody tr:nth-child(even) td { background: transparent; }
  .ovm-table tbody td:first-child, .ovm-table tbody tr:nth-child(even) td:first-child { background: linear-gradient(90deg, color-mix(in srgb, var(--team) 12%, transparent), transparent 60%); box-shadow: inset 3px 0 0 var(--team); }
  .ovm-table tbody tr:hover td { background: var(--s2); }
  .ovm-team-head th { position: static; background: color-mix(in srgb, var(--team) 14%, var(--s2)); color: var(--ink-3); border-bottom: 1px solid color-mix(in srgb, var(--team) 35%, transparent); height: 44px; }
  .ovm-team-head th:first-child { color: var(--ink); font: 800 15px/1 var(--f-display); font-stretch: 100%; letter-spacing: .04em; }
  .ovm-team-head .ovm-place { color: var(--team); filter: brightness(1.4); }
  .ovm-team-head .ovm-cash { margin-left: 10px; font: 700 13px/1 var(--f-mono); color: var(--hi); letter-spacing: 0; }
  .ovm-table td { height: 46px; }
  .ovm-table tfoot td { background: transparent; border-top: 1px solid var(--line); color: var(--ink-4); font-size: 12px; }
  tr.ovm-me > td, li.ovm-me { background: rgb(var(--acc-rgb) / .1) !important; }
  tr.ovm-me > td:first-child { background: linear-gradient(90deg, rgb(var(--acc-rgb) / .25), rgb(var(--acc-rgb) / .08)) !important; box-shadow: inset 3px 0 0 var(--acc) !important; }
  .ovm-tc-row.ovm-me { background: rgb(var(--acc-rgb) / .1) !important; box-shadow: inset 3px 0 0 var(--acc); }
  .ovm-tc-row:not(.is-head):nth-child(odd) { background: transparent; }
  .ovm-class { border-radius: 5px; background: var(--s4); font-stretch: 80%; }

  /* the sheet: a centred panel rising from the bottom, the arena behind its head */
  .tf-modal.ovm-sheet { place-items: end center; }
  .tf-modal.ovm-sheet .tf-modal-panel { width: min(1240px, 100%); height: min(88vh, 940px); border-radius: 22px 22px 0 0; box-shadow: 0 -30px 80px -20px #000, 0 0 0 1px var(--line-2); animation: sheet-in .42s var(--ease-out) both; }
  .ovm-sheet .modal-h { position: relative; padding: 22px 26px 18px; background: var(--s1); border-radius: 22px 22px 0 0; border-bottom: 1px solid var(--line); overflow: hidden; isolation: isolate; }
  .ovm-sheet .modal-h::before { content: ''; position: absolute; left: 50%; top: 8px; width: 44px; height: 4px; margin-left: -22px; border-radius: 2px; background: var(--s5); }
  .ovm-sheet .modal-h .ovm-art { position: absolute; inset: 0; z-index: -1; background: var(--art) center 40% / cover; opacity: .3; -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent 10%, #000 70%); }
  .ovm-sheet .tf-modal-title h3 { font-size: 28px; font-stretch: 112%; gap: 14px; align-items: baseline; flex-wrap: wrap; }
  .ovm-kicker { font: 700 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--acc-hi); margin-bottom: 8px; }
  .ovm-sheet-arena { font-size: 15px; color: var(--ink-2); }
  .ovm-sheet .tf-modal-title .cc-meta { font-size: 12.5px; }
  .ovm-sheet-top { padding: 18px 26px 6px; }
  .ovm-sheet-tabs { position: sticky; top: 0; z-index: 3; margin-top: 10px; padding: 0 26px; background: color-mix(in srgb, var(--s1) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); justify-content: flex-start; gap: 4px; }
  .ovm-sheet-tabs .tab { flex: none; max-width: none; }
  .ovm-sheet-pane { padding: 20px 26px 30px; }
  .ovm-sheet .modal-b { background: var(--bg-2); }
  @media (max-width: 720px) {
    .tf-modal.ovm-sheet .tf-modal-panel { height: 92vh; }
    .ovm-sheet .modal-h, .ovm-sheet-top, .ovm-sheet-pane { padding-inline: 16px; }
    .ovm-sheet-tabs { padding-inline: 10px; }
    .ovm-sheet .tf-modal-title h3 { font-size: 21px; }
  }
}
@layer components {
  .mt-head { padding-bottom: 26px; }
  .mt-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 13.5px; color: var(--ink-2); }
  .mt-meta > * { display: inline-flex; align-items: center; gap: 7px; }
  .mt-meta .i { color: var(--ink-3); }
  .mt-meta a:hover { color: var(--acc-hi); }
  .mt-chips { margin-top: 18px; }
  .mt-head .ovm-standings { margin-top: 16px; }
  .mt-bar { margin-bottom: 0; }
  .ovm-kpis { margin-bottom: 18px; }
}
@layer components {
  /* header buttons sit on the arena photo: give them their own solid plate */
  .ovm-sheet .modal-tools { position: relative; z-index: 1; }
  .ovm-sheet .modal-tools .btn { --b-bg: color-mix(in srgb, var(--s2) 92%, transparent); --b-bd: var(--line-3); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px var(--b-bd), 0 6px 18px -8px #000; }
  .ovm-sheet .modal-tools .btn:hover { --b-bg: var(--s4); }
  .ovm-sheet .modal-tools [data-action="modal-close"] { --b-bg: var(--s3); }
  .ovm-sheet .modal-h .ovm-art { opacity: .22; }
  .ovm-sheet .modal-h .ovm-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--s1) 20%, color-mix(in srgb, var(--s1) 40%, transparent)); }
}
@layer components {
  /* sheet head: a plain surface in the site's colours, a red rule on top */
  .ovm-sheet .modal-h { background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 7%, var(--s2)), var(--s1)); }
  .ovm-sheet .modal-h::after { content: ''; position: absolute; left: 26px; right: 26px; top: 0; height: 2px; background: linear-gradient(90deg, var(--acc), transparent 70%); }
  .ovm-sheet .modal-tools .btn { --b-bg: var(--s3); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: inset 0 0 0 1px var(--line-2); }
}
@layer components {
  .dt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
  .dt-card { border-radius: var(--r-lg); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
  .dt-head { display: flex; align-items: center; gap: 9px; height: 46px; padding: 0 16px; border-bottom: 1px solid var(--line); font: 800 13px/1 var(--f-display); font-stretch: 112%; letter-spacing: .06em; text-transform: uppercase; }
  .dt-head .i { color: var(--acc); font-size: 17px; }
  .dt-pic { aspect-ratio: 16 / 7; overflow: hidden; border-bottom: 1px solid var(--line); }
  .dt-pic img { width: 100%; height: 100%; object-fit: cover; }
  .dt-list { padding: 4px 16px 8px; }
  .dt-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 42px; border-bottom: 1px solid var(--line); }
  .dt-row:last-child { border-bottom: 0; }
  .dt-row dt { font-size: 12.5px; color: var(--ink-3); }
  .dt-row dd { font-weight: 600; font-size: 13.5px; text-align: right; }
  .dt-row dd a { color: var(--acc-hi); }
  .dt-id { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 12px 16px; border-radius: var(--r-lg); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
  .dt-id > span { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); }
  .dt-id code { flex: 1; min-width: 0; overflow-wrap: anywhere; padding: 6px 10px; border-radius: 7px; background: var(--bg-2); color: var(--ink-2); }
  @media (max-width: 900px) { .dt-grid { grid-template-columns: minmax(0, 1fr); } }
}
@layer components {
  .dt-panel { overflow: hidden; }
  .dt-rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 0; }
  .dt-rows .dt-row { min-height: 50px; padding: 0 18px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
  .dt-rows .dt-row:nth-child(3n) { border-right: 0; }
  .dt-panel .dt-id { margin: 0; border-radius: 0; box-shadow: none; background: var(--bg-2); padding: 12px 18px; }
  @media (max-width: 900px) { .dt-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dt-rows .dt-row:nth-child(3n) { border-right: 1px solid var(--line); } .dt-rows .dt-row:nth-child(2n) { border-right: 0; } }
  @media (max-width: 560px) { .dt-rows { grid-template-columns: minmax(0, 1fr); } .dt-rows .dt-row { border-right: 0 !important; } }
}
@layer components {
  .ovm-sheet .modal-h { background: var(--s1); }
  .ovm-sheet .modal-h::after { left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgb(var(--acc-rgb) / .6), transparent); }
  .ovm-sheet .ovm-kicker { color: var(--ink-3); }
  .ovm-sheet .tf-modal-title h3 { color: var(--ink); }
  .ovm-sheet-arena { color: var(--ink-3); font-weight: 500; }
  .ovm-sheet .tf-modal-title .cc-meta { color: var(--ink-3); }
  .ovm-sheet .modal-b { background: var(--bg); }
  .ovm-sheet-top { background: var(--s1); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
  .ovm-sheet-tabs { background: color-mix(in srgb, var(--bg) 92%, transparent); margin-top: 0; }
}
