.angpao-side{min-width:0}.angpao-stage{position:relative;min-height:360px;padding-bottom:100px}.angpao-tree{position:relative;transform-origin:50% 95%}.angpao-art{display:block;width:100%;height:auto}.angpao-hanger{position:absolute;left:var(--x);top:var(--y);width:7%;height:19%;transform-origin:50% 0;animation:angpao-sway 3s ease-in-out var(--delay) infinite alternate}.angpao-hanger:before{content:'';display:block;width:1px;height:25%;background:#eecb75;margin:auto}.angpao-envelope{position:relative;display:grid;place-items:center;width:100%;height:64%;border-radius:6px;background:linear-gradient(120deg,#f34b4c,#b50d2c);box-shadow:inset 0 0 0 1px #f3c762,2px 5px 7px #0004;color:#f5d16e;font-style:normal}.angpao-envelope:before{content:'';position:absolute;top:0;left:0;width:100%;height:32%;border-radius:0 0 50% 50%;background:#d7263d;border-bottom:2px solid #eac36b}.angpao-envelope b{font-size:clamp(12px,2.5vw,25px);padding-top:25%}.angpao-stage[data-phase=shake] .angpao-tree{animation:angpao-quake .16s linear infinite}.angpao-stage[data-phase=shake] .angpao-hanger{animation-duration:.2s}.angpao-fallen{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);background:none;border:0;cursor:pointer;color:inherit;width:150px;display:flex;flex-direction:column;align-items:center;gap:12px}.angpao-fallen .angpao-envelope{width:65px;height:85px;box-shadow:0 0 25px #f9c95199}.angpao-stage[data-phase=drop] .angpao-fallen{animation:angpao-drop .75s cubic-bezier(.3,.7,.7,1) both;pointer-events:none}.angpao-stage[data-phase=land] .angpao-fallen .angpao-envelope{animation:angpao-glow 1.5s ease-in-out infinite alternate}.angpao-stage[data-phase=opening] .angpao-fallen .angpao-envelope:before{transform:rotateX(170deg);transform-origin:top;transition:transform .5s}.angpao-stage[data-phase=result] .angpao-tree{display:none}.angpao-result{padding:30px 20px;margin-top:25px;border:2px solid #d6ae51;border-radius:24px;background:linear-gradient(130deg,#fffdf1,#ffe4a3);text-align:center;color:#493419;animation:angpao-rise .6s ease-out}.angpao-result>strong{display:block;font-size:48px;margin:16px;color:#8a5e12}.angpao-result h3{color:#493419!important}.angpao-result p{color:#345365!important}.angpao-result>img{max-width:120px;max-height:100px;object-fit:contain}.angpao-result:has(img:not([hidden]))>strong{display:none}.angpao-side [hidden]{display:none!important}#angpao-skip{margin-top:12px}@keyframes angpao-sway{from{rotate:-5deg}to{rotate:5deg}}@keyframes angpao-quake{0%,100%{translate:0 0;rotate:0deg}25%{translate:-7px 2px;rotate:-2deg}50%{translate:8px -3px;rotate:2deg}75%{translate:-5px 1px;rotate:-1deg}}@keyframes angpao-drop{0%{translate:0 -240px;rotate:-15deg;opacity:0}15%{opacity:1}70%{translate:0 0;rotate:8deg}85%{translate:0 -24px;rotate:-4deg}100%{translate:0 0;rotate:0deg}}@keyframes angpao-glow{to{box-shadow:0 0 35px #ffd56b;scale:1.04}}@keyframes angpao-rise{from{opacity:0;translate:0 30px}to{opacity:1;translate:0 0}}@media(prefers-reduced-motion:reduce){.angpao-game *{animation:none!important;transition:none!important}}

/* Uneven cords and small packet angles add a natural hanging arrangement. */
.angpao-hanger:before{height:var(--cord,25%)}.angpao-hanger>.angpao-envelope{transform:rotate(var(--tilt,0deg));transform-origin:50% 0}

/* A single centered result column, independent of shared image/text rules. */
.angpao-game .angpao-result{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:32px 24px}
.angpao-game .angpao-result>span{display:block;font-size:11px;font-weight:800;letter-spacing:.12em;text-align:center;line-height:1.6}
.angpao-game .angpao-result>strong{margin:0;font-size:48px;line-height:1.1}
.angpao-game .angpao-result>#angpao-image{display:block;float:none;position:static;width:180px;height:130px;max-width:75%;max-height:160px;object-fit:contain;margin:0 auto}
.angpao-game .angpao-result>h3{display:block;margin:0;font-size:22px;line-height:1.4;text-align:center}
.angpao-game .angpao-result>p{margin:0;max-width:480px;font-size:14px;line-height:1.75;text-align:center}
.angpao-game .angpao-result>.button{margin:4px 0 0;max-width:100%;white-space:normal}
@media(max-width:520px){.angpao-game .angpao-result{padding:26px 18px;gap:14px}.angpao-game .angpao-result>h3{font-size:20px}}

/* A festive paper garden around the live tree and movable packets. */
.angpao-game .angpao-stage{isolation:isolate;border:1px solid #e6c68d;border-radius:24px;padding:16px 12px 88px;min-height:360px;background:#fff0d5 url('angpao-festive-stage.png') center bottom/100% 100% no-repeat;box-shadow:inset 0 0 0 5px #fff9e94d,0 12px 30px #9d542018;overflow:hidden}
.angpao-game .angpao-stage .angpao-tree{width:92%;margin:0 auto;z-index:2;filter:drop-shadow(0 8px 7px #8e64231a)}
.angpao-game .angpao-stage:before{content:'';position:absolute;inset:8% 17% 20%;z-index:0;border-radius:50%;background:radial-gradient(ellipse,#ffe6a680,transparent 70%);pointer-events:none}
.angpao-game .angpao-fallen{z-index:3;bottom:12px;color:#6b431a;text-shadow:0 1px #fff8}
.angpao-game .angpao-fallen>span{background:#fff9e6e8;padding:6px 12px;border:1px solid #d7b76d;border-radius:20px;font-size:12px;white-space:nowrap}
.angpao-game .angpao-stage[data-phase=result]{background:none;padding:0;border:0;box-shadow:none;min-height:0;overflow:visible}
.angpao-game .angpao-stage[data-phase=result]:before{display:none}
@media(max-width:520px){.angpao-game .angpao-stage{padding:12px 4px 88px;border-radius:18px;min-height:0}.angpao-game .angpao-stage .angpao-tree{width:96%}.angpao-game .angpao-stage[data-phase=result]{padding:0}}

/* Bring the gift-box base onto the garden floor instead of above it. */
.angpao-game .angpao-stage:not([data-phase=result]){padding-top:30px;padding-bottom:24px}
.angpao-game .angpao-stage .angpao-tree:after{content:'';position:absolute;left:40%;bottom:-1%;width:22%;height:12px;border-radius:50%;background:radial-gradient(ellipse,#82502145,transparent 72%);filter:blur(2px);z-index:-1;pointer-events:none}
@media(max-width:520px){.angpao-game .angpao-stage:not([data-phase=result]){padding-top:26px;padding-bottom:24px}.angpao-game .angpao-stage .angpao-tree:after{height:9px}}

/* One continuous illustrated section with copy on its quiet left side. */
.angpao-game.wheel-hero{position:relative;isolation:isolate;overflow:hidden;align-items:center;gap:32px;padding:34px;border:1px solid #e6c68d;border-radius:24px;background-color:#fff0d5;background-image:linear-gradient(90deg,#fff8e9ee 0%,#fff8e9d9 34%,#fff8e955 49%,transparent 65%),url('angpao-festive-stage.png');background-position:center,center bottom;background-size:100% 100%,100% 100%;background-repeat:no-repeat;box-shadow:inset 0 0 0 5px #fff9e94d,0 12px 30px #9d542018}
body[data-website-theme=chinese-new-year] .angpao-game.wheel-hero{background-color:#fff0d5;background-image:linear-gradient(90deg,#fff8e9ee 0%,#fff8e9d9 34%,#fff8e955 49%,transparent 65%),url('angpao-festive-stage.png')}
.angpao-game>.hero-copy{position:relative;z-index:2;max-width:490px;background:none}
.angpao-game>.hero-copy .wheel-section-title{color:#8b1722!important;line-height:1.2}
.angpao-game>.hero-copy .lead,.angpao-game>.hero-copy p{color:#654735}
.angpao-game>.hero-copy .play-card{background:#fffdf4d9;backdrop-filter:blur(4px);border:1px solid #dfc397;border-radius:18px;box-shadow:0 5px 18px #b1763210}
.angpao-game>.angpao-side{position:relative;z-index:2;min-width:0}
.angpao-game .angpao-stage:not([data-phase=result]){background:none;border:0;box-shadow:none;border-radius:0;padding:16px 0 0;overflow:visible;min-height:0}
.angpao-game .angpao-stage:before{display:none}
.angpao-game #angpao-status{color:#68432c!important;line-height:1.65}
.angpao-game #angpao-start{box-shadow:0 4px 12px #a6242526}
@media(max-width:900px){.angpao-game.wheel-hero{gap:22px;padding:26px}.angpao-game>.hero-copy .wheel-section-title{font-size:clamp(25px,3.5vw,36px)}}
@media(max-width:700px){.angpao-game.wheel-hero{display:flex;flex-direction:column;align-items:stretch;padding:24px 16px;background-image:linear-gradient(#fff8e9ed 0%,#fff8e9df 38%,#fff8e935 66%,transparent),url('angpao-festive-stage.png');background-size:100% 100%,auto 100%}.angpao-game>.hero-copy{max-width:none}.angpao-game>.hero-copy .play-card{margin-top:18px}.angpao-game>.angpao-side{width:100%}.angpao-game .angpao-stage:not([data-phase=result]){padding:4px 0 0}.angpao-game .angpao-stage .angpao-tree{width:96%}body[data-website-theme=chinese-new-year] .angpao-game.wheel-hero{background-image:linear-gradient(#fff8e9ed 0%,#fff8e9df 38%,#fff8e935 66%,transparent),url('angpao-festive-stage.png')}}

/* Fortune Scroll: one shared canvas for copy, compact balance and living tree. */
.angpao-game.wheel-hero,body[data-website-theme=chinese-new-year] .angpao-game.wheel-hero{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:10px;background:#650a16 url('angpao-fortune-scroll.png') center/100% 100% no-repeat;border:0;border-radius:22px;box-shadow:none;padding:65px 6% 105px;min-height:650px;align-items:center}
.angpao-game>.hero-copy{max-width:none;padding:30px 12px 0 0;align-self:center}
.angpao-game>.hero-copy .eyebrow{color:#9f6a29;font-size:10px;letter-spacing:.13em}
.angpao-game>.hero-copy .wheel-section-title{font-family:Georgia,serif;font-size:clamp(30px,3.4vw,50px);font-weight:500;line-height:1.12;margin:14px 0 18px;color:#7b111b!important}
.angpao-game>.hero-copy .lead{font-size:16px;line-height:1.6;color:#672a21}
.angpao-game>.hero-copy .play-card{background:none;border:0;border-radius:0;box-shadow:none;backdrop-filter:none;padding:10px 0;margin:18px 0 10px}
.angpao-game .play-card .wallet{display:flex;align-items:center;gap:10px;margin:0 0 12px;color:#79131e}
.angpao-game .play-card .wallet:before{content:'✿';display:grid;place-items:center;flex:0 0 43px;width:43px;height:43px;border-radius:50%;background:linear-gradient(#ffe7a2,#cda349);border:2px solid #b88d3e;box-shadow:inset 0 0 0 3px #ffe9ae;color:#9c6b25;font-size:23px}
.angpao-game .play-card .wallet>strong{font-size:27px;line-height:1;font-family:Georgia,serif}.angpao-game .play-card .wallet>span{font-size:13px}
.angpao-game .hero-copy .play-card p{font-size:12px;line-height:1.6;margin:8px 0;color:#775140}
.angpao-game .angpao-scroll-controls{margin-top:12px;max-width:420px}
.angpao-game #angpao-start{border-radius:30px;border:1px solid #d3a457;background:linear-gradient(#d72c37,#a71524);box-shadow:0 0 0 2px #f2d99b66,0 5px 12px #8e1c2920;color:#fff4d9;padding:15px 22px}
.angpao-game #angpao-start:disabled{opacity:.55}
.angpao-game #angpao-status{font-size:12px;line-height:1.6;color:#6c352b!important;margin:12px 0}
.angpao-game>.angpao-side{align-self:end;min-width:0}
.angpao-game .angpao-side .wheel-topline{color:#ffe2a0;text-shadow:0 1px 2px #65111f66;font-size:9px}
.angpao-game .angpao-stage:not([data-phase=result]){background:none;padding:0;border:0;box-shadow:none;margin:10px auto 0;min-height:0;overflow:visible}
.angpao-game .angpao-stage .angpao-tree{width:100%;margin:0 auto;filter:drop-shadow(0 7px 5px #5f271520)}
.angpao-game[data-tree-design=blossom] .angpao-art{width:100%;height:470px;object-fit:contain}
.angpao-scroll-goat{display:block;position:absolute;left:-2%;bottom:0;width:26%;height:auto;z-index:3;pointer-events:none;filter:drop-shadow(0 4px 3px #713c2426)}
.angpao-game .angpao-stage[data-phase=result] .angpao-scroll-goat{display:none}
.angpao-game .angpao-fallen{bottom:-38px;left:45%;z-index:4}.angpao-game .angpao-fallen .angpao-envelope{width:48px;height:61px}
.angpao-game .angpao-result{margin-top:20px}
@media(min-width:701px) and (max-width:1000px){.angpao-game.wheel-hero,body[data-website-theme=chinese-new-year] .angpao-game.wheel-hero{padding:55px 6% 85px;min-height:540px}.angpao-game>.hero-copy .lead{font-size:14px}.angpao-game[data-tree-design=blossom] .angpao-art{height:390px}}
@media(max-width:700px){.angpao-game.wheel-hero,body[data-website-theme=chinese-new-year] .angpao-game.wheel-hero{display:flex;flex-direction:column;align-items:stretch;background-image:linear-gradient(#fff5deec,#fff5decc),url('angpao-fortune-scroll.png');background-size:100% 100%,auto 100%;padding:26px 22px 60px;gap:8px;min-height:0}.angpao-game>.hero-copy{padding:0}.angpao-game>.hero-copy .wheel-section-title{font-size:34px}.angpao-game>.hero-copy .play-card{margin:10px 0;padding:0}.angpao-game .angpao-scroll-controls{max-width:none}.angpao-game>.angpao-side{width:100%}.angpao-game .angpao-side .wheel-topline{color:#854f2c;text-shadow:none}.angpao-game[data-tree-design=blossom] .angpao-art{height:auto;max-height:460px;object-fit:contain}.angpao-scroll-goat{width:25%;left:0}.angpao-game .angpao-stage .angpao-tree{width:96%}}

/* Keep scroll text inside the ivory area and hide idle animation controls. */
.angpao-game [hidden]{display:none!important}
.angpao-game>.hero-copy{min-width:0;max-width:100%}
.angpao-game>.hero-copy .wheel-section-title{display:block;width:100%;max-width:390px;white-space:normal!important;overflow-wrap:break-word;text-wrap:balance;font-size:clamp(30px,3.15vw,45px);line-height:1.12}
.angpao-game>.hero-copy .lead{max-width:390px;white-space:normal;overflow-wrap:break-word}
.angpao-game .play-card .wallet>[data-credit-count]{font-size:27px!important;line-height:1.15}
.angpao-game .angpao-scroll-controls{max-width:390px}
.angpao-game #angpao-status{display:block;width:fit-content;max-width:100%;padding:8px 12px;background:#fff7e5ed;border-radius:10px;color:#682d26!important;text-shadow:none;margin-top:10px;font-size:12px;line-height:1.6}
.angpao-game #angpao-skip{background:#fff7e5;color:#8d1b25;border:1px solid #c9a069;margin-top:10px}
@media(max-width:700px){.angpao-game>.hero-copy .wheel-section-title,.angpao-game>.hero-copy .lead,.angpao-game .angpao-scroll-controls{max-width:100%}.angpao-game>.hero-copy .wheel-section-title{font-size:34px}}

/* Keep the full copy group clear of the rolled parchment edge. */
@media(min-width:701px){
.angpao-game.wheel-hero,body[data-website-theme=chinese-new-year] .angpao-game.wheel-hero{padding-left:9%;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr)}
.angpao-game>.hero-copy{padding-top:12px;padding-right:8px;max-width:380px;isolation:isolate}
.angpao-game>.hero-copy:before{content:'';position:absolute;z-index:-1;inset:-15px -18px -12px -12px;pointer-events:none;background:radial-gradient(ellipse at 48% 48%,#fff3daaa 35%,#fff3da55 65%,transparent 78%)}
.angpao-game>.hero-copy .wheel-section-title{font-size:clamp(30px,2.9vw,40px);line-height:1.1;margin:10px 0 12px;max-width:350px}
.angpao-game>.hero-copy .lead{font-size:14px;line-height:1.55;margin:0 0 12px;max-width:350px}
.angpao-game>.hero-copy .play-card{margin:10px 0 6px;padding:0}
.angpao-game .play-card .wallet{margin-bottom:7px}
.angpao-game .hero-copy .play-card p{font-size:11px;line-height:1.5;margin:5px 0;max-width:350px}
.angpao-game .angpao-scroll-controls{max-width:350px;margin-top:10px}
.angpao-game #angpao-start{padding:12px 18px;min-height:44px;font-size:13px}
.angpao-game #angpao-status{padding:6px 10px;margin-top:8px;font-size:11px;line-height:1.5}
}
