.game--arena-container {
  position: absolute;
  top: 10dvh;
  left: 0;
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.game--arena {
  position: relative;
  width: 1400px;
  height: 700px;
  flex-shrink: 0;
  transform-origin: center;
}

.game--arena-playfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.game--target-marks {
  position: absolute;
  left: calc(50% - 100px);
  top: calc(50% - 100px);
  width: 200px;
  height: 200px;
  border-left: 1px solid black;
  border-right: 1px solid black;
}

.game--rope-and-players {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.game--character {
  width: 500px;
  height: 250px;
  flex-shrink: 0;
  background-size: 1000px 750px;
  background-repeat: no-repeat;
}

.game--rope-class {
  width: 200px;
  background-position: -650px -500px;
  top: 5px;
  transform: scaleY(0.82);
  user-select: none;
  pointer-events: none;
}

.game--team-right-class {
  background-image: url("/assets/team_right_9e17be0e95378cd0be25d21b0d55b429.webp");
  position: relative;
}

.game--team-left-class {
  background-image: url("/assets/team_left_87a1e67d2ebef20a4c7f2009f4fe0456.webp");
  position: relative;
}

.game--team-left-class.game--character-pose-pulling {
  top: 4px;
}

.game--team-left-class.game--character-pose-surprised {
  top: 4px;
}

.game--team-left-class.game--character-pose-cheering {
  top: -3px;
}

.game--team-left-class.game--character-pose-exhausted {
  top: 5px;
}

.game--team-left-class.game--character-pose-idle {
  top: -3px;
}

.game--team-right-class.game--character-pose-pulling {
  top: 5px;
}

.game--team-right-class.game--character-pose-surprised {
  top: 5px;
}

.game--team-right-class.game--character-pose-cheering {
  top: 4px;
}

.game--team-right-class.game--character-pose-exhausted {
  top: 5px;
}

.game--team-right-class.game--character-pose-idle {
  top: 4px;
}

.game--character-pose-pulling {
  background-position: 0px 0px;
}

.game--character-pose-surprised {
  background-position: -500px 0px;
}

.game--character-pose-idle {
  background-position: 0px -250px;
}

.game--character-pose-cheering {
  background-position: -500px -250px;
}

.game--character-pose-exhausted {
  background-position: 0px -500px;
}

.game--result-label, .game--next-game-countdown {
  position: absolute;
  top: -20px;
  transform: translateX(-50%);
  z-index: 2;
  margin: 0;
  padding: 0.25em 0.7em;
  border-radius: 999px;
  color: #1f2933;
  background-color: rgb(255, 255, 255, 85%);
  box-shadow: 0px 4px 10px rgb(31, 41, 51, 20%);
  font-family: "Segoe UI", "Helvetica Neue", "Arial", sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

.game--next-game-countdown {
  left: 50%;
}

.game--result-label-left {
  left: 62.5%;
}

.game--result-label-right {
  left: 37.5%;
}

.crumble--field:has(.game--player-name-badge) {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 4;
  width: clamp(5.5rem, 28vw, 12rem);
}

.game--player-name-badge {
  margin: 0;
  padding: 0.25em 2em 0.25em 0.6em;
  border: 0;
  border-radius: 999px;
  color: #1f2933;
  background-color: rgb(255, 255, 255, 85%);
  box-shadow: 0px 8px 18px rgb(31, 41, 51, 22%);
  font-family: "Segoe UI", "Helvetica Neue", "Arial", sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
}

.crumble--field:has(.game--player-name-badge)::after {
  content: "edit";
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  color: #1f2933;
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
}

@font-face {
  font-family: "Material Symbols Outlined";
  src: url("/assets/MaterialSymbolsOutlined_e177d49310da41b01a2c1b7df170a00f.ttf");
}

.game--qr-code-area {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 4;
  display: inline-flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.45rem;
  border-radius: 8px;
  background-color: rgb(255, 255, 255, 36%);
  box-shadow: 0px 8px 18px rgb(31, 41, 51, 12%);
  backdrop-filter: blur(1px);
}

.game--qr-code-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.game--qr-code {
  width: 100px;
  height: 100px;
  object-fit: contain;
  pointer-events: none;
}

.game--legal-link {
  display: inline-block;
  padding-top: 0.1rem;
  color: #000000;
  font-family: "Segoe UI", "Helvetica Neue", "Arial", sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .game--qr-code {
    width: 80px;
    height: 80px;
  }

  .game--legal-link {
    font-size: 11px;
  }
}

.game--share-trigger {
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #1f2933;
  background-color: rgb(255, 255, 255, 85%);
  box-shadow: 0px 8px 18px rgb(31, 41, 51, 22%);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.game--notification-trigger {
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #1f2933;
  background-color: rgb(255, 255, 255, 85%);
  box-shadow: 0px 8px 18px rgb(31, 41, 51, 22%);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.game--notification-trigger-hidden {
  display: none;
}

.game--utility-controls {
  position: absolute;
  top: 1rem;
  right: calc((1rem + clamp(5.5rem, 28vw, 12rem)) + 0.5rem);
  z-index: 4;
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 0.35rem;
}

.game--share-trigger-hidden {
  display: none;
}

.game--share-icon {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 19px;
  display: inline-block;
  line-height: 1.5rem;
  text-decoration: none;
}

.game--notification-icon {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 19px;
  display: inline-block;
  line-height: 1.5rem;
  text-decoration: none;
}

.game--notification-popup {
  position: absolute;
  top: 3rem;
  right: calc((1rem + clamp(5.5rem, 28vw, 12rem)) + 0.5rem);
  z-index: 5;
  display: none;
  width: 14rem;
  box-sizing: border-box;
  padding: 0.75rem;
  border: 0;
  border-radius: 8px;
  color: #1f2933;
  background-color: rgb(255, 255, 255, 94%);
  box-shadow: 0px 10px 24px rgb(31, 41, 51, 24%);
  font-family: "Segoe UI", "Helvetica Neue", "Arial", sans-serif;
  font-size: 13px;
  line-height: 1.35;
}

.game--notification-popup-open {
  display: block;
}

.game--notification-popup-text {
  margin: 0 0 0.65rem 0;
  font-weight: 700;
}

.game--notification-subscribe-button {
  width: 100%;
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  border: 0;
  border-radius: 6px;
  color: white;
  background-color: #1f2933;
  font-family: "Segoe UI", "Helvetica Neue", "Arial", sans-serif;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.game--pull-trigger {
  height: 250px;
  width: 500px;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.game--leaderboards {
  position: absolute;
  top: 115px;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 120px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px minmax(0, 1fr);
  pointer-events: none;
}

.game--leaderboard {
  position: relative;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  color: #1f2933;
  font-family: "Segoe UI", "Helvetica Neue", "Arial", sans-serif;
}

.game--leaderboard-left {
  grid-column: 1;
  padding-left: 0.5rem;
}

.game--leaderboard-right {
  grid-column: 3;
  padding-right: 0.5rem;
}

.game--leaderboard-list {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.75rem 0.4rem;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  align-content: start;
  column-gap: 0.35rem;
  row-gap: 0.1rem;
}

.game--leaderboard-list-left {
  direction: rtl;
}

.game--leaderboard-list-right {
  direction: ltr;
}

.game--leaderboard-entry {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 0.3rem;
  min-height: 1.4em;
  padding: 0.14em 0.45em;
  border-radius: 999px;
  background-color: rgb(255, 255, 255, 58%);
  box-shadow: 0px 4px 10px rgb(31, 41, 51, 10%);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  direction: ltr;
  white-space: nowrap;
  overflow: hidden;
}

.game--leaderboard-entry-left {
  justify-content: flex-end;
  text-align: right;
}

.game--leaderboard-current-player {
  border: 1px solid #1d4ed8;
  background-color: rgb(219, 234, 254, 94%);
  box-shadow: 0px 5px 14px rgb(29, 78, 216, 28%);
  color: #0f172a;
  font-weight: 900;
}

.game--leaderboard-current-player-detached {
  align-self: center;
}

.game--leaderboard-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.game--leaderboard-count {
  flex-shrink: 0;
  width: 5ch;
  font-family: monospace;
  font-variant-numeric: "tabular-nums";
}

@media (max-height: 875px) {
  .game--arena {
    transform: scale(0.82);
  }
}

@media (min-width: 1051px) and (max-width: 1300px) {
  .game--arena {
    transform: scale(0.75);
  }
}

@media (max-width: 1050px) {
  .game--arena {
    transform: scale(0.72);
  }
}

@media (max-width: 820px) {
  .game--arena {
    transform: scale(0.58);
  }
}

@media (max-width: 680px) {
  .game--arena {
    transform: scale(0.53);
  }
}

@media (max-width: 1050px) and (max-height: 500px) {
  .game--qr-code-area {
    gap: 0.35rem;
    padding: 0.3rem;
  }

  .game--qr-code {
    width: 52px;
    height: 52px;
  }

  .game--qr-code-links {
    gap: 0.25rem;
  }

  .game--legal-link {
    font-size: 9px;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
  }
}

@media (max-height: 430px) {
  .crumble--field:has(.game--player-name-badge) {
    top: 1rem;
    right: 0.6rem;
    width: clamp(5rem, 24vw, 10rem);
  }

  .game--player-name-badge {
    display: block;
    padding: 0.2em 1.8em 0.2em 0.5em;
    font-size: 12px;
  }

  .crumble--field:has(.game--player-name-badge)::after {
    right: 0.45rem;
    font-size: 14px;
  }

  .game--utility-controls {
    top: 1rem;
    right: calc((0.6rem + clamp(5rem, 24vw, 10rem)) + 0.35rem);
    gap: 0.25rem;
  }

  .game--share-trigger {
    width: 1.25rem;
    height: 1.25rem;
  }

  .game--notification-trigger {
    width: 1.25rem;
    height: 1.25rem;
  }

  .game--share-icon {
    font-size: 16px;
    line-height: 1.25rem;
  }

  .game--notification-icon {
    font-size: 16px;
    line-height: 1.25rem;
  }

  .game--qr-code {
    width: 52px;
    height: 52px;
  }

  .game--qr-code-links {
    gap: 0.2rem;
  }

  .game--legal-link {
    padding-top: 0.05rem;
    font-size: 9px;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
  }

  .game--arena {
    transform: scale(0.69);
  }
}

@media (max-height: 360px) {
  .crumble--field:has(.game--player-name-badge) {
    top: 1rem;
    right: 0.4rem;
    width: clamp(4.5rem, 22vw, 8.5rem);
  }

  .game--player-name-badge {
    padding: 0.15em 1.7em 0.15em 0.45em;
    font-size: 11px;
  }

  .crumble--field:has(.game--player-name-badge)::after {
    right: 0.4rem;
    font-size: 12px;
  }

  .game--utility-controls {
    top: 1rem;
    right: calc((0.4rem + clamp(4.5rem, 22vw, 8.5rem)) + 0.3rem);
    gap: 0.2rem;
  }

  .game--share-trigger {
    width: 1.125rem;
    height: 1.125rem;
  }

  .game--notification-trigger {
    width: 1.125rem;
    height: 1.125rem;
  }

  .game--share-icon {
    font-size: 14px;
    line-height: 1.125rem;
  }

  .game--notification-icon {
    font-size: 14px;
    line-height: 1.125rem;
  }

  .game--qr-code-links {
    gap: 0.15rem;
  }

  .game--legal-link {
    padding-top: 0;
    font-size: 8.5px;
  }

  .game--arena {
    transform: scale(0.48);
  }

  .game--leaderboards {
    top: 115px;
    height: 110px;
  }
}