.jac-hg[data-hg-celebration] .jac-hg__score {
  position: relative;
  isolation: isolate;
  border-color: #b68d4f;
  background: radial-gradient(ellipse at 50% 0%, #473720 0%, #182032 66%, #0d1728 100%);
  box-shadow: inset 0 1px #fff1be38, 0 8px 26px #040a1560;
  white-space: nowrap;
}

.jac-hg[data-hg-celebration] .jac-hg__score :is(.jac-hg__score-label, .jac-hg__score-number) {
  position: relative;
  z-index: 1;
}

.jac-hg[data-hg-celebration] .jac-hg__visual {
  padding-block-start: 79px;
}

.jac-hg[data-hg-celebration] .jac-hg__crown {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  inset-block-start: 0;
  left: 50%;
  width: 100px;
  height: 82px;
  max-width: none;
  object-fit: contain;
  transform-origin: center 80%;
  transform: translate(-50%, -101%) rotate(-6deg);
  filter: drop-shadow(0 3px 2px #0c101a) drop-shadow(0 0 9px #ffc65676);
}

.jac-hg[data-hg-celebration] .jac-hg__platform {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  top: 56%;
  right: 3%;
  width: min(73%, 710px);
  opacity: .15;
  transform: translateY(-50%);
}

.jac-hg[data-hg-celebration] .jac-hg__platform img {
  display: block;
  width: 100%;
  height: auto;
}

.jac-hg[data-hg-celebration] .jac-hg__world {
  display: block;
  color: #ffdc88;
  font: 700 11px/1.6 system-ui, sans-serif;
  letter-spacing: .05em;
  text-align: center;
}

.jac-hg[data-hg-celebration] .jac-hg__replay {
  min-height: 44px;
  margin: 0 0 6px auto;
  padding-inline: 12px;
  border-color: #ba9863;
}

.jac-hg[data-hg-celebration] .jac-hg__replay:hover {
  background: #ffdc881d;
}

.jac-hg__celebration,
.jac-hg__celebration i {
  position: absolute;
  pointer-events: none;
}

.jac-hg__celebration {
  inset: 0;
  overflow: hidden;
  z-index: 5;
}

.jac-hg__celebration i {
  left: var(--hg-x);
  top: var(--hg-y);
  width: var(--hg-size);
  height: calc(var(--hg-size) * .54);
  border-radius: 1px;
  background: var(--hg-color);
  animation: hgConfettiFall var(--hg-duration) linear var(--hg-delay) both;
}

.jac-hg__celebration i:nth-child(6n) {
  height: var(--hg-size);
  border-radius: 50%;
  box-shadow: 0 0 9px var(--hg-color);
}

.jac-hg[data-hg-celebration].hg-play .jac-hg__crown {
  animation: hgCrownLanding 1.36s cubic-bezier(.22,.8,.25,1) both;
}

.jac-hg[data-hg-celebration].hg-play .jac-hg__score::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0;
  border: 1px solid #ffedaf;
  border-radius: inherit;
  animation: hgGoldPulse 1.65s .38s ease-out both;
}

@keyframes hgCrownLanding {
  0% { opacity: 0; transform: translate(-50%, -149%) rotate(-24deg) scale(.77); }
  35% { opacity: 1; }
  59% { transform: translate(-50%, -93%) rotate(5deg) scale(1.1); }
  78% { transform: translate(-50%, -107%) rotate(-13deg) scale(.99); }
  100% { transform: translate(-50%, -101%) rotate(-6deg) scale(1); }
}

@keyframes hgGoldPulse {
  0% { opacity: 0; transform: scale(.94); }
  24% { opacity: .85; }
  100% { opacity: 0; transform: scale(1.22, 1.55); }
}

@keyframes hgConfettiFall {
  0% { opacity: 0; transform: translate3d(0,0,0) rotate(0) scale(.65); }
  8% { opacity: 1; }
  30% { transform: translate3d(var(--hg-apex-x), var(--hg-apex-y), 0) rotate(var(--hg-spin-half)) scale(1); }
  68% { opacity: .96; }
  100% { opacity: 0; transform: translate3d(var(--hg-end-x), var(--hg-end-y), 0) rotate(var(--hg-spin)) scale(.35); }
}

@media (max-width: 650px) {
  .jac-hg[data-hg-celebration] .jac-hg__visual { padding-block-start: 62px; }
  .jac-hg[data-hg-celebration] .jac-hg__crown { width: 84px; height: 69px; }
  .jac-hg[data-hg-celebration] .jac-hg__platform { top: 52%; right: 5%; width: 90%; }
}

@media (max-width: 380px) {
  .jac-hg[data-hg-celebration] .jac-hg__visual { gap: 10px; flex-wrap: wrap; }
  .jac-hg[data-hg-celebration] .jac-hg__score { padding-inline: 8px; }
  .jac-hg[data-hg-celebration] .jac-hg__visual .jac-hg__medal { width: 132px; height: 132px; flex-basis: 132px; }
}

@media (prefers-reduced-motion: reduce) {
  .jac-hg[data-hg-celebration] .jac-hg__celebration,
  .jac-hg[data-hg-celebration] .jac-hg__replay { display: none; }
  .jac-hg[data-hg-celebration].hg-play .jac-hg__crown,
  .jac-hg[data-hg-celebration].hg-play .jac-hg__score::after { animation: none; }
}
