@font-face {
  font-family: "Optimistic";
  src: url(/assets/fonts/Optimistic-VF2.ttf) format("truetype");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-cover: url(/assets/img/cover-bg.webp?v=10);   /* start screen */
  --bg-quiz: url(/assets/img/quiz-bg.webp?v=10);     /* every other screen */
  --bg-fallback: #0a9bff;
  --hero-image: none;          /* e.g. url(/assets/img/hero.png) */
  --ink: #1c2b33;
  --muted: #5b6b76;
  --on-bg: #ffffff;            /* text sitting directly on the background */
  --blue: #0064E0;
  --blue-soft: #e5f0ff;
  --line: #cfdcf0;
  --card: #ffffff;
  --ok: #b9efae;
  --ok-strong: #23a94a;
  --bad: #f7aab1;
  --bad-strong: #e0344a;
}

* { box-sizing: border-box; }
/* Chinese: Noto Sans TC, subset to the characters this site uses (about 150 KB per weight).
   unicode-range means the files are only downloaded on pages that show Chinese. */
@font-face { font-family: "Noto Sans TC"; src: url(/assets/fonts/NotoSansTC-Regular.woff) format("woff"); font-weight: 300 500; font-display: swap; unicode-range: U+2E80-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF; }
@font-face { font-family: "Noto Sans TC"; src: url(/assets/fonts/NotoSansTC-Medium.woff) format("woff"); font-weight: 600; font-display: swap; unicode-range: U+2E80-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF; }
@font-face { font-family: "Noto Sans TC"; src: url(/assets/fonts/NotoSansTC-Bold.woff) format("woff"); font-weight: 700 900; font-display: swap; unicode-range: U+2E80-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF; }
html { font-size: clamp(14px, min(4.1vw, 2.2vh), 19px); font-size: round(down, clamp(14px, min(4.1vw, 2.2vh), 19px), 1px); -webkit-text-size-adjust: 100%; }
html.kiosk { font-size: min(3.9vw, 2.15vh); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: "Optimistic", "Noto Sans TC", "Optimistic Display", "Helvetica Neue", Helvetica, Arial, "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  background: var(--bg-fallback);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: var(--bg-quiz) center / cover no-repeat, var(--bg-fallback);
}
html[data-screen="home"] body::before { background-image: var(--bg-cover); }
html.kiosk body { user-select: none; -webkit-user-select: none; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, p, ul { margin: 0; padding: 0; }

#app { max-width: 30rem; margin: 0 auto; }
.screen {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
/* the whole group sits in the middle of the screen; long content simply scrolls */
.screen > :first-child { margin-top: auto; }
.screen > :last-child { margin-bottom: auto; }
/* ---------- shared pieces ---------- */
.card {
  width: 100%;
  background: var(--card);
  border-radius: 1.25rem;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 .6rem 1.75rem rgba(0, 50, 130, .22);
}
.card.center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.card-icon { color: var(--blue); width: 4.5rem; height: 4.5rem; margin: .25rem auto 1rem; }
.card-icon.trophy { width: 5.5rem; height: 5.5rem; margin-bottom: .25rem; }
.card-icon svg { width: 100%; height: 100%; display: block; }
.card-art { display: block; width: 6.5rem; height: 6.5rem; margin: -.25rem auto .75rem; object-fit: contain; }
.page-title { font-size: 1.5rem; letter-spacing: .04em; margin-top: .75rem; color: var(--on-bg); }
.hint { font-size: .8125rem; color: var(--muted); text-align: center; }
.screen > .hint { color: var(--on-bg); font-size: .875rem; }
.lead { font-size: 1.0625rem; font-weight: 600; text-wrap: balance; }
.notice { font-size: .875rem; background: var(--blue-soft); color: var(--blue); padding: .5rem .75rem; border-radius: .625rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 13.5rem; height: 3.5rem;
  padding: 0 2rem;   /* the font file's own metrics centre capitals in the line, so no nudging is needed */
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 1.3125rem; font-weight: 700; line-height: 1; letter-spacing: .01em;
  text-align: center;
  box-shadow: 0 .4rem 1.1rem rgba(0, 50, 130, .28);
  transition: transform .12s ease, opacity .2s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; box-shadow: none; cursor: default; }
.btn:focus-visible, .link:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.opt:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.link { background: none; border: 0; padding: .75rem 1rem; color: var(--on-bg); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.screen > .btn { margin-top: .75rem; }
.screen > .btn + .link { margin-top: -.5rem; }

/* ---------- home ---------- */
/* The cover is a 1080x1920 "stage" that always fills the screen. Title and
   button are placed in stage coordinates so they keep their spot next to the
   artwork on every phone. */
.screen-home {
  --sw: max(100vw, 56.25vh);
  position: fixed; inset: 0; min-height: 0; padding: 0; overflow: hidden; display: block;
}
@supports (height: 100dvh) { .screen-home { --sw: max(100vw, 56.25dvh); } }
.stage {
  position: absolute; left: 50%; top: 50%;
  width: var(--sw); height: calc(var(--sw) * 1.7778);
  transform: translate(-50%, -50%);
}
.layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; -webkit-user-drag: none; }
/* The title is the designer's artwork (assets/img/title-<region>.svg), placed where it
   sits in the 1080x1920 design and scaled with the screen width. */
.cover-title {
  --tw: 100vw;   /* width the 1080 design is scaled to */
  position: absolute; top: 29.64%; left: calc(50% - 50vw + 8.461vw); width: 79.99vw;
  transform: translateY(-50%); margin: 0; font-size: 0; line-height: 0;
}
.cover-title img {
  /* Figma drop shadow: x 0, y 4, blur 11.6, #000 at 27% (on the 1080 canvas). Drawn by CSS so the letters stay sharp. */
  filter: drop-shadow(0 calc(var(--tw) * 0.00370) calc(var(--tw) * 0.01074) rgba(0, 0, 0, .27));
  display: block; width: 100%; height: auto; aspect-ratio: 863.923 / 390.512; pointer-events: none; user-select: none; -webkit-user-drag: none;
}
/* Taiwan title artwork (two lines) sits a little higher in the design */
[data-region="tw"] .cover-title { top: 25.69%; left: calc(50% - 50vw + 8.470vw); width: 73.055vw; }
[data-region="tw"] .cover-title img { aspect-ratio: 788.992 / 238.896; }
.btn.cover-btn {
  /* right of the character, as in the design; never runs off a very narrow screen */
  position: absolute; top: 56.3%;
  left: min(71.4%, calc(50% + 50vw - var(--sw) * .19 - .75rem));
  width: calc(var(--sw) * .36); min-width: 0; height: calc(var(--sw) * .104);
  margin: calc(var(--sw) * -.052) 0 0 calc(var(--sw) * -.18);
  padding: 0 .5em;
  font-size: calc(var(--sw) * .05); font-size: round(calc(var(--sw) * .05), 1px); white-space: nowrap;
}
.cover-link { position: absolute; left: 50%; bottom: max(1.25rem, env(safe-area-inset-bottom)); transform: translateX(-50%); white-space: nowrap; text-shadow: 0 1px 6px rgba(0, 50, 130, .5); }

/* wide screens (laptop preview): show the whole stage as a centred column */
@media (min-aspect-ratio: 3/4) {
  .screen-home { --sw: 56.25vh; }
  .btn.cover-btn { left: 71.4%; }
  .cover-title { --tw: var(--sw); left: 8.461%; width: 79.99%; }
  [data-region="tw"] .cover-title { left: 8.470%; width: 73.055%; }
  .stage { -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
}

/* ---------- rules ---------- */
.rules { list-style: none; border-top: 1px solid var(--line); }
.rules li { display: flex; gap: .625rem; align-items: flex-start; padding: 1rem 0; letter-spacing: -.01em; border-bottom: 1px solid var(--line); font-size: .875rem; font-weight: 600; }
.rules li > svg { flex: none; width: 1.75rem; height: 1.75rem; padding: .3rem; border-radius: 50%; background: var(--blue-soft); color: var(--blue); }
.rules b { display: block; }
.rules li span { padding-top: .2rem; }
.screen-rules .card .hint { margin-top: 1rem; }

/* ---------- question ---------- */
.topbar { width: 100%; display: flex; align-items: center; gap: .75rem; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  height: 1.875rem; min-width: 5.5rem; padding: 0 .75rem 0 .625rem; border-radius: 999px;   /* icon has its own inner margin */
  background: #fff; border: 0; color: var(--blue);
  font-size: .875rem; font-weight: 700; line-height: 1; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pill svg { width: 1rem; height: 1rem; flex: none; display: block; }
.pill.urgent { color: var(--bad-strong); }
.bar { flex: 1; height: .375rem; border-radius: 999px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: #fff; border-radius: inherit; transition: width .2s linear; }
.count { font-size: .875rem; color: var(--on-bg); font-weight: 600; }
.count b { font-size: 1.375rem; }

.q { display: flex; gap: .75rem; padding-bottom: 1.125rem; margin-bottom: 1.125rem; border-bottom: 1.5px solid var(--line); }
.q-no { color: var(--blue); font-size: 1.375rem; font-weight: 800; line-height: 1.2; }
.q h2 { font-size: 1.0625rem; line-height: 1.4; }
.options { display: flex; flex-direction: column; gap: .75rem; }
.opt {
  display: flex; align-items: center; gap: .875rem; width: 100%; min-height: 4.25rem;
  padding: .75rem 1rem; text-align: left;
  background: #fff; border: 1.5px solid var(--line); border-radius: .875rem;
  font-size: .875rem; font-weight: 600; line-height: 1.35;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.opt:active:not(:disabled) { transform: scale(.985); }
.opt:disabled { cursor: default; color: var(--ink); }
.badge {
  flex: none; width: 2rem; height: 2rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-soft); color: var(--blue); font-weight: 800; font-size: 1rem; line-height: 1;
}
.test-tag {
  flex: none; align-self: flex-start; margin: -.35rem -.45rem 0 0;
  padding: .34rem .4rem .1rem; border-radius: .35rem;
  background: #ffe9a8; color: #6b4e00; font-size: .625rem; font-weight: 700; line-height: 1; white-space: nowrap;
}
.badge svg { width: 1.25rem; height: 1.25rem; }
.opt.pending { border-color: var(--blue); background: var(--blue-soft); }
.opt.correct { background: var(--ok); border-color: var(--ok); }
.opt.correct .badge { background: var(--ok-strong); }
.opt.wrong { background: var(--bad); border-color: var(--bad); }
.opt.wrong .badge { background: var(--bad-strong); }

/* ---------- result + voucher ---------- */
.win { color: var(--blue); font-size: 1.625rem; letter-spacing: .02em; }
.score { font-size: 1rem; }
.score b { color: var(--blue); font-size: 1.5rem; padding: 0 .1em; }
.qr { width: 11rem; padding: .5rem; background: #fff; border: 1.5px solid var(--line); border-radius: .75rem; }
.qr.big { width: 10.5rem; }   /* big screens: a smaller code is still easy to scan and does not dominate the page */
.qr svg { display: block; width: 100%; height: auto; }
a.qr { display: block; }

/* voucher: picture on top, tear line, then a stub with number and QR side by side */
.win-head { text-align: center; color: var(--on-bg); }
.win-badge {
  width: 3.5rem; height: 3.5rem; margin: 0 auto .5rem; padding: .65rem;
  border-radius: 50%; background: #fff; color: var(--blue);
  box-shadow: 0 .4rem 1rem rgba(0, 50, 130, .28);
}
.win-badge svg { display: block; width: 100%; height: 100%; }
.win-title { font-size: 1.875rem; line-height: 1.15; text-shadow: 0 .06em .3em rgba(0, 40, 120, .3); }
.win-sub { font-size: 1.0625rem; font-weight: 700; margin-top: .2rem; }
.win-note { font-size: .8125rem; font-weight: 500; line-height: 1.35; margin-top: .3rem; opacity: .95; }
.win-note[hidden] { display: none; }
.fail-hint { font-size: 1.125rem; font-weight: 700; line-height: 1.35; color: var(--ink); text-align: center; }
/* very short screens: drop the nice-to-haves before the text gets too small */
.compact .win-badge { width: 3.25rem; height: 3.25rem; padding: .6rem; margin-bottom: .4rem; }
.compact .screen { gap: .875rem; padding-top: 1rem; padding-bottom: 1rem; }
.compact .screen > .link { margin-top: -.5rem; padding: .5rem 1rem; }
.compact .win-badge { width: 2.75rem; height: 2.75rem; padding: .5rem; margin-bottom: .3rem; }
.compact .ticket-stub { padding: .8rem 1rem .7rem; }
.compact .v-no { font-size: 3.5rem; }
.compact .steps { margin-top: .5rem; padding-top: .5rem; }
.compact .stub-foot { margin-top: .5rem; padding-top: .45rem; }
.screen > .notice { background: rgba(255, 255, 255, .92); text-align: center; }
/* The ticket is as wide as the screen allows. On short screens its width follows the
   screen HEIGHT instead, so the picture never pushes the page past the fold. */
.ticket { position: relative; width: 100%; max-width: calc((100vh - 124px) * .59); margin-inline: auto; filter: drop-shadow(0 .6rem 1.2rem rgba(0, 50, 130, .28)); }
@supports (height: 100dvh) { .ticket { max-width: calc((100dvh - 124px) * .59); } }
.screen-voucher { gap: .875rem; padding-top: 1rem; padding-bottom: 1rem; }
.screen-voucher > .link { margin-top: -.375rem; padding: .5rem 1rem; }
.ticket-art { position: relative; border-radius: 1.25rem; background: #fff; padding: .5rem; }   /* white frame */
.ticket-art img { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 643; object-fit: cover; border-radius: .875rem; background: #0b6b4f; }
.v-name {
  position: absolute; left: 1.125rem; top: 1.125rem;
  padding: .45em .9em; border-radius: 999px;
  background: rgba(255, 255, 255, .94); color: var(--blue);
  font-size: .75rem; font-weight: 700; line-height: 1; letter-spacing: .1em; text-transform: uppercase;
}
.ticket-stub { position: relative; background: #fff; border-radius: 1.25rem; padding: 1.125rem 1.25rem 1rem; }
.ticket-stub::before { content: ""; position: absolute; left: 1.25rem; right: 1.25rem; top: -1px; border-top: 2px dashed var(--line); }
.stub-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.stub-no { min-width: 0; text-align: left; }
.v-label { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.v-no { font-size: 4.25rem; font-weight: 800; line-height: 1; margin: .1em 0 .02em; color: var(--blue); font-variant-numeric: tabular-nums; transform-origin: left center; }
.v-of { font-size: .8125rem; font-weight: 600; line-height: 1.3; color: var(--ink); text-wrap: balance; }
.ticket .qr { flex: none; width: 7.25rem; padding: .375rem; }
/* three steps in a row: go to reception > staff scan > get the voucher */
.steps { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.steps ol { list-style: none; margin: 0 -.5rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; font-size: .75rem; font-weight: 600; line-height: 1.25; color: var(--ink); }
.steps li b {
  flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue); color: #fff; font-size: .8125rem; font-weight: 800; line-height: 1;
}
.steps li + li::before {   /* connector between the circles */
  content: ""; position: absolute; top: .75rem; right: calc(50% + 1.1rem); width: calc(100% - 2.2rem); border-top: 2px dotted var(--line);
}
.stub-foot { margin-top: .7rem; padding-top: .6rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .1rem .6rem; text-align: center; }
.stub-foot .live { font-size: 1rem; gap: .4rem; }
.stub-foot .live i { width: .5rem; height: .5rem; }
.stub-foot .hint { margin: 0; font-size: .75rem; }
.live { display: inline-flex; align-items: center; gap: .5rem; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.live i { width: .625rem; height: .625rem; border-radius: 50%; background: var(--ok-strong); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .2; transform: scale(.7); } }
/* redeemed: everything turns grey, with one friendly blue badge */
.stamp {
  display: none; position: absolute; left: 50%; top: 4.75rem; transform: translate(-50%, -50%);
  align-items: center; gap: .4rem;
  padding: .56em 1.1em; border: 2px solid var(--blue); border-radius: 999px;
  color: var(--blue); background: #fff;
  font-size: 1.125rem; font-weight: 700; line-height: 1; white-space: nowrap;
  box-shadow: 0 .3rem .9rem rgba(0, 60, 150, .18);
}
.stamp svg { width: 1.1em; height: 1.1em; stroke: var(--blue); }
.is-redeemed .stamp { display: inline-flex; }
.is-redeemed .ticket-art, .is-redeemed .stub-row, .is-redeemed .stub-foot, .is-redeemed .steps { filter: grayscale(1); }
.is-redeemed .steps { opacity: .35; }
.is-redeemed .stub-row { opacity: .3; }
.is-redeemed .ticket-art { opacity: .8; }
html.redeemed body::before { filter: grayscale(1) brightness(.92); }
html.redeemed .win-badge { color: #7a8794; }
body::before, .ticket-art, .stub-row { transition: filter .6s ease, opacity .6s ease; }
.is-redeemed .live i { background: var(--muted); animation: none; }

/* ---------- loading ---------- */
.screen-loading { justify-content: center; }
.screen-loading > .spinner { margin: 0; }
.spinner { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: .3rem solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.screen-error { justify-content: center; }

/* ---------- motion ---------- */
/* Top-level pieces only fade and scale (never slide), so entrance motion can
   not make the page taller than the screen. */
@keyframes pop-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(.6rem); } to { opacity: 1; transform: none; } }
@keyframes btn-ready { 0% { transform: scale(1); } 45% { transform: scale(1.07); } 100% { transform: scale(1); } }
@keyframes correct-pulse { 0% { transform: scale(1); } 35% { transform: scale(1.035); } 100% { transform: scale(1); } }
@keyframes wrong-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-.4rem); } 40% { transform: translateX(.4rem); } 60% { transform: translateX(-.25rem); } 80% { transform: translateX(.25rem); } }
@keyframes icon-pop { from { transform: scale(0) rotate(-45deg); } 70% { transform: scale(1.2) rotate(0); } to { transform: scale(1); } }
@keyframes urgent { 50% { transform: scale(1.08); } }
@keyframes trophy-in { 0% { opacity: 0; transform: scale(.3) rotate(-18deg); } 60% { opacity: 1; transform: scale(1.15) rotate(6deg); } 80% { transform: scale(.96) rotate(-3deg); } 100% { transform: none; } }
@keyframes bulb { 0%, 100% { transform: rotate(8deg) scale(1); } 50% { transform: rotate(8deg) scale(1.09); } }
@keyframes bulb-glow { 0%, 100% { filter: drop-shadow(0 0 .2rem rgba(255, 214, 110, .35)); } 50% { filter: drop-shadow(0 0 1rem rgba(255, 214, 110, .9)); } }
@keyframes number-in { 0% { opacity: 0; transform: scale(.5); } 70% { opacity: 1; transform: scale(1.08); } 100% { transform: none; } }

.screen > .card, .screen > .topbar, .screen > .page-title, .screen > .ticket, .screen > .win-head, .screen > .notice { animation: pop-in .38s cubic-bezier(.2, .9, .3, 1.2) backwards; }
.screen > .hint, .screen > .link { animation: fade-in .4s .25s backwards; }
.screen > .btn { animation: pop-in .38s .18s cubic-bezier(.2, .9, .3, 1.2) backwards; }
.screen > .btn.ready { animation: btn-ready .45s ease-out; }
.btn:not(:disabled):active { transform: scale(.95); }

/* inside the cards */
.rules li { animation: rise-in .4s backwards; }
.rules li:nth-child(1) { animation-delay: .15s; } .rules li:nth-child(2) { animation-delay: .25s; } .rules li:nth-child(3) { animation-delay: .35s; }
.card-art { transform-origin: 50% 85%; animation: bulb 2.4s ease-in-out infinite, bulb-glow 2.4s ease-in-out infinite; }
.q { animation: fade-in .35s .1s backwards; }
.opt { animation: rise-in .38s backwards; }
.opt:nth-child(1) { animation-delay: .14s; } .opt:nth-child(2) { animation-delay: .22s; } .opt:nth-child(3) { animation-delay: .30s; }
.opt.correct { animation: correct-pulse .45s ease-out; }
.opt.wrong { animation: wrong-shake .4s ease-in-out; }
.opt.correct .badge svg, .opt.wrong .badge svg { animation: icon-pop .35s cubic-bezier(.2, .9, .3, 1.3) backwards; }
.opt.pending .badge { animation: urgent .6s ease-in-out infinite; }
.pill.urgent { animation: urgent .5s ease-in-out infinite; }
.win-badge { animation: trophy-in .7s .15s cubic-bezier(.2, .9, .3, 1.1) backwards; }
.card-icon.trophy { animation: trophy-in .7s .15s cubic-bezier(.2, .9, .3, 1.1) backwards; }
.win { animation: rise-in .4s .35s backwards; }
.score, .card.center > .lead, .card.center > .qr { animation: rise-in .4s .5s backwards; }
.ticket .v-no { animation: number-in .55s .55s cubic-bezier(.2, .9, .3, 1.2) backwards; }
.ticket.is-redeemed .v-no { animation: none; }
@keyframes stamp-in { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 70% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.stamp { animation: stamp-in .45s .15s cubic-bezier(.2, .9, .3, 1.2) backwards; }
.ticket-art img { animation: fade-in .5s .2s backwards; }

/* cover: layers arrive from their own side, then drift gently */
@keyframes in-back { from { opacity: 0; transform: translate(4%, -5%) scale(1.03); } to { opacity: 1; transform: scale(1.03); } }
@keyframes in-front { from { opacity: 0; transform: translate(-4%, 5%) scale(1.03); } to { opacity: 1; transform: scale(1.03); } }
@keyframes in-mid { from { opacity: 0; transform: translateY(3%) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes drift-a { from { transform: scale(1.03) translateY(0); } to { transform: scale(1.03) translateY(.7%); } }
@keyframes drift-b { from { transform: scale(1.03) translateY(0); } to { transform: scale(1.03) translateY(-.7%); } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-.5%); } }
@keyframes title-in { from { opacity: 0; transform: translate(-6%, -50%); } to { opacity: 1; transform: translate(0, -50%); } }
@keyframes cta-in { 0% { opacity: 0; transform: scale(.6); } 70% { opacity: 1; transform: scale(1.06); } 100% { opacity: 1; transform: none; } }
@keyframes cta-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
.layer-back { animation: in-back .9s cubic-bezier(.2, .8, .2, 1) both, drift-a 5s .9s ease-in-out infinite alternate; }
.layer-front { animation: in-front .9s .1s cubic-bezier(.2, .8, .2, 1) both, drift-b 6s 1s ease-in-out infinite alternate; }
.layer-mid { transform-origin: 28% 73%; animation: in-mid .7s .35s cubic-bezier(.2, .9, .3, 1.15) both, bob 3.2s 1.05s ease-in-out infinite alternate; }
.cover-title { animation: title-in .6s .55s cubic-bezier(.2, .8, .2, 1) both; }
.btn.cover-btn { animation: cta-in .5s .95s cubic-bezier(.2, .9, .3, 1.2) both, cta-breathe 2.2s 1.6s ease-in-out infinite; }
.cover-link { animation: fade-in .4s 1.3s both; }

/* confetti for winners */
.confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; }
.confetti i { position: absolute; top: -4vh; width: .55rem; height: .85rem; border-radius: .12rem; opacity: 0; animation: confetti-fall linear forwards; }
@keyframes confetti-fall {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--drift), 108vh) rotate(var(--spin)); }
}

/* Boxed labels use whole-pixel type sizes. Browsers round each line of text to the pixel
   grid, so fractional sizes leave a label up to a pixel off-centre in its pill or circle. */
@supports (font-size: round(1rem, 1px)) {
  .btn { font-size: round(1.3125rem, 1px); }
  .pill { font-size: round(.875rem, 1px); }
  .v-name { font-size: round(.75rem, 1px); }
  .steps li b { font-size: round(.8125rem, 1px); }
  .stamp { font-size: round(1.125rem, 1px); }
  .btn.cover-btn { font-size: round(calc(var(--sw) * .05), 1px); }
}
