.prayer-pop-lottery[hidden] { display: none !important; }
.prayer-pop-lottery__wheel-wrap[hidden], .prayer-pop-lottery__result[hidden] { display: none !important; }
.prayer-pop-lottery {
    --pp-lottery-primary: var(--global-bg-color, #2755aa);
    position: fixed;
    inset: 0;
    z-index: calc(var(--prayerpop-z-modal, 1100000) + 20);
    display: grid;
    place-items: center;
    padding: 18px;
    font-family: var(--global-font-family, system-ui, sans-serif);
}
.prayer-pop-lottery__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 13, 24, .82);
    backdrop-filter: blur(3px);
}
.prayer-pop-lottery__dialog {
    position: relative;
    width: min(92vw, 650px);
    max-height: calc(100vh - 24px);
    color: #fff;
    outline: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(18px, 3vh, 30px);
    isolation: isolate;
}
.prayer-pop-lottery__intro {
    position: relative;
    z-index: 7;
    width: calc(100% - 110px);
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}
.prayer-pop-lottery__intro h2 { margin: 0 0 8px; color: #fff; font: 700 clamp(24px, 4vw, 36px)/1.15 var(--heading-font-family, inherit); }
.prayer-pop-lottery__intro p { margin: 0; color: #fff; font-size: clamp(14px, 2.2vw, 18px); line-height: 1.4; }
.prayer-pop-lottery__close {
    position: absolute;
    z-index: 8;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0 0 3px;
    border: 2px solid rgba(255,255,255,.75);
    border-radius: 50%;
    background: rgba(0,0,0,.3);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}
.prayer-pop-lottery__stage {
    position: relative;
    width: min(100%, calc(100vh - 170px));
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
}
.prayer-pop-lottery__wheel-wrap { position: absolute; inset: 0; border-radius: 50%; filter: drop-shadow(0 18px 42px rgba(0,0,0,.38)); }
.prayer-pop-lottery__wheel-wrap.is-dissolving { animation: prayer-pop-lottery-wheel-dissolve 320ms ease forwards; }
.prayer-pop-lottery__wheel { width: 100%; height: 100%; overflow: visible; border-radius: 50%; }
.prayer-pop-lottery__wheel.is-settling { animation: prayer-pop-lottery-wheel-settle 260ms cubic-bezier(.2,.75,.3,1); }
.prayer-pop-lottery__segments { transform-origin: 200px 200px; transition: transform 4s cubic-bezier(.16,.78,.14,1); }
.prayer-pop-lottery__segment { stroke: rgba(255,255,255,.62); stroke-width: 2; transition: filter 220ms ease, stroke 220ms ease; }
.prayer-pop-lottery__segment--base { fill: var(--pp-lottery-primary); }
.prayer-pop-lottery__segment--alt { fill: #1f4a99; fill: color-mix(in srgb, var(--pp-lottery-primary) 72%, #102c65); }
.prayer-pop-lottery__segments > .is-winner .prayer-pop-lottery__segment { filter: brightness(1.09) drop-shadow(0 0 5px rgba(255,255,255,.28)); stroke: rgba(255,255,255,.9); }
.prayer-pop-lottery__segment-text { fill: #fff; font: 500 10px/1.1 var(--global-font-family, system-ui, sans-serif); paint-order: stroke; stroke: rgba(0,0,0,.22); stroke-width: 1.5px; }
@keyframes prayer-pop-lottery-wheel-settle {
    0% { transform: rotate(0); }
    42% { transform: rotate(-.85deg); }
    72% { transform: rotate(.2deg); }
    100% { transform: rotate(0); }
}
@keyframes prayer-pop-lottery-wheel-dissolve {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(.985); }
}
.prayer-pop-lottery__pointer {
    position: absolute;
    z-index: 5;
    top: -4px;
    left: 50%;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 42px solid #fff;
    filter: drop-shadow(0 4px 4px rgba(0,0,0,.35));
    transform-origin: 50% 4px;
}
.prayer-pop-lottery__pointer.is-ticking {
    animation: prayer-pop-lottery-pointer-tick 140ms cubic-bezier(.2,.8,.35,1);
}
@keyframes prayer-pop-lottery-pointer-tick {
    0% { transform: translateX(-50%) rotate(0); }
    38% { transform: translateX(-50%) rotate(-10deg); }
    72% { transform: translateX(-50%) rotate(3deg); }
    100% { transform: translateX(-50%) rotate(0); }
}
.prayer-pop-lottery__draw {
    position: absolute;
    z-index: 6;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: clamp(112px, 27%, 164px);
    aspect-ratio: 1;
    padding: 15px;
    border: 5px solid rgba(255,255,255,.8);
    border-radius: 50%;
    background: #fff;
    color: var(--pp-lottery-primary);
    box-shadow: 0 9px 24px rgba(0,0,0,.3);
    font: 750 clamp(14px, 2.6vw, 19px)/1.15 var(--global-font-family, system-ui, sans-serif);
    cursor: pointer;
    transition: transform 110ms ease, box-shadow 110ms ease;
}
.prayer-pop-lottery__draw.is-pressed { transform: translate(-50%, -50%) scale(.94); box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.prayer-pop-lottery__draw:focus-visible, .prayer-pop-lottery__close:focus-visible, .prayer-pop-lottery__confirm:focus-visible { outline: 4px solid #fff; outline-offset: 4px; }
.prayer-pop-lottery__status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.prayer-pop-lottery__translation-template {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.prayer-pop-lottery__result {
    --pp-lottery-prayer-progress: 0deg;
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 3vw, 24px);
    padding: 16% 13%;
    text-align: center;
    background: var(--pp-lottery-primary);
    background: radial-gradient(circle at 35% 25%, color-mix(in srgb, var(--pp-lottery-primary) 82%, white), var(--pp-lottery-primary));
    box-shadow: 0 18px 42px rgba(0,0,0,.38), inset 0 0 0 3px rgba(255,255,255,.45);
    isolation: isolate;
}
.prayer-pop-lottery__result::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    /* CSS conic gradients begin at 12 o'clock, so the prayer minute reads like a clock. */
    background: conic-gradient(rgba(8, 22, 61, .34) 0deg var(--pp-lottery-prayer-progress), transparent var(--pp-lottery-prayer-progress) 360deg);
    pointer-events: none;
    z-index: 0;
}
.prayer-pop-lottery__result > * { position: relative; z-index: 1; }
.prayer-pop-lottery__result.is-praying::before { transition: background 120ms linear; }
.prayer-pop-lottery__result.is-revealing { pointer-events: none; animation: prayer-pop-lottery-result-reveal 320ms ease both; }
@keyframes prayer-pop-lottery-result-reveal {
    from { opacity: 0; transform: scale(.985); }
    to { opacity: 1; transform: scale(1); }
}
.prayer-pop-lottery__instruction { margin: 0; max-width: 100%; font-size: clamp(16px, 2.7vw, 22px); font-weight: 750; overflow-wrap: anywhere; }
.prayer-pop-lottery__prayer { max-width: 100%; max-height: 48%; padding: 0 4px; overflow-y: auto; overflow-wrap: anywhere; font-size: clamp(16px, 2.8vw, 21px); font-weight: 400; line-height: 1.45; scrollbar-width: thin; }
.prayer-pop-lottery__result.is-confirmed .prayer-pop-lottery__prayer { max-height: 48%; overflow-y: auto; font-size: clamp(22px, 4vw, 34px); font-weight: 750; }
.prayer-pop-lottery__timer { display: none; align-items: center; justify-content: center; min-width: 74px; min-height: 38px; padding: 4px 12px; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; background: rgba(255,255,255,.12); font: 700 clamp(16px, 3vw, 21px)/1 var(--global-font-family, system-ui, sans-serif); font-variant-numeric: tabular-nums; }
.prayer-pop-lottery__result.is-praying .prayer-pop-lottery__timer { display: inline-flex; }
.prayer-pop-lottery__timer[hidden] { display: none !important; }
.prayer-pop-lottery__result.is-timer-complete .prayer-pop-lottery__timer { background: rgba(255,255,255,.22); }
.prayer-pop-lottery__start, .prayer-pop-lottery__confirm { border: 2px solid #fff; border-radius: 999px; padding: 12px 22px; background: #fff; color: var(--pp-lottery-primary); font: 750 clamp(14px, 2.5vw, 18px)/1.2 var(--global-font-family, system-ui, sans-serif); cursor: pointer; }
.prayer-pop-lottery__start:hover, .prayer-pop-lottery__confirm:hover { background: #f4f7ff; transform: translateY(-1px); }
.prayer-pop-lottery__start:focus-visible, .prayer-pop-lottery__confirm:focus-visible { outline: 4px solid #fff; outline-offset: 4px; }
.prayer-pop-lottery-open { overflow: hidden !important; }
@media (max-width: 520px) {
    .prayer-pop-lottery { padding: 8px; }
    .prayer-pop-lottery__dialog { width: min(98vw, 520px); }
    .prayer-pop-lottery__dialog { gap: 16px; }
    .prayer-pop-lottery__intro { width: calc(100% - 78px); }
    .prayer-pop-lottery__stage { width: min(100%, calc(100vh - 150px)); }
    .prayer-pop-lottery__segment-text { font-size: 10px; }
    .prayer-pop-lottery__close { width: 36px; height: 36px; font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
    .prayer-pop-lottery__segments { transition-duration: 1ms !important; }
    .prayer-pop-lottery__pointer.is-ticking { animation: none; }
    .prayer-pop-lottery__wheel.is-settling,
    .prayer-pop-lottery__wheel-wrap.is-dissolving,
    .prayer-pop-lottery__result.is-revealing { animation: none; }
    .prayer-pop-lottery__result.is-praying::before { transition: none; }
}
