/* 試合ページ（/match/）。中身は match_pages.py */
.mp{--mp-h:var(--ys-crimson); --mp-a:#12908E; --mp-y:#E0A800; --mp-r:var(--ys-loss)}
.mp h2{margin:0 0 12px; font-size:17px}
.mp h3{margin:0 0 8px; font-size:15px}
.mp h3 a{color:inherit}
.mp-vh{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap}
/* 前後の試合（チームごと。見出しのすぐ下） */
.mp-navc{padding:12px 14px}
.mp-nv-r{display:grid; grid-template-columns:1fr 1fr; gap:8px}
.mp-nv{display:flex; align-items:center; gap:8px; min-height:52px; padding:6px 10px; border:1px solid var(--line);
  border-radius:8px; background:var(--bg); color:var(--text); text-decoration:none; min-width:0}
a.mp-nv:hover{border-color:var(--btn)}
.mp-nv-next{justify-content:flex-end; text-align:right}
.mp-nv.none{visibility:hidden}
.mp-nv-a{font-size:32px; font-weight:900; line-height:.9; margin-top:-4px; color:var(--btn); flex:none}
.mp-nv-b{min-width:0}
.mp-nv-b > small{display:block; font-size:11px; color:var(--muted-2)}
.mp-nv-b b{display:block; font-size:13px; line-height:1.4; overflow-wrap:anywhere}
.mp-nv-s{font-family:var(--font-num); font-weight:700; white-space:nowrap}
.mp-nv-s small{font-size:11px; font-weight:400; margin-left:3px}
.mp-note{margin:12px 0 0; font-size:12px; color:var(--muted-2); line-height:1.7}
.mp-note a{color:var(--accent-text)}
.mp-c-h, .mp-c-a{font-weight:700}
.mp-c-h::before, .mp-c-a::before{content:""; display:inline-block; width:10px; height:10px; border-radius:50%;
  margin-right:6px; background:var(--mp-h)}
.mp-c-a::before{background:var(--mp-a); border-radius:2px; transform:rotate(45deg) scale(.85)}
.mp-no{font-family:var(--font-num); font-weight:700; font-size:.82em; color:var(--muted-2)}

/* 見出し */
.mp-comp{margin:0 0 10px; font-size:13px; color:var(--muted-2)}
.mp-comp a{color:var(--accent-text); text-decoration:none}
.mp-score{display:grid; grid-template-columns:1fr auto 1fr; gap:10px; align-items:center}
.mp-team{font-size:19px; line-height:1.35; min-width:0; overflow-wrap:anywhere}
.mp-team a{color:inherit; text-decoration:none}
.mp-team a:hover{text-decoration:underline}
.mp-team-h{text-align:right}
.mp-sc{text-align:center}
.mp-sc-n{display:block; font-family:var(--font-num); font-weight:900; font-size:40px; line-height:1.1;
  color:var(--accent-text); font-variant-numeric:tabular-nums; white-space:nowrap}
.mp-sc-n i{font-style:normal; margin:0 6px; color:var(--muted)}
.mp-sc small{display:block; font-size:11px; color:var(--muted-2); white-space:nowrap}
.mp-sc .mp-sc-pk{font-size:13px; font-weight:700; color:var(--text)}
.mp-facts{display:flex; flex-wrap:wrap; justify-content:center; gap:2px 14px; margin:14px 0 0; font-size:12px; color:var(--muted-2)}

/* 印 */
.mp-i{display:inline-block; flex:none; vertical-align:-1px; margin:0 3px}
.mp-i-goal{width:11px; height:11px; border-radius:50%; background:var(--text); box-shadow:inset 0 0 0 2.5px var(--text), inset 0 0 0 4px #fff}
.mp-i-y, .mp-i-r{width:8px; height:11px; border-radius:1.5px; background:var(--mp-y)}
.mp-i-r{background:var(--mp-r)}
.mp-i-sub{width:11px; height:11px; background:
  linear-gradient(var(--ys-win),var(--ys-win)) 0 2px/7px 2px no-repeat,
  linear-gradient(var(--ys-loss),var(--ys-loss)) 4px 7px/7px 2px no-repeat}

/* スコアの動き */
.mp-tl{position:relative; padding:0 14px}
.mp-tl-name{font-size:12px}
.mp-tl-row{position:relative; height:58px}
.mp-tl-axis{position:relative; height:2px; background:var(--line); border-radius:1px}
.mp-tick{position:absolute; top:-5px; width:2px; height:12px; margin-left:-1px; background:var(--muted)}
.mp-tick small{position:absolute; top:-1px; left:5px; font-size:9px; line-height:1; color:var(--muted); white-space:nowrap;
  background:var(--surface); padding:2px 2px}
.mp-tick-0, .mp-tick-e{background:var(--line)}
.mp-tick-0 small, .mp-tick-e small{display:none}
.mp-ev{position:absolute; display:flex; flex-direction:column; align-items:center; gap:2px; transform:translateX(-50%)}
.mp-tl-h .mp-ev{bottom:5px; flex-direction:column-reverse}
.mp-tl-a .mp-ev{top:5px}
.mp-tl-h .mp-lv1{bottom:30px} .mp-tl-a .mp-lv1{top:30px}
.mp-ev small{font-size:10px; line-height:1.1; color:var(--muted-2); white-space:nowrap; text-align:center}
.mp-ev small b{display:block; color:var(--text); font-family:var(--font-num)}
.mp-ev .mp-i{margin:0}
.mp-ev-goal .mp-i-goal{width:14px; height:14px; background:var(--mp-h); box-shadow:0 0 0 2px var(--surface)}
.mp-tl-a .mp-ev-goal .mp-i-goal{background:var(--mp-a); border-radius:2px; transform:rotate(45deg) scale(.85)}
.mp-key{display:flex; flex-wrap:wrap; gap:2px 14px; margin:10px 0 0; font-size:11px; color:var(--muted-2)}

/* 試合経過 */
.mp-evh{display:grid; grid-template-columns:1fr 46px 1fr; font-size:12px; margin-bottom:4px}
.mp-evh span:first-child{text-align:right}
.mp-evs{list-style:none; margin:0; padding:0}
.mp-e{display:grid; grid-template-columns:1fr 46px 1fr; align-items:start; padding:6px 0; border-top:1px solid var(--line); font-size:13.5px; line-height:1.5}
.mp-e-t{grid-column:2; grid-row:1; text-align:center; font-family:var(--font-num); font-weight:700; font-size:12px; color:var(--muted-2); padding-top:2px}
.mp-e-b{grid-row:1; display:flex; align-items:flex-start; gap:4px; min-width:0}
.mp-e-b .mp-i{margin-top:5px}
.mp-e-home .mp-e-b{grid-column:1; flex-direction:row-reverse; text-align:right}
.mp-e-away .mp-e-b{grid-column:3}
.mp-e-m{min-width:0; overflow-wrap:anywhere}
.mp-e-m a{color:var(--text); text-decoration:none}
.mp-e-m a:hover{text-decoration:underline}
.mp-e-m small{display:block; font-size:11.5px; color:var(--muted-2)}
.mp-e-w{font-size:11px; color:var(--muted-2) !important}
.mp-e-sc{font-family:var(--font-num); font-weight:900; color:var(--accent-text); white-space:nowrap}
.mp-e-goal{background:var(--ys-stat-hi)}
.mp-in, .mp-out{display:block}
.mp-in abbr, .mp-out abbr{font-size:10px; font-weight:700; text-decoration:none; color:var(--ys-win); margin-right:2px}
.mp-out abbr{color:var(--ys-loss)}
.mp-out{color:var(--muted-2)}
.mp-sep{text-align:center; font-size:12px; color:var(--muted-2); background:var(--tile); padding:5px 0; border-top:1px solid var(--line)}
.mp-sep b{color:var(--text); font-family:var(--font-num); margin-left:4px}
.mp-none{padding:10px 0; font-size:13px; color:var(--muted-2); text-align:center}

/* 得点までの流れ */
.mp-gs{list-style:none; margin:0; padding:0}
.mp-g{padding:12px 0 12px 12px; border-top:1px solid var(--line); border-left:4px solid var(--mp-h); scroll-margin-top:12px}
.mp-g-away{border-left-color:var(--mp-a)}
.mp-g:first-child{border-top:0}
.mp-g:target{background:var(--ys-stat-hi)}
.mp-g-h{display:flex; align-items:baseline; gap:10px; margin:0 0 8px}
.mp-g-h .mp-e-t{padding:0}
.mp-g-w a{color:var(--text)}
.mp-g-w small{margin-left:8px; font-size:11.5px; color:var(--muted-2)}
.mp-flow{display:flex; flex-wrap:wrap; align-items:center; gap:6px 4px}
.mp-s{display:inline-flex; align-items:center; min-height:26px; padding:1px 8px; border-radius:6px; font-size:12.5px; line-height:1.4; background:var(--tile)}
.mp-s a{color:inherit}
.mp-s-p{background:var(--surface); border:1px solid var(--line); font-weight:600}
.mp-s-z{background:none; padding:0 2px; color:var(--muted-2); font-size:11.5px}
.mp-s-z::before{content:"［"} .mp-s-z::after{content:"］"}
.mp-s-a{background:none; padding:0 2px; color:var(--muted-2); font-size:11.5px}
.mp-s-a::after{content:" →"; margin-left:3px}
.mp-flow-none{margin:0; font-size:12.5px; color:var(--muted-2)}

/* スタッツ比較 */
.mp-st-head{display:flex; justify-content:space-between; font-size:12px; margin-bottom:6px}
.mp-st{display:grid; grid-template-columns:2.2em 1fr minmax(8.5em,auto) 1fr 2.2em; align-items:center; gap:8px; padding:7px 0; border-top:1px solid var(--line)}
.mp-st-v{font-family:var(--font-num); font-weight:900; font-size:17px; font-variant-numeric:tabular-nums; text-align:center}
.mp-st-l{text-align:center; font-size:12.5px; color:var(--muted-2)}
.mp-st-bar{display:flex; height:10px; background:var(--tile); border-radius:5px; overflow:hidden}
.mp-st-bh{justify-content:flex-end}
.mp-st-bar i{display:block; height:100%; background:var(--mp-h); border-radius:5px 0 0 5px}
.mp-st-ba i{background:var(--mp-a); border-radius:0 5px 5px 0}
.mp-st-sub{padding:3px 0; border-top:0}
.mp-st-sub .mp-st-v{font-size:13px; font-weight:700; color:var(--muted-2)}
.mp-st-sub .mp-st-l{font-size:11px}
.mp-st-sub .mp-st-bar{height:6px}
.mp-st-sub .mp-st-bar i{opacity:.55}

/* メンバー・PK戦 */
.mp-two{display:grid; grid-template-columns:1fr 1fr; gap:20px}
table.mp-tb{width:100%; min-width:0; border-collapse:collapse; font-size:13.5px}
.mp-tb th, .mp-tb td{white-space:normal; border-bottom:0}
.mp-tb thead th{white-space:nowrap}
.mp-tb thead th{border-bottom:1px solid var(--line)}
.mp-tb td.mp-nm{text-align:left; overflow-wrap:anywhere}
.mp-tb th{font-size:11px; font-weight:400; color:var(--muted); padding:4px 4px; text-align:center; white-space:nowrap}
.mp-tb th.c-left{text-align:left}
.mp-tb td{padding:6px 4px; border-top:1px solid var(--line); vertical-align:top}
.mp-tb td.n{text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums}
.mp-tb td.mp-no{text-align:right; width:2.2em}
.mp-tb td.mp-pos, .mp-tb td:nth-child(2){text-align:center} .mp-tb td.mp-pos{width:2.6em; font-size:11px; color:var(--muted-2); padding-top:8px}
.mp-nm a{color:var(--text); text-decoration:none; font-weight:600}
.mp-nm a:hover{text-decoration:underline}
.mp-nm small{display:block; font-size:10.5px; color:var(--muted-2)}
.mp-nm small span{display:inline; margin-right:8px}
.mp-nm small .mp-in{color:var(--ys-win)} .mp-nm small .mp-out{color:var(--ys-loss)}
.mp-cap{margin-left:5px; font-size:10px; font-weight:700; text-decoration:none; padding:0 4px; border-radius:3px; background:var(--btn); color:#fff}
.mp-grp th{text-align:left; font-size:11px; font-weight:700; color:var(--muted-2); background:var(--tile); padding:4px 6px}
.mp-pk{margin:0; padding:0; list-style:none; counter-reset:k}
.mp-pk li{counter-increment:k; padding:5px 0; border-top:1px solid var(--line); font-size:13.5px}
.mp-pk li::before{content:counter(k); display:inline-block; width:1.4em; font-size:11px; color:var(--muted)}
.mp-pk b{display:inline-block; width:1.2em}
.mp-k-o b{color:var(--ys-win)} .mp-k-x b{color:var(--ys-loss)}
.mp-two h3 b{font-family:var(--font-num); margin-left:6px}
.mp-two h3 small{font-weight:400; font-size:11px; color:var(--muted-2)}

@media(max-width:640px){
  .mp .card{padding:16px 12px}
  .mp-team{font-size:15px}
  .mp-sc-n{font-size:32px}
  .mp-two{grid-template-columns:1fr; gap:24px}
  .mp-e{font-size:12.5px}
  .mp-st{grid-template-columns:1.8em 1fr minmax(7.5em,auto) 1fr 1.8em; gap:6px}
}
