:root{--pumpkin:#E8742B;--gold:#FFD166;--burgundy:#7B2D26;--cream:#FFF8EE;--brown:#3B1F14}
*{box-sizing:border-box}
body{margin:0;font-family:'Vazirmatn',sans-serif;min-height:100vh;color:var(--cream);
background:radial-gradient(ellipse at top,#D2691E 0%,#9a3b22 35%,#7B2D26 60%,#2a140c 100%) fixed;overflow-x:hidden}
#leaves{position:fixed;inset:0;pointer-events:none;z-index:0;overflow:hidden}
.leaf{position:absolute;top:-60px;animation:fall linear infinite}
.leaf span{display:inline-block;animation:sway ease-in-out infinite alternate}
@keyframes fall{to{transform:translateY(115vh) rotate(540deg)}}
@keyframes sway{from{transform:translateX(-40px) rotate(-25deg)}to{transform:translateX(40px) rotate(25deg)}}
#root{position:relative;z-index:1}
.card-form{background:var(--cream);color:var(--brown)}
.btn{transition:transform .15s,filter .15s;cursor:pointer}
.btn:hover{transform:translateY(-3px) scale(1.03);filter:brightness(1.1)}
.btn:active{transform:scale(.96)}
.panel{border-radius:1.5rem;padding:1.25rem;background:rgba(0,0,0,.25);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.1)}

/* headline */
.headline{font-weight:900;line-height:1.5}
.headline .w{display:inline-block;margin:0 .14em;opacity:0;animation:pop .6s cubic-bezier(.3,1.6,.5,1) forwards}
.hl-name{font-size:clamp(2.6rem,10vw,4.5rem);line-height:1.25}
.hl-mid{font-size:clamp(1.4rem,5vw,2rem);font-weight:400;opacity:.95;margin-top:.2rem}
.hl-line{font-size:clamp(1.6rem,6vw,2.6rem);display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:.1em}
.age-badge{background:linear-gradient(145deg,#FFD166,#E8742B);color:#4a1d0c;border-radius:999px;padding:0 .45em;min-width:1.6em;box-shadow:0 4px 18px rgba(255,170,40,.5);text-shadow:none}
@keyframes pop{from{opacity:0;transform:translateY(24px) scale(.6)}to{opacity:1;transform:none}}
.name-glow{color:var(--gold);text-shadow:0 0 18px rgba(255,209,102,.7),0 0 40px rgba(255,140,0,.4)}

/* cake */
.cake{position:relative;margin:0 auto;width:min(340px,88vw);filter:drop-shadow(0 18px 24px rgba(0,0,0,.35))}
.tier{position:relative;margin:0 auto;border-radius:10px 10px 14px 14px;
background:linear-gradient(90deg,#c98a5a 0%,#f0c9a0 22%,#f7dcbc 45%,#e9b98a 75%,#b97a4c 100%);overflow:visible}
.tier::before{content:'';position:absolute;top:-9px;left:0;right:0;height:18px;border-radius:50%;
background:linear-gradient(#fffaf0,#fbe9cf)}
.t1{width:56%;height:62px;z-index:3}
.t2{width:78%;height:70px;z-index:2;margin-top:-2px}
.t3{width:100%;height:82px;z-index:1;margin-top:-2px;background:linear-gradient(90deg,#8a3e1f 0%,#c4673a 25%,#d98552 45%,#b85a30 75%,#7a3216 100%)}
.drip{position:absolute;top:0;left:0;right:0;height:26px;
background:radial-gradient(circle at 50% 100%,#fbe9cf 6px,transparent 7px) 0 6px/22px 22px repeat-x,
linear-gradient(#fffaf0,#fbe9cf) top/100% 12px no-repeat;border-radius:10px 10px 0 0}
.t3 .drip{background:radial-gradient(circle at 50% 100%,#fff3e0 7px,transparent 8px) 0 6px/26px 24px repeat-x,linear-gradient(#fffaf0,#fff3e0) top/100% 12px no-repeat}
.beads{position:absolute;bottom:4px;left:6px;right:6px;height:10px;background:radial-gradient(circle,#fff 2.5px,#f5d9a8 3.5px,transparent 4px) 0 0/12px 10px repeat-x}
.ribbon{position:absolute;bottom:10px;left:0;right:0;height:22px;background:linear-gradient(#e8b04a,#c98a23);display:flex;align-items:center;justify-content:center;font-size:13px;box-shadow:inset 0 1px 0 rgba(255,255,255,.4)}
.ribbon.txt{font-weight:900;color:#4a1d0c;letter-spacing:.03em;height:24px}
.stand{width:116%;margin-right:-8%;height:16px;border-radius:50%;margin-top:-6px;background:linear-gradient(#f6ecd9,#c9b391);box-shadow:0 8px 0 #8b5e34,0 14px 20px rgba(0,0,0,.4)}

/* candles */
.candles{position:relative;z-index:4;display:flex;flex-wrap:wrap-reverse;justify-content:center;align-items:flex-end;gap:2px 7px;padding:0 8px;margin:0 auto -6px;width:56%;min-height:40px}
.candle{width:7px;height:var(--h);position:relative;border-radius:2px 2px 1px 1px;
background:repeating-linear-gradient(-55deg,rgba(255,255,255,.55) 0 3px,transparent 3px 8px),
linear-gradient(90deg,rgba(0,0,0,.18),transparent 40%,rgba(255,255,255,.35) 60%,rgba(0,0,0,.2)),var(--c)}
.candle::before{content:'';position:absolute;top:-2px;left:-1px;right:-1px;height:4px;border-radius:50%;background:var(--c);filter:brightness(1.1)}
.wick{position:absolute;top:-6px;left:50%;width:1.5px;height:6px;margin-left:-.75px;background:#2b1a10;border-radius:1px}
.flame{position:absolute;left:50%;bottom:calc(100% + 4px);width:9px;height:20px;margin-left:-4.5px;
border-radius:50% 50% 45% 45%/65% 65% 35% 35%;
background:radial-gradient(ellipse at 50% 80%,#fff 0 18%,#fff2a8 32%,#ffc530 55%,#ff7a00 78%,rgba(255,80,0,0) 100%);
box-shadow:0 0 10px 3px rgba(255,170,40,.55),0 0 26px 8px rgba(255,140,0,.22);
transform-origin:50% 100%;animation:flick 1.1s ease-in-out infinite;transition:opacity .35s,transform .35s}
.flame::after{content:'';position:absolute;bottom:0;left:50%;width:5px;height:6px;margin-left:-2.5px;border-radius:50%;background:radial-gradient(#6aa8ff,rgba(80,120,255,0))}
.flame.out{opacity:0;transform:scale(.2) translateY(6px) skewX(20deg)}
@keyframes flick{0%,100%{transform:rotate(-2deg) scale(1,1)}25%{transform:rotate(2deg) scale(.95,1.08)}50%{transform:rotate(-1deg) scale(1.04,.96)}75%{transform:rotate(3deg) scale(.97,1.1)}}
.smoke{position:absolute;left:50%;bottom:100%;width:8px;height:8px;margin-left:-4px;border-radius:50%;background:rgba(210,210,210,.6);filter:blur(2px);animation:smoke 1.8s ease-out forwards}
@keyframes smoke{50%{transform:translate(6px,-30px) scale(2.2);opacity:.45}100%{transform:translate(-4px,-60px) scale(3.5);opacity:0}}
.num-candle{text-align:center;font-weight:900;font-size:56px;color:var(--gold);text-shadow:0 0 20px #ff9a2a}
.gcake{position:relative;margin:0 auto;width:min(360px,90vw);filter:drop-shadow(0 20px 26px rgba(0,0,0,.4))}
.candles.g{width:62%;min-height:20px;gap:4px 10px;margin-bottom:-4px}
.gt{position:relative;margin:0 auto;border-radius:8px 8px 10px 10px;
background:linear-gradient(90deg,#b8913c 0%,#e9cf86 25%,#f6e3a6 48%,#e2c272 72%,#a98232 100%)}
.gt::before{content:'';position:absolute;top:-10px;left:0;right:0;height:20px;border-radius:50%;background:radial-gradient(ellipse,#f9ebbb,#e6c97a)}
.gt1{width:66%;height:110px;z-index:2;display:flex;align-items:center;justify-content:center;gap:4px}
.gt2{width:100%;height:130px;z-index:1;display:flex;align-items:center;justify-content:center;
background:repeating-linear-gradient(45deg,transparent 0 34px,rgba(150,110,30,.35) 34px 35px),repeating-linear-gradient(-45deg,transparent 0 34px,rgba(150,110,30,.35) 34px 35px),linear-gradient(90deg,#b8913c 0%,#e9cf86 25%,#f6e3a6 48%,#e2c272 72%,#a98232 100%)}
.medal{width:64px;height:64px;border-radius:50%;background:radial-gradient(#a9714a,#6e4126);border:3px solid #d9b25c;display:flex;align-items:center;justify-content:center;color:#f2d38a;font-size:26px;box-shadow:inset 0 2px 6px rgba(0,0,0,.4)}
.rose{font-size:22px;z-index:1}
.rope{position:absolute;bottom:-5px;left:-2px;right:-2px;height:10px;border-radius:6px;background:repeating-linear-gradient(60deg,#c9952b 0 4px,#f3d27a 4px 8px);box-shadow:0 2px 3px rgba(0,0,0,.3);z-index:3}
.cake-name{width:88%;background:transparent;border:none;outline:none;text-align:center;font-weight:900;font-size:clamp(1.6rem,7vw,2.3rem);color:#5c3a10;text-shadow:0 1px 0 #fff3c4,0 -1px 0 rgba(0,0,0,.25)}
.cake-name:focus{background:rgba(255,255,255,.2);border-radius:10px}
.gboard{width:112%;margin-right:-6%;height:16px;border-radius:50%;margin-top:-2px;background:linear-gradient(#e7c9a6,#a8825c);box-shadow:0 10px 18px rgba(0,0,0,.4)}
.wish{animation:pop .8s cubic-bezier(.3,1.7,.5,1)}
input{font-family:inherit}
.bigcandle-wrap{display:flex;justify-content:center;position:relative;z-index:4;margin-bottom:-14px}
.bigcandle{position:relative;cursor:pointer;padding:0 14px;min-width:70px;height:96px;display:flex;align-items:center;justify-content:center;border-radius:14px 14px 6px 6px;
background:repeating-linear-gradient(-55deg,rgba(255,255,255,.45) 0 6px,transparent 6px 16px),linear-gradient(90deg,#c0392b,#f26b5b 45%,#e04a3a 60%,#9e2a1f);
box-shadow:inset 0 -6px 0 rgba(0,0,0,.15),0 6px 14px rgba(0,0,0,.35)}
.bignum{font-weight:900;font-size:64px;line-height:1;color:#FFF8EE;text-shadow:0 3px 0 #7B2D26,0 0 14px rgba(255,209,102,.6)}
.wick.big{top:-12px;width:3px;height:12px;margin-left:-1.5px}
.flame.big{width:22px;height:46px;margin-left:-11px;bottom:calc(100% + 9px)}
.smoke.big{width:16px;height:16px;margin-left:-8px;bottom:calc(100% + 10px)}