/* Colorfall Journey: one canonical layout, shared with the Three.js lab. */
.m3j-game{position:relative;isolation:isolate;background:transparent}.m3j-game:before,.m3j-game:after{content:none!important;display:none!important}
.m3j-game .match3-game-shell{position:relative;display:block!important;box-sizing:border-box;width:min(1035px,calc(100% - 24px))!important;max-width:none!important;margin:auto!important;padding:16px!important;overflow:hidden;border:1px solid #9b70ff55;border-radius:28px;background:linear-gradient(145deg,#11091bd1,#071126dc 54%,#081d31e3),var(--m3j-world-image) var(--m3j-world-x,50%) var(--m3j-world-y,50%)/cover no-repeat;box-shadow:0 28px 90px #02030ba8,inset 0 1px #fff2}
.m3j-game .match3-game-shell:before{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(115deg,transparent 25%,#ffffff09 45%,transparent 62%)}.m3j-game .m3j-world-stage{display:none!important}
/* Lab control bar. */
.m3j-game .m3j-play-nav{position:relative;z-index:30;display:flex;min-height:64px;margin:0 0 14px;padding:10px 14px;align-items:center;gap:15px;border:1px solid #ffffff18;border-radius:20px;background:#090d26e8;box-shadow:inset 0 1px #fff2}
.m3j-game .m3j-play-identity{min-width:0;margin-right:auto}.m3j-game .m3j-play-identity .gameplay-brand-logo-colorfall{width:145px;height:50px;object-fit:contain;filter:drop-shadow(0 8px 15px #e32d9d4d)}.m3j-game .m3j-level-badge{display:block;overflow:hidden;color:#c5b7ff;font-size:10px;font-weight:900;letter-spacing:.09em;text-overflow:ellipsis;white-space:nowrap}
.m3j-game .m3d-play-controls{display:flex!important;width:auto!important;margin:0 0 0 auto!important;padding:0!important;align-items:center!important;justify-content:flex-end!important;gap:6px!important;border:0!important;background:none!important;box-shadow:none!important}
.m3j-game .m3d-play-controls>button{box-sizing:border-box;display:grid!important;width:42px!important;min-width:42px!important;height:42px!important;min-height:42px!important;margin:0!important;padding:0!important;place-items:center;border:2px solid #8ff4ff!important;border-radius:13px!important;background:linear-gradient(145deg,#34246b,#17234d)!important;color:#fff!important;box-shadow:inset 0 2px #fff4,inset 0 -4px #07133266,0 4px #05071999,0 0 13px #22d3ee30!important}
.m3j-game .m3d-play-controls svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.m3j-game .m3d-play-controls .game-pause-orb:not(.is-abandon){background:linear-gradient(145deg,#0891b2,#3155d5 58%,#6d28d9)!important}
.m3j-game .m3d-play-controls .game-pause-orb:not(.is-abandon)>span{position:relative;display:block;width:13px;height:16px;font-size:0}.m3j-game .m3d-play-controls .game-pause-orb:not(.is-abandon)>span:before,.m3j-game .m3d-play-controls .game-pause-orb:not(.is-abandon)>span:after{content:"";position:absolute;top:1px;bottom:1px;width:4px;border-radius:2px;background:#fff}.m3j-game .m3d-play-controls .game-pause-orb:not(.is-abandon)>span:before{left:1px}.m3j-game .m3d-play-controls .game-pause-orb:not(.is-abandon)>span:after{right:1px}
.m3j-game .m3d-play-controls .m3j-abandon-button{display:inline-flex!important;width:auto!important;min-width:92px!important;padding:0 10px!important;align-items:center!important;justify-content:center!important;gap:6px!important;border-color:#ffc4da!important;background:linear-gradient(145deg,#ed276f,#c2185b 58%,#86123a)!important;box-shadow:inset 0 2px #ffffff73,inset 0 -4px #65052f80,0 4px #4c0519a6,0 0 14px #ff6fa066!important;white-space:nowrap!important}
.m3j-game .m3j-abandon-icon{display:inline-flex!important;width:16px!important;height:18px!important;align-items:center!important;justify-content:center!important;font-size:23px!important;font-style:normal!important;line-height:18px!important}.m3j-game .m3j-abandon-label{display:inline!important;width:auto!important;height:auto!important;font-size:10px!important;font-weight:900!important;line-height:1!important}.m3j-game .m3j-abandon-button *:before,.m3j-game .m3j-abandon-button *:after{content:none!important;display:none!important}
.m3j-game .game-audio-docked strong{margin:0!important;font-size:16px!important}.m3j-game .game-audio-docked small{display:none!important}.m3j-game .m3j-fullscreen-button{background:linear-gradient(145deg,#285ba2,#193264)!important}body.match3-journey-game-body .app-game-shell-stage>.game-shell-controls{display:none!important}
/* Lab game layout: board left, HUD right. */
.m3j-game .m3j-game-layout{position:relative;z-index:2;display:grid;grid-template-columns:minmax(0,668px) minmax(245px,285px);align-items:start;justify-content:center;column-gap:clamp(18px,2.2vw,30px)}.m3j-game .m3j-cockpit{grid-column:2;grid-row:1;display:grid;min-width:0;align-content:start;gap:10px}
.m3j-game .match3-hud{display:grid!important;grid-template-columns:minmax(100px,1.4fr) repeat(2,minmax(60px,.8fr))!important;gap:5px!important;margin:0!important;padding:0!important;border:0!important;background:none!important}
.m3j-game .match3-hud>section{box-sizing:border-box;display:grid;min-width:0;min-height:64px;padding:8px 3px;place-content:center;text-align:center;border:2px solid #ffffff40;border-radius:15px;box-shadow:inset 0 2px #ffffff61,inset 0 -6px #03071238,0 4px #03071270,0 8px 16px #0004}.m3j-game .match3-hud>section:nth-child(1){border-color:#ff8ab5;background:#d91661}.m3j-game .match3-hud>section:nth-child(2){border-color:#79efff;background:#009fbd}.m3j-game .match3-hud>section:nth-child(3){border-color:#d49aff;background:#7826c9}
.m3j-game .match3-hud small{color:#ffffffe0;font-size:8px;font-weight:900;letter-spacing:.1em}.m3j-game .match3-hud strong{display:block;margin-top:3px;color:#fff;font-size:clamp(18px,1.7vw,24px);text-shadow:0 2px 3px #0007}.m3j-game .m3j-hud-audio{display:none!important}
.m3j-game .match3-goals{box-sizing:border-box;margin:0!important;padding:13px!important;border:2px solid #c084fc85!important;border-radius:18px!important;background:#24143ef2!important;box-shadow:inset 0 2px #ffffff20,inset 0 -6px #0508183d,0 5px #03071257,0 12px 24px #0004!important}.m3j-game .match3-goals>header{display:flex!important;margin:0!important;padding:0 0 9px!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;border:0!important;background:none!important}.m3j-game .match3-goals>header span{color:#f0abfc;font-size:9px;font-weight:900;letter-spacing:.1em}.m3j-game .match3-goals>header strong{color:#fde047;font-size:12px;text-shadow:0 0 10px #facc157d}.m3j-game .m3j-star-track{margin:0!important}.m3j-game .guest-journey-notice{margin:0!important}
.m3j-game .match3-board-wrap{position:relative!important;grid-column:1;grid-row:1;display:block!important;box-sizing:border-box;width:min(100%,668px)!important;max-width:668px!important;height:auto!important;margin:0!important;padding:0 0 0 48px!important;overflow:visible!important;border:0!important;background:none!important;box-shadow:none!important}
.m3j-game .match3-board-wrap>.match3-board{position:relative;display:grid!important;box-sizing:border-box;width:min(100%,620px)!important;max-width:620px!important;height:auto!important;margin:0!important;padding:10px!important;aspect-ratio:1!important;overflow:hidden;border:1px solid #67e8f94d!important;border-radius:25px!important;background:linear-gradient(#02051880,#020518c2),var(--m3j-world-image) center/cover no-repeat!important;box-shadow:inset 0 0 50px #05051e55,0 18px 52px #000b!important}
.m3j-three-board{position:absolute;z-index:20;display:block;border-radius:inherit;background:linear-gradient(#02051880,#020518c2),var(--m3j-world-image) center/cover no-repeat;pointer-events:none;opacity:0;transition:opacity .22s ease}.m3j-three-ready .m3j-three-board{opacity:1}.m3j-three-ready .match3-board-wrap>.match3-board>.match3-gem:not(.m3j-void){opacity:.001!important;background:transparent!important;box-shadow:none!important}.m3j-three-ready .match3-board-wrap>.match3-board>.m3j-void,.m3j-three-ready .m3j-mask-terrain{opacity:0!important}.m3j-three-ready .match3-board:before,.m3j-three-ready .match3-board:after,.m3j-three-ready .match3-board-wrap:before,.m3j-three-ready .match3-board-wrap:after{content:none!important;display:none!important}.m3j-game .match3-burst{z-index:45!important}
.m3j-game .m3j-powerup-toolbar{position:absolute!important;z-index:25!important;top:13px!important;left:-10px!important;box-sizing:border-box;width:48px!important;max-width:48px!important;margin:0!important;padding:5px 4px!important;overflow:visible!important;border:1px solid #55dff847!important;border-radius:16px!important;background:linear-gradient(145deg,#152c55e8,#25184de8)!important;box-shadow:inset 0 2px #fff2,0 12px 28px #02030b66!important;transform:none!important}.m3j-game .m3j-powerup-toolbar header span{display:none}.m3j-game .m3j-powerup-toolbar header strong{display:block;width:100%;overflow:hidden;color:#ffe171;font-size:6px;text-align:center;text-overflow:ellipsis}.m3j-game .m3j-powerup-icons{display:grid!important;grid-template-columns:1fr!important;gap:6px!important}.m3j-game .m3j-powerup-icons>button{width:38px!important;min-width:38px!important;height:40px!important;min-height:40px!important;padding:1px!important}.m3j-game .m3j-powerup-icons .m3j-power-art{width:34px!important;height:34px!important}.m3j-game .m3j-powerup-icons b,.m3j-game .m3j-powerup-toolbar output,.m3j-game .match3-touch-hint{display:none!important}
/* Lab responsive layout: compact HUD, full board, power-ups below. */
@media(max-width:900px){.m3j-game .match3-game-shell{width:100%;padding:5px;border-radius:20px}.m3j-game .m3j-game-layout{grid-template-columns:1fr;gap:6px}.m3j-game .m3j-cockpit{grid-column:1;grid-row:1;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:5px}.m3j-game .match3-hud{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important}.m3j-game .match3-hud>section{min-height:43px;padding:5px 2px;border-radius:10px}.m3j-game .match3-hud small{font-size:7px}.m3j-game .match3-hud strong{font-size:17px}.m3j-game .match3-goals{padding:7px!important;border-radius:13px!important}.m3j-game .match3-goals>header{min-height:14px;padding:0 2px 3px!important}.m3j-game .match3-goals>header span{font-size:7px}.m3j-game .match3-goals>header strong{font-size:10px}.m3j-game .guest-journey-notice{grid-column:1/-1}.m3j-game .match3-board-wrap{grid-column:1;grid-row:2;display:flex!important;flex-direction:column;width:100%!important;max-width:none!important;padding:0!important;overflow:hidden!important;gap:6px!important}.m3j-game .match3-board-wrap>.match3-board{order:1;width:min(100%,620px)!important;margin:auto!important;padding:5px!important;border-radius:18px!important}.m3j-game .m3j-powerup-toolbar{position:static!important;order:2!important;width:auto!important;max-width:none!important;margin:0 5px!important;padding:5px 6px 6px!important}.m3j-game .m3j-powerup-toolbar header{display:flex!important;justify-content:space-between!important}.m3j-game .m3j-powerup-toolbar header span{display:block!important}.m3j-game .m3j-powerup-toolbar header strong{width:auto;font-size:9px}.m3j-game .m3j-powerup-icons{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:4px!important}.m3j-game .m3j-powerup-icons>button{width:auto!important;min-width:0!important;height:42px!important}.m3j-game .m3j-powerup-icons .m3j-power-art{width:31px!important;height:31px!important}}
@media(max-width:560px){
 body.match3-journey-game-body{overflow-x:hidden!important}
 body.match3-journey-game-body.app-game-shell main{height:100%!important;margin-top:0!important}
 .m3j-game{width:100%;padding:0!important}
 .m3j-game .match3-game-shell{left:50%;width:100vw!important;margin:0!important;padding:5px 0 0!important;border-width:1px 0;border-radius:0;transform:translateX(-50%)}
 .m3j-game .m3j-play-nav{display:grid;grid-template-columns:minmax(72px,1fr) auto;min-height:44px;margin:0 5px 4px;padding:6px 7px;gap:6px;border-radius:14px}
 .m3j-game .m3j-play-identity .gameplay-brand-logo-colorfall{width:76px;height:34px}.m3j-game .m3j-level-badge{font-size:7px}
 .m3j-game .m3d-play-controls{gap:3px!important}.m3j-game .m3d-play-controls>button{width:31px!important;min-width:31px!important;height:31px!important;min-height:31px!important;border-radius:9px!important}.m3j-game .m3d-play-controls .m3j-abandon-button{width:auto!important;min-width:76px!important;padding:0 7px!important;gap:4px!important}.m3j-game .m3j-abandon-icon{width:13px!important;font-size:21px!important}.m3j-game .m3j-abandon-label{font-size:9px!important}
 .m3j-game .m3j-game-layout{gap:4px}.m3j-game .m3j-cockpit{display:grid!important;grid-template-columns:1fr!important;gap:4px!important;padding:0 5px}
 .m3j-game .match3-hud{grid-column:1;grid-row:1;height:42px!important;gap:4px!important}.m3j-game .match3-hud>section{min-height:42px!important;padding:4px 2px!important}.m3j-game .match3-hud small{font-size:6px}.m3j-game .match3-hud strong{font-size:16px}
 .m3j-game .match3-goals{grid-column:1;grid-row:2;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto auto!important;column-gap:7px!important;min-height:68px!important;padding:6px 8px!important}
 .m3j-game .match3-goals>header{grid-column:1/-1!important;grid-row:1!important;min-height:12px!important;padding:0 1px 2px!important}.m3j-game .match3-goals>header span{font-size:7px!important}
 .m3j-game .m3j-star-track{grid-column:1!important;grid-row:2!important;align-self:center!important;height:32px!important;min-height:32px!important;margin:0!important}
 .m3j-game .m3j-objective-chips{grid-column:2!important;grid-row:2!important;display:flex!important;max-width:164px!important;margin:0!important;padding:1px 2px 3px!important;align-self:center!important;flex-wrap:wrap!important;justify-content:flex-end!important;gap:3px!important;overflow:visible!important}
 .m3j-game .m3j-objective-chips>span{position:relative!important;display:grid!important;box-sizing:border-box!important;flex:0 0 34px!important;width:34px!important;min-width:34px!important;max-width:34px!important;height:34px!important;min-height:34px!important;max-height:34px!important;padding:1px!important;place-items:center!important}
 .m3j-game .m3j-objective-chips .m3j-board-piece,.m3j-game .m3j-objective-chips .m3j-board-piece>.home-m3-cell{position:relative!important;inset:auto!important;width:29px!important;min-width:29px!important;max-width:29px!important;height:29px!important;min-height:29px!important;max-height:29px!important;margin:0!important;transform:none!important}
 .m3j-game .m3j-objective-chips>span>small{position:absolute!important;right:-3px!important;bottom:-3px!important;left:auto!important;top:auto!important;min-width:17px!important;height:16px!important;padding:0 3px!important;font-size:8px!important}
 .m3j-game .match3-board-wrap{gap:4px!important}.m3j-game .match3-board-wrap>.match3-board{order:1!important;width:min(100vw,calc(100dvh - 245px),620px)!important;max-width:100%!important;margin-inline:auto!important;border-width:1px 0!important;border-radius:0!important}
 .m3j-game .m3j-powerup-toolbar{order:2!important;margin:0 5px!important;padding:5px 6px 6px!important;border-radius:12px!important;background:#121b3df2!important}.m3j-game .m3j-powerup-toolbar header{margin-bottom:2px!important}.m3j-game .m3j-powerup-icons{gap:4px!important}.m3j-game .m3j-powerup-icons>button{height:42px!important;padding:1px!important;border-radius:9px!important}.m3j-game .m3j-powerup-icons .m3j-power-art{width:31px!important;height:31px!important}
}
@media(prefers-reduced-motion:reduce){.m3j-three-board{transition:none}}

/* Canonical lab geometry. This final layer retires legacy Journey sizing. */
@media(min-width:901px){
 html body [data-match3-game].m3j-game .m3j-game-layout{grid-template-columns:minmax(0,682px) minmax(245px,285px)!important;column-gap:clamp(18px,2.2vw,30px)!important}
 html body [data-match3-game].m3j-game .match3-board-wrap{width:min(100%,682px)!important;max-width:682px!important;padding-left:62px!important}
 html body [data-match3-game].m3j-game .match3-board-wrap>.match3-board{width:min(100%,620px)!important;max-width:620px!important}
 html body [data-match3-game].m3j-game .m3j-powerup-toolbar{top:13px!important;left:-8px!important;width:58px!important;max-width:58px!important;padding:7px 5px!important}
 html body [data-match3-game].m3j-game .m3j-powerup-icons>button{width:46px!important;min-width:46px!important;height:48px!important;min-height:48px!important}
 html body [data-match3-game].m3j-game .m3j-powerup-icons .m3j-power-art{width:42px!important;height:42px!important}
 html body [data-match3-game].m3j-game .match3-goals{display:flex!important;flex-direction:column!important;gap:7px!important}
 html body [data-match3-game].m3j-game .match3-goals>header{order:0!important}
 html body [data-match3-game].m3j-game .m3j-star-track{order:1!important}
 html body [data-match3-game].m3j-game .m3j-objective-chips{order:2!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;margin:4px 0 0!important}
 html body [data-match3-game].m3j-game .m3j-objective-chips>span:has(>.m3j-board-piece){box-sizing:border-box!important;display:grid!important;grid-template-columns:38px minmax(0,1fr)!important;width:auto!important;min-width:0!important;min-height:49px!important;padding:5px!important;align-items:center!important}
 html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-board-piece,html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-board-piece>.home-m3-cell{width:38px!important;min-width:38px!important;max-width:38px!important;height:38px!important;min-height:38px!important;max-height:38px!important}
}
@media(max-width:560px){
 html body.match3-journey-game-body .app-game-shell-stage>.game-shell-controls{display:none!important}
 html body.match3-journey-game-body.app-game-shell main{height:100%!important;margin-top:0!important;padding-top:0!important}
 html body [data-match3-game].m3j-game .m3j-play-nav{margin-top:47px!important}
 html body [data-match3-game].m3j-game .m3d-play-controls{position:absolute!important;left:0!important;right:0!important;bottom:calc(100% + 5px)!important;box-sizing:border-box!important;display:flex!important;width:100%!important;height:42px!important;padding:4px 5px!important;border:1px solid #ffffff24!important;border-radius:13px!important;background:linear-gradient(145deg,#101a3ded,#181340ed)!important;box-shadow:inset 0 1px #ffffff26,0 5px 14px #0005!important;align-items:center!important;justify-content:flex-end!important}
 html body [data-match3-game].m3j-game .m3d-play-controls:before{content:attr(data-control-label);margin-right:auto;padding-left:4px;color:#a9b9df;font-size:8px;font-weight:900;letter-spacing:.11em;text-transform:uppercase}
 html body [data-match3-game].m3j-game .m3j-cockpit{grid-template-columns:1fr!important;gap:4px!important}
 html body [data-match3-game].m3j-game .match3-goals{box-sizing:border-box!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto auto!important;min-height:68px!important;padding:6px 8px!important;column-gap:7px!important}
 html body [data-match3-game].m3j-game .match3-goals>header{grid-column:1/-1!important;grid-row:1!important;order:0!important}
 html body [data-match3-game].m3j-game .m3j-star-track{grid-column:1!important;grid-row:2!important;order:1!important;align-self:center!important;height:32px!important;min-height:32px!important}
 html body [data-match3-game].m3j-game .m3j-objective-chips{grid-column:2!important;grid-row:2!important;order:2!important;display:flex!important;width:auto!important;max-width:164px!important;margin:0!important;padding:0!important;align-self:center!important;justify-content:flex-end!important;flex-wrap:wrap!important;gap:3px!important}
 html body [data-match3-game].m3j-game .m3j-objective-chips>span:has(>.m3j-board-piece){box-sizing:border-box!important;display:grid!important;flex:0 0 34px!important;grid-template-columns:1fr!important;grid-template-rows:1fr!important;width:34px!important;min-width:34px!important;max-width:34px!important;height:34px!important;min-height:34px!important;max-height:34px!important;padding:1px!important;place-items:center!important}
 html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-board-piece,html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-board-piece>.home-m3-cell{position:relative!important;inset:auto!important;width:29px!important;min-width:29px!important;max-width:29px!important;height:29px!important;min-height:29px!important;max-height:29px!important;margin:0!important;transform:none!important}
 html body [data-match3-game].m3j-game .m3j-objective-chips>span:has(>.m3j-board-piece)>small{right:-3px!important;bottom:-3px!important;min-width:17px!important;height:16px!important;padding:0 3px!important;font-size:8px!important}
 html body [data-match3-game].m3j-game .match3-board-wrap>.match3-board{width:min(100vw,calc(100dvh - 315px),620px)!important}
}
