.result-dialog { position: fixed; width: min(460px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 28px; overflow: auto; border: 1px solid #8385e5; border-radius: 8px; background: #171d43; color: #fff; box-shadow: 0 24px 80px #050819aa; text-align: center; }
.result-dialog::backdrop { background: #070b20cc; }
.result-close { position: absolute; z-index: 2; top: 10px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #343c70; color: white; font-size: 25px; cursor: pointer; }
.result-icon { position: relative; font-size: 52px; }
.result-dialog h2 { position: relative; margin: 8px 0; font-size: 30px; }
.result-summary { margin: 8px 0; color: #e2e8ff; }
.result-stars { margin: 12px 0; color: #ffd35c; font-size: 27px; }
.result-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 18px 0; text-align: left; }
.result-stats div { padding: 10px; border-radius: 4px; background: #252e5b; }
.result-stats dt { color: #c4caeb; font-size: 12px; }
.result-stats dd { margin: 3px 0 0; overflow-wrap: anywhere; font-weight: 800; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.result-actions .button { min-height: 46px; border: 1px solid #8794c8; background: #303b70; color: #fff; }
.result-actions .button.primary { border-color: #ffd35c; background: #ffd35c; color: #171d43; }
.result-confetti { position: absolute; inset: 0 0 auto; height: 135px; overflow: hidden; pointer-events: none; }
.result-confetti i { position: absolute; top: -20px; left: calc(var(--piece) * 8%); width: 8px; height: 13px; background: #ffd35c; animation: result-fall 1.8s ease-out both; }
.result-confetti i:nth-child(3n) { background: #ff7b99; }
.result-confetti i:nth-child(3n + 1) { background: #79e1da; }
.result-confetti i:nth-child(1){--piece:1}.result-confetti i:nth-child(2){--piece:2}.result-confetti i:nth-child(3){--piece:3}.result-confetti i:nth-child(4){--piece:4}.result-confetti i:nth-child(5){--piece:5}.result-confetti i:nth-child(6){--piece:6}.result-confetti i:nth-child(7){--piece:7}.result-confetti i:nth-child(8){--piece:8}.result-confetti i:nth-child(9){--piece:9}.result-confetti i:nth-child(10){--piece:10}.result-confetti i:nth-child(11){--piece:11}.result-confetti i:nth-child(12){--piece:12}
.result-confetti i:nth-child(even) { animation-delay: .2s; }
.sound-toggle { display: inline-grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; padding: 0; border: 1px solid #8794c8; border-radius: 6px; background: #222b55; color: #fff; font-size: 23px; cursor: pointer; }
.sound-toggle:focus-visible { outline: 3px solid #ffd35c; outline-offset: 3px; }
@keyframes result-fall { to { transform: translateY(145px) rotate(260deg); } }
@media (prefers-reduced-motion: reduce) { .result-confetti { display: none; } }
.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
.reduced-motion .result-confetti { display: none; }
