.wn-dialog, .wn-launcher {
    --wn-navy: #091e40;
    --wn-blue: #163d75;
    --wn-orange: #ff8c42;
    --wn-font: Arial, sans-serif;
    font-family: var(--wn-font);
}

/* Aceeasi familie inclusiv pentru controale si etichetele SVG din pagina gazda. */
.wn-dialog *, .wn-launcher * {
    font-family: var(--wn-font) !important;
}

.wn-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    box-sizing: border-box;
    border: 1px solid #31588a;
    padding: 0;
    width: min(1160px,calc(100% - 32px));
    max-width: none;
    max-height: calc(100dvh - 32px);
    color: #fff;
    background: radial-gradient(ellipse at 15% 15%,#245b97 0,transparent 60%),#091e40;
    border-radius: 24px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 0 28px 100px #0007;
}

.wn-dialog::backdrop {
    background: #06172bc2;
    backdrop-filter: blur(5px);
}

.wn-dialog * {
    box-sizing: border-box;
}

.wn-dialog [hidden], .wn-launcher[hidden] {
    display: none!important;
}

.wn-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    min-height: 570px;
    padding: 54px 40px 40px;
    gap: 32px;
}

.wn-dialog .wn-close {
    position: absolute;
    right: 16px;
    top: 12px;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    max-width: 44px;
    max-height: 44px;
    aspect-ratio: 1;
    padding: 0!important;
    margin: 0;
    background: #ffffff0a;
    color: white;
    border: 1px solid #ffffff40;
    border-radius: 50%;
    font: 32px/1 Arial;
    cursor: pointer;
    z-index: 2;
}

.wn-close:hover {
    background: #ffffff18;
}

.wn-dialog button:focus-visible, .wn-launcher:focus-visible, .wn-dialog input:focus-visible, .wn-dialog a:focus-visible {
    outline: 3px solid #ffad75;
    outline-offset: 4px;
}

.wn-art {
    min-width: 0;
}

.wn-content {
    min-width: 0;
    overflow-wrap: anywhere;
}

.wn-wheel-wrap {
    position: relative;
    aspect-ratio: 1;
    width: 100%;
    max-width: 560px;
    margin: auto;
    filter: drop-shadow(0 18px 22px #0005);
}

.wn-wheel {
    display: block;
    width: 100%;
    height: 100%;
    border: 10px solid #ff8c42;
    border-radius: 50%;
    background: #163d75;
}

/* Randare identica a textului la orice unghi (fara hinting pe pixeli). */
.wn-dialog .wn-wheel,
.wn-dialog .wn-wheel text,
.wn-dialog .wn-wheel tspan {
    text-rendering: geometricPrecision !important;
    -webkit-font-smoothing: antialiased;
    font-kerning: none;
    font-variant-ligatures: none;
}

/* Tipografie identica pe toate segmentele, inclusiv pe premiile cu nume lung. */
.wn-dialog .wn-wheel text,
.wn-dialog .wn-wheel tspan {
    font-family: var(--wn-font) !important;
    font-weight: 700 !important;
    font-style: normal !important;
    font-stretch: normal !important;
    letter-spacing: 0 !important;
    word-spacing: 0 !important;
}

.wn-dialog .wn-wheel tspan {
    font-size: inherit !important;
}

.wn-pointer {
    position: absolute;
    right: -9px;
    top: 50%;
    width: 45px;
    height: 38px;
    transform: translateY(-50%);
    background: #ff8c42;
    clip-path: polygon(0 50%,100% 0,100% 100%);
    filter: drop-shadow(0 2px 2px #0008);
}

.wn-hub {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border: 5px solid #fff;
    background: #ff8c42;
    color: #091e40;
    border-radius: 50%;
    font-size: 28px;
    box-shadow: 0 3px 12px #0005;
}

.wn-caption {
    text-align: center;
    color: #d2e6ff;
    font-size: 13px;
    margin: 24px 0 0;
}

.wn-tag {
    display: inline-block;
    border: 1px solid #7593b4;
    border-radius: 12px;
    padding: 8px 14px;
    color: #d9ebff;
    font-size: 13px;
}

.wn-content #wheel-title {
    color: #fff;
    font-size: clamp(30px,3.5vw,46px);
    line-height: 1.12;
    letter-spacing: -.025em;
    margin: 24px 0 18px;
    text-wrap: balance;
}

.wn-content #wheel-title span {
    color: #fff;
}

.wn-content>p {
    font-size: 16px;
    line-height: 1.65;
    color: #d2e6ff;
    margin: 0 0 25px;
}

.wn-primary {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 17px 22px;
    background: #ff8c42;
    color: #091e40;
    font-size: 16px;
    font-weight: 750;
    cursor: pointer;
    min-height: 54px;
}

.wn-primary span {
    float: right;
}

.wn-primary:hover {
    background: #ffa66b;
}

.wn-primary:disabled {
    opacity: .65;
    cursor: wait;
}

.wn-content .wn-note {
    font-size: 12px;
    color: #b9cde5;
    margin: 14px 0 0;
}

.wn-content .wn-status {
    margin: 12px 0 0;
    min-height: 5px;
    font-size: 14px;
    color: #ffcfac;
}

.wn-result {
    margin: 24px 0;
}

.wn-result-label {
    margin: 0;
    color: #dcecff;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
}

.wn-dialog .wn-result h2 {
    font-size: clamp(20px, 2.3vw, 20px);
    line-height: 1.25;
    color: #ffad75;
    margin: 8px 0 14px;
    overflow-wrap: anywhere;
}

.wn-dialog #wheel-promotion-description {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.55;
    color: #d2e6ff;
}

.wn-dialog .wn-prize-image {
    display: block;
    width: 100%;
    max-width: 360px;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    margin: 0 auto 18px;
    border-radius: 12px;
}

.wn-dialog #wheel-promotion-link-row {
    margin: 0 0 20px;
}

.wn-dialog #wheel-promotion-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #ffad75;
    border-radius: 9px;
    background: #ffffff08;
    color: #ffcfac;
    font: 600 14px/1.4 "Segoe UI", Arial, sans-serif;
    text-align: center;
    text-decoration: none;
    white-space: normal;
}

.wn-dialog #wheel-promotion-link:hover {
    background: #ffad7520;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.wn-result label {
    display: block;
    margin-bottom: 9px;
    font-size: 13px;
    color: #d2e6ff;
}

.wn-code-row {
    display: flex;
    gap: 8px;
}

.wn-code-row input {
    min-width: 0;
    width: 100%;
    border: 1px dashed #93b0d5;
    background: #ffffff0a;
    color: #fff;
    padding: 14px 10px;
    border-radius: 8px;
    font: 700 17px "Segoe UI",Arial,sans-serif;
    letter-spacing: .04em;
}

.wn-code-row button {
    border: 0;
    border-radius: 8px;
    background: #e0edff;
    color: #091e40;
    padding: 12px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}

.wn-help {
    font-size: 13px;
    line-height: 1.5;
    color: #d2e6ff;
    margin: 12px 0 0;
}

.wn-launcher {
    position: fixed;
    right: max(16px,env(safe-area-inset-right));
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    z-index: 30;
    display: flex;
    gap: 12px;
    align-items: center;
    box-sizing: border-box;
    max-width: calc(100vw - 32px);
    margin: 0;
    border: 1px solid #31588a;
    z-index: 999;
    border-radius: 999px;
    padding: 12px 18px 12px 12px!important;
    background: linear-gradient(135deg,#163d75,#091e40);
    color: #fff;
    box-shadow: 0 10px 30px #091e4030;
    font-size: 16px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: box-shadow .2s,border-color .2s;
    animation: wn-launcher-pulse 2.8s ease-out infinite;
}

@keyframes wn-launcher-pulse {
    0%, 100% {
        box-shadow: 0 10px 30px #091e4030, 0 0 0 0 #ff8c4200;
    }

    20% {
        box-shadow: 0 10px 30px #091e4030, 0 0 0 0 #ff8c4250;
    }

    70% {
        box-shadow: 0 10px 30px #091e4030, 0 0 0 12px #ff8c4200;
    }
}

.wn-launcher:hover {
    animation: none;
    border-color: #ff8c42;
    box-shadow: 0 12px 34px #091e4050;
}

.wn-launcher-icon {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ff8c42;
    color: #091e40;
}

.wn-launcher-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.2;
}

.wn-launcher-caption {
    font-size: 11px;
    font-weight: 500;
    color: #d2e6ff;
}

.wn-launcher-text>span:last-child>span {
    margin-left: 8px;
    color: #ffad75;
}

@media(max-width:760px) {
    .wn-caption{
        display: none;
    }
    .wn-tag{
        display: none;
    }
    /* .wn-period{
        display: none !important;
    } */
    .wn-launcher {
        right: max(10px,env(safe-area-inset-right));
        padding: 10px;
        border-radius: 999px;
        gap: 9px;
        font-size: 14px;
    }

    .wn-launcher-icon {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
        border-radius: 50%;
    }

    .wn-content #wheel-title {
        font-size: 32px;
        margin: 0 0 10px;
    }
    .wn-result label{
        font-size:16px;
    }


}

@media(max-width:360px) {
    .wn-content #wheel-title {
        font-size: 28px;
    }

}

@media(max-width:760px) {
    .wn-dialog {
        width: calc(100% - 24px);
        max-height: calc(100dvh - 24px);
        border-radius: 20px;
    }
    /* .wheel-title{
        display: none;
    } */

    .wn-layout {
        grid-template-columns: 1fr;
        gap: 14px;
        min-height: 0;
        padding: 50px 20px 18px;
    }

    .wn-wheel-wrap {
        max-width: 340px;
    }

    .wn-wheel {
        border-width: 7px;
    }

    .wn-hub {
        width: 48px;
        height: 48px;
        border-width: 4px;
        font-size: 22px;
    }

    .wn-pointer {
        width: 34px;
        height: 30px;
        right: -7px;
    }

    .wn-caption {
        margin-top: 8px;
    }

    .wn-content {
        text-align: center;
    }

    .wn-content h1 {
        font-size: 32px;
        margin: 0 0 10px;
    }

    .wn-content>p {
        margin-bottom: 12px;
        line-height: 1.45;
    }

    .wn-tag {
        margin-bottom: 14px;
    }

    .wn-has-result #wheel-description {
        display: none;
    }

    .wn-result {
        margin: 10px 0 14px;
    }

    .wn-result-label {
        font-size: 18px;
    }

    .wn-dialog .wn-result h2 {
        font-size: 23px;
        margin: 4px 0 14px;
    }

    .wn-dialog #wheel-promotion-link {
        width: 100%;
    }

    .wn-result label {
        margin-bottom: 6px;
    }

    .wn-help {
        margin: 8px 0 0;
        line-height: 1.4;
    }

    .wn-primary {
        padding: 13px 18px;
        min-height: 48px;
    }

    .wn-content .wn-status {
        margin-top: 8px;
    }

    .wn-content .wn-status:empty {
        min-height: 0;
        margin: 0;
    }

    .wn-content .wn-note {
        margin-top: 8px;
        line-height: 1.4;
    }

    .wn-code-row {
        text-align: left;
    }

    .wn-note {
        padding: 0 4px;
    }

}

@media(max-width:360px) {
    .wn-layout {
        padding-left: 16px;
        padding-right: 16px;
    }

    .wn-code-row {
        flex-direction: column;
    }

    .wn-content h1 {
        font-size: 28px;
    }

}

@media(prefers-reduced-motion:reduce) {
    .wn-wheel {
        will-change: auto;
    }

    .wn-launcher {
        transition: none;
        animation: none;
    }

}
.wn-period {
    display: inline-block !important;
    margin: 0 0 12px!important;
    padding: 4px 12px!important;
    font-size: 12px!important;
    font-weight: 500!important;
    color: rgba(255, 255, 255, .85)!important;
    background: rgba(255, 255, 255, .08)!important;
    border: 1px solid rgba(255, 255, 255, .25)!important;
    border-radius: 12px!important;
}