@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%;
    --opener-background:
        linear-gradient(180deg, rgba(0, 65, 150, 0.1) 0%, rgba(0, 136, 210, 0.04) 46%, rgba(0, 190, 225, 0.08) 100%),
        url("/assets/backgrounds/mikio-bubble-letters-portrait-horizontal.png") center / cover no-repeat,
        #0b8fe6;
    --result-background:
        linear-gradient(180deg, rgba(0, 35, 92, 0.46) 0%, rgba(0, 100, 160, 0.22) 48%, rgba(0, 178, 214, 0.16) 100%),
        url("/assets/backgrounds/mikio-bubble-sky-pixel.png") center / cover no-repeat,
        #075083;
    --page-background: var(--opener-background);
    --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__bubbles,
.scene__mikio-effect,
.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: var(--opener-background);
    animation: scene-drift 18s ease-in-out infinite alternate;
}

.result-page.is-opener .scene__image {
    background-image:
        linear-gradient(180deg, rgba(0, 65, 150, 0.1) 0%, rgba(0, 136, 210, 0.04) 46%, rgba(0, 190, 225, 0.08) 100%),
        url("/assets/backgrounds/mikio-bubble-letters-portrait-horizontal.png");
    background-color: #0b8fe6;
    background-position: center, center 50%;
    background-repeat: no-repeat;
    background-size: 100% 100%, min(108vw, 518px) auto;
}

.result-page.has-result {
    background: var(--result-background);
}

.result-page.has-result .scene,
.result-page.has-result .scene__image {
    background: var(--result-background);
}

.scene__holo {
    opacity: 0.16;
    mix-blend-mode: screen;
    filter: saturate(1.04);
    background:
        radial-gradient(ellipse at 30% 82%, rgba(255, 255, 255, 0.18), transparent 32%),
        radial-gradient(ellipse at 76% 32%, rgba(169, 245, 255, 0.16), transparent 35%),
        linear-gradient(116deg, transparent 22%, rgba(255, 255, 255, 0.13) 40%, transparent 58%);
    background-size: 130% 130%, 140% 140%, 240% 100%;
    background-position: 16% 82%, 84% 24%, 110% 0;
    animation: bubble-water-flow 18s 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.14;
    mix-blend-mode: screen;
    filter: blur(0.55px);
    background:
        radial-gradient(circle at 15% 40%, rgba(255, 255, 255, 0.5) 0 1px, transparent 2px),
        radial-gradient(circle at 68% 24%, rgba(255, 255, 255, 0.42) 0 1px, transparent 2px),
        radial-gradient(circle at 76% 78%, rgba(255, 255, 255, 0.38) 0 1px, transparent 2px);
    background-size: 42px 42px, 58px 58px, 72px 72px;
    animation: pixel-sparkle-drift 16s linear infinite;
}

.scene__holo::after {
    opacity: 0.18;
    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__bubbles {
    overflow: hidden;
    opacity: 0.36;
    pointer-events: none;
}

.scene-bubble {
    position: absolute;
    display: block;
    left: var(--bubble-left);
    bottom: var(--bubble-bottom);
    width: var(--bubble-size);
    aspect-ratio: 1;
    border: 2px solid rgba(225, 248, 255, 0.48);
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.82) 0 3px, transparent 4px),
        radial-gradient(circle at 72% 76%, rgba(255, 188, 244, 0.34), transparent 32%),
        radial-gradient(circle at 52% 50%, rgba(82, 221, 255, 0.18), rgba(255, 255, 255, 0.04) 58%, transparent 64%);
    box-shadow:
        inset 0 0 10px rgba(255, 255, 255, 0.18),
        0 0 12px rgba(165, 235, 255, 0.14);
    image-rendering: auto;
    transform: translate3d(0, 0, 0) scale(0.9);
    animation: bubble-float var(--bubble-duration) ease-in-out infinite;
    animation-delay: var(--bubble-delay);
}

.scene-bubble::after {
    position: absolute;
    inset: 16% 18% auto auto;
    width: 18%;
    aspect-ratio: 1;
    content: "";
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow:
        -12px 8px 0 rgba(255, 255, 255, 0.24),
        8px 17px 0 rgba(255, 208, 245, 0.28);
}

.scene-bubble--one {
    --bubble-left: 9%;
    --bubble-bottom: -9%;
    --bubble-size: 44px;
    --bubble-duration: 9s;
    --bubble-delay: -2.8s;
}

.scene-bubble--two {
    --bubble-left: 72%;
    --bubble-bottom: 1%;
    --bubble-size: 30px;
    --bubble-duration: 7.4s;
    --bubble-delay: -5.2s;
}

.scene-bubble--three {
    --bubble-left: 82%;
    --bubble-bottom: 30%;
    --bubble-size: 54px;
    --bubble-duration: 10.5s;
    --bubble-delay: -1.1s;
}

.scene-bubble--four {
    --bubble-left: 14%;
    --bubble-bottom: 38%;
    --bubble-size: 26px;
    --bubble-duration: 8.5s;
    --bubble-delay: -6.4s;
}

.scene-bubble--five {
    --bubble-left: 58%;
    --bubble-bottom: 58%;
    --bubble-size: 34px;
    --bubble-duration: 9.8s;
    --bubble-delay: -3.6s;
}

.scene-bubble--six {
    --bubble-left: 30%;
    --bubble-bottom: 74%;
    --bubble-size: 22px;
    --bubble-duration: 7.8s;
    --bubble-delay: -4.6s;
}

.result-page.has-result .scene__bubbles {
    opacity: 0.58;
}

.result-page.has-result .scene__clouds .cloud,
.result-page.has-result .scene__sunbeam,
.result-page.has-result .scene__grass,
.result-page.has-result .opener *,
.result-page.has-result .opener *::before,
.result-page.has-result .opener *::after {
    animation: none !important;
}

.scene__mikio-effect {
    display: none;
    pointer-events: none;
}

.result-page.is-opener .scene__mikio-effect {
    display: block;
    z-index: 1;
}

.mikio-effect__glint,
.mikio-effect__bubble {
    position: absolute;
    display: block;
    pointer-events: none;
}

.mikio-effect__glint {
    left: var(--glint-left);
    top: var(--glint-top);
    width: var(--glint-size);
    aspect-ratio: 1;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
    background:
        linear-gradient(90deg, transparent 44%, rgba(255, 255, 255, 0.95) 45% 55%, transparent 56%),
        linear-gradient(0deg, transparent 44%, rgba(255, 255, 255, 0.95) 45% 55%, transparent 56%);
    filter:
        drop-shadow(0 0 5px rgba(255, 255, 255, 0.78))
        drop-shadow(0 0 12px rgba(255, 194, 246, 0.44));
    animation: mikio-glint-pop 3.6s ease-in-out infinite;
    animation-delay: var(--glint-delay);
}

.mikio-effect__glint--one {
    --glint-left: 20%;
    --glint-top: 44%;
    --glint-size: 18px;
    --glint-delay: -1.2s;
}

.mikio-effect__glint--two {
    --glint-left: 48%;
    --glint-top: 39%;
    --glint-size: 22px;
    --glint-delay: -2.4s;
}

.mikio-effect__glint--three {
    --glint-left: 70%;
    --glint-top: 45%;
    --glint-size: 16px;
    --glint-delay: -0.4s;
}

.mikio-effect__glint--four {
    --glint-left: 87%;
    --glint-top: 52%;
    --glint-size: 20px;
    --glint-delay: -3s;
}

.mikio-effect__bubble {
    left: var(--letter-bubble-left);
    top: var(--letter-bubble-top);
    width: var(--letter-bubble-size);
    aspect-ratio: 1;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.68);
    border: 2px solid rgba(235, 252, 255, 0.58);
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.88) 0 2px, transparent 3px),
        radial-gradient(circle at 70% 74%, rgba(255, 194, 246, 0.28), transparent 34%),
        rgba(95, 226, 255, 0.06);
    box-shadow:
        inset 0 0 8px rgba(255, 255, 255, 0.2),
        0 0 10px rgba(174, 243, 255, 0.18);
    animation: mikio-letter-bubble-rise 5.2s ease-in-out infinite;
    animation-delay: var(--letter-bubble-delay);
}

.mikio-effect__bubble--one {
    --letter-bubble-left: 28%;
    --letter-bubble-top: 53%;
    --letter-bubble-size: 23px;
    --letter-bubble-delay: -1.6s;
}

.mikio-effect__bubble--two {
    --letter-bubble-left: 41%;
    --letter-bubble-top: 45%;
    --letter-bubble-size: 17px;
    --letter-bubble-delay: -3.4s;
}

.mikio-effect__bubble--three {
    --letter-bubble-left: 62%;
    --letter-bubble-top: 50%;
    --letter-bubble-size: 20px;
    --letter-bubble-delay: -0.8s;
}

.mikio-effect__bubble--four {
    --letter-bubble-left: 78%;
    --letter-bubble-top: 43%;
    --letter-bubble-size: 15px;
    --letter-bubble-delay: -4.2s;
}

.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%);
}

.result-page.is-opener .scene__clouds {
    opacity: 0.18;
}

.result-page.is-opener .scene__grass {
    opacity: 0;
}

.result-page.is-opener .scene__shade {
    background:
        linear-gradient(180deg, rgba(0, 45, 120, 0.3) 0%, rgba(0, 96, 170, 0.08) 32%, transparent 56%),
        linear-gradient(0deg, rgba(0, 90, 130, 0.1), transparent 42%);
}

.result-page.has-result .scene__clouds {
    opacity: 0.12;
}

.result-page.has-result .scene__grass {
    opacity: 0;
}

.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,
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;
    pointer-events: none;
}

.opener-stage::before,
.opener-stage::after {
    position: absolute;
    left: 50%;
    top: 50%;
    content: "";
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
}

.opener-stage::before {
    width: min(82vw, 360px);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent 28%),
        conic-gradient(from 20deg, rgba(255, 255, 255, 0.1), rgba(151, 240, 255, 0.34), rgba(255, 202, 244, 0.3), rgba(255, 255, 255, 0.1));
    filter: blur(1px);
}

.opener-stage::after {
    width: min(70vw, 290px);
    aspect-ratio: 1;
    background:
        radial-gradient(circle at 18% 36%, rgba(255, 255, 255, 0.9) 0 2px, transparent 3px),
        radial-gradient(circle at 70% 24%, rgba(255, 255, 255, 0.86) 0 2px, transparent 3px),
        radial-gradient(circle at 80% 68%, rgba(255, 210, 246, 0.72) 0 3px, transparent 4px),
        radial-gradient(circle at 36% 78%, rgba(182, 251, 255, 0.82) 0 2px, transparent 3px);
}

.is-opening .opener-stage::before {
    animation: opener-bubble-glow 980ms ease-out both;
}

.is-opening .opener-stage::after {
    animation: opener-pixel-spark-pop 980ms ease-out both;
}

.opener-actions {
    position: relative;
    z-index: 3;
    display: grid;
    gap: 12px;
    transform: translateY(clamp(-48px, -5.4vh, -32px));
}

.open-action {
    position: relative;
    isolation: isolate;
    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;
    overflow: hidden;
    transition: transform 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.open-action::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    opacity: 0.72;
    mix-blend-mode: screen;
    background:
        radial-gradient(ellipse at 18% 50%, rgba(255, 255, 255, 0.16), transparent 34%),
        linear-gradient(108deg, transparent 18%, rgba(255, 255, 255, 0.5) 42%, rgba(179, 250, 255, 0.42) 50%, rgba(255, 202, 246, 0.24) 56%, transparent 70%);
    background-size: 100% 100%, 240% 100%;
    background-position: center, 140% 0;
    animation: open-action-water-sheen 4.2s ease-in-out infinite;
}

.open-action > * {
    position: relative;
    z-index: 1;
}

.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 .open-action {
    transform: scale(0.985);
    color: var(--navy);
    background: var(--lime);
}

.is-opening .scene__bubbles {
    opacity: 0.78;
}

.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 {
    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-slot--constellation {
    width: min(96vw, 448px);
    height: min(48vh, 460px);
    height: min(48dvh, 460px);
    transform: translateY(clamp(34px, 5.6vh, 56px));
    filter:
        drop-shadow(0 18px 28px rgba(0, 24, 38, 0.22))
        drop-shadow(0 0 18px rgba(255, 255, 255, 0.12));
    overflow: visible;
}

.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: var(--product-halo-size, min(69vw, 308px));
    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: var(--product-inner-glow-size, min(47vw, 210px));
    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-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 320ms ease,
        transform 760ms cubic-bezier(0.18, 1.15, 0.28, 1);
    filter: saturate(0.96) contrast(0.98);
    backface-visibility: hidden;
    will-change: transform, opacity;
}

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

.product-art__image,
.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,
.product-art--wide.is-active .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-slot--constellation .product-art {
    left: var(--product-left, 50%);
    top: var(--product-top, 50%);
    z-index: var(--product-depth, 2);
    width: var(--product-card-width, min(45vw, 206px));
    height: var(--product-card-height, min(33vh, 276px));
    height: var(--product-card-height, min(33dvh, 276px));
    max-width: none;
    opacity: 0;
    transform:
        translate(-50%, -50%)
        translateY(10px)
        scale(0.72)
        rotate(var(--product-rotate, 0deg));
    transition:
        opacity 340ms ease,
        transform 860ms cubic-bezier(0.18, 1.08, 0.28, 1);
    filter:
        saturate(0.96)
        contrast(0.98)
        drop-shadow(0 12px 16px rgba(0, 24, 38, 0.1));
}

.product-slot--constellation .product-art--wide,
.product-slot--constellation .product-art--pair {
    width: min(50vw, 226px);
    height: min(27vh, 224px);
    height: min(27dvh, 224px);
}

.product-slot--constellation .product-art.is-active {
    opacity: 1;
    transform:
        translate(-50%, -50%)
        translateY(0)
        scale(1)
        rotate(var(--product-rotate, 0deg));
    filter:
        saturate(1.03)
        contrast(1.01)
        drop-shadow(0 16px 20px rgba(0, 24, 38, 0.18));
}

.product-slot--constellation .product-art.is-flashing::before {
    position: absolute;
    inset: 8% 5%;
    content: "";
    z-index: -1;
    border-radius: 999px;
    opacity: 0;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.68) 0 18%, var(--product-accent, var(--lime)) 24% 42%, transparent 66%);
    filter: blur(10px);
    animation: product-flash-pop 860ms ease-out both;
}

.product-slot--constellation .product-art.is-flashing .product-art__image,
.product-slot--constellation .product-art.is-flashing .product-pair {
    animation:
        product-flash-jolt 860ms cubic-bezier(0.2, 1, 0.3, 1) both,
        product-cute-sway 2.85s ease-in-out 860ms infinite;
}

.product-slot--constellation.is-final .product-art {
    opacity: var(--product-final-opacity, 1);
    transform:
        translate(-50%, -50%)
        translateY(var(--product-final-y, 0))
        scale(var(--product-final-scale, 0.82))
        rotate(var(--product-rotate, 0deg));
    filter: var(--product-final-filter,
        saturate(1.04)
        contrast(1.02)
        drop-shadow(0 18px 24px rgba(0, 24, 38, 0.2)));
}

.product-slot--constellation.is-final.is-looping .product-art.is-dim {
    opacity: 0.48;
}

.product-slot--constellation.is-final.is-looping .product-art.is-focus {
    z-index: 20;
    opacity: var(--product-final-opacity, 1);
    filter: var(--product-final-filter,
        saturate(1.04)
        contrast(1.02)
        drop-shadow(0 18px 24px rgba(0, 24, 38, 0.2)));
}

.product-slot--constellation.is-final.is-looping .product-art.is-cycle-flashing .product-art__image,
.product-slot--constellation.is-final.is-looping .product-art.is-cycle-flashing .product-pair {
    animation: product-cycle-soft-flash 760ms ease-in-out both;
}

.product-slot--constellation .product-art[data-product-position="0"] {
    --product-left: 23%;
    --product-top: 40%;
    --product-depth: 2;
    --product-rotate: -17deg;
    --product-final-scale: 0.88;
    --product-final-y: -10px;
    --product-final-opacity: 0.88;
    --product-final-filter: saturate(0.94) contrast(0.97) brightness(0.94) blur(0.25px) drop-shadow(0 12px 18px rgba(0, 24, 38, 0.12));
}

.product-slot--constellation .product-art[data-product-position="1"] {
    --product-left: 77%;
    --product-top: 38%;
    --product-depth: 2;
    --product-rotate: 15deg;
    --product-final-scale: 0.89;
    --product-final-y: -8px;
    --product-final-opacity: 0.9;
    --product-final-filter: saturate(0.95) contrast(0.98) brightness(0.95) blur(0.2px) drop-shadow(0 12px 18px rgba(0, 24, 38, 0.12));
}

.product-slot--constellation .product-art[data-product-position="2"] {
    --product-left: 50%;
    --product-top: 65%;
    --product-depth: 5;
    --product-rotate: -5deg;
    --product-final-scale: 1.12;
    --product-final-y: 4px;
    --product-final-opacity: 1;
    --product-final-filter: saturate(1.08) contrast(1.04) brightness(1.03) drop-shadow(0 0 2px rgba(255, 255, 255, 0.88)) drop-shadow(0 22px 28px rgba(0, 24, 38, 0.22));
}

.product-slot--constellation .product-art[data-product-position="3"] {
    --product-left: 10%;
    --product-top: 72%;
    --product-rotate: 8deg;
    --product-final-scale: 0.78;
}

.product-slot--constellation .product-art[data-product-position="4"] {
    --product-left: 90%;
    --product-top: 76%;
    --product-rotate: -10deg;
    --product-final-scale: 0.78;
}

.product-slot--constellation[data-product-count="4"] .product-art[data-product-position="0"] {
    --product-left: 18%;
    --product-top: 38%;
    --product-depth: 1;
    --product-rotate: -18deg;
    --product-final-scale: 0.75;
    --product-final-y: -10px;
    --product-final-opacity: 0.84;
    --product-final-filter: saturate(0.92) contrast(0.96) brightness(0.94) blur(0.28px) drop-shadow(0 12px 18px rgba(0, 24, 38, 0.12));
}

.product-slot--constellation[data-product-count="4"] .product-art[data-product-position="1"] {
    --product-left: 80%;
    --product-top: 37%;
    --product-depth: 1;
    --product-rotate: 16deg;
    --product-final-scale: 0.77;
    --product-final-y: -8px;
    --product-final-opacity: 0.86;
    --product-final-filter: saturate(0.94) contrast(0.97) brightness(0.95) blur(0.24px) drop-shadow(0 12px 18px rgba(0, 24, 38, 0.12));
}

.product-slot--constellation[data-product-count="4"] .product-art[data-product-position="2"] {
    --product-left: 42%;
    --product-top: 64%;
    --product-depth: 5;
    --product-rotate: -7deg;
    --product-final-scale: 0.94;
    --product-final-y: 3px;
    --product-final-opacity: 1;
    --product-final-filter: saturate(1.06) contrast(1.03) brightness(1.02) drop-shadow(0 0 2px rgba(255, 255, 255, 0.84)) drop-shadow(0 20px 26px rgba(0, 24, 38, 0.22));
}

.product-slot--constellation[data-product-count="4"] .product-art[data-product-position="3"] {
    --product-left: 64%;
    --product-top: 70%;
    --product-depth: 6;
    --product-rotate: 8deg;
    --product-final-scale: 0.92;
    --product-final-y: 4px;
    --product-final-opacity: 1;
    --product-final-filter: saturate(1.06) contrast(1.03) brightness(1.02) drop-shadow(0 0 2px rgba(255, 255, 255, 0.84)) drop-shadow(0 20px 26px rgba(0, 24, 38, 0.22));
}

.product-slot--constellation[data-product-count="5"] .product-art[data-product-position="0"] {
    --product-left: 14%;
    --product-top: 40%;
    --product-depth: 1;
    --product-rotate: -18deg;
    --product-final-scale: 0.66;
    --product-final-y: -10px;
    --product-final-opacity: 0.8;
    --product-final-filter: saturate(0.9) contrast(0.95) brightness(0.92) blur(0.34px) drop-shadow(0 10px 16px rgba(0, 24, 38, 0.1));
}

.product-slot--constellation[data-product-count="5"] .product-art[data-product-position="1"] {
    --product-left: 86%;
    --product-top: 39%;
    --product-depth: 1;
    --product-rotate: 17deg;
    --product-final-scale: 0.67;
    --product-final-y: -10px;
    --product-final-opacity: 0.8;
    --product-final-filter: saturate(0.9) contrast(0.95) brightness(0.92) blur(0.34px) drop-shadow(0 10px 16px rgba(0, 24, 38, 0.1));
}

.product-slot--constellation[data-product-count="5"] .product-art[data-product-position="2"] {
    --product-left: 50%;
    --product-top: 35%;
    --product-depth: 2;
    --product-rotate: -4deg;
    --product-final-scale: 0.68;
    --product-final-y: -8px;
    --product-final-opacity: 0.84;
    --product-final-filter: saturate(0.94) contrast(0.97) brightness(0.95) blur(0.22px) drop-shadow(0 12px 18px rgba(0, 24, 38, 0.12));
}

.product-slot--constellation[data-product-count="5"] .product-art[data-product-position="3"] {
    --product-left: 39%;
    --product-top: 68%;
    --product-depth: 5;
    --product-rotate: 8deg;
    --product-final-scale: 0.84;
    --product-final-y: 3px;
    --product-final-opacity: 1;
    --product-final-filter: saturate(1.06) contrast(1.03) brightness(1.02) drop-shadow(0 0 2px rgba(255, 255, 255, 0.82)) drop-shadow(0 20px 26px rgba(0, 24, 38, 0.22));
}

.product-slot--constellation[data-product-count="5"] .product-art[data-product-position="4"] {
    --product-left: 62%;
    --product-top: 71%;
    --product-depth: 6;
    --product-rotate: -9deg;
    --product-final-scale: 0.86;
    --product-final-y: 4px;
    --product-final-opacity: 1;
    --product-final-filter: saturate(1.07) contrast(1.04) brightness(1.03) drop-shadow(0 0 2px rgba(255, 255, 255, 0.86)) drop-shadow(0 22px 28px rgba(0, 24, 38, 0.22));
}

.result-page[data-result="repeat-proof"] .product-slot--constellation .product-art[data-product-id="hidden-sunshine-bear"] {
    --product-left: 59%;
    --product-top: 68%;
    --product-depth: 8;
    --product-rotate: -8deg;
    --product-final-scale: 0.98;
    --product-final-y: 5px;
    --product-final-opacity: 1;
    --product-final-filter: saturate(1.12) contrast(1.06) brightness(1.06) drop-shadow(0 0 2px rgba(255, 255, 255, 0.94)) drop-shadow(0 24px 30px rgba(0, 24, 38, 0.24));
}

.result-page[data-result="easygoing-luck"] .product-slot--constellation .product-art--wide {
    width: min(58vw, 260px);
    height: min(28vh, 230px);
    height: min(28dvh, 230px);
}

.result-page[data-result="easygoing-luck"] .product-slot--constellation[data-product-count="4"] .product-art[data-product-position="2"] {
    --product-final-scale: 1.04;
}

.result-page[data-result="easygoing-luck"] .product-slot--constellation[data-product-count="4"] .product-art[data-product-position="3"] {
    --product-final-scale: 1.02;
}

.result-page[data-result="repeat-proof"] .product-slot:not(.product-slot--constellation) {
    width: min(61vw, 254px);
    height: min(34vh, 332px);
    height: min(34dvh, 332px);
}

.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 {
    animation: product-pair-soft-sway 3s 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;
    white-space: nowrap;
}

.action-sheet {
    width: calc(100% - 32px);
    margin: 0 16px calc(12px + env(safe-area-inset-bottom));
    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%);
}

.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;
}


.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;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: clamp(9px, 1.6vh, 12px);
}

.primary-action,
.secondary-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: clamp(42px, 6vh, 50px);
    padding: 0 20px;
    border-radius: 10px;
    font-family: var(--font-subheading);
    font-size: clamp(12px, 3.4vw, 15px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, background-color 160ms ease;
}

.primary-action {
    border: 0;
    color: var(--navy);
    background: #ffffff;
}

.secondary-action {
    border: 1px solid rgba(255, 255, 255, 0.68);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

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

.secondary-action:active {
    transform: scale(0.985);
    color: var(--navy);
    background: rgba(255, 255, 255, 0.86);
}

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

.capture-status {
    min-height: 1.2em;
    margin: 6px 0 0;
    color: var(--ink-soft);
    font-family: var(--font-text);
    font-size: 10px;
    line-height: 1.3;
}

.result-page.is-capturing [data-capture-exclude] {
    display: none !important;
}

.result-page.is-capturing .result-tag {
    min-width: 118px;
    text-align: center;
}

.result-page.is-capturing .product-slot--constellation.is-final .product-art {
    z-index: var(--product-depth, 2) !important;
    opacity: 0.44 !important;
    filter:
        saturate(0.88)
        contrast(0.94)
        brightness(0.84)
        blur(0.22px)
        drop-shadow(0 10px 16px rgba(0, 24, 38, 0.1)) !important;
}

.result-page.is-capturing .product-slot--constellation.is-final.is-looping .product-art.is-focus {
    z-index: 50 !important;
    opacity: 1 !important;
    filter: var(--product-final-filter,
        saturate(1.08)
        contrast(1.04)
        brightness(1.03)
        drop-shadow(0 0 2px rgba(255, 255, 255, 0.88))
        drop-shadow(0 22px 28px rgba(0, 24, 38, 0.22))) !important;
}

.result-page.is-capturing .product-slot--constellation.is-final.is-looping .product-art.is-cycle-flashing .product-art__image,
.result-page.is-capturing .product-slot--constellation.is-final.is-looping .product-art.is-cycle-flashing .product-pair {
    animation: none;
}

@media (max-width: 430px) {
    .product-slot--constellation .product-art[data-product-position="0"] {
        --product-left: 27%;
    }

    .product-slot--constellation .product-art[data-product-position="1"] {
        --product-left: 68%;
    }

    .product-slot--constellation .product-art[data-product-position="3"] {
        --product-left: 15%;
    }

    .product-slot--constellation .product-art[data-product-position="4"] {
        --product-left: 85%;
    }

    .product-slot--constellation[data-product-count="4"] .product-art[data-product-position="0"] {
        --product-left: 23%;
    }

    .product-slot--constellation[data-product-count="4"] .product-art[data-product-position="1"] {
        --product-left: 74%;
    }

    .product-slot--constellation[data-product-count="5"] .product-art[data-product-position="0"] {
        --product-left: 20%;
    }

    .product-slot--constellation[data-product-count="5"] .product-art[data-product-position="1"] {
        --product-left: 75%;
    }
}

@media (max-width: 480px), (pointer: coarse) {
    .product-slot--constellation .product-art {
        transition:
            opacity 380ms ease,
            transform 920ms cubic-bezier(0.2, 1, 0.3, 1);
    }

    .product-slot--constellation .product-art.is-active {
        filter:
            saturate(1.02)
            contrast(1.01)
            drop-shadow(0 12px 18px rgba(0, 24, 38, 0.16));
    }

    .product-slot--constellation .product-art.is-flashing::before {
        filter: blur(8px);
        animation-duration: 900ms;
    }

    .product-slot--constellation .product-art.is-flashing .product-art__image,
    .product-slot--constellation .product-art.is-flashing .product-pair {
        animation:
            product-flash-jolt 900ms cubic-bezier(0.2, 1, 0.3, 1) both,
            product-cute-sway 2.85s ease-in-out 900ms infinite;
    }
}

.action-icon {
    position: relative;
    display: inline-block;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    color: currentColor;
}

.action-icon::before,
.action-icon::after {
    position: absolute;
    content: "";
    border-radius: 999px;
}

.action-icon::before {
    left: 4px;
    top: 11px;
    width: 13px;
    height: 2.25px;
    background: currentColor;
    transform: rotate(-45deg);
    transform-origin: 50% 50%;
}

.action-icon::after {
    right: 4px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-top: 2.25px solid currentColor;
    border-right: 2.25px solid currentColor;
    border-radius: 1px;
}

.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 bubble-water-flow {
    0% {
        background-position: 16% 82%, 84% 24%, 120% 0;
        filter: saturate(1.02) hue-rotate(0deg);
    }
    50% {
        background-position: 30% 70%, 72% 30%, 40% 0;
        filter: saturate(1.1) hue-rotate(4deg);
    }
    100% {
        background-position: 10% 90%, 88% 18%, -30% 0;
        filter: saturate(1.04) hue-rotate(-3deg);
    }
}

@keyframes pixel-sparkle-drift {
    from { transform: translate3d(-12px, 10px, 0); }
    to { transform: translate3d(18px, -22px, 0); }
}

@keyframes bubble-float {
    0%, 100% {
        opacity: 0.42;
        transform: translate3d(0, 0, 0) scale(0.88) rotate(-2deg);
    }
    38% {
        opacity: 0.72;
        transform: translate3d(10px, -38px, 0) scale(1.02) rotate(2deg);
    }
    72% {
        opacity: 0.5;
        transform: translate3d(-8px, -74px, 0) scale(0.96) rotate(-1deg);
    }
}

@keyframes mikio-glint-pop {
    0%, 100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.7) rotate(0deg);
    }
    14% {
        opacity: 0.94;
        transform: translate(-50%, -50%) scale(1.04) rotate(0deg);
    }
    30% {
        opacity: 0.12;
        transform: translate(-50%, -50%) scale(1.3) rotate(8deg);
    }
}

@keyframes mikio-letter-bubble-rise {
    0%, 100% {
        opacity: 0;
        transform: translate(-50%, -34%) scale(0.64);
    }
    16% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(0.92);
    }
    58% {
        opacity: 0.48;
        transform: translate(calc(-50% + 8px), calc(-50% - 30px)) scale(1.03);
    }
    82% {
        opacity: 0;
        transform: translate(calc(-50% - 6px), calc(-50% - 58px)) scale(0.86);
    }
}

@keyframes open-action-water-sheen {
    0%, 100% {
        opacity: 0.18;
        background-position: center, 145% 0;
    }
    16% {
        opacity: 0.72;
    }
    46% {
        opacity: 0.58;
        background-position: center, -55% 0;
    }
    68% {
        opacity: 0.12;
        background-position: center, -75% 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-bubble-glow {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.68) rotate(0deg); }
    28% { opacity: 0.74; }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.18) rotate(18deg); }
}

@keyframes opener-pixel-spark-pop {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.72); }
    24% { opacity: 0.86; }
    100% { opacity: 0; transform: translate(-50%, -56%) scale(1.18); }
}

@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-flash-pop {
    0% { opacity: 0; transform: scale(0.72); }
    24% { opacity: 0.58; transform: scale(0.96); }
    68% { opacity: 0.28; transform: scale(1.08); }
    100% { opacity: 0; transform: scale(1.16); }
}

@keyframes product-flash-jolt {
    0% { transform: scale(0.94) rotate(-1.5deg); }
    36% { transform: scale(1.035) rotate(1.2deg); }
    70% { transform: scale(0.99) rotate(-0.35deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes product-cycle-soft-flash {
    0%, 100% { filter: brightness(1) saturate(1); }
    28% { filter: brightness(1.14) saturate(1.1); }
    56% { filter: brightness(0.96) saturate(0.98); }
    78% { filter: brightness(1.08) saturate(1.06); }
}

@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-actions {
        transform: translateY(-26px);
    }

    .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);
    }

    .result-page[data-result="repeat-proof"] .product-slot {
        width: min(58vw, 230px);
        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 calc(10px + env(safe-area-inset-bottom));
        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;
    }

}

@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-actions {
        transform: translateY(-18px);
    }

    .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;
    }

    .action-buttons {
        gap: 6px;
        margin-top: 8px;
    }

    .primary-action,
    .secondary-action {
        min-height: 42px;
        padding-inline: 14px;
    }

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

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

}

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