/* =========================================================
   Pinball Champions — scoreboard page.
   Rides the site theme (wallpaper, fonts, colors from styles.css); the scores
   use Doto (Google dot-matrix). Full-width sticky header + date control stay
   put; only the rows scroll.
   ========================================================= */
:root {
  --led: #ecc865;
  --mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

/* fill the viewport so the footer sits at the true bottom on short content */
.champ-page { min-height: 100svh; display: flex; flex-direction: column; overflow-x: hidden; }

/* ---- full-width sticky header ---- */
.champ-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 8, 7, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.champ-head__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1rem 1.1rem 0.85rem;
}
.champ-titleline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.champ-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4.5vw, 2.3rem);
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.champ-title__name { color: var(--text); }
.champ-title__sub {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.62em;
  letter-spacing: 0.01em;
  color: var(--text-dim);
}
.champ-home { display: flex; align-items: center; text-decoration: none; }
.champ-home:hover { opacity: 0.85; }
.champ-logo { height: 1.15em; width: auto; display: block; }
.champ-period {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--led);
  font-size: clamp(1.2rem, 3.8vw, 1.9rem);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.champ-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
}
.champ-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.champ-tab {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.champ-tab:hover { color: var(--text); border-color: var(--gold); }
.champ-tab.is-active {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 600;
}

.champ-controls { display: flex; align-items: center; gap: 0.5rem; }
.champ-step {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--gold-bright);
  border-radius: 8px;
  width: 2rem;
  height: 2rem;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.champ-step:hover:not(:disabled) { border-color: var(--gold); }
.champ-step:disabled { opacity: 0.3; cursor: default; }
.champ-select {
  background: rgba(20, 16, 14, 0.9);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  min-width: 11rem;
}
.champ-alltime-note {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

/* ---- the translucent scores panel ---- */
.champ-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.4rem 1.1rem 2rem;
}
.champ-board {
  background: rgba(8, 6, 5, 0.62);
  border: 1px solid var(--line);
  border-radius: var(--r, 14px);
  padding: 1.2rem 1.4rem;
}
@media (min-width: 820px) {
  .champ-board {
    column-count: 2;
    column-gap: 3rem;
    column-rule: 1px solid rgba(201, 164, 92, 0.45);
  }
}

.champ-row {
  display: grid;
  width: 100%;                 /* fill the multicolumn column; some browsers shrink-wrap grid rows otherwise, misaligning the right edge */
  grid-template-columns: minmax(0, 1fr) 3.4ch 14ch;
  gap: 0.45rem;
  align-items: baseline;
  padding: 0.42rem 0.2rem;
  break-inside: avoid;
  font-family: var(--mono);
  color: var(--led);
  font-size: 1.12rem;
  letter-spacing: 0.02em;
}
/* phones: shrink so long titles ("GHOSTBUSTERS") aren't crushed by the score column */
@media (max-width: 600px) {
  .champ-board { padding: 0.72rem 0.84rem; }  /* ~40% tighter than desktop so the scores get more width */
  .champ-row {
    grid-template-columns: minmax(0, 1fr) 3.2ch 14ch;
    font-size: 0.85rem;
    gap: 0.35rem;
    letter-spacing: 0;
  }
}
.champ-game {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
}
.champ-init { text-align: left; color: #eef1f4; }
.champ-score { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.champ-empty {
  text-align: center;
  color: var(--text-dim);
  font-family: var(--sans);
  padding: 2.5rem 1rem;
}

/* ---- footer: identical to the main page, just less tall ---- */
.champ-footer { padding: 1.4rem clamp(1.2rem, 5vw, 2.5rem) 1.3rem; }

@media (prefers-reduced-motion: reduce) {
  .champ-tab { transition: none; }
}
