.tcmh-sofa {
  --tc-bg: #f1f2fa;
  --tc-surface: #ffffff;
  --tc-surface-2: #f6f7fd;
  --tc-ink: #15162b;
  --tc-ink-2: #545977;
  --tc-muted: #979dbb;
  --tc-line: #e9ebf7;
  /* Đã bỏ tím (#4a2ddf/#7f5bf7) — dùng xám than trung tính làm accent.
     Chọn tông này (không phải đen tuyệt đối) để vẫn nổi được trên cả nền
     trắng (light) lẫn nền xanh than tối (dark) mà không cần đổi riêng từng chỗ. */
  --tc-brand: #34364f;
  --tc-brand-2: #4b4e6c;
  --tc-brand-soft: #f0f1f6;
  --tc-live: #ff2d55;
  --tc-win: #10b981;
  --tc-r-lg: 22px;
  --tc-r-md: 16px;
  --tc-r-sm: 12px;
  --tc-shadow: 0 2px 4px rgba(24, 26, 63, .04), 0 12px 28px -12px rgba(24, 26, 63, .16);
  --tc-shadow-sm: 0 1px 2px rgba(24, 26, 63, .05), 0 6px 16px -10px rgba(24, 26, 63, .2);

  box-sizing: border-box;
  padding: 16px;
  background: var(--tc-bg);
  border-radius: var(--tc-r-lg);
  color: var(--tc-ink);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.tcmh-sofa[data-theme="dark"] {
  --tc-bg: #0e0f1c;
  --tc-surface: #181a2e;
  --tc-surface-2: #1f2138;
  --tc-ink: #f4f5ff;
  --tc-ink-2: #b0b5d6;
  --tc-muted: #767c9e;
  --tc-line: #262943;
  --tc-brand-soft: #262943;
  --tc-shadow: 0 12px 28px -14px rgba(0, 0, 0, .7);
  --tc-shadow-sm: 0 6px 16px -10px rgba(0, 0, 0, .7);
}


.tcmh-sofa[data-theme="dark"] .tcmh-segment__btn[data-count]::after,
.tcmh-sofa[data-theme="dark"] .tcmh-match__soon {
  color: var(--tc-ink);
}

.tcmh-sofa *,
.tcmh-sofa *::before,
.tcmh-sofa *::after { box-sizing: inherit; }

.tcmh-sofa img { max-width: none; }

.tcmh-sofa button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

.tcmh-sofa :focus-visible {
  outline: 2px solid var(--tc-brand);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ---------- Thanh tiêu đề ---------- */

.tcmh-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.tcmh-topbar__eyebrow {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--tc-muted);
}

.tcmh-topbar__title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--tc-ink);
}

.tcmh-topbar--compact .tcmh-topbar__title { font-size: 16px; }

.tcmh-refresh {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--tc-surface);
  box-shadow: var(--tc-shadow-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--tc-ink-2);
  white-space: nowrap;
}

.tcmh-refresh__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tc-win);
  flex: none;
}

.tcmh-refresh.is-busy .tcmh-refresh__dot { background: var(--tc-brand-2); animation: tcmh-pulse 1s infinite; }

.tcmh-chip {
  padding: 8px 20px;
  border-radius: 5px;
  background: var(--tc-surface);
  font-size: 11px;
  font-weight: 600;
  color: var(--tc-muted);
}

/* ---------- Dải ngày ---------- */

.tcmh-dates {
  justify-content: center;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.tcmh-dates::-webkit-scrollbar { display: none; }

.tcmh-date {
  flex: none;
  min-width: 58px;
  padding: 9px 10px;
  border-radius: var(--tc-r-md);
  background: var(--tc-surface);
  box-shadow: var(--tc-shadow-sm);
  text-align: center;
  scroll-snap-align: center;
  transition: transform .18s ease, box-shadow .18s ease;
}

.tcmh-date:hover { transform: translateY(-1px); }

.tcmh-date__dow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tc-muted);
}

.tcmh-date__day {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--tc-ink);
}

.tcmh-date__mark {
  display: block;
  width: 5px;
  height: 5px;
  margin: 4px auto 0;
  border-radius: 50%;
  background: var(--tc-live);
  opacity: 0;
}

.tcmh-date.has-live .tcmh-date__mark { opacity: 1; }

.tcmh-date.is-active {
  background: linear-gradient(140deg, var(--tc-brand) 0%, var(--tc-brand-2) 100%);
  box-shadow: 0 10px 20px -10px var(--tc-brand);
}

.tcmh-date.is-active .tcmh-date__dow { color: rgba(255, 255, 255, .78); }
.tcmh-date.is-active .tcmh-date__day { color: #fff; }
.tcmh-date.is-active .tcmh-date__mark { background: #fff; }

/* ---------- Tab phân đoạn ---------- */

.tcmh-segment {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--tc-surface-2);
  border: 1px solid var(--tc-line);
}

.tcmh-segment__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 6px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--tc-ink-2);
  margin: 0 !important;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.tcmh-segment__btn.is-active {
  background: var(--tc-surface);
  color: var(--tc-brand);
  box-shadow: var(--tc-shadow-sm);
}

.tcmh-segment__btn[data-count]::after {
  content: attr(data-count);
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--tc-brand-soft);
  color: var(--tc-brand);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 17px;
}

.tcmh-segment__btn[data-tab="live"][data-count]::after {
  background: rgba(255, 45, 85, .12);
  color: var(--tc-live);
}

/* ---------- Khối giải đấu ---------- */

.tcmh-body { display: flex; flex-direction: column; gap: 12px; }

.tcmh-league {
  background: var(--tc-surface);
  border-radius: var(--tc-r-lg);
  box-shadow: var(--tc-shadow);
  overflow: hidden;
}

.tcmh-league__head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
}

.tcmh-league__logo {
  width: 34px;
  height: 34px;
  flex: none;
  padding: 5px;
  border-radius: 11px;
  background: var(--tc-surface-2);
  object-fit: contain;
}

.tcmh-league__text { flex: 1; min-width: 0; }

.tcmh-league__name {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--tc-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tcmh-league__meta {
  display: block;
  font-size: 11.5px;
  color: var(--tc-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tcmh-league__count {
  flex: none;
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--tc-surface-2);
  font-size: 11px;
  font-weight: 700;
  color: var(--tc-ink-2);
  text-align: center;
}

.tcmh-league__caret {
  flex: none;
  width: 16px;
  color: var(--tc-muted);
  transition: transform .2s ease;
}

.tcmh-league.is-collapsed .tcmh-league__caret { transform: rotate(-90deg); }
.tcmh-league.is-collapsed .tcmh-league__list { display: none; }

.tcmh-league.is-vn { box-shadow: var(--tc-shadow), inset 3px 0 0 var(--tc-brand); }

.tcmh-group {
  padding: 8px 14px 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--tc-muted);
}

/* ---------- Dòng trận ---------- */

.tcmh-match {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-top: 1px solid var(--tc-line);
  text-align: left;
  transition: background .15s ease;
}

.tcmh-league__list > .tcmh-match:first-child,
.tcmh-group + .tcmh-match { border-top: 0; }

.tcmh-match:hover { background: var(--tc-surface-2); }

.tcmh-match__when {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.tcmh-match__time {
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--tc-ink);
}

.tcmh-match__date {
  font-size: 10.5px;
  color: var(--tc-muted);
  font-variant-numeric: tabular-nums;
}

.tcmh-match__live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 45, 85, .1);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--tc-live);
}

.tcmh-match__live::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tc-live);
  animation: tcmh-pulse 1.4s infinite;
}

.tcmh-match__teams { min-width: 0; display: grid; gap: 6px; }

.tcmh-team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tcmh-team__logo {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  object-fit: contain;
  background: var(--tc-surface-2);
}

.tcmh-team__name {
  font-size: 13px;
  color: var(--tc-ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tcmh-team.is-winner .tcmh-team__name { color: var(--tc-ink); font-weight: 700; }

.tcmh-match__score { display: grid; gap: 6px; justify-items: end; }

.tcmh-score {
  min-width: 26px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 8px;
  background: var(--tc-surface-2);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--tc-ink-2);
}

.tcmh-score.is-winner { background: var(--tc-brand); color: #fff; }
.tcmh-match.is-live .tcmh-score.is-winner { background: var(--tc-live); }

.tcmh-match__soon {
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--tc-brand-soft);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--tc-brand);
}

/* ---------- Trạng thái rỗng / skeleton ---------- */

.tcmh-empty {
  padding: 34px 18px;
  border-radius: var(--tc-r-lg);
  background: var(--tc-surface);
  box-shadow: var(--tc-shadow-sm);
  text-align: center;
  color: var(--tc-muted);
}

.tcmh-empty strong { display: block; margin-bottom: 4px; color: var(--tc-ink); font-size: 15px; }

.tcmh-skeleton { display: grid; gap: 12px; }

.tcmh-skeleton span {
  display: block;
  height: 78px;
  border-radius: var(--tc-r-lg);
  background: linear-gradient(100deg, var(--tc-surface) 30%, var(--tc-surface-2) 50%, var(--tc-surface) 70%);
  background-size: 220% 100%;
  animation: tcmh-shimmer 1.3s infinite linear;
}

/* ---------- Bottom sheet chi tiết ---------- */

.tcmh-sheet {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(14, 15, 28, .5);
  backdrop-filter: blur(3px);
  animation: tcmh-fade .2s ease;
  border-radius: 0 !important;
}

.tcmh-sheet[hidden] { display: none; }

.tcmh-sheet__panel {
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 5px;
  background: var(--tc-bg);
  animation: tcmh-rise .26s cubic-bezier(.22, 1, .36, 1);
  margin: auto 0;
}

.tcmh-sheet__hero {
  position: relative;
  padding: 14px 18px 18px;
  background: linear-gradient(145deg, var(--tc-brand) 0%, var(--tc-brand-2) 100%);
  color: #fff;
}

.tcmh-sheet__grip {
  width: 38px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .4);
}

.tcmh-sheet__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 16px;
  line-height: 1;
}

.tcmh-sheet__league {
  margin: 0 0 14px;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  color: rgba(255, 255, 255, .8);
}

.tcmh-sheet__score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.tcmh-sheet__team { text-align: center; min-width: 0; }

.tcmh-sheet__team img {
  width: 52px;
  height: 52px;
  margin: 0 auto 7px;
  display: block;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255, 255, 255, .92);
  padding: 5px;
}

.tcmh-sheet__team span {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.tcmh-sheet__nums {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.tcmh-sheet__nums em { font-style: normal; opacity: .5; font-size: 22px; }

.tcmh-sheet__state {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(255, 255, 255, .82);
}

.tcmh-sheet__tabs {
  display: flex;
  gap: 6px;
  padding: 12px 14px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tcmh-sheet__tabs::-webkit-scrollbar { display: none; }

.tcmh-sheet__tab {
  flex: none;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--tc-surface);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--tc-ink-2);
  white-space: nowrap;
}

.tcmh-sheet__tab.is-active { background: var(--tc-brand); color: #fff; }

.tcmh-sheet__body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px 24px;
  -webkit-overflow-scrolling: touch;
}

.tcmh-sheet__body::-webkit-scrollbar {
    display: none;
}


.tcmh-card {
  padding: 14px;
  margin-bottom: 10px;
  border-radius: var(--tc-r-lg);
  background: var(--tc-surface);
  box-shadow: var(--tc-shadow-sm);
}

.tcmh-card__title {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--tc-muted);
}

/* bảng set */
.tcmh-sets { display: grid; gap: 7px; }

.tcmh-set {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.tcmh-set__no { color: var(--tc-muted); font-weight: 700; font-size: 11.5px; }

.tcmh-set__bar {
  height: 6px;
  border-radius: 999px;
  background: var(--tc-surface-2);
  overflow: hidden;
}

.tcmh-set__fill { display: block; height: 100%; border-radius: 999px; background: var(--tc-brand); }

.tcmh-set__pts { font-weight: 800; font-variant-numeric: tabular-nums; }
.tcmh-set__pts b { color: var(--tc-brand); }

/* vote */
.tcmh-vote__bar {
  display: flex;
  height: 30px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--tc-surface-2);
}

.tcmh-vote__seg {
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  min-width: 34px;
}

.tcmh-vote__seg--home { background: var(--tc-brand); }
.tcmh-vote__seg--away { background: #c7c9e6; color: var(--tc-ink-2); }

.tcmh-vote__legend {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--tc-muted);
}

/* thống kê */
.tcmh-stat { display: grid; gap: 4px; margin-bottom: 11px; }
.tcmh-stat:last-child { margin-bottom: 0; }

.tcmh-stat__row {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tcmh-stat__label { text-align: center; font-weight: 600; color: var(--tc-muted); font-size: 11.5px; }
.tcmh-stat__row span:last-child { text-align: right; }

.tcmh-stat__track { display: flex; gap: 4px; height: 5px; }
.tcmh-stat__track i { display: block; height: 100%; border-radius: 999px; background: var(--tc-surface-2); }
.tcmh-stat__track i:first-child { background: var(--tc-brand); }
.tcmh-stat__track i:last-child { background: #c7c9e6; }

/* bảng xếp hạng + h2h */
.tcmh-rank { display: grid; gap: 6px; }

.tcmh-rank__row {
  display: grid;
  grid-template-columns: 22px 24px 1fr auto auto;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--tc-surface-2);
  font-size: 12.5px;
}

.tcmh-rank__row img { width: 22px; height: 22px; border-radius: 50%; object-fit: contain; }
.tcmh-rank__pos { font-weight: 800; color: var(--tc-muted); text-align: center; }
.tcmh-rank__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcmh-rank__pts { font-weight: 800; }

.tcmh-form { display: flex; gap: 3px; }

.tcmh-form i {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  font-style: normal;
  font-size: 9.5px;
  font-weight: 800;
  color: #fff;
  background: var(--tc-muted);
}

.tcmh-form i[data-r="W"] { background: var(--tc-win); }
.tcmh-form i[data-r="L"] { background: var(--tc-live); }

.tcmh-h2h { display: grid; gap: 6px; }

.tcmh-h2h__row {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 10px;
  background: var(--tc-surface-2);
  font-size: 12.5px;
}

.tcmh-h2h__date { font-size: 11px; color: var(--tc-muted); font-variant-numeric: tabular-nums; }
.tcmh-h2h__teams { display: grid; gap: 3px; min-width: 0; }
.tcmh-h2h__teams span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcmh-h2h__sets { display: grid; gap: 3px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }

.tcmh-kv { display: grid; gap: 8px; }

.tcmh-kv__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
}

.tcmh-kv__row dt { color: var(--tc-muted); }
.tcmh-kv__row dd { margin: 0; font-weight: 700; text-align: right; }

.tcmh-note {
  padding: 22px 14px;
  text-align: center;
  font-size: 13px;
  color: var(--tc-muted);
}

/* ---------- Widget sidebar ---------- */

.tcmh-sofa--widget { padding: 14px; }
.tcmh-sofa--widget .tcmh-match { grid-template-columns: 46px 1fr auto; padding: 9px 12px; }
.tcmh-sofa--widget .tcmh-league__head { padding: 10px 12px; }

/* ---------- Animation ---------- */

@keyframes tcmh-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes tcmh-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes tcmh-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tcmh-rise { from { transform: translateY(24px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .tcmh-sofa *,
  .tcmh-sheet * { animation: none !important; transition: none !important; }
}

/* ---------- Sơ đồ thế trận (ApexCharts) ---------- */

.tcmh-momentum {
  position: relative;
  width: 100%;
}

.tcmh-momentum__legend {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: var(--tc-muted);
}

.tcmh-momentum__scale {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--tc-muted);
}

.tcmh-momentum__hint {
  margin: 8px 2px 0;
  font-size: 11px;
  color: var(--tc-muted);
  text-align: center;
}

/* ---------- Màn hình nhỏ (điện thoại) ---------- */

@media (max-width: 480px) {
  .tcmh-sofa { padding: 12px; border-radius: var(--tc-r-md); font-size: 13px; }

  .tcmh-topbar { margin-bottom: 10px; gap: 8px; }
  .tcmh-topbar__title { font-size: 17px; }
  .tcmh-refresh { padding: 6px 10px; font-size: 11px; }
  .tcmh-refresh__dot { width: 6px; height: 6px; }

  .tcmh-dates { gap: 6px; padding: 2px 2px 8px; }
  .tcmh-date { min-width: 48px; padding: 7px 8px; }
  .tcmh-date__day { font-size: 13px; }

  .tcmh-segment { margin-bottom: 10px; }
  .tcmh-segment__btn { padding: 7px 4px; font-size: 11.5px; gap: 3px; margin: 0 !important; }
  .tcmh-segment__btn[data-count]::after { display: none; } /* số đếm chật, ẩn trên mobile */

  .tcmh-league__head { padding: 10px 12px; gap: 8px; }
  .tcmh-league__logo { width: 26px; height: 26px; }
  .tcmh-league__name { font-size: 13px; }
  .tcmh-league__meta { font-size: 10.5px; }

  .tcmh-match { grid-template-columns: 40px 1fr auto; padding: 9px 10px; gap: 6px; }
  .tcmh-match__when { font-size: 10.5px; }
  .tcmh-team__logo { width: 20px; height: 20px; }
  .tcmh-team__name { font-size: 12.5px; max-width: 34vw; }
  .tcmh-score { min-width: 22px; height: 22px; font-size: 11.5px; }

  /* bottom sheet chiếm gần hết màn hình, dễ bấm hơn trên điện thoại */
  .tcmh-sheet__panel { max-height: 96vh; border-radius: 5px; }
  .tcmh-sheet__hero { padding: 12px 14px 14px; }
  .tcmh-sheet__score { gap: 8px; }
  .tcmh-sheet__team img { width: 34px; height: 34px; }
  .tcmh-sheet__team span { font-size: 11.5px; max-width: 22vw; }
  .tcmh-sheet__nums { font-size: 26px; }
  .tcmh-sheet__tabs { padding: 8px 10px; gap: 6px; }
  .tcmh-sheet__tab { padding: 6px 10px; font-size: 11.5px; }
  .tcmh-sheet__body { padding: 8px 10px 20px; }
  .tcmh-card { padding: 11px; }
}

/* ---------- Màn hình lớn ---------- */

@media (min-width: 600px) {
  .tcmh-sofa { padding: 20px; }
  .tcmh-match { grid-template-columns: 62px 1fr auto; padding: 12px 18px; }
  .tcmh-league__head { padding: 14px 18px; }
  .tcmh-group { padding: 10px 18px 2px; }
  .tcmh-sheet { align-items: center; padding: 24px; }
  .tcmh-sheet__panel { border-radius: 5px; max-height: 86vh; }
}

/* ---------- diễn biến từng điểm ---------- */

.tcmh-pbp__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tcmh-pbp__chip {
  padding: 5px 12px;
  border: 1px solid var(--tc-line);
  border-radius: 999px;
  background: var(--tc-surface);
  color: var(--tc-ink-2);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.tcmh-pbp__chip:hover { border-color: var(--tc-brand); }

.tcmh-pbp__chip.is-active {
  background: var(--tc-brand);
  border-color: var(--tc-brand);
  color: #fff;
}

.tcmh-pbp {
  margin: 0 -6px;
}

.tcmh-pbp__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.tcmh-pbp__stats > div {
  padding: 10px 8px;
  border-radius: var(--tc-r-sm);
  background: var(--tc-surface-2);
  text-align: center;
}

.tcmh-pbp__stats b {
  display: block;
  color: var(--tc-ink);
  font-size: 18px;
  line-height: 1.2;
}

.tcmh-pbp__stats span {
  display: block;
  margin-top: 2px;
  color: var(--tc-muted);
  font-size: 11px;
}

.tcmh-pbp__tip {
  padding: 6px 10px;
  font-size: 12px;
}

.tcmh-pbp__tip b { display: block; color: var(--tc-ink); }
.tcmh-pbp__tip span { color: var(--tc-muted); font-size: 11px; }

@media (max-width: 480px) {
  .tcmh-pbp__stats b { font-size: 16px; }
}

/* =========================================================
   Bổ sung v2.3: nhóm theo ngày, sidebar giải đấu, nhấn mạnh VN
   ========================================================= */

/* ---------- Nhóm trận theo ngày (type = upcoming/live/finished) ---------- */

.tcmh-daygroup { margin-bottom: 18px; }
.tcmh-daygroup:last-of-type { margin-bottom: 0; }

.tcmh-daygroup__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 4px 8px;
}

.tcmh-daygroup__rel {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .01em;
  color: var(--tc-ink);
}

.tcmh-daygroup__date {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--tc-muted);
}

.tcmh-more {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 11px 14px;
  border-radius: var(--tc-r-md);
  background: var(--tc-surface);
  box-shadow: var(--tc-shadow-sm);
  color: var(--tc-ink-2);
  font-size: 13px;
  font-weight: 600;
  transition: color .16s ease, transform .16s ease;
}

.tcmh-more:hover { color: var(--tc-ink); transform: translateY(-1px); }

/* ---------- Nhấn mạnh trận / giải có Việt Nam ---------- */

.tcmh-match.is-vn .tcmh-team__name { font-weight: 700; }

.tcmh-league.is-target {
  box-shadow: var(--tc-shadow), 0 0 0 2px var(--tc-brand);
  animation: tcmh-fade .3s ease;
}

/* ---------- Sidebar giải đấu ---------- */

.tcmh-sofa--leagues { padding: 14px; }
.tcmh-sofa--leagues .tcmh-topbar { margin-bottom: 10px; }
.tcmh-sofa--leagues .tcmh-topbar__title { font-size: 15px; }

.tcmh-lglist {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tcmh-lg {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--tc-r-sm);
  background: var(--tc-surface);
  text-align: left;
  box-shadow: var(--tc-shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease;
}

.tcmh-lg:hover { transform: translateX(2px); }
.tcmh-lg.is-active { box-shadow: var(--tc-shadow-sm), inset 3px 0 0 var(--tc-brand); }
.tcmh-lg.is-vn { box-shadow: var(--tc-shadow-sm), inset 3px 0 0 var(--tc-live); }

.tcmh-lg__logo {
  flex: none;
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--tc-surface-2);
}

.tcmh-lg__text { flex: 1; min-width: 0; }

.tcmh-lg__name {
  display: block;
  overflow: hidden;
  color: var(--tc-ink);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tcmh-lg__meta {
  display: block;
  overflow: hidden;
  color: var(--tc-muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tcmh-lg__count,
.tcmh-lg__live {
  flex: none;
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.tcmh-lg__count { background: var(--tc-brand-soft); color: var(--tc-ink-2); }
.tcmh-lg__live { background: var(--tc-live); color: #fff; animation: tcmh-pulse 1.6s ease-in-out infinite; }

@media (max-width: 640px) {
  .tcmh-sofa--leagues { padding: 12px; }
  .tcmh-lg { padding: 7px 9px; }
  .tcmh-lg__logo { width: 22px; height: 22px; }
}

/* ==========================================================================
   v2.4.0 — URL riêng cho giải/ngày, lọc theo giải, ô tìm giải
   ========================================================================== */

.tcmh-sofa a { color: inherit; text-decoration: none; }

/* Đầu khối giải giờ là <div role="button"> để đặt được thẻ h3 bên trong */
.tcmh-league__head { cursor: pointer; user-select: none; }

.tcmh-league__name { margin: 0; line-height: 1.35; }

.tcmh-league__more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--tc-line);
  background: var(--tc-surface-2);
  color: var(--tc-brand);
  font-size: 12.5px;
  font-weight: 700;
}

.tcmh-league__more:hover { background: var(--tc-brand-soft); }
.tcmh-league__more-arrow { flex: none; font-size: 17px; line-height: 1; }

.tcmh-topbar__lead {
  margin: -4px 0 14px;
  color: var(--tc-ink-2);
  font-size: 13px;
  line-height: 1.65;
}

.tcmh-filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 8px 8px 8px 14px;
  border-radius: var(--tc-r-md);
  background: var(--tc-brand-soft);
}

.tcmh-filterbar[hidden] { display: none; }

.tcmh-filterbar__tag {
  min-width: 0;
  overflow: hidden;
  color: var(--tc-ink-2);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tcmh-filterbar__tag b { color: var(--tc-ink); }

.tcmh-filterbar__clear {
  flex: none;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--tc-surface);
  box-shadow: var(--tc-shadow-sm);
  color: var(--tc-ink-2);
  font-size: 12px;
  font-weight: 700;
}

.tcmh-lgsearch { position: relative; margin-bottom: 10px; }

.tcmh-lgsearch__input {
  width: 100%;
  padding: 9px 12px 9px 32px;
  border: 1px solid var(--tc-line);
  border-radius: var(--tc-r-md);
  background: var(--tc-surface);
  color: var(--tc-ink);
  font: inherit;
  font-size: 13px;
}

.tcmh-lgsearch__input::placeholder { color: var(--tc-muted); }

.tcmh-lgsearch__icon {
  position: absolute;
  top: 36%;
  right: 10px;
  width: 15px;
  height: 15px;
  color: var(--tc-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.tcmh-lg__logo--all {
  display: block;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 6px;
  background: var(--tc-brand-soft);
}

.tcmh-lg--all.is-active { box-shadow: var(--tc-shadow-sm), inset 3px 0 0 var(--tc-brand); }

/* ---------- sân đấu trực tiếp (tab "Sân đấu") ---------- */

.tcmh-court {
  --tc-court: #1f8a5a;
  --tc-court-2: #17734b;
  display: grid;
  gap: 10px;
}

.tcmh-court__top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--tc-ink-2);
}

.tcmh-court__set {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--tc-brand-soft);
  color: var(--tc-ink);
  font-weight: 700;
}

.tcmh-court__live,
.tcmh-court__done {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.tcmh-court__live {
  background: rgba(255, 45, 85, .12);
  color: var(--tc-live);
}

.tcmh-court__live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tc-live);
  animation: tcmh-court-blink 1.2s infinite;
}

.tcmh-court__done {
  background: var(--tc-brand-soft);
  color: var(--tc-ink-2);
}

.tcmh-court__stamp {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--tc-muted);
}

.tcmh-court__banner {
  margin: 0;
  padding: 8px 12px;
  border-radius: var(--tc-r-sm);
  background: rgba(255, 45, 85, .1);
  color: var(--tc-live);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
  text-align: center;
  animation: tcmh-court-blink 1.4s infinite;
}

.tcmh-court__banner.is-match {
  background: var(--tc-live);
  color: #fff;
}

.tcmh-court__stage {
  position: relative;
  aspect-ratio: 320 / 150;
  border-radius: var(--tc-r-md);
  overflow: hidden;
}

.tcmh-court__svg {
  display: block;
  width: 100%;
  height: 100%;
}

.tcmh-court__floor { fill: var(--tc-court); }

.tcmh-court__half {
  fill: var(--tc-court-2);
  stroke: rgba(255, 255, 255, .55);
  stroke-width: 1.6;
}

.tcmh-court__attack {
  stroke: rgba(255, 255, 255, .4);
  stroke-width: 1.2;
  stroke-dasharray: 4 4;
}

.tcmh-court__net {
  stroke: #fff;
  stroke-width: 2.4;
  stroke-dasharray: 3 3;
}

.tcmh-court__tag {
  position: absolute;
  top: 8px;
  max-width: 42%;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tcmh-court__tag--home { left: 8px; }
.tcmh-court__tag--away { right: 8px; }

.tcmh-court__tag.is-serving {
  background: #fff;
  color: #15162b;
}

/* Bóng gồm 2 lớp: lớp ngoài lo vị trí ngang (bên đang giao / vòng lặp qua lưới),
   lớp trong <i> lo cú nảy lên xuống — tách ra để 2 hiệu ứng không đè nhau. */
.tcmh-court__ball {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  transition: left .55s cubic-bezier(.35, .8, .3, 1);
}

.tcmh-court__ball i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff 0 42%, #ffd166 43% 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .35);
}

/* Trận đang đá: bóng qua lại qua lưới cho sinh động. Đây là hiệu ứng nền —
   dữ liệu thật (bên giao bóng, tỷ số, chuỗi điểm) nằm ở các lớp khác. */
.tcmh-court.is-rallying .tcmh-court__ball {
  animation: tcmh-court-rally 2.8s ease-in-out infinite;
}

.tcmh-court.is-rallying .tcmh-court__ball i {
  animation: tcmh-court-arc 1.4s ease-in-out infinite;
}

/* Vừa có điểm mới: dừng vòng lặp, bóng bật một cú rồi về bên vừa ghi điểm */
.tcmh-court.is-scored .tcmh-court__ball {
  animation: none;
  left: var(--tc-from, 50%);
}

.tcmh-court.is-scored .tcmh-court__ball i { animation: tcmh-court-hit .9s ease-out; }

.tcmh-court__score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.tcmh-court__score em {
  font-size: 20px;
  font-style: normal;
  color: var(--tc-muted);
}

.tcmh-court__score b { transition: color .3s; }
.tcmh-court__score b.is-serve { color: var(--tc-win); }

.tcmh-court.is-scored .tcmh-court__score b.is-serve { animation: tcmh-court-pop .7s ease-out; }

.tcmh-court__meta,
.tcmh-court__run {
  margin: 0;
  font-size: 12px;
  color: var(--tc-ink-2);
  text-align: center;
}

.tcmh-court__run {
  padding: 6px 10px;
  border-radius: var(--tc-r-sm);
  background: var(--tc-surface-2);
  font-weight: 700;
  color: var(--tc-ink);
}

@keyframes tcmh-court-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

@keyframes tcmh-court-hit {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-26px) scale(1.25); }
  70% { transform: translateY(4px) scale(.95); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes tcmh-court-rally {
  0% { left: var(--tc-from, 38%); }
  50% { left: var(--tc-to, 62%); }
  100% { left: var(--tc-from, 38%); }
}

@keyframes tcmh-court-arc {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-26px) scale(1.12); }
}

@keyframes tcmh-court-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .tcmh-court__ball { transition: none; }
  .tcmh-court.is-rallying .tcmh-court__ball,
  .tcmh-court.is-rallying .tcmh-court__ball i,
  .tcmh-court.is-scored .tcmh-court__ball i,
  .tcmh-court.is-scored .tcmh-court__score b.is-serve,
  .tcmh-court__live::before,
  .tcmh-court__banner { animation: none; }
}
/* ---------- ẩn tab không thuộc vai trò trang ----------
   .tcmh-segment__btn dùng display:inline-flex nên [hidden] mặc định không ăn. */
.tcmh-sofa [hidden] { display: none !important; }

/* ---------- nội dung SEO riêng của từng giải (dưới bảng trận) ---------- */
.tcmh-seo {
  margin: 18px 0 0;
  padding: 20px 22px;
  background: var(--tc-surface, #fff);
  border: 1px solid var(--tc-line, #e9ebf7);
  border-radius: var(--tc-r-lg, 22px);
  color: var(--tc-ink-2, #545977);
  font-size: 14.5px;
  line-height: 1.75;
}

.tcmh-seo > *:first-child { margin-top: 0; }
.tcmh-seo > *:last-child { margin-bottom: 0; }

.tcmh-seo h2,
.tcmh-seo h3,
.tcmh-seo h4 {
  margin: 22px 0 10px;
  color: var(--tc-ink, #15162b);
  font-weight: 800;
  line-height: 1.35;
}

.tcmh-seo h2 { font-size: 19px; }
.tcmh-seo h3 { font-size: 16.5px; }
.tcmh-seo h4 { font-size: 15px; }

.tcmh-seo p { margin: 0 0 12px; }

.tcmh-seo ul,
.tcmh-seo ol { margin: 0 0 12px; padding-left: 20px; }

.tcmh-seo li { margin: 0 0 6px; }

.tcmh-seo a {
  color: var(--tc-brand, #34364f);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tcmh-seo img { max-width: 100%; height: auto; border-radius: var(--tc-r-sm, 12px); }

.tcmh-seo table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 12px;
  font-size: 13.5px;
}

.tcmh-seo th,
.tcmh-seo td {
  padding: 8px 10px;
  border: 1px solid var(--tc-line, #e9ebf7);
  text-align: left;
}

.tcmh-seo th { background: var(--tc-surface-2, #f6f7fd); color: var(--tc-ink, #15162b); }

@media (max-width: 640px) {
  .tcmh-seo { padding: 16px; font-size: 14px; border-radius: var(--tc-r-md, 16px); }
  .tcmh-seo h2 { font-size: 17px; }
  .tcmh-seo h3 { font-size: 15.5px; }
}

.tcmh-url-con #panel__tochomepage { display: none !important; }