/* Gift Wrap Game site. One theme on purpose: the game's "Velvet Night" look
   (dark plum velvet, jewel ribbons, gold), so colors are set explicitly. */
:root {
  color-scheme: dark;
  --bg: #1d0b17;
  --bg2: #2a1121;
  --card: rgb(255 255 255 / .045);
  --line: rgb(233 196 106 / .28);
  --ink: #f7e8dc;
  --muted: #c9a6b6;
  --gold: #e9c46a;
  --gold-hi: #fff0c4;
  --gold-lo: #b08030;
  --r0: #e0aa48; --r1: #e0668d; --r2: #2fa582; --r3: #9c84dc;
  --cell: #2b1221;
  --display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", "Noto Sans", sans-serif;
  --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; color: var(--ink); font: 500 17px/1.6 var(--body); overflow-x: clip;
  background:
    radial-gradient(60% 40% at 10% 0%, rgb(233 196 106 / .14), transparent 70%),
    radial-gradient(50% 35% at 100% 20%, rgb(224 102 141 / .14), transparent 70%),
    linear-gradient(180deg, #3d1731 0, #250e1d 900px, var(--bg) 1600px);
  background-color: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(34px, 5vw, 54px); }
h3 { font-size: 24px; }
p { margin: 0; text-wrap: pretty; }
em { font-style: normal; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 60%, var(--gold-lo)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
a.skip:focus { width: auto; height: auto; clip-path: none; inset-inline-start: 12px; top: 12px; z-index: 99; background: var(--gold); color: #3a1628; padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.sparkles { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

/* Header */
header.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgb(29 11 23 / .6); border-bottom: 1px solid rgb(233 196 106 / .12); }
header.top .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 400 22px var(--display); white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 2px 10px rgb(0 0 0 / .4); }
nav.links { display: flex; gap: 22px; margin-left: auto; }
nav.links a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; }
nav.links a:hover { color: var(--ink); }
.lang { position: relative; }
.lang select { appearance: none; -webkit-appearance: none; background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 99px; padding: 7px 30px 7px 14px; font: 700 14px var(--body); cursor: pointer; }
.lang::after { content: ""; position: absolute; right: 13px; top: 50%; width: 6px; height: 6px; border: solid var(--gold); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.lang option { background: var(--bg2); }
@media (max-width: 760px) { nav.links { display: none; } .lang { margin-left: auto; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; font: 800 17px var(--body); color: #3a1628; text-decoration: none;
  background: linear-gradient(180deg, #fbe3a0, #d9a441); border: 0; border-radius: 16px; padding: 15px 26px; cursor: pointer;
  box-shadow: 0 4px 0 #8e5f1c, 0 10px 26px rgb(0 0 0 / .4); transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #8e5f1c, 0 14px 30px rgb(0 0 0 / .45); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #8e5f1c, 0 4px 10px rgb(0 0 0 / .4); }
.soon { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); color: var(--muted); font-weight: 700; font-size: 15px; }
.soon svg { width: 20px; height: 20px; fill: var(--ink); flex: none; }
.soon .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--r2); box-shadow: 0 0 0 0 rgb(47 165 130 / .7); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgb(47 165 130 / 0); } 100% { box-shadow: 0 0 0 0 rgb(47 165 130 / 0); } }

/* Hero */
.hero { position: relative; z-index: 1; padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; }
.kicker { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.hero h1 { font-size: clamp(46px, 7.4vw, 92px); }
.hero .sub { font-size: 19px; color: var(--muted); margin: 22px 0 32px; max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.stage { position: relative; height: 660px; }
.phone { position: absolute; width: 250px; border-radius: 42px; padding: 9px; background: linear-gradient(145deg, #4b2a3f, #1a0a14);
  box-shadow: 0 30px 70px rgb(0 0 0 / .6), inset 0 0 0 1px rgb(255 255 255 / .12); }
.phone img { border-radius: 34px; width: 100%; aspect-ratio: 1206 / 2622; object-fit: cover; }
.stage .phone.a { left: 8%; top: 0; transform: rotate(-6deg); animation: floatA 7s ease-in-out infinite; }
.stage .phone.b { right: 2%; top: 60px; transform: rotate(7deg); animation: floatB 8s ease-in-out infinite; }
@keyframes floatA { 50% { transform: rotate(-4deg) translateY(-16px); } }
@keyframes floatB { 50% { transform: rotate(5deg) translateY(14px); } }
.hero-gift { position: absolute; left: 50%; bottom: -10px; width: 230px; height: 230px; translate: -50% 0; z-index: 3; cursor: pointer; }
.hero-gift .gsvg { filter: drop-shadow(0 18px 24px rgb(0 0 0 / .55)); }
.floaty { position: absolute; width: 34px; height: 34px; border-radius: 9px; z-index: 2; animation: drift 9s ease-in-out infinite; }
@keyframes drift { 33% { transform: translate(10px, -18px) rotate(12deg); } 66% { transform: translate(-8px, 10px) rotate(-8deg); } }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .sub { margin-inline: auto; }
  .hero .actions { justify-content: center; }
  .stage { height: 500px; max-width: 460px; width: 100%; margin: 0 auto; }
  .phone { width: 180px; border-radius: 30px; padding: 7px; }
  .phone img { border-radius: 25px; }
  .hero-gift { width: 160px; height: 160px; }
}

/* Ribbons and gifts (shared with the demo) */
.rib { background:
    linear-gradient(115deg, transparent 18%, rgb(255 255 255 / .5) 36%, transparent 52%),
    linear-gradient(180deg, rgb(0 0 0 / .18), transparent 28% 72%, rgb(0 0 0 / .25)),
    var(--c);
  box-shadow: 0 2px 5px rgb(0 0 0 / .45), inset 0 1px 0 rgb(255 255 255 / .35); }
.gsvg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 7px rgb(0 0 0 / .45)); }
.gsvg .vb, .gsvg .hb, .gsvg .bowin, .gsvg .lidg, .gsvg .bodyg { transform-box: fill-box; }
.gsvg .vb { transform-origin: 50% 0; transform: scaleY(0); }
.gsvg .hb { transform-origin: 50% 50%; transform: scaleX(0); }
.gsvg .bowin { transform-origin: 50% 100%; transform: scale(0); }
.gsvg .lidg, .gsvg .bodyg { transform-origin: 50% 100%; }
.gift.tied .vb, .gift.tied .hb { transform: none; }
.gift.tied .bowin { transform: scale(1); }
.gift.wrapping { z-index: 7; }
.gift.wrapping .vb { animation: growY .26s ease-out forwards; }
.gift.wrapping .hb { animation: growX .26s .12s ease-out forwards; }
.gift.wrapping .bowin { animation: bowPop .5s .32s ease-out forwards; }
.gift.wrapping .gsvg { animation: squash .32s .3s ease-out, wiggle .34s .78s ease-in-out; }
.gift.wrapping .lidg { animation: lidOff .55s 1.12s cubic-bezier(.2,.8,.4,1) forwards; }
.gift.wrapping .bodyg { animation: bodyOut .45s 1.12s ease-in forwards; }
.gift.wrapping .tag { animation: fade .2s forwards; }
.gift.wrapping .rays { animation: rays 1.1s 1.05s ease-out forwards; }
.gift.back { animation: back .5s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes back { from { transform: translateY(-30%) scale(.4); opacity: 0; } }
@keyframes growY { to { transform: scaleY(1); } }
@keyframes growX { to { transform: scaleX(1); } }
@keyframes bowPop { 0% { transform: scale(0) rotate(-25deg); } 55% { transform: scale(1.3) rotate(8deg); } 78% { transform: scale(.9) rotate(-3deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes squash { 40% { transform: scale(1.1, .88); } 75% { transform: scale(.95, 1.06); } }
@keyframes wiggle { 20% { transform: rotate(-8deg) scale(1.04); } 40% { transform: rotate(7deg) scale(1.06); } 60% { transform: rotate(-5deg) scale(1.08); } 80% { transform: rotate(3deg) scale(1.1); } 100% { transform: scale(1.12); } }
@keyframes lidOff { 25% { transform: translateY(-30%) rotate(-6deg); } 100% { transform: translateY(-160%) rotate(-32deg) translateX(-20%); opacity: 0; } }
@keyframes bodyOut { 30% { transform: scale(1.12, .9); } 100% { transform: scale(.5); opacity: 0; } }
@keyframes fade { to { opacity: 0; } }
.rays { position: absolute; left: 50%; top: 50%; width: 320%; aspect-ratio: 1; translate: -50% -50%; z-index: -1; opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgb(255 226 150 / .6) 0 9deg, transparent 9deg 30deg);
  -webkit-mask: radial-gradient(circle, #000 12%, transparent 62%); mask: radial-gradient(circle, #000 12%, transparent 62%); }
@keyframes rays { 0% { opacity: 0; transform: scale(.2) rotate(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: scale(1.2) rotate(70deg); } }

/* Sections */
section { position: relative; z-index: 1; padding: 90px 0; }
.head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.head p { color: var(--muted); font-size: 18px; margin-top: 16px; }
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.rise { animation: rise-in .9s cubic-bezier(.2,.7,.2,1) both; }
.rise.d1 { animation-delay: .12s; } .rise.d2 { animation-delay: .24s; } .rise.d3 { animation-delay: .36s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(28px); } }
.reveal.d1 { transition-delay: .12s; } .reveal.d2 { transition-delay: .24s; } .reveal.d3 { transition-delay: .36s; }

/* How to play */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: var(--card); border: 1px solid rgb(255 255 255 / .07); border-radius: 26px; padding: 26px; transition: transform .3s, border-color .3s; }
.step:hover { transform: translateY(-6px); border-color: var(--line); }
.step .num { font: 800 13px var(--body); letter-spacing: .16em; color: var(--gold); }
.step h3 { margin: 6px 0 10px; }
.step p { color: var(--muted); font-size: 16px; }
.mini-stage { position: relative; height: 170px; margin: -6px -6px 18px; border-radius: 18px; background: radial-gradient(90% 90% at 50% 0%, #43203a, #2a1222 75%); overflow: hidden; display: grid; place-items: center; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }

.m-grid { display: grid; grid-template-columns: repeat(4, 30px); grid-template-rows: repeat(4, 30px); gap: 4px; position: relative; }
.m-grid i { border-radius: 7px; background: var(--cell); box-shadow: inset 0 2px 4px rgb(0 0 0 / .5); }
.m-piece { position: absolute; display: grid; grid-template-columns: repeat(2, 30px); gap: 4px; }
.m-piece b { width: 30px; height: 30px; border-radius: 7px; }
/* step 1: a piece glides down onto the grid and lands */
.s1 .m-piece { left: 34px; top: 0; animation: glide 3.2s cubic-bezier(.5,0,.3,1) infinite; }
@keyframes glide { 0% { transform: translate(60px, -90px) rotate(10deg) scale(1.15); opacity: 0; } 15% { opacity: 1; }
  50%, 80% { transform: translate(0, 34px); opacity: 1; } 55% { transform: translate(0, 34px) scale(1.08); } 100% { transform: translate(0, 34px); opacity: 0; } }
/* step 2: the dashed ring fills square by square */
.ring-demo { position: relative; display: grid; grid-template-columns: repeat(3, 34px); grid-template-rows: repeat(3, 34px); gap: 4px; }
.ring-demo i { border-radius: 8px; border: 1.5px dashed rgb(233 196 106 / .6); background: #33172a; position: relative; }
.ring-demo i::after { content: ""; position: absolute; inset: -1.5px; border-radius: 8px; opacity: 0;
  background: linear-gradient(115deg, transparent 18%, rgb(255 255 255 / .5) 36%, transparent 52%), var(--c);
  animation: fillIn 4s infinite; animation-delay: calc(var(--k) * .32s); }
@keyframes fillIn { 0%, 4% { opacity: 0; transform: scale(.3); } 10%, 82% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; } }
.ring-demo .center { border: 0; background: none; }
.ring-demo .center::after { display: none; }
.ring-demo .center .gift { position: absolute; inset: -4px; }
/* step 3: the gift wraps on a loop (JS toggles .wrapping) */
.s3 .gift { position: relative; width: 120px; height: 120px; }

/* Demo */
.demo { display: grid; grid-template-columns: 1fr 420px; gap: 48px; align-items: center; }
.demo .head { text-align: left; margin: 0; }
.demo-card { direction: ltr; position: relative; border-radius: 30px; padding: 18px; background: rgb(255 255 255 / .04); border: 1px solid rgb(255 255 255 / .08); box-shadow: 0 30px 70px rgb(0 0 0 / .45); touch-action: none; -webkit-user-select: none; user-select: none; }
.d-top { display: flex; justify-content: space-between; align-items: end; margin-bottom: 12px; padding: 0 4px; }
.d-label { font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.d-score { font-family: var(--display); font-size: 38px; line-height: 1; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff0c4, #e2ae50 70%, #c58e36); -webkit-background-clip: text; background-clip: text; color: transparent; }
.d-stars { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 6px; border-radius: 99px; border: 1px solid var(--line); font-weight: 800; font-variant-numeric: tabular-nums; }
.d-stars svg { width: 22px; height: 22px; filter: drop-shadow(0 0 6px rgb(255 214 120 / .6)); }
.board-wrap { position: relative; width: 100%; aspect-ratio: 1; }
.grid { position: absolute; inset: 0; padding: 10px; border: 2px solid transparent; border-radius: 22px;
  background: radial-gradient(120% 90% at 50% 0%, #43203a, #2a1222 70%) padding-box,
              linear-gradient(135deg, #f7dc96, #9e6e24 30%, #f3d48c 55%, #8e5f1c 80%, #f7dc96) border-box;
  box-shadow: 0 20px 44px rgb(0 0 0 / .55); display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); gap: 4px; }
.cell { position: relative; border-radius: 7px; background: var(--cell); box-shadow: inset 0 2px 4px rgb(0 0 0 / .5); }
.cell.ring { background: #33172a; }
.cell.ring::after { content: ""; position: absolute; inset: 3px; border-radius: 5px; border: 1.5px dashed rgb(233 196 106 / .6);
  background: radial-gradient(circle, rgb(233 196 106 / .55) 0 2px, transparent 2.5px); }
.cell.target::after { border-color: var(--gold); border-style: solid; animation: target 1s ease-in-out infinite; }
@keyframes target { 50% { box-shadow: 0 0 12px rgb(233 196 106 / .9); } }
.cell.f, .cell.suck, .cell.pop, .fcell {
  background: linear-gradient(115deg, transparent 18%, rgb(255 255 255 / .5) 36%, transparent 52%),
    linear-gradient(180deg, rgb(0 0 0 / .18), transparent 28% 72%, rgb(0 0 0 / .25)), var(--c);
  box-shadow: 0 2px 5px rgb(0 0 0 / .45), inset 0 1px 0 rgb(255 255 255 / .35); }
.cell.f::after, .cell.suck::after, .cell.pop::after { display: none; }
.cell.g { background: color-mix(in srgb, var(--c) 45%, var(--cell)); box-shadow: inset 0 0 0 2px var(--c); }
.cell.hl { filter: brightness(1.25) saturate(1.1); }
.cell.pop { animation: pop .36s ease-in forwards; }
.cell.suck { z-index: 6; animation: suck .34s cubic-bezier(.5,0,.9,.5) forwards; }
@keyframes pop { 35% { transform: scale(1.15); filter: brightness(1.8); } 100% { transform: scale(.1); opacity: 0; } }
@keyframes suck { to { transform: translate(var(--dx), var(--dy)) scale(.25) rotate(90deg); opacity: .2; } }
.grid .gift { position: relative; z-index: 2; pointer-events: none; }
.grid .gift.new { animation: back .5s cubic-bezier(.3,1.6,.5,1) both; }
.grid .gift.ready .gsvg { animation: hop .55s ease-in-out infinite; filter: drop-shadow(0 0 10px rgb(255 214 120 / .95)) drop-shadow(0 6px 7px rgb(0 0 0 / .45)); }
@keyframes hop { 50% { transform: translateY(-5%) rotate(-2.5deg); } }
.tag { position: absolute; right: -6px; bottom: -7px; z-index: 3; display: flex; align-items: center; gap: 4px; padding: 2px 7px 2px 5px;
  border-radius: 4px 10px 10px 4px; background: #f6e6c6; color: #4a1f30; font: 800 11px var(--body); font-variant-numeric: tabular-nums; transform: rotate(-8deg); box-shadow: 0 2px 5px rgb(0 0 0 / .45); }
.tag::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #8a5a3a; }
.gift.small .tag { font-size: 10px; right: -9px; bottom: -9px; padding: 1px 5px 1px 4px; }
.toast { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 9; pointer-events: none; text-align: center; white-space: nowrap;
  font-family: var(--display); font-size: 40px; line-height: 1; color: #ffe7a8; text-shadow: 0 0 18px rgb(255 190 90 / .7), 0 3px 0 rgb(0 0 0 / .35); animation: rise 1.2s ease-out forwards; }
.toast small { display: block; font: 800 13px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin-top: 6px; }
@keyframes rise { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.6); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); } 30% { transform: translate(-50%, -50%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -95%); } }
.tray { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; min-height: 104px; margin-top: 14px; touch-action: none; }
.slot { display: grid; place-items: center; border-radius: 18px; background: rgb(255 255 255 / .04); border: 1px solid rgb(255 255 255 / .07); cursor: grab; touch-action: none; }
.slot.lifting .mini, .slot.dim .mini { opacity: .28; }
.mini { position: relative; }
.mini .fcell, .float .fcell { position: absolute; border-radius: 6px; }
.float { position: fixed; left: 0; top: 0; z-index: 30; pointer-events: none; filter: drop-shadow(0 10px 14px rgb(0 0 0 / .5)); }
.d-hint { font-size: 14px; color: var(--muted); text-align: center; line-height: 1.45; margin-top: 12px; min-height: 2.9em; text-wrap: balance; }
[dir=rtl] .d-hint, [dir=rtl] .over-card { direction: rtl; }
.d-hint b { color: var(--gold); }
.over { position: absolute; inset: 0; z-index: 12; display: grid; place-items: center; border-radius: 22px; background: rgb(25 10 19 / .82); backdrop-filter: blur(4px); }
.over-card { text-align: center; display: grid; gap: 6px; justify-items: center; }
.over-card .d-score { font-size: 60px; }
.fly { position: fixed; left: 0; top: 0; width: 38px; height: 38px; margin: -19px 0 0 -19px; z-index: 40; pointer-events: none; filter: drop-shadow(0 0 10px rgb(255 214 120 / .95)); }
.bump { animation: bump .35s ease-out; }
@keyframes bump { 40% { transform: scale(1.18); } }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 35; }
@media (max-width: 900px) { .demo { grid-template-columns: 1fr; } .demo .head { text-align: center; } .demo-card { max-width: 420px; width: 100%; margin: 0 auto; padding: 12px; } }

/* Themes marquee */
.marquee { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.track { display: flex; gap: 28px; width: max-content; padding: 30px 0 40px; animation: scroll 40s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(calc(-50% - 14px)); } }
[dir=rtl] .track { animation-name: scrollR; }
@keyframes scrollR { to { transform: translateX(calc(50% + 14px)); } }
.shot { flex: none; width: 230px; text-align: center; }
.shot .phone { position: relative; width: 100%; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.shot:nth-child(odd) .phone { transform: rotate(-3deg); }
.shot:nth-child(even) .phone { transform: rotate(3deg) translateY(18px); }
.shot:hover .phone { transform: scale(1.05) rotate(0); }
.shot figcaption { margin-top: 30px; font: 400 22px var(--display); color: var(--gold); }

/* Charms */
.charms { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.charm-wall { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.charm { aspect-ratio: 1; border-radius: 22px; background: radial-gradient(80% 80% at 50% 30%, rgb(255 255 255 / .08), rgb(255 255 255 / .02)); border: 1px solid rgb(255 255 255 / .07); display: grid; place-items: center; }
.charm img { width: 78%; transform-origin: 50% 8%; animation: swing 3.6s ease-in-out infinite; animation-delay: calc(var(--k) * -.45s); filter: drop-shadow(0 8px 10px rgb(0 0 0 / .4)); }
@keyframes swing { 50% { transform: rotate(9deg); } 0%, 100% { transform: rotate(-9deg); } }
.charm.hidden img { filter: brightness(0) opacity(.35); }
.bar { height: 10px; border-radius: 99px; background: rgb(255 255 255 / .08); overflow: hidden; margin-top: 26px; max-width: 360px; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); transition: width 1.8s cubic-bezier(.2,.7,.2,1); }
.in .bar i { width: 75%; }
.bar-label { margin-top: 10px; font-size: 14px; font-weight: 800; color: var(--gold); letter-spacing: .06em; }
@media (max-width: 860px) { .charms { grid-template-columns: 1fr; } .charms .head { text-align: center; } .bar { margin-inline: auto; } }

/* Features */
.feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feat { padding: 26px 22px; border-radius: 24px; background: var(--card); border: 1px solid rgb(255 255 255 / .07); }
.feat .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 16px; background: rgb(233 196 106 / .12); }
.feat .ico svg { width: 28px; height: 28px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feat h3 { font-size: 22px; margin-bottom: 8px; }
.feat p { color: var(--muted); font-size: 15px; }
@media (max-width: 900px) { .feats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .feats { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; }
details { border-bottom: 1px solid rgb(255 255 255 / .1); }
summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative; font: 700 19px var(--body); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 50%; translate: 0 -50%; font: 400 30px var(--display); color: var(--gold); transition: rotate .3s; }
[dir=rtl] summary { padding: 22px 0 22px 40px; } [dir=rtl] summary::after { right: auto; left: 4px; }
details[open] summary::after { rotate: 45deg; }
details p { color: var(--muted); padding: 0 0 22px; }

/* Final call */
.final { text-align: center; padding: 110px 0 120px; }
.final .gift { position: relative; width: 170px; height: 170px; margin: 0 auto 30px; cursor: pointer; }
.final p { color: var(--muted); font-size: 18px; margin: 16px auto 30px; max-width: 32em; }
.final .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

footer { position: relative; z-index: 1; border-top: 1px solid rgb(233 196 106 / .12); padding: 34px 0 44px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; }
footer nav { display: flex; gap: 20px; margin-left: auto; }
[dir=rtl] footer nav, [dir=rtl] nav.links { margin-left: 0; margin-right: auto; }
@media (max-width: 760px) { [dir=rtl] .lang { margin-left: 0; margin-right: auto; } }
footer a { color: var(--muted); }

/* Simple pages (privacy, support) */
.page { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 56px 20px 80px; }
.page h1 { font-size: clamp(40px, 6vw, 60px); margin-bottom: 10px; }
.page h2 { font: 700 21px var(--body); margin: 34px 0 8px; }
.page p, .page li { color: var(--ink); }
.page .muted { color: var(--muted); }
.page .card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin-top: 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; }
  .track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
}
@media (max-width: 520px) {
  header.top .wrap { gap: 10px; }
  .brand { font-size: 18px; gap: 8px; }
  .brand img { width: 28px; height: 28px; }
  .lang select { padding: 6px 26px 6px 10px; font-size: 13px; max-width: 128px; }
}
:lang(ja) :is(h1, h2, h3), :lang(zh-Hans) :is(h1, h2), :lang(zh-Hant) :is(h1, h2), :lang(ko) :is(h1, h2) { word-break: auto-phrase; }
