.gr-result-locked .ranks img,
.gr-result-locked .ranks-cs img {
  opacity: 0.45;
  pointer-events: none;
}

.gr-result-backdrop {
  align-items: center;
  background: rgba(3, 6, 10, 0.72);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  touch-action: none;
  z-index: 2147483000;
}

.gr-result-backdrop.is-open {
  display: flex;
}

@property --gr-result-ring-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.gr-result-modal {
  --gr-result-ring-angle: 0deg;
  --gr-result-ring-color: rgba(135, 153, 232, 0.88);
  animation: grResultRing 11.2s linear infinite;
  background:
    linear-gradient(#0e141c, #0e141c) padding-box,
    conic-gradient(from var(--gr-result-ring-angle), transparent 0deg 70deg, var(--gr-result-ring-color) 96deg, transparent 122deg 230deg, var(--gr-result-ring-color) 258deg, transparent 286deg 360deg) border-box;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62);
  color: #f5f8fc;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  scrollbar-width: none;
  touch-action: auto;
  width: min(940px, calc(100vw - 36px));
}

.gr-result-modal::-webkit-scrollbar {
  display: none;
}

.gr-result-modal.is-result-correct {
  --gr-result-ring-color: rgba(42, 209, 121, 0.95);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62), 0 0 26px rgba(42, 209, 121, 0.22);
}

.gr-result-modal.is-result-wrong {
  --gr-result-ring-color: rgba(232, 84, 84, 0.95);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62), 0 0 26px rgba(232, 84, 84, 0.2);
}

.gr-result-modal.is-result-close {
  --gr-result-ring-color: rgba(240, 184, 77, 0.95);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62), 0 0 26px rgba(240, 184, 77, 0.18);
}

.gr-result-modal.is-game-over {
  --gr-result-ring-color: rgba(135, 153, 232, 0.95);
}

@keyframes grResultRing {
  to {
    --gr-result-ring-angle: 360deg;
  }
}

.gr-result-inner {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  padding: 14px;
}

.gr-result-summary {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
}

.gr-result-state {
  background: #151c25;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 98px;
  padding: 14px;
}

.gr-result-state.is-correct {
  background: linear-gradient(180deg, rgba(42, 209, 121, 0.2), rgba(42, 209, 121, 0.08));
  border-color: rgba(42, 209, 121, 0.6);
}

.gr-result-state.is-wrong {
  background: linear-gradient(180deg, rgba(232, 84, 84, 0.2), rgba(232, 84, 84, 0.08));
  border-color: rgba(232, 84, 84, 0.6);
}

.gr-result-state.is-close {
  background: linear-gradient(180deg, rgba(240, 184, 77, 0.2), rgba(240, 184, 77, 0.08));
  border-color: rgba(240, 184, 77, 0.6);
}

.gr-result-state.is-final {
  background: linear-gradient(180deg, rgba(135, 153, 232, 0.22), rgba(42, 209, 121, 0.08));
  border-color: rgba(135, 153, 232, 0.65);
  text-align: center;
}

.gr-result-title {
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
  text-transform: uppercase;
}

.gr-result-points {
  color: #dbe4f0;
  font-size: 15px;
  font-weight: 800;
  margin-top: 10px;
}

.gr-result-total-score {
  color: #9facbd;
  font-size: 13px;
  font-weight: 700;
  margin-top: 4px;
}

.gr-result-final-message {
  color: #c4cedd;
  display: none;
  font-size: 15px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
  margin: 14px auto 0;
  max-width: 460px;
}

.gr-result-final-message::before,
.gr-result-final-message::after {
  color: rgba(196, 206, 221, 0.62);
  font-size: 20px;
  line-height: 1;
}

.gr-result-final-message::before {
  content: open-quote;
  margin-right: 3px;
}

.gr-result-final-message::after {
  content: close-quote;
  margin-left: 3px;
}

.gr-result-rank-pair {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gr-result-rank-card {
  align-items: center;
  background: #151c25;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 64px minmax(0, 1fr);
  min-height: 74px;
  padding: 10px 12px;
}

.gr-result-rank-card.is-actual {
  border-color: rgba(42, 209, 121, 0.55);
}

.gr-result-rank-card.is-wrong-guess {
  border-color: rgba(232, 84, 84, 0.55);
}

.gr-result-rank-card img {
  height: 52px;
  object-fit: contain;
  width: 52px;
}

.gr-result-rank-label {
  color: #9da9b9;
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.gr-result-rank-name {
  color: #ffffff;
  display: block;
  font-size: 18px;
  font-weight: 900;
  margin-top: 3px;
}

.gr-result-distribution {
  background: #111820;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
}

.gr-result-distribution-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.gr-result-distribution-title {
  color: #f5f8fc;
  font-size: 16px;
  font-weight: 900;
  margin: 0;
}

.gr-result-distribution-total {
  color: #98a5b7;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.gr-result-chart-scroll {
  overflow: hidden;
  width: 100%;
}

.gr-result-chart {
  --gr-rank-count: 9;
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(var(--gr-rank-count), minmax(0, 1fr));
  min-height: 220px;
  width: 100%;
}

.gr-result-bar-item {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-rows: 22px 116px 38px;
  min-width: 0;
}

.gr-result-bar-percent {
  color: #dce4ef;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.gr-result-bar-track {
  align-items: end;
  background: #19222d;
  border-radius: 7px;
  display: flex;
  height: 116px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.gr-result-bar-track::after {
  background: rgba(126, 140, 160, 0.4);
  border-radius: 999px;
  bottom: 0;
  content: "";
  height: 6px;
  left: 0;
  position: absolute;
  right: 0;
}

.gr-result-bar-fill {
  background: #344052;
  border-radius: 7px 7px 0 0;
  position: relative;
  width: 100%;
  z-index: 1;
}

.gr-result-bar-fill.is-actual {
  background: #2fd17d;
  box-shadow: 0 0 22px rgba(47, 209, 125, 0.35);
}

.gr-result-bar-fill.is-guess {
  background: #eb5558;
}

.gr-result-bar-meta {
  align-items: center;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.gr-result-bar-meta img {
  height: 34px;
  max-width: 100%;
  object-fit: contain;
  width: 34px;
}

.gr-result-next-button {
  background: linear-gradient(135deg, #9aa8ff, #6f63d8);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(111, 99, 216, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  justify-self: center;
  letter-spacing: 0;
  min-height: 52px;
  text-transform: uppercase;
  transition: box-shadow 0.15s ease, filter 0.15s ease, transform 0.15s ease;
  width: min(380px, 100%);
}

.gr-result-next-button:hover,
.gr-result-next-button:focus-visible {
  box-shadow: 0 16px 34px rgba(111, 99, 216, 0.54), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  filter: brightness(1.08);
  outline: none;
  transform: translateY(-2px);
}

.gr-result-next-button:active {
  transform: translateY(0);
}

.gr-result-next-button:disabled {
  cursor: wait;
  filter: grayscale(0.1) brightness(0.9);
  opacity: 0.75;
  transform: none;
}

.gr-result-end-panel {
  display: none;
  gap: 14px;
}

.gr-result-modal.is-game-over .gr-result-rank-pair,
.gr-result-modal.is-game-over .gr-result-distribution,
.gr-result-modal.is-game-over .gr-result-next-button {
  display: none;
}

.gr-result-modal.is-game-over .gr-result-inner {
  grid-template-columns: 1fr;
  margin: 0 auto;
  max-width: 680px;
}

.gr-result-modal.is-game-over .gr-result-end-panel {
  display: grid;
}

.gr-result-modal.is-game-over .gr-result-summary {
  grid-template-columns: 1fr;
}

.gr-result-modal.is-game-over .gr-result-state {
  min-height: 118px;
}

.gr-result-modal.is-game-over .gr-result-title {
  font-size: 36px;
}

.gr-result-modal.is-game-over .gr-result-points,
.gr-result-modal.is-game-over .gr-result-total-score {
  display: none;
}

.gr-result-modal.is-game-over .gr-result-final-message {
  display: block;
}

.gr-result-score-hero {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.gr-result-score-value {
  color: #ffffff;
  font-size: clamp(54px, 8vw, 76px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.95;
}

.gr-result-score-value span {
  color: #8799e8;
  font-size: 0.42em;
}

.gr-result-score-progress {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
  width: min(420px, 100%);
}

.gr-result-score-progress-fill {
  background: linear-gradient(90deg, #8799e8, #2ad179);
  border-radius: inherit;
  height: 100%;
  transition: width 0.3s ease;
  width: 0;
}

.gr-result-rounds {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.gr-result-round-pill {
  align-items: center;
  background: #151c25;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  color: #ffffff;
  display: grid;
  font-size: 14px;
  font-weight: 900;
  justify-content: center;
  min-height: 48px;
  padding: 6px 4px;
  text-align: center;
}

.gr-result-round-label {
  color: #8995a7;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.gr-result-round-points {
  line-height: 1.1;
}

.gr-result-round-pill.is-perfect {
  border-color: rgba(42, 209, 121, 0.55);
  color: #8dffbd;
}

.gr-result-round-pill.is-close {
  border-color: rgba(240, 184, 77, 0.55);
  color: #ffd98a;
}

.gr-result-round-pill.is-miss {
  border-color: rgba(232, 84, 84, 0.48);
  color: #ff9c9c;
}

.gr-result-end-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gr-result-end-button {
  align-items: center;
  background: #ffffff;
  border: 0;
  border-radius: 8px;
  color: #071019;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 900;
  justify-content: center;
  min-height: 46px;
  text-decoration: none;
}

.gr-result-end-actions .gr-result-end-button:first-child {
  background: linear-gradient(135deg, #9aa8ff, #6f63d8);
  box-shadow: 0 12px 26px rgba(111, 99, 216, 0.4);
  color: #ffffff;
  grid-column: 1 / -1;
  min-height: 52px;
}

.gr-result-end-actions .gr-result-end-button:nth-child(2):last-child {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(260px, 100%);
}

.gr-result-end-button:hover,
.gr-result-end-button:focus-visible {
  background: #dfe6ff;
  outline: none;
}

.gr-result-end-actions .gr-result-end-button:first-child:hover,
.gr-result-end-actions .gr-result-end-button:first-child:focus-visible {
  background: linear-gradient(135deg, #aeb9ff, #7d70ef);
}

.gr-result-pending-panel {
  align-items: center;
  display: none;
  gap: 12px;
  justify-items: center;
  min-height: 190px;
  padding: 28px 18px;
  text-align: center;
}

.gr-result-modal.is-pending {
  width: min(430px, calc(100vw - 36px));
}

.gr-result-modal.is-pending .gr-result-summary,
.gr-result-modal.is-pending .gr-result-distribution,
.gr-result-modal.is-pending .gr-result-next-button {
  display: none;
}

.gr-result-modal.is-pending .gr-result-pending-panel {
  display: grid;
}

.gr-result-pending-spinner {
  animation: grResultPendingSpin 0.9s linear infinite;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  border-top-color: #9aa8ff;
  height: 34px;
  width: 34px;
}

.gr-result-pending-rank {
  height: 62px;
  object-fit: contain;
  width: 62px;
}

.gr-result-pending-title {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.gr-result-pending-subtitle {
  color: #99a6b8;
  font-size: 13px;
  font-weight: 700;
}

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

@media screen and (min-width: 900px) {
  .gr-result-rank-card img {
    height: 58px;
    width: 58px;
  }

  .gr-result-bar-meta img {
    height: 38px;
    width: 38px;
  }
}

@media screen and (max-width: 720px) {
  .gr-result-backdrop {
    padding: 10px;
  }

  .gr-result-modal {
    max-height: calc(100vh - 20px);
    width: calc(100vw - 20px);
  }

  .gr-result-inner {
    gap: 10px;
    padding: 10px;
  }

  .gr-result-summary,
  .gr-result-rank-pair {
    grid-template-columns: 1fr;
  }

  .gr-result-title {
    font-size: 24px;
  }

  .gr-result-rank-card {
    grid-template-columns: 54px minmax(0, 1fr);
    min-height: 64px;
  }

  .gr-result-rank-card img {
    height: 46px;
    width: 46px;
  }

  .gr-result-rank-name {
    font-size: 16px;
  }

  .gr-result-distribution {
    padding: 10px;
  }

  .gr-result-distribution-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .gr-result-chart {
    gap: 4px;
    min-height: 168px;
  }

  .gr-result-bar-item {
    gap: 4px;
    grid-template-rows: 18px 88px 30px;
  }

  .gr-result-bar-percent {
    font-size: 10px;
  }

  .gr-result-bar-track {
    border-radius: 5px;
    height: 88px;
  }

  .gr-result-bar-fill {
    border-radius: 5px 5px 0 0;
  }

  .gr-result-bar-meta img {
    height: 26px;
    width: 26px;
  }

  .gr-result-rounds {
    gap: 6px;
  }

  .gr-result-round-pill {
    font-size: 12px;
    min-height: 44px;
  }

  .gr-result-round-label {
    font-size: 9px;
  }

  .gr-result-end-actions {
    grid-template-columns: 1fr;
  }
}
