:root {
  --navy: #1a3cb8;
  --navy-2: #122f96;
  --ink: #f4f6ff;
  --muted: #d5e4ff;
  --yellow: #ffe500;
  --cyan: #49d2ff;
  --pink: #ff3d8a;
  --saber-red: #ff3b30;
  --saber-blue: #3d7eff;
  --silver: #d5dde8;
  --bronze: #e7a15a;
  --sheet: #ffffff;
  --sheet-ink: #10245c;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  font-family: Outfit, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.45;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(128deg, transparent 0 58%, rgba(73, 210, 255, 0.9) 58% 66%, transparent 66% 72%, var(--yellow) 72% 84%, transparent 84%) top right / 240px 200px no-repeat,
    linear-gradient(128deg, var(--yellow) 0 12%, transparent 12% 20%, var(--cyan) 20% 30%, transparent 30%) bottom left / 200px 170px no-repeat;
}

body > *:not(dialog) {
  position: relative;
  z-index: 1;
}

body.board-only {
  background: var(--navy-2);
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--cyan);
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

::selection {
  background: var(--yellow);
  color: var(--navy);
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 40;
  background: var(--yellow);
  color: var(--navy);
  padding: 8px 12px;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(18, 47, 150, 0.94);
  border-bottom: 3px solid var(--yellow);
  backdrop-filter: blur(10px);
}

.bar {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  text-decoration: none;
  margin-right: auto;
}

.mark {
  width: 42px;
  height: 42px;
  flex: none;
}

.brand strong {
  display: block;
  font-family: Teko, "Arial Narrow", sans-serif;
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 0.85;
}

.brand em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}

.nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav a,
.nav .text-btn,
.nav .whoami {
  flex: 0 0 auto;
  white-space: nowrap;
}

.nav a {
  color: white;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 0 2px;
  box-shadow: inset 0 -2px 0 transparent;
}

.nav a:hover {
  color: var(--yellow);
  box-shadow: inset 0 -2px 0 var(--yellow);
}

.status {
  margin: 0;
  min-width: 7.5rem;
  text-align: center;
  border: 2px solid var(--yellow);
  padding: 4px 10px 2px;
  font-family: Teko, "Arial Narrow", sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}

.status.live {
  background: var(--yellow);
  color: var(--navy);
  outline: 2px solid transparent;
  outline-offset: 3px;
  animation: live-pulse 2.8s ease-in-out infinite;
}

@keyframes live-pulse {
  0%,
  100% { outline-color: transparent; }
  50% { outline-color: rgba(255, 229, 0, 0.7); }
}

.status.closed {
  color: var(--yellow);
  background: transparent;
}

.status.offline {
  border-color: var(--pink);
  color: var(--pink);
}

.text-btn {
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 8px 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 700;
}

.text-btn:hover {
  color: white;
}

.hero {
  padding: 42px 0 32px;
}

h1,
.highway {
  animation: rise 0.48s ease both;
}

.highway {
  animation-delay: 0.06s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 36px;
  align-items: center;
}

.kicker {
  margin: 0 0 8px;
  color: var(--cyan);
  font-family: Teko, "Arial Narrow", sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
.rules-list h3,
.staff-body h3 {
  font-family: Teko, "Arial Narrow", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 0.82;
}

h1 {
  margin: 0;
  font-size: clamp(5.4rem, 12vw, 8.4rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 0.76;
}

h1 .line,
h1 .slab {
  display: block;
  line-height: 0.76;
}

.slab {
  align-self: flex-start;
  margin-top: 0.05em;
  padding: 0.045em 0.08em 0.015em;
  background: var(--yellow);
  color: var(--navy);
}

.lede,
.section-copy,
.log-copy {
  max-width: 38rem;
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 14px;
}

.btn,
.tab,
.nav a,
.text-btn,
.leader {
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}

.btn:active:not(:disabled),
.tab:active,
.leader:active {
  transform: translateY(1px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px 2px;
  border: 2px solid var(--yellow);
  background: transparent;
  color: var(--yellow);
  font-family: Teko, "Arial Narrow", sans-serif;
  font-size: 1.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
}

.btn:hover {
  background: var(--yellow);
  color: var(--navy);
}

.btn.yellow {
  background: var(--yellow);
  color: var(--navy);
  border-color: var(--yellow);
}

.btn.ghost {
  border-color: white;
  color: white;
}

.btn.ghost:hover {
  background: white;
  color: var(--navy);
}

.btn.light {
  background: white;
  color: var(--navy);
  border-color: white;
}

.btn.danger {
  border-color: var(--pink);
  color: var(--pink);
}

.btn.danger:hover {
  background: var(--pink);
  color: white;
}

.btn[aria-pressed="true"] {
  background: var(--yellow);
  color: var(--navy);
  border-color: var(--yellow);
}

.hero-status {
  margin: 0;
  font-weight: 600;
}

.highway {
  position: relative;
  height: 360px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 18px 18px 0;
  background:
    linear-gradient(180deg, rgba(255, 229, 0, 0.08), transparent 28%),
    #0c226e;
  border: 3px solid var(--yellow);
  overflow: hidden;
}

.highway-call {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  margin: 0;
  padding: 4px 8px 2px;
  background: var(--navy);
  color: var(--yellow);
  font-family: Teko, "Arial Narrow", sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lane {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 70%);
}

.lane i {
  position: absolute;
  left: 12%;
  width: 76%;
  height: 26px;
  background: var(--c, var(--yellow));
  box-shadow: 0 0 8px var(--c, var(--yellow));
  animation: fall 1.7s linear infinite;
  animation-delay: var(--d, 0s);
}

.hitline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 54px;
  height: 4px;
  background: white;
  box-shadow: 0 0 12px white;
}

@keyframes fall {
  from { top: -36px; }
  to { top: 112%; }
}

.board-section {
  background: var(--navy-2);
  padding: 36px 0 48px;
}

.leaders {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.leader {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  color: inherit;
  background: transparent;
  border: 2px solid rgba(255, 229, 0, 0.28);
  padding: 14px 14px 10px;
  min-height: 112px;
}

.leader[data-game="rhythm-plus"] { border-top: 5px solid var(--yellow); }
.leader[data-game="muse-dash"] { border-top: 5px solid var(--pink); }
.leader[data-game="beat-saber"] { border-top: 5px solid var(--saber-blue); }

.leader:hover,
.leader[aria-pressed="true"] {
  border-color: var(--yellow);
  background: rgba(255, 229, 0, 0.07);
}

.leader .game-label,
.leader .who {
  display: block;
}

.leader .game-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.leader .who {
  margin-top: 6px;
  font-size: 1.2rem;
  font-weight: 700;
}

.leader .pts {
  display: block;
  margin-top: auto;
  font-family: Teko, "Arial Narrow", sans-serif;
  font-size: 2.3rem;
  line-height: 0.9;
  color: var(--yellow);
}

.board-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--cyan);
  font-family: Teko, "Arial Narrow", sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h2 {
  margin: 0 0 10px;
  font-size: clamp(3.2rem, 7vw, 4.8rem);
}

.board-meta,
.fine-print {
  margin: 0;
  color: var(--muted);
}

.tab-stack {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.board-tabs .tab[aria-selected="true"] {
  background: var(--cyan);
  color: var(--navy);
  border-color: var(--cyan);
}

.tab {
  min-height: 44px;
  border: 2px solid transparent;
  background: transparent;
  color: white;
  padding: 4px 12px 2px;
  font-family: Teko, "Arial Narrow", sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tab[data-game="rhythm-plus"][aria-selected="true"] {
  background: var(--yellow);
  color: var(--navy);
}

.tab[data-game="muse-dash"][aria-selected="true"] {
  background: var(--pink);
  color: white;
}

.tab[data-game="beat-saber"][aria-selected="true"] {
  background: linear-gradient(90deg, var(--saber-red), var(--saber-blue));
  color: white;
}

.board {
  border: 3px solid var(--yellow);
  background: var(--sheet);
  min-height: 180px;
  overflow-x: auto;
}

.sheet {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: var(--sheet);
  color: var(--sheet-ink);
}

.sheet.is-fresh tbody {
  animation: sheet-in 0.32s ease;
}

@keyframes sheet-in {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.sheet th,
.sheet td {
  border: 1px solid #c5d2ef;
  padding: 11px 14px;
  text-align: left;
  vertical-align: middle;
}

.sheet th:nth-child(3),
.sheet td:nth-child(3) {
  border-left: 2px solid #8ea4d4;
}

.sheet thead th {
  background: var(--yellow);
  color: var(--sheet-ink);
  font-family: Teko, "Arial Narrow", sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}

.sheet th.num,
.sheet td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sheet thead th.hot {
  box-shadow: inset 0 -3px 0 var(--sheet-ink);
}

.sheet td.hot {
  background: #fff4a6;
  font-weight: 700;
  box-shadow: inset 2px 0 0 #10245c, inset -2px 0 0 #10245c;
}

.sheet tr.mine td {
  background: #e7f7ff;
}

.sheet tr.mine td.hot {
  background: #fff1a0;
}

.sheet .col-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: right;
  cursor: pointer;
}

.sheet .flag {
  display: block;
  margin-top: 2px;
  font-family: Outfit, "Segoe UI", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a5a00;
}

.sheet .flag.checked {
  color: #0b7a45;
}

.sheet .blank {
  color: #8ea0c8;
  font-weight: 500;
}

.sheet-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--sheet-ink);
}

.sheet-empty strong {
  display: block;
  font-family: Teko, "Arial Narrow", sans-serif;
  font-size: 2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.sheet-empty p {
  margin: 8px 0 0;
}

.name-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.row {
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr) auto;
  grid-template-areas:
    "place name score"
    "place meta score";
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.row:first-child {
  border-top: 0;
}

.row.gold { box-shadow: inset 7px 0 0 var(--yellow); background: rgba(255, 229, 0, 0.07); }
.row.silver { box-shadow: inset 7px 0 0 var(--silver); }
.row.bronze { box-shadow: inset 7px 0 0 var(--bronze); }
.row.is-you { background: rgba(255, 229, 0, 0.14); }

.place {
  grid-area: place;
  font-family: Teko, "Arial Narrow", sans-serif;
  font-size: 2.8rem;
  line-height: 0.8;
}

.row.gold .place,
.row.gold .points { color: var(--yellow); }
.row.silver .place { color: var(--silver); }
.row.bronze .place { color: var(--bronze); }

.name {
  grid-area: name;
  font-weight: 700;
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}

.you {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px 0;
  background: var(--yellow);
  color: var(--navy);
  font-family: Teko, "Arial Narrow", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.points {
  grid-area: score;
  font-family: Teko, "Arial Narrow", sans-serif;
  font-size: 2.5rem;
  line-height: 0.8;
  font-variant-numeric: tabular-nums;
}

.badge {
  border: 1px solid var(--yellow);
  color: var(--yellow);
  padding: 1px 6px 0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 700;
}

.badge.checked {
  border-color: var(--cyan);
  color: var(--cyan);
}

.empty {
  padding: 36px 20px;
  text-align: center;
}

.empty strong {
  display: block;
  font-family: Teko, "Arial Narrow", sans-serif;
  font-size: 2.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.empty p {
  margin: 6px auto 0;
  max-width: 28rem;
  color: var(--muted);
}

.fine-print {
  margin-top: 10px;
  font-size: 0.92rem;
}

.screen-url {
  display: none;
}

.log-section {
  background: var(--yellow);
  color: var(--navy);
  padding: 42px 0;
}

.log-section .eyebrow,
.log-section h2,
.log-section .log-copy {
  color: var(--navy);
}

.log-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: start;
}

.shot {
  margin-top: 18px;
  padding: 14px 16px;
  background: white;
  max-width: 28rem;
}

.shot strong {
  display: block;
  font-family: Teko, "Arial Narrow", sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 0.9;
}

.shot p,
.log-copy {
  margin-bottom: 0;
}

.score-form {
  display: grid;
  gap: 12px;
}

.score-form label,
.staff-body label {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.score-form input,
.score-form select,
.staff-body input {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 2px solid var(--navy);
  border-radius: 0;
  background: var(--navy);
  color: white;
}

.score-form input::placeholder,
.staff-body input::placeholder {
  color: #9aa6d0;
}

.form-hint,
.form-note {
  margin: 0;
  font-weight: 700;
}

.form-note.ok {
  font-size: 1.2rem;
}

.replace {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--navy);
  color: white;
}

.replace p {
  margin: 0;
}

.submit-btn {
  background: var(--navy);
  color: var(--yellow);
  border-color: var(--navy);
  width: 100%;
}

.submit-btn:hover:not(:disabled) {
  background: #102a78;
  color: var(--yellow);
  border-color: #102a78;
}

.submit-btn:disabled {
  opacity: 1;
  background: var(--navy);
  color: var(--yellow);
  -webkit-text-fill-color: var(--yellow);
  cursor: not-allowed;
}

.score-form input:disabled,
.score-form select:disabled {
  opacity: 1;
  background: var(--navy);
  color: white;
  -webkit-text-fill-color: #c5d0f0;
  cursor: not-allowed;
}

.games,
.rules {
  padding: 42px 0;
}

.game {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-top: 2px solid rgba(255, 255, 255, 0.14);
}

.rail {
  background: var(--yellow);
}

.game.muse .rail {
  background: linear-gradient(var(--pink), var(--cyan));
}

.game.saber .rail {
  background: linear-gradient(var(--saber-red), var(--saber-blue));
}

.bubble {
  display: inline-block;
  margin: 0 0 10px;
  padding: 10px 12px 8px;
  background: white;
  color: var(--navy);
  border-radius: 16px 16px 16px 3px;
  font-family: "Press Start 2P", ui-monospace, monospace;
  font-size: 0.68rem;
  line-height: 1.45;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.facts li {
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 2px 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.facts .free {
  border-color: var(--cyan);
  color: var(--cyan);
}

.facts .paid {
  border-color: var(--yellow);
  color: var(--yellow);
}

.blurb,
.posted {
  margin: 0 0 6px;
}

.board-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.board-list li {
  margin: 0 0 4px;
}

.board-list strong {
  font-weight: 700;
}

.nav .text-btn {
  color: white;
  padding: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.nav .text-btn:hover {
  color: var(--yellow);
}

.whoami {
  color: var(--yellow);
  font-weight: 700;
  letter-spacing: 0.04em;
}

button.leader {
  font: inherit;
  cursor: pointer;
  width: 100%;
}

.logged-as {
  margin: 0;
  font-weight: 700;
}

.account-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keycaps {
  display: flex;
  gap: 6px;
  margin: 8px 0;
}

kbd {
  min-width: 36px;
  padding: 6px 0 4px;
  border: 2px solid white;
  text-align: center;
  font-family: Teko, "Arial Narrow", sans-serif;
  font-size: 1.3rem;
  line-height: 1;
}

.sabers {
  display: flex;
  gap: 8px;
  height: 36px;
  margin: 8px 0;
}

.sabers i {
  width: 8px;
  height: 100%;
  transform: rotate(18deg);
  transform-origin: bottom center;
}

.sabers i:first-child {
  background: var(--saber-red);
  box-shadow: 0 0 12px var(--saber-red);
}

.sabers i:last-child {
  background: var(--saber-blue);
  box-shadow: 0 0 12px var(--saber-blue);
  transform: rotate(-18deg);
}

.text-link {
  display: inline-block;
  margin-top: 6px;
  font-weight: 700;
}

.rules-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.rules-list li {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 18px 0;
  border-top: 2px solid rgba(255, 229, 0, 0.4);
}

.rules-list span {
  font-family: Teko, "Arial Narrow", sans-serif;
  font-size: 2.8rem;
  line-height: 0.8;
  color: var(--yellow);
}

.rules-list h3 {
  margin: 0 0 6px;
  font-size: 2rem;
}

.rules-list p {
  margin: 0;
  max-width: 42rem;
  color: var(--muted);
}

.site-footer {
  padding: 8px 0 28px;
  border-top: 3px solid var(--yellow);
}

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.foot strong {
  font-family: Teko, "Arial Narrow", sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.08em;
}

.foot p {
  margin: 0;
  color: var(--muted);
}

.legal {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.sticky-log {
  display: none;
}

.noscript {
  padding: 12px 16px;
  background: var(--yellow);
  color: var(--navy);
  text-align: center;
}

dialog {
  padding: 0;
  border: 3px solid var(--yellow);
  background: var(--navy);
  color: white;
  width: min(680px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
}

dialog::backdrop {
  background: rgba(4, 8, 24, 0.78);
}

.staff-head,
.staff-body {
  padding: 16px 18px;
}

.staff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--navy);
  border-bottom: 2px solid rgba(255, 229, 0, 0.4);
  z-index: 1;
}

.staff-head h2 {
  margin: 0;
  font-size: 3rem;
}

.staff-body {
  display: grid;
  gap: 14px;
}

.staff-actions,
.reset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.reset-row label {
  flex: 1;
  min-width: 180px;
}

.url-card {
  padding: 12px;
  border: 2px solid var(--yellow);
}

.url-card p,
#staff-msg {
  margin: 0 0 4px;
  color: var(--muted);
}

.url-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}

#staff-charts {
  display: grid;
  gap: 14px;
}

#staff-charts form {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.staff-body h3,
.staff-scores-title {
  margin: 0;
  font-size: 1.8rem;
}

.staff-score {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.staff-score p {
  margin: 0;
}

.staff-score .mini {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini button,
.reset-row button {
  min-height: 40px;
}

section {
  scroll-margin-top: 88px;
}

body.board-only .nav,
body.board-only .hero,
body.board-only .log-section,
body.board-only .games,
body.board-only .rules,
body.board-only .site-footer,
body.board-only .sticky-log,
body.board-only .js-staff-open {
  display: none;
}

body.board-only .board-section {
  padding-top: 18px;
}

body.board-only h2 {
  font-size: clamp(4rem, 8vw, 6.5rem);
}

body.board-only .sheet {
  font-size: 1.35rem;
}

body.board-only .sheet thead th {
  font-size: 2rem;
}

body.board-only .points {
  font-size: 3.4rem;
}

body.board-only .screen-url {
  display: block;
  margin: 18px 0 0;
  text-align: center;
  font-size: 1.2rem;
  color: white;
}

@media (max-width: 860px) {
  .name-pair {
    grid-template-columns: 1fr;
  }

  .hero-grid,
  .log-grid,
  .board-head,
  .foot {
    grid-template-columns: 1fr;
    display: grid;
  }

  .bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "brand pill staff"
      "nav nav nav";
    align-items: center;
    column-gap: 10px;
    row-gap: 4px;
    padding: 10px 0 8px;
  }

  .brand { grid-area: brand; }
  .status { grid-area: pill; min-width: 0; margin: 0; }
  .bar .js-staff-open { grid-area: staff; justify-self: end; }
  .nav {
    grid-area: nav;
    width: 100%;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav a,
  .nav .text-btn {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
  }

  .highway {
    height: 220px;
  }

  h1 {
    font-size: clamp(4.6rem, 24vw, 6.5rem);
  }

  .leaders {
    grid-template-columns: 1fr;
  }

  .tabs,
  .tab-stack {
    justify-content: flex-start;
    justify-items: start;
  }

  .sticky-log {
    display: flex;
    position: fixed;
    z-index: 15;
    left: 12px;
    right: 12px;
    bottom: 12px;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    background: var(--yellow);
    color: var(--navy);
    text-decoration: none;
    font-family: Teko, "Arial Narrow", sans-serif;
    font-size: 1.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  body {
    padding-bottom: 76px;
  }

  body.board-only {
    padding-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lane i { animation: none; top: 42%; }
  h1,
  .highway,
  .status.live,
  .sheet.is-fresh tbody {
    animation: none;
  }
  .btn,
  .tab,
  .nav a,
  .text-btn,
  .leader {
    transition: none;
  }
  .btn:active,
  .tab:active,
  .leader:active {
    transform: none;
  }
}

@media print {
  .topbar,
  .highway,
  .log-section,
  .sticky-log,
  dialog {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    padding: 0;
  }

  .board-section,
  .slab {
    background: white;
  }

  a {
    color: black;
  }
}
