.olympiad-live-section { padding-top: 12px; }

.olympiad-live-shell {
  overflow: hidden;
  border: 1px solid rgba(201, 162, 39, .55);
  border-radius: 18px;
  background: #111;
  color: #fff;
}

.olympiad-live-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  padding: 24px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.olympiad-live-heading .eyebrow { margin-bottom: 8px; color: var(--gold); }
.olympiad-live-heading h2 { margin: 0 0 8px; color: #fff; }
.olympiad-live-heading p { margin: 0; color: rgba(255,255,255,.7); }
.olympiad-live-summary { max-width: 380px; text-align: right; font-weight: 800; }

.olympiad-live-view-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 24px 0;
}

.olympiad-live-view-button {
  min-height: 46px;
  padding: 9px 16px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 10px;
  background: rgba(255,255,255,.035);
  color: rgba(255,255,255,.68);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.olympiad-live-view-button:hover,
.olympiad-live-view-button:focus-visible,
.olympiad-live-view-button.is-active {
  border-color: var(--gold);
  background: rgba(201,162,39,.14);
  color: #fff;
}

.olympiad-live-controls,
.olympiad-live-team-switcher {
  padding: 13px 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.olympiad-live-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.olympiad-live-filter-group,
.olympiad-live-team-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.olympiad-live-filter,
.olympiad-live-team-button {
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.olympiad-live-filter:hover,
.olympiad-live-filter:focus-visible,
.olympiad-live-team-button:hover,
.olympiad-live-team-button:focus-visible,
.olympiad-live-filter.is-active,
.olympiad-live-team-button.is-active {
  border-color: var(--gold);
  background: rgba(201,162,39,.14);
}

.olympiad-live-team-switcher[hidden],
.olympiad-live-controls[hidden] { display: none !important; }

.olympiad-live-team-switcher-label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,.55);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.olympiad-live-match-list { display: grid; }

.olympiad-live-match {
  padding: 18px 20px 22px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.olympiad-live-match:last-child { border-bottom: 0; }

.olympiad-live-match-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 11px;
}

.olympiad-live-match-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.olympiad-live-match-head h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.05;
}

.olympiad-live-match-status {
  color: rgba(255,255,255,.56);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.olympiad-live-board-grid {
  display: grid;
  gap: 10px;
}

.is-all-mode .olympiad-live-board-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.is-team-mode .olympiad-live-match {
  padding: 22px 24px 28px;
}

.is-team-mode .olympiad-live-board-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.olympiad-native-board-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 8px;
  background: #191919;
  box-shadow: 0 5px 18px rgba(0,0,0,.16);
}

.olympiad-native-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 35px;
  padding: 5px 8px;
  background: #202020;
}

.olympiad-native-player-white {
  border-top: 1px solid rgba(255,255,255,.07);
}

.olympiad-native-player-black {
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.olympiad-player-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.olympiad-board-number {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(201,162,39,.15);
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .03em;
}

.olympiad-player-flag {
  width: 18px;
  height: 13px;
  flex: 0 0 auto;
  border-radius: 1px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14);
}

.olympiad-player-fed {
  flex: 0 0 auto;
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.65);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .03em;
}

.olympiad-player-title {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
}

.olympiad-player-name {
  min-width: 0;
  overflow: hidden;
  color: #f6f6f6;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.olympiad-player-rating {
  flex: 0 0 auto;
  color: rgba(255,255,255,.48);
  font-size: 9px;
  font-weight: 700;
}

.olympiad-player-clock {
  flex: 0 0 auto;
  min-width: 59px;
  color: #eee;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  text-align: right;
}

.olympiad-player-clock.is-running { color: #fff; }

.olympiad-board-live-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e54235;
  box-shadow: 0 0 0 2px rgba(229,66,53,.15);
}

.olympiad-native-board-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.olympiad-native-board-link:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
}

.olympiad-native-chessboard {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(8, minmax(0, 1fr));
  background: #f0d9b5;
}

.olympiad-chess-square {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
}

.olympiad-chess-square.is-light { background: #f0d9b5; }
.olympiad-chess-square.is-dark { background: #b58863; }

.olympiad-chess-square.is-last-move.is-light { background: #d7df75; }
.olympiad-chess-square.is-last-move.is-dark { background: #aaa23a; }

.olympiad-chess-piece {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.olympiad-native-board-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(45deg, #b58863 25%, transparent 25%, transparent 75%, #b58863 75%),
    linear-gradient(45deg, #b58863 25%, #f0d9b5 25%, #f0d9b5 75%, #b58863 75%);
  background-position: 0 0, 22px 22px;
  background-size: 44px 44px;
  color: rgba(0,0,0,.72);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.is-team-mode .olympiad-native-player {
  min-height: 44px;
  padding: 8px 10px;
}

.is-team-mode .olympiad-player-name { font-size: 14px; }
.is-team-mode .olympiad-player-title { font-size: 11px; }
.is-team-mode .olympiad-player-rating { font-size: 10px; }
.is-team-mode .olympiad-player-clock { min-width: 72px; font-size: 14px; }
.is-team-mode .olympiad-player-flag {
  width: 22px;
  height: 16px;
}

.olympiad-live-source,
.olympiad-live-empty {
  margin: 0;
  padding: 13px 24px 17px;
  color: rgba(255,255,255,.52);
  font-size: 11px;
}

.olympiad-live-source {
  border-top: 1px solid rgba(255,255,255,.1);
}

.olympiad-live-home-section { padding-top: 0; }

.olympiad-live-home {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  border: 1px solid rgba(201,162,39,.5);
  border-radius: 16px;
  background: var(--black);
  color: #fff;
  text-decoration: none;
}

.olympiad-live-home:hover,
.olympiad-live-home:focus-visible { border-color: var(--gold); }

.olympiad-live-home-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.olympiad-live-home-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,.38);
}

.olympiad-live-home.is-live .olympiad-live-home-dot { background: #d93025; }

.olympiad-live-home-copy strong {
  display: block;
  margin-bottom: 3px;
  color: #fff;
  font-size: 17px;
}

.olympiad-live-home-copy span {
  color: rgba(255,255,255,.68);
  font-size: 13px;
}

.olympiad-live-home-cta {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

@media (max-width: 1180px) and (min-width: 821px) {
  .is-all-mode .olympiad-live-board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 820px) {
  .olympiad-live-heading { display: block; }
  .olympiad-live-summary { max-width: none; margin-top: 12px; text-align: left; }

  .is-all-mode .olympiad-live-board-grid,
  .is-team-mode .olympiad-live-board-grid {
    grid-template-columns: 1fr;
  }

  .olympiad-live-home { grid-template-columns: 1fr auto; }
  .olympiad-live-home-kicker { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .olympiad-live-heading,
  .olympiad-live-view-switcher,
  .olympiad-live-controls,
  .olympiad-live-team-switcher,
  .olympiad-live-match,
  .olympiad-live-source,
  .olympiad-live-empty {
    padding-left: 14px;
    padding-right: 14px;
  }

  .olympiad-live-view-switcher { grid-template-columns: 1fr; }
  .olympiad-live-controls { display: grid; }

  .olympiad-live-filter-group,
  .olympiad-live-team-buttons { width: 100%; }

  .olympiad-live-filter,
  .olympiad-live-team-button { flex: 1 1 auto; }

  .olympiad-live-match-head { display: block; }
  .olympiad-live-match-status { display: block; margin-top: 5px; }

  .olympiad-native-player {
    min-height: 42px;
    padding: 7px 9px;
  }

  .olympiad-player-name { font-size: 13px; }
  .olympiad-player-clock { min-width: 70px; font-size: 13px; }

  .olympiad-live-home {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .olympiad-live-home-kicker { grid-column: auto; }
  .olympiad-live-home-cta { white-space: normal; }
}
