/* Match page (/m/<id>): hero, rank change animation, scoreboard, round timeline, highlights. Built on app2.css tokens. */
.mp { width: min(1180px, 100%); margin: 0 auto; padding: 0 24px 80px; display: flex; flex-direction: column; gap: 28px; flex: 1; }
.mp-load { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 120px 0; color: var(--ink3); }
.mp-load span { display: inline-block; width: 12px; height: 12px; margin: 0 3px; background: var(--red); animation: mpDot 1s var(--ease) infinite; }
.mp-load span:nth-child(2) { animation-delay: .12s; } .mp-load span:nth-child(3) { animation-delay: .24s; }
@keyframes mpDot { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-10px); opacity: 1; } }
.mp-err { padding: 80px 0; text-align: center; color: var(--ink2); }
.mp-err a { color: var(--red); }

/* Hero */
.mp-hero { position: relative; overflow: hidden; margin: 0 -24px; min-height: 360px; display: grid; align-items: end; padding: 40px 24px 28px; isolation: isolate; }
.mp-hero-bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; filter: saturate(.7) brightness(.55); transform: scale(1.08); animation: mpPan 22s ease-in-out infinite alternate; }
.mp-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(16, 20, 26, .35), var(--g) 96%), linear-gradient(90deg, rgba(16, 20, 26, .8), transparent 60%); }
@keyframes mpPan { from { transform: scale(1.08) translateX(-1.5%); } to { transform: scale(1.14) translateX(1.5%); } }
.mp-hero-top { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; color: var(--ink2); font-size: 14px; font-weight: 600; }
.mp-chip { display: inline-block; padding: 4px 10px; background: var(--s2); color: var(--ink); font-weight: 800; font-size: 13px; }
.mp-result { margin-top: 18px; font-size: clamp(54px, 11vw, 120px); font-weight: 900; font-stretch: 125%; line-height: .9; letter-spacing: -.02em; animation: mpSlam .7s var(--ease) both; }
.mp-result.win { color: var(--win); } .mp-result.loss { color: var(--red); } .mp-result.draw { color: var(--gold); } .mp-result.neutral { color: var(--ink); }
@keyframes mpSlam { from { opacity: 0; transform: translateY(40px) scale(1.1); } to { opacity: 1; transform: none; } }
.mp-score { display: flex; align-items: baseline; gap: 14px; margin-top: 8px; font-size: clamp(34px, 6vw, 64px); }
.mp-score .n { color: var(--ink); } .mp-score .sep { color: var(--ink3); }
.mp-score .side { font-size: 14px; font-weight: 700; color: var(--ink2); font-stretch: 100%; }
.mp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.mp-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; background: var(--s2); color: var(--ink); border: 0; font: inherit; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; clip-path: var(--cut); transition: background .2s; }
.mp-btn:hover { background: var(--s3); } .mp-btn.red { background: var(--red); color: var(--g); } .mp-btn.red:hover { background: #ff6573; }

/* Section frame */
.mp-sec { display: flex; flex-direction: column; gap: 14px; }
.mp-sec > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mp-sec > header p { color: var(--ink3); font-size: 14px; }
.mp-card { background: var(--s1); padding: 20px 22px; clip-path: var(--cut); }

/* Rank change */
.rk { --rc: var(--ink2); position: relative; display: grid; grid-template-columns: 240px minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 28px 32px; background: var(--s1); overflow: hidden; clip-path: var(--cut); isolation: isolate; }
.rk::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 20% 50%, color-mix(in srgb, var(--rc) 28%, transparent), transparent 62%); opacity: .55; transition: opacity .8s; }
.rk.fx-up::before, .rk.fx-down::before { opacity: 1; }
.rk-stage { position: relative; width: 220px; height: 220px; display: grid; place-items: center; }
.rk-icon { position: absolute; inset: 0; display: grid; place-items: center; will-change: transform, opacity, filter; }
.rk-icon img { width: 190px; height: 190px; object-fit: contain; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .5)); }
.rk-new { opacity: 0; }
.rk.is-same .rk-new { display: none; }
.rk-ring { position: absolute; inset: 20px; border: 3px solid var(--rc); border-radius: 50%; opacity: 0; pointer-events: none; }
.rk-spark { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; background: var(--rc); opacity: 0; pointer-events: none; }
.rk-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rk-tag { display: inline-block; align-self: flex-start; padding: 4px 12px; background: var(--s3); color: var(--ink2); font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; transition: background .3s, color .3s; }
.rk.fx-up .rk-tag { background: var(--win); color: var(--g); } .rk.fx-down .rk-tag { background: var(--red); color: var(--g); }
.rk-title { font-size: clamp(30px, 5vw, 52px); font-stretch: 120%; font-weight: 900; line-height: 1; }
.rk-title span { display: inline-block; }
.rk-bar { position: relative; height: 16px; background: var(--s3); overflow: hidden; max-width: 560px; }
.rk-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--rc); }
.rk.fx-down .rk-bar i { background: var(--red); }
.rk-nums { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.rk-rr { font-size: clamp(34px, 6vw, 60px); font-stretch: 80%; }
.rk-rr.pos { color: var(--win); } .rk-rr.neg { color: var(--red); } .rk-rr.zero { color: var(--ink2); }
.rk-of { color: var(--ink2); font-weight: 700; }
.rk-replay { align-self: start; }
.rk.shake { animation: mpShake .55s linear; }
@keyframes mpShake { 10%, 90% { transform: translateX(-3px); } 20%, 80% { transform: translateX(6px); } 30%, 50%, 70% { transform: translateX(-9px); } 40%, 60% { transform: translateX(9px); } }
.rk-flash { position: absolute; inset: 0; z-index: 2; background: var(--rc); opacity: 0; pointer-events: none; }
@media (max-width: 820px) { .rk { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 24px 18px; } .rk-info { align-items: center; } .rk-tag { align-self: center; } .rk-bar { width: 100%; } .rk-replay { justify-self: center; } .rk-stage { width: 180px; height: 180px; } .rk-icon img { width: 160px; height: 160px; } }

/* Awards */
.mp-awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px; }
.mp-award { position: relative; display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--s1); text-decoration: none; overflow: hidden; transition: background .2s, transform .3s var(--ease); }
.mp-award:hover { background: var(--s2); transform: translateY(-2px); }
.mp-award.big { background: var(--red); color: var(--g); } .mp-award.big:hover { background: #ff6573; }
.mp-award img { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--s3); object-fit: cover; }
.mp-award small { display: block; font-size: 12px; font-weight: 700; opacity: .75; }
.mp-award b { display: block; font-size: 17px; line-height: 1.15; }
.mp-award em { display: block; font-style: normal; font-size: 13px; opacity: .85; }

/* Scoreboard */
.mp-team { display: flex; flex-direction: column; gap: 6px; }
.mp-team > h3 { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.mp-team > h3 .n { font-size: 22px; }
.mp-team > h3 .tag { padding: 2px 8px; font-size: 12px; background: var(--s3); color: var(--ink2); font-weight: 800; }
.mp-team.won > h3 .tag { background: var(--win); color: var(--g); } .mp-team.lost > h3 .tag { background: var(--red); color: var(--g); }
.mp-tbl { overflow-x: auto; background: var(--s1); }
.mp-tbl table { width: 100%; min-width: 760px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.mp-tbl th { padding: 10px 10px; text-align: right; font-size: 12px; font-weight: 700; color: var(--ink3); white-space: nowrap; border-bottom: 1px solid var(--s3); }
.mp-tbl th:first-child, .mp-tbl td:first-child { text-align: left; padding-left: 16px; }
.mp-tbl td { padding: 9px 10px; text-align: right; font-weight: 700; border-top: 1px solid var(--s2); white-space: nowrap; }
.mp-tbl tr:first-child td { border-top: 0; }
.mp-tbl tr.me td { background: color-mix(in srgb, var(--red) 14%, var(--s1)); }
.mp-tbl tr { animation: mpRow .5s var(--ease) backwards; animation-delay: calc(var(--i) * 45ms); }
@keyframes mpRow { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
.mp-pl { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.mp-pl img.ag { width: 34px; height: 34px; border-radius: 50%; background: var(--s3); flex: none; }
.mp-pl img.rk-s { width: 24px; height: 24px; flex: none; }
.mp-pl a { text-decoration: none; font-weight: 800; } .mp-pl a:hover { text-decoration: underline; }
.mp-pl small { display: block; color: var(--ink3); font-weight: 600; font-size: 12px; }
.mp-pl .crown { display: inline-block; margin-left: 6px; padding: 1px 6px; background: var(--gold); color: var(--g); font-size: 11px; font-weight: 900; }
.mp-pos { color: var(--win); } .mp-neg { color: var(--red); }
.mp-bar { display: inline-block; vertical-align: middle; width: 54px; height: 6px; margin-left: 8px; background: var(--s3); } .mp-bar i { display: block; height: 100%; background: var(--red); }

/* Round timeline + momentum */
.mp-rounds { display: grid; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.mp-rrow { display: flex; align-items: center; gap: 3px; min-width: max-content; }
.mp-rrow > span.lbl { width: 54px; font-size: 12px; font-weight: 800; color: var(--ink2); }
.mp-pip { position: relative; width: 24px; height: 28px; background: var(--s2); display: grid; place-items: center; font-size: 10px; font-weight: 800; color: var(--g); animation: mpPip .35s var(--ease) backwards; animation-delay: calc(var(--i) * 18ms); }
.mp-pip.on-red { background: var(--red); } .mp-pip.on-blue { background: #4FA3FF; }
.mp-pip.half { margin-left: 12px; }
.mp-pip.plant::after { content: ""; position: absolute; bottom: 2px; width: 6px; height: 6px; background: var(--g); border-radius: 50%; }
@keyframes mpPip { from { opacity: 0; transform: scaleY(.2); } to { opacity: 1; transform: none; } }
.mp-swing svg { width: 100%; height: 150px; display: block; }
.mp-swing .line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-dasharray: 1; stroke-dashoffset: 1; animation: mpDraw 1.6s var(--ease) .3s forwards; vector-effect: non-scaling-stroke; }
@keyframes mpDraw { to { stroke-dashoffset: 0; } }
.mp-legend { display: flex; justify-content: space-between; color: var(--ink3); font-size: 12px; font-weight: 700; }

/* Highlights */
.mp-hl { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 4px; }
.mp-hl > div { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--s1); }
.mp-hl .k { flex: none; min-width: 54px; padding: 6px 8px; text-align: center; background: var(--s3); font-weight: 900; font-stretch: 85%; font-size: 20px; }
.mp-hl .k.ace { background: var(--gold); color: var(--g); } .mp-hl .k.k4 { background: var(--violet); color: var(--g); }
.mp-hl small { display: block; color: var(--ink3); font-size: 12px; font-weight: 600; }

/* Focus player */
.mp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 4px; }
.mp-grid > section { background: var(--s1); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.mp-row { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 14px; font-weight: 700; }
.mp-row .track { height: 10px; background: var(--s3); } .mp-row .track i { display: block; height: 100%; background: var(--win); transform-origin: left; animation: mpGrow .9s var(--ease) backwards; }
@keyframes mpGrow { from { transform: scaleX(0); } }
.mp-row .track i.red { background: var(--red); } .mp-row .track i.gold { background: var(--gold); }
.mp-duel { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; font-weight: 700; }
.mp-duel img { width: 30px; height: 30px; border-radius: 50%; background: var(--s3); }

@media (max-width: 700px) { .mp { padding: 0 16px 80px; } .mp-hero { margin: 0 -16px; padding: 28px 16px 22px; min-height: 300px; } }
@media (prefers-reduced-motion: reduce) { .mp *, .mp *::before, .mp *::after { animation-duration: .01ms !important; animation-delay: 0s !important; } }

/* Radianite+ under the rank change */
.mp-plus { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 14px 18px; background: var(--s2); }
.mp-plus p { color: var(--ink2); font-size: 14px; max-width: 640px; }
.mp-plus p b { color: var(--ink); }
.mp-plus-btns { display: flex; gap: 8px; flex-wrap: wrap; }
