:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --bg-elev: #12171e;
  --bg-soft: #1a212b;
  --bg-row: #0f141b;
  --bg-hover: #171e28;
  --bg-head: #0d1218;
  --line: rgba(255, 255, 255, 0.06);
  --line-mid: rgba(255, 255, 255, 0.1);
  --text: #f2f4f7;
  --muted: #9aa3b2;
  --faint: #6b7382;
  --accent: #efc56a;
  --accent-hi: #f5d98a;
  --accent-dim: rgba(239, 197, 106, 0.12);
  --live: #2fd67b;
  --live-dim: rgba(47, 214, 123, 0.14);
  --live-red: #e53935;
  --live-red-hi: #ff4d4a;
  --stream: #e53935;
  --odds: #efc56a;
  --err: #ff6b7a;
  --err-dim: rgba(255, 107, 122, 0.14);
  --font: "Kanit", "Segoe UI", sans-serif;
  --font-display: "Chakra Petch", "Kanit", sans-serif;
  --pad: clamp(10px, 2vw, 22px);
  --gap: clamp(10px, 1.5vw, 16px);
  --r: 10px;
  --r-lg: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --col-time: 118px;
  --col-odds: 58px;
  --col-action: 84px;
  --row-gap: 10px;
  --row-pad-x: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100dvh;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  background: linear-gradient(180deg, #10151c 0%, var(--bg) 42%, #080b10 100%);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font-family: var(--font);
}

.app {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: calc(var(--pad) + var(--safe-top)) var(--pad) calc(var(--pad) + var(--safe-bottom));
  display: grid;
  gap: var(--gap);
}

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

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.topbar__mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #0d1117;
  box-shadow: 0 0 20px rgba(229, 57, 53, 0.22);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar__mark-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.topbar__tag {
  color: var(--faint);
  font-size: 0.74rem;
  font-weight: 500;
}

.topbar__aside {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.lang {
  position: relative;
  z-index: 40;
}

.lang__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 10px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-mid);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.lang__btn:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
}

.lang__flag {
  display: block;
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.lang__globe {
  font-size: 0.72rem;
  opacity: 0.75;
}

.lang__code {
  min-width: 1.6em;
  text-align: center;
}

.lang__caret {
  font-size: 0.65rem;
  opacity: 0.55;
}

.lang__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(280px, 78vw);
  max-height: min(70vh, 420px);
  overflow: auto;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--line-mid);
  background: #121820;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.lang__option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
}

.lang__option:hover,
.lang__option.is-active {
  background: rgba(255, 255, 255, 0.07);
}

.lang__option-name {
  flex: 1;
  min-width: 0;
}

.lang__option-code {
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.seo-world {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: var(--faint);
  font-size: 0.72rem;
  line-height: 1.55;
  word-break: break-word;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-mid);
  background: rgba(255, 255, 255, 0.03);
}

.status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 3px var(--live-dim);
}

.status.is-loading .status__dot {
  background: var(--accent);
  animation: pulse 1s var(--ease) infinite;
}

.status.is-error .status__dot {
  background: var(--err);
  animation: none;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.status__text {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
}

.btn {
  appearance: none;
  border: 1px solid var(--line-mid);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 999px;
  height: 38px;
  padding: 0 14px;
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
}

.btn:hover:not(:disabled) {
  border-color: rgba(240, 180, 41, 0.45);
  background: var(--accent-dim);
  color: var(--accent-hi);
}

.btn:disabled {
  opacity: 0.45;
  cursor: wait;
}

.btn--ghost,
.btn--soft {
  background: transparent;
}

.btn--soft {
  height: 32px;
  padding: 0 10px;
}

.btn--watch {
  height: 32px;
  min-width: 74px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btn--watch:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.btn--watch.is-active {
  background: var(--live-red);
  border-color: var(--live-red);
  color: #fff;
}

.btn.ok {
  color: var(--live);
  background: var(--live-dim);
}

.btn:focus-visible,
.chip:focus-visible,
.sports__btn:focus-visible,
.search input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.banner {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--err-dim);
  border: 1px solid color-mix(in srgb, var(--err) 35%, transparent);
  color: #fecdd3;
}

.player {
  border: 1px solid var(--line-mid);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(229, 57, 53, 0.08), transparent 40%),
    var(--bg-elev);
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 30;
}

.player[hidden] {
  display: none;
}

.player.is-playing {
  position: sticky;
  top: 0;
}

.player__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
}

.player__info {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.player__meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.player__badge {
  flex-shrink: 0;
  margin-top: 2px;
  width: fit-content;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #e53935, #ff7043);
  border-radius: 999px;
  padding: 4px 9px;
  box-shadow: 0 0 16px rgba(229, 57, 53, 0.35);
  animation: live-pulse 1.6s ease-in-out infinite;
}

@keyframes live-pulse {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(229, 57, 53, 0.25);
  }
  50% {
    box-shadow: 0 0 20px rgba(229, 57, 53, 0.55);
  }
}

.player__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.player__lock {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 500;
}

.player__lock-ico {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border-radius: 3px;
  background:
    linear-gradient(180deg, #efc56a 40%, #efc56a 40%) center 2px / 7px 5px no-repeat,
    radial-gradient(circle at 50% 65%, transparent 35%, #9aa3b2 36% 70%, transparent 71%);
  box-shadow: inset 0 0 0 1.5px #9aa3b2;
}

.player__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timing {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
}

.timing__item {
  display: grid;
  gap: 1px;
  min-width: 70px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

.timing__k {
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.timing__v {
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.timing__v.is-live {
  color: var(--accent-hi);
}

.timing__v.is-done {
  color: var(--live);
}

.player__body {
  background: #000;
}

.screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(56vh, 620px);
  background: #000;
  user-select: none;
  -webkit-user-select: none;
}

.screen__idle {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 6px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(229, 57, 53, 0.12), transparent 50%),
    #10141c;
  z-index: 1;
}

.screen__idle-brand {
  margin: 0;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
}

.screen__idle-copy {
  margin: 0;
  color: var(--muted);
}

.screen__shield {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      -18deg,
      transparent 0 48px,
      rgba(255, 255, 255, 0.015) 48px 49px
    );
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.screen.is-active .screen__shield {
  opacity: 1;
}

.screen__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  position: relative;
  z-index: 2;
}

.screen__video::-webkit-media-controls-download-button {
  display: none !important;
}

.screen__watermark {
  position: absolute;
  right: 14px;
  bottom: 42px;
  z-index: 4;
  pointer-events: none;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.28);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.screen.is-active .screen__watermark {
  opacity: 1;
  animation: wm-drift 12s ease-in-out infinite alternate;
}

@keyframes wm-drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-24px, -18px);
  }
}

.screen.is-active .screen__idle {
  display: none;
}

.board {
  display: grid;
  gap: 12px;
}

.board__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.board__intro {
  min-width: 0;
  flex: 1 1 auto;
}

.board__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.board__summary {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.search {
  position: relative;
  min-width: min(260px, 100%);
  flex: 1 1 200px;
  max-width: 300px;
}

.search__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
}

.search input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line-mid);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text);
  padding: 0 14px 0 32px;
}

.toolbar {
  display: grid;
  gap: 8px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  appearance: none;
  border: 1px solid var(--line-mid);
  background: var(--bg-elev);
  color: var(--muted);
  border-radius: 999px;
  height: 38px;
  padding: 0 12px;
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chip.is-active {
  color: var(--accent-hi);
  border-color: rgba(239, 197, 106, 0.45);
  background: var(--accent-dim);
}

.chip--live.is-active {
  color: #fff;
  border-color: var(--live-red);
  background: var(--live-red);
}

.chip--live.is-active .chip__count {
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
}

.chip__count {
  min-width: 1.4em;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  display: inline-grid;
  place-items: center;
}

.sports {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  overflow: visible;
  padding-bottom: 2px;
  align-items: stretch;
}

.sports--global {
  margin: 0 0 4px;
  padding: 4px 0 8px;
  border-bottom: 1px solid var(--line);
}

.sports__btn {
  appearance: none;
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 72px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 10px;
  height: 58px;
  padding: 6px 10px;
  font-weight: 500;
  font-size: 0.68rem;
  line-height: 1.1;
  cursor: pointer;
}

.sports__btn--more {
  position: relative;
  min-width: 78px;
  padding-right: 14px;
}

.sports__chevron {
  position: absolute;
  right: 5px;
  top: 8px;
  font-size: 0.55rem;
  opacity: 0.7;
  line-height: 1;
}

.sports__icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.85;
  filter: brightness(0) invert(0.72);
}

.sports__icon--glyph {
  display: inline-grid;
  place-items: center;
  filter: none;
  color: inherit;
  opacity: 0.85;
}

.sports__label {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sports__btn.is-active {
  color: #fff;
  background: rgba(229, 57, 53, 0.16);
  border-color: rgba(229, 57, 53, 0.45);
  font-weight: 700;
}

.sports__btn.is-active .sports__icon {
  opacity: 1;
  filter: none;
}

.sports__btn.is-active .sports__icon--glyph {
  opacity: 1;
  color: #fff;
}

.sports__more {
  position: relative;
  flex: 0 0 auto;
}

.sports__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  min-width: 280px;
  max-width: min(360px, calc(100vw - 24px));
  max-height: min(320px, 50vh);
  overflow-y: auto;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elev) 96%, #000);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.sports__menu[hidden] {
  display: none !important;
}

/* Portaled above the bottom dock (escapes overflow / backdrop-filter clipping) */
.sports__menu.sports__menu--portal {
  position: fixed !important;
  left: 10px;
  right: 10px;
  bottom: calc(var(--dock-h, 58px) + var(--safe-bottom) + 12px);
  top: auto;
  z-index: 400;
  min-width: 0;
  max-width: none;
  width: auto;
  max-height: min(48vh, 340px);
  display: grid;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 23, 30, 0.98);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

.sports__menu.sports__menu--portal[hidden] {
  display: none !important;
}

.sports__menu-item {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
}

.sports__menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sports__menu-item.is-active {
  color: #fff;
  background: rgba(229, 57, 53, 0.16);
  border-color: rgba(229, 57, 53, 0.45);
  font-weight: 700;
}

.sports__menu-item .sports__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.sports__menu-item.is-active .sports__icon {
  opacity: 1;
  filter: none;
}

.sports__more.is-open .sports__chevron {
  transform: rotate(180deg);
}

.groups {
  display: grid;
  gap: 12px;
}

.group {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}

.group__head {
  display: grid;
  grid-template-columns: var(--col-time) minmax(0, 1fr) var(--col-odds) var(--col-action);
  gap: var(--row-gap);
  align-items: center;
  padding: 10px var(--row-pad-x);
  background: var(--bg-head);
  border-bottom: 1px solid var(--line);
}

.group__league {
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--muted);
}

.group__logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 3px;
  flex-shrink: 0;
}

.group__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group__odds-label {
  text-align: center;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.group__action-spacer {
  display: block;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.row {
  display: grid;
  grid-template-columns: var(--col-time) minmax(0, 1fr) var(--col-odds) var(--col-action);
  gap: var(--row-gap);
  align-items: center;
  padding: 11px var(--row-pad-x);
  border-bottom: 1px solid var(--line);
  background: var(--bg-row);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.row:last-child {
  border-bottom: 0;
}

.row:hover {
  background: var(--bg-hover);
}

.row.is-active {
  background: rgba(229, 57, 53, 0.08);
}

.row__time {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
  min-width: 0;
}

.row__date {
  color: var(--faint);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  flex: 0 0 100%;
}

.row__clock {
  color: #9aaeb6;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
  line-height: 1;
  white-space: nowrap;
}

.row__period {
  font-size: 0.88rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  color: var(--live);
  line-height: 1;
  white-space: nowrap;
}

.row__period.is-live {
  color: #4caf50;
}

.row__period.is-ht {
  color: #ff9f43;
}

.row__period.is-ft {
  color: var(--muted);
}

.row__period.is-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2fd67b;
  box-shadow: 0 0 0 3px rgba(47, 214, 123, 0.18);
  padding: 0;
  font-size: 0;
  line-height: 0;
  color: transparent;
}

.row__tick {
  display: inline-block;
  animation: tick-blink 1s steps(1, end) infinite;
}

@keyframes tick-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.row__stream {
  display: inline-flex;
  color: #ff1744;
  flex-shrink: 0;
  line-height: 0;
}

.row.is-ongoing .row__clock {
  color: #9aaeb6;
  font-size: 0.88rem;
  font-weight: 500;
}

.row__match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.row__match--event {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
}

.row__event-title {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  color: #e8eef2;
  text-align: center;
}

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

.team--home {
  justify-content: flex-end;
  text-align: right;
}

.team__logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px;
  flex-shrink: 0;
}

.team__name {
  font-weight: 600;
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scorebox {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 56px;
}

.scorebox__main {
  font-weight: 800;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.scorebox__stack {
  display: none;
}

.scorebox__ht {
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.scorebox__vs {
  color: var(--faint);
  font-weight: 700;
  font-size: 0.78rem;
}

.odds {
  display: grid;
  gap: 3px;
  justify-items: stretch;
  min-width: 0;
}

.odds__v {
  display: grid;
  place-items: center;
  min-height: 18px;
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid rgba(239, 197, 106, 0.22);
  background: rgba(239, 197, 106, 0.08);
  text-align: center;
  font-weight: 700;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  color: var(--odds);
  line-height: 1.1;
}

.odds__empty {
  color: var(--faint);
  font-size: 0.78rem;
  text-align: center;
  padding: 6px 0;
}

.odds.is-empty {
  min-height: 1px;
}

.row__action {
  display: flex;
  justify-content: flex-end;
}

.empty {
  margin: 0;
  padding: 40px 16px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-mid);
  border-radius: var(--r-lg);
}

.empty[hidden] {
  display: none;
}

@media (max-width: 820px) {
  :root {
    --col-time: 108px;
    --col-odds: 54px;
    --col-action: 0px;
    --row-gap: 8px;
  }

  .row {
    grid-template-columns: var(--col-time) minmax(0, 1fr) var(--col-odds);
  }

  .group__head {
    grid-template-columns: var(--col-time) minmax(0, 1fr) var(--col-odds);
  }

  .group__action-spacer,
  .row__action {
    display: none;
  }

  .row,
  .row.is-watchable {
    cursor: pointer;
  }
}

/* —— Mobile app shell —— */
@media (max-width: 720px) {
  :root {
    --pad: 12px;
    --col-time: 76px;
    --row-pad-x: 12px;
    --dock-h: 58px;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body {
    background: #0a0e13;
    touch-action: pan-y;
  }

  .app {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 100dvh;
    min-height: 100svh;
    padding: calc(8px + var(--safe-top)) var(--pad) calc(var(--dock-h) + 18px + var(--safe-bottom));
    gap: 10px;
    overflow: visible;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 35;
    margin: calc(-8px - var(--safe-top)) calc(var(--pad) * -1) 0;
    padding: calc(8px + var(--safe-top)) var(--pad) 10px;
    width: calc(100% + var(--pad) * 2);
    max-width: none;
    box-sizing: border-box;
    background: rgba(10, 14, 19, 0.94);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid var(--line);
    gap: 8px;
    min-width: 0;
  }

  .topbar__brand {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .topbar__brand > div {
    min-width: 0;
    overflow: hidden;
  }

  .topbar__mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .topbar__logo {
    font-size: 1.05rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar__tag {
    display: none;
  }

  .topbar__aside {
    flex: 0 0 auto;
    flex-shrink: 0;
    gap: 6px;
    margin-left: 0;
    max-width: 58%;
  }

  /* มือถือ: ซ่อนสถานะโหลด — สรุปมีในบอร์ดแล้ว กัน topbar ล้น */
  .topbar__aside .status {
    display: none;
  }

  .topbar__aside .btn {
    height: 34px;
    padding: 0 10px;
    font-size: 0.76rem;
    flex-shrink: 0;
  }

  .lang {
    flex-shrink: 0;
  }

  .lang__btn {
    height: 34px;
    padding: 0 8px;
    gap: 5px;
  }

  .lang__flag {
    width: 20px;
    height: 14px;
  }

  .lang__caret {
    display: none;
  }

  .lang__menu {
    position: fixed;
    top: calc(8px + var(--safe-top) + 46px);
    right: max(8px, var(--pad));
    left: auto;
    width: min(280px, calc(100vw - 16px));
    max-height: min(65vh, 380px);
    z-index: 60;
  }

  .status__text {
    max-width: 7.5em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .board,
  .board__head,
  .board__intro,
  .toolbar,
  .groups,
  .group,
  .row,
  .detail,
  .detail__board,
  .detail__share {
    max-width: 100%;
    min-width: 0;
  }

  /* Fix: flex-basis 200px on column axis made search 200px tall + floating icon */
  .board__head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 12px;
    height: auto;
    min-height: 0;
  }

  .board__intro {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 0 0 auto;
  }

  .board__title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
  }

  .board__summary {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.35;
    color: var(--muted);
  }

  .search {
    position: relative;
    display: block;
    flex: 0 0 auto !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    flex-basis: auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 42px;
    align-self: stretch;
  }

  .search__icon {
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
  }

  .search input {
    display: block;
    width: 100%;
    height: 42px;
    background: var(--bg-soft);
    border-radius: 12px;
    font-size: 0.9rem;
  }

  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    margin: 0 calc(var(--pad) * -1);
    padding: 2px var(--pad);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .chips::-webkit-scrollbar {
    display: none;
  }

  .chip {
    flex: 0 0 auto;
    height: 34px;
    padding: 0 12px;
    font-size: 0.8rem;
  }

  .groups {
    gap: 14px;
  }

  .group {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
    background: #10161e;
    overflow: hidden;
  }

  .group__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px 9px;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .group__league {
    grid-column: auto;
    width: 100%;
    font-size: 0.78rem;
    font-weight: 700;
    color: #8b95a5;
    letter-spacing: 0.01em;
  }

  .group__logo {
    width: 16px;
    height: 16px;
  }

  .odds,
  .group__odds-label,
  .group__action-spacer,
  .row__action {
    display: none !important;
  }

  /* Mobile match rows — FCTV-style: time | teams | score */
  .row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: center;
    padding: 9px 12px;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    -webkit-tap-highlight-color: transparent;
  }

  .row:last-child {
    border-bottom: 0;
  }

  .row:hover {
    background: rgba(255, 255, 255, 0.02);
  }

  .row.is-active {
    background: rgba(229, 57, 53, 0.07);
  }

  .row.is-ongoing {
    background: transparent;
  }

  .row.is-watchable::before {
    display: none;
  }

  .row__time {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    text-align: center;
  }

  .row__date {
    flex: 0 0 auto;
    order: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--faint);
    font-size: 0.62rem;
    font-weight: 650;
    letter-spacing: 0;
  }

  .row__clock {
    font-size: 0.78rem;
    font-weight: 700;
    color: #b8c2ce;
    line-height: 1.1;
  }

  .row__period {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding: 0;
    border-radius: 0;
    background: transparent;
    line-height: 1.1;
  }

  .row__period.is-live {
    color: #2fd67b;
    background: transparent;
  }

  .row__period.is-ht {
    color: #ffb86b;
    background: transparent;
  }

  .row__period.is-ft {
    color: var(--muted);
    background: transparent;
  }

  .row__period.is-dot {
    width: 6px;
    height: 6px;
    margin: 1px 0;
    box-shadow: 0 0 0 2px rgba(47, 214, 123, 0.2);
  }

  .row__stream {
    margin-left: 0;
    color: #efc56a;
    line-height: 0;
  }

  .row__stream svg {
    width: 14px;
    height: 11px;
  }

  .row__match {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "home score"
      "away score";
    column-gap: 8px;
    row-gap: 6px;
    align-items: center;
    min-width: 0;
  }

  .row__match .team--home {
    grid-area: home;
  }

  .row__match .team--away {
    grid-area: away;
  }

  .row__match .scorebox {
    grid-area: score;
    justify-self: end;
    align-self: stretch;
    min-width: 28px;
    gap: 0;
    display: grid;
    align-content: space-around;
    justify-items: end;
  }

  /* ไม่โชว์ VS ลอย — ทีมซ้อนกันพอรู้แล้ว */
  .row__match:has(.scorebox__vs) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "home"
      "away";
  }

  .row__match .scorebox:has(.scorebox__vs) {
    display: none;
  }

  .row__match--event {
    display: block;
    grid-template-columns: none;
    grid-template-areas: none;
  }

  .row__event-title {
    font-size: 0.88rem;
    font-weight: 650;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
    line-height: 1.3;
  }

  .team,
  .team--home,
  .team--away {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    text-align: left;
    min-width: 0;
    width: 100%;
  }

  .team--home .team__logo {
    order: -1;
  }

  .team__logo {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
  }

  .team__name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .scorebox__main {
    display: none;
  }

  .scorebox__stack {
    display: grid;
    gap: 6px;
    justify-items: end;
    align-content: space-around;
    min-height: 100%;
  }

  .scorebox__n {
    font-size: 0.95rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #fff;
    line-height: 22px;
    min-width: 1.1em;
    text-align: right;
  }

  .scorebox__ht {
    display: none;
  }

  .scorebox__vs {
    display: none;
  }

  .player.is-playing {
    margin: 0 calc(var(--pad) * -1);
    width: calc(100% + var(--pad) * 2);
    max-width: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .player.is-playing .player__bar {
    padding: 10px 12px;
  }

  .player__title {
    font-size: 0.92rem;
  }

  .player__lock {
    display: none;
  }

  .screen {
    max-height: min(42vh, 280px);
  }

  /* Bottom dock: equal-width tabs, no horizontal spill */
  .sports--global {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    z-index: 200;
    margin: 0 !important;
    padding: 6px 2px calc(6px + var(--safe-bottom));
    border: 0;
    border-top: 0;
    border-radius: 0;
    /* No backdrop-filter here — it traps position:fixed / clips the more-menu */
    background: transparent;
    box-shadow: none;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    justify-content: space-between;
    gap: 0;
    overflow: visible !important;
  }

  .sports--global::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 14, 19, 0.97);
    backdrop-filter: blur(18px) saturate(1.3);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.5);
  }

  .sports--global > * {
    position: relative;
    z-index: 1;
  }

  .sports--global .sports__btn,
  .sports--global .sports__btn--all,
  .sports--global .sports__btn--more {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: auto !important;
    height: 52px;
    padding: 4px 2px;
    gap: 2px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-size: 0.52rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    line-height: 1.05;
    -webkit-tap-highlight-color: transparent;
  }

  .sports--global .sports__btn:active {
    transform: scale(0.96);
  }

  .sports--global .sports__btn.is-active {
    color: #fff;
    background: rgba(229, 57, 53, 0.22);
    box-shadow: inset 0 0 0 1px rgba(229, 57, 53, 0.4);
  }

  .sports--global .sports__icon,
  .sports--global .sports__icon--glyph {
    width: 22px;
    height: 22px;
  }

  .sports--global .sports__label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sports--global .sports__chevron {
    display: none !important;
  }

  .sports--global .sports__more {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    /* static so absolute menu anchors to the dock, not the tiny button */
    position: static !important;
    display: flex;
    z-index: 2;
  }

  .sports--global .sports__more .sports__btn--more {
    width: 100%;
  }

  .sports--global .sports__menu {
    position: absolute !important;
    left: 10px !important;
    right: 10px !important;
    bottom: calc(100% + 10px) !important;
    top: auto !important;
    z-index: 220;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    max-height: min(48vh, 340px);
    transform: none !important;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(18, 23, 30, 0.98);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  }

  .sports--global .sports__menu:not([hidden]) {
    display: grid !important;
  }

  .detail {
    gap: 12px;
  }

  .detail__board {
    padding: 16px 10px;
    gap: 8px;
    border-radius: 14px;
  }

  .detail__team-logo {
    width: 44px;
    height: 44px;
  }

  .detail__team-name {
    font-size: 0.82rem;
  }

  .detail__score {
    font-size: 1.6rem;
  }

  .detail__share {
    gap: 8px;
  }

  .detail__url {
    min-width: 0;
    font-size: 0.72rem;
  }

  .events__row {
    grid-template-columns: 1fr 44px 1fr;
    padding: 8px 6px;
  }

  .events__legend {
    gap: 8px 10px;
    font-size: 0.68rem;
  }

  .rings {
    gap: 4px;
  }

  .ring__label {
    font-size: 0.64rem;
  }

  .shots__circle {
    width: 56px;
    height: 56px;
  }

  .shots__circle--home {
    margin-right: 18px;
  }

  .trend {
    height: 96px;
    max-width: 100%;
    overflow: hidden;
  }

  .trend__svg {
    height: 96px;
    max-width: 100%;
  }
}

/* —— Match detail —— */
.detail[hidden],
.board[hidden],
.detail__tabs[hidden],
.detail__panel[hidden],
.detail__actions[hidden] {
  display: none !important;
}

.detail {
  display: grid;
  gap: 14px;
  animation: detail-in 0.35s var(--ease) both;
}

@keyframes detail-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.detail__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #d5dde6;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease);
}

.detail__back:hover {
  border-color: rgba(239, 197, 106, 0.45);
  background: rgba(239, 197, 106, 0.1);
  color: var(--accent-hi);
}

.detail__league {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.detail__league-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
}

.detail__board {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 22px 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-mid);
  background:
    radial-gradient(circle at 20% 0%, rgba(229, 57, 53, 0.12), transparent 45%),
    radial-gradient(circle at 80% 100%, rgba(239, 197, 106, 0.08), transparent 40%),
    linear-gradient(180deg, #151b24, #0e1319);
  box-shadow: var(--shadow);
}

.detail__side {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  min-width: 0;
}

.detail__team-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

.detail__team-name {
  font-weight: 700;
  font-size: clamp(0.92rem, 2.4vw, 1.08rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.detail__center {
  display: grid;
  gap: 6px;
  justify-items: center;
  min-width: 96px;
}

.detail__status {
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail__status.is-live {
  color: var(--live-red-hi);
}

.detail__status.is-ht {
  color: var(--accent);
}

.detail__score {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.detail__ht {
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 600;
}

.detail__share {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.detail__url {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line-mid);
  background: var(--bg-elev);
  color: var(--muted);
  font-size: 0.78rem;
}

.detail__actions {
  display: flex;
  justify-content: center;
}

.detail__tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line-mid);
}

.detail__tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.detail__tab.is-active {
  color: var(--live-red-hi);
  border-bottom-color: var(--live-red);
}

.detail__panel {
  display: grid;
  gap: 16px;
}

/* —— Events timeline —— */
.events {
  display: grid;
  gap: 0;
  padding: 8px 0 4px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #121820, #0c1016);
  overflow: hidden;
}

.events__empty {
  margin: 0;
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
}

.events__row {
  display: grid;
  grid-template-columns: 1fr 58px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 8px 12px;
  position: relative;
}

.events__row::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(-50%);
  pointer-events: none;
}

.events__home,
.events__away {
  min-width: 0;
  display: flex;
}

.events__home {
  justify-content: flex-end;
  text-align: right;
}

.events__away {
  justify-content: flex-start;
  text-align: left;
}

.events__min {
  position: relative;
  z-index: 1;
  justify-self: center;
  min-width: 42px;
  padding: 4px 0;
  text-align: center;
  font-weight: 800;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: #0c1016;
}

.events__body {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.events__row.is-home .events__body {
  flex-direction: row-reverse;
}

.events__player {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.events__out {
  color: #8a929e;
  font-weight: 500;
  font-size: 0.78rem;
}

.events__score-tag {
  color: var(--live);
  font-weight: 800;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.events__marker {
  margin: 6px auto;
  width: fit-content;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(239, 197, 106, 0.14);
  color: var(--accent-hi);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  position: relative;
  z-index: 1;
}

.events__begin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px 18px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.events__begin-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.events__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: center;
  color: var(--muted);
  font-size: 0.74rem;
}

.events__leg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ev-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-block;
  overflow: visible;
}

/* —— Overview stats (MadPlay-like) —— */
.overview {
  --ov-home: #2196f3;
  --ov-away: #ffbb35;
  display: grid;
  gap: 14px;
  padding: 14px 12px 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #121820, #0c1016);
}

.overview__teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-weight: 700;
  font-size: 0.92rem;
}

.overview__team--home {
  color: var(--ov-home);
  text-align: left;
}

.overview__team--away {
  color: var(--ov-away);
  text-align: right;
}

.trend {
  width: 100%;
  height: 120px;
  overflow: visible;
  background: transparent;
}

.trend__svg {
  display: block;
  width: 100%;
  height: 120px;
}

.trend__label {
  fill: #9a9a9a;
  font-size: 10px;
  font-family: Arial, Helvetica, sans-serif;
}

.trend__grid {
  stroke: rgba(154, 154, 154, 0.35);
  stroke-width: 0.2;
}

.trend__band {
  fill: rgba(255, 255, 255, 0.03);
}

.trend__axis {
  stroke: rgba(227, 227, 227, 0.35);
  stroke-width: 0.2;
}

.trend__now {
  stroke: #2196f3;
  stroke-width: 1;
}

.trend__home {
  fill: #2196f3;
}

.trend__away {
  fill: #ffbb35;
}

.rings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ring {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.ring__label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  text-align: center;
}

.ring__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ring__n {
  min-width: 1.6em;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}

.ring__n--home {
  color: var(--ov-home);
}

.ring__n--away {
  color: var(--ov-away);
}

.ring__svg {
  width: 44px;
  height: 44px;
}

.ring__track {
  stroke: rgba(255, 255, 255, 0.08);
}

.ring__home {
  stroke: var(--ov-home);
  stroke-linecap: butt;
}

.ring__away {
  stroke: var(--ov-away);
  stroke-linecap: butt;
}

.shots {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding-top: 4px;
}

.shots__side {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.shots__side--away {
  direction: rtl;
}

.shots__side--away > * {
  direction: ltr;
}

.shots__stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}

.shots__stat .ev-svg {
  width: 16px;
  height: 16px;
}

.shots__mid {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.shots__title {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.shots__circles {
  display: flex;
  align-items: center;
  justify-content: center;
}

.shots__circle {
  position: relative;
  width: 60px;
  height: 60px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
  flex-shrink: 0;
}

.shots__circle--home {
  margin-right: 28px;
  z-index: 2;
}

.shots__circle--away {
  z-index: 1;
}

.shots__on {
  margin: 8px 0;
  width: 60px;
  text-align: center;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 15px;
}

.shots__off {
  position: absolute;
  top: 25px;
  left: 16px;
  width: 44px;
  height: 35px;
  margin: 0;
  text-align: center;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 35px;
}

.site-foot {
  position: relative;
  margin-top: 28px;
  margin-inline: calc(var(--pad) * -1);
  width: calc(100% + var(--pad) * 2);
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(16, 22, 30, 0) 0%, rgba(8, 11, 16, 0.92) 28%, #070a0e 100%);
}

.site-foot__wash {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 12% 0%, rgba(229, 57, 53, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 60% at 88% 20%, rgba(239, 197, 106, 0.08), transparent 50%);
}

.site-foot__inner {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 28px var(--pad) 22px;
  display: grid;
  gap: 22px;
}

.site-foot__top {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  align-items: start;
}

.site-foot__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.site-foot__mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.site-foot__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
}

.site-foot__tag {
  margin: 4px 0 0;
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 500;
}

.site-foot__lead {
  margin: 0;
  color: #9aa3b2;
  font-size: 0.88rem;
  line-height: 1.65;
  max-width: 42rem;
}

.site-foot__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 28px;
  padding-top: 4px;
}

.site-foot__col {
  display: grid;
  gap: 8px;
  align-content: start;
}

.site-foot__heading {
  margin: 0 0 2px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #efc56a;
}

.site-foot__col a {
  color: #c5ced8;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  width: fit-content;
  transition: color 0.18s var(--ease);
}

.site-foot__col a:hover {
  color: #fff;
}

.site-foot__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.site-foot__copy,
.site-foot__note {
  margin: 0;
  color: var(--faint);
  font-size: 0.76rem;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .site-foot {
    margin-top: 20px;
    margin-bottom: 4px;
  }

  .site-foot__inner {
    padding: 22px var(--pad) 18px;
    gap: 18px;
  }

  .site-foot__top {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .site-foot__mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .site-foot__name {
    font-size: 1.18rem;
  }

  .site-foot__lead {
    font-size: 0.84rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }

  .seo-world {
    font-size: 0.65rem;
    padding: 10px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .site-foot__grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px 14px;
    min-width: 0;
  }

  .site-foot__col:last-child {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
  }

  .site-foot__col:last-child .site-foot__heading {
    width: 100%;
    margin-bottom: 0;
  }

  .site-foot__bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-top: 14px;
  }
}

@media (max-width: 400px) {
  .topbar__aside .btn {
    padding: 0 8px;
    font-size: 0.7rem;
  }

  .lang__code {
    display: none;
  }

  .lang__btn {
    padding: 0 7px;
    min-width: 34px;
    justify-content: center;
  }

  .board__title {
    font-size: 0.95rem;
  }
}

/* legacy class kept empty to avoid flash if cached */
.seo-foot {
  display: contents;
}
