.scan-result-dialog{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:#fff;color:#242137;overflow:auto}.scan-result-dialog::backdrop{background:#fff}.scan-result-content{position:relative;z-index:1;box-sizing:border-box;min-height:100%;max-width:640px;margin:auto;padding:max(32px,env(safe-area-inset-top)) 24px max(32px,env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:16px}.scan-result-game{font-size:1.25rem;font-weight:800;margin:0}.scan-result-symbol{color:#8b7cae;margin:24px 0}.scan-result-symbol .outcome-symbol{width:clamp(150px,42vw,260px);height:clamp(150px,42vw,260px);filter:drop-shadow(0 14px 18px #34255b18)}.scan-result-dialog .scan-result-symbol{color:var(--game,var(--lotto-primary))}.scan-result-dialog h1{font-size:clamp(1.8rem,6vw,2.8rem);line-height:1.12;margin:0;overflow-wrap:anywhere;letter-spacing:-.04em}.scan-result-description{max-width:440px;font-size:1.08rem;line-height:1.55;margin:0;color:#625c72}.scan-result-prize{font-size:1.6rem;font-weight:800;color:#22865f;margin:0}.scan-result-prize:empty{display:none}.scan-result-note{font-size:.9rem;color:#625c72;margin:8px 0}.scan-result-footer>button.primary{width:100%;max-width:360px;border-radius:18px;padding:18px;font-size:1.05rem}.scan-confetti{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:2}.scan-confetti i{position:absolute;top:-20px;left:var(--x);width:9px;height:17px;border-radius:2px;animation:scan-confetti-fall 3.2s var(--delay) ease-in forwards}@keyframes scan-confetti-fall{to{transform:translateY(110vh) rotate(var(--rotation));opacity:.2}}@media(prefers-reduced-motion:reduce){.scan-confetti{display:none}}@media(prefers-color-scheme:dark){.scan-result-dialog{background:#191621;color:#f6f2ff}.scan-result-description,.scan-result-note{color:#c4bacf}.scan-result-prize{color:#5cd6a2}}
.scan-result-dialog h1:focus{outline:none}

.scan-result-description:empty,.scan-result-note:empty{display:none}
body .scan-result-dialog h1{color:inherit}
body .scan-result-footer>button.scan-result-action{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:24px;min-height:56px;width:min(100%,300px);padding:16px 24px;border:1px solid #ffffff28;border-radius:999px;background:linear-gradient(135deg,#ce246f,#a72265);color:#fff;font-weight:750;box-shadow:0 8px 24px #a7226525}
body .scan-result-footer>button.scan-result-action:hover{background:linear-gradient(135deg,#b51d60,#901b57)}
.scan-result-action span{font-size:1.3em}








.saved-result-feedback{position:fixed;inset:0;z-index:100;pointer-events:none}
.floating-result-message{position:absolute;margin:0;max-width:calc(100vw - 24px);font:700 15px/1.3 system-ui,sans-serif;color:var(--name-primary);text-shadow:0 1px 5px var(--surface,#fff);animation:float-result-message 1.6s ease-out both}
@keyframes float-result-message{0%{opacity:0;transform:translateY(0)}10%{opacity:1}60%{opacity:1;transform:translateY(-24px)}100%{opacity:0;transform:translateY(-24px)}}
@media(prefers-reduced-motion:reduce){.floating-result-message{animation:fade-result-message 1.6s both}@keyframes fade-result-message{0%,90%{opacity:1}100%{opacity:0}}}

/* Centre the symbol in the space between the game title and result footer. */
.scan-result-content{--scan-symbol-size:clamp(150px,42vw,260px);min-height:100dvh;display:grid;grid-template-rows:auto minmax(var(--scan-symbol-size),1fr) auto;justify-items:center;align-items:center;gap:20px}
.scan-result-symbol .outcome-symbol{display:block;width:var(--scan-symbol-size);height:var(--scan-symbol-size)}
.scan-result-content>.scan-result-game{align-self:start}
.scan-result-content>.scan-result-symbol{margin:0;line-height:0}
.scan-result-footer{align-self:end;display:flex;flex-direction:column;align-items:center;gap:12px;width:100%;min-width:0}
body .scan-result-footer>button.scan-result-action{margin-top:8px}
@media(max-height:700px){.scan-result-content{--scan-symbol-size:140px;gap:16px;padding-top:max(20px,env(safe-area-inset-top));padding-bottom:max(20px,env(safe-area-inset-bottom))}}

.scan-progress-spinner{display:inline-block;width:32px;height:32px;box-sizing:border-box;border:3px solid #8b849633;border-top-color:#8b8496;border-radius:50%;animation:scan-progress-spin .8s linear infinite}
@keyframes scan-progress-spin{to{transform:rotate(360deg)}}

/* Keep processing as quiet and compact as the native apps. */
.scan-result-dialog.scan-checking{background:#fff;color:#242329}
.scan-checking .scan-result-content{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:24px}
.scan-checking .scan-result-game,.scan-checking .scan-result-footer>:not(h1){display:none!important}
.scan-checking .scan-result-footer{align-self:auto;gap:0}
body .scan-checking h1{font-size:24px;font-weight:700;line-height:1.3;letter-spacing:normal}
.scan-checking .scan-progress-spinner{width:28px;height:28px}
@media(prefers-color-scheme:dark){.scan-result-dialog.scan-checking{background:#000;color:#f5f0f8}}

/* Let personalised outcome messages wrap instead of squeezing a long name onto one line. */
.scan-result-footer>h1{width:100%;max-width:100%;white-space:normal;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow:hidden;text-align:center}
