/* The shot and what follows it: the meter, the verdict, the result, the actions and the friends' card. */
/* The meter around the ball. */
.rey-meter {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transition: opacity 0.2s;
}
.rey-meter svg {
  position: absolute;
  left: -120px;
  top: -150px;
  width: 240px;
  height: 240px;
  overflow: visible;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.3));
}
.rey-readout {
  position: absolute;
  left: 0;
  top: -200px;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
}
.rey-readout .num {
  font-size: 42px;
  line-height: 0.9;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.5);
}
.rey-readout small {
  display: block;
  margin-top: 4px;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* The verdict of the contact. */
.rey-toast {
  position: absolute;
  left: 0;
  right: 0;
  top: 28%;
  text-align: center;
  font-weight: 900;
  font-size: 50px;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
}
.rey-toast[data-kind="miss"] {
  color: #ffd3c2;
}
.rey-toast.is-on {
  animation: rey-toast 1.5s var(--out) forwards;
}
@keyframes rey-toast {
  0% {
    opacity: 0;
    transform: scale(1.6);
  }
  14% {
    opacity: 1;
    transform: scale(0.96);
  }
  24% {
    transform: scale(1);
  }
  75% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-24px);
  }
}
.rey-flight {
  position: absolute;
  top: calc(14px + var(--top));
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 8px 18px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.rey-flight .num {
  font-size: 26px;
  line-height: 1;
}

/* Where the ball stopped. */
.rey-result {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(14% + var(--top));
  text-align: center;
  padding: 0 16px;
}
.rr-big {
  font-weight: 900;
  font-size: 108px;
  line-height: 0.9;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}
.rr-big.num {
  letter-spacing: -0.05em;
}
.rr-sub {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}
.rr-sub b {
  color: #fff;
  font-weight: 900;
}
.rr-tag {
  display: inline-block;
  margin-top: 14px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.rey-result.is-in .rr-big {
  animation: rr-pop 0.8s var(--spring) both;
}
.rey-result.is-in .rr-sub,
.rey-result.is-in .rr-tag {
  animation: ri-in 0.7s var(--out) 0.25s both;
}
@keyframes rr-pop {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
.rey-result[data-kind="trouble"] .rr-big {
  font-size: 68px;
  text-transform: uppercase;
  color: #ffe3d8;
}
.rey-result[data-kind="ace"] .rr-big {
  font-size: 62px;
  line-height: 0.95;
  text-transform: uppercase;
  animation: rr-ace 1.1s var(--spring) both;
}
@keyframes rr-ace {
  0% {
    opacity: 0;
    transform: scale(2.4) rotate(-6deg);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
.rey-actions {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(20px + var(--bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rey-actions .row,
.rey-card .row {
  display: flex;
  gap: 10px;
}
.rey-btn {
  flex: 1;
  min-height: 60px;
  border-radius: 14px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--words) !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.18s var(--out);
}
.rey-btn:active {
  transform: scale(0.96);
}
.rey-btn small {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.78;
}
.rey-btn.primary {
  color: var(--navy-deep) !important;
  background: linear-gradient(180deg, var(--coral-hi), var(--coral) 60%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 10px 26px rgba(242, 107, 58, 0.34);
}
.rey-btn.secondary {
  color: #fff !important;
  background: var(--glass-strong) !important;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.rey-note {
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

/* The friends' card. */
.rey-card {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(10px + var(--bottom));
  border-radius: 28px;
  padding: 18px 14px 14px;
  background: rgba(17, 17, 17, 0.8);
  -webkit-backdrop-filter: blur(26px) saturate(1.5);
  backdrop-filter: blur(26px) saturate(1.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 30px 80px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  transform: translateY(115%);
  transition: transform 0.75s var(--out);
}
.rey-card.is-in {
  transform: none;
}
.rc-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 6px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.rc-eyebrow {
  margin: 0;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.rc-head h2 {
  margin: 6px 0 0;
  font-size: 18px;
  font-weight: 700;
}
.rc-score {
  text-align: right;
}
.rc-score > .num {
  display: block;
  font-size: 44px;
  line-height: 0.95;
}
.rc-ace {
  font-family: var(--words);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0;
  text-transform: uppercase;
}
.rc-score small {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.rc-score small b {
  color: #fff;
  font-size: 15px;
}
.rc-list {
  position: relative;
  margin: 10px 0 12px;
  height: calc(var(--rows) * 32px);
}
.rc-row {
  position: absolute;
  left: 0;
  right: 0;
  height: 30px;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  transition:
    transform 0.9s var(--out),
    background 0.4s;
  will-change: transform;
}
.rc-row .pos {
  font-size: 13px;
  color: var(--muted);
}
.rc-row .d {
  font-size: 15px;
  letter-spacing: -0.01em;
}
.rc-row .ghost-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  margin-right: 9px;
  vertical-align: 1px;
}
.rc-row.you {
  z-index: 2;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}
.rc-row.you .pos {
  color: var(--ink);
}
.rc-row.you .ghost-dot {
  background: var(--coral);
}
.rc-row.dim .d {
  color: #ffc8b4;
  font-family: var(--words);
  font-weight: 500;
}
.rey-ghost-label {
  position: absolute;
  left: 0;
  top: 0;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(17, 17, 17, 0.66);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.rey-ghost-label.you {
  background: var(--coral);
  color: var(--navy-deep);
  box-shadow: none;
}

.rey-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.rey-confetti i {
  position: absolute;
  top: -20px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  animation: rey-fall linear forwards;
}
@keyframes rey-fall {
  to {
    transform: translate3d(var(--dx), 110vh, 0) rotate(var(--rot));
  }
}
.rey-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 55%, rgba(255, 240, 220, 0.85), rgba(255, 230, 200, 0) 60%);
  opacity: 0;
  pointer-events: none;
}
.rey-flash.is-on {
  animation: rey-flash 0.9s ease-out;
}
@keyframes rey-flash {
  0% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rl-photo,
  .rey-thumb {
    animation: none;
  }
}
@media (max-height: 700px) {
  .rr-big {
    font-size: 88px;
  }
  .rc-row {
    height: 26px;
  }
}
