/* ==========================================================================
   Panberes Gamification — landing + game
   ========================================================================== */

@font-face { font-family: "Diodrum"; src: url("../fonts/DiodrumArabic-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Diodrum"; src: url("../fonts/DiodrumArabic-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Diodrum"; src: url("../fonts/DiodrumArabic-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
	--navy: #162158;
	--navy-2: #1b2a73;
	--night: #121a4b;
	--sky: #0b9dfd;
	--sky-2: #3fb4ff;
	--pink: #e5197e;
	--field: #aeb3c8;
	--field-2: #c9ccdb;
	--otp: #e3e4ec;
	--muted: #8f93ad;
	--white: #fff;
	--radius: 24px;
	--ease: cubic-bezier(.22, .8, .24, 1);
	--ease-spring: cubic-bezier(.34, 1.56, .64, 1);
	--max: 1320px;
	/* 1 Figma pixel at the current width (frame is 1440 wide) */
	--u: calc(min(100vw, 1440px) / 1440);
	/* where the hero video turns from night to day */
	--split: 49.56%;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
	margin: 0;
	font-family: "Diodrum", Tahoma, sans-serif;
	color: var(--white);
	background: var(--navy);
	line-height: 1.7;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}
html.is-locked, body.is-locked { overflow: hidden; height: 100%; overscroll-behavior: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }
input { font: inherit; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }
[hidden] { display: none !important; }

/* ---------- Sky: night (left) / day (right) ---------- */
.sky { position: fixed; inset: 0; z-index: -1; display: flex; flex-direction: row-reverse; pointer-events: none; }
/* The whole night side carries the starry "shine" (same sky as the game),
   toned to the navy of the hero video, instead of a few nebula patches. */
.sky__night {
	flex: 0 0 var(--split);
	background:
		linear-gradient(180deg, rgba(27, 41, 105, .62) 0%, rgba(26, 39, 112, .55) 45%, rgba(22, 33, 94, .66) 100%),
		url("../img/game-bg.webp") center / cover no-repeat,
		#1b2969;
}
.sky__day { flex: 1 1 auto; background: linear-gradient(180deg, #0c9ffd 0%, #18a6ff 50%, #0b9dfd 100%); }
.star {
	position: absolute; width: var(--s, 8px); height: var(--s, 8px);
	background: #fff;
	clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
	opacity: .9;
	animation: twinkle var(--t, 3s) ease-in-out var(--dl, 0s) infinite;
}
@keyframes twinkle {
	0%, 100% { opacity: .25; transform: scale(.6) rotate(0); }
	50% { opacity: 1; transform: scale(1) rotate(45deg); }
}

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 2; }
.hero__stage {
	position: relative; width: 100%;
	aspect-ratio: 1920 / 800;
	overflow: hidden;
	background: #2a1c5e;
}
.hero__v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__v1 { transition: transform 1.1s var(--ease), filter 1.1s var(--ease); transform-origin: 50% 0; }
.hero__v2 {
	transform: translateY(100%);
	transition: transform 1.1s var(--ease);
	box-shadow: 0 -30px 60px rgba(0, 0, 0, .35);
}
.hero.is-revealed .hero__v1 { transform: scale(.92) translateY(-4%); filter: brightness(.55) blur(2px); }
.hero.is-revealed .hero__v2 { transform: translateY(0); }

.hero__hint {
	position: absolute; right: 3%; bottom: 18px;
	display: flex; flex-direction: column; align-items: center; gap: 6px;
	background: none; border: 0; color: #fff; font-size: 13px; font-weight: 500;
	text-shadow: 0 1px 6px rgba(0, 0, 0, .4);
	transition: opacity .5s, transform .5s;
	z-index: 3;
}
.hero.is-revealed .hero__hint { opacity: 0; transform: translateY(10px); pointer-events: none; }
.hero__mouse { width: 24px; height: 38px; border: 2px solid #fff; border-radius: 14px; position: relative; }
.hero__mouse span { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(-3px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Page & decorations ---------- */
.page { position: relative; z-index: 3; padding: 0 0 calc(110 * var(--u)); overflow-x: clip; }

/* Decorations use the Figma 1440 frame's coordinates: --x/--y are page
   coordinates, --ay is the section's own top in that frame. */
.deco { position: absolute; inset: 0; pointer-events: none; }
.d {
	position: absolute; display: block;
	left: calc(50% + (var(--x) - 720) * var(--u));
	top: calc((var(--y) - var(--ay)) * var(--u));
	width: calc(var(--w) * var(--u));
	height: calc(var(--h, var(--w)) * var(--u));
	rotate: var(--r, 0deg);
}
.d--cloud {
	background: url("../img/cloud-1.webp") center / contain no-repeat;
	animation: drift-u var(--dur, 30s) ease-in-out var(--dl, 0s) infinite alternate;
}
.d--nebula { background: url("../img/nebula.webp") center / contain no-repeat; opacity: .32; }
.d--star {
	background: #fff;
	clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
	animation: twinkle var(--t, 3s) ease-in-out var(--dl, 0s) infinite;
}
@keyframes drift-u {
	from { translate: calc(var(--dx, 30) * var(--u) * -1) 0; }
	to { translate: calc(var(--dx, 30) * var(--u)) 0; }
}

/* plain clouds (mobile CTA) */
.cloud {
	position: absolute; display: none; pointer-events: none;
	width: var(--w, 160px); aspect-ratio: 1981 / 793;
	background: url("../img/cloud-1.webp") center / contain no-repeat;
	animation: drift var(--dur, 20s) ease-in-out var(--dl, 0s) infinite alternate;
}
@keyframes drift {
	from { translate: calc(var(--dx, 20px) * -1) 0; }
	to { translate: var(--dx, 20px) 0; }
}

.glass {
	background: rgba(255, 255, 255, .12);
	border: 1px solid rgba(255, 255, 255, .28);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 20px 50px rgba(8, 16, 60, .18);
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 110ms); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- CTA (desktop = Figma card 1320×566 at x60 y768, scaled by --u) ---------- */
.cta-wrap { position: relative; width: calc(1320 * var(--u)); margin: calc(168 * var(--u)) auto 0; }
.deco--back { z-index: 0; }
.deco--front { z-index: 2; }
.cta {
	position: relative; z-index: 1;
	height: calc(566 * var(--u));
	border-radius: calc(24 * var(--u));
	overflow: hidden;
}
.cta__title {
	position: absolute; z-index: 5; top: calc(27 * var(--u)); left: 0; right: 0; margin: 0;
	text-align: center; font-size: max(18px, calc(36 * var(--u))); font-weight: 700; line-height: 2;
	text-shadow: 0 2px 12px rgba(10, 20, 80, .3);
}
.cta__scene { position: absolute; inset: 0; }
.pc {
	position: absolute;
	left: calc((var(--x) - 60) * var(--u));
	top: calc((var(--y) - 768) * var(--u));
	width: calc(var(--w) * var(--u));
}

.cta__basket {
	z-index: 2;
	filter: drop-shadow(0 calc(18 * var(--u)) calc(24 * var(--u)) rgba(5, 20, 80, .35));
	animation: float 4.5s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(calc(-14 * var(--u))) rotate(1deg); } }

/* Orbit = Figma "Ellipse 1": 649×39, rotated 14°, centred at card (659.6, 402.4).
   The back half passes behind the basket, the front half in front of it. */
.orbit {
	position: absolute; pointer-events: none;
	left: calc(335.1 * var(--u)); top: calc(382.9 * var(--u));
	width: calc(649 * var(--u)); height: calc(39 * var(--u));
	transform: rotate(-14deg);
	border-radius: 50%;
}
.orbit--back {
	z-index: 1;
	border: 1.5px solid rgba(255, 255, 255, .6);
	filter: drop-shadow(0 0 6px rgba(255, 255, 255, .55));
}
.orbit--front { z-index: 3; }
.orbit__star {
	position: absolute; left: 0; top: 50%;
	width: max(10px, calc(18 * var(--u))); aspect-ratio: 1;
	translate: -50% -50%;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0 12.2 7.8 20 10 12.2 12.2 10 20 7.8 12.2 0 10 7.8 7.8Z' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
	filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 10px rgba(160, 210, 255, .9));
	opacity: 0;
	transition: opacity .25s;
	animation: star-spin 3s linear infinite;
}
@keyframes star-spin { from { transform: rotate(14deg) scale(1); } 50% { transform: rotate(104deg) scale(1.25); } to { transform: rotate(194deg) scale(1); } }

/* moon start button — blinking */
.moon-btn {
	height: calc(var(--w) * var(--u));
	border: 0; padding: 0; background: none; border-radius: 50%;
	z-index: 4;
	animation: moon-bob 5s ease-in-out infinite;
	-webkit-tap-highlight-color: transparent;
}
.moon-btn img {
	position: relative; width: 100%; height: 100%; z-index: 2;
	filter: drop-shadow(0 0 22px rgba(255, 255, 255, .55));
	animation: blink 1.6s ease-in-out infinite;
}
.moon-btn__ring {
	position: absolute; inset: 6%; border-radius: 50%;
	border: 2px solid rgba(255, 110, 190, .9);
	box-shadow: 0 0 24px rgba(229, 25, 126, .6);
	animation: ripple 2.4s ease-out infinite;
}
.moon-btn__ring--2 { animation-delay: 1.2s; }
.moon-btn:hover img, .moon-btn:focus-visible img { animation-duration: .8s; }
.moon-btn:active { scale: .94; }
.moon-btn:focus-visible { outline: 3px solid #fff; outline-offset: 6px; }
@keyframes blink {
	0%, 100% { transform: scale(1); filter: drop-shadow(0 0 16px rgba(255, 255, 255, .45)) brightness(1); }
	45% { transform: scale(1.06); filter: drop-shadow(0 0 40px rgba(255, 120, 200, .95)) brightness(1.15); }
	55% { transform: scale(1.06); filter: drop-shadow(0 0 40px rgba(255, 120, 200, .95)) brightness(1.15); }
}
@keyframes ripple { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes moon-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* ---------- Products ---------- */
.products { position: relative; z-index: 2; width: min(var(--max), calc(1320 * var(--u))); margin: calc(90 * var(--u)) auto 0; text-align: center; }
.products__head h2 { margin: 0; font-size: clamp(22px, 2.6vw, 36px); font-weight: 700; }
.products__head p { margin: 6px 0 0; font-size: clamp(15px, 1.6vw, 20px); opacity: .9; }
.products__head, .products__grid { position: relative; z-index: 1; }
.products__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 270px)); gap: 40px; justify-content: center; margin-top: calc(77 * var(--u)); }
.product { display: flex; flex-direction: column; align-items: center; }
.product__media { display: grid; place-items: center; width: 100%; aspect-ratio: 270 / 209; border-radius: 20px; padding: 18px; }
.product__media img { width: 86%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(8, 16, 60, .3)); transition: transform .5s var(--ease); }
.product__media:hover img { transform: translateY(-6px) scale(1.04); }
.product__title { margin: 18px 0 8px; font-size: 17px; font-weight: 500; line-height: 1.8; }
.product__title span { display: block; }

.link-dot {
	position: relative; display: inline-flex; align-items: center; gap: 6px;
	color: #fff; text-decoration: none; font-size: 14px; font-weight: 500; padding: 2px 8px;
}
.link-dot::before {
	content: ""; position: absolute; left: -2px; top: 50%; width: 26px; height: 26px; margin-top: -13px;
	border-radius: 50%; background: rgba(255, 255, 255, .35); transition: width .35s var(--ease); z-index: -1;
}
.link-dot:hover::before { width: calc(100% + 4px); border-radius: 14px; }
.ic-arrow { width: 18px; height: 18px; flex: none; }

/* ---------- FAQ ---------- */
.faq {
	position: relative; z-index: 2;
	width: calc(1320 * var(--u)); margin: calc(200 * var(--u)) auto 0;
	background: #fff; color: var(--navy);
	border-radius: var(--radius);
	padding: 40px clamp(18px, 13vw, 190px) 50px;
	box-shadow: 0 30px 60px rgba(8, 16, 60, .2);
}
.faq .deco { z-index: 2; }
.faq h2 { margin: 0 0 22px; text-align: center; font-size: clamp(22px, 2.6vw, 36px); font-weight: 700; }
.faq__item { border-bottom: 1px solid rgba(22, 33, 88, .25); }
.faq__q {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	width: 100%; padding: 18px 0; border: 0; background: none; color: inherit; text-align: right;
	font-size: clamp(15px, 1.4vw, 18px); font-weight: 500;
}
.faq__icon { position: relative; width: 16px; height: 16px; flex: none; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .35s var(--ease), opacity .35s; }
.faq__icon::after { transform: rotate(90deg); }
.faq__item.is-open .faq__icon::after { transform: rotate(0); opacity: 0; }
.faq__item.is-open .faq__q { font-weight: 700; }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.faq__a > div { overflow: hidden; }
.faq__a p { margin: 0 0 18px; font-size: 15px; line-height: 2; color: #3a4170; }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 2; background: var(--night); text-align: center; padding: 40px 20px 30px; }
.footer__logo { width: 150px; margin: 0 auto 14px; filter: brightness(0) invert(1); }
.footer p { max-width: 1100px; margin: 0 auto; font-size: 13px; line-height: 2.1; opacity: .9; }
.footer__social { display: flex; justify-content: center; gap: 16px; margin-top: 18px; }
.footer__social a { color: #fff; width: 26px; height: 26px; display: grid; place-items: center; transition: transform .3s var(--ease-spring); }
.footer__social a:hover { transform: translateY(-3px) scale(1.1); }
.footer__social svg { width: 22px; height: 22px; }

/* ==========================================================================
   Game overlay
   ========================================================================== */
.game {
	position: fixed; inset: 0; z-index: 100;
	display: grid; place-items: center;
	padding: 90px 16px 24px;
	color: var(--navy);
	overflow-y: auto;
	animation: game-in .5s var(--ease);
}
@keyframes game-in { from { opacity: 0; } to { opacity: 1; } }
.game__bg {
	position: fixed; inset: 0; z-index: -2;
	background: #0d1030 url("../img/game-bg.webp") center / cover no-repeat;
}
.game__bg::after {
	content: ""; position: absolute; inset: 0;
	background: url("../img/nebula.webp") 20% 20% / 70% auto no-repeat, radial-gradient(ellipse at 50% 120%, rgba(60, 40, 140, .45), transparent 60%);
	opacity: .55; mix-blend-mode: screen;
	animation: nebula 30s ease-in-out infinite alternate;
}
@keyframes nebula { from { transform: translate3d(-2%, 0, 0) scale(1); } to { transform: translate3d(2%, -2%, 0) scale(1.08); } }
.game__stars { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.game__logo { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: 170px; padding: 18px 0; filter: brightness(0) invert(1); z-index: 1; }

.card {
	position: relative; width: min(100%, 1040px);
	background: #fff; border-radius: var(--radius);
	padding: 44px clamp(18px, 6vw, 90px) 40px;
	text-align: center;
	box-shadow: 0 40px 80px rgba(0, 0, 0, .35);
	animation: card-in .6s var(--ease-spring);
	overflow: hidden;
}
@keyframes card-in { from { opacity: 0; transform: translateY(40px) scale(.96); } to { opacity: 1; transform: none; } }
.card__close {
	position: absolute; top: 26px; left: 26px; width: 36px; height: 36px; padding: 6px;
	border: 0; border-radius: 50%; background: none; color: var(--navy);
	transition: background .25s, transform .35s var(--ease);
}
.card__close:hover { background: #f0f1f6; transform: rotate(90deg); }
.card__close svg { width: 100%; height: 100%; }
.card__title { margin: 0; font-size: clamp(22px, 2.5vw, 36px); font-weight: 700; line-height: 1.5; }
.card__sub { margin: 10px 0 0; font-size: clamp(14px, 1.6vw, 20px); color: var(--navy); line-height: 1.9; }
.card__sub b { font-weight: 500; }

.form { margin-top: 30px; }
.form__row { display: flex; gap: 12px; justify-content: center; }
.field { flex: 1 1 0; max-width: 300px; }
.field input {
	width: 100%; height: 56px; padding: 0 24px;
	border: 2px solid transparent; border-radius: 40px;
	background: var(--field); color: var(--navy);
	font-size: 16px; font-weight: 500; text-align: right;
	transition: border-color .25s, background .25s, box-shadow .25s;
}
.field input[dir="ltr"] { text-align: right; }
.field input::placeholder { color: var(--navy); opacity: .85; }
.field input:focus { outline: 0; background: var(--field-2); border-color: var(--navy); box-shadow: 0 0 0 4px rgba(22, 33, 88, .12); }
.field.is-error input { border-color: var(--pink); animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.form__error { min-height: 22px; margin: 12px 0 4px; color: var(--pink); font-size: 13px; font-weight: 700; }
.form__error:empty { min-height: 10px; }

/* CTA button: text + circle; becomes a pill when ready */
.btn-cta {
	position: relative; isolation: isolate;
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 40px; padding: 6px 22px;
	border: 0; border-radius: 30px; background: none;
	color: var(--navy); font-size: 16px; font-weight: 700;
	transition: color .3s, transform .2s;
}
.btn-cta::before {
	content: ""; position: absolute; z-index: -1;
	right: 4px; top: 50%; width: 36px; height: 36px; margin-top: -18px;
	border-radius: 30px; background: var(--field);
	transition: width .5s var(--ease), right .5s var(--ease), height .5s var(--ease), margin .5s var(--ease);
}
.btn-cta.is-ready::before { right: 0; width: 100%; height: 100%; margin-top: 0; top: 0; }
/* Only real pointers get the hover fill: on touch screens :hover sticks after a tap. */
@media (hover: hover) {
	.btn-cta:hover::before { right: 0; width: 100%; height: 100%; margin-top: 0; top: 0; }
}
.btn-cta.is-ready::before { animation: pill-glow 2.4s ease-in-out infinite; }
@keyframes pill-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(174, 179, 200, .7); } 50% { box-shadow: 0 0 0 8px rgba(174, 179, 200, 0); } }
.btn-cta:active { transform: scale(.96); }
.btn-cta:disabled { opacity: .55; cursor: progress; }
.btn-cta.is-loading span::after { content: "…"; }
.btn-cta--sm { font-size: 14px; padding: 4px 16px; min-height: 36px; white-space: nowrap; }
.btn-cta { flex: none; align-self: center; white-space: nowrap; }

/* OTP */
.otp { display: flex; gap: 18px; justify-content: center; }
.otp input {
	width: 56px; height: 56px; padding: 0;
	border: 2px solid transparent; border-radius: 50%;
	background: var(--otp); color: var(--navy);
	text-align: center; font-size: 22px; font-weight: 700;
	transition: background .25s, border-color .25s, transform .3s var(--ease-spring);
}
.otp input:focus { outline: 0; border-color: var(--navy); transform: scale(1.08); }
.otp input.is-filled { background: var(--field-2); }
.otp.is-error input { border-color: var(--pink); animation: shake .4s; }
.otp.is-ok input { background: #c7f0d8; border-color: #23a35a; }

.otp-test { margin: 14px auto 0; padding: 6px 14px; width: fit-content; border-radius: 20px; background: #fff4d6; color: #8a5a00; font-size: 13px; font-weight: 500; }
.resend { margin: 18px 0 4px; font-size: 14px; color: var(--muted); display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }
.resend b { color: var(--navy); font-weight: 700; }
.resend__btn { border: 0; background: none; padding: 0; color: var(--navy); font-weight: 700; }
.resend__btn:disabled { color: var(--muted); cursor: default; }
.resend.is-ready .resend__wait { display: none; }
.resend__btn:not(:disabled) { text-decoration: underline; text-underline-offset: 5px; }

.link-back, .link-invite { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; border: 0; background: none; color: var(--navy); font-size: 14px; padding: 4px; }
.link-back .ic-arrow { transform: scaleX(-1); width: 14px; }
.link-back:hover, .link-invite:hover { text-decoration: underline; text-underline-offset: 5px; }
.link-invite { display: block; margin: 14px auto 0; color: var(--muted); font-size: 13px; }

/* Rules + stats */
.rules { margin: 22px auto 0; padding: 14px 20px; border-radius: 14px; background: #ecedf3; color: var(--pink); font-size: 14px; font-weight: 500; line-height: 2; }
.rules p { margin: 0; }
/* Pre-game: one card per packaging, a fan of three packs that turns */
.pack-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.pack-card { position: relative; margin: 0; padding: 10px 10px 8px; border-radius: 14px; background: #fff; border: 2px solid transparent; overflow: hidden; }
.pack-card--new { border-color: rgba(29, 154, 82, .35); }
.pack-card--old { border-color: rgba(229, 25, 126, .3); }
.pack-card__badge {
	position: absolute; top: 8px; inset-inline-start: 8px; z-index: 5;
	display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff;
	box-shadow: 0 4px 10px rgba(22, 33, 88, .2);
}
.pack-card__badge svg { width: 18px; height: 18px; }
.pack-card--new .pack-card__badge { background: #1d9a52; }
.pack-card--old .pack-card__badge { background: var(--pink); }
.pack-card__stage { position: relative; height: 112px; }
.pack-card__stage img {
	position: absolute; left: 50%; top: 50%; width: 52%; height: 82%; object-fit: contain;
	transform: translate(-50%, -50%) scale(.55); opacity: 0; z-index: 1;
	filter: drop-shadow(0 6px 8px rgba(22, 33, 88, .25));
	transition: transform .7s var(--ease), opacity .7s var(--ease);
}
.pack-card__stage img[data-pos="front"] { transform: translate(-50%, -50%) scale(1); opacity: 1; z-index: 3; }
.pack-card__stage img[data-pos="left"] { transform: translate(-108%, -54%) rotate(-12deg) scale(.78); opacity: .9; z-index: 2; }
.pack-card__stage img[data-pos="right"] { transform: translate(8%, -54%) rotate(12deg) scale(.78); opacity: .9; z-index: 2; }
.rules__look { margin-top: 6px !important; color: var(--navy); font-size: 15px; font-weight: 700; }
.pack-card--xl .pack-card__stage img { width: 66%; }
.pack-card__cap { margin: 2px 0 0; color: var(--navy); font-size: 13px; font-weight: 500; line-height: 1.8; }
.pack-card__cap b { display: block; font-size: 15px; font-weight: 700; }
.pack-card--new .pack-card__cap b { color: #1d9a52; }
.pack-card--old .pack-card__cap b { color: var(--pink); }
.is-plus { color: #1d9a52; }
.is-minus { color: var(--pink); }

.stats { display: flex; justify-content: center; margin: 26px 0 22px; padding: 0; }
.stats > div { padding: 6px clamp(18px, 4vw, 44px); border-inline-start: 2px solid #dfe0ea; }
.stats > div:first-child { border-inline-start: 0; }
.stats dt { font-size: 15px; font-weight: 700; }
.stats dd { margin: 4px 0 0; font-size: 15px; font-weight: 500; }

.big-score { margin: 18px 0 0; font-size: clamp(30px, 4vw, 44px); font-weight: 700; animation: pop .7s var(--ease-spring) .2s both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* Invite */
.invite { margin: 26px auto 0; max-width: 820px; padding: 18px 22px; border-radius: 18px; background: #ecedf3; text-align: right; }
.invite__head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 500; }
.invite__count { font-size: 12px; font-weight: 700; }
.invite__row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.invite__link { flex: 1; min-width: 0; height: 44px; border: 0; border-radius: 30px; background: #767c9e; color: #fff; text-align: center; font-size: 14px; padding: 0 18px; }
.invite__link:focus { outline: 2px solid var(--navy); }
.invite__note { margin: 10px 0 0; font-size: 12px; color: var(--navy); text-align: center; }
.card__actions { display: flex; justify-content: center; align-items: center; gap: 36px; margin-top: 22px; flex-wrap: wrap; }
.btn-line { border: 0; background: none; color: var(--navy); font-weight: 700; padding: 6px 30px 10px; border-bottom: 1.5px solid var(--navy); transition: letter-spacing .3s; }
.btn-line:hover { letter-spacing: .5px; }

.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Playing */
.play { position: fixed; inset: 0; z-index: 3; touch-action: none; user-select: none; -webkit-user-select: none; }
.game.is-playing .game__logo { opacity: 0; }
.btn-cta:focus { outline: 0; }
.btn-cta:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.play__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: none; }
/* Full-width white bar stuck to the top (Figma "play game | Playing"):
   score and time on one side, the navy logo on the other. */
.hud {
	position: absolute; top: 0; left: 0; right: 0; z-index: 2;
	display: flex; align-items: center; justify-content: space-between;
	height: 88px; padding: 0 clamp(16px, 4vw, 56px);
	background: #fff; color: var(--navy);
	box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.hud__stats { display: flex; align-items: stretch; height: 100%; padding: 10px 0 14px; }
.hud__logo { width: 130px; height: auto; }
.hud__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0 clamp(16px, 3vw, 36px); line-height: 1.4; }
.hud__item:first-child { padding-inline-start: 0; }
.hud__item + .hud__item { border-inline-start: 1px solid rgba(22, 33, 88, .35); }
.hud__item span { font-size: 18px; font-weight: 700; }
.hud__item b { font-size: 18px; font-weight: 700; white-space: nowrap; }
.hud__item b i { font-style: normal; display: inline-block; min-width: 2ch; text-align: center; margin-inline-end: 5px; }
.hud__item i.bump { animation: bump .35s var(--ease-spring); }
.hud__item i.bump-bad { animation: bump .35s var(--ease-spring); color: var(--pink); }
@keyframes bump { 50% { transform: scale(1.35); } }
.hud__time.is-hurry b { color: var(--pink); }
.hud__time.is-hurry i { animation: bump .5s infinite; }
.hud__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #e5e6ee; overflow: hidden; }
.hud__bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--pink), #7d5cff, var(--sky)); transform-origin: right; transition: transform .25s linear; }
.countdown { position: absolute; inset: 0; display: grid; place-items: center; font-size: 120px; font-weight: 700; color: #fff; text-shadow: 0 0 40px rgba(255, 120, 200, .8); pointer-events: none; }
.countdown span { animation: count 1s var(--ease) both; }
@keyframes count { 0% { transform: scale(2); opacity: 0; } 30% { transform: scale(1); opacity: 1; } 100% { transform: scale(.6); opacity: 0; } }
.play__hint { position: absolute; bottom: 24%; left: 0; right: 0; margin: 0; text-align: center; color: #fff; font-size: 15px; opacity: .85; pointer-events: none; transition: opacity .6s; }
.play__hint.is-hidden { opacity: 0; }

.toast {
	position: fixed; bottom: 26px; left: 50%; z-index: 10;
	transform: translate(-50%, 30px); opacity: 0;
	padding: 10px 22px; border-radius: 30px; background: var(--navy); color: #fff; font-size: 14px; font-weight: 500;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
	transition: opacity .3s, transform .4s var(--ease-spring);
	pointer-events: none; max-width: calc(100% - 32px); text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
	.products__grid { grid-template-columns: repeat(2, minmax(0, 270px)); }
}

@media (max-width: 767px) {
	.hero__stage { aspect-ratio: 700 / 292; }
	.hero__hint { bottom: 6px; font-size: 11px; }
	.hero__mouse { width: 18px; height: 28px; }
	.hero__mouse span { top: 5px; height: 6px; }

	:root { --u: calc(100vw / 1100); --split: 49.43%; }
	.page { padding: 34px 14px 56px; }

	.cta-wrap { width: auto; margin: 0; }
	.cta-wrap .deco--back, .cta-wrap .deco--front { display: none; }
	.cta { height: auto; padding: 22px 14px 0; border-radius: 20px; }
	.cta__title { position: static; font-size: 20px; line-height: 1.7; }
	.cta__scene { position: relative; inset: auto; height: 330px; }
	.cta__basket.pc { width: 230px; left: calc(50% - 115px); top: 81px; }
	.moon-btn.pc { width: 128px; height: 128px; left: calc(50% - 150px); top: 20px; }
	.orbit { width: 382px; height: 23px; left: calc(50% - 191px); top: 185px; }
	.orbit__star { width: 13px; }
	.cloud { display: block; }
	.cloud--m1 { --w: 150px; left: -10px; bottom: 26px; --dur: 16s; }
	.cloud--m2 { --w: 160px; right: -24px; bottom: 6px; --dur: 20s; }
	.cloud--m3 { --w: 105px; left: 54%; top: 40px; --dur: 14s; z-index: 1; opacity: .9; }

	.products { width: auto; margin-top: 70px; }
	.products__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; margin-top: 30px; }
	.product__media { border-radius: 16px; padding: 12px; }
	.product__title { font-size: 14px; margin-top: 12px; }
	.link-dot { font-size: 13px; }

	.faq { width: auto; margin-top: 70px; padding: 28px 18px 30px; border-radius: 20px; }
	.faq__q { padding: 15px 0; }
	.faq__a p { font-size: 14px; }

	.footer p { font-size: 12px; }

	.game { padding: 76px 12px 18px; align-items: start; }
	.game__logo { width: 130px; padding: 14px 0; }
	.card { padding: 52px 16px 26px; border-radius: 20px; }
	.card__close { top: 12px; left: 12px; }
	.form { margin-top: 22px; }
	.form__row { flex-direction: column; align-items: stretch; gap: 10px; }
	.field { max-width: none; }
	.field input { height: 52px; }
	.otp { gap: 12px; }
	.otp input { width: 52px; height: 52px; }
	.rules { padding: 12px 14px; font-size: 13px; }
	.pack-cards { gap: 8px; }
	.pack-card { padding: 8px 6px 6px; }
	.pack-card__stage { height: 86px; }
	.pack-card__stage img { width: 58%; }
	.pack-card__badge { width: 24px; height: 24px; }
	.pack-card__cap { font-size: 12px; }
	.pack-card__cap b { font-size: 13px; }
	.stats > div { padding: 4px 14px; }
	.stats dt, .stats dd { font-size: 13px; }
	.invite { padding: 14px; }
	.invite__head { flex-direction: column; gap: 2px; }
	.invite__row { flex-direction: column; align-items: stretch; gap: 10px; }
	.invite__row .btn-cta { align-self: center; }
	.invite__link { font-size: 13px; }
	.card__actions { gap: 14px; flex-direction: column-reverse; }

	.hud { height: 64px; padding: 0 14px; }
	.hud__stats { padding: 8px 0 10px; }
	.hud__logo { width: 92px; }
	.hud__item { padding: 0 14px; gap: 0; }
	.hud__item span { font-size: 13px; }
	.hud__item b { font-size: 15px; }
	.countdown { font-size: 90px; }
	.play__hint { bottom: 40%; padding: 0 24px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	.reveal { opacity: 1; transform: none; }
}
