/* Matcherinos (Public Data): tournament cards, a bracket, and a match dialog with drafts + stats.
   Built from the site's own tokens (index.css): surfaces, --primary green, Lilita One / Inter. */

:root {
    --mt-live: #ff6b6b;
    --mt-gold: #f2c94c;
}

.mt-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px var(--pad) 96px;
}

.page-head { margin-bottom: 28px; text-align: center; }

.eyebrow {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.01em;
}

.page-lead { margin: 10px auto 0; max-width: 560px; color: var(--text-dim); }

.notice--error {
    padding: 12px 16px;
    margin-bottom: 16px;
    background: rgba(255, 122, 122, 0.08);
    border: 1px solid rgba(255, 122, 122, 0.35);
    border-radius: var(--radius-sm);
    color: #ff7a7a;
    font-size: 14px;
    font-weight: 600;
}

.h2h-credit {
    margin-top: 36px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

.muted { color: var(--text-dim); }

/* ---------- filters ---------- */

.fld {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
}

.fld input,
.fld select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    background: var(--surface-3);
    color: var(--text);
    color-scheme: dark;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font: 400 14px var(--font-body);
}

.fld input:focus,
.fld select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--primary-glow);
}

.mt-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr);
    gap: 14px;
    max-width: 760px;
    margin: 0 auto 22px;
}

@media (max-width: 900px) { .mt-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .mt-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.mt-count { margin-bottom: 14px; text-align: center; font-size: 13px; }

/* ---------- tournament cards ---------- */

.mt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr));
    gap: 18px;
}

.mt-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--border-strong);
    border-radius: var(--radius-md);
    transition: transform var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.mt-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.mt-card--live { border-top-color: var(--mt-live); }
.mt-card--upcoming { border-top-color: var(--blue); }

.mt-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: linear-gradient(135deg, var(--surface-3), var(--bg-2));
}

.mt-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.mt-status {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 99px;
    background: rgba(8, 10, 15, 0.82);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.mt-status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
}

.mt-status--live { color: var(--mt-live); }
.mt-status--live::before { background: var(--mt-live); box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.25); }
.mt-status--upcoming { color: var(--blue); }
.mt-status--upcoming::before { background: var(--blue); }

.mt-title {
    min-height: 2.5em;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mt-when { font-size: 13px; color: var(--text-dim); }

.mt-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.mt-chip {
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--surface-3);
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 700;
}

.mt-chip--prize { background: var(--primary-soft); color: var(--primary); }

.mt-open { width: 100%; margin-top: auto; }

.mt-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 26px;
    font-size: 13px;
    color: var(--text-dim);
}

.mt-empty { padding: 40px 0; text-align: center; }

/* ---------- one tournament ---------- */

.mt-back { margin-bottom: 14px; }

.mt-detail-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    padding: 16px;
    margin-bottom: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

/* (an event that could not be loaded leaves its header empty: no bare box under the error message) */
.mt-detail-head:empty { display: none; }

.mt-detail-head img {
    width: 200px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.mt-detail-info { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; }
.mt-detail-info h2 { font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1.15; }

.mt-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.mt-tab {
    padding: 7px 14px;
    background: var(--surface-2);
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: 99px;
    font: 700 12px var(--font-body);
    cursor: pointer;
}

.mt-tab[aria-selected="true"] { background: var(--primary-soft); color: var(--primary); border-color: rgba(174, 232, 117, 0.35); }

.mt-bracket-scroll {
    overflow: auto;
    max-height: 80vh;
    padding-bottom: 12px;
    color-scheme: dark;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

.mt-bracket {
    display: flex;
    gap: 34px;
    width: max-content;
    min-height: 120px;
}

.mt-round { display: flex; flex-direction: column; width: 250px; }

.mt-round-name {
    margin-bottom: 10px;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* the matches of a round share the column's height evenly, so each sits between the two it fed from */
.mt-round-matches { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 12px; }

.mt-match {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.mt-match:hover { border-color: var(--primary); transform: translateY(-1px); }
.mt-match:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.mt-match--live { border-color: var(--mt-live); }

.mt-team {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
}

.mt-team + .mt-team { border-top: 1px solid var(--border); }
/* the chance on a bracket card (an official match not played yet) */
.mt-team b.mt-chance { font-family: var(--font-body); font-size: 12px; font-weight: 800; color: var(--primary); opacity: 0.85; }

/* the prediction of a match (official events): chance bar, likely scores, one card per set once the maps are out */
.mt-pred:empty { display: none; }
.mt-pred { margin: 0 0 14px; padding: 14px; background: var(--surface); border: 1px solid rgba(174, 232, 117, 0.3); border-radius: var(--radius-md); }
.mt-pred-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.mt-pred-head h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 20px; }
.mt-pred-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.mt-pred-actions--head { margin-left: 0; margin-top: 8px; }
.mt-pred-conf { padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; background: var(--surface-3); color: var(--text-dim); }
.mt-pred-conf--high { background: rgba(174, 232, 117, 0.16); color: var(--primary); }
.mt-pred-conf--low { background: rgba(255, 184, 77, 0.16); color: #ffb84d; }
.mt-pred-bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(70px, 1.2fr) minmax(0, 1fr); align-items: center; gap: 12px; }
.mt-pred-team { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; }
.mt-pred-team b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-pred-team em { font-style: normal; font-family: var(--font-display); font-size: 26px; color: var(--primary); }
.mt-pred-team--b { justify-content: flex-end; text-align: right; }
.mt-pred-team--b em { color: var(--blue, #4da3ff); }
.mt-pred-track { display: block; height: 12px; overflow: hidden; border-radius: 6px; background: var(--blue, #4da3ff); }
.mt-pred-track i { display: block; height: 100%; background: var(--primary); }
.mt-pred-scores { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.mt-pred-scores small { margin-right: 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.mt-pred-score { padding: 3px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; font-weight: 700; color: var(--text-dim); }
/* (a score is in the colour of the team that wins it: the same green / blue as the bar above) */
.mt-pred-score--a { color: var(--primary); }
.mt-pred-score--b { color: var(--blue, #4da3ff); }
.mt-pred-sets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 10px; margin-top: 14px; }
.mt-pred-set { display: flex; gap: 10px; padding: 10px; background: var(--surface-2); border-radius: var(--radius-sm); }
.mt-pred-set--played { opacity: 0.6; }
.mt-pred-map { width: 78px; height: 78px; flex: none; object-fit: cover; border-radius: 8px; }
.mt-pred-set-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.mt-pred-set-info small { font-size: 11px; color: var(--text-muted); }
.mt-pred-set-bar { display: grid; grid-template-columns: auto minmax(40px, 1fr) auto; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; }
.mt-pred-set-bar .mt-pred-track { height: 8px; }
.mt-pred-picklines { display: flex; justify-content: space-between; gap: 8px; }
.mt-pred-picks { display: inline-flex; gap: 3px; }
.mt-pred-picks .mt-brawler { width: 26px; height: 26px; }
.mt-pred-note, .mt-pred-foot { margin: 10px 0 0; font-size: 12px; color: var(--text-dim); }
.mt-pred-note:first-child { margin-top: 0; }
@media (max-width: 560px) { .mt-pred-bar { grid-template-columns: minmax(0, 1fr); } .mt-pred-team--b { justify-content: flex-start; text-align: left; } }

/* a match with no games yet: the two teams and their players side by side */
.mt-rosters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
.mt-roster { padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.mt-roster h4 { display: flex; align-items: center; margin: 0 0 12px; font-family: var(--font-display); font-weight: 400; font-size: 18px; }
.mt-roster h4 .mt-team-logo { width: 28px; height: 28px; margin-right: 10px; }
.mt-roster ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mt-roster li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface-2); border-radius: var(--radius-sm); font-weight: 700; }
/* (a player's photo is a portrait: the circle shows its top, where the head is - centred it cut the head off) */
.mt-roster-pic { width: 34px; height: 34px; flex: none; object-fit: cover; object-position: 50% 8%; border-radius: 50%; }
.mt-roster-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-roster-name small { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); }
@media (max-width: 560px) { .mt-rosters { grid-template-columns: minmax(0, 1fr); } }

/* a team of ours: its logo left of its name */
.mt-team-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mt-team-logo { width: 22px; height: 22px; flex: none; object-fit: contain; border-radius: 5px; }
.mt-side h4 .mt-team-logo { width: 26px; height: 26px; margin-right: 8px; vertical-align: middle; }
.mt-team-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.mt-team-name:hover { color: var(--primary); text-decoration: underline; }
.mt-team b { font-family: var(--font-display); font-weight: 400; font-size: 15px; }
.mt-team--win { color: var(--text); background: var(--primary-soft); }
.mt-team--win b { color: var(--primary); }
.mt-team--tbd { color: var(--text-muted); font-style: italic; }

.mt-match-foot {
    padding: 3px 10px;
    background: var(--surface-2);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* the "Compare" link of a card whose two teams are ours: at the right end of the footer */
.mt-match-foot--link { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mt-compare {
    flex: none;
    padding: 1px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
}
.mt-compare:hover { background: rgba(174, 232, 117, 0.18); }

/* ---------- match dialog ---------- */

.mt-dialog {
    width: min(1100px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px); /* (the visible height on a phone) */
    padding: 0;
    background: var(--bg-2);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.mt-dialog::backdrop { background: rgba(4, 6, 10, 0.78); }
.mt-dialog-inner { padding: 20px 22px 26px; }

/* the names and score on their own line, in the middle; the buttons (Live draft, Share, Compare teams, Add to calendar, Caster overlay, close)
   on a line under it, which wraps - there are too many for the title's line */
.mt-dialog-head { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 14px; }
.mt-dialog-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }

.mt-vs {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    font-family: var(--font-display);
    font-size: clamp(16px, 2.6vw, 24px);
}

.mt-vs .mt-vs-team { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-vs .mt-vs-team:first-child { text-align: right; }
.mt-vs-score { padding: 4px 14px; background: var(--surface-3); border-radius: 99px; color: var(--text-dim); }
.mt-vs-win { color: var(--primary); }

.mt-games { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 18px; }

.mt-game-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 7px 14px;
    background: var(--surface-2);
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: 600 12px var(--font-body);
    cursor: pointer;
}

.mt-game-pill small { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.mt-game-pill[aria-selected="true"] { background: var(--primary-soft); color: var(--primary); border-color: rgba(174, 232, 117, 0.35); }

.mt-game-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-dim);
}

.mt-game-meta img { width: 56px; border-radius: 6px; }
.mt-sim-link { padding: 5px 12px; border: 1px solid rgba(174, 232, 117, 0.4); border-radius: 99px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 800; text-decoration: none; }
.mt-sim-link:hover { background: rgba(174, 232, 117, 0.22); }
.mt-sim-link[hidden] { display: none; }

/* (minmax(0, 1fr): a plain 1fr will not go narrower than the longest name and the gear icons in it, which made the whole match dialog scroll sideways
   on a phone and at 560-640px - the names end in "..." instead) */
.mt-sides { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 18px; }

.mt-side {
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.mt-side--win { border-color: rgba(174, 232, 117, 0.4); }

.mt-side h4 { margin: 0 0 10px; font-family: var(--font-display); font-weight: 400; font-size: 16px; }

.mt-bans { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }

.mt-brawler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 30px;
    border-radius: 6px;
    background: var(--surface-3);
    border: 1px solid var(--border-strong);
    overflow: hidden;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-dim);
}

.mt-brawler img { width: 100%; height: 100%; object-fit: cover; }
.mt-brawler--ban { width: 30px; height: 22px; opacity: 0.7; }
.mt-brawler--ban img { filter: grayscale(1); }

.mt-pick { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.mt-pick + .mt-pick { border-top: 1px solid var(--border); }
.mt-pick .mt-brawler { width: 52px; height: 38px; }
/* the number of the pick in the draft (1-2-2-1: the first pick takes 1, 4 and 5; the other team 2, 3 and 6) */
.mt-pick-no {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 5px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    font-family: var(--font-display);
    font-size: 14px;
}
.mt-pick-no--approx { background: var(--surface-3); color: var(--text-dim); }
.mt-first-pick { margin-left: 8px; padding: 2px 8px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); font-family: var(--font-body); font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; vertical-align: middle; }
.mt-pick-who { display: flex; flex-direction: column; min-width: 0; }
.mt-pick-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.mt-pick-who small { color: var(--text-muted); font-size: 11px; }

.mt-stats-wrap { overflow-x: auto; }

.mt-stats { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.mt-stats th,
.mt-stats td { padding: 9px 8px; text-align: center; border-bottom: 1px solid var(--border); }
.mt-stats thead th { font-size: 11px; font-weight: 700; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-stats .mt-stat-label { width: 150px; background: var(--surface-2); font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.mt-stats td { font-variant-numeric: tabular-nums; }
.mt-stats td.mt-best span { padding: 2px 8px; border-radius: 99px; background: rgba(242, 201, 76, 0.14); color: var(--mt-gold); font-weight: 800; }
.mt-stats .mt-side-a { box-shadow: inset 0 -2px 0 var(--blue); }
.mt-stats .mt-side-b { box-shadow: inset 0 -2px 0 var(--mt-live); }
/* a phone: six players' columns and the label share 280-360px, so the numbers get less padding and a smaller size (73.9k and 63.5k ran together) */
@media (max-width: 400px) {
    .mt-stats { font-size: 12px; min-width: 340px; } /* (wide enough for every number; the table scrolls sideways inside its box - .mt-stats-wrap - on the narrowest phones) */
    .mt-stats th, .mt-stats td { padding: 8px 1px; }
    .mt-stats .mt-stat-label { font-size: 9px; letter-spacing: 0.04em; }
    .mt-stats td.mt-best span { padding: 1px 4px; }
}

.mt-loading { padding: 40px 0; text-align: center; color: var(--text-dim); }

@media (max-width: 760px) {
    .mt-page { padding: 40px var(--pad) 72px; }
    .mt-sides { grid-template-columns: minmax(0, 1fr); }
    .mt-detail-head img { width: 100%; }
    .mt-dialog-inner { padding: 14px 12px 20px; }
}

/* ---------- bracket toolbar, round pills, round grid, team path ---------- */

.mt-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px 18px;
    margin-bottom: 14px;
}

.mt-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }

.mt-seg button {
    padding: 0 16px;
    height: 42px;
    background: var(--surface-2);
    color: var(--text-dim);
    border: 0;
    font: 700 13px var(--font-body);
    cursor: pointer;
}

.mt-seg button + button { border-left: 1px solid var(--border-strong); }
.mt-seg button[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary); }

.mt-find { flex: 1 1 240px; max-width: 360px; }

.mt-check { display: inline-flex; align-items: center; gap: 8px; height: 42px; font-size: 13px; font-weight: 600; color: var(--text-dim); cursor: pointer; }
.mt-check input { width: 16px; height: 16px; accent-color: var(--primary); }

.mt-roundbar {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 6px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

.mt-round-pill {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 8px 16px;
    background: var(--surface-2);
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: 600 13px var(--font-body);
    cursor: pointer;
}

.mt-round-pill b { font-weight: 800; }
.mt-round-pill small { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.mt-round-pill[aria-selected="true"] { background: var(--primary-soft); color: var(--primary); border-color: rgba(174, 232, 117, 0.4); }
.mt-round-pill--mine { box-shadow: inset 0 -3px 0 var(--blue); }

.mt-roundgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
    gap: 12px;
}

.mt-roundgrid .mt-match { height: fit-content; }

.mt-match--follow { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), 0 0 22px rgba(77, 163, 255, 0.18); }
.mt-team--follow .mt-team-name { color: var(--blue); font-weight: 800; }

.mt-path {
    margin-bottom: 16px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid rgba(77, 163, 255, 0.4);
    border-radius: var(--radius-md);
}

.mt-path-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.mt-path-head h3 { margin: 0 0 2px; font-family: var(--font-display); font-weight: 400; font-size: 20px; color: var(--blue); }
.mt-path-head small { color: var(--text-dim); font-size: 12px; }

.mt-path-row {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) auto 28px;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    background: none;
    border: 0;
    border-top: 1px solid var(--border);
    color: var(--text);
    font: 600 14px var(--font-body);
    text-align: left;
    cursor: pointer;
}

.mt-path-row:hover { background: var(--surface-2); }
.mt-path-round { color: var(--text-muted); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.mt-path-opp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-path-score { font-family: var(--font-display); font-size: 16px; color: var(--text-dim); }
.mt-path-res { text-align: center; font-weight: 800; border-radius: 6px; }
.mt-path-res--W { background: var(--primary-soft); color: var(--primary); }
.mt-path-res--L { background: rgba(255, 107, 107, 0.12); color: var(--mt-live); }
.mt-path-row--bye { cursor: default; color: var(--text-muted); font-weight: 500; }
.mt-path-row--bye:hover { background: none; }
.mt-path-res--bye { color: var(--text-muted); }

/* ---------- match dialog: sets ---------- */

.mt-sets { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.mt-set-pill { min-width: 150px; max-width: 240px; }
.mt-set-pill small,
.mt-set-pill em { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-set-winner { margin-top: 2px; font-size: 11px; font-style: normal; font-weight: 800; color: var(--primary); }
.mt-set-winner--draw { color: var(--text-muted); }

.mt-mode-row td {
    padding: 10px 8px 6px;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
    border-bottom: 1px solid var(--border-strong);
}

@media (max-width: 760px) {
    .mt-stats .mt-stat-label { width: 84px; padding-left: 2px; padding-right: 2px; }
    .mt-stats th, .mt-stats td { padding-left: 2px; padding-right: 2px; }
    /* a phone: six players and a label fit one table - the numbers were running into each other ("56.4K51.5K") */
    .mt-stats { font-size: 12px; }
    .mt-stats thead th { font-size: 10px; }
    /* (the label is a cell like the numbers, which are kept on one line below: it is let wrap, or "Damage to summons" was cut to "DAMAGE TO") */
    .mt-stats .mt-stat-label { width: 64px; font-size: 8.5px; letter-spacing: 0.03em; overflow-wrap: anywhere; white-space: normal; line-height: 1.15; }
    .mt-stats td { white-space: nowrap; overflow: hidden; }
    .mt-stats td.mt-best span { padding: 1px 3px; }
    .mt-toolbar { align-items: stretch; }
    .mt-find { flex: 1 1 100%; max-width: none; }
    .mt-path-row { grid-template-columns: minmax(0, 1fr) auto 28px; }
    .mt-path-round { grid-column: 1 / -1; }
}

/* ---------- the bracket: cards placed like a real bracket, joined by lines ---------- */

.mt-bracket-scroll { position: relative; cursor: grab; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-2); padding-bottom: 0; }
.mt-bracket-scroll.mt-grabbing { cursor: grabbing; user-select: none; }

.mt-tree-head {
    position: sticky;
    top: 0;
    z-index: 3;
    height: 34px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
}

.mt-tree-round {
    position: absolute;
    top: 0;
    padding: 9px 0;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* a small double elimination / group drawn whole: a title row above each bracket (inside the picture, not pinned) and a "Qualified" column */
.mt-tree-round--inline {
    height: 28px;
    padding: 0 8px;
    line-height: 28px;
    background: var(--surface-2, #171c26);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-sizing: border-box;
}
.mt-qual {
    position: absolute;
    display: flex;
    align-items: center;
    padding: 0 12px;
    box-sizing: border-box;
    background: transparent;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
}
.mt-qual--set { background: rgba(174, 232, 117, 0.1); border: 1px solid var(--primary, #aee875); color: var(--text); }

.mt-tree-box { position: relative; margin: 14px 0 20px; }

.mt-tree { position: absolute; left: 0; top: 0; transform-origin: 0 0; }

.mt-tree .mt-match { position: absolute; width: 230px; height: 88px; display: flex; flex-direction: column; }
.mt-tree .mt-match .mt-team { flex: 1; padding: 0 10px; }
.mt-tree .mt-match-foot { padding: 4px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* (in the fixed-size card the footer is one line: what is too long ends in "…" - its tooltip has the whole - instead of being cut off by the frame) */
.mt-match-foot > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mt-tree .mt-match-foot > span:first-child { white-space: nowrap; }

.mt-lines { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.mt-line { fill: none; stroke: var(--border-strong); stroke-width: 2; }
.mt-line--hot { stroke: var(--blue); stroke-width: 3; }

.mt-zoom button { min-width: 42px; padding: 0 12px; font-size: 16px; }
.mt-zoom #zoomFit { font-size: 13px; }
.mt-zoom[hidden] { display: none; }

.mt-tree-hint { margin-top: 8px; font-size: 12px; text-align: center; }

/* gadget / star power: small pictures, the name on hover */
.mt-gear { display: flex; gap: 6px; margin-left: auto; }

.mt-gear-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--surface-3);
    border: 1px solid var(--border-strong);
    overflow: hidden;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-dim);
    cursor: help;
}

.mt-gear-icon img { width: 100%; height: 100%; object-fit: cover; }
.mt-gear-icon:hover,
.mt-gear-icon:focus-visible { border-color: var(--primary); outline: none; }

/* ---------- day navigation, Featured / Starter sections, sign-up info ---------- */

.mt-daynav { max-width: 1100px; margin: 0 auto 26px; }

.mt-daynav-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; }
.mt-daynav-top input[type="date"] {
    height: 34px;
    padding: 0 10px;
    background: var(--surface-3);
    color: var(--text);
    color-scheme: dark;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font: 400 13px var(--font-body);
}

.mt-daylabel { margin-left: 8px; font-family: var(--font-display); font-weight: 400; font-size: 20px; }

.mt-daystrip-wrap { display: flex; align-items: stretch; gap: 8px; }

.mt-strip-btn {
    flex: 0 0 34px;
    background: var(--surface-2);
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 22px;
    cursor: pointer;
}

.mt-strip-btn:hover { color: var(--text); border-color: var(--border-strong); }

.mt-daystrip { flex: 1; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; }

.mt-daychip {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 8px 2px 6px;
    background: var(--surface);
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: 600 12px var(--font-body);
    cursor: pointer;
}

.mt-daychip small { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.mt-daychip b { font-family: var(--font-display); font-weight: 400; font-size: 20px; color: var(--text); }
.mt-daychip em { min-height: 14px; font-style: normal; font-size: 10px; font-weight: 800; color: var(--primary); }
/* the months alternate in tint, and a month is named where it starts (the first day shown and every 1st) */
.mt-daychip--alt { background: var(--surface-2); }
.mt-daymonth {
    display: block;
    min-height: 13px;
    margin-bottom: 1px;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    line-height: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--primary);
}
.mt-daychip:hover { border-color: var(--border-strong); }
.mt-daychip--today { border-color: rgba(77, 163, 255, 0.5); }
.mt-daychip--on { background: var(--primary-soft); border-color: rgba(174, 232, 117, 0.5); }
.mt-daychip--on b { color: var(--primary); }

.mt-section { margin-bottom: 34px; }

.mt-section-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 26px;
}

.mt-section-title small { font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--text-muted); }
.mt-section-sub { margin: 2px 0 14px; font-size: 13px; color: var(--text-dim); }

.mt-time {
    position: absolute;
    right: 8px;
    top: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(8, 10, 15, 0.82);
    line-height: 1.25;
    color: var(--text);
}

.mt-time small { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-dim); }
.mt-time b { font-size: 13px; font-weight: 800; }

.mt-signups { display: flex; flex-direction: column; gap: 6px; }
.mt-signups-row { display: flex; align-items: baseline; gap: 4px; font-size: 13px; color: var(--text-dim); }
.mt-signups-row b { font-family: var(--font-display); font-weight: 400; font-size: 20px; color: var(--text); }
.mt-full { margin-left: auto; padding: 2px 8px; border-radius: 6px; background: rgba(255, 107, 107, 0.14); color: var(--mt-live); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.mt-bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.mt-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary-2), var(--primary)); }

.mt-known { display: flex; flex-wrap: wrap; gap: 6px; }

.mt-known-team,
.mt-known-player {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px 3px 5px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
}

.mt-known-team { background: rgba(77, 163, 255, 0.14); color: var(--blue); }
.mt-known-team img { width: 16px; height: 16px; object-fit: contain; }
.mt-known-player { padding-left: 9px; background: var(--primary-soft); color: var(--primary); }
.mt-known-team, .mt-known-player { cursor: default; }
.mt-elo { font-style: normal; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 99px; background: rgba(0, 0, 0, 0.28); color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* "+5 players" opens the rest in place */
.mt-chip--more { border: 0; border-radius: 99px; padding: 3px 10px; font-family: inherit; cursor: pointer; }
.mt-chip--more:hover { background: var(--surface-2); color: var(--text); }
@media (pointer: coarse) { .mt-chip--more { min-height: 32px; } }

/* hover card on a player / "+N" chip */
.mt-tip {
    position: fixed;
    z-index: 400;
    display: none;
    flex-direction: column;
    gap: 2px;
    max-width: 260px;
    padding: 8px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--surface-2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    color: var(--text-dim);
    font-size: 12px;
    line-height: 1.35;
    pointer-events: none;
}
.mt-tip--on { display: flex; }
.mt-tip b { color: var(--text); font-size: 13px; }
.mt-tip-dim { color: var(--text-muted); font-size: 11px; }

.mt-actions { display: flex; gap: 8px; margin-top: auto; }
.mt-actions .btn { flex: 1; text-align: center; justify-content: center; }

@media (max-width: 760px) {
    .mt-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .mt-search { grid-column: 1 / -1; }
    .mt-daystrip { grid-template-columns: repeat(7, minmax(0, 1fr)); }
    .mt-daystrip .mt-daychip:nth-child(n+8) { display: none; }
}

/* (seven chips cannot share a phone's width - 23px each at 320px, so "TODAY" and the day numbers ran over the borders: on a phone the days are a
   row of chips that swipes sideways, each wide enough for its words, with the chosen day scrolled to the middle by matcherinos.js) */
@media (max-width: 480px) {
    .mt-daystrip { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46px; gap: 5px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; }
    .mt-daystrip::-webkit-scrollbar { display: none; }
    .mt-daystrip .mt-daychip:nth-child(n+8) { display: flex; }
    .mt-daychip { scroll-snap-align: center; }
    .mt-daychip small, .mt-daymonth { font-size: 10px; letter-spacing: 0.02em; }
}

/* ---------- an upcoming tournament's page ---------- */

.mt-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); align-items: start; gap: 12px; margin-bottom: 14px; }

.mt-fact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.mt-fact > small { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.mt-fact b { font-family: var(--font-display); font-weight: 400; font-size: 20px; }
.mt-fact-sub { display: block; margin-top: 2px; font-size: 12px; color: var(--text-dim); }
.mt-fact .mt-link { margin-right: 10px; }

.mt-link { color: var(--blue); font-size: 13px; font-weight: 700; }

.mt-up-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }

.mt-panel {
    margin-bottom: 14px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.mt-up-grid .mt-panel { margin-bottom: 0; }

.mt-panel-title { margin: 0 0 10px; font-family: var(--font-display); font-weight: 400; font-size: 18px; }

.mt-teamchips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 220px; overflow-y: auto; }
.mt-teamchip { padding: 3px 10px; border-radius: 99px; background: var(--surface-3); color: var(--text-dim); font-size: 12px; font-weight: 600; }
.mt-teamchip--known { background: rgba(77, 163, 255, 0.16); color: var(--blue); font-weight: 800; }

.mt-rules summary { cursor: pointer; font-family: var(--font-display); font-size: 18px; }
.mt-rules[open] summary { margin-bottom: 12px; }

/* the organiser's own text (cleaned on the server) */
.mt-rich { font-size: 14px; line-height: 1.6; color: var(--text-dim); overflow-wrap: anywhere; }
.mt-rich h1, .mt-rich h2, .mt-rich h3, .mt-rich h4, .mt-rich h5 { margin: 16px 0 6px; font-family: var(--font-display); font-weight: 400; color: var(--text); line-height: 1.25; }
.mt-rich h1 { font-size: 22px; }
.mt-rich h2 { font-size: 19px; }
.mt-rich h3, .mt-rich h4, .mt-rich h5 { font-size: 16px; }
.mt-rich p { margin: 0 0 8px; }
.mt-rich ul, .mt-rich ol { margin: 0 0 10px; padding-left: 22px; }
.mt-rich a { color: var(--blue); text-decoration: underline; }
.mt-rich img { max-width: 100%; height: auto; border-radius: 6px; }
.mt-rich table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.mt-rich th, .mt-rich td { padding: 6px 8px; border: 1px solid var(--border); text-align: left; }
.mt-rich blockquote { margin: 8px 0; padding: 4px 12px; border-left: 3px solid var(--border-strong); }

.mt-up-note { text-align: center; font-size: 12px; }

@media (max-width: 760px) {
    .mt-up-grid { grid-template-columns: minmax(0, 1fr); }
}

.mt-detailtabs { margin-bottom: 14px; }
.mt-detailtabs[hidden] { display: none; }

.mt-standings { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 8px; }
.mt-standing { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 14px; }
.mt-standing b { min-width: 64px; font-family: var(--font-display); font-weight: 400; color: var(--primary); }
.mt-standing span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- the "Follow a team" dropdown ---------- */

.mt-combo { position: relative; }
.mt-combo > label { font-size: 13px; font-weight: 600; color: var(--text-dim); }
.mt-combo-field { position: relative; }
.mt-combo-field input { padding-right: 40px; }

.mt-combo-arrow {
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    width: 38px;
    background: none;
    border: 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-dim);
    font-size: 15px;
    cursor: pointer;
}

.mt-combo-arrow:hover { color: var(--primary); }

.mt-combo-list {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    max-height: 300px;
    overflow-y: auto;
    padding: 6px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    color-scheme: dark;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

.mt-combo-list[hidden] { display: none; }

.mt-combo-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
    padding: 9px 11px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.mt-combo-item b { font-size: 14px; font-weight: 700; color: var(--text); }
.mt-combo-item small { font-size: 12px; color: var(--primary); }
.mt-combo-item em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; color: var(--text-muted); }
.mt-combo-item:hover,
.mt-combo-item--on { background: var(--primary-soft); }
.mt-combo-empty { padding: 12px; font-size: 13px; color: var(--text-muted); }

/* the prize split: one row per place */
.mt-prize-rows { display: flex; flex-direction: column; margin-top: 8px; border-top: 1px solid var(--border); }

.mt-prize-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto 44px;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.mt-prize-row:last-child { border-bottom: 0; }
.mt-prize-place { display: flex; flex-direction: column; min-width: 0; }
.mt-fact .mt-prize-place b { font-family: var(--font-body); font-size: 14px; font-weight: 800; color: var(--text); }
.mt-fact--prize { grid-column: span 2; }
@media (max-width: 640px) { .mt-fact--prize { grid-column: auto; } }
.mt-prize-place small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--text-muted); }
.mt-prize-amount { font-weight: 700; color: var(--primary); text-align: right; white-space: nowrap; }
.mt-prize-pct { text-align: right; font-size: 12px; color: var(--text-dim); }
.mt-prize-row--reward .mt-prize-place b { color: var(--text-dim); }

.mt-prize-pins { display: flex; justify-content: flex-end; gap: 4px; }
.mt-pin { height: 22px; width: auto; max-width: 40px; object-fit: contain; }
.mt-pin--big { height: 40px; max-width: 72px; }

/* ===== social icons (tournament links, player cards) ===== */
.mt-linkicons { display: flex; flex-wrap: wrap; gap: 8px; }
.social { display: inline-flex; color: var(--text-dim); transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.social svg { width: 15px; height: 15px; }
.social:hover { color: var(--primary); }
.social--big {
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
}
.social--big svg { width: 20px; height: 20px; }
.social--big:hover { border-color: var(--primary); }
.mt-fact .social--big { margin: 0; }

/* ===== people bits shared with the Teams page look ===== */
.flag { flex-shrink: 0; height: 12px; width: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); }
.flag-code { flex-shrink: 0; padding: 0 5px; border: 1px solid var(--border-strong); border-radius: 4px; font-size: 10px; font-weight: 700; color: var(--text-dim); }
.role-badge { padding: 1px 7px; border-radius: 5px; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--role, var(--primary)); background: color-mix(in srgb, var(--role, var(--primary)) 14%, transparent); }
.role-player { --role: var(--primary); }
.role-coach { --role: #4DA3FF; }
.role-analyst { --role: #a99cff; }
.role-manager { --role: #f5b94a; }

/* ===== a player: the hover card in a match, and the profile page ===== */
.mt-player { cursor: pointer; text-decoration: underline dotted rgba(255, 255, 255, 0.35); text-underline-offset: 3px; }
.mt-player:hover,
.mt-player:focus-visible { color: var(--primary); outline: none; text-decoration-color: var(--primary); }

.mt-pcard {
    position: fixed;
    z-index: 50;
    width: 340px;
    max-height: min(560px, calc(100vh - 16px));
    overflow-y: auto;
    padding: 14px;
    background: var(--bg-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    text-align: left;
}
.mt-pcard[hidden] { display: none; }
.mt-pcard .mt-loading { padding: 18px 0; }

.mt-pwho { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.mt-pphoto { flex-shrink: 0; width: 64px; height: 80px; object-fit: cover; object-position: top center; background: var(--surface-3); border-radius: var(--radius-sm); }
.mt-pphoto.is-placeholder { object-fit: contain; padding: 14%; }
.mt-pwho-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mt-pwho-text small { font-size: 12px; color: var(--text-dim); overflow-wrap: anywhere; }
.mt-pwho-line { display: flex; align-items: center; gap: 8px; }
.mt-pname { font-family: var(--font-display); font-weight: 400; font-size: 20px; letter-spacing: 0.02em; overflow-wrap: anywhere; }
.mt-pmeta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.mt-pteam { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--text-dim); }
.mt-pteam img { width: 16px; height: 16px; object-fit: contain; }
.mt-page-age { font-size: 11px; font-weight: 600; color: var(--text-dim); }
.mt-psocials { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 2px; }
.mt-psocials .social svg { width: 17px; height: 17px; }

.mt-pstats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.mt-pstat { padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); min-width: 0; }
.mt-pstat small { display: block; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.mt-pstat b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 1.25; }
.mt-pstat span { display: block; font-size: 11px; color: var(--text-dim); }
.mt-pnone { margin: 0 0 10px; font-size: 12px; color: var(--text-muted); }

.mt-rank { font-family: var(--font-body); font-size: 15px; font-weight: 800; color: #cfd6e4; }
.mt-rank--bronze { color: #cd8a53; }
.mt-rank--silver { color: #c5ccd8; }
.mt-rank--gold { color: #f2c94c; }
.mt-rank--diamond { color: #5bc8ff; }
.mt-rank--mythic { color: #ff6b8e; }
.mt-rank--legendary { color: #ff5a4d; }
.mt-rank--masters { color: #b88cff; }
.mt-rank--pro { color: #ffd54a; }

.mt-ppins { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 8px; }
.mt-ppin { position: relative; display: inline-flex; align-items: center; }
.mt-ppin img { height: 30px; width: auto; max-width: 52px; object-fit: contain; }
.mt-ppin em { font-size: 11px; color: var(--text-dim); }
.mt-ppin i { position: absolute; right: -4px; bottom: -4px; padding: 0 5px; background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: 99px; font-size: 10px; font-style: normal; font-weight: 800; }

.mt-plist { display: grid; gap: 4px; margin-bottom: 10px; }
.mt-plist h5 { margin: 4px 0 2px; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.mt-pres { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.mt-pres:hover { border-color: var(--primary); }
.mt-pres-name { display: flex; flex-direction: column; min-width: 0; }
.mt-pres-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.mt-pres-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--text-muted); }
.mt-pres-prize { font-size: 12px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.mt-pres-pin { height: 22px; width: auto; max-width: 40px; object-fit: contain; }
.mt-pplace { min-width: 46px; padding: 3px 7px; text-align: center; border-radius: 6px; background: var(--surface-3); font-size: 12px; font-weight: 800; color: var(--text-dim); }
.mt-pplace--1 { background: rgba(242, 201, 76, 0.18); color: var(--mt-gold); }
.mt-pplace--2 { background: rgba(197, 204, 216, 0.16); color: #c5ccd8; }
.mt-pplace--3 { background: rgba(205, 138, 83, 0.18); color: #cd8a53; }
.mt-pmore { display: inline-block; margin-top: 2px; font-size: 13px; font-weight: 700; }

/* the profile page */
.mt-profile { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 14px; }
.mt-profile-card { display: grid; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md); }
.mt-profile-card .share-btn, .mt-profile-card .mt-pmatcherino { justify-self: start; }
.mt-pwho--big { flex-direction: column; }
.mt-pwho--big .mt-pphoto { width: 100%; height: auto; aspect-ratio: 4 / 5; }
.mt-pwho--big .mt-pname { font-size: 26px; }
.mt-profile-main { min-width: 0; }
.mt-profile-main .mt-pstats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mt-profile-main .mt-pstats:first-child { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mt-plist--full { gap: 6px; }
.mt-plist--full .mt-pres { padding: 8px 10px; }
.mt-pnote { margin-top: 14px; font-size: 12px; }

@media (max-width: 860px) {
    .mt-profile { grid-template-columns: minmax(0, 1fr); }
    .mt-pwho--big { flex-direction: row; }
    .mt-pwho--big .mt-pphoto { width: 96px; aspect-ratio: auto; height: 120px; }
    .mt-profile-main .mt-pstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* a phone: the card is a sheet at the bottom of the screen */
@media (max-width: 640px) {
    .mt-pcard { left: 8px; right: 8px; bottom: 8px; top: auto; width: auto; max-height: 70vh; }
}

/* the dialog's header is tight on a phone: the Share button there is just its icon */
@media (max-width: 640px) { .mt-dialog-head .share-label { display: none; } .mt-dialog-head .share-btn { padding-left: 10px; padding-right: 10px; } }
.mt-pres-end { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }

/* while searching by name the list covers a stretch of days, so the day controls step aside */
#listView.mt-searching .mt-daystrip-wrap, #listView.mt-searching .mt-daynav-top .btn, #listView.mt-searching #dayPick { display: none; }
.mt-pfollow { margin-top: 6px; }

/* ---------- players and teams the signed-in visitor follows: amber, first, easy to find ---------- */
:root { --fav: #ffb84d; }
.mt-known--followed { margin-bottom: 2px; }
.mt-followed {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px 3px 8px;
    background: rgba(255, 184, 77, 0.16);
    color: var(--fav);
    border: 1px solid rgba(255, 184, 77, 0.45);
    border-radius: 99px;
    font-size: 12px;
    font-weight: 800;
}
.mt-followed svg { width: 12px; height: 12px; flex-shrink: 0; }
.mt-card--followed { box-shadow: 0 0 0 1px rgba(255, 184, 77, 0.4), 0 0 24px rgba(255, 184, 77, 0.1); }
.mt-teamchip--followed { background: rgba(255, 184, 77, 0.16); color: var(--fav); font-weight: 800; }
.mt-team--faved { background: rgba(255, 184, 77, 0.1); box-shadow: inset 3px 0 0 var(--fav); }
.mt-team--faved .mt-team-name { color: var(--fav); font-weight: 800; }
.mt-team--faved.mt-team--follow .mt-team-name { color: var(--blue); }
.mt-combo-item--faved b { color: var(--fav); }

/* ---------- "Times in: My time | UTC" ---------- */
.mt-zone-switch { display: inline-flex; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.mt-zone-btn { padding: 7px 12px; background: var(--surface-2); color: var(--text-dim); border: 0; font: 700 12px var(--font-body); cursor: pointer; }
.mt-zone-btn + .mt-zone-btn { border-left: 1px solid var(--border-strong); }
.mt-zone-btn:hover { color: var(--text); }
.mt-zone-btn.is-on { background: var(--primary); color: #0b0e14; }
.mt-filters .mt-zone { grid-column: 1 / -1; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 10px; }
.mt-filters .mt-zone > span { margin: 0; }

/* ---------- live draft (casting view) ---------- */
html.is-embed #liveView .mt-live-bar { display: none; }
.mt-live-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.mt-live-tools { display: flex; gap: 8px; }
#liveView:fullscreen { display: flex; flex-direction: column; overflow: auto; padding: 20px 28px; background: var(--bg); }
#liveView:fullscreen .mt-live-bar { margin-bottom: 8px; }
/* full screen: the draft sits in the middle of the screen, across and down (margin: auto instead of align-items, so a draft taller than the
   screen still scrolls from its top) */
#liveView:fullscreen #liveBody { flex: 1; display: flex; }
#liveView:fullscreen #liveBody > .mt-live { margin: auto; width: 100%; }

.mt-livepill {
    margin-top: 6px;
    padding: 4px 10px;
    background: rgba(255, 92, 104, 0.14);
    color: #ff7a7a;
    border: 1px solid rgba(255, 92, 104, 0.45);
    border-radius: 99px;
    font: 800 11px var(--font-body);
    letter-spacing: 0.04em;
    cursor: pointer;
}
.mt-livepill:hover { background: rgba(255, 92, 104, 0.24); }
/* in the bracket the cards are a fixed height: the button sits inside the footer row, on its right, instead
   of below the card where it was cut off */
.mt-tree .mt-match .mt-livepill { position: absolute; right: 6px; bottom: 2px; margin: 0; padding: 1px 9px; font-size: 10px; line-height: 1.5; }

.mt-live { --live-a: #4da3ff; --live-b: #ff5c68; display: grid; gap: 18px; max-width: 1180px; margin: 0 auto; }

.mt-live-head { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 18px; }
.mt-live-team { padding: 14px 20px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border-strong); }
.mt-live-team b { display: block; font-family: var(--font-display); font-weight: 400; font-size: clamp(22px, 3.4vw, 40px); line-height: 1.1; letter-spacing: 0.02em; overflow-wrap: break-word; }
/* the logo and the name on ONE line (the name may shrink and wrap, the logo keeps its size) */
.mt-live-teamline { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mt-live-team--a .mt-live-teamline { justify-content: flex-end; }
.mt-live-logo { flex: none; width: clamp(34px, 4.4vw, 56px); height: clamp(34px, 4.4vw, 56px); object-fit: contain; }
.mt-live-teamline b { min-width: 0; }
.mt-live-team--a { text-align: right; border-right: 5px solid var(--live-a); background: linear-gradient(270deg, rgba(77, 163, 255, 0.16), var(--surface) 70%); }
.mt-live-team--b { text-align: left; border-left: 5px solid var(--live-b); background: linear-gradient(90deg, rgba(255, 92, 104, 0.16), var(--surface) 70%); }
.mt-live-team.is-winner { box-shadow: 0 0 0 2px var(--primary); }
.mt-live-score { display: grid; justify-items: center; gap: 2px; min-width: 120px; }
.mt-live-score-num { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: clamp(36px, 6vw, 64px); line-height: 1; }
.mt-live-score-num i { font-style: normal; color: var(--text-muted); }
.mt-live-score small { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }

.mt-live-phase { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 12px; padding: 10px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 99px; justify-self: center; }
.mt-live-phase b { font-size: 14px; letter-spacing: 0.02em; }
.mt-live-phase small { font-size: 12px; color: var(--text-muted); }
.mt-live-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff5c68; box-shadow: 0 0 0 0 rgba(255, 92, 104, 0.6); animation: mt-live-pulse 1.6s infinite; }
.mt-live-dot.is-done { background: var(--text-muted); animation: none; }
@keyframes mt-live-pulse { 70% { box-shadow: 0 0 0 9px rgba(255, 92, 104, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 92, 104, 0); } }

.mt-live-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 250px) minmax(0, 1fr); gap: 18px; align-items: start; }
.mt-live-col { display: grid; gap: 12px; }
.mt-live-picks { display: grid; gap: 10px; }
/* Each pick: the brawler's picture on the side facing the map (the same distance from it every time), the
   gadget / star power beside it, and the name and player on the outer edge - mirrored for the two teams:
       team A:  [ name + player ........ gears ][ picture ] | map | [ picture ][ gears ........ name + player ]  :team B */
.mt-live-pick { --pw: 72px; display: grid; grid-template-columns: minmax(0, 1fr) auto var(--pw); align-items: center; gap: 14px; padding: 10px 10px 10px 14px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md); animation: mt-live-pop 0.45s var(--ease) both; }
.mt-live-pick > :first-child { grid-column: 3; grid-row: 1; }
.mt-live-pick .mt-live-pick-text { grid-column: 1; grid-row: 1; text-align: left; }
.mt-live-pick .mt-live-gears { grid-column: 2; grid-row: 1; }
.mt-live-pick--a { border-left: 4px solid var(--live-a); }
.mt-live-pick--b { border-left: 4px solid var(--live-b); }
.mt-live-col--b .mt-live-pick { grid-template-columns: var(--pw) auto minmax(0, 1fr); padding: 10px 14px 10px 10px; border-left: 1px solid var(--border-strong); border-right: 4px solid var(--live-b); }
.mt-live-col--b .mt-live-pick > :first-child { grid-column: 1; }
.mt-live-col--b .mt-live-pick .mt-live-pick-text { grid-column: 3; text-align: right; }
.mt-live-col--b .mt-live-pick .mt-live-gears { grid-column: 2; }
.is-same .mt-live-pick, .is-same .mt-live-ban, .mt-live-map.is-same { animation: none; }
@keyframes mt-live-pop { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }

.mt-live-portrait { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--surface-3); }
.mt-live-portrait--empty { display: block; border: 2px dashed var(--border-strong); background: transparent; }
.mt-live-noimg { display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--text-dim); }
/* (the text column measures itself, so a name is sized to the room it has - see .mt-live-player - and a long one wraps between words, never inside one) */
.mt-live-pick-text { display: grid; gap: 3px; min-width: 0; container-type: inline-size; }
/* a pick: the PLAYER'S name big and white, the brawler they picked small under it */
.mt-live-pick-text b { font-family: var(--font-display); font-weight: 400; font-size: 22px; letter-spacing: 0.02em; }
.mt-live-player { font-family: var(--font-display); font-size: min(26px, 12.5cqw); font-weight: 400; line-height: 1.12; letter-spacing: 0.02em; color: var(--text); overflow-wrap: break-word; }
.mt-live-player i { margin-right: 6px; font-size: 0.8em; font-style: normal; color: #ffd166; }
.mt-live-brawler { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.mt-live-gears { display: flex; gap: 6px; }
.mt-live-gear { width: 34px; height: 34px; border-radius: 50%; object-fit: contain; background: var(--surface-3); }
.mt-live-gear--none { display: block; border: 1px dashed var(--border-strong); background: transparent; }
.mt-live-gear--text { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--text-dim); }
.mt-live-pick--empty .mt-live-portrait--empty { opacity: 0.6; }
.mt-live-pick--empty.is-waiting .mt-live-portrait--empty { animation: mt-live-blink 1.2s ease-in-out infinite; }
.mt-live-pick--empty .mt-live-who { font-family: var(--font-display); font-size: min(26px, 12.5cqw); font-weight: 400; line-height: 1.12; letter-spacing: 0.02em; color: var(--text); overflow-wrap: break-word; }
/* the countdown of the pick in progress, inside the square the brawler will appear in */
.mt-live-portrait--timer { display: flex; align-items: center; justify-content: center; border-style: solid; border-color: var(--primary); background: var(--primary-soft); opacity: 1 !important; animation: none !important; }
.mt-live-timer { font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.mt-live-portrait--timer.is-low { border-color: #e0a63f; background: rgba(224, 166, 63, 0.14); }
.mt-live-portrait--timer.is-low .mt-live-timer { color: #ffc65c; }
.mt-live-portrait--timer.is-out { border-color: #ff5c68; background: rgba(255, 92, 104, 0.16); animation: mt-live-blink 0.8s ease-in-out infinite !important; }
.mt-live-portrait--timer.is-out .mt-live-timer { color: #ff7a7a; }
.mt-live-state { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--text-muted); }
.mt-live-pick--empty.is-waiting .mt-live-state { color: var(--primary); }
@keyframes mt-live-blink { 50% { border-color: var(--primary); } }

.mt-live-bans { display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.mt-live-col--a .mt-live-bans { justify-content: flex-end; }
.mt-live-col--b .mt-live-bans { flex-direction: row-reverse; justify-content: flex-end; }
.mt-live-bans small { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.mt-live-ban { position: relative; display: block; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; border: 2px solid #ff5c68; animation: mt-live-pop 0.45s var(--ease) both; }
.mt-live-ban-img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(0.7); }
.mt-live-ban::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, transparent 46%, rgba(255, 92, 104, 0.95) 47%, rgba(255, 92, 104, 0.95) 53%, transparent 54%); }
/* the match's two global bans: a smaller row under the set's bans, in a quieter colour */
/* a place of a hand-made bracket that waits for a match: the words in a quieter, slanted type */
/* a team that is a projection (the favourite of a match not played yet), in a bracket set up by hand: italics, a dotted underline */
.mt-team--projected .mt-team-name { font-style: italic; text-decoration: underline dotted var(--text-muted); text-underline-offset: 3px; }
.mt-planned-facts { display: grid; gap: 4px; }
.mt-planned-facts p { margin: 0; }
.mt-planned-facts small { color: var(--text-muted); }
.mt-team-name--waiting { font-style: italic; font-weight: 600; color: var(--text-muted); font-size: 0.92em; }
.mt-live-bans--global .mt-live-ban { width: 38px; height: 38px; border-color: #b8864a; }
.mt-live-bans--global small { color: #c9a06a; }
.mt-live-ban--empty { border: 2px dashed var(--border-strong); animation: none; }
.mt-live-ban--empty::after { display: none; }
.mt-live-ban--empty.is-waiting { animation: mt-live-blink 1.2s ease-in-out infinite; }

.mt-live-mid { display: grid; gap: 14px; }
.mt-live-map { display: grid; gap: 8px; justify-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md); text-align: center; animation: mt-live-pop 0.45s var(--ease) both; }
.mt-live-map b { font-family: var(--font-display); font-weight: 400; font-size: 20px; letter-spacing: 0.02em; }
.mt-live-map img { width: 100%; max-width: 190px; border-radius: 10px; }
.mt-live-map small { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.mt-live-map-blank { width: 100%; max-width: 190px; aspect-ratio: 3 / 4; border: 2px dashed var(--border-strong); border-radius: 10px; }
.mt-live-map--none { opacity: 0.6; }
/* the games played: small chips in one row under the draft (they wrap onto a second row only when there are many) */
.mt-live-games { display: flex; align-items: flex-start; gap: 6px 12px; margin-top: 12px; }
.mt-live-games-rows { display: grid; gap: 6px; min-width: 0; }
.mt-live-games-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.mt-live-games small { margin-right: 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.mt-live-game { display: inline-flex; align-items: baseline; gap: 8px; padding: 5px 11px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 12.5px; white-space: nowrap; }
.mt-live-game b { font-size: 12.5px; }
.mt-live-game em { max-width: 230px; overflow: hidden; text-overflow: ellipsis; font-style: normal; color: var(--text-dim); }
.mt-live-game--a { border-left-color: var(--live-a); }
.mt-live-game--b { border-left-color: var(--live-b); }
.mt-live-foot { text-align: center; font-size: 12px; color: var(--text-muted); }

/* form from Leafstats' saved sets: a team's record under its name, the head to head, a player's record with a pick */
.mt-live-form { display: block; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--text-dim); }
/* whose pick it is: a pill under the team's name, pulsing on the team that picks next */
.mt-live-turn { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 3px 12px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border-strong); font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.mt-live-turn.is-next { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); animation: mt-live-turn 1.4s ease-in-out infinite; }
.mt-live-turn.is-next i { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
@keyframes mt-live-turn { 50% { box-shadow: 0 0 0 5px rgba(143, 214, 148, 0.18); } }
.mt-live-form span { display: block; }
.mt-live-form span + span { font-weight: 600; opacity: 0.85; }
.mt-live-form.is-good { color: #8fd694; }
.mt-live-form.is-bad { color: #ff9a9a; }
.mt-live-h2h { display: grid; justify-items: center; gap: 2px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.mt-live-h2h small { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.mt-live-h2h b { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1.1; }
.mt-live-h2h b i { font-style: normal; color: var(--text-muted); }
.mt-live-rec { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.mt-live-rec.is-good { color: #8fd694; }
.mt-live-rec.is-bad { color: #ff9a9a; }

/* the "Still open" column: most played brawlers on the map that nobody has banned or picked */
/* (it sits to the right of everything - the score header too - from the very top) */
.mt-live-main { display: grid; gap: 18px; min-width: 0; }
.mt-live--meta { max-width: 1500px; grid-template-columns: minmax(0, 1fr) 250px; align-items: start; }
.mt-live-meta { display: grid; gap: 6px; padding: 12px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md); }
.mt-live-meta h4 { font-family: var(--font-display); font-weight: 400; font-size: 20px; letter-spacing: 0.02em; text-align: center; }
.mt-live-meta-sub { margin-bottom: 4px; font-size: 11px; font-weight: 700; color: var(--text-muted); text-align: center; }
.mt-live-meta-row { display: grid; grid-template-columns: 16px 30px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid var(--border); font-size: 13px; }
.mt-live-meta-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.mt-live-meta-rank { font-size: 11px; font-weight: 800; color: var(--text-muted); text-align: center; }
.mt-live-meta-img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; background: var(--surface-3); font-size: 10px; }
.mt-live-meta-wr { font-weight: 800; }
.mt-live-meta-wr.is-good { color: var(--primary); }
.mt-live-meta-wr.is-bad { color: #ff7a7a; }
.mt-live-meta-row small { min-width: 34px; text-align: right; font-size: 12px; font-weight: 700; color: var(--text-dim); }
.mt-live-meta-row .mt-live-meta-wr { min-width: 38px; text-align: right; }
.mt-live-meta-head { padding: 0 0 2px; border-top: 0; }
.mt-live-meta-head small { min-width: 34px; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.mt-live-meta-head small:last-child { min-width: 38px; }
.mt-live-meta-none { font-size: 12px; color: var(--text-muted); }
/* "Most banned": the first-pick and last-pick lists side by side, so the column is a little wider */
.mt-live--meta:has(.mt-live-meta--bans) { grid-template-columns: minmax(0, 1fr) 330px; }
.mt-live-ban-lists { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.mt-live-ban-list { display: grid; align-content: start; gap: 4px; min-width: 0; }
.mt-live-ban-title { padding: 4px 0 6px; border-bottom: 1px solid var(--border-strong); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-align: center; text-transform: uppercase; color: var(--text-dim); }
.mt-live-ban-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 3px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.mt-live-ban-row .mt-live-meta-img { width: 26px; height: 26px; }
.mt-live-ban-name { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.mt-live-ban-row small { font-size: 12px; font-weight: 800; color: var(--text-dim); }
@media (max-width: 1200px) { .mt-live--meta:has(.mt-live-meta--bans) { grid-template-columns: minmax(0, 1fr) 270px; } }
@media (max-width: 760px) { .mt-live--meta:has(.mt-live-meta--bans) { grid-template-columns: minmax(0, 1fr); } }
/* a narrower window keeps the column on the right (everything else gets a little tighter) */
@media (max-width: 1200px) {
    .mt-live--meta { grid-template-columns: minmax(0, 1fr) 200px; gap: 12px; }
    .mt-live--meta .mt-live-stage { grid-template-columns: minmax(0, 1fr) 140px minmax(0, 1fr); gap: 10px; }
    .mt-live--meta .mt-live-pick { --pw: 52px; gap: 8px; padding: 8px 8px 8px 10px; }
    .mt-live--meta .mt-live-col--b .mt-live-pick { padding: 8px 10px 8px 8px; }
    .mt-live--meta .mt-live-portrait { width: 52px; height: 52px; border-radius: 10px; }
    .mt-live--meta .mt-live-gear { width: 26px; height: 26px; }
    .mt-live--meta .mt-live-gears { gap: 4px; }
    .mt-live--meta .mt-live-pick-text b { font-size: 17px; }
    .mt-live--meta .mt-live-player, .mt-live--meta .mt-live-pick--empty .mt-live-who { font-size: min(19px, 12.5cqw); }
    .mt-live--meta .mt-live-brawler { font-size: 11px; }
    .mt-live--meta .mt-live-timer { font-size: 24px; }
    .mt-live--meta .mt-live-map b { font-size: 16px; }
    .mt-live--meta .mt-live-ban { width: 42px; height: 42px; }
    .mt-live--meta .mt-live-meta { padding: 10px; }
    .mt-live--meta .mt-live-meta-row { grid-template-columns: 14px 26px minmax(0, 1fr) auto auto; gap: 6px; font-size: 12px; }
    .mt-live--meta .mt-live-meta-row small { min-width: 30px; }
    .mt-live--meta .mt-live-meta-img { width: 26px; height: 26px; }
}
@media (max-width: 900px) {
    /* narrow: the three parts stack inside the left side and the column stays on the right */
    .mt-live--meta .mt-live-stage { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    /* a phone: no room beside it, so it goes last */
    .mt-live--meta { grid-template-columns: minmax(0, 1fr); }
    .mt-live--meta .mt-live-meta-row { grid-template-columns: 16px 30px minmax(0, 1fr) auto auto; }
}

@media (max-width: 900px) {
    .mt-live-stage { grid-template-columns: minmax(0, 1fr); }
    .mt-live-mid { order: -1; }
    /* stacked (a phone / narrow window): no map between the teams, so every pick reads the same way:
       picture, name + player, gears - for both teams */
    .mt-live-col--a .mt-live-pick, .mt-live-col--b .mt-live-pick { grid-template-columns: var(--pw) minmax(0, 1fr) auto; padding: 10px 14px 10px 10px; }
    .mt-live-col--b .mt-live-pick { border-right: 1px solid var(--border-strong); border-left: 4px solid var(--live-b); }
    .mt-live-col--a .mt-live-pick > :first-child, .mt-live-col--b .mt-live-pick > :first-child { grid-column: 1; }
    .mt-live-col--a .mt-live-pick .mt-live-pick-text, .mt-live-col--b .mt-live-pick .mt-live-pick-text { grid-column: 2; text-align: left; }
    .mt-live-col--a .mt-live-pick .mt-live-gears, .mt-live-col--b .mt-live-pick .mt-live-gears { grid-column: 3; }
    .mt-live-col--b .mt-live-bans { flex-direction: row; justify-content: flex-start; }
    .mt-live-col--a .mt-live-bans { justify-content: flex-start; }
    .mt-live-head { grid-template-columns: minmax(0, 1fr); }
    .mt-live-team--a, .mt-live-team--b { text-align: center; }
    .mt-live-team--a .mt-live-teamline, .mt-live-team--b .mt-live-teamline { justify-content: center; }
}

/* an Admin's box for the maps of an official match (loadMapsEditor) */
.mt-mapsadmin { margin: 10px 0; padding: 10px 14px; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: var(--radius-md); }
.mt-mapsadmin[hidden] { display: none; }
.mt-mapsadmin summary { cursor: pointer; font-weight: 700; font-size: 13px; }
.mt-mapsadmin p { margin: 8px 0; font-size: 12px; line-height: 1.45; color: var(--text-muted); }
.mt-maps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 8px; }
.mt-maps-grid label { display: grid; gap: 3px; font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.mt-maps-grid select { padding: 6px 8px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text); color-scheme: dark; font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.mt-maps-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.mt-maps-msg { font-size: 12px; color: var(--text-dim); }

.mt-maps-bans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 8px; margin-top: 10px; }
.mt-maps-ban { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.mt-maps-ban > span { grid-column: 1 / -1; font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.mt-maps-ban select { padding: 6px 8px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text); color-scheme: dark; font-size: 13px; }

/* the card of a team chip (teamChip): its players */
.mt-teamchip { cursor: default; }
.mt-teamchip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.mt-tcard h5 { margin: 0 0 10px; font-family: var(--font-display); font-weight: 400; font-size: 20px; }
.mt-tcard-list { display: grid; gap: 6px; }
.mt-tcard-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 12px; background: var(--surface-2); border-radius: var(--radius-sm); border-left: 3px solid var(--blue); }
.mt-tcard-row b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-tcard-row small { flex: none; font-size: 11px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.03em; }
.mt-tcard-note { display: block; margin-top: 10px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); }

/* the map between the two teams of a set (renderSet) */
.mt-sides--mid { grid-template-columns: minmax(0, 1fr) 176px minmax(0, 1fr); align-items: start; }
.mt-mapcard { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 14px 8px; text-align: center; font-size: 13px; color: var(--text-dim); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.mt-mapcard img { width: 112px; border-radius: 8px; }
.mt-mapcard b { font-family: var(--font-display); font-weight: 400; font-size: 20px; color: var(--text); line-height: 1.15; }
.mt-mapcard-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.mt-mapcard .mt-sim-link { margin-top: 4px; font-size: 11px; line-height: 1.3; }
@media (max-width: 900px) {
    .mt-sides--mid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .mt-sides--mid .mt-mapcard { grid-column: 1 / -1; order: -1; grid-auto-flow: column; justify-content: center; align-items: center; gap: 14px; padding: 10px 12px; }
    .mt-sides--mid .mt-mapcard img { width: 56px; }
}
@media (max-width: 548px) { .mt-sides--mid { grid-template-columns: minmax(0, 1fr); } }

/* the match MVP (matchMvp / mvpCard) */
.mt-mvp { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0 0 14px; padding: 10px 16px; background: linear-gradient(90deg, rgba(224, 197, 63, 0.14), var(--surface)); border: 1px solid rgba(224, 197, 63, 0.4); border-radius: var(--radius-md); }
.mt-mvp-label { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #e0c53f; }
.mt-mvp-who { display: grid; gap: 2px; min-width: 0; flex: 1 1 160px; }
.mt-mvp-who > b, .mt-mvp-who .mt-player { font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.1; }
.mt-mvp-who small { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); }
.mt-mvp-who small img { width: 16px; height: 16px; object-fit: contain; }
.mt-mvp-stats { display: flex; gap: 18px; margin-left: auto; }
.mt-mvp-stats span { display: grid; justify-items: center; line-height: 1.1; }
.mt-mvp-stats b { font-family: var(--font-display); font-weight: 400; font-size: 22px; font-variant-numeric: tabular-nums; }
.mt-mvp-stats small { font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.mt-mvp-rating b { color: #e0c53f; }
