/* OBS browser source: 448 × 756. The page paints no background, so only the board shows. */
:root {
  --width: 448px;
  --height: 756px;
  --qz-red: #ed174b;
  --text: #ededed;
  --text-muted: #9a9a9a;
  --font-sans: Inter, "Segoe UI", system-ui, sans-serif;
  --move: 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
}

.board {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--width);
  height: var(--height);
  box-sizing: border-box;
  padding: 28px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-family: var(--font-sans);
  color: var(--text);
  transform-origin: 0 0;
  -webkit-font-smoothing: antialiased;
}

.board__header {
  padding: 0;
}

.board__title {
  margin: 0 4px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.board__columns {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
  margin-top: 26px;
  padding: 0 22px 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.board__columns span:first-child {
  visibility: hidden;
}

.board__columns span:last-child {
  text-align: right;
}

.board--no-title .board__header {
  display: none;
}

.board--no-cards .board__columns {
  border-bottom-color: transparent;
}

.board__list {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.row {
  position: relative;
  height: 100px;
  box-sizing: border-box;
  padding: 0 22px 0 18px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
  border-top: 1px solid transparent;
  background: transparent;
  overflow: hidden;
  will-change: transform, opacity;
}

.row + .row {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.board--no-cards .row {
  border-top-color: transparent;
}

.board--no-cards .row__name,
.board--no-cards .row__points {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.row__rank {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.row--first .row__rank {
  color: var(--qz-red);
}

.row__name {
  min-width: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.row__flag {
  margin-right: 8px;
  font-family: "Noto Color Emoji", sans-serif;
  font-weight: 400;
}

.row__flag:empty {
  display: none;
}

.row__points {
  text-align: right;
  font-size: 34px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* Top regions (countries) */
.board__regions {
  display: flex;
  flex-direction: column;
}

.board__regions[hidden] {
  display: none;
}

.board__subtitle {
  margin: 0;
  padding: 0 4px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.board--no-cards .board__subtitle {
  border-bottom-color: transparent;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.board__list--regions .row {
  height: 72px;
}

.board__list--regions .row__name {
  font-size: 21px;
  -webkit-line-clamp: 1;
}

.board__list--regions .row__points {
  font-size: 26px;
}

/* Animations */
.row--moving {
  transition: transform var(--move);
}

.row--enter {
  /* backwards, not both: a filled end state would override the FLIP translateY on later moves. */
  animation: row-enter 600ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.row--climbed::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  animation: row-glow 1600ms ease-out both;
  pointer-events: none;
}

@keyframes row-enter {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes row-glow {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.board--static .row--moving,
.board--static .row--enter,
.board--static .row--climbed::after {
  transition: none;
  animation: none;
}

.board__empty {
  margin: 0;
  padding: 0 4px;
  font-size: 18px;
  color: var(--text-muted);
}

.board__empty[hidden] {
  display: none;
}
