/* Shared visitor/Studio shell and reference animations from dmfirst-affiliation. */
.prediction-dialog {
    position: fixed;
    width: min(440px, calc(100% - 36px));
    max-height: calc(100svh - 32px);
    margin: auto;
    padding: 23px 27px 18px;
    overflow: auto;
    border: 1px solid #79e98d;
    border-radius: 4px;
    background: radial-gradient(ellipse at 50% 24%, #143d2080, transparent 52%), linear-gradient(135deg, #07170c, #020b06 65%);
    color: #d8e9db;
    box-shadow: 0 0 0 5px #54ff6b08, 0 0 70px #3dff6626, 0 25px 100px #000b, inset 0 0 50px #27ff4105;
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    text-align: center;
}
.prediction-dialog::backdrop { background: #000703dc; backdrop-filter: blur(7px); }
.prediction-dialog[open] { animation: prediction-preview-enter .35s ease-out both; }
.prediction-dialog::before { content: ""; position: absolute; inset: 7px; border: 1px solid #5bce721c; pointer-events: none; }
.prediction-dialog .deposit-corners { position: absolute; inset: 0; pointer-events: none; }
.prediction-dialog .deposit-corners i { position: absolute; width: 19px; height: 19px; border-color: #b5ffc2; border-style: solid; filter: drop-shadow(0 0 5px #65ff83); }
.prediction-dialog .deposit-corners i:nth-child(1) { top: 0; left: 0; border-width: 2px 0 0 2px; }
.prediction-dialog .deposit-corners i:nth-child(2) { top: 0; right: 0; border-width: 2px 2px 0 0; }
.prediction-dialog .deposit-corners i:nth-child(3) { bottom: 0; right: 0; border-width: 0 2px 2px 0; }
.prediction-dialog .deposit-corners i:nth-child(4) { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.prediction-dialog .deposit-header { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #89b696; font-size: 8px; letter-spacing: 1.1px; text-align: left; }
.prediction-dialog .deposit-header > span { display: flex; gap: 7px; align-items: center; }
.prediction-dialog .deposit-header > span > i { width: 4px; height: 4px; background: #84ff9c; box-shadow: 0 0 6px #84ff9c; border-radius: 50%; }
.prediction-dialog .deposit-header-slash { color: #3d6c48; }
.prediction-dialog .deposit-close { flex: 0 0 32px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; background: #071b0d; border: 1px solid #355c3d; color: #9ac5a5; }
.prediction-dialog .deposit-close svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.4; fill: none; }
.prediction-dialog .deposit-close:hover { background: #173c21; color: #d4ffdf; }
.prediction-period { font-size: 9px; color: #82a98d; margin: -4px 0 16px; overflow-wrap: anywhere; }
.prediction-title {
    margin: 22px 0 16px;
    color: #caffd6;
    font-family: "Segoe UI", sans-serif;
    font-size: 25px;
    letter-spacing: .5px;
    outline: none;
}

.prediction-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #254b30;
}

.prediction-trigger {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 12px 18px;
    border: 1px solid #a2ffb5;
    border-radius: 4px;
    background: linear-gradient(105deg, #46e965, #a1ffad);
    color: #062511;
    font-family: "Segoe UI", sans-serif;
    font-size: 15px;
    font-weight: 750;
}

.prediction-trigger:disabled {
    cursor: default;
}

[data-predict]:not(:disabled) { cursor: pointer; }
[data-predict]:not(:disabled):hover { background: #b0ffbd; }
[data-predict]:focus-visible { outline: 2px solid #e2ffe8; outline-offset: 3px; }

.prediction-reel {
    --reel-height: 49px;
    position: relative;
    height: var(--reel-height);
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.prediction-reel-number { --reel-height: 94px; }
.prediction-reel-track { display: flex; flex-direction: column; }

.prediction-reel-cell {
    display: grid;
    flex: 0 0 var(--reel-height);
    height: var(--reel-height);
    place-items: center;
    min-width: 0;
}

.prediction-reel-cell .prediction-size, .prediction-reel-cell .prediction-color { width: 100%; }
.prediction-reel-placeholder { color: #638b6e; font-size: 28px; }

[data-spinning="true"] .prediction-reel::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(#020a0680, transparent 25%, transparent 75%, #020a0680);
}

.prediction-spin-status {
    min-height: 16px;
    margin: 14px 0 0;
    color: #a4c8ad;
    font-family: "Segoe UI", sans-serif;
    font-size: 11px;
    line-height: 1.5;
}

.prediction-disclosure {
    margin: 5px 0 0;
    color: #80a48a;
    font-size: 8px;
    line-height: 1.5;
}

.prediction-ready-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    padding: 9px 12px;
    overflow: hidden;
    border: 1px solid #b4ef88;
    border-radius: 7px;
    background: radial-gradient(ellipse at 30% 10%, #609b2940, transparent 75%), linear-gradient(110deg, #214b1c, #0b2715);
    box-shadow: inset 0 1px #e4ffb92b, 0 4px 18px #88ff4814;
    color: #efffe1;
    font-family: "Segoe UI", sans-serif;
    font-size: 14px;
    letter-spacing: 1.2px;
    animation: prediction-ready-enter .6s cubic-bezier(.16, 1, .3, 1) both;
}

.prediction-ready-banner[hidden] { display: none; }
.prediction-ready-banner strong { position: relative; z-index: 1; min-width: 0; font-weight: 800; text-transform: uppercase; overflow-wrap: anywhere; text-shadow: 0 1px 8px #bdff6d24; }
.prediction-ready-mark { display: grid; place-items: center; flex: 0 0 24px; height: 24px; border: 1px solid #d6ffae; border-radius: 50%; color: #163b18; background: linear-gradient(135deg, #d5ff9b, #8de58b); animation: prediction-ready-mark-pop .55s cubic-bezier(.2, .8, .2, 1.2) .12s both; }
.prediction-ready-mark svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.prediction-ready-mark path { stroke-dasharray: 20; stroke-dashoffset: 0; animation: prediction-ready-check .35s ease-out .3s both; }

.prediction-ready-banner::before {
    content: "";
    position: absolute;
    inset: 3px;
    border: 1px solid #b8ed7a24;
    border-radius: 4px;
    pointer-events: none;
}

.prediction-ready-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, #eaffba38 50%, transparent 70%);
    animation: prediction-ready-sweep 1.15s ease-out .2s 2 both;
}

@keyframes prediction-ready-enter {
    0% { opacity: 0; transform: translateY(10px) scale(.95); }
    60% { opacity: 1; transform: translateY(-2px) scale(1.015); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes prediction-ready-mark-pop {
    0% { opacity: 0; transform: scale(.4) rotate(-20deg); }
    65% { opacity: 1; transform: scale(1.16) rotate(4deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes prediction-ready-check { from { stroke-dashoffset: 20; } to { stroke-dashoffset: 0; } }
@keyframes prediction-ready-sweep {
    from { transform: translateX(-110%); }
    to { transform: translateX(110%); }
}

[data-prediction-preview][hidden], .prediction-access[hidden],
.prediction-code-form[hidden], .prediction-code-error[hidden], .prediction-unlock-progress[hidden],
.prediction-admin-contact[hidden], [data-prediction-admin-text][hidden], [data-prediction-admin-link][hidden] {
    display: none;
}

.prediction-access { padding-block: 20px 8px; }

.prediction-access-art {
    width: 80px;
    margin-inline: auto;
    color: #9bf4ac;
}

.prediction-access-art svg {
    display: block;
    width: 100%;
    fill: #0d2c19;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
}

.prediction-access-orbit {
    fill: none;
    stroke: #476c50;
    stroke-dasharray: 3 5;
    transform-origin: 40px 40px;
}

.prediction-access-shackle { fill: none; }

.prediction-access-dot {
    display: none;
    fill: #b6ffc6;
    stroke: none;
    transform-origin: 40px 40px;
}

.prediction-dialog[data-access-state="entry"] .prediction-access-art {
    animation: prediction-lock-float 3.6s ease-in-out infinite;
}

.prediction-dialog[data-access-state="entry"] .prediction-access-orbit,
.prediction-dialog[data-access-state="entry"] .prediction-access-dot {
    animation: prediction-access-spin 16s linear infinite;
}

.prediction-dialog[data-access-state="entry"] .prediction-access-dot { display: initial; }

.prediction-access .prediction-title {
    margin: 18px 0 10px;
    font-size: clamp(20px, 5vw, 25px);
}

.prediction-access-help {
    margin: 0 auto 24px;
    max-width: 280px;
    color: #94b59e;
    font-family: "Segoe UI", sans-serif;
    font-size: 12px;
    line-height: 1.6;
}

.prediction-code-form { text-align: left; }

.prediction-code-form label {
    display: block;
    margin-bottom: 8px;
    color: #a7cdb2;
    font-size: 10px;
    letter-spacing: .6px;
}

.prediction-code-form input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid #446e4e;
    border-radius: 5px;
    background: #020b06;
    color: #d4ffdf;
    font-family: "Segoe UI", sans-serif;
    font-size: 16px;
    letter-spacing: 2px;
    caret-color: #a2ffb5;
}

.prediction-code-form input:focus-visible, .prediction-unlock:focus-visible {
    outline: 2px solid #a2ffb5;
    outline-offset: 3px;
}

.prediction-code-form input[aria-invalid="true"] { border-color: #e2a18d; }

.prediction-code-error {
    margin: 10px 0 0;
    color: #f2b5a4;
    font-family: "Segoe UI", sans-serif;
    font-size: 12px;
    line-height: 1.5;
}

.prediction-admin-contact {
    margin: 14px 0 0;
    padding: 13px;
    border: 1px solid #60876a;
    border-left: 3px solid #93e9a5;
    border-radius: 7px;
    background: linear-gradient(120deg, #123a20, #07190d);
    color: #b9d0bf;
    font-family: "Segoe UI", sans-serif;
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.prediction-admin-contact h3 { margin: 0 0 10px; color: #e2ffea; font-size: 15px; font-weight: 700; }
.prediction-admin-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; }
.prediction-admin-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #20482d; }
.prediction-admin-icon svg { width: 22px; height: 22px; fill: none; stroke: #bcf5c9; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.prediction-admin-details { min-width: 0; }
.prediction-admin-caption { display: block; margin-bottom: 2px; color: #9bbbA3; font-size: 9px; letter-spacing: .8px; text-transform: uppercase; }
.prediction-admin-contact a { display: inline-block; color: #d2ffde; font-size: 15px; font-weight: 600; text-decoration: none; }
.prediction-admin-contact a:hover { text-decoration: underline; text-underline-offset: 3px; }
.prediction-admin-contact a:focus-visible { outline: 2px solid #c9ffd6; outline-offset: 3px; }

.prediction-dialog[data-access-state="failed"]::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 2px solid #e68d7c;
    background: radial-gradient(ellipse at 50% 35%, #e34e361a, transparent 75%);
    opacity: 0;
    animation: prediction-access-error .7s ease-out both;
}

.prediction-dialog[data-access-state="failed"] .prediction-access-art { width: 44px; }
.prediction-dialog[data-access-state="failed"] .prediction-access-help { margin-bottom: 14px; }
.prediction-dialog[data-access-state="failed"] .prediction-unlock { margin-top: 12px; }
.prediction-dialog[data-access-state="failed"] .prediction-access-art svg { stroke: #eca18f; fill: #2c1410; }
.prediction-dialog[data-access-state="failed"] .prediction-access-orbit { stroke: #a26c60; fill: none; }
.prediction-dialog[data-access-state="failed"] .prediction-access .prediction-title { color: #f2b5a4; }

@keyframes prediction-access-error {
    0%, 100% { opacity: 0; }
    25% { opacity: 1; }
}

.prediction-unlock { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; cursor: pointer; }
.prediction-unlock-icon { display: inline-flex; flex: 0 0 19px; }
.prediction-unlock-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[data-prediction-lock-icon] { display: none; }
.prediction-unlock:disabled [data-prediction-unlock-icon],
.prediction-dialog[data-access-state="failed"] [data-prediction-unlock-icon] { display: none; }
.prediction-unlock:disabled [data-prediction-lock-icon],
.prediction-dialog[data-access-state="failed"] [data-prediction-lock-icon] { display: inline-flex; }
.prediction-unlock:hover { background: #b0ffbd; }
.prediction-unlock:disabled { opacity: .5; cursor: default; }

.prediction-unlock-progress { padding-block: 12px 20px; }

.prediction-unlock-progress > p {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
    color: #a7cdb2;
    font-size: 10px;
}

.prediction-unlock-progress strong { color: #caffd6; font-variant-numeric: tabular-nums; }

.prediction-progressbar {
    --unlock-progress: 0%;
    height: 10px;
    overflow: hidden;
    border: 1px solid #3f754d;
    border-radius: 99px;
    background: #020b06;
}

.prediction-progressbar > span {
    display: block;
    width: var(--unlock-progress);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2dbb50, #b2ffbf);
}

.prediction-dialog[data-access-state="opening"] .prediction-access-orbit {
    animation: prediction-access-spin 6s linear infinite;
}

.prediction-dialog[data-access-state="ready"] [data-prediction-preview] {
    animation: prediction-preview-enter .3s ease-out both;
}

@keyframes prediction-access-spin { to { transform: rotate(360deg); } }
@keyframes prediction-lock-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
@keyframes prediction-preview-enter {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.prediction-result {
    min-width: 0;
    padding: 13px 12px 14px;
    border: 1px solid #23452d;
    border-radius: 12px;
    background: #020a06;
}

.prediction-result h3 {
    margin: 0 0 12px;
    color: #96baa0;
    font-size: 9px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.prediction-result-numbers {
    grid-column: 1 / -1;
}

.prediction-number-slots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.prediction-number-slot {
    display: grid;
    place-items: center;
    min-width: 0;
    padding: 7px;
    border: 1px solid #183621;
    border-radius: 12px;
    background: #000703;
}

.prediction-number {
    display: block;
    width: 94px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
}

.prediction-size, .prediction-color {
    display: grid;
    place-items: center;
    min-height: 49px;
    padding: 9px 10px;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.2;
}

.prediction-size[data-size="big"] {
    border-radius: 999px 0 0 999px;
    background: #531105;
}

.prediction-size[data-size="small"] {
    border-radius: 0 999px 999px 0;
    background: #071b64;
}

.prediction-color[data-color="green"] {
    border-radius: 0 18px 0 18px;
    background: #1c470f;
}

.prediction-color[data-color="violet"] {
    border-radius: 10px;
    background: #3b0574;
}

.prediction-color[data-color="red"] {
    border-radius: 18px 0 18px 0;
    background: #76150c;
}

@media (max-width: 600px) {
.prediction-title {
        margin-top: 16px;
        font-size: 23px;
    }

    .prediction-result { padding: 11px 9px; }
    .prediction-number { width: 80px; }
    .prediction-reel { --reel-height: 46px; }
    .prediction-reel-number { --reel-height: 80px; }
    .prediction-size, .prediction-color { font-size: 21px; min-height: 46px; }
}

@media (max-height: 450px) {
    .prediction-access { padding-top: 12px; }
    .prediction-access-art { width: 48px; }
    .prediction-access .prediction-title { margin-top: 10px; }
    .prediction-access-help { margin-bottom: 14px; }
    .prediction-content {
        padding-top: 12px;
        margin-top: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .prediction-ready-banner, .prediction-ready-banner::after,
    .prediction-ready-mark, .prediction-ready-mark path,
    .prediction-dialog[data-access-state="failed"]::after,
    .prediction-dialog[data-access-state="entry"] .prediction-access-art,
    .prediction-dialog[data-access-state="entry"] .prediction-access-orbit,
    .prediction-dialog[data-access-state="entry"] .prediction-access-dot,
    .prediction-dialog[data-access-state="opening"] .prediction-access-orbit,
    .prediction-dialog[data-access-state="ready"] [data-prediction-preview] {
        animation: none;
    }
}
