:root {
  --ink: #12231c;
  --deep: #0b3d2e;
  --green: #147a4b;
  --lime: #c8f000;
  --lime-deep: #9bc400;
  --cyan: #2ec4d6;
  --orange: #ff7a18;
  --sand: #f3f6ef;
  --card: #ffffff;
  --line: #d7e4da;
  --muted: #6d7f74;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Rubik", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, #d8f58a55, transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 0%, #7ad7e744, transparent 50%),
    linear-gradient(180deg, #eef6ea 0%, #f7faf5 40%, #eef4f0 100%);
  min-height: 100vh;
  position: relative;
}

.bg-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(18, 35, 28, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 35, 28, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 85%);
  z-index: 0;
}

button, input, select { font: inherit; }

header, main {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
}

header {
  padding: 22px 24px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--lime);
  color: var(--deep);
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  font-size: 26px;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-6deg);
  animation: pop-in .5s ease both;
}

.logo-text {
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  font-size: 28px;
  letter-spacing: -1px;
  line-height: 1;
}

.logo-text em {
  font-style: normal;
  color: var(--green);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--lime);
  color: var(--deep);
  box-shadow: 2px 2px 0 var(--ink);
}

.admin-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
}

.admin-link:hover { color: var(--deep); text-decoration: underline; }

main { padding: 8px 24px 40px; }

.hero {
  margin-top: 10px;
  background:
    linear-gradient(135deg, #0f4a36 0%, #146341 45%, #0d7a6a 100%);
  color: #fff;
  border: 3px solid var(--ink);
  border-radius: 28px;
  box-shadow: 0 10px 0 #0a2a1f, 0 18px 40px #0b3d2e33;
  padding: 34px 36px 38px;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 20px;
  align-items: center;
  position: relative;
  overflow: hidden;
  animation: rise .55s ease both;
}

.hero::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -60px;
  top: -80px;
  border: 18px solid #ffffff12;
  border-radius: 40% 60% 55% 45%;
  transform: rotate(18deg);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% 40%;
  height: 180px;
  background: radial-gradient(circle at center, #c8f00033, transparent 60%);
}

.hero-copy { position: relative; z-index: 1; }

.overline {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  color: #d7f7c8;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0 #c8f00088;
  animation: pulse 1.6s infinite;
}

.tagline .milliard {
  font-weight: 800;
  white-space: nowrap;
}

.tagline .milli {
  color: #fff;
}

.tagline .ard {
  color: #1a56ff;
}

h1 {
  margin: 0;
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  font-size: clamp(42px, 7vw, 64px);
  line-height: .95;
  letter-spacing: -2px;
  text-shadow: 0 4px 0 #06281c;
}

h1 span {
  color: var(--lime);
}

.tagline {
  margin: 16px 0 0;
  max-width: 34ch;
  font-size: 15px;
  line-height: 1.45;
  color: #e5f6df;
  font-weight: 500;
}

.period {
  margin: 20px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #cfead8;
}

.period span {
  background: #0a2f24;
  border: 1px solid #2f8f68;
  color: var(--lime);
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}

.hero-badge {
  position: relative;
  z-index: 1;
  width: 160px;
  height: 160px;
  margin-left: auto;
  display: grid;
  place-items: center;
  animation: spin-slow 12s linear infinite;
}

.badge-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px dashed #c8f000aa;
}

.badge-core {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--deep);
  border: 3px solid var(--ink);
  box-shadow: 0 8px 0 #0a2a1f;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0;
  animation: spin-slow 12s linear infinite reverse;
}

.badge-core strong {
  font-family: "Nunito", sans-serif;
  font-size: 42px;
  line-height: 1;
  letter-spacing: -2px;
}

.badge-core small {
  font-size: 14px;
  font-weight: 800;
  margin-top: -2px;
}

.tops-grid {
  margin: -18px 0 24px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  animation: rise .55s ease both;
}

.tops-grid-single {
  grid-template-columns: 1fr;
}

.leaders {
  background: linear-gradient(180deg, #0f4a36 0%, #146341 100%);
  color: #fff;
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: 0 8px 0 #0a2a1f;
  overflow: hidden;
}

.tops-card {
  margin: 0;
  min-width: 0;
}

.leader-empty {
  list-style: none;
  padding: 18px 16px 22px;
  color: #cfead8;
  font-size: 13px;
  font-weight: 700;
}

.leaders-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 16px 22px 10px;
}

.leaders-label {
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -.3px;
}

.leaders-note {
  font-size: 12px;
  font-weight: 700;
  color: #cfead8;
}

.leaders-list {
  list-style: none;
  margin: 0;
  padding: 0 12px 12px;
  display: grid;
  gap: 8px;
}

.leader-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 14px;
  background: #ffffff12;
  border: 1.5px solid #ffffff22;
  border-radius: 16px;
  padding: 12px 14px;
  backdrop-filter: blur(4px);
}

.leader-row.rank-1 {
  background: var(--lime);
  color: var(--deep);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 #0a2a1f;
}

.leader-place {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  font-size: 22px;
  background: #0a2f24;
  color: var(--lime);
  border: 2px solid #ffffff33;
}

.rank-1 .leader-place {
  background: var(--ink);
  color: var(--lime);
  border-color: var(--ink);
}

.leader-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.leader-info strong {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.2px;
}

.leader-info span {
  font-size: 12px;
  font-weight: 600;
  color: #d4eedc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-1 .leader-info span { color: #4d6a3a; }

.leader-score {
  text-align: right;
  line-height: 1.05;
}

.leader-score b {
  display: block;
  font-family: "Nunito", sans-serif;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -1px;
}

.rank-1 .leader-score b { color: var(--deep); }

.leader-score small {
  font-size: 10px;
  font-weight: 700;
  color: #cfead8;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.rank-1 .leader-score small { color: #5d7340; }

.join {
  margin: 0 0 22px;
  background: #fffdf5;
  border: 2px solid var(--ink);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 5px 5px 0 var(--ink);
  animation: rise .65s ease both;
}

.join-copy h2 {
  margin: 0 0 6px;
  font-family: "Nunito", sans-serif;
  font-size: 22px;
  font-weight: 900;
}

.join-copy p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.join-ok {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--lime);
  border: 1.5px solid var(--ink);
  font-weight: 800;
  color: var(--deep);
}

.join-err {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffe5d6;
  border: 1.5px solid #d06520;
  font-weight: 700;
  color: #8a3a00;
}

.join-form {
  display: grid;
  grid-template-columns: 1.4fr .8fr .9fr .7fr auto;
  gap: 10px;
  align-items: end;
}

.manage-form {
  grid-template-columns: 1.4fr 1.2fr .7fr 1fr auto;
  align-items: start;
}

.manage-place {
  display: grid;
  gap: 10px;
}

.manage-place label {
  margin: 0;
}

.check-label .check-wrap {
  height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  box-shadow: 2px 2px 0 #e7d9b8;
}

.cup-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
}

.fives-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fives-controls form {
  margin: 0;
  display: inline;
}

.fives-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  background: #fff;
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  box-shadow: 2px 2px 0 #e7d9b8;
}

.fives-btn:hover:not(:disabled) {
  background: var(--lime);
}

.fives-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.fives-value {
  min-width: 28px;
  text-align: center;
  font-size: 18px;
}

.edit-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--deep);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}

.edit-link:hover {
  color: #2f6b3a;
}

.manage-table tr.is-editing {
  background: #f3fbe4;
}

.edit-cell {
  white-space: nowrap;
}

.cup-btn.yes {
  background: #ffe8b0;
  box-shadow: 2px 2px 0 var(--ink);
}

.cup-btn.no {
  background: #eef2ef;
  opacity: .5;
  border-style: dashed;
}

.join-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--muted);
}

.join-form input,
.join-form select {
  height: 48px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 2px 2px 0 #e7d9b8;
}

.join-form select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 22px, calc(100% - 12px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.manage-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.join-form button {
  height: 48px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--lime);
  color: var(--deep);
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  padding: 0 18px;
  box-shadow: 3px 3px 0 var(--ink);
}

.join-form button:hover { transform: translateY(-1px); }

.cup-col {
  text-align: center !important;
  width: 64px;
}

.cup-cell {
  text-align: center !important;
}

.cup {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  font-size: 16px;
}

.cup.yes {
  background: #ffe8b0;
  box-shadow: 2px 2px 0 var(--ink);
  opacity: 1;
}

.cup.no {
  background: #eef2ef;
  color: transparent;
  text-shadow: 0 0 0 #b7c3bb;
  opacity: .45;
  border-style: dashed;
}

.board {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 5px 5px 0 var(--ink);
  animation: rise .7s ease both;
}

.board-head {
  padding: 20px 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.board-head h2 {
  margin: 0;
  font-family: "Nunito", sans-serif;
  font-size: 22px;
  font-weight: 900;
}

.board-head p {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.controls {
  padding: 18px 22px 12px;
  display: flex;
  gap: 14px;
  align-items: end;
}

.filter-meta {
  padding: 0 22px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  border-bottom: 2px solid var(--line);
}

.filter-meta p {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--deep);
  background: #eef8e4;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
}

.filter-meta p span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  margin-right: 6px;
}

.meta-teacher {
  background: #e8f7fb !important;
}

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 48px;
  padding: 0 14px;
  background: #f4faf2;
  border: 2px solid var(--ink);
  border-radius: 14px;
  flex: 1;
  min-width: 150px;
  box-shadow: 2px 2px 0 #cfe3c8;
}

.search > span { font-size: 22px; color: var(--green); }

.search input {
  width: 100%;
  min-width: 60px;
  background: none;
  border: 0;
  outline: 0;
  font-size: 14px;
  color: var(--ink);
}

.search input::placeholder { color: #90a396; }

.filters {
  display: flex;
  gap: 10px;
  align-items: end;
}

.filters label {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.filters select {
  height: 48px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  max-width: 150px;
  box-shadow: 2px 2px 0 #d7e4da;
}

.reset {
  height: 48px;
  border: 2px solid var(--ink);
  background: #fff4e8;
  color: #b34e00;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--ink);
}

.table-wrap { overflow: auto; }

table {
  border-collapse: collapse;
  text-align: left;
  width: 100%;
}

th {
  font-size: 10px;
  letter-spacing: .6px;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  padding: 14px 18px;
  background: #f5faf3;
  white-space: nowrap;
}

td {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

td:first-child, th:first-child { text-align: center; width: 76px; }
td:last-child, th:last-child { text-align: right; padding-right: 24px; }

.place { font-weight: 800; color: var(--muted); }
.medal { font-size: 22px; }

.person {
  display: flex;
  gap: 12px;
  align-items: center;
}

.person strong {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.avatar {
  width: 36px;
  height: 36px;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 #00000014;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  color: var(--deep);
  transform: rotate(-4deg);
}

.school, .grade {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.score {
  font-size: 24px;
  font-weight: 900;
  color: var(--deep);
  letter-spacing: -.8px;
}

.score span {
  font-size: 15px;
  color: var(--orange);
  margin-left: 6px;
}

.leader { background: #f7fcee; }
.leader:first-child { background: #f4ffc8; }
.leader:first-child .score { color: #6d5600; }

.results {
  padding: 16px 22px;
  border-top: 2px solid var(--line);
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

footer {
  text-align: center;
  padding: 28px 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.scope-tabs {
  display: flex;
  gap: 8px;
  padding: 0 22px 14px;
}

.scope-tab {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 2px 2px 0 #e7d9b8;
}

.scope-tab.is-active {
  background: var(--lime);
  box-shadow: 2px 2px 0 var(--ink);
}

.api-docs {
  max-width: 860px;
}

.api-hero {
  margin: 10px 0 22px;
  padding: 28px 30px;
  background: linear-gradient(135deg, #0f4a36 0%, #146341 45%, #0d7a6a 100%);
  color: #fff;
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: 0 8px 0 #0a2a1f;
}

.api-hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 48px);
}

.api-hero .tagline {
  max-width: 48ch;
}

.api-block,
.api-endpoint {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 18px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 22px 24px;
  margin: 0 0 18px;
}

.api-block h2,
.api-endpoint h3 {
  margin: 0 0 12px;
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  letter-spacing: -.5px;
}

.api-endpoint h3 {
  margin-top: 18px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
}

.api-endpoint > p,
.api-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.api-note {
  margin-top: 12px;
}

.api-endpoint-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.api-endpoint-head code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--deep);
}

.method {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1.5px solid var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
}

.method.get { background: #d8f7e4; color: #0b5c38; }
.method.post { background: #ffe2c4; color: #8a3d00; }
.method.patch { background: #dce8ff; color: #1a3f9c; }

.badge-open,
.badge-staff {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
}

.badge-open { background: var(--lime); color: var(--deep); }
.badge-staff { background: #fff3bf; color: #6d5600; }

.api-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.6;
}

.api-list code,
.api-table code,
.api-note code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .92em;
  background: #eef4ef;
  padding: 1px 5px;
  border-radius: 5px;
}

.api-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.api-table th,
.api-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.api-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
}

.api-code {
  margin: 10px 0 0;
  padding: 14px 16px;
  overflow-x: auto;
  background: #10251c;
  color: #d7f7c8;
  border-radius: 12px;
  border: 2px solid var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre;
}

footer strong {
  color: var(--deep);
  font-family: "Nunito", sans-serif;
  font-weight: 900;
}

footer p {
  margin: 8px 0 0;
  font-size: 11px;
}

.empty {
  text-align: center !important;
  padding: 42px 15px !important;
  color: var(--muted);
}

.empty b {
  display: block;
  font-size: 18px;
  color: var(--deep);
  margin-bottom: 8px;
}

.search:focus-within,
button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 3px solid #9ad0ff;
  outline-offset: 2px;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 #c8f00088; }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pop-in {
  from { opacity: 0; transform: rotate(-6deg) scale(.7); }
  to { opacity: 1; transform: rotate(-6deg) scale(1); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 760px) {
  .tops-grid {
    grid-template-columns: 1fr;
    margin-top: -12px;
  }
  header, main { padding-left: 14px; padding-right: 14px; }
  .logo-text { font-size: 22px; }
  .logo-mark { width: 36px; height: 36px; font-size: 22px; }
  .hero {
    grid-template-columns: 1fr;
    padding: 26px 20px 30px;
    border-radius: 22px;
  }
  .hero-badge {
    width: 110px;
    height: 110px;
    margin: 0;
  }
  .badge-core { width: 78px; height: 78px; }
  .badge-core strong { font-size: 28px; }
  h1 { max-width: 10ch; }
  .tagline { font-size: 14px; }
  .leaders {
    margin: -12px 0 20px;
    border-radius: 20px;
  }
  .leaders-head { padding: 14px 16px 8px; }
  .leader-row {
    grid-template-columns: 40px 1fr auto;
    gap: 10px;
    padding: 10px 12px;
  }
  .leader-place { width: 36px; height: 36px; font-size: 18px; border-radius: 10px; }
  .leader-info strong { font-size: 14px; }
  .leader-score b { font-size: 22px; }
  .controls {
    flex-direction: column;
    align-items: stretch;
  }
  .filters label { flex: 1; }
  .filters select { width: 100%; max-width: none; }
  .avatar { display: none; }
  .person strong { font-size: 13px; }
  th, td { padding: 12px 8px; }
  .score { font-size: 20px; }
  .board-head { flex-direction: column; align-items: flex-start; }
  .join-form,
  .manage-form {
    grid-template-columns: 1fr 1fr;
  }
  .manage-name,
  .manage-place {
    grid-column: 1 / -1;
  }
  .join-form button,
  .manage-form button[type="submit"] {
    grid-column: 1 / -1;
  }
}
