/* Chapter 02 only: independent artwork and interaction layers. */
#chapter-2.cake-chapter{padding:42px 0 34px;margin-block:30px;border:1px solid #edc6d0;border-radius:28px;overflow:clip;isolation:isolate;background:radial-gradient(ellipse at 50% 30%,#fff5ef 0,#f9dce3 52%,#efc0d0 100%);box-shadow:0 20px 70px #a65a7712;animation:none;color:#742c49;scroll-margin-top:135px}
#chapter-2 .chapter-heading{position:relative;z-index:3;padding:0 25px}
#chapter-2 .chapter-heading .eyebrow{display:inline-flex;justify-content:center;gap:0;border:1px solid #dfadba;border-radius:30px;background:#fff8f2d9;padding:5px 18px;font-size:15px;font-weight:600;box-shadow:0 3px 12px #b15a7110;color:#8e3454}
#chapter-2 .chapter-heading h2{font-family:'Noto Naskh Arabic',Georgia,serif;font-size:clamp(42px,4.8vw,65px);line-height:1.5;margin:12px 0 6px;color:#9a3658;text-shadow:0 2px #fff8}
#chapter-2 .cake-intro{max-width:630px;margin:auto;font-size:18px;line-height:1.8;color:#74374e}
#chapter-2 .cake-stage{padding:0;text-align:center;position:relative}
#chapter-2 .cake-scene{position:relative;width:100%;height:620px;direction:ltr;isolation:isolate}
#chapter-2 .cake-scene:before{content:'';position:absolute;inset:45% -10% -18%;z-index:-1;background:radial-gradient(ellipse at center,#fff6ed 0,#ffe8e8 40%,#e8aabb77 75%);border-radius:50%;border-top:1px solid #fff8;transform:perspective(900px) rotateX(17deg)}
#chapter-2 .cake-ambient{position:absolute;inset:0;overflow:hidden;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 44% 25%,#fff7d066,transparent 52%);animation:cake-light 7s ease-in-out infinite alternate}
#chapter-2 .cake-ambient:before,#chapter-2 .cake-ambient:after{content:'';position:absolute;left:8%;top:10%;width:80%;height:35%;border-top:2px solid #fff2b0aa;border-radius:50%;transform:rotate(-9deg);box-shadow:0 -2px 14px #fff2b088}
#chapter-2 .cake-ambient:after{left:-5%;top:4%;transform:rotate(12deg);opacity:.5}
#chapter-2 .cake-actor{position:absolute;left:20%;top:96px;width:62%;aspect-ratio:3/2;z-index:4;transform-origin:40% 80%;transition:transform 1.1s cubic-bezier(.2,.7,.2,1)}
#chapter-2 .cake-art{display:block;position:absolute;inset:0;width:100%;height:100%;pointer-events:none;user-select:none;transition:opacity .65s ease}
#chapter-2 .cake-whole{opacity:1}#chapter-2 .cake-missing{opacity:0}
#chapter-2:is(.is-slicing,.is-served,.is-revealed) .cake-whole{opacity:0}
#chapter-2:is(.is-slicing,.is-served,.is-revealed) .cake-missing{opacity:1}
#chapter-2:is(.is-served,.is-revealed) .cake-actor{transform:translateX(-17%) scale(.86)}
#chapter-2 .cake-candles{position:absolute;inset:0;pointer-events:none;z-index:5;transition:opacity .35s}
#chapter-2:is(.is-slicing,.is-served,.is-revealed) .cake-candles{opacity:0;visibility:hidden}
#chapter-2 .cake-candle{--stem:52px;position:absolute;width:44px;height:44px;left:var(--x);top:var(--y);transform:translate(-50%,calc(-100% - var(--stem) + 6px));padding:0;border:0;border-radius:50%;background:transparent;pointer-events:auto;color:#87374e;z-index:2}
#chapter-2 .cake-candle.back-candle{--stem:65px;z-index:1}
#chapter-2 .cake-candle:focus-visible{outline:3px solid #9b3055;outline-offset:3px;background:#fff5cc77}
#chapter-2 .cake-candle:before{content:'';position:absolute;inset:-3px;border:1px solid #fff7db;border-radius:50%;opacity:0;transition:opacity .2s,transform .2s}
#chapter-2 .cake-candle:hover:before,#chapter-2 .cake-candle:focus-visible:before{opacity:.8;transform:scale(1.1)}
#chapter-2 .birthday-stem{position:absolute;top:calc(100% - 6px);left:17px;height:var(--stem);width:10px;border-radius:4px 4px 2px 2px;background:repeating-linear-gradient(155deg,#fff8e9 0 7px,#ed9fba 8px 13px,#ce6f96 14px 16px);box-shadow:inset 2px 0 2px #fff8,2px 1px 4px #a3425e55;pointer-events:none}
#chapter-2 .birthday-stem:before{content:'';position:absolute;top:-5px;left:4px;width:2px;height:7px;background:#56403d;border-radius:2px}
#chapter-2 .birthday-flame{position:absolute;bottom:8px;left:13px;width:18px;height:32px;background:radial-gradient(ellipse at 50% 85%,#fff 0,#fffbe5 30%,#ffe39a 56%,#f7a550 85%);border-radius:70% 40% 60% 40%;transform-origin:50% 100%;box-shadow:0 0 13px #fff9c8,0 0 35px #ffd491c9;animation:cake-flame 1.4s ease-in-out infinite alternate;pointer-events:none}
#chapter-2 .cake-candle:nth-child(even) .birthday-flame{animation-delay:-.7s;animation-duration:1.8s}
#chapter-2 .cake-candle.is-out .birthday-flame{display:none}
#chapter-2 .cake-candle.is-out .birthday-stem:before{background:#382b2d}
#chapter-2 .birthday-smoke{position:absolute;bottom:14px;left:19px;width:17px;height:40px;border-left:2px solid #9c7f8a;border-radius:50%;opacity:0;pointer-events:none}
#chapter-2 .birthday-smoke:after{content:'';position:absolute;top:-14px;left:-8px;width:16px;height:30px;border-right:2px solid #b795a2;border-radius:50%}
#chapter-2 .cake-candle.just-out .birthday-smoke{animation:cake-smoke 1.6s ease-out both}
#chapter-2 .cake-candle.just-out:after{content:'\2661';position:absolute;top:0;left:8px;color:#9d3c60;font-size:28px;animation:cake-wish .9s ease-out both;pointer-events:none}
#chapter-2 .cake-counter{position:absolute;left:6%;top:42px;width:124px;min-height:124px;padding:17px 10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;border:2px solid #fff0d2;border-radius:50%;background:radial-gradient(circle at 35% 20%,#b44b76,#923653);color:#fff9ef;box-shadow:0 0 0 5px #e6aaae44,0 7px 25px #af527533;direction:rtl;z-index:6}
#chapter-2 .cake-counter-icon{font-size:25px;line-height:1.2}#chapter-2 .cake-counter strong{font-size:28px;font-weight:600;line-height:1.2}#chapter-2 .cake-counter small{font-size:15px;line-height:1.5}
#chapter-2 .cake-counter.is-complete{box-shadow:0 0 0 5px #fff0ca44,0 0 35px #fff0bb99;animation:cake-ready-glow 2.5s ease-in-out infinite alternate}
#chapter-2 .cake-counter.is-complete strong{font-size:19px;line-height:1.5;direction:rtl}#chapter-2 .cake-counter.is-complete small{display:none}
#chapter-2 .cake-decoration{position:absolute;height:auto;pointer-events:none;user-select:none;filter:drop-shadow(0 10px 9px #a24a6728)}
#chapter-2 .cake-roses{width:28%;left:-8%;bottom:38px;z-index:2;transform:rotate(8deg)}
#chapter-2 .cake-present{width:17%;right:-1%;bottom:60px;z-index:2;transform:rotate(-7deg)}
#chapter-2 .cake-heart-light{position:absolute;right:5%;top:45px;font-size:103px;line-height:1;color:#fff6d7;text-shadow:0 0 3px #ffedab,0 0 11px #ffda7f,0 0 30px #fff8d9;transform:rotate(-16deg);animation:cake-heart-glow 4s ease-in-out infinite alternate;pointer-events:none}
#chapter-2 .cake-ribbon{position:absolute;top:-150px;width:82px;height:240px;z-index:1;border-radius:100% 0 70% 30%;background:linear-gradient(110deg,#b34c7300 15%,#d87599 29%,#ffaeca 45%,#c55a83 63%,#fdb3cd 79%,#ec9dbc00 86%);transform:rotate(-39deg);opacity:.7;pointer-events:none;animation:cake-ribbon-float 8s ease-in-out infinite alternate}
#chapter-2 .cake-ribbon.one{right:-10px}#chapter-2 .cake-ribbon.two{left:-52px;transform:rotate(39deg);animation-delay:-3s}
#chapter-2 .cake-petals,#chapter-2 .cake-sparkles,#chapter-2 .cake-celebration{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:7}
#chapter-2 .cake-petal{position:absolute;left:var(--left);top:-25px;width:var(--size);height:calc(var(--size)*1.3);border-radius:80% 10% 65% 20%;background:linear-gradient(125deg,#ffd0dd,#cc6a95);opacity:0;animation:cake-petal-fall var(--duration) linear var(--delay) infinite}
#chapter-2 .cake-twinkle{position:absolute;left:var(--left);top:var(--top);width:4px;height:4px;background:#fff6ca;box-shadow:0 0 9px #fff5c7;border-radius:50%;animation:cake-twinkle var(--duration) ease-in-out var(--delay) infinite}
#chapter-2 .cake-cut-guide{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:7;opacity:0;transition:opacity .3s}
#chapter-2 .cake-cut-guide path{fill:none;stroke:#fff6c9;stroke-width:1;stroke-dasharray:2 2;filter:drop-shadow(0 0 1px #b84970)}
#chapter-2 .cake-cut-guide .cake-incision{stroke:#fce7a1;stroke-width:1.2;stroke-dasharray:70;stroke-dashoffset:calc(70 - var(--cut-progress,0)*70);opacity:0}
#chapter-2:is(.is-ready,.is-cutting) .cake-cut-guide{opacity:1}
#chapter-2.is-cutting .cake-cut-guide .cake-incision{opacity:1}
#chapter-2 .cake-knife{position:absolute;width:34%;height:auto;left:calc(58% - var(--cut-progress,0)*9%);top:calc(12% + var(--cut-progress,0)*56%);transform:translate(-8%,-58%) rotate(-15deg);pointer-events:none;z-index:9;filter:drop-shadow(2px 5px 3px #6e334e44);transition:left .55s ease,top .55s ease,opacity .3s}
#chapter-2.is-dragging .cake-knife{transition:none}
#chapter-2 .cake-knife:before,#chapter-2 .cake-knife:after{display:none}
#chapter-2 .cake-drag-target{position:absolute;left:42%;top:19%;width:40%;height:65%;z-index:10;padding:0;border:0;border-radius:15px;background:transparent;cursor:grab;touch-action:none}
#chapter-2 .cake-drag-target:active{cursor:grabbing}#chapter-2 .cake-drag-target:focus-visible{outline:3px dashed #8c3255;outline-offset:3px;background:#fff6dc1a}
#chapter-2 .cake-slice-plate{position:absolute;left:77%;top:72%;width:22%;height:10%;border-radius:50%;border:3px double #bd8b5c;background:radial-gradient(ellipse,#fff8f0 50%,#f3cdd5 70%,#fff4e4 77%,#d1a773 80%,#fff4e4 86%);box-shadow:0 8px 15px #a55a6b33;opacity:0;transition:opacity .4s;z-index:5;pointer-events:none}
#chapter-2 .cake-serving{position:absolute;left:51%;top:38%;width:23%;aspect-ratio:1315/1196;opacity:0;z-index:8;pointer-events:none;transition:left 1.2s cubic-bezier(.25,.7,.25,1),top 1.2s cubic-bezier(.25,.7,.25,1),width 1.2s ease,opacity .35s;filter:drop-shadow(0 8px 6px #9c416b33)}
#chapter-2 .cake-serving img{width:100%;height:100%;object-fit:contain;display:block}
#chapter-2:is(.is-slicing,.is-served,.is-revealed) .cake-serving{opacity:1}
#chapter-2:is(.is-served,.is-revealed) .cake-serving{left:79%;top:46%;width:18%}
#chapter-2:is(.is-served,.is-revealed) .cake-slice-plate{opacity:1}
#chapter-2 .cake-result{position:absolute;right:17%;top:222px;width:330px;height:320px;z-index:10;direction:rtl;animation:cake-note-reveal .65s ease both;filter:drop-shadow(0 10px 12px #9c456c33)}
#chapter-2 .cake-note-heart{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
#chapter-2 .cake-note-message{position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;height:100%;padding:65px 49px 65px;font-family:'Tajawal',Arial,sans-serif;font-size:22px;font-weight:500;line-height:1.65;color:#7f2b4b}

#chapter-2 .cake-controls{min-height:134px;position:relative;z-index:11;padding:0 20px 12px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:12px;margin-top:-7px}
#chapter-2 .cake-status{min-height:32px;font-size:21px;line-height:1.6;font-weight:500;color:#823351}
#chapter-2 .cake-cut-help{max-width:500px;font-size:16px;line-height:1.7;color:#7a3d52;margin-top:-5px}
#chapter-2 .cake-button{min-height:56px;min-width:230px;padding:12px 28px;border-radius:32px;background:linear-gradient(180deg,#b64974,#982750);border:1px solid #fff0c1;box-shadow:0 0 0 3px #dc9aa855,0 7px 18px #9b3b5e2b;font-size:20px;color:#fffaf4;line-height:1.6}
#chapter-2 .cake-button:hover{background:linear-gradient(180deg,#b44b77,#8e294e)}#chapter-2 .cake-button:disabled{opacity:.7;transform:none;cursor:wait}
#chapter-2 .cake-actions{display:flex;flex-direction:column;align-items:center;gap:7px}
#chapter-2 .cake-replay{font-size:16px;padding:7px 12px;color:#87334f}
#chapter-2 .cake-celebration{overflow:visible;z-index:12}
#chapter-2 .cake-confetti{position:absolute;left:50%;top:45%;width:7px;height:12px;border-radius:2px;background:var(--color);opacity:0}
#chapter-2.is-revealed .cake-confetti{animation:cake-confetti 1.7s ease-out var(--delay) both;transform:rotate(var(--turn))}
#chapter-2.cake-sleeping :is(.cake-ambient,.birthday-flame,.cake-petal,.cake-twinkle,.cake-heart-light,.cake-ribbon,.cake-counter){animation-play-state:paused}
@keyframes cake-flame{0%{transform:rotate(-5deg) scale(.96)}100%{transform:rotate(5deg) scale(1.05,.93)}}
@keyframes cake-smoke{0%{opacity:.6;transform:translateY(0) scale(.8)}100%{opacity:0;transform:translate(11px,-65px) scale(1.8)}}
@keyframes cake-wish{0%{opacity:0;transform:translateY(0) scale(.5)}25%{opacity:.8}100%{opacity:0;transform:translateY(-45px) scale(1.3)}}
@keyframes cake-light{to{opacity:.55;transform:scale(1.03)}}
@keyframes cake-ready-glow{to{box-shadow:0 0 0 7px #fff0ca33,0 0 45px #fff0bbcc}}
@keyframes cake-heart-glow{to{opacity:.65;text-shadow:0 0 4px #ffe9a0,0 0 18px #ffdc88}}
@keyframes cake-ribbon-float{to{translate:8px 14px;rotate:6deg}}
@keyframes cake-petal-fall{0%{opacity:0;transform:translate(0,-20px) rotate(0)}12%,80%{opacity:.5}100%{opacity:0;transform:translate(60px,610px) rotate(250deg)}}
@keyframes cake-twinkle{0%,100%{opacity:.2;scale:.6}50%{opacity:.85;scale:1.25}}
@keyframes cake-note-reveal{from{opacity:0;transform:translateY(20px) scale(.92)}to{opacity:1;transform:none}}
@keyframes cake-confetti{0%{opacity:0;transform:translate(0,0) rotate(0)}12%{opacity:.9}100%{opacity:0;transform:translate(var(--dx),var(--dy)) rotate(var(--turn))}}
@media(min-width:901px) and (max-width:1100px){#chapter-2 .cake-scene{height:540px}#chapter-2 .cake-actor{top:110px;width:66%;left:18%}#chapter-2 .cake-counter{left:4%;width:108px;min-height:108px}#chapter-2 .cake-result{width:290px;height:300px;right:15%;top:190px}#chapter-2 .cake-note-message{font-size:20px;padding:65px 42px 65px}}
@media(max-width:900px){
  #chapter-2.cake-chapter{margin-block:22px;padding:28px 0 24px;border-radius:20px;scroll-margin-top:110px}
  #chapter-2 .chapter-heading{padding:0 17px}#chapter-2 .chapter-heading .eyebrow{font-size:13px;padding:4px 13px}#chapter-2 .chapter-heading h2{font-size:43px;margin:10px 0 7px;line-height:1.5}#chapter-2 .cake-intro{font-size:17px;line-height:1.8;max-width:440px}
  #chapter-2 .cake-scene{height:calc(177px + min(82vw,507px)*.667);max-width:540px;margin:auto}#chapter-2 .cake-scene:before{inset:40% -20% -10%}
  #chapter-2 .cake-actor{left:3%;top:132px;width:94%}#chapter-2 .cake-counter{left:5%;top:12px;width:92px;min-height:92px;padding:9px 7px;gap:0}#chapter-2 .cake-counter-icon{font-size:20px}#chapter-2 .cake-counter strong{font-size:23px}#chapter-2 .cake-counter small{font-size:13px}#chapter-2 .cake-counter.is-complete strong{font-size:16px}
  #chapter-2 .cake-candle{--stem:35px}#chapter-2 .cake-candle.back-candle{--stem:55px}#chapter-2 .birthday-stem{width:9px;left:18px}#chapter-2 .birthday-flame{width:16px;height:28px;left:14px}
  #chapter-2 .cake-roses{width:36%;left:-12%;bottom:24px;opacity:.95}#chapter-2 .cake-present{width:23%;right:-4%;bottom:22px}#chapter-2 .cake-heart-light{right:8%;top:22px;font-size:70px}#chapter-2 .cake-ribbon{top:-175px;width:70px}
  #chapter-2 .cake-knife{width:38%}#chapter-2 .cake-controls{min-height:140px;padding:0 16px 0;gap:11px;margin-top:0}#chapter-2 .cake-status{font-size:19px;line-height:1.7}#chapter-2 .cake-cut-help{font-size:15px}#chapter-2 .cake-button{font-size:18px;min-width:210px;max-width:100%;padding:12px 22px}#chapter-2 .cake-replay{font-size:15px}
  #chapter-2:is(.is-served,.is-revealed) .cake-actor{transform:translate(-7%,-14px) scale(.87)}
  #chapter-2 .cake-serving{left:53%;top:52%;width:30%}#chapter-2:is(.is-served,.is-revealed) .cake-serving{left:65%;top:68%;width:29%}#chapter-2 .cake-slice-plate{left:62%;top:87%;width:35%;height:8%}
  #chapter-2 .cake-result{position:relative;right:auto;top:auto;width:290px;max-width:100%;height:306px;margin:-4px auto 16px}#chapter-2 .cake-note-message{font-size:21px;padding:65px 42px 65px}
}
@media(max-width:400px){#chapter-2 .cake-scene{height:calc(171px + 82vw*.667)}#chapter-2 .cake-actor{top:126px}#chapter-2 .cake-roses{bottom:17px}#chapter-2 .cake-present{bottom:17px}#chapter-2 .cake-counter{width:86px;min-height:86px;left:4%;top:15px}#chapter-2 .cake-result{width:270px;height:300px}#chapter-2 .cake-note-message{font-size:20px;padding:64px 38px 63px}#chapter-2 .cake-intro{font-size:16px}}
@media(prefers-reduced-motion:reduce){#chapter-2 *,#chapter-2 *:before,#chapter-2 *:after{animation:none!important;transition:none!important}#chapter-2 .cake-petals,#chapter-2 .cake-sparkles,#chapter-2 .cake-celebration{display:none}}

#chapter-2 .cake-knife svg{display:block;width:100%;height:auto;overflow:visible}
#chapter-2 .cake-counter{pointer-events:none}
@media(max-width:400px){#chapter-2 .cake-counter{width:92px;min-height:92px;padding:8px 6px}#chapter-2 .cake-counter small{font-size:12px}}

#chapter-2 #cake-slice{opacity:1;transform:none;transition:none}

#chapter-2 .cake-note-message{padding-inline:30px;line-height:1.6;flex-shrink:0}
#chapter-2 .cake-note-message span{display:block;white-space:nowrap}
#chapter-2 .cake-counter.is-complete{width:126px;min-height:126px;padding:8px}
#chapter-2 .cake-counter.is-complete strong{font-size:17px;line-height:1.4}
#chapter-2:is(.is-served,.is-revealed) .cake-present{bottom:5px;width:13%}
@media(max-width:900px){#chapter-2 .cake-counter.is-complete{width:100px;min-height:100px;left:2%;top:5px;padding:7px}#chapter-2 .cake-counter.is-complete strong{font-size:13.5px}#chapter-2:is(.is-served,.is-revealed) .cake-present{width:20%;bottom:0}}
