.win-screen {
    width: min(24rem, calc(100% - 2rem));
    box-sizing: border-box;
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid #a9d8aa;
    border-radius: 8px;
    background: #103c2c;
    color: white;
    box-shadow: 0 8px 24px #0006;
    text-align: center;
    font: inherit;
}

.win-screen::backdrop {
    background: rgb(0 0 0 / 45%);
}

.win-screen[open] {
    animation: win-screen-enter 240ms ease-out both;
}

.win-screen-content {
    position: relative;
    padding: 1.5rem 1rem;
}

.win-screen-cards {
    display: flex;
    justify-content: center;
    margin-block: .25rem .875rem;
}

.win-screen-cards .card {
    width: 2.75rem;
    height: 4rem;
    margin: 0;
    font-size: 1rem;
    transform: rotate(-10deg);
    box-shadow: 0 2px 5px #0005;
}

.win-screen-cards .card + .card {
    margin-inline-start: -.55rem;
    transform: rotate(10deg);
}

.win-screen-cards .card-suit {
    font-size: inherit;
}

.win-screen h2 {
    margin: 0;
    font-size: clamp(1.75rem, 6vw, 2.25rem);
    line-height: 1.1;
}

.win-screen p {
    margin: .5rem auto 1rem;
    max-width: 30ch;
    overflow-wrap: anywhere;
}

.win-screen .game-button {
    min-height: 44px;
    padding: .5rem 1rem;
    font-size: 1rem;
}

.win-screen button:focus-visible {
    outline: 2px solid white;
    outline-offset: 3px;
}

.win-screen-confetti {
    position: absolute;
    z-index: 1;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.win-screen-confetti i {
    position: absolute;
    top: -.75rem;
    width: .38rem;
    height: .65rem;
}

@keyframes win-screen-enter {
    from { opacity: 0; transform: translateY(.5rem) scale(.97); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .win-screen[open] { animation: none; }
    .win-screen .game-button { transition: none; }
}
