:root {
  --maroon: #8a1c14;
  --text: #111827;
  --muted: #6b7280;
  --bg: #ffffff;
  --card: #f9fafb;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  background: var(--maroon);
  color: #fff;
  padding: 16px 0;
}
.branding {
  margin: 0;
  font-size: 32px;
  letter-spacing: 2px;
  text-align: center;
}

.subtitle {
  text-align: center;
  margin: 24px 0 8px 0;
  color: var(--text);
  font-weight: 600;
}
.headline {
  text-align: center;
  margin: 8px 0 24px 0;
  font-size: 28px;
}

.arena {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  justify-items: center;
}

.or {
  font-weight: 800;
  color: #333;
}

.face-card {
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  display: inline-flex;
}
.face-card:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.face-card img {
  display: block;
  width: 320px;
  height: 420px;
  object-fit: cover;
  background: #f5f5f5;
  opacity: 0;
}

.loading,
.error {
  text-align: center;
  margin-top: 16px;
}
.hidden {
  display: none;
}
.error {
  color: #b91c1c;
}

@media (max-width: 820px) {
  .face-card img {
    width: 44vw;
    height: 60vw;
    max-width: 360px;
    max-height: 500px;
  }
}

@media (max-width: 640px) {
  .arena {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .or {
    order: 0;
  }
  .headline {
    font-size: 22px;
  }
  .branding {
    font-size: 26px;
  }
  .subtitle {
    font-size: 14px;
  }
}

.back {
  margin-top: 16px;
  display: inline-block;
  color: #111827;
  font-weight: 600;
  text-decoration: none;
}

/* Leaderboard styles */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.rank {
  width: 60px;
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.person::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 64px;
  background: transparent;
  z-index: 2;
  pointer-events: auto;
  cursor: default;
}

.person img {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  background: #ddd;
  -webkit-user-drag: none !important;
  -khtml-user-drag: none !important;
  -moz-user-drag: none !important;
  -o-user-drag: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  pointer-events: none;
  position: relative;
}

.header-bar {
  background: var(--maroon);
  color: #fff;
  padding: 12px 0;
}

.header-bar h1 {
  margin: 0;
  text-align: center;
  font-size: 28px;
}
