:root {
  --blue: #42c6ff;
  --yellow: #ffdb33;
  --pink: #ff4f9a;
  --danger: #ff5276;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.scoreboard-page {
  min-height: 100%;
  background:
    radial-gradient(circle at 85% 14%, rgba(141, 255, 31, .075), transparent 24rem),
    #050d09;
}

.scoreboard-page main {
  overflow: hidden;
}

.scoreboard-topbar {
  position: fixed;
  background: rgba(3, 12, 8, .8);
  backdrop-filter: blur(17px);
  -webkit-backdrop-filter: blur(17px);
}

.desktop-nav .nav-current {
  color: var(--lime);
  opacity: 1;
}

.account-chip {
  position: relative;
  min-height: 52px;
  padding: 6px 10px 6px 7px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(141, 255, 31, .25);
  background: rgba(141, 255, 31, .055);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.account-chip:hover {
  border-color: var(--lime);
  background: rgba(141, 255, 31, .1);
  transform: translateY(-2px);
}

.account-avatar {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  color: #061008;
  background: var(--lime);
  font: 950 12px/1 ui-monospace, monospace;
  clip-path: polygon(10% 0, 90% 0, 100% 10%, 100% 90%, 90% 100%, 10% 100%, 0 90%, 0 10%);
}

.account-copy {
  min-width: 88px;
}

.account-copy small,
.account-copy strong {
  display: block;
}

.account-copy small {
  margin-bottom: 3px;
  color: #7f9187;
  font: 800 7px/1 ui-monospace, monospace;
  letter-spacing: .13em;
}

.account-copy strong {
  max-width: 135px;
  overflow: hidden;
  color: #edf5ef;
  font-size: 11px;
  line-height: 1.1;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  place-items: center;
  border: 2px solid #050d09;
  border-radius: 20px;
  color: #fff;
  background: var(--pink);
  font: 950 10px/1 ui-monospace, monospace;
  box-shadow: 0 0 17px rgba(255, 79, 154, .45);
}

.request-count:not([hidden]) {
  display: grid;
}

.scoreboard-hero {
  position: relative;
  min-height: 650px;
  padding: 128px 18px 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 42px;
  overflow: hidden;
  background:
    radial-gradient(circle at 73% 32%, rgba(141, 255, 31, .15), transparent 27%),
    radial-gradient(circle at 12% 76%, rgba(66, 198, 255, .09), transparent 23%),
    linear-gradient(135deg, #07140e, #030806);
}

.scoreboard-hero::before {
  content: "10";
  position: absolute;
  right: -4vw;
  top: 12%;
  color: rgba(141, 255, 31, .035);
  font-size: clamp(240px, 44vw, 650px);
  font-weight: 950;
  font-style: italic;
  line-height: .75;
  letter-spacing: -.12em;
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: .12;
  background-image:
    linear-gradient(rgba(141, 255, 31, .22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 255, 31, .22) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(115deg, transparent 2%, #000 48%, transparent 100%);
  transform: perspective(650px) rotateY(-9deg) scale(1.15);
}

.hero-ball {
  position: absolute;
  z-index: 1;
  opacity: .28;
  font-size: 35px;
  filter: drop-shadow(0 12px 9px rgba(0, 0, 0, .35));
  pointer-events: none;
}

.hero-ball-one {
  top: 23%;
  right: 11%;
  animation: scoreFloat 5s ease-in-out infinite;
}

.hero-ball-two {
  right: 39%;
  bottom: 12%;
  font-size: 22px;
  animation: scoreFloat 6s 1.1s ease-in-out infinite reverse;
}

.hero-copy,
.player-status {
  position: relative;
  z-index: 2;
}

.hero-copy {
  width: 100%;
}

.hero-copy h1 {
  margin: 12px 0 25px;
  font-size: clamp(66px, 20vw, 112px);
  line-height: .79;
}

.hero-copy > p:not(.hero-kicker) {
  max-width: 580px;
  margin-bottom: 30px;
  color: #b7c6bc;
  font-size: 15px;
  line-height: 1.65;
}

.hero-copy .button {
  width: 100%;
}

.player-status {
  width: 100%;
  padding: 20px;
  border: 1px solid rgba(141, 255, 31, .24);
  border-top: 3px solid var(--lime);
  background:
    linear-gradient(135deg, rgba(141, 255, 31, .08), transparent 65%),
    rgba(4, 18, 12, .88);
  box-shadow: 10px 10px 0 rgba(141, 255, 31, .08);
}

.status-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.status-head small {
  color: #92a399;
  font: 800 8px/1 ui-monospace, monospace;
  letter-spacing: .16em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 14px var(--lime);
  animation: pulse 1.4s infinite;
}

.status-player {
  padding: 20px 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 15px;
}

.status-avatar {
  width: 57px;
  height: 57px;
  display: grid;
  place-items: center;
  color: #061008;
  background: var(--lime);
  font: 950 17px/1 ui-monospace, monospace;
  clip-path: polygon(10% 0, 90% 0, 100% 10%, 100% 90%, 90% 100%, 10% 100%, 0 90%, 0 10%);
}

.status-player strong,
.status-player span {
  display: block;
}

.status-player strong {
  overflow: hidden;
  margin-bottom: 5px;
  font-size: 17px;
  font-style: italic;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-player span {
  color: #7f9187;
  font: 800 8px/1.4 ui-monospace, monospace;
  letter-spacing: .08em;
}

.status-xp {
  padding: 17px 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.status-xp span {
  color: #809188;
  font: 850 8px/1 ui-monospace, monospace;
  letter-spacing: .14em;
}

.status-xp strong {
  color: var(--lime);
  font: 950 33px/.8 ui-monospace, monospace;
  letter-spacing: -.06em;
}

.status-action {
  min-height: 48px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #061008;
  background: var(--lime);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .11em;
  transition: filter .2s ease, transform .2s ease;
}

.status-action:hover {
  filter: brightness(1.1);
  transform: translateX(3px);
}

.status-action b {
  font-size: 18px;
}

.league-section,
.friends-section {
  width: calc(100% - 36px);
  max-width: var(--max);
  margin: 0 auto;
  padding: 90px 0;
}

.section-heading {
  margin-bottom: 40px;
}

.section-heading .section-tag {
  margin-bottom: 34px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.league-mark {
  display: none;
}

.scoreboard-panel {
  overflow: hidden;
  border: 1px solid rgba(141, 255, 31, .21);
  background: #07150e;
  box-shadow: 10px 10px 0 #0a2418;
}

.scoring-rules {
  margin-top: 54px;
  padding-top: 4px;
}

.rules-heading {
  display: grid;
  gap: 22px;
  margin-bottom: 24px;
}

.rules-heading .section-tag {
  margin-bottom: 22px;
}

.rules-heading h3 {
  margin: 0;
  font-size: clamp(38px, 12vw, 58px);
  font-style: italic;
  line-height: .88;
  letter-spacing: -.055em;
}

.rules-heading h3 em {
  color: var(--lime);
  font-style: inherit;
}

.rules-heading > p {
  max-width: 620px;
  margin: 0;
  color: #a9b8af;
  font-size: 15px;
  line-height: 1.65;
}

.score-principles {
  display: grid;
  gap: 10px;
}

.score-principle {
  min-height: 148px;
  padding: 20px 18px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 13px;
  border: 1px solid rgba(255, 255, 255, .12);
  background:
    linear-gradient(125deg, rgba(141, 255, 31, .07), transparent 58%),
    #091912;
}

.score-principle > span {
  color: var(--lime);
  font: 950 15px/1 ui-monospace, monospace;
}

.score-principle h4 {
  margin: 0 0 9px;
  color: #f2f8f4;
  font-size: 15px;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.score-principle p {
  margin: 0;
  color: #a2b1a8;
  font-size: 14px;
  line-height: 1.55;
}

.selected-game-rule {
  margin-top: 12px;
  padding: 21px 19px;
  border: 1px solid rgba(66, 198, 255, .38);
  background:
    linear-gradient(115deg, rgba(66, 198, 255, .13), transparent 68%),
    #081a18;
  box-shadow: inset 4px 0 0 var(--blue);
}

.selected-game-rule > span {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font: 900 10px/1 ui-monospace, monospace;
  letter-spacing: .14em;
}

.selected-game-rule h4 {
  margin: 0 0 9px;
  color: #f4fbf7;
  font-size: clamp(21px, 6vw, 28px);
  font-style: italic;
  line-height: 1;
}

.selected-game-rule p {
  max-width: 850px;
  margin: 0;
  color: #b7c7be;
  font-size: 15px;
  line-height: 1.6;
}

.rule-details-grid {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.score-rule-card {
  border: 1px solid rgba(255, 255, 255, .12);
  background: #08160f;
}

.score-rule-card[open] {
  border-color: rgba(141, 255, 31, .36);
  background:
    linear-gradient(135deg, rgba(141, 255, 31, .07), transparent 62%),
    #091912;
}

.score-rule-card summary {
  min-height: 52px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #e8f1eb;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.score-rule-card summary::-webkit-details-marker {
  display: none;
}

.score-rule-card summary span {
  display: flex;
  align-items: center;
  gap: 11px;
}

.score-rule-card summary i {
  width: 28px;
  flex: 0 0 28px;
  font-style: normal;
  text-align: center;
}

.score-rule-card summary b {
  color: var(--lime);
  font: 900 22px/1 ui-monospace, monospace;
  transition: transform .2s ease;
}

.score-rule-card[open] summary b {
  transform: rotate(45deg);
}

.score-rule-card > div {
  padding: 0 16px 17px 53px;
}

.score-rule-card p {
  margin: 0;
  color: #a9b9b0;
  font-size: 14px;
  line-height: 1.6;
}

.score-rule-card p + p {
  margin-top: 8px;
}

.score-rule-card strong {
  color: var(--lime);
}

.scoreboard-controls {
  padding: 14px;
  display: grid;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .11);
  background: #06110c;
}

.scope-tabs {
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: rgba(255, 255, 255, .045);
}

.scope-tab {
  min-height: 48px;
  padding: 8px 10px;
  border: 0;
  color: #82938a;
  background: transparent;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .07em;
  transition: color .2s ease, background .2s ease;
}

.scope-tab span {
  display: none;
}

.scope-tab.is-active {
  color: #061008;
  background: var(--lime);
  box-shadow: 4px 4px 0 rgba(141, 255, 31, .12);
}

.game-filter {
  display: grid;
  gap: 7px;
}

.game-filter > span {
  color: #73857b;
  font: 850 8px/1 ui-monospace, monospace;
  letter-spacing: .14em;
}

.game-filter select {
  width: 100%;
  height: 50px;
  padding: 0 40px 0 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 0;
  color: #eaf3ed;
  background: #0b1d15;
  font-size: 11px;
  font-weight: 850;
  appearance: auto;
}

.scoreboard-meta {
  min-height: 105px;
  padding: 22px 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  background:
    linear-gradient(110deg, rgba(141, 255, 31, .08), transparent 50%),
    #091912;
}

.scoreboard-meta small {
  display: block;
  margin-bottom: 7px;
  color: var(--lime);
  font: 850 7px/1 ui-monospace, monospace;
  letter-spacing: .14em;
}

.scoreboard-meta h3 {
  margin: 0;
  font-size: clamp(22px, 7vw, 32px);
  line-height: .95;
  font-style: italic;
  letter-spacing: -.04em;
}

.score-key {
  flex: 0 0 auto;
  text-align: right;
}

.score-key span {
  display: block;
  color: #84958b;
  font: 850 7px/1 ui-monospace, monospace;
  letter-spacing: .12em;
}

.score-key b {
  display: block;
  margin-top: 4px;
  color: var(--lime);
  font-size: 18px;
}

.board-state {
  min-height: 310px;
  padding: 42px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.board-state > span {
  margin-bottom: 18px;
  font-size: 48px;
}

.board-state > strong {
  max-width: 520px;
  color: var(--lime);
  font-size: clamp(24px, 7vw, 38px);
  line-height: .95;
  font-style: italic;
  letter-spacing: -.04em;
}

.board-state p {
  max-width: 480px;
  margin: 14px 0 24px;
  color: #8fa097;
  font-size: 14px;
  line-height: 1.6;
}

.board-loading > strong {
  font-size: 16px;
  letter-spacing: .04em;
}

.loading-ball {
  animation: ballRoll 1.4s linear infinite;
}

.board-error > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid var(--danger);
  color: var(--danger);
  font: 950 24px/1 ui-monospace, monospace;
}

.board-error > strong {
  color: var(--danger);
}

.panel-button,
.secondary-button {
  min-height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #061008;
  background: var(--lime);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .1em;
  transition: filter .2s ease, transform .2s ease;
}

.panel-button:hover,
.secondary-button:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
}

.panel-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  filter: grayscale(.5);
  opacity: .6;
  transform: none;
}

.table-wrap {
  overflow-x: auto;
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.score-table th {
  height: 47px;
  padding: 0 12px;
  color: #697b71;
  background: #050f0a;
  font: 850 7px/1 ui-monospace, monospace;
  letter-spacing: .13em;
  text-align: left;
}

.score-table th:first-child {
  width: 62px;
  text-align: center;
}

.score-table th:last-child {
  width: 110px;
  text-align: right;
}

.score-table td {
  height: 79px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, .085);
  background: #081710;
}

.score-table tr {
  transition: transform .2s ease;
}

.score-table tbody tr:hover {
  transform: translateX(3px);
}

.score-table tbody tr.is-me td {
  background: rgba(141, 255, 31, .095);
}

.score-table tbody tr.is-me td:first-child {
  box-shadow: inset 3px 0 0 var(--lime);
}

.rank-cell {
  text-align: center;
}

.rank-number {
  color: #83958a;
  font: 950 18px/1 ui-monospace, monospace;
}

.rank-1 .rank-number {
  color: var(--yellow);
}

.rank-2 .rank-number {
  color: var(--blue);
}

.rank-3 .rank-number {
  color: var(--pink);
}

.player-cell {
  min-width: 0;
}

.table-player {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.table-profile-link {
  border-radius: 2px;
}

.table-profile-link:hover .table-name strong,
.table-profile-link:focus-visible .table-name strong {
  color: var(--lime);
}

.table-profile-link:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 5px;
}

.table-avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #061008;
  background: #62736a;
  font: 950 11px/1 ui-monospace, monospace;
  clip-path: polygon(10% 0, 90% 0, 100% 10%, 100% 90%, 90% 100%, 10% 100%, 0 90%, 0 10%);
}

.rank-1 .table-avatar {
  background: var(--yellow);
}

.rank-2 .table-avatar {
  background: var(--blue);
}

.rank-3 .table-avatar,
.is-me .table-avatar {
  background: var(--lime);
}

.table-name {
  min-width: 0;
}

.table-name strong,
.table-name small {
  display: block;
}

.table-name strong {
  overflow: hidden;
  color: #eef5f0;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-name small {
  margin-top: 4px;
  color: #718278;
  font: 800 7px/1 ui-monospace, monospace;
  letter-spacing: .1em;
}

.table-name .you-label {
  color: var(--lime);
}

.score-cell {
  text-align: right;
}

.score-value,
.score-value small {
  display: block;
}

.score-value strong {
  color: var(--lime);
  font: 950 17px/1 ui-monospace, monospace;
  letter-spacing: -.04em;
}

.score-value small {
  margin-top: 4px;
  color: #6f8077;
  font: 800 7px/1 ui-monospace, monospace;
  letter-spacing: .08em;
}

.friends-section {
  padding-top: 50px;
}

.friends-heading > p {
  max-width: 530px;
  margin: 24px 0 0;
  color: #93a39a;
  font-size: 15px;
  line-height: 1.7;
}

.friends-guest {
  min-height: 330px;
  padding: 34px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 25px;
  border: 1px solid rgba(66, 198, 255, .22);
  background:
    linear-gradient(115deg, rgba(66, 198, 255, .09), transparent 55%),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(66, 198, 255, .035) 40px),
    #07151a;
  box-shadow: 10px 10px 0 rgba(66, 198, 255, .07);
}

.guest-lock {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  color: #07151a;
  background: var(--blue);
  font: 950 22px/1 ui-monospace, monospace;
  transform: rotate(-4deg);
}

.friends-guest small,
.friend-card > small,
.card-title small {
  color: var(--blue);
  font: 850 8px/1 ui-monospace, monospace;
  letter-spacing: .14em;
}

.friends-guest h3 {
  margin: 8px 0 12px;
  font-size: clamp(29px, 8vw, 44px);
  font-style: italic;
  line-height: .95;
  letter-spacing: -.04em;
}

.friends-guest p {
  max-width: 570px;
  margin: 0;
  color: #90a198;
  line-height: 1.6;
}

.friends-dashboard {
  gap: 14px;
}

.friends-dashboard:not([hidden]) {
  display: grid;
}

.friend-side,
.friend-main {
  display: grid;
  gap: 14px;
  align-content: start;
}

.friend-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: #091912;
}

.identity-card {
  border-top: 3px solid var(--blue);
  background:
    radial-gradient(circle at 95% 0, rgba(66, 198, 255, .13), transparent 45%),
    #091912;
}

.invite-card {
  border-top: 3px solid var(--yellow);
  background:
    radial-gradient(circle at 95% 0, rgba(255, 219, 51, .11), transparent 45%),
    #091912;
}

.add-card {
  border-top: 3px solid var(--lime);
}

.card-number {
  position: absolute;
  top: 15px;
  right: 17px;
  color: rgba(255, 255, 255, .19);
  font: 900 9px/1 ui-monospace, monospace;
}

.identity-card h3,
.invite-card h3,
.add-card h3 {
  margin: 10px 0 13px;
  color: #eef5f0;
  font-size: clamp(26px, 8vw, 39px);
  font-style: italic;
  line-height: .95;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}

.identity-card h3 {
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-style: normal;
  letter-spacing: .02em;
}

.identity-card p {
  color: #87988e;
  font-size: 13px;
  line-height: 1.6;
}

.identity-card .secondary-button,
.invite-card .secondary-button {
  width: 100%;
  margin-top: 6px;
}

.identity-card .secondary-button {
  background: var(--blue);
}

.invite-card > small {
  color: var(--yellow);
}

.invite-card h3 {
  color: var(--yellow);
  font-size: clamp(25px, 7vw, 37px);
}

.invite-card > p {
  color: #87988e;
  font-size: 13px;
  line-height: 1.6;
}

.invite-card .secondary-button {
  background: var(--yellow);
}

.invite-link-field {
  margin-top: 16px;
}

.invite-link-field > label {
  display: block;
  margin-bottom: 8px;
  color: #7d8e84;
  font: 850 7px/1 ui-monospace, monospace;
  letter-spacing: .12em;
}

.invite-link-field > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.invite-link-field input {
  width: 100%;
  min-width: 0;
  height: 45px;
  padding: 0 11px;
  border: 1px solid rgba(255, 219, 51, .28);
  border-right: 0;
  border-radius: 0;
  color: #e9eee9;
  outline: none;
  background: #06110c;
  font: 750 9px/1 ui-monospace, monospace;
}

.invite-link-field input:focus {
  border-color: var(--yellow);
  box-shadow: inset 0 0 0 2px rgba(255, 219, 51, .08);
}

.invite-link-field button {
  min-width: 78px;
  border: 0;
  color: #061008;
  background: var(--yellow);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .08em;
}

.invite-card .form-status {
  color: var(--yellow);
}

.invite-card .form-status.is-error {
  color: var(--danger);
}

.add-card form {
  margin-top: 24px;
}

.add-card label {
  display: block;
  margin-bottom: 8px;
  color: #75877c;
  font: 850 8px/1 ui-monospace, monospace;
  letter-spacing: .13em;
}

.friend-code-field {
  display: grid;
  gap: 8px;
}

.friend-code-field input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 0;
  color: #f3f7f4;
  outline: none;
  background: #06110c;
  font: 850 13px/1 ui-monospace, monospace;
  text-transform: uppercase;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.friend-code-field input::placeholder {
  color: #596a60;
  text-transform: none;
}

.friend-code-field input:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(141, 255, 31, .08);
}

.friend-code-field button {
  min-height: 50px;
  border: 0;
  color: #061008;
  background: var(--lime);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .1em;
}

.friend-code-field button:disabled {
  cursor: wait;
  opacity: .6;
}

.form-status {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--lime);
  font-size: 12px;
  line-height: 1.45;
}

.form-status.is-error {
  color: var(--danger);
}

.requests-card {
  border-top: 3px solid var(--yellow);
}

.squad-card {
  border-top: 3px solid var(--lime);
}

.outgoing-card {
  border-top: 3px solid var(--pink);
}

.card-title {
  padding-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.requests-card .card-title small {
  color: var(--yellow);
}

.squad-card .card-title small {
  color: var(--lime);
}

.outgoing-card .card-title small {
  color: var(--pink);
}

.card-title h3 {
  margin: 7px 0 0;
  font-size: clamp(20px, 6vw, 28px);
  line-height: .95;
  font-style: italic;
  letter-spacing: -.035em;
}

.card-count {
  flex: 0 0 auto;
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  color: #061008;
  background: var(--lime);
  font: 950 18px/1 ui-monospace, monospace;
}

.requests-card .card-count {
  background: var(--yellow);
}

.outgoing-card .card-count {
  background: var(--pink);
}

.friend-list {
  display: grid;
}

.friend-row {
  min-height: 78px;
  padding: 13px 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.friend-row:last-child {
  border-bottom: 0;
}

.friend-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #061008;
  background: var(--lime);
  font: 950 11px/1 ui-monospace, monospace;
  clip-path: polygon(10% 0, 90% 0, 100% 10%, 100% 90%, 90% 100%, 10% 100%, 0 90%, 0 10%);
}

.requests-card .friend-avatar {
  background: var(--yellow);
}

.outgoing-card .friend-avatar {
  background: var(--pink);
}

.friend-info {
  min-width: 0;
}

.friend-info strong,
.friend-info small {
  display: block;
}

.friend-info strong {
  overflow: hidden;
  color: #edf4ef;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-info small {
  margin-top: 5px;
  color: #75877d;
  font: 800 8px/1 ui-monospace, monospace;
  letter-spacing: .08em;
}

.friend-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.friend-action {
  min-height: 43px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  color: #dbe6df;
  background: rgba(255, 255, 255, .045);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .08em;
}

.friend-action.primary {
  border-color: var(--lime);
  color: #061008;
  background: var(--lime);
}

.friend-action.danger:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.friend-action:disabled {
  cursor: wait;
  opacity: .5;
}

.empty-list {
  min-height: 105px;
  padding: 22px 5px;
  display: flex;
  align-items: center;
  gap: 13px;
  color: #74867b;
  font-size: 12px;
  line-height: 1.5;
}

.empty-list span {
  font-size: 27px;
  filter: grayscale(.4);
}

.friends-error {
  padding: 28px 24px;
  border: 1px solid rgba(255, 82, 118, .35);
  background: rgba(255, 82, 118, .055);
}

.friends-error strong {
  color: var(--danger);
  font-size: 18px;
  font-style: italic;
}

.friends-error p {
  margin: 10px 0 18px;
  color: #a59599;
  line-height: 1.5;
}

.mobile-nav {
  position: fixed;
  z-index: 80;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 67px;
  padding: 6px 5px max(6px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, .12);
  background: rgba(3, 12, 8, .94);
  backdrop-filter: blur(17px);
  -webkit-backdrop-filter: blur(17px);
}

.mobile-nav a {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #718178;
  opacity: 1;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .06em;
}

.mobile-nav a > span {
  font-size: 20px;
  line-height: 1;
  filter: grayscale(.65);
}

.mobile-nav a > b {
  overflow: hidden;
  max-width: 100%;
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-nav a.is-current {
  color: var(--lime);
}

.mobile-nav a.is-current > span {
  filter: none;
}

.score-toast {
  position: fixed;
  z-index: 160;
  right: 16px;
  bottom: calc(82px + env(safe-area-inset-bottom));
  left: 16px;
  min-height: 48px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #061008;
  background: var(--lime);
  font: 950 10px/1.35 ui-monospace, monospace;
  letter-spacing: .07em;
  text-align: center;
  box-shadow: 7px 7px 0 rgba(141, 255, 31, .15);
  transform: translateY(140px);
  opacity: 0;
  pointer-events: none;
  transition: transform .28s ease, opacity .28s ease;
}

.score-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.score-toast.is-error {
  color: #fff;
  background: var(--danger);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

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

@keyframes scoreFloat {
  50% {
    transform: translate(15px, -22px) rotate(45deg);
  }
}

@keyframes ballRoll {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 560px) {
  .friend-code-field {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .friend-code-field button {
    min-width: 125px;
    padding: 0 18px;
  }

  .friend-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .friend-actions {
    grid-column: auto;
    grid-template-columns: auto auto;
  }

  .friend-action {
    min-width: 92px;
  }

  .score-table th {
    padding-right: 20px;
    padding-left: 20px;
  }

  .score-table td {
    height: 86px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .score-table th:first-child {
    width: 85px;
  }

  .score-table th:last-child {
    width: 160px;
  }

  .table-avatar {
    width: 48px;
    height: 48px;
  }

  .table-name strong {
    font-size: 14px;
  }

  .score-value strong {
    font-size: 21px;
  }
}

@media (min-width: 760px) {
  .scoreboard-page .desktop-nav a {
    display: block;
  }

  .scoreboard-hero {
    min-height: 680px;
    padding: 145px max(4%, calc((100% - var(--max)) / 2)) 90px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(290px, 360px);
    align-items: center;
    gap: clamp(50px, 8vw, 110px);
  }

  .hero-copy h1 {
    font-size: clamp(90px, 12vw, 150px);
  }

  .hero-copy > p:not(.hero-kicker) {
    font-size: 18px;
  }

  .hero-copy .button {
    width: auto;
  }

  .player-status {
    padding: 24px;
    box-shadow: 14px 14px 0 rgba(141, 255, 31, .08);
  }

  .league-section,
  .friends-section {
    width: min(92%, var(--max));
    padding: 120px 0;
  }

  .section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 55px;
  }

  .league-mark {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .league-mark b {
    color: var(--lime);
    font-size: 64px;
    font-style: italic;
    line-height: .75;
  }

  .league-mark span {
    color: #718178;
    font: 850 8px/1.3 ui-monospace, monospace;
    letter-spacing: .12em;
  }

  .scoreboard-panel {
    box-shadow: 18px 18px 0 #0a2418;
  }

  .scoring-rules {
    margin-top: 78px;
  }

  .rules-heading {
    grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr);
    align-items: end;
    gap: 50px;
    margin-bottom: 34px;
  }

  .rules-heading h3 {
    font-size: 66px;
  }

  .rules-heading > p {
    padding-bottom: 3px;
    font-size: 16px;
  }

  .score-principles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .score-principle {
    min-height: 185px;
    padding: 24px 20px;
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .score-principle h4 {
    font-size: 16px;
  }

  .selected-game-rule {
    margin-top: 14px;
    padding: 27px 26px;
  }

  .selected-game-rule p {
    font-size: 16px;
  }

  .rule-details-grid {
    margin-top: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
  }

  .score-rule-card summary {
    min-height: 58px;
    padding-right: 18px;
    padding-left: 18px;
    font-size: 15px;
  }

  .score-rule-card > div {
    padding-right: 20px;
    padding-bottom: 21px;
    padding-left: 57px;
  }

  .scoreboard-controls {
    min-height: 86px;
    padding: 15px 19px;
    grid-template-columns: minmax(400px, 1fr) minmax(250px, 340px);
    align-items: center;
    gap: 25px;
  }

  .scope-tab {
    padding-right: 15px;
    padding-left: 15px;
    font-size: 10px;
  }

  .scope-tab span {
    display: inline;
    margin-right: 4px;
  }

  .scoreboard-meta {
    min-height: 123px;
    padding: 27px 31px;
  }

  .scoreboard-meta h3 {
    font-size: 38px;
  }

  .board-state {
    min-height: 380px;
  }

  .friends-heading {
    align-items: end;
  }

  .friends-heading > p {
    margin: 0 0 9px;
  }

  .friends-guest {
    min-height: 270px;
    padding: 42px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 30px;
  }

  .friends-dashboard:not([hidden]) {
    grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
  }

  .friend-card {
    padding: 28px;
  }

  .mobile-nav {
    display: none;
  }

  .score-toast {
    right: 28px;
    bottom: 28px;
    left: auto;
    width: min(410px, calc(100% - 56px));
  }
}

@media (min-width: 1040px) {
  .friends-dashboard:not([hidden]) {
    grid-template-columns: minmax(320px, .72fr) minmax(0, 1.28fr);
    gap: 18px;
  }

  .friend-side,
  .friend-main {
    gap: 18px;
  }
}

@media (max-width: 759px) {
  .scoreboard-page {
    padding-bottom: calc(67px + env(safe-area-inset-bottom));
  }

  .scoreboard-topbar {
    height: 72px;
    padding: 0 16px;
  }

  .desktop-nav {
    display: none;
  }

  .scoreboard-topbar .brand-name {
    display: none;
  }

  .account-chip {
    min-height: 45px;
    padding: 4px 8px 4px 5px;
  }

  .account-avatar {
    width: 34px;
    height: 34px;
  }

  .account-copy {
    min-width: 72px;
  }

  .account-copy strong {
    max-width: 104px;
    font-size: 10px;
  }

  .scoreboard-page .mobile-nav a {
    display: flex;
  }

  .scoreboard-page footer {
    margin-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-ball,
  .loading-ball,
  .status-dot {
    animation: none;
  }

  .score-toast {
    transition: none;
  }
}
