.learning-celebration {
  --celebration-light: #ffb780;
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: min(640px, calc(100% - 28px));
  max-height: calc(100% - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--ui-accent) 39%, var(--ui-surface));
  border-radius: 24px;
  background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--celebration-light) 14%, transparent), transparent 64%), var(--ui-surface);
  color: var(--ui-text);
  box-shadow: 0 28px 90px #130c0890;
  font: inherit;
  text-align: center;
}
.learning-celebration::backdrop {background: #15100cb3}
.learning-celebration-content {position: relative; padding: clamp(36px, 8vw, 60px) clamp(29px, 9vw, 72px) clamp(38px, 7vw, 54px)}
.learning-celebration-medal {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(68px, 17vw, 92px);
  aspect-ratio: 1;
  margin: 0 auto clamp(23px, 5vw, 32px);
  border: 1px solid #ffbd867a;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 25%, #643e28, #30221c 79%);
  box-shadow: inset 0 0 18px #ffae7333, 0 7px 30px #150d0960;
  color: #ffd3a9;
}
.learning-celebration-medal::after {
  position: absolute;
  inset: -7px;
  border: 1px solid #ffbd8680;
  border-radius: inherit;
  opacity: .52;
  content: "";
}
.learning-celebration .learning-celebration-mark {display: block; width: 68%; height: 68%; filter: drop-shadow(0 0 7px #ffae73ad)}
.learning-celebration h2 {margin: 0 0 10px; font-size: clamp(25px, 6.5vw, 40px); line-height: 1.42; text-wrap: balance}
.learning-celebration p {max-width: 38ch; margin: 0 auto clamp(26px, 5vw, 34px); color: var(--ui-muted); font-size: clamp(15px, 3.8vw, 17px); line-height: 1.9; overflow-wrap: anywhere; text-wrap: pretty}
.learning-celebration bdi {color: var(--ui-text); font-weight: 650}
.learning-celebration button {
  min-width: 144px;
  min-height: 48px;
  padding: 8px 22px;
  border: 0;
  border-radius: 12px;
  background: var(--ui-action);
  color: var(--ui-action-on);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.learning-celebration button:hover {background: var(--ui-accent-fill); color: var(--ui-accent-on)}
.learning-celebration button:focus-visible {outline: 2px solid var(--ui-accent); outline-offset: 4px}
.learning-celebration-light,
.learning-celebration-paper {position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none}
.learning-celebration-light::before,
.learning-celebration-light::after {position: absolute; content: ""}
.learning-celebration-light::before {
  inset: -22% 1% 17%;
  background: radial-gradient(ellipse at 50% 38%, #ffac685c, #ff895d23 34%, transparent 64%);
  opacity: .76;
}
.learning-celebration-light::after {
  inset: 0 12% auto;
  height: 3px;
  background: linear-gradient(90deg, transparent 4%, #ffb27b 43%, #ffe0a8 50%, #ffb27b 57%, transparent 96%);
  box-shadow: 0 3px 18px #ffab718a;
  opacity: .55;
}
.learning-celebration-paper i {
  position: absolute;
  top: 0;
  left: var(--paper-start);
  width: 7px;
  height: 11px;
  border-radius: 1px;
  background: var(--paper-color);
  opacity: 0;
}
.learning-celebration-paper i:nth-child(3n) {width: 5px; height: 7px}
.learning-celebration-paper i:nth-child(5n) {width: 6px; height: 6px; border-radius: 50%}
@keyframes learning-paper-flutter {
  0% {opacity: 0; transform: translate(0, -16px) rotate(0)}
  16% {opacity: .86}
  44% {transform: translate(calc(var(--paper-drift) * -.5), 139px) rotate(calc(var(--paper-turn) * .58))}
  74% {opacity: .72}
  100% {opacity: 0; transform: translate(var(--paper-drift), 335px) rotate(var(--paper-turn))}
}
@keyframes learning-celebration-aura {
  0%, 100% {opacity: .62; transform: scale(.94)}
  55% {opacity: 1; transform: scale(1.11)}
}
@keyframes learning-celebration-glint {
  0%, 100% {opacity: .52; transform: translateX(-16%) scaleX(.72)}
  52% {opacity: .96; transform: translateX(16%) scaleX(1)}
}
@keyframes learning-celebration-ring {
  0%, 100% {opacity: .32; transform: scale(.97)}
  54% {opacity: .72; transform: scale(1.075)}
}
@media (prefers-reduced-motion: no-preference) {
  .learning-celebration[open] .learning-celebration-paper i {
    animation: learning-paper-flutter var(--paper-duration) var(--paper-delay) linear infinite both;
  }
  .learning-celebration[open] .learning-celebration-light::before {animation: learning-celebration-aura 4.8s ease-in-out infinite}
  .learning-celebration[open] .learning-celebration-light::after {animation: learning-celebration-glint 6.4s ease-in-out infinite}
  .learning-celebration[open] .learning-celebration-medal::after {animation: learning-celebration-ring 4.8s ease-in-out infinite}
  .learning-celebration[open][data-motion-paused] .learning-celebration-light::before,
  .learning-celebration[open][data-motion-paused] :is(.learning-celebration-medal, .learning-celebration-light)::after,
  .learning-celebration[open][data-motion-paused] .learning-celebration-paper i {animation-play-state: paused}
}
