.sfdg-win-dialog {
    padding: 12px;
    z-index: 20;
}
.sfdg-win-dialog .sfdg-modal__backdrop { background: rgb(5 20 15 / .82); }
.sfdg-win-dialog .sfdg-modal__card {
    position: relative;
    z-index: 1;
    width: min(100%, 430px);
    max-height: calc(100dvh - 24px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 0;
    border: 1px solid #c7a979;
    border-radius: var(--sfdg-radius);
    background: #fcf6e9;
    color: #19382c;
    box-shadow: 0 18px 70px #0006;
}
.sfdg-win-dialog .sfdg-modal__close {
    z-index: 1;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #fff5d65e;
    border-radius: var(--sfdg-radius);
    color: #fff5d6;
    background: #19382c;
    line-height: 1;
}
.sfdg-win-dialog .sfdg-win-hero {
    padding: 22px 22px 17px;
    background: radial-gradient(ellipse at 50% 52%, #345d47, #17382c 74%);
    color: #fcf6e9;
    text-align: center;
}
.sfdg-win-dialog #sfdg-win-title {
    margin: 0 36px 14px;
    color: #ffe0a2;
    font: 650 clamp(1.35rem, 6vw, 2rem)/1.15 var(--game-heading, Georgia, serif);
    overflow-wrap: anywhere;
}
.sfdg-win-art {
    position: relative;
    display: grid;
    place-items: center;
    width: min(100%, clamp(155px, 54vw, 210px));
    margin: 0 auto;
}
.sfdg-win-art img {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: var(--sfdg-radius);
    outline: 1px solid #ffe0a2;
    outline-offset: 4px;
    background: #fff;
}
.sfdg-win-art img.has-custom-image {
    background: transparent;
    outline: none;
}
.sfdg-win-sparkles {
    position: absolute;
    z-index: 1;
    inset: 1px -12px auto auto;
    color: #ffdc96;
    font-size: 2.1rem;
    line-height: 1;
    pointer-events: none;
}
.sfdg-win-sparkles::after {
    position: absolute;
    top: 75px;
    right: clamp(145px, 54vw, 210px);
    content: '✧';
    font-size: 1.6rem;
}
.sfdg-win-dialog .sfdg-win-product {
    max-width: 35ch;
    margin: 13px auto 6px;
    color: #fff8e7;
    font-size: .93rem;
    font-weight: 650;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.sfdg-win-prices {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    margin: 8px 0 0;
}
.sfdg-win-prices del { color: #d3dfd6; text-decoration-thickness: 1px; }
.sfdg-win-prices strong { color: #ffe0a2; font-size: 1.45rem; line-height: 1.2; }
.sfdg-win-dialog #sfdg-win-badge {
    position: absolute;
    z-index: 2;
    inset: 6px auto auto 6px;
    padding: 3px 8px;
    border-radius: var(--sfdg-radius);
    color: #3b2617;
    background: #ffe0a2;
    font-size: .76rem;
    font-weight: 800;
}
.sfdg-win-body { padding: 14px 20px 16px; }
.sfdg-win-ticket {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-items: start;
    gap: 2px 10px;
    padding: 8px 12px;
    border: 1px dashed #ad9976;
    border-radius: var(--sfdg-radius);
    background: #fffdf6;
}
.sfdg-win-code-label { font-size: .78rem; font-weight: 700; }
.sfdg-win-ticket .sfdg-copy-code { justify-self: end; }
.sfdg-win-ticket .sfdg-copy-code code {
    padding: 0;
    color: #19382c;
    background: none;
    font-size: clamp(.95rem, 5vw, 1.25rem);
    font-weight: 800;
    letter-spacing: .07em;
}
.sfdg-win-ticket .sfdg-copy-icon {
    width: 44px;
    height: 44px;
    color: #19382c;
    border: 0;
    border-radius: var(--sfdg-radius);
    background: #e6efe7;
}
.sfdg-win-ticket .sfdg-copy-icon:hover { background: #d1e4d6; }
.sfdg-win-ticket #sfdg-win-subtitle {
    grid-column: 1 / -1;
    margin: 0;
    color: #586653;
    font-size: .78rem;
}
.sfdg-win-ticket #sfdg-win-subtitle:empty { display: none; }
.sfdg-win-dialog .sfdg-win-note {
    margin: 10px 0;
    color: #485744;
    font-size: .78rem;
    line-height: 1.4;
}
.sfdg-win-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
}
.sfdg-win-dialog .sfdg-win-actions a {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 7px 12px;
    color: #234636;
    font-size: .87rem;
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: .2em;
}
.sfdg-win-dialog #sfdg-win-link {
    border-radius: var(--sfdg-radius);
    color: #fff9ec;
    background: #951d30;
    text-decoration: none;
}
.sfdg-win-dialog #sfdg-win-link:hover { background: #771628; }
.sfdg-win-dialog [hidden] { display: none !important; }
.sfdg-win-dialog :focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (max-width: 360px) {
    .sfdg-win-body { padding-inline: 12px; }
    .sfdg-win-ticket { column-gap: 5px; padding-inline: 8px; }
}
