#winner-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  box-sizing: border-box;
  margin: 0;
  padding: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  isolation: isolate;
}
#winner-dialog[open] {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
}
.winner-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 40px 32px;
  border: 1px solid #91b18e55;
  border-radius: 18px;
  background: #193b2f;
  box-shadow: 0 30px 100px #0008;
}
.winner-confetti {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  --confetti-drop: calc(100vh + 20px);
}
@supports (height: 100dvh) {
  .winner-confetti { --confetti-drop: calc(100dvh + 20px); }
}
.winner-confetti > i {
  position: absolute;
  top: -12px;
  width: 6px;
  height: 10px;
  background: var(--confetti-color);
  border-radius: 1px;
  animation: winner-confetti-fall ease-in both;
}
.winner-confetti > i:nth-child(3n) { width: 5px; height: 5px; }
.winner-confetti > i:nth-child(3n + 1) { width: 4px; height: 9px; border-radius: 50%; }
@keyframes winner-confetti-fall {
  from { opacity: 0; transform: translate3d(0, 0, 0) rotate(0); }
  12% { opacity: .92; }
  75% { opacity: .8; }
  to { opacity: 0; transform: translate3d(var(--drift), var(--confetti-drop), 0) rotate(var(--spin)) rotateY(280deg); }
}
@media (prefers-reduced-motion: reduce) {
  .winner-confetti { display: none; }
}
