/* Alpha cutout: all background colour and the section seam belong to the page. */
.friends-gathering{background:var(--cream);position:relative;padding:88px 0 72px;isolation:isolate;overflow:clip}
.friends-gathering::after{content:"";position:absolute;inset:auto 0 0;height:72px;background:var(--game-pattern) center/auto 72px repeat-x;z-index:-1}
.friends-gathering .gathering-copy{width:calc(100% - 40px);max-width:860px;margin:0 auto 12px}
.gathering-copy .eyebrow{margin-bottom:16px}
.gathering-copy h2{font-size:clamp(36px,4.6vw,68px);line-height:1.4;margin-bottom:16px}
.gathering-copy p{font-size:20px;margin:0;color:var(--muted)}
.gathering-art{width:min(100%,1486px);margin:0 auto;transform-origin:50% 100%;position:relative}
.gathering-cutout{aspect-ratio:1486/1016;overflow:hidden}
.gathering-art img{width:100%;height:auto;display:block}
.gathering-badge{position:absolute;z-index:2;left:50%;bottom:-32px;translate:-50% 0;rotate:-4deg;margin:0;padding:14px 28px 26px;border:2px solid #b68a22;border-radius:16px 16px 3px 3px;background:linear-gradient(#fffde8,#fff0a2);box-shadow:0 5px 0 #936410;color:var(--ink);font-size:clamp(16px,2vw,28px);line-height:1.5;white-space:nowrap}
.gathering-badge::after{content:"";position:absolute;inset:auto 0 0;height:12px;background:var(--game-pattern) center/auto 12px repeat-x}
.gathering-badge{animation:gathering-badge-bob 3.4s ease-in-out infinite;will-change:translate}
@keyframes gathering-badge-bob{0%,100%{translate:0 0}50%{translate:0 8px}}
@media(max-width:760px){.friends-gathering::after{background-size:auto 56px}}
@media(prefers-reduced-motion:reduce){.gathering-badge{animation:none;will-change:auto}}
@media(max-width:760px){.friends-gathering{padding-top:56px;padding-bottom:56px}.friends-gathering::after{height:56px}.friends-gathering .gathering-copy{margin-bottom:24px}.gathering-copy h2{font-size:36px}.gathering-copy p{font-size:18px;line-height:1.8}.gathering-art{width:100%}.gathering-badge{padding:9px 16px 20px;bottom:-26px;border-radius:10px 10px 2px 2px}.gathering-badge::after{height:9px;background-size:auto 9px}}
@media(prefers-reduced-motion:reduce){.gathering-art{transform:none!important;opacity:1!important;visibility:visible!important}}
.gathering-stage{position:relative;container-type:inline-size;direction:ltr}
.gathering-stage .gathering-base{position:absolute;inset:0 auto auto 0;z-index:0;pointer-events:none}
.gathering-stage .gathering-projected{position:absolute;left:0;top:0;max-width:none;transform-origin:0 0;visibility:hidden;pointer-events:none}
.gathering-stage .gathering-exact-board{z-index:1;box-shadow:0 5px 1px #735023,0 8px 12px #43280755}
.gathering-pieces{position:absolute;inset:0;pointer-events:none;z-index:3}
.gathering-sprite{position:absolute;overflow:visible;will-change:transform}
.gathering-sprite svg{display:block;width:100%;height:100%;overflow:hidden}
.gathering-cash-pile{position:absolute;z-index:2;transform-origin:50% 100%}
.gathering-banknote{position:absolute;inset:0;width:100%;height:100%;overflow:hidden;filter:drop-shadow(0 1px 1px #43280780);transform-origin:50% 80%}
/* The badge owns a separate row below the entire table, including its motion. */
.gathering-badge{position:relative;bottom:auto;left:auto;translate:0 0;width:max-content;max-width:calc(100% - 32px);margin:22px auto 18px;rotate:-2deg}
.gathering-cash-pile,.gathering-banknote{animation:none!important;will-change:auto}
@media(max-width:760px){.gathering-badge{bottom:auto;margin-top:16px;margin-bottom:16px;font-size:clamp(12px,3.2vw,16px);padding:9px 14px 20px}}
.gathering-dice-position{position:absolute;width:5cqw;height:5cqw;perspective:45cqw;z-index:5}
.gathering-cube{position:relative;width:100%;height:100%;transform-style:preserve-3d;transform:rotateX(-25deg) rotateY(28deg) rotateZ(12deg)}
.gathering-cube-face{position:absolute;inset:0;display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);gap:.26cqw;padding:.65cqw;border-radius:.7cqw;background:linear-gradient(135deg,#fffde4,#f6dba1 72%,#c69752);border:.14cqw solid #f7e3b9;box-shadow:inset 0 0 .5cqw #fff9d3;backface-visibility:hidden}
.gathering-pip{border-radius:50%;background:radial-gradient(circle at 55% 65%,#174a40,#082d29);box-shadow:inset 0 .08cqw .16cqw #0007}
.gathering-dice-shadow{position:absolute;left:-10%;top:195%;width:120%;height:30%;border-radius:50%;background:#43280724;filter:blur(.6cqw)}
/* Flush image-to-pattern seam; caption floats only after the image ends. */
.friends-gathering{padding-bottom:0;overflow:visible;z-index:2;background-image:var(--game-pattern);background-position:center bottom;background-size:auto 72px;background-repeat:repeat-x}
.friends-gathering::after{display:none}
.gathering-art{padding-bottom:72px;background:none}
.gathering-stage .gathering-exact-board{z-index:2}
.gathering-cash-pile{z-index:1}
.gathering-pieces{z-index:4}
.gathering-badge{position:absolute;left:50%;top:calc(100% - 60px);bottom:auto;margin:0;translate:-50% 0;z-index:6}
@keyframes gathering-badge-bob{0%,100%{translate:-50% 0}50%{translate:-50% 8px}}
@media(max-width:760px){.friends-gathering{padding-bottom:0;background-size:auto 56px}.gathering-art{padding-bottom:56px}.gathering-badge{margin:0;top:calc(100% - 46px)}}

/* Align the tabletop layers with the center of the table in the character artwork. */
.gathering-stage .gathering-exact-board,
.gathering-stage .gathering-cash-pile,
.gathering-stage .gathering-sprite:not(.gathering-die){
  translate:calc(14 / 1486 * 100cqw) calc(60 / 1486 * 100cqw);
}
