/* The match page (tournament-match.js, approved previews 254, 255, 258, 259): the result, the 10 minutes and "Khiếu
   nại" for everyone; BTC's complaint, correction and "Đặt lại nhánh" screens. Everything here starts with .mp- so no
   other page changes. The colours of "Hôm nay" (tournament-today.css, --td-*) are shared. On a computer the page keeps
   the phone column in the middle. */

.tour-page {
  --mp-amber: #e3ad2e;
  --mp-red-edge: rgba(191, 58, 48, 0.45);
  --mp-old: #b3bccb;
}
@media (prefers-color-scheme: dark) {
  html.in-app .tour-page {
    --mp-amber: #f0bf4c;
    --mp-red-edge: rgba(255, 122, 110, 0.5);
    --mp-old: #56627a;
  }
}

.mp { padding-bottom: 8px; }
.tour-page .mp .tp-btn { min-height: 56px; border-radius: 28px; font-size: min(1.125rem, 56px); }
.tour-page .tp-btn.mp-red { background: var(--tp-card); color: var(--td-down); box-shadow: inset 0 0 0 2px var(--mp-red-edge); }
.tour-page .tp-btn.mp-redb { background: var(--td-down); color: #fff; }
.tour-page .tp-btn.mp-navy { background: var(--navy); color: #fff; }
.tour-page .tp-btn.mp-ghost { background: var(--tp-card); color: var(--tp-brand-ink); box-shadow: inset 0 0 0 1.5px rgba(11, 33, 82, 0.18); }
.tour-page .mp .tp-btn:disabled { background: #dfe4ec; color: #7c879c; box-shadow: none; cursor: default; filter: none; }
.mp .tp-btn .tp-num { font-size: min(1.3125rem, 56px); }
.mp-tam { display: inline-grid; flex: none; place-items: center; min-height: 24px; padding: 0 9px; border-radius: 12px; background: var(--td-amber-bg); color: var(--td-amber-ink); font: 600 0.875rem/1 var(--tp-font); }
.mp-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 0; font: 500 0.875rem/1 var(--tp-font); color: var(--tp-muted); }
.mp-note .tp-num { font-size: 0.9375rem; }

/* ---------- 254: the result card, the 10 minutes, "Khiếu nại" ---------- */

.mp-hero { margin-top: 14px; padding: 14px 20px; border-radius: 24px; background: var(--tp-navy-card); color: #fff; }
.mp-k { display: flex; align-items: center; gap: 8px; min-height: 24px; font: 500 0.9375rem/1 var(--tp-font); color: rgba(255, 255, 255, 0.72); }
.mp-k .tp-num { font-size: 1.0625rem; }
.mp-k .mp-tam { margin-left: auto; }
.mp-live { display: inline-flex; align-items: center; gap: 7px; color: #fff; }
.mp-live i { width: 9px; height: 9px; border-radius: 50%; background: var(--td-live); }
.mp-live.is-ready i, .mp-live.is-paused i { background: #ffb020; }
.mp-r { display: flex; align-items: center; gap: 14px; min-height: 96px; }
.mp-r + .mp-r { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.mp-hero .tr-pr .tp-av { box-shadow: 0 0 0 2px #0c2661; }
.mp-nm { flex: 1; min-width: 0; font: 500 1rem/1.25 var(--tp-font); }
.mp-nm b { display: block; font-weight: 500; white-space: normal; overflow-wrap: anywhere; }
.mp-hero .mp-nm { color: #fff; }
.mp-g { flex: none; font: 600 min(4.5rem, 108px)/1 var(--font-score); color: var(--optic); white-space: nowrap; }
.mp-g.is-sets { font-size: min(3rem, 72px); letter-spacing: 0.04em; word-spacing: 0.1em; }
.mp-r.is-lo .mp-g { color: rgba(255, 255, 255, 0.45); }

.mp-tl { margin-top: 14px; padding: 18px 20px; border-radius: 24px; background: var(--tp-card); }
.mp-tl-r { display: flex; align-items: center; justify-content: space-between; }
.mp-tl-r:not(.is-words) > b { font: 600 min(1.375rem, 56px)/1 var(--font-score); color: var(--tp-ink2); }
.mp-tl-r.is-words { position: relative; font: 500 0.875rem/1 var(--tp-font); color: var(--tp-muted); }
.mp-mid { position: absolute; left: 50%; transform: translateX(-50%); font: 600 1rem/1 var(--tp-font); color: var(--td-amber-ink); white-space: nowrap; }
.mp-mid .tp-num { font: 600 min(1.125rem, 56px)/1 var(--font-score); }
.mp-track { position: relative; height: 10px; margin: 14px 0 12px; border-radius: 5px; background: var(--tp-bar); }
.mp-track i { position: absolute; top: 0; bottom: 0; left: 0; width: var(--mp-part); border-radius: 5px; background: var(--mp-amber); }
.mp-track em { position: absolute; top: 50%; left: var(--mp-part); width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--tp-card); box-shadow: 0 0 0 4px var(--mp-amber); }

.mp-dis { margin-top: 18px; }
.mp-tools { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.mp-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; border: 0; border-radius: 18px; background: var(--tp-card); color: var(--tp-ink); font: 500 1rem/1 var(--tp-font); text-align: left; text-decoration: none; cursor: pointer; }
.mp-row b { margin-left: auto; font: 600 min(1.125rem, 56px)/1 var(--font-score); color: var(--tp-muted); }
.mp-row .tp-ic { color: var(--tp-brand-ink); }

/* "Bạn là?": the four players, the words, "Gửi". */
.mp-whos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.mp-who { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 6px 10px; border: 0; border-radius: 18px; background: var(--tp-soft); color: var(--tp-ink); font: 500 0.9375rem/1.2 var(--tp-font); text-align: left; cursor: pointer; }
.mp-who span { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.mp-who[aria-pressed="true"] { background: var(--navy); color: #fff; }
.mp-who[aria-pressed="true"] .tp-av { box-shadow: 0 0 0 3px var(--optic); }
.mp-vs { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mp-v { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 16px; background: var(--tp-soft); }
.mp-vn { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--tp-card); font: 600 15px/1 var(--font-score); color: var(--tp-muted); }
.mp-v b { font: 600 min(1.5rem, 56px)/1 var(--font-score); color: var(--tp-brand-ink); }
.mp-v.is-old b { color: var(--mp-old); text-decoration: line-through; text-decoration-thickness: 2px; }
.mp-vt { margin-left: auto; font: 600 1.0625rem/1 var(--font-score); color: var(--tp-muted); }
.mp-ok { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--td-up); color: #fff; }

/* ---------- BTC's screens: no dock or footer, the main action kept at the bottom ---------- */

body.mp-nodock .dock, body.mp-nodock .dock-sheet, body.mp-nodock .site-footer { display: none !important; }
body.mp-nodock { padding-bottom: 0; }
.mp-nodock #tour { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.mp-cta, .mp-two { position: fixed; z-index: 20; left: 0; right: 0; bottom: calc(24px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; padding: 0 16px; }
.mp-two { display: flex; gap: 10px; }
.mp-two .tp-btn { flex: 1; }
.mp-btc[data-mp-btc="reset"] { padding-bottom: 40px; }
.mp-field { box-sizing: border-box; display: block; width: 100%; min-height: 52px; margin-top: 18px; padding: 0 16px; border: 0; border-radius: 16px; background: var(--tp-card); box-shadow: inset 0 0 0 1px var(--td-line); color: var(--tp-ink); font: 400 1rem/1 var(--tp-font); }
.mp-field::placeholder { color: #9aa4b6; }
.mp-field:focus-visible { outline: 2px solid var(--tp-brand-ink); outline-offset: 1px; }
.mp-err { margin-top: 10px; }

/* 255: the complaint and "Từng game". */
.mp-cmp { display: flex; align-items: flex-start; gap: 12px; margin-top: 14px; padding: 14px 16px; border-radius: 24px; background: var(--tp-card); }
.mp-bub { flex: 1; min-width: 0; }
.mp-bub b { display: flex; align-items: center; gap: 8px; font: 600 1rem/1.25 var(--tp-font); color: var(--tp-ink); }
.mp-at { margin-left: auto; font: 500 1rem/1 var(--font-score); color: var(--tp-muted); }
.mp-bub p { display: inline-block; max-width: 100%; margin: 8px 0 0; padding: 10px 14px; border-radius: 4px 16px 16px 16px; background: var(--tp-soft); font: 500 1rem/1.25 var(--tp-font); color: var(--tp-ink2); white-space: normal; overflow-wrap: anywhere; }
.mp-lg { margin-top: 14px; padding: 16px 16px 14px; border-radius: 24px; background: var(--tp-card); }
.mp-lg-h { display: flex; align-items: center; gap: 8px; font: 600 0.9375rem/1 var(--tp-font); color: var(--tp-muted); }
.mp-lg-h b { margin-left: auto; font: 600 min(1.75rem, 56px)/1 var(--font-score); color: var(--tp-brand-ink); }
.mp-gr { display: grid; grid-template-columns: 62px repeat(var(--mp-n), minmax(18px, 1fr)); gap: 4px; align-items: center; margin-top: 14px; overflow-x: auto; padding: 5px 5px 0; }
.mp-c { height: 34px; border-radius: 8px; background: var(--tp-soft); }
.mp-c.is-a { background: var(--navy); }
.mp-c.is-b { background: var(--optic); }
.mp-c.is-x { box-shadow: 0 0 0 3px var(--tp-card), 0 0 0 5px var(--td-down); }
.mp-n { text-align: center; font: 600 0.875rem/1 var(--font-score); color: #a3adbf; }
.mp-n.is-x { color: var(--td-down); }
.mp-pt { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 10px 12px; border-radius: 14px; background: var(--td-down-bg); font: 500 0.9375rem/1 var(--tp-font); color: var(--td-down); }
.mp-pt b { font: 600 min(1.25rem, 56px)/1 var(--font-score); }

/* 258: Cũ → Mới, the number pad, the reason. */
.mp-vs2 { margin-top: 14px; padding: 8px 16px 14px; border-radius: 24px; background: var(--tp-card); }
.mp-fh, .mp-fr { display: grid; grid-template-columns: 1fr 64px 30px minmax(64px, auto); align-items: center; }
.mp-fh { align-items: end; min-height: 40px; font: 600 0.875rem/1 var(--tp-font); color: var(--tp-muted); text-align: center; }
.mp-fr { min-height: 84px; }
.mp-fr + .mp-fr { border-top: 1px solid var(--td-line); }
.mp-fp { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mp-fp .mp-nm { font: 400 0.9375rem/1.2667 var(--tp-font); color: var(--tp-ink); }
.mp-fp .mp-nm b { font-weight: 400; }
.mp-o { text-align: center; font: 600 min(2.5rem, 60px)/1 var(--font-score); color: var(--mp-old); text-decoration: line-through; text-decoration-thickness: 3px; white-space: nowrap; }
.mp-ar { display: grid; place-items: center; color: #a3adbf; }
.mp-nws { display: flex; justify-content: center; gap: 6px; }
.mp-nw { display: grid; place-items: center; width: 58px; height: 58px; padding: 0; border: 0; border-radius: 16px; background: var(--tp-soft); color: var(--tp-brand-ink); font: 600 40px/1 var(--font-score); cursor: pointer; }
.mp-nw.is-w { background: var(--optic); color: var(--navy-deep); }
.mp-nw.is-on { box-shadow: inset 0 0 0 3px var(--tp-brand-ink); }
.mp-kp { margin-top: 12px; }
.mp-sets { display: flex; gap: 8px; margin-top: 12px; }
.mp-okl { display: flex; align-items: center; gap: 10px; min-height: 54px; margin: 12px 0 0; padding: 0 16px; border-radius: 18px; background: var(--td-up-bg); color: var(--td-up); font: 600 1rem/1 var(--tp-font); }
.mp-lab { margin: 22px 4px 0; font: 600 0.9375rem/1 var(--tp-font); color: var(--tp-muted); }
.mp-rc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mp-chip { min-height: 40px; padding: 0 16px; border: 0; border-radius: 20px; background: var(--tp-card); box-shadow: inset 0 0 0 1px var(--td-line); color: var(--tp-ink2); font: 500 1rem/1 var(--tp-font); cursor: pointer; }
.mp-chip.is-on { background: var(--navy); color: #fff; box-shadow: none; }
.mp-rc + .mp-field { margin-top: 12px; }

/* 259: the part of the bracket, the warning, the red button. */
.mp-br { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 135px; gap: 26px; align-items: center; margin-top: 14px; }
.mp-br-l { position: relative; display: flex; flex-direction: column; gap: 56px; }
.mp-br.has-two .mp-br-l::after { content: ""; position: absolute; top: 25%; bottom: 25%; right: -14px; width: 13px; border: 2px solid #c8d0dc; border-left: 0; border-radius: 0 6px 6px 0; }
.mp-br-rt { position: relative; display: flex; flex-direction: column; gap: 14px; }
.mp-br.has-two .mp-br-rt::before { content: ""; position: absolute; top: 50%; left: -13px; width: 13px; border-top: 2px solid #c8d0dc; }
.mp-bm { padding: 10px 12px; border-radius: 20px; background: var(--tp-card); }
.mp-bc { display: flex; align-items: center; gap: 8px; font: 600 0.9375rem/1 var(--font-score); letter-spacing: 0.02em; color: var(--tp-muted); }
.mp-br-r { display: flex; align-items: center; gap: 8px; height: 44px; }
.mp-br-n { flex: 1; min-width: 0; font: 500 0.9375rem/1 var(--tp-font); color: var(--tp-ink); white-space: normal; overflow-wrap: anywhere; }
.mp-br-s { margin-left: auto; font: 600 min(1.5rem, 56px)/1 var(--font-score); color: var(--tp-brand-ink); white-space: nowrap; }
.mp-bo { margin-right: 9px; font-size: min(1.25rem, 56px); color: var(--mp-old); text-decoration: line-through; text-decoration-thickness: 2px; }
.mp-br-r.is-lo .mp-br-n, .mp-br-r.is-lo .mp-br-s { color: #a3adbf; }
.mp-br-r.is-w { margin: 0 -6px; padding: 0 6px; border-radius: 12px; background: var(--tp-optic-soft); }
.mp-bm.is-bad { box-shadow: 0 0 0 3px var(--td-down); }
.mp-bm.is-bad .mp-br-r { opacity: 0.5; }
.mp-tag { display: inline-grid; place-items: center; min-height: 22px; padding: 0 8px; border-radius: 11px; background: var(--td-down); color: #fff; font: 600 0.75rem/1 var(--tp-font); letter-spacing: 0; }
.mp-warn { margin-top: 18px; padding: 6px 16px; border-radius: 22px; background: var(--td-down-bg); }
.mp-warn p { display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 0; font: 600 1rem/1.2 var(--tp-font); color: var(--td-down); }
.mp-warn p + p { border-top: 1px solid rgba(191, 58, 48, 0.15); }
.mp-warn p.is-ink { font-weight: 500; color: var(--tp-ink2); }

@media (min-width: 1100px) {
  .mp { max-width: 560px; margin: 0 auto; }
}

/* Large text (W7): the side's photos over its names, the games beside them. */
html.tp-tight .mp-r { flex-wrap: wrap; row-gap: 6px; padding: 8px 0; }
html.tp-tight .mp-r > .mp-nm { flex: 1 0 100%; order: 3; }
html.tp-tight .mp-r > .mp-g { margin-left: auto; }
html.tp-huge .mp-g { font-size: min(4.5rem, 72px); }
html.tp-tight .mp-whos { grid-template-columns: 1fr; }
html.tp-tight .mp-tl-r.is-words { flex-wrap: wrap; gap: 4px; }
html.tp-tight .mp-mid { position: static; transform: none; white-space: normal; }
