@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap");

@font-face {
    font-family: "Atelier";
    src: url("/assets/fonts/atelier.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --ink: #ffffff;
    --ink-soft: rgba(255, 255, 255, 0.74);
    --navy: #073956;
    --lime: #e9ff61;
    --glass: rgba(233, 244, 231, 0.42);
    --glint-x: 45%;
    --glint-y: 42%;
    --page-background:
        linear-gradient(180deg, rgba(0, 30, 68, 0.62) 0%, rgba(15, 74, 98, 0.26) 48%, rgba(70, 120, 60, 0.38) 100%),
        url("/assets/lenticular-sky.jpg") center / cover no-repeat,
        #075083;
    --font-heading: "Atelier", "Poppins", "PingFang SC", "PingFang TC", "Noto Sans SC", "Noto Sans TC", system-ui, sans-serif;
    --font-subheading: "Poppins", "PingFang SC", "PingFang TC", "Noto Sans SC", "Noto Sans TC", system-ui, sans-serif;
    --font-text: "Poppins", "PingFang SC", "PingFang TC", "Noto Sans SC", "Noto Sans TC", system-ui, sans-serif;
    font-family: var(--font-text);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    margin: 0;
    background: var(--page-background);
    overflow: hidden;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    overflow-x: hidden;
}

#app {
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    overflow: hidden;
    background: var(--page-background);
}

html.staff-mode,
body.staff-mode {
    color: #073956;
    overflow: auto;
    background: #edf7fb;
}

body.staff-mode #app {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(112, 224, 255, 0.26), transparent 34%),
        linear-gradient(180deg, #f6fbfd, #e7f4f7);
}

button {
    font: inherit;
}

.staff-page {
    width: min(100%, 560px);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: max(22px, env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom));
}

.staff-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 0 24px;
}

.staff-header img {
    display: block;
    width: 98px;
    height: auto;
}

.staff-header p,
.staff-header h1,
.staff-note,
.staff-message,
.staff-details,
.staff-details dd {
    margin: 0;
}

.staff-header p {
    color: rgba(7, 57, 86, 0.58);
    font-size: 12px;
    font-weight: 760;
}

.staff-header h1 {
    margin-top: 3px;
    font-size: 28px;
    line-height: 1.05;
}

.staff-card,
.staff-result {
    border: 1px solid rgba(7, 57, 86, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 45px rgba(7, 57, 86, 0.08);
    backdrop-filter: blur(18px);
}

.staff-card {
    padding: 18px;
}

.staff-card label {
    display: block;
    margin-bottom: 10px;
    color: rgba(7, 57, 86, 0.72);
    font-size: 12px;
    font-weight: 820;
}

.staff-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 10px;
}

.staff-input-row input,
.staff-input-row button,
.staff-redeem {
    min-height: 52px;
    border-radius: 10px;
    font: inherit;
}

.staff-input-row input {
    width: 100%;
    border: 1px solid rgba(7, 57, 86, 0.18);
    padding: 0 14px;
    color: #073956;
    background: #ffffff;
    font-size: 18px;
    font-weight: 760;
    letter-spacing: 0;
    text-transform: uppercase;
}

.staff-input-row button,
.staff-redeem {
    border: 0;
    color: #073956;
    background: #b8ffcf;
    font-size: 15px;
    font-weight: 840;
    cursor: pointer;
}

.staff-note {
    margin-top: 12px;
    color: rgba(7, 57, 86, 0.58);
    font-size: 12px;
    line-height: 1.45;
}

.staff-result {
    margin-top: 14px;
    padding: 18px;
}

.staff-loading {
    color: rgba(7, 57, 86, 0.62);
    font-size: 14px;
    font-weight: 760;
}

.staff-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 0 14px;
    border-radius: 10px;
    background: rgba(7, 57, 86, 0.08);
    color: #073956;
    font-weight: 840;
}

.staff-status strong {
    font-size: 20px;
}

.staff-status--pending {
    background: #b8ffcf;
}

.staff-status--redeemed {
    background: #d6dde2;
}

.staff-status--expired,
.staff-status--not_found,
.staff-status--error {
    background: #ffd9df;
}

.staff-message {
    margin-top: 12px;
    color: rgba(7, 57, 86, 0.62);
    font-size: 13px;
}

.staff-details {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.staff-details div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(7, 57, 86, 0.08);
}

.staff-details dt {
    color: rgba(7, 57, 86, 0.52);
    font-size: 12px;
    font-weight: 760;
}

.staff-details dd {
    color: #073956;
    text-align: right;
    font-size: 13px;
    font-weight: 760;
}

.staff-redeem {
    width: 100%;
    margin-top: 18px;
}

.result-page {
    position: relative;
    isolation: isolate;
    width: min(100%, 480px);
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    min-height: 100svh;
    min-height: 100dvh;
    margin: 0 auto;
    overflow: hidden;
    color: var(--ink);
    background: var(--page-background);
    box-shadow: 0 0 70px rgba(0, 20, 42, 0.35);
}

.scene,
.scene__image,
.scene__holo,
.scene__clouds,
.scene__sunbeam,
.scene__grass,
.scene__shade,
.scene__glint {
    position: absolute;
    inset: 0;
}

.scene {
    z-index: -2;
    overflow: hidden;
    background: var(--page-background);
}

.scene__image {
    inset: -4%;
    background:
        linear-gradient(180deg, rgba(2, 50, 84, 0.08), rgba(2, 50, 84, 0.04)),
        url("/assets/lenticular-sky.jpg") center / cover no-repeat;
    animation: scene-drift 14s ease-in-out infinite alternate;
}

.scene__holo {
    opacity: 0.42;
    mix-blend-mode: screen;
    filter: saturate(1.14);
    background:
        radial-gradient(ellipse at 14% 20%, rgba(255, 121, 219, 0.2), transparent 38%),
        radial-gradient(ellipse at 84% 30%, rgba(112, 255, 222, 0.22), transparent 35%),
        radial-gradient(ellipse at 50% 78%, rgba(255, 244, 116, 0.12), transparent 40%),
        conic-gradient(from 214deg at 48% 48%,
            transparent 0deg,
            rgba(255, 103, 204, 0.18) 48deg,
            rgba(255, 247, 117, 0.17) 98deg,
            rgba(96, 255, 213, 0.2) 154deg,
            rgba(111, 170, 255, 0.22) 218deg,
            rgba(255, 127, 224, 0.16) 276deg,
            transparent 360deg);
    background-size: 140% 140%, 150% 150%, 130% 130%, 210% 210%;
    background-position: 12% 18%, 84% 24%, 50% 82%, 0% 45%;
    animation: holo-flow 28s ease-in-out infinite alternate;
    pointer-events: none;
}

.scene__holo::before,
.scene__holo::after {
    position: absolute;
    inset: -12%;
    content: "";
    pointer-events: none;
}

.scene__holo::before {
    opacity: 0.2;
    mix-blend-mode: screen;
    filter: blur(0.55px);
    background:
        repeating-linear-gradient(116deg,
            transparent 0 18px,
            rgba(255, 255, 255, 0.035) 19px,
            rgba(139, 255, 238, 0.035) 21px,
            transparent 26px 48px);
    background-size: 260px 260px;
    animation: holo-lines 22s linear infinite;
}

.scene__holo::after {
    opacity: 0.2;
    mix-blend-mode: color-dodge;
    filter: blur(0.35px);
    background:
        linear-gradient(108deg,
            transparent 18%,
            rgba(255, 255, 255, 0.12) 35%,
            rgba(198, 245, 255, 0.1) 43%,
            transparent 60%);
    background-size: 240% 100%;
    animation: holo-sheen-soft 26s ease-in-out infinite;
}

.scene__clouds {
    overflow: hidden;
    opacity: 0.46;
    mix-blend-mode: screen;
}

.cloud {
    position: absolute;
    display: block;
    width: var(--cloud-width);
    height: var(--cloud-height);
    border-radius: 999px;
    background:
        radial-gradient(ellipse at 48% 52%, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.22) 38%, transparent 72%),
        radial-gradient(ellipse at 24% 46%, rgba(206, 246, 255, 0.22), transparent 64%),
        radial-gradient(ellipse at 78% 58%, rgba(255, 255, 255, 0.18), transparent 70%);
    filter: blur(15px);
    transform: translate3d(var(--cloud-start), 0, 0);
    animation: cloud-drift var(--cloud-duration) linear infinite;
}

.cloud--one {
    --cloud-width: 260px;
    --cloud-height: 76px;
    --cloud-start: -230px;
    --cloud-end: 530px;
    --cloud-duration: 38s;
    top: 29%;
    left: 0;
    animation-delay: -14s;
}

.cloud--two {
    --cloud-width: 220px;
    --cloud-height: 66px;
    --cloud-start: 430px;
    --cloud-end: -260px;
    --cloud-duration: 47s;
    top: 53%;
    left: 0;
    opacity: 0.72;
    animation-delay: -27s;
}

.cloud--three {
    --cloud-width: 170px;
    --cloud-height: 54px;
    --cloud-start: -170px;
    --cloud-end: 500px;
    --cloud-duration: 56s;
    top: 75%;
    left: 0;
    opacity: 0.42;
    animation-delay: -35s;
}

.scene__sunbeam {
    opacity: 0.3;
    mix-blend-mode: screen;
    background:
        linear-gradient(108deg, transparent 12%, rgba(255, 255, 255, 0.24) 25%, transparent 36%),
        linear-gradient(126deg, transparent 40%, rgba(255, 246, 185, 0.18) 51%, transparent 64%);
    background-size: 220% 100%;
    animation: sunbeam-sweep 11s ease-in-out infinite;
    pointer-events: none;
}

.scene__grass {
    top: auto;
    height: 58%;
    bottom: -30%;
    opacity: 0.3;
    transform-origin: center bottom;
    background:
        radial-gradient(ellipse at 42% 32%, rgba(250, 255, 202, 0.26), transparent 58%),
        repeating-linear-gradient(101deg, transparent 0 12px, rgba(207, 255, 135, 0.08) 13px 15px, transparent 16px 26px),
        linear-gradient(180deg, transparent 0%, rgba(120, 212, 82, 0.04) 42%, rgba(70, 150, 56, 0.46) 100%);
    filter: blur(0.7px);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, transparent 36%, rgba(0, 0, 0, 0.18) 58%, rgba(0, 0, 0, 0.72) 100%);
    mask-image: linear-gradient(180deg, transparent 0%, transparent 36%, rgba(0, 0, 0, 0.18) 58%, rgba(0, 0, 0, 0.72) 100%);
    animation: grass-sway 5.8s ease-in-out infinite;
}

.scene__shade {
    background:
        linear-gradient(180deg, rgba(0, 30, 68, 0.84) 0%, rgba(0, 37, 71, 0.18) 34%, transparent 57%),
        linear-gradient(0deg, rgba(0, 24, 38, 0.35), transparent 42%);
}

.scene__glint {
    opacity: 0.5;
    mix-blend-mode: screen;
    filter: saturate(1.25);
    background:
        radial-gradient(circle at var(--glint-x) var(--glint-y), rgba(255, 255, 255, 0.5), transparent 21%),
        linear-gradient(112deg, transparent 27%, rgba(238, 181, 255, 0.22) 44%, rgba(170, 255, 226, 0.34) 52%, rgba(255, 248, 157, 0.16) 57%, transparent 68%);
    background-size: 100% 100%, 180% 180%;
    animation: glint-shift 5.8s ease-in-out infinite alternate;
    pointer-events: none;
}

.topbar {
    position: relative;
    display: grid;
    place-items: center;
    margin: max(18px, env(safe-area-inset-top)) 20px 0;
    padding: 5px 0 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.65);
}

.wordmark {
    display: grid;
    place-items: center;
    width: 132px;
    height: 38px;
}

.wordmark img {
    display: block;
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
}

.language-switch {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    right: auto;
    z-index: 6;
    display: grid;
    grid-template-columns: repeat(3, 28px);
    height: 28px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: rgba(5, 43, 68, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
    transform: translateX(-50%);
}

.language-switch button {
    border: 0;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.72);
    background: transparent;
    font-family: var(--font-subheading);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

.language-switch button[aria-pressed="true"] {
    color: var(--navy);
    background: rgba(255, 255, 255, 0.88);
}

.opener,
.result-copy,
.product-stage,
.action-sheet,
.share-screen,
footer {
    transition: opacity 420ms ease, transform 520ms ease, visibility 420ms ease;
}

.opener {
    position: relative;
    display: grid;
    height: calc(100svh - 96px);
    height: calc(100dvh - 96px);
    min-height: 0;
    padding: clamp(50px, 8vh, 70px) 20px calc(16px + env(safe-area-inset-bottom));
    grid-template-rows: auto minmax(245px, 1fr) auto;
    gap: clamp(12px, 2.2vh, 18px);
    overflow: hidden;
}

.opener-copy {
    width: 100%;
    max-width: 330px;
    margin: 0 auto;
    text-align: center;
}

.opener-title {
    max-width: 345px;
    margin: 16px auto 0;
    font-family: var(--font-heading);
    font-size: clamp(38px, 10vw, 52px);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: 0;
    text-wrap: balance;
}

html[lang="en"] .opener-title {
    font-size: clamp(32px, 8vw, 43px);
}

.opener-line {
    max-width: 300px;
    margin: 14px auto 0;
    color: rgba(255, 255, 255, 0.82);
    font-family: var(--font-subheading);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.45;
}

.opener-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 0;
}

.opener-orbit {
    position: absolute;
    width: min(76vw, 320px);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.32), transparent 35%),
        conic-gradient(from 12deg, rgba(255, 255, 255, 0.06), rgba(233, 255, 97, 0.44), rgba(125, 255, 221, 0.24), rgba(255, 166, 229, 0.34), rgba(255, 255, 255, 0.06));
    filter: blur(1px);
    opacity: 0.62;
    animation: opener-orbit 8s linear infinite;
}

.opener-cube {
    position: relative;
    width: min(58vw, 250px);
    aspect-ratio: 1;
    perspective: 900px;
    transform-style: preserve-3d;
    filter: drop-shadow(0 24px 32px rgba(0, 32, 46, 0.24));
    animation: opener-cube-float 5.4s ease-in-out infinite;
}

.opener-cube__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    backface-visibility: hidden;
    transform-origin: 50% 55%;
    will-change: transform, opacity, filter;
    animation: opener-cube-flip 20s linear infinite;
}

.opener-cube__frame--one {
    animation-delay: 0s;
}

.opener-cube__frame--two {
    animation-delay: 4s;
}

.opener-cube__frame--three {
    animation-delay: 8s;
}

.opener-cube__frame--four {
    animation-delay: 12s;
}

.opener-cube__frame--five {
    animation-delay: 16s;
}

.opener-box {
    position: relative;
    width: min(42vw, 176px);
    aspect-ratio: 0.82;
    transform-style: preserve-3d;
    animation: opener-float 4.6s ease-in-out infinite;
}

.opener-box__lid,
.opener-box__front,
.opener-box__shine {
    position: absolute;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.62);
    box-shadow: 0 22px 46px rgba(0, 32, 46, 0.24);
}

.opener-box__lid {
    inset: 0 8% auto;
    height: 30%;
    border-radius: 14px 14px 6px 6px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent 42%),
        linear-gradient(160deg, rgba(233, 255, 97, 0.98), rgba(110, 218, 255, 0.84));
    transform: skewX(-7deg) translateY(8px);
    transform-origin: bottom center;
}

.opener-box__front {
    inset: 22% 13% 0;
    border-radius: 10px 10px 20px 20px;
    background:
        linear-gradient(132deg, rgba(255, 255, 255, 0.35), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 72%),
        linear-gradient(145deg, rgba(100, 212, 255, 0.92), rgba(255, 174, 231, 0.7) 54%, rgba(233, 255, 97, 0.78));
}

.opener-box__front::before {
    position: absolute;
    inset: 20% 15% auto;
    height: 30%;
    content: "";
    border-radius: 8px;
    background: rgba(7, 57, 86, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.42);
}

.opener-box__shine {
    inset: 12% 16% 9%;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(112deg, transparent 28%, rgba(255, 255, 255, 0.54) 44%, transparent 58%);
    background-size: 220% 100%;
    box-shadow: none;
    mix-blend-mode: screen;
    animation: opener-box-shine 2.8s ease-in-out infinite;
}

.opener-shadow {
    position: absolute;
    left: 50%;
    bottom: 14%;
    width: min(54vw, 220px);
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 25, 31, 0.35);
    filter: blur(15px);
    animation: shadow-breathe 4s ease-in-out infinite;
}

.opener-actions {
    display: grid;
    gap: 12px;
}

.open-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 64px;
    padding: 0 24px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 12px;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.1)),
        rgba(4, 48, 72, 0.32);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.26),
        0 16px 34px rgba(0, 28, 44, 0.18);
    backdrop-filter: blur(22px) saturate(120%);
    font-family: var(--font-subheading);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0;
    cursor: pointer;
    transition: transform 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.open-action:active {
    transform: scale(0.985);
    color: var(--navy);
    background: var(--lime);
}

.open-action:disabled {
    opacity: 0.72;
    cursor: default;
}

.opener-hint,
.opener-footer {
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-family: var(--font-text);
    text-align: center;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.45;
}

.opener-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    padding: 0 20px calc(18px + env(safe-area-inset-bottom));
}

.is-opener .result-copy,
.is-opener .product-stage,
.is-opener .action-sheet,
.is-opener > footer:not(.opener-footer) {
    position: absolute;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
}

.is-opener .opener-footer {
    display: block;
}

.has-result .opener,
.has-result .opener-footer {
    position: absolute;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-18px);
}

.is-opening .opener-box__lid {
    animation: opener-lid-pop 950ms cubic-bezier(0.15, 0.88, 0.25, 1) both;
}

.is-opening .opener-box__front {
    animation: opener-box-open 950ms ease-out both;
}

.is-opening .opener-cube {
    animation: opener-cube-open 950ms ease-out both;
}

.is-opening .opener-orbit {
    animation: opener-orbit 1.15s linear infinite, opener-orbit-pop 900ms ease-out both;
}

.is-opening .open-action {
    transform: scale(0.985);
    color: var(--navy);
    background: var(--lime);
}

.result-copy {
    position: relative;
    z-index: 3;
    min-height: 0;
    padding: clamp(38px, 7vh, 58px) 20px 0;
    text-align: center;
    pointer-events: none;
}

.eyebrow,
.result-line,
.slogan,
.slogan-translation,
.share-hint,
.redemption-label,
footer,
.result-tag {
    margin: 0;
}

.eyebrow {
    color: var(--lime);
    font-family: var(--font-subheading);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
}

.result-heading {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    justify-items: center;
    gap: 8px;
    margin-top: clamp(10px, 2vh, 16px);
}

.result-heading > div:first-child {
    display: grid;
    justify-items: center;
    width: 100%;
}

h1 {
    max-width: min(100%, 320px);
    margin: 0 auto;
    font-family: var(--font-heading);
    font-size: clamp(32px, 9vw, 46px);
    font-weight: 400;
    line-height: 1.06;
    letter-spacing: 0;
    text-align: center;
    text-shadow: 0 2px 18px rgba(0, 28, 45, 0.22);
    text-wrap: balance;
}

html[lang="en"] h1 {
    font-size: clamp(25px, 7vw, 36px);
    line-height: 1;
    overflow-wrap: anywhere;
}

.result-line {
    max-width: min(100%, 320px);
    margin-top: clamp(6px, 1.4vh, 10px);
    color: rgba(255, 255, 255, 0.88);
    font-family: var(--font-subheading);
    font-size: clamp(13px, 3.6vw, 16px);
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-shadow: 0 2px 14px rgba(0, 28, 45, 0.2);
}

.score {
    position: static;
    display: none;
    align-items: baseline;
    justify-content: center;
    height: auto;
    margin-top: clamp(4px, 1vh, 8px);
    padding: 6px 14px 7px;
    border: 1px solid rgba(255, 255, 255, 0.46);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(4, 48, 72, 0.26);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px) saturate(115%);
    text-shadow: 0 2px 18px rgba(0, 28, 45, 0.22);
}

.score strong {
    font-family: var(--font-subheading);
    font-size: clamp(23px, 6.4vw, 31px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
}

.score span {
    margin-left: 3px;
    color: var(--lime);
    font-family: var(--font-subheading);
    font-size: clamp(12px, 3.6vw, 16px);
    font-weight: 600;
}

html[lang="en"] .slogan-translation,
html[lang="en"] .share-translation {
    display: none;
}

.product-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 0;
    padding: 0 20px clamp(34px, 6vh, 60px);
    cursor: default;
    -webkit-tap-highlight-color: transparent;
}

.product-slot {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: min(42vw, 188px);
    height: min(34vh, 332px);
    height: min(34dvh, 332px);
    opacity: 1;
    transform: translateY(clamp(38px, 7.2vh, 66px));
    filter: drop-shadow(0 24px 30px rgba(0, 24, 38, 0.28));
}

.product-stage--empty .product-slot,
.product-stage--empty .product-shadow {
    opacity: 0;
    pointer-events: none;
}

.product-slot::before,
.product-slot::after {
    position: absolute;
    inset: auto;
    left: 50%;
    top: 50%;
    content: "";
    width: 164%;
    aspect-ratio: 1;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.38;
    pointer-events: none;
}

.product-slot::before {
    z-index: -2;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.42) 0 22%, transparent 23%),
        conic-gradient(from 40deg, rgba(233, 255, 97, 0.36), rgba(255, 182, 227, 0.2), rgba(123, 255, 225, 0.24), rgba(233, 255, 97, 0.36));
    filter: blur(1px);
}

.product-slot::after {
    z-index: -1;
    width: 112%;
    opacity: 0.2;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.78), transparent 58%);
    filter: blur(16px);
}

.result-page.is-revealing .product-slot::before {
    animation: box-outline-pop 1180ms ease-out both;
}

.result-page.is-revealing .product-slot::after {
    animation: center-glow 1180ms ease-out both;
}

.product-slot[data-src] {
    background: var(--product-image) center / contain no-repeat;
}

.product-art {
    position: absolute;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    opacity: 0;
    transform: scale(0.86) rotate(-2.5deg) translateY(10px);
    transform-origin: 50% 62%;
    transition:
        opacity 280ms ease,
        transform 620ms cubic-bezier(0.18, 1.35, 0.28, 1),
        filter 480ms ease;
    filter: saturate(0.96) contrast(0.98);
}

.product-art.is-active {
    opacity: 1;
    transform: scale(1) rotate(0deg) translateY(0);
    filter: saturate(1.04) contrast(1.02);
}

.product-art__image,
.product-layer,
.product-pair__image {
    display: block;
    pointer-events: none;
}

.product-art__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-art--flat.is-active .product-art__image,
.share-product__art--flat .product-art__image,
.product-art--wide.is-active .product-art__image,
.share-product__art--wide .product-art__image {
    animation: product-cute-sway 2.85s ease-in-out infinite;
    transform-origin: 50% 18%;
}

.product-art--wide {
    width: min(74vw, 334px);
    height: clamp(92px, 18vh, 148px);
    max-width: none;
}

.product-art--pair,
.share-product__art--pair {
    width: min(82vw, 356px);
    max-width: none;
}

.product-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    justify-items: center;
    gap: clamp(8px, 3vw, 18px);
    width: 100%;
    height: 100%;
    transform-origin: 50% 28%;
}

.product-pair__cell {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: clamp(4px, 1.2vw, 8px);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background:
        radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05) 48%, transparent 72%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 14px 34px rgba(0, 24, 38, 0.08);
}

.product-pair__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter:
        drop-shadow(0 0 2px rgba(255, 255, 255, 0.96))
        drop-shadow(0 0 10px rgba(255, 255, 255, 0.42))
        drop-shadow(0 18px 26px rgba(0, 24, 38, 0.22));
}

.product-art--pair.is-active .product-pair,
.share-product__art--pair .product-pair {
    animation: product-pair-soft-sway 3s ease-in-out infinite;
}

.product-art--layered,
.share-product__art--layered {
    position: relative;
    overflow: visible;
}

.product-layer {
    position: absolute;
}

.product-layer--frame {
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-layer--character {
    z-index: 1;
    left: 50%;
    top: 39.2%;
    width: 73%;
    height: auto;
    transform: translate(-50%, -50%);
    transform-origin: 50% 10%;
}

.product-art--layered.is-active .product-layer--character,
.share-product__art--layered .product-layer--character {
    animation: claw-character-sway 2.35s ease-in-out infinite;
}

.product-shadow {
    position: absolute;
    z-index: 1;
    bottom: clamp(38px, 7vh, 70px);
    left: 50%;
    width: min(54vw, 226px);
    height: 28px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: rgba(0, 25, 31, 0.22);
    filter: blur(14px);
    animation: shadow-breathe 4s ease-in-out infinite;
}

.result-tag {
    position: absolute;
    z-index: 3;
    bottom: clamp(12px, 2.5vh, 22px);
    left: 50%;
    width: max-content;
    max-width: calc(100% - 40px);
    transform: translateX(-50%);
    padding: 9px 18px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(4, 45, 70, 0.58);
    backdrop-filter: blur(14px);
    font-family: var(--font-subheading);
    font-size: 10px;
    font-weight: 600;
}

.action-sheet {
    width: calc(100% - 32px);
    margin: 0 16px;
    padding: clamp(13px, 2.4vh, 18px) 18px clamp(12px, 2.2vh, 16px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 18px;
    background: var(--glass);
    box-shadow: 0 18px 50px rgba(0, 30, 45, 0.16);
    backdrop-filter: blur(26px) saturate(115%);
}

.share-screen {
    position: absolute;
    display: grid;
    gap: 14px;
    grid-template-rows: minmax(0, 1fr) auto;
    align-content: stretch;
    align-items: center;
    min-height: 100svh;
    min-height: 100dvh;
    width: 100%;
    padding: max(14px, env(safe-area-inset-top)) 14px calc(16px + env(safe-area-inset-bottom));
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
}

.result-page.is-share {
    height: 100vh;
    height: 100svh;
    height: 100dvh;
}

.result-page.has-result {
    display: grid;
    grid-template-rows:
        auto
        minmax(126px, 0.72fr)
        minmax(190px, 1fr)
        auto;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    overflow: hidden;
}

.has-result .topbar {
    position: relative;
    z-index: 4;
}

.has-result .result-copy {
    grid-row: 2 / 3;
    grid-column: 1;
}

.has-result .product-stage {
    grid-row: 2 / 4;
    grid-column: 1;
    align-self: stretch;
    z-index: 2;
}

.has-result .action-sheet {
    grid-row: 4 / 5;
    grid-column: 1;
    z-index: 4;
}

.has-result > footer:not(.opener-footer) {
    display: none;
}

.is-share .share-screen {
    position: absolute;
    inset: 0;
    min-height: auto;
    height: 100%;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.share-card {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-rows: auto minmax(230px, 1fr) auto auto;
    width: min(100%, 360px);
    aspect-ratio: 9 / 16;
    max-height: calc(100svh - 128px);
    align-self: center;
    margin: 0 auto;
    overflow: hidden;
    padding: clamp(20px, 5vw, 28px);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 18px;
    color: #ffffff;
    background:
        radial-gradient(ellipse at 28% 18%, rgba(255, 255, 255, 0.32), transparent 34%),
        radial-gradient(ellipse at 78% 26%, rgba(191, 255, 241, 0.24), transparent 36%),
        radial-gradient(ellipse at 46% 74%, rgba(233, 255, 97, 0.18), transparent 40%),
        linear-gradient(165deg, rgba(6, 55, 86, 0.7), rgba(10, 78, 112, 0.42) 42%, rgba(141, 191, 132, 0.36));
    box-shadow: 0 28px 60px rgba(0, 24, 38, 0.34);
    backdrop-filter: blur(26px) saturate(125%);
}

.share-card::before,
.share-card::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    pointer-events: none;
}

.share-card::before {
    opacity: 0.42;
    mix-blend-mode: screen;
    background:
        conic-gradient(from 220deg at 48% 46%, rgba(255, 124, 224, 0.22), rgba(242, 255, 143, 0.18), rgba(110, 255, 226, 0.22), rgba(142, 178, 255, 0.22), rgba(255, 124, 224, 0.18));
    background-size: 210% 210%;
    animation: holo-flow 32s ease-in-out infinite alternate;
}

.share-card::after {
    opacity: 0.16;
    mix-blend-mode: screen;
    filter: blur(0.6px);
    background:
        repeating-linear-gradient(116deg, transparent 0 18px, rgba(255, 255, 255, 0.04) 19px 21px, transparent 22px 44px),
        linear-gradient(112deg, transparent 24%, rgba(255, 255, 255, 0.12) 43%, transparent 60%);
    background-size: 280px 280px, 240% 100%;
    animation: holo-lines 30s linear infinite, holo-sheen-soft 28s ease-in-out infinite;
}

.share-card__grain {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.22) 0 1px, transparent 1.6px),
        radial-gradient(circle at 70% 55%, rgba(255, 255, 255, 0.14) 0 1px, transparent 1.4px);
    background-size: 18px 18px, 24px 24px;
}

.share-card__top,
.share-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    font-family: var(--font-subheading);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
}

.share-card__top img {
    display: block;
    width: 92px;
    height: auto;
    filter: brightness(0) invert(1);
}

.share-card__hero {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 230px;
}

.share-product {
    position: relative;
    display: grid;
    place-items: center;
    width: min(58vw, 230px);
    height: min(35vh, 312px);
    height: min(35dvh, 312px);
    aspect-ratio: auto;
    transform: translateY(clamp(-58px, -5.6vh, -36px));
}

.share-product__halo {
    position: absolute;
    width: 120%;
    aspect-ratio: 1;
    border-radius: 50%;
    opacity: 0.56;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.44), transparent 38%),
        conic-gradient(from 10deg, rgba(255, 255, 255, 0.1), var(--product-accent, var(--lime)), rgba(123, 255, 225, 0.28), rgba(255, 181, 234, 0.26), rgba(255, 255, 255, 0.1));
    filter: blur(2px);
    animation: opener-orbit 10s linear infinite;
}

.share-product__mount {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

.share-product__art {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.share-product__art--pair {
    width: min(68vw, 286px);
    transform: translateY(-10px);
}

.share-product--wide {
    width: min(68vw, 300px);
}

.share-product__art--wide {
    width: min(68vw, 300px);
    height: clamp(92px, 18vh, 150px);
    max-width: none;
    transform: translateY(-8px);
}

.result-page[data-result="repeat-proof"] .share-product--pair {
    width: min(62vw, 258px);
}

.result-page[data-result="repeat-proof"] .share-product__art--pair {
    width: min(62vw, 258px);
    transform: translateY(-8px);
}

.result-page[data-result="repeat-proof"] .share-product__art--pair .product-pair {
    gap: clamp(7px, 2.4vw, 13px);
}

.result-page[data-result="easygoing-luck"] .share-product {
    transform: translateY(clamp(-58px, -5.6vh, -36px));
}

.result-page[data-result="easygoing-luck"] .share-product__halo {
    width: min(78vw, 318px);
}

.result-page[data-result="easygoing-luck"] .share-product__art--wide {
    width: min(66vw, 292px);
    height: clamp(86px, 16.5vh, 138px);
    transform: translate(-44px, -8px);
}

.result-page[data-result="hidden-magnet"] .share-product {
    width: min(49vw, 194px);
    height: min(34vh, 260px);
    height: min(34dvh, 260px);
}

.result-page[data-result="friend-powered"] .share-product {
    width: min(54vw, 220px);
    height: min(30vh, 250px);
    height: min(30dvh, 250px);
    transform: translateY(clamp(-64px, -6.1vh, -40px));
}

.share-product__art--flat .product-art__image,
.share-product__art--wide .product-art__image,
.share-product__art--layered .product-layer--frame {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 22px 28px rgba(0, 24, 38, 0.32));
}

.result-page[data-result="hidden-magnet"] .share-product__art--flat,
.result-page[data-result="friend-powered"] .share-product__art--flat {
    display: grid;
    place-items: center;
}

.result-page[data-result="hidden-magnet"] .share-product__art--flat {
    width: min(49vw, 194px);
    height: min(31vh, 240px);
    height: min(31dvh, 240px);
}

.result-page[data-result="friend-powered"] .share-product__art--flat {
    width: min(54vw, 220px);
    height: min(30vh, 238px);
    height: min(30dvh, 238px);
}

.result-page[data-result="hidden-magnet"] .share-product__art--flat .product-art__image,
.result-page[data-result="friend-powered"] .share-product__art--flat .product-art__image {
    width: auto;
    height: min(31vh, 240px);
    height: min(31dvh, 240px);
    max-width: min(54vw, 220px);
    max-height: min(31vh, 240px);
    max-height: min(31dvh, 240px);
    object-fit: contain;
}

.result-page[data-result="friend-powered"] .share-product__art--flat .product-art__image {
    height: min(30vh, 238px);
    height: min(30dvh, 238px);
    max-height: min(30vh, 238px);
    max-height: min(30dvh, 238px);
}

.share-product__art--pair .product-pair__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter:
        drop-shadow(0 0 2px rgba(255, 255, 255, 0.98))
        drop-shadow(0 0 11px rgba(255, 255, 255, 0.48))
        drop-shadow(0 20px 28px rgba(0, 24, 38, 0.3));
}

.share-score {
    position: absolute;
    right: -2px;
    bottom: 15px;
    display: flex;
    align-items: flex-start;
    color: rgba(255, 255, 255, 0.84);
}

.share-score strong {
    font-family: var(--font-subheading);
    font-size: clamp(58px, 17vw, 86px);
    font-weight: 600;
    line-height: 0.82;
}

.share-score span {
    margin-left: 4px;
    color: var(--lime);
    font-family: var(--font-subheading);
    font-size: 22px;
    font-weight: 600;
}

.share-card__copy {
    display: grid;
    justify-items: center;
    gap: 10px;
    text-align: center;
}

.share-slogan {
    max-width: 285px;
    margin: 0 auto;
    font-family: var(--font-heading);
    font-size: clamp(31px, 8vw, 44px);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: 0;
    text-wrap: balance;
}

.share-card__copy h2 {
    margin: 4px 0 0;
    font-family: var(--font-subheading);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0;
}

.share-translation {
    max-width: 250px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.72);
    font-family: var(--font-text);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
}

.share-card__footer {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.32);
    color: rgba(255, 255, 255, 0.72);
}

.share-controls {
    display: grid;
    gap: 10px;
    width: min(100%, 360px);
    margin: 0 auto;
}

.secondary-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.44);
    border-radius: 10px;
    color: #ffffff;
    background: rgba(4, 48, 72, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px);
    font-family: var(--font-subheading);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.secondary-action:active {
    transform: scale(0.985);
}

.share-controls p {
    margin: 0;
    color: rgba(255, 255, 255, 0.66);
    font-family: var(--font-text);
    text-align: center;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.4;
}

.slogan {
    font-family: var(--font-heading);
    font-size: clamp(18px, 5.1vw, 24px);
    font-weight: 400;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.slogan-translation {
    margin-top: clamp(4px, 0.8vh, 6px);
    font-family: var(--font-subheading);
    font-size: clamp(12px, 3.5vw, 15px);
    font-weight: 600;
    line-height: 1.35;
}

.share-hint {
    max-width: 330px;
    margin-top: clamp(6px, 1.1vh, 9px);
    color: var(--ink-soft);
    font-size: clamp(9px, 2.8vw, 11px);
    line-height: 1.5;
    display: block;
}

.primary-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: clamp(42px, 6vh, 50px);
    margin-top: clamp(9px, 1.6vh, 12px);
    padding: 0 20px;
    border: 0;
    border-radius: 10px;
    color: var(--navy);
    background: #ffffff;
    font-family: var(--font-subheading);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 160ms ease, background-color 160ms ease;
}

.primary-action:active {
    transform: scale(0.985);
    background: var(--lime);
}

.action-icon {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    color: currentColor;
}

.action-icon svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.redemption {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: clamp(9px, 1.5vh, 12px);
    padding-top: clamp(9px, 1.4vh, 12px);
    border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.redemption-label {
    color: var(--ink-soft);
    font-family: var(--font-text);
    font-size: 10px;
    font-weight: 400;
}

.redemption-code {
    display: block;
    margin-top: 4px;
    font-family: var(--font-subheading);
    font-size: clamp(18px, 5.6vw, 23px);
    font-weight: 600;
    letter-spacing: 0;
}

.status {
    flex: 0 0 auto;
    min-width: 72px;
    padding: 9px 13px;
    border-radius: 8px;
    color: var(--navy);
    background: var(--lime);
    font-family: var(--font-subheading);
    text-align: center;
    font-size: 13px;
    font-weight: 600;
}

.status[data-status="redeemed"] {
    color: #ffffff;
    background: rgba(7, 57, 86, 0.72);
}

.status[data-status="expired"],
.status[data-status="local"] {
    color: #073956;
    background: #ffd9df;
}

footer {
    padding: 15px 20px calc(18px + env(safe-area-inset-bottom));
    color: rgba(255, 255, 255, 0.58);
    text-align: center;
    font-size: 9px;
}

.toast {
    position: fixed;
    z-index: 10;
    left: 50%;
    bottom: calc(18px + env(safe-area-inset-bottom));
    width: min(calc(100% - 40px), 400px);
    padding: 13px 16px;
    transform: translate(-50%, 120px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    color: #ffffff;
    background: rgba(3, 42, 65, 0.92);
    box-shadow: 0 14px 40px rgba(0, 20, 35, 0.3);
    backdrop-filter: blur(18px);
    text-align: center;
    font-size: 12px;
    opacity: 0;
    transition: transform 240ms ease, opacity 240ms ease;
}

.toast--visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

.reveal-effect,
.reveal-flash,
.reveal-puff,
.particle-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.reveal-effect {
    z-index: 5;
    overflow: hidden;
}

.reveal-effect::before {
    position: absolute;
    inset: 0;
    content: "";
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: screen;
}

.result-page[data-effect="common"] .reveal-effect::before {
    background:
        radial-gradient(circle at 24% 31%, rgba(255, 255, 255, 0.9) 0 3px, transparent 4px),
        radial-gradient(circle at 69% 34%, rgba(255, 255, 255, 0.82) 0 4px, transparent 5px),
        radial-gradient(circle at 42% 61%, rgba(255, 255, 255, 0.78) 0 3px, transparent 4px),
        radial-gradient(circle at 76% 70%, rgba(255, 255, 255, 0.72) 0 3px, transparent 4px);
}

.result-page[data-effect="rare"] .reveal-effect::before {
    background:
        radial-gradient(circle at 50% 51%, rgba(255, 221, 95, 0.38), transparent 25%),
        radial-gradient(circle at 26% 28%, rgba(255, 232, 126, 0.95) 0 4px, transparent 5px),
        radial-gradient(circle at 78% 37%, rgba(255, 190, 54, 0.95) 0 5px, transparent 6px),
        radial-gradient(circle at 36% 73%, rgba(255, 245, 185, 0.9) 0 3px, transparent 4px),
        radial-gradient(circle at 72% 76%, rgba(255, 214, 89, 0.86) 0 4px, transparent 5px);
}

.result-page[data-effect="hidden"] .reveal-effect::before {
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.5), transparent 22%),
        radial-gradient(circle at 20% 22%, rgba(255, 255, 255, 0.94) 0 4px, transparent 5px),
        radial-gradient(circle at 74% 24%, rgba(255, 255, 255, 0.95) 0 5px, transparent 6px),
        radial-gradient(circle at 30% 46%, rgba(255, 249, 168, 0.94) 0 4px, transparent 5px),
        radial-gradient(circle at 82% 54%, rgba(182, 255, 245, 0.94) 0 5px, transparent 6px),
        radial-gradient(circle at 46% 75%, rgba(255, 188, 242, 0.92) 0 4px, transparent 5px),
        radial-gradient(circle at 66% 82%, rgba(255, 255, 255, 0.95) 0 5px, transparent 6px);
}

.reveal-flash {
    opacity: 0;
    mix-blend-mode: screen;
    background:
        radial-gradient(circle at 50% 51%, rgba(255, 255, 255, 0.95), transparent 19%),
        radial-gradient(circle at 50% 51%, var(--lime), transparent 31%);
}

.reveal-puff {
    width: 210px;
    height: 114px;
    margin: clamp(285px, 47vh, 390px) auto 0;
    opacity: 0;
    border-radius: 999px;
    background:
        radial-gradient(circle at 19% 58%, rgba(255, 255, 255, 0.92) 0 24%, transparent 25%),
        radial-gradient(circle at 38% 40%, rgba(255, 255, 255, 0.98) 0 32%, transparent 33%),
        radial-gradient(circle at 60% 43%, rgba(255, 255, 255, 0.9) 0 30%, transparent 31%),
        radial-gradient(circle at 79% 62%, rgba(255, 255, 255, 0.82) 0 23%, transparent 24%);
    filter: blur(1px);
}

.particle {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--size);
    height: var(--size);
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.35);
}

.result-page[data-effect="common"] .particle {
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.65);
}

.result-page[data-effect="rare"] .particle {
    border-radius: 50%;
    background: #ffd35b;
    box-shadow: 0 0 14px rgba(255, 214, 82, 0.9);
}

.result-page[data-effect="rare"] .particle:nth-child(3n) {
    width: calc(var(--size) * 0.45);
    height: calc(var(--size) * 2.1);
    border-radius: 999px;
    background: linear-gradient(180deg, #fff8bb, #ffb000);
}

.result-page[data-effect="hidden"] .particle {
    background: #ffffff;
    clip-path: polygon(50% 0, 62% 34%, 98% 35%, 69% 56%, 79% 91%, 50% 70%, 21% 91%, 31% 56%, 2% 35%, 38% 34%);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.92);
}

.result-page[data-effect="hidden"].is-revealing::after {
    position: absolute;
    inset: -18%;
    z-index: 4;
    content: "";
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    background:
        radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.62), transparent 21%),
        conic-gradient(from 40deg, rgba(255, 106, 197, 0.28), rgba(255, 240, 92, 0.24), rgba(112, 255, 204, 0.28), rgba(119, 173, 255, 0.24), rgba(255, 106, 197, 0.28));
    animation: hidden-aurora 1550ms ease-out both;
}

.result-page.is-revealing .reveal-flash {
    animation: reveal-flash 1350ms ease-out both;
}

.result-page.is-revealing .reveal-effect::before {
    animation: effect-field 2600ms ease-out both;
}

.result-page.is-revealing .reveal-puff {
    animation: puff-pop 1700ms ease-out both;
}

.result-page.is-revealing .particle {
    animation: particle-burst var(--duration) cubic-bezier(0.11, 0.79, 0.32, 1) var(--delay) both;
}

@keyframes scene-drift {
    from { transform: scale(1.04) translate3d(-0.8%, -0.5%, 0); }
    to { transform: scale(1.08) translate3d(1%, 0.7%, 0); }
}

@keyframes holo-flow {
    0% {
        background-position: 12% 18%, 84% 24%, 50% 82%, 0% 45%;
        filter: saturate(1.16) hue-rotate(0deg);
    }
    50% {
        background-position: 30% 28%, 72% 36%, 45% 70%, 75% 52%;
        filter: saturate(1.38) hue-rotate(12deg);
    }
    100% {
        background-position: 18% 42%, 90% 18%, 60% 88%, 100% 58%;
        filter: saturate(1.24) hue-rotate(-8deg);
    }
}

@keyframes holo-lines {
    from { transform: translate3d(-18px, -12px, 0); }
    to { transform: translate3d(42px, 28px, 0); }
}

@keyframes holo-sheen {
    0%, 100% { opacity: 0.22; background-position: 140% 0; }
    48% { opacity: 0.5; background-position: -80% 0; }
}

@keyframes holo-sheen-soft {
    0%, 100% { background-position: 140% 0; }
    48% { background-position: -80% 0; }
}

@keyframes cloud-drift {
    from { transform: translate3d(var(--cloud-start), 0, 0); }
    to { transform: translate3d(var(--cloud-end), 0, 0); }
}

@keyframes sunbeam-sweep {
    0%, 52%, 100% { background-position: 150% 0; opacity: 0.12; }
    22% { background-position: 0% 0; opacity: 0.34; }
}

@keyframes grass-sway {
    0%, 100% { transform: skewX(-1.3deg) translateX(-1px); }
    50% { transform: skewX(1.2deg) translateX(2px); }
}

@keyframes glint-shift {
    from { background-position: center, 0% 20%; }
    to { background-position: center, 100% 80%; }
}

@keyframes shadow-breathe {
    0%, 100% { transform: translateX(-50%) scaleX(0.88); opacity: 0.62; }
    50% { transform: translateX(-50%) scaleX(1); opacity: 0.42; }
}

@keyframes opener-orbit {
    from { transform: rotate(0deg) scale(0.98); }
    to { transform: rotate(360deg) scale(0.98); }
}

@keyframes opener-orbit-pop {
    0% { opacity: 0.62; filter: blur(1px); }
    48% { opacity: 0.96; filter: blur(0); }
    100% { opacity: 0.18; filter: blur(10px); transform: rotate(120deg) scale(1.28); }
}

@keyframes opener-float {
    0%, 100% { transform: translate3d(0, -4px, 0) rotate(-1deg); }
    50% { transform: translate3d(0, 8px, 0) rotate(1deg); }
}

@keyframes opener-cube-float {
    0%, 100% { transform: translate3d(0, -5px, 0) rotateZ(-0.8deg); }
    50% { transform: translate3d(0, 7px, 0) rotateZ(0.8deg); }
}

@keyframes opener-cube-flip {
    0% {
        opacity: 0;
        transform: rotateY(-82deg) scale(0.97);
        filter: blur(0.8px) brightness(0.9) saturate(0.96);
    }
    2.4% {
        opacity: 0.72;
        transform: rotateY(-18deg) scale(0.995);
        filter: blur(0.15px) brightness(0.9) saturate(0.98);
    }
    5%, 15% {
        opacity: 0.78;
        transform: rotateY(0deg) scale(1);
        filter: blur(0) brightness(0.88) saturate(0.98);
    }
    17.6% {
        opacity: 0.62;
        transform: rotateY(18deg) scale(0.995);
        filter: blur(0.15px) brightness(0.88) saturate(0.96);
    }
    20%, 100% {
        opacity: 0;
        transform: rotateY(82deg) scale(0.97);
        filter: blur(0.8px) brightness(0.9) saturate(0.96);
    }
}

@keyframes opener-cube-open {
    0% { transform: translate3d(0, -5px, 0) scale(1) rotateY(0deg); opacity: 1; }
    52% { transform: translate3d(0, -16px, 0) scale(1.08) rotateY(180deg); opacity: 0.96; }
    100% { transform: translate3d(0, -36px, 0) scale(1.22) rotateY(360deg); opacity: 0; }
}

@keyframes opener-box-shine {
    0%, 100% { background-position: 140% 0; opacity: 0.35; }
    48% { background-position: -60% 0; opacity: 0.82; }
}

@keyframes opener-lid-pop {
    0% { transform: skewX(-7deg) translateY(8px) rotateX(0deg); }
    44% { transform: skewX(-7deg) translateY(-34px) rotateX(24deg); }
    100% { transform: skewX(-7deg) translateY(-120px) rotateX(42deg); opacity: 0; }
}

@keyframes opener-box-open {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    55% { transform: translateY(10px) scale(0.96); opacity: 0.86; }
    100% { transform: translateY(38px) scale(0.84); opacity: 0; }
}

@keyframes reveal-flash {
    0% { opacity: 0; transform: scale(0.58); }
    18% { opacity: 0.75; }
    100% { opacity: 0; transform: scale(1.45); }
}

@keyframes effect-field {
    0% { opacity: 0; transform: scale(0.94); }
    16% { opacity: 0.95; }
    72% { opacity: 0.62; }
    100% { opacity: 0; transform: scale(1.18); }
}

@keyframes puff-pop {
    0% { opacity: 0; transform: translateY(18px) scale(0.35); }
    24% { opacity: 0.92; }
    58% { opacity: 0.56; }
    100% { opacity: 0; transform: translateY(-34px) scale(1.7); }
}

@keyframes particle-burst {
    0% {
        opacity: 0;
        transform: translate3d(-50%, -50%, 0) scale(0.35) rotate(0deg);
    }
    14% {
        opacity: 1;
    }
    62% {
        opacity: 0.86;
    }
    100% {
        opacity: 0;
        transform: translate3d(calc(-50% + var(--drift)), calc(-50% - var(--lift)), 0) scale(1) rotate(210deg);
    }
}

@keyframes box-outline-pop {
    0% { opacity: 0; transform: scale(0.76); }
    26% { opacity: 0.85; }
    100% { opacity: 0; transform: scale(1.18); }
}

@keyframes product-cute-sway {
    0%, 100% { transform: translateY(0) rotate(-1.6deg); }
    35% { transform: translateY(-4px) rotate(1.3deg); }
    68% { transform: translateY(2px) rotate(-0.8deg); }
}

@keyframes product-pair-soft-sway {
    0%, 100% { transform: translateY(0) rotate(-0.75deg); }
    42% { transform: translateY(-2px) rotate(0.65deg); }
    72% { transform: translateY(1px) rotate(-0.35deg); }
}

@keyframes claw-character-sway {
    0%, 100% { transform: translate(-50%, -50%) rotate(-3deg) translateX(-2px); }
    50% { transform: translate(-50%, -50%) rotate(3deg) translateX(2px); }
}

@keyframes center-glow {
    0% { opacity: 0; transform: scale(0.5); }
    34% { opacity: 0.72; }
    100% { opacity: 0; transform: scale(1.35); }
}

@keyframes hidden-aurora {
    0% { opacity: 0; transform: scale(0.8) rotate(0deg); }
    30% { opacity: 0.78; }
    100% { opacity: 0; transform: scale(1.24) rotate(36deg); }
}

@media (min-width: 700px) and (min-height: 900px) {
    body {
        display: grid;
        place-items: start center;
        padding: 24px 0;
        background: var(--page-background);
    }

    .result-page {
        min-height: 844px;
        border-radius: 16px;
    }
}

@media (max-height: 760px) {
    .topbar {
        margin: max(12px, env(safe-area-inset-top)) 20px 0;
        padding: 3px 0 12px;
    }

    .wordmark {
        width: 112px;
        height: 32px;
    }

    .language-switch {
        top: calc(100% + 8px);
        height: 26px;
        grid-template-columns: repeat(3, 26px);
    }

    .opener {
        height: calc(100svh - 78px);
        height: calc(100dvh - 78px);
        padding: 44px 18px 12px;
        grid-template-rows: auto minmax(118px, 1fr) auto;
        gap: 9px;
    }

    .opener-title {
        margin-top: 10px;
        font-size: clamp(28px, 9vw, 36px);
        line-height: 1.02;
    }

    .opener-line {
        margin-top: 8px;
        font-size: 13px;
        line-height: 1.34;
    }

    .opener-box {
        width: min(34vw, 126px);
    }

    .opener-cube {
        width: min(48vw, 192px);
    }

    .opener-orbit {
        width: min(60vw, 210px);
    }

    .opener-shadow {
        bottom: 12%;
        width: min(42vw, 150px);
    }

    .open-action {
        min-height: 52px;
        padding: 0 20px;
        font-size: 16px;
    }

    .opener-footer {
        display: none;
    }

    .is-opener .opener-footer {
        display: none;
    }

    .result-page.has-result {
        grid-template-rows:
            auto
            minmax(112px, 0.52fr)
            minmax(132px, 0.82fr)
            auto;
    }

    .result-copy {
        padding-top: 34px;
    }

    .product-stage {
        padding-bottom: 22px;
    }

    .product-slot {
        width: min(44vw, 196px);
        height: min(31vh, 220px);
        height: min(31dvh, 220px);
    }

    .product-shadow {
        bottom: 34px;
        width: min(44vw, 170px);
    }

    .action-sheet {
        width: calc(100% - 32px);
        margin: 0 16px;
        padding: 12px 16px 12px;
        border-radius: 16px;
    }

    .share-hint {
        display: block;
    }

    .redemption {
        align-items: center;
    }

    .status {
        min-width: 66px;
        padding: 8px 10px;
        font-size: 12px;
    }

    .share-screen {
        gap: 9px;
        padding: max(8px, env(safe-area-inset-top)) 14px calc(10px + env(safe-area-inset-bottom));
    }

    .share-card {
        grid-template-rows: auto minmax(120px, 1fr) auto auto;
        max-height: calc(100svh - 92px);
        max-height: calc(100dvh - 92px);
        padding: 16px;
        border-radius: 16px;
    }

    .share-card__hero {
        min-height: 120px;
    }

    .share-card__top img {
        width: 74px;
    }

    .share-product {
        width: min(58vw, 184px);
    }

    .share-product--pair {
        width: min(70vw, 258px);
    }

    .share-score strong {
        font-size: clamp(44px, 14vw, 62px);
    }

    .share-slogan {
        font-size: clamp(23px, 7.2vw, 32px);
    }

    .share-card__copy h2 {
        font-size: 17px;
    }

    .share-translation {
        font-size: 11px;
        line-height: 1.34;
    }

    .share-card__footer {
        margin-top: 12px;
        padding-top: 12px;
        font-size: 9px;
    }

    .secondary-action {
        min-height: 44px;
    }

    .share-controls p {
        font-size: 9px;
    }
}

@media (max-height: 620px) {
    .opener {
        padding-top: 40px;
        grid-template-rows: auto minmax(96px, 1fr) auto;
    }

    .opener-copy {
        max-width: 280px;
    }

    .opener-title {
        font-size: clamp(25px, 8.4vw, 32px);
    }

    .opener-line {
        display: none;
    }

    .opener-box {
        width: min(31vw, 108px);
    }

    .opener-cube {
        width: min(44vw, 168px);
    }

    .opener-orbit {
        width: min(52vw, 172px);
    }

    .opener-hint {
        display: none;
    }

    .result-heading {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: clamp(27px, 8.4vw, 34px);
    }

    .score strong {
        font-size: clamp(21px, 6vw, 28px);
    }

    .score span {
        font-size: clamp(11px, 3.4vw, 15px);
    }

    .result-line {
        font-size: 12px;
    }

    .product-slot {
        width: min(42vw, 178px);
        height: min(26vh, 166px);
        height: min(26dvh, 166px);
    }

    .result-tag {
        bottom: 8px;
        padding: 7px 12px;
    }

    .slogan {
        font-size: 17px;
    }

    .slogan-translation {
        font-size: 12px;
    }

    .primary-action {
        min-height: 42px;
        margin-top: 9px;
    }

    .redemption {
        margin-top: 9px;
        padding-top: 9px;
    }

    .redemption-code {
        font-size: 17px;
    }

    .share-card {
        max-height: calc(100svh - 82px);
        max-height: calc(100dvh - 82px);
        padding: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}
