/* Match page v2 */
:root { --team-blue: #7cb2ff; --team-red: #ff7a72; --team-blue-soft: rgba(124, 178, 255, .16); --team-red-soft: rgba(255, 122, 114, .16); }
:root[data-theme="light"] { --team-blue: #2f6fd1; --team-red: #d0433b; --team-blue-soft: rgba(47, 111, 209, .12); --team-red-soft: rgba(208, 67, 59, .12); }

.mx-hero {
  position: relative; width: 100vw; margin-left: calc(50% - 50vw); min-height: 380px; overflow: hidden; isolation: isolate;
  color: #ece8e1; background: #0a0a0b; display: flex; align-items: flex-end;
}
.mx-bg { position: absolute; inset: 0; z-index: -3; background: var(--art, none) center 40% / cover no-repeat; filter: grayscale(.35) brightness(.42); transform: scale(1.03); }
.mx-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(ellipse 70% 80% at 50% 40%, transparent 30%, rgba(10,10,11,.6)), linear-gradient(0deg, var(--bg) 0%, transparent 45%);
}
.mx-agent { position: absolute; z-index: -1; bottom: -10%; height: 112%; pointer-events: none; opacity: .9; filter: drop-shadow(0 20px 50px rgba(0,0,0,.6)); animation: agent-in .9s cubic-bezier(.2,.8,.2,1) both; }
.mx-agent.left { left: max(-60px, calc(50% - 760px)); }
.mx-agent.right { right: max(-60px, calc(50% - 760px)); transform: scaleX(-1); }
.mx-inner { position: relative; width: min(1160px, 100% - 32px); margin: 0 auto; padding: 96px 0 34px; text-align: center; }
.mx-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; font-size: 14px; color: rgba(236,232,225,.7); letter-spacing: .06em; }
.mx-meta b { font: 900 22px/1 var(--display); color: #ece8e1; letter-spacing: .12em; }
.mx-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(16px, 4vw, 48px); margin-top: 22px; }
.mx-side { display: flex; flex-direction: column; gap: 6px; }
.mx-side.a { align-items: flex-end; text-align: right; }
.mx-side.b { align-items: flex-start; text-align: left; }
.mx-team { font: 800 clamp(18px, 2.4vw, 26px)/1 var(--display); letter-spacing: .14em; }
.mx-side.a .mx-team { color: var(--team-blue); }
.mx-side.b .mx-team { color: var(--team-red); }
.mx-res { font-size: 13px; letter-spacing: .3em; color: rgba(236,232,225,.6); }
.mx-side.won .mx-res { color: #ece8e1; }
.mx-digits { display: flex; align-items: center; gap: clamp(12px, 2vw, 26px); font: 900 clamp(70px, 11vw, 140px)/.9 var(--display); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.mx-digits span { color: rgba(236,232,225,.45); }
.mx-digits span.won { color: #ece8e1; }
.mx-digits i { font-style: normal; font-weight: 300; font-size: .5em; color: rgba(236,232,225,.35); }
.mx-pov { margin-top: 18px; font-size: 13.5px; color: rgba(236,232,225,.7); }
.mx-pov b { color: #ece8e1; }

.mx-band { grid-template-columns: repeat(5, 1fr); }
.mx-hl { display: block; color: inherit; transition: background .2s ease; }
.mx-hl:hover { background: var(--surface); }
.mx-hl small { display: flex; align-items: center; gap: 6px; }
.agent-tile.xs { width: 20px; height: 20px; border-radius: 3px; font-size: 10px; flex: none; }

/* Round timeline */
.mx-rounds { margin-top: 34px; }
.mx-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.mx-sec-head h2 { margin: 0; font: 800 20px/1.2 var(--display); }
.rt-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); }
.rt-legend span { display: inline-flex; align-items: center; gap: 5px; }
.rt-legend svg { width: 13px; height: 13px; }
.rt-legend .lg::before { content: ""; width: 10px; height: 10px; border-radius: 2px; }
.rt-legend .lg.blue::before { background: var(--team-blue); }
.rt-legend .lg.red::before { background: var(--team-red); }
.rt-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.rt-lanes { display: grid; grid-template-rows: 1fr 22px 1fr; flex: none; font-size: 11px; color: var(--muted); }
.rt-lanes .lane { display: grid; place-items: center; width: 18px; }
.rt-lanes .lane.blue { color: var(--team-blue); grid-row: 1; }
.rt-lanes .lane.red { color: var(--team-red); grid-row: 3; }
.rt-strip { display: flex; gap: 3px; align-items: stretch; }
.rt-cell {
  position: relative; display: grid; grid-template-rows: 30px 22px 30px; width: 34px; flex: none; padding: 0; border: 0; cursor: pointer;
  background: transparent; color: var(--muted); border-radius: 4px; transition: background .15s ease, transform .15s ease;
}
.rt-cell:hover { background: var(--surface-2); }
.rt-cell.sel { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-strong); }
.rt-top, .rt-bot { display: grid; place-items: center; border-radius: 3px; }
.rt-cell.blue .rt-top { background: var(--team-blue-soft); color: var(--team-blue); }
.rt-cell.red .rt-bot { background: var(--team-red-soft); color: var(--team-red); }
.rt-top svg, .rt-bot svg { width: 16px; height: 16px; }
.rt-num { display: grid; place-items: center; font: 600 11px/1 var(--sans); font-variant-numeric: tabular-nums; }
.rt-cell.sel .rt-num { color: var(--text); font-weight: 800; }
.rt-half { display: grid; place-items: center; writing-mode: vertical-rl; font-size: 10px; letter-spacing: .3em; color: var(--muted); padding: 0 4px; border-left: 1px dashed var(--line-strong); margin-left: 4px; }
.rt-k { position: absolute; top: -6px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--amber); color: #1a1206; font: 800 10px/16px var(--sans); }
.rt-cer { position: absolute; bottom: -4px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--amber); }

.eco-chart { margin-top: 14px; }
.eco-chart-t { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.eco-chart svg { width: 100%; height: 90px; display: block; }
.eco-l { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.eco-l.blue { stroke: var(--team-blue); }
.eco-l.red { stroke: var(--team-red); }
.eco-hit { fill: transparent; cursor: pointer; }
.eco-hit:hover { fill: var(--accent-soft); }

.rd { margin-top: 14px; }
.rd-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); animation: fade .2s ease both; }
.rd-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.rd-head b { font: 800 16px/1 var(--display); }
.rd-win { font-weight: 700; font-size: 14px; }
.rd-win.blue { color: var(--team-blue); }
.rd-win.red { color: var(--team-red); }
.rd-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2); }
.rd-tag svg { width: 14px; height: 14px; }
.rd-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; }
.kf { padding: 10px 18px 14px; display: grid; gap: 2px; }
.kf-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 4px; font-size: 13.5px; }
.kf-row.mine { background: var(--accent-soft); }
.kf-t { width: 38px; flex: none; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.kf-p { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 34%; }
.kf-p span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kf-p.blue span { color: var(--team-blue); }
.kf-p.red span { color: var(--team-red); }
.kf-p.me span { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.kf-w { display: inline-grid; place-items: center; width: 72px; height: 22px; flex: none; }
.kf-w img { max-width: 72px; max-height: 20px; object-fit: contain; opacity: .9; }
:root[data-theme="light"] .kf-w img { filter: invert(1); }
.kf-wt { font-size: 11.5px; color: var(--muted); }
.kf-fb { font-size: 11px; padding: 2px 6px; border-radius: 3px; background: var(--amber-soft); color: var(--amber); font-weight: 700; }
.kf-a { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; color: var(--muted); font-size: 12px; }
.rd-eco { padding: 14px 18px; border-left: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.rd-eco-t { font-size: 12px; color: var(--muted); }
.eco-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.eco-row b { font-variant-numeric: tabular-nums; }
.eco-bar { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.eco-bar i { display: block; height: 100%; }
.eco-row.blue span { color: var(--team-blue); }
.eco-row.blue .eco-bar i { background: var(--team-blue); }
.eco-row.red span { color: var(--team-red); }
.eco-row.red .eco-bar i { background: var(--team-red); }

/* Scoreboards */
.mx-boards { display: grid; gap: 26px; margin-top: 34px; }
.mx-team-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.mx-team-head h2 { margin: 0; font: 800 20px/1.2 var(--display); letter-spacing: .1em; }
.mx-team-block:first-child .mx-team-head h2 { color: var(--team-blue); }
.mx-team-block:last-child .mx-team-head h2 { color: var(--team-red); }
.mx-team-head span { font-size: 13px; color: var(--muted); }
.mx-table { border-top: 1px solid var(--line-strong); }
.mx-table th { font-family: var(--sans); letter-spacing: .06em; text-transform: none; font-size: 12px; }
.mx-table td { padding-top: 11px; padding-bottom: 11px; }
.mx-back { margin-top: 26px; }

@media (max-width: 900px) {
  .mx-band { grid-template-columns: repeat(3, 1fr); }
  .rd-body { grid-template-columns: 1fr; }
  .rd-eco { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .mx-hero { min-height: 320px; }
  .mx-agent { opacity: .35; }
  .mx-band { grid-template-columns: repeat(2, 1fr); }
  .kf-row { flex-wrap: wrap; gap: 6px; }
  .kf-p { max-width: 42%; }
  .kf-w { width: 56px; }
}
