:root {
  font-family: system-ui, sans-serif;
  color: #111;
}
* { box-sizing: border-box; }
body { margin: 0; }

/* The `hidden` attribute must beat author display rules (e.g. .auth-gate's
   display:flex), or toggling visibility via `hidden` has no visual effect. */
[hidden] { display: none !important; }

.auth-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.signin { text-align: center; padding: 2rem; }
.signin-title { margin-bottom: 0.5rem; }
.signin-body { color: #555; }
.signin-button {
  padding: 10px 24px;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
}
.signin-error { color: #b00020; margin-top: 12px; }

.app-content { max-width: 760px; margin: 0 auto; padding: 1.5rem 1rem; }
.topbar { display: flex; align-items: center; justify-content: space-between; }
.title { font-size: 1.4rem; }
.sign-out {
  border: none; background: none; color: #888;
  text-decoration: underline; cursor: pointer; font-size: 0.85rem;
}
.champion { text-align: center; font-weight: 700; color: #b8860b; font-size: 1.2rem; }
.state { text-align: center; }
.state-error { color: #b00020; }

.list { list-style: none; padding: 0; margin: 1rem 0 0; }
.row {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  background: #fafafa;
  overflow: hidden;
}
.row-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
}
.rank { font-weight: 700; color: #888; width: 2.5rem; flex-shrink: 0; }
.user { font-weight: 600; width: 6rem; flex-shrink: 0; }
.flags {
  flex: 1; display: flex; flex-wrap: wrap; gap: 1px;
  font-size: 1.05rem; line-height: 1.4; min-width: 0;
}
.flag { cursor: help; }
.flag-live { outline: 1.5px solid #d00; border-radius: 2px; }
.points {
  font-weight: 700;
  min-width: 2.5rem;
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
}
.chevron { color: #aaa; font-size: 0.7rem; flex-shrink: 0; }

/* Provisional (live, unconfirmed) points + live indicators — all red. */
.prov { color: #d00; font-weight: 700; margin-left: 2px; }
.live-badge {
  color: #d00;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.live-note { color: #d00; font-size: 0.75rem; }

.detail {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: #fff;
  border-top: 1px solid #e0e0e0;
}
.detail th, .detail td { padding: 0.35rem 1rem; text-align: left; }
.detail th { color: #888; font-weight: 600; }
.detail td { border-top: 1px solid #f0f0f0; }
.detail .num { text-align: right; font-variant-numeric: tabular-nums; }
.warn { color: #b00020; font-size: 0.75rem; }

.footer {
  text-align: center;
  color: #999;
  font-size: 0.8rem;
  margin-top: 1.5rem;
}
