/* Loaded last: one Shadow Bond layout for board + HUD at every viewport. */
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils{
  position:absolute!important;inset:8% 17%!important;display:grid!important;
  width:auto!important;height:auto!important;margin:0!important;padding:0!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-template-rows:repeat(2,minmax(0,1fr))!important;
  align-items:center!important;justify-items:center!important;gap:0!important;
  animation:none!important;transform:none!important;
}
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils i,
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils i:nth-child(1),
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils i:nth-child(2){
  position:relative!important;grid-column:auto!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
  display:grid!important;flex:none!important;width:29cqi!important;height:29cqi!important;min-width:0!important;min-height:0!important;
  aspect-ratio:1/1!important;place-items:center!important;box-sizing:border-box!important;
  border:.5px solid rgba(255,255,255,.72)!important;border-radius:22%!important;
  font-size:5px!important;line-height:1!important;animation:none!important;transform:none!important;
}
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils i:nth-child(3){
  position:relative!important;grid-column:1/-1!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
  display:grid!important;flex:none!important;width:29cqi!important;height:29cqi!important;min-width:0!important;min-height:0!important;
  aspect-ratio:1/1!important;place-items:center!important;box-sizing:border-box!important;
  border:.5px solid rgba(255,255,255,.72)!important;border-radius:22%!important;
  font-size:5px!important;line-height:1!important;animation:none!important;transform:none!important;
}

/* HUD core: centred and animated instead of a detached/static mark. */
html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-board-piece>.home-m3-cell.special-4>i:before{
  content:""!important;position:absolute!important;z-index:3!important;inset:9%!important;display:block!important;
  border:0!important;border-radius:0!important;
  background:transparent center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='white' stroke-opacity='.92' stroke-width='5'%3E%3Cellipse cx='50' cy='50' rx='42' ry='17'/%3E%3Cellipse cx='50' cy='50' rx='42' ry='17' transform='rotate(60 50 50)'/%3E%3Cellipse cx='50' cy='50' rx='42' ry='17' transform='rotate(120 50 50)'/%3E%3C/g%3E%3C/svg%3E")!important;
  box-shadow:none!important;filter:drop-shadow(0 0 3px #fff) drop-shadow(0 0 6px #67e8f9)!important;
  transform-origin:50% 50%!important;animation:m3HudCoreOrbit 5.2s linear infinite!important;
}
html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-board-piece>.home-m3-cell.special-4>i:after{
  content:""!important;position:absolute!important;z-index:4!important;inset:36%!important;display:block!important;
  width:auto!important;height:auto!important;border:1px solid #fff!important;border-radius:50%!important;
  background:radial-gradient(circle at 35% 30%,#fff,#fde68a 35%,#f0abfc 68%,#7c3aed)!important;
  box-shadow:0 0 5px #fff,0 0 9px #67e8f9!important;filter:none!important;
  transform:none!important;animation:m3HudCorePulse 1.8s ease-in-out infinite!important;
}
@keyframes m3HudCoreOrbit{to{transform:rotate(360deg)}}
@keyframes m3HudCorePulse{50%{transform:scale(1.14);filter:brightness(1.12)}}
@media(prefers-reduced-motion:reduce){
  html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-board-piece>.home-m3-cell.special-4>i:before,
  html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-board-piece>.home-m3-cell.special-4>i:after{animation:none!important}
}

/* Structural two-row markup: two tiles above, one centred below. */
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils{
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:0!important;
}
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils-top,
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils-bottom{
  position:relative!important;inset:auto!important;display:flex!important;width:100%!important;height:50%!important;
  align-items:center!important;justify-content:center!important;gap:4%!important;margin:0!important;padding:0!important;
  animation:none!important;transform:none!important;
}
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils-top>i,
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils-bottom>i,
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils-bottom>i:nth-child(1){
  position:relative!important;inset:auto!important;display:grid!important;flex:0 0 29cqi!important;
  width:29cqi!important;height:29cqi!important;min-width:0!important;min-height:0!important;
  aspect-ratio:1/1!important;place-items:center!important;box-sizing:border-box!important;
  border:.5px solid rgba(255,255,255,.72)!important;border-radius:22%!important;
  font-size:5px!important;line-height:1!important;animation:none!important;transform:none!important;
}

html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-board-piece>.home-m3-cell.special-4>i:before{
  inset:24%!important;width:auto!important;height:auto!important;transform-origin:50% 50%!important;
  animation:m3HudCoreVisibleTurn 2.6s ease-in-out infinite!important;
}
html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-board-piece>.home-m3-cell.special-4>i:after{
  inset:43%!important;width:auto!important;height:auto!important;animation:m3HudCorePulse 1.2s ease-in-out infinite!important;
}
@keyframes m3HudCoreVisibleTurn{0%,100%{transform:rotate(-18deg)}50%{transform:rotate(24deg)}}

/* Hard row geometry: old HUD flex/grid sizing cannot collapse these rows. */
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils{
  position:absolute!important;inset:7% 14%!important;display:block!important;width:auto!important;height:auto!important;
  margin:0!important;padding:0!important;overflow:visible!important;animation:none!important;transform:none!important;
}
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-top{
  position:absolute!important;top:0!important;right:0!important;bottom:auto!important;left:0!important;
  display:flex!important;width:auto!important;height:50%!important;align-items:center!important;justify-content:center!important;gap:5%!important;
  margin:0!important;padding:0!important;transform:none!important;
}
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-bottom{
  position:absolute!important;top:50%!important;right:0!important;bottom:0!important;left:0!important;
  display:flex!important;width:auto!important;height:auto!important;align-items:center!important;justify-content:center!important;gap:0!important;
  margin:0!important;padding:0!important;transform:none!important;
}
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-top>i,
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-bottom>i{
  position:relative!important;inset:auto!important;display:grid!important;flex:0 0 28cqi!important;
  width:28cqi!important;height:28cqi!important;min-width:0!important;min-height:0!important;max-width:28cqi!important;max-height:28cqi!important;
  place-items:center!important;box-sizing:border-box!important;margin:0!important;padding:0!important;
  border:.5px solid rgba(255,255,255,.72)!important;border-radius:22%!important;
  font-size:5px!important;line-height:1!important;animation:none!important;transform:none!important;
}

/* An asymmetric electron makes the HUD core's full rotation unmistakable. */
html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-board-piece>.home-m3-cell.special-4>i:before{
  content:""!important;display:block!important;inset:24%!important;width:auto!important;height:auto!important;
  background:transparent center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='white' stroke-opacity='.94' stroke-width='5'%3E%3Cellipse cx='50' cy='50' rx='43' ry='18'/%3E%3Cellipse cx='50' cy='50' rx='43' ry='18' transform='rotate(60 50 50)'/%3E%3Cellipse cx='50' cy='50' rx='43' ry='18' transform='rotate(120 50 50)'/%3E%3C/g%3E%3Ccircle cx='92' cy='50' r='7' fill='%2367e8f9' stroke='white' stroke-width='2'/%3E%3Ccircle cx='29' cy='18' r='5' fill='%23fde047'/%3E%3Ccircle cx='31' cy='76' r='4' fill='%23f472b6'/%3E%3C/svg%3E")!important;
  transform-origin:50% 50%!important;animation:m3HudCoreSpin 2.8s linear infinite!important;
}
@keyframes m3HudCoreSpin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}

/* Keep every shadow sigil square relative to its own row. Container-query units
   resolve against the game shell on some mobile browsers and squash the tiles. */
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow{
  container-type:inline-size!important;
}
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-top>i,
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-bottom>i{
  --m3-shadow-sigil-size:clamp(9px,3vw,16px);
  display:grid!important;
  flex:0 0 var(--m3-shadow-sigil-size)!important;
  width:var(--m3-shadow-sigil-size)!important;height:var(--m3-shadow-sigil-size)!important;
  min-width:var(--m3-shadow-sigil-size)!important;min-height:var(--m3-shadow-sigil-size)!important;
  max-width:var(--m3-shadow-sigil-size)!important;max-height:var(--m3-shadow-sigil-size)!important;
  aspect-ratio:1/1!important;
}

/* The HUD core is the same component as the live board core, at HUD scale. */
html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-board-piece>.home-m3-cell.special-4>i{
  background:transparent url('/assets/images/match3/m3j-color-core-tile-v1.png?v=1') center/100% 100% no-repeat!important;
}
html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-board-piece>.home-m3-cell.special-4>i:before{
  content:""!important;position:absolute!important;z-index:3!important;display:block!important;
  inset:8%!important;width:auto!important;height:auto!important;
  background:transparent center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='white' stroke-opacity='.92' stroke-width='5'%3E%3Cellipse cx='50' cy='50' rx='43' ry='18'/%3E%3Cellipse cx='50' cy='50' rx='43' ry='18' transform='rotate(60 50 50)'/%3E%3Cellipse cx='50' cy='50' rx='43' ry='18' transform='rotate(120 50 50)'/%3E%3C/g%3E%3C/svg%3E")!important;
  filter:drop-shadow(0 0 5px #fff) drop-shadow(0 0 8px #a5f3fc)!important;
  transform-origin:50% 50%!important;animation:m3CoreOrbit 5.4s linear infinite!important;
}
html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-board-piece>.home-m3-cell.special-4>i:after{
  content:""!important;position:absolute!important;z-index:4!important;display:block!important;
  inset:36%!important;width:auto!important;height:auto!important;
  border:1px solid #fff!important;border-radius:50%!important;
  background:radial-gradient(circle at 35% 30%,#fff,#fde68a 35%,#f0abfc 68%,#7c3aed)!important;
  box-shadow:0 0 7px #fff,0 0 13px #67e8f9!important;
  transform-origin:50% 50%!important;animation:m3CoreSigil 1.8s ease-in-out infinite!important;
}

@media(min-width:700px){
  html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils{
    inset:0 5%!important;
  }
  html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-top{
    top:-2%!important;height:46%!important;justify-content:space-between!important;gap:0!important;
  }
  html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-bottom{
    top:56%!important;bottom:-2%!important;height:auto!important;align-items:flex-end!important;
  }
  html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-top>i,
  html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-bottom>i{
    --m3-shadow-sigil-size:20px;
  }

  html body [data-match3-game].m3j-game .m3j-objective-chips>span:has(>.m3j-board-piece){
    flex:0 0 70px!important;width:70px!important;min-width:70px!important;min-height:70px!important;
    grid-template-columns:1fr!important;grid-template-rows:1fr!important;padding:4px!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:60px!important;height:60px!important;min-width:60px!important;min-height:60px!important;
    max-width:60px!important;max-height:60px!important;
  }
}

html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-board-piece>.home-m3-cell.special-4>i{
  inset:1%!important;overflow:visible!important;border:0!important;border-radius:0!important;
  background:transparent url('/assets/images/match3/m3j-color-core-tile-v1.png?v=1') center/100% 100% no-repeat!important;
  box-shadow:none!important;filter:drop-shadow(0 5px 5px rgba(0,0,0,.4)) drop-shadow(0 0 6px rgba(103,232,249,.42))!important;
}
html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-board-piece>.home-m3-cell.special-4>i:before{
  content:""!important;display:block!important;top:5%!important;right:auto!important;bottom:auto!important;left:5%!important;
  width:90%!important;height:90%!important;inset:auto!important;background-size:100% 100%!important;
  transform-origin:50% 50%!important;animation:m3CoreOrbit 5.4s linear infinite!important;
}
html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-board-piece>.home-m3-cell.special-4>i:after{
  content:""!important;display:block!important;inset:38%!important;width:auto!important;height:auto!important;
  transform-origin:50% 50%!important;animation:m3CoreSigil 1.8s ease-in-out infinite!important;
}

/* Clear, colourful score HUD cards without the old decorative edge stripe. */
html body [data-match3-game].m3j-game .match3-hud>div:before,
html body [data-match3-game].m3j-game .match3-hud>button:before{
  content:none!important;display:none!important;
}
html body [data-match3-game].m3j-game .match3-hud>div{
  overflow:hidden!important;
  border:1px solid rgba(255,255,255,.38)!important;
  box-shadow:inset 0 2px 1px rgba(255,255,255,.28),inset 0 -5px 10px rgba(3,7,18,.28),0 6px 0 rgba(3,7,18,.32),0 11px 20px rgba(0,0,0,.3)!important;
}
html body [data-match3-game].m3j-game .match3-hud>div:nth-child(1){
  background:radial-gradient(circle at 18% 4%,rgba(255,241,118,.34),transparent 38%),linear-gradient(145deg,#b96809,#6f2d12 58%,#32152b)!important;
  border-color:rgba(255,214,78,.64)!important;
}
html body [data-match3-game].m3j-game .match3-hud>div:nth-child(2){
  background:radial-gradient(circle at 18% 4%,rgba(140,255,255,.32),transparent 38%),linear-gradient(145deg,#078ba2,#1557a0 58%,#252269)!important;
  border-color:rgba(56,239,255,.62)!important;
}
html body [data-match3-game].m3j-game .match3-hud>div:nth-child(3){
  background:radial-gradient(circle at 18% 4%,rgba(255,172,227,.32),transparent 38%),linear-gradient(145deg,#b82e7b,#7d236f 58%,#43205f)!important;
  border-color:rgba(255,99,195,.62)!important;
}
html body [data-match3-game].m3j-game .match3-hud>div small{
  color:rgba(255,255,255,.82)!important;text-shadow:0 1px 2px rgba(0,0,0,.48)!important;
}
html body [data-match3-game].m3j-game .match3-hud>div strong{
  color:#fff!important;text-shadow:0 2px 3px rgba(0,0,0,.55),0 0 13px var(--hud-accent,#fff)!important;
}

/* Desktop power-up rail: larger and top-aligned with the score HUD. */
@media(min-width:901px){
  html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils{
    position:absolute!important;inset:0!important;display:block!important;
  }
  html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-top,
  html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-bottom{
    position:static!important;display:contents!important;
  }
  html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-top>i,
  html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-bottom>i{
    --m3-shadow-sigil-size:20px;position:absolute!important;
    width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;
    max-width:20px!important;max-height:20px!important;margin:0!important;transform:none!important;
  }
  html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-top>i:first-child{
    top:8%!important;left:8%!important;right:auto!important;bottom:auto!important;
  }
  html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-top>i:nth-child(2){
    top:8%!important;right:8%!important;bottom:auto!important;left:auto!important;
  }
  html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-bottom>i:first-child{
    top:auto!important;right:auto!important;bottom:7%!important;left:50%!important;transform:translateX(-50%)!important;
  }

  html body [data-match3-game].m3j-game .match3-board-wrap>.m3j-powerup-toolbar{
    top:0!important;left:-82px!important;width:70px!important;
    box-sizing:border-box!important;padding:7px!important;gap:8px!important;border-radius:20px!important;
  }
  html body [data-match3-game].m3j-game .match3-board-wrap>.m3j-powerup-toolbar>header>strong{
    font-size:9px!important;line-height:1.15!important;
  }
  html body [data-match3-game].m3j-game .match3-board-wrap .m3j-powerup-icons{
    gap:8px!important;
  }
  html body [data-match3-game].m3j-game .match3-board-wrap .m3j-powerup-icons>button{
    width:56px!important;height:56px!important;border-radius:16px!important;padding:3px!important;
  }
  html body [data-match3-game].m3j-game .match3-board-wrap .m3j-powerup-icons>button>.m3j-power-art{
    width:100%!important;height:100%!important;transform:scale(1.2)!important;
  }
  html body [data-match3-game].m3j-game .match3-board-wrap .m3j-powerup-icons>button>i{
    top:-5px!important;right:-5px!important;min-width:19px!important;height:19px!important;font-size:9px!important;
  }
}

/* Final Shadow Bond geometry: one deterministic 2+1 grid for board and HUD. */
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils{
  position:absolute!important;top:0!important;right:auto!important;bottom:auto!important;left:0!important;
  display:grid!important;
  grid-template-columns:1fr 1fr!important;grid-template-rows:1fr 1fr!important;
  width:100%!important;height:100%!important;gap:0!important;transform:none!important;
}
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-top,
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-bottom{
  position:static!important;display:contents!important;width:auto!important;height:auto!important;transform:none!important;
}
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-top>i,
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-bottom>i{
  --m3-shadow-sigil-final:clamp(11px,30cqi,20px);
  position:relative!important;inset:auto!important;display:grid!important;
  width:var(--m3-shadow-sigil-final)!important;height:var(--m3-shadow-sigil-final)!important;
  min-width:var(--m3-shadow-sigil-final)!important;min-height:var(--m3-shadow-sigil-final)!important;
  max-width:var(--m3-shadow-sigil-final)!important;max-height:var(--m3-shadow-sigil-final)!important;
  margin:0!important;transform:none!important;align-self:center!important;
}
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-top>i:first-child{
  grid-column:1!important;grid-row:1!important;justify-self:start!important;
}
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-top>i:nth-child(2){
  grid-column:2!important;grid-row:1!important;justify-self:end!important;
}
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>.m3j-shadow-sigils-bottom>i:first-child{
  grid-column:1/-1!important;grid-row:2!important;justify-self:center!important;
}

/* Flat live markup: no intermediary wrappers, so board and HUD share geometry. */
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>i{
  --m3-shadow-sigil-final:clamp(11px,30cqi,20px);
  position:relative!important;inset:auto!important;display:grid!important;
  width:var(--m3-shadow-sigil-final)!important;height:var(--m3-shadow-sigil-final)!important;
  min-width:var(--m3-shadow-sigil-final)!important;min-height:var(--m3-shadow-sigil-final)!important;
  max-width:var(--m3-shadow-sigil-final)!important;max-height:var(--m3-shadow-sigil-final)!important;
  margin:0!important;transform:none!important;align-self:center!important;
}
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>i:nth-child(1){
  grid-column:1!important;grid-row:1!important;justify-self:start!important;
}
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>i:nth-child(2){
  grid-column:2!important;grid-row:1!important;justify-self:end!important;
}
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>i:nth-child(3){
  grid-column:1/-1!important;grid-row:2!important;justify-self:center!important;
}

html body [data-match3-game].m3j-game .match3-board-wrap>.match3-board .home-m3-cell.obstacle-shadow .m3j-obstacle-layer>.m3j-shadow-sigils{
  position:absolute!important;top:0!important;right:auto!important;bottom:auto!important;left:0!important;
  display:grid!important;width:100%!important;height:100%!important;
  grid-template-columns:1fr 1fr!important;grid-template-rows:1fr 1fr!important;gap:0!important;transform:none!important;
}
html body [data-match3-game].m3j-game .match3-board-wrap>.match3-board .home-m3-cell.obstacle-shadow .m3j-obstacle-layer>.m3j-shadow-sigils>i{
  position:relative!important;inset:auto!important;width:20px!important;height:20px!important;
  min-width:20px!important;min-height:20px!important;max-width:20px!important;max-height:20px!important;
  margin:0!important;transform:none!important;align-self:center!important;
}
html body [data-match3-game].m3j-game .match3-board-wrap>.match3-board .home-m3-cell.obstacle-shadow .m3j-obstacle-layer>.m3j-shadow-sigils>i:nth-child(1){grid-column:1!important;grid-row:1!important;justify-self:start!important}
html body [data-match3-game].m3j-game .match3-board-wrap>.match3-board .home-m3-cell.obstacle-shadow .m3j-obstacle-layer>.m3j-shadow-sigils>i:nth-child(2){grid-column:2!important;grid-row:1!important;justify-self:end!important}
html body [data-match3-game].m3j-game .match3-board-wrap>.match3-board .home-m3-cell.obstacle-shadow .m3j-obstacle-layer>.m3j-shadow-sigils>i:nth-child(3){grid-column:1/-1!important;grid-row:2!important;justify-self:center!important}

/* Uniform inner clearance on all four sides of every Shadow Bond. */
html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-obstacle-layer>.m3j-shadow-sigils,
html body [data-match3-game].m3j-game .match3-board-wrap>.match3-board .home-m3-cell.obstacle-shadow .m3j-obstacle-layer>.m3j-shadow-sigils{
  top:7%!important;right:auto!important;bottom:auto!important;left:7%!important;
  width:86%!important;height:86%!important;
}

/* Force the exact same three-ring mark on the board and in the HUD. */
html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-board-piece>.home-m3-cell.special-4>i:before{
  background:transparent center/100% 100% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='white' stroke-opacity='.92' stroke-width='5'%3E%3Cellipse cx='50' cy='50' rx='43' ry='18'/%3E%3Cellipse cx='50' cy='50' rx='43' ry='18' transform='rotate(60 50 50)'/%3E%3Cellipse cx='50' cy='50' rx='43' ry='18' transform='rotate(120 50 50)'/%3E%3C/g%3E%3C/svg%3E")!important;
  animation:m3CoreOrbit 5.4s linear infinite!important;
}

@media(min-width:901px){
  html body [data-match3-game].m3j-game .match3-goals{
    align-self:start!important;align-content:start!important;grid-template-rows:auto auto auto!important;
    width:100%!important;height:auto!important;min-height:0!important;row-gap:10px!important;
  }
  html body [data-match3-game].m3j-game .m3j-objective-chips{
    display:grid!important;grid-template-columns:repeat(auto-fit,70px)!important;
    align-items:start!important;justify-content:start!important;gap:10px!important;
    width:100%!important;margin:0!important;
  }
  html body [data-match3-game].m3j-game .m3j-star-track{
    align-self:start!important;width:100%!important;margin:2px 0 0!important;
  }
}

/* Solid coloured HUD cards with depth, without gradients or edge stripes. */
html body [data-match3-game].m3j-game .match3-hud>div{
  background-image:none!important;
  border-width:2px!important;
  box-shadow:inset 0 3px 1px rgba(255,255,255,.42),inset 0 0 0 2px rgba(255,255,255,.11),inset 0 -7px 0 rgba(3,7,18,.24),inset 0 -13px 18px rgba(3,7,18,.16),0 5px 0 rgba(3,7,18,.48),0 11px 20px rgba(0,0,0,.34),0 0 16px var(--hud-card-glow,transparent)!important;
}
html body [data-match3-game].m3j-game .match3-hud>div:nth-child(1){--hud-card-glow:rgba(255,35,111,.3);background:#d91661!important;border-color:#ff78a7!important}
html body [data-match3-game].m3j-game .match3-hud>div:nth-child(2){--hud-card-glow:rgba(0,218,245,.3);background:#009fbd!important;border-color:#71efff!important}
html body [data-match3-game].m3j-game .match3-hud>div:nth-child(3){--hud-card-glow:rgba(168,54,255,.3);background:#7826c9!important;border-color:#c982ff!important}

/* HUD core is placed in the actual board selector chain; no imitation icon. */
html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-hud-core-source{
  position:relative!important;display:block!important;width:60px!important;height:60px!important;
  min-width:60px!important;min-height:60px!important;margin:0!important;padding:0!important;
  overflow:visible!important;border:0!important;background:none!important;box-shadow:none!important;
}
html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-hud-core-source>.match3-board{
  position:relative!important;display:block!important;width:60px!important;height:60px!important;
  min-width:60px!important;min-height:60px!important;margin:0!important;padding:0!important;
  overflow:visible!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;
}

/* The unchanged game-guide component sits inside a neutral HUD carrier. */
html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-hud-core-source>.guide-real-gem{
  position:absolute!important;top:50%!important;left:50%!important;
  transform:translate(-50%,-50%) scale(.88)!important;transform-origin:50% 50%!important;
}

html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-hud-core-source,
html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-hud-core-source>.match3-board,
html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-hud-core-source>.match3-board>.match3-gem{
  position:relative!important;display:block!important;width:60px!important;height:60px!important;
  min-width:60px!important;min-height:60px!important;max-width:60px!important;max-height:60px!important;
  margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;
}
@media(max-width:699px){
  html body [data-match3-game].m3j-game .home-m3-cell.obstacle-shadow .m3j-shadow-sigils>i,
  html body [data-match3-game].m3j-game .match3-board-wrap>.match3-board .home-m3-cell.obstacle-shadow .m3j-obstacle-layer>.m3j-shadow-sigils>i{
    --m3-shadow-sigil-final:11px!important;
    width:11px!important;height:11px!important;min-width:11px!important;min-height:11px!important;max-width:11px!important;max-height:11px!important;
    border-width:.5px!important;font-size:4px!important;
  }
  html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-hud-core-source,
  html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-hud-core-source>.match3-board,
  html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-hud-core-source>.match3-board>.match3-gem{
    width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;max-width:40px!important;max-height:40px!important;
  }
  html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-hud-core-source>.guide-real-gem{
    transform:translate(-50%,-50%) scale(.69)!important;
  }
}

/* Mobile gameplay composition: controls above a full-width board. */
@media(max-width:699px){
  html body [data-match3-game].m3j-game{
    width:100%!important;max-width:none!important;padding-inline:4px!important;
  }
  html body [data-match3-game].m3j-game .match3-game-shell{
    width:100%!important;max-width:none!important;padding:7px!important;
    border-color:rgba(236,72,153,.42)!important;
    background:#090b1f!important;
    box-shadow:inset 0 0 0 1px rgba(103,232,249,.08),0 14px 34px rgba(0,0,0,.42)!important;
  }
  html body [data-match3-game].m3j-game .match3-board-wrap{
    display:flex!important;flex-direction:column!important;align-items:stretch!important;
    width:100%!important;max-width:none!important;margin:0!important;padding:7px!important;gap:8px!important;
    border-radius:20px!important;
    background-color:#11142d!important;
  }
  html body [data-match3-game].m3j-game .match3-board-wrap>.match3-board{
    order:2!important;align-self:stretch!important;width:100%!important;max-width:none!important;
    aspect-ratio:1/1!important;margin:0!important;box-sizing:border-box!important;
  }
  html body [data-match3-game].m3j-game .match3-board>.home-m3-cell:not(.special):not(.m3j-obstacle)>i{
    filter:saturate(1.22) brightness(1.06) contrast(1.04)!important;
  }
  html body [data-match3-game].m3j-game .match3-board>.home-m3-cell.gem-violet:not(.special):not(.m3j-obstacle)>i{background:linear-gradient(145deg,#e2c6ff 0%,#985cff 46%,#6724c7 100%)!important}
  html body [data-match3-game].m3j-game .match3-board>.home-m3-cell.gem-cyan:not(.special):not(.m3j-obstacle)>i{background:linear-gradient(145deg,#b9f8ff 0%,#08c8e8 46%,#087f9d 100%)!important}
  html body [data-match3-game].m3j-game .match3-board>.home-m3-cell.gem-coral:not(.special):not(.m3j-obstacle)>i{background:linear-gradient(145deg,#ffd0d5 0%,#ff4168 46%,#c51145 100%)!important}
  html body [data-match3-game].m3j-game .match3-board>.home-m3-cell.gem-gold:not(.special):not(.m3j-obstacle)>i{background:linear-gradient(145deg,#fff4b8 0%,#ffb20d 46%,#bf6505 100%)!important}
  html body [data-match3-game].m3j-game .match3-board>.home-m3-cell.gem-mint:not(.special):not(.m3j-obstacle)>i{background:linear-gradient(145deg,#c5ffdc 0%,#20d66a 46%,#087d3a 100%)!important}
  html body [data-match3-game].m3j-game .match3-board>.home-m3-cell.gem-pink:not(.special):not(.m3j-obstacle)>i{background:linear-gradient(145deg,#ffd2eb 0%,#fa4da5 46%,#ad1681 100%)!important}
  html body [data-match3-game].m3j-game .match3-board-wrap>.m3j-powerup-toolbar{
    position:relative!important;z-index:10!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
    order:1!important;display:grid!important;width:100%!important;max-width:none!important;margin:0!important;padding:6px 7px!important;
    grid-template-columns:auto minmax(0,1fr)!important;grid-template-rows:auto!important;align-items:center!important;gap:6px!important;
    border:1px solid rgba(250,204,21,.42)!important;border-radius:15px!important;
    background:#34204f!important;box-shadow:inset 0 2px 0 rgba(255,255,255,.16),inset 0 -5px 0 rgba(17,8,36,.28),0 5px 0 rgba(4,7,18,.34)!important;
    transform:none!important;
  }
  html body [data-match3-game].m3j-game .m3j-powerup-toolbar>header{
    display:grid!important;min-width:51px!important;gap:2px!important;text-align:left!important;
  }
  html body [data-match3-game].m3j-game .m3j-powerup-toolbar>header span{
    color:#f9a8d4!important;font-size:6px!important;letter-spacing:.1em!important;
  }
  html body [data-match3-game].m3j-game .m3j-powerup-toolbar>header strong{
    color:#fde047!important;font-size:8px!important;white-space:nowrap!important;text-shadow:0 0 8px rgba(250,204,21,.68)!important;
  }
  html body [data-match3-game].m3j-game .m3j-powerup-icons{
    display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;width:100%!important;gap:5px!important;
  }
  html body [data-match3-game].m3j-game .m3j-powerup-icons>button{
    width:100%!important;height:auto!important;min-width:0!important;aspect-ratio:1/1!important;padding:2px!important;
    border:1px solid rgba(255,255,255,.32)!important;border-radius:12px!important;
    background:#5b258c!important;box-shadow:inset 0 2px 0 rgba(255,255,255,.22),inset 0 -4px 0 rgba(25,8,54,.34),0 3px 0 rgba(4,7,18,.34)!important;
  }
  html body [data-match3-game].m3j-game .m3j-powerup-icons>button>.m3j-power-art{
    width:100%!important;height:100%!important;transform:scale(1.08)!important;
  }
  html body [data-match3-game].m3j-game .m3j-powerup-icons>button>b{display:none!important}
  html body [data-match3-game].m3j-game .m3j-powerup-icons>button>i{
    top:-4px!important;right:-4px!important;min-width:17px!important;height:17px!important;border-width:2px!important;font-size:8px!important;
  }
  html body [data-match3-game].m3j-game .m3j-powerup-toolbar>output{display:none!important}

  html body [data-match3-game].m3j-game .match3-hud{
    gap:5px!important;margin-bottom:6px!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;
  }
  html body [data-match3-game].m3j-game .match3-hud>div,
  html body [data-match3-game].m3j-game .match3-hud>.m3j-hud-audio{
    min-height:43px!important;border-width:2px!important;border-radius:12px!important;
    box-shadow:inset 0 2px 0 rgba(255,255,255,.38),inset 0 -5px 0 rgba(3,7,18,.23),0 4px 0 rgba(3,7,18,.42),0 7px 12px rgba(0,0,0,.22)!important;
  }
  html body [data-match3-game].m3j-game .match3-hud>div:nth-child(1){background:#e51662!important;border-color:#ff8ab5!important}
  html body [data-match3-game].m3j-game .match3-hud>div:nth-child(2){background:#00a4c2!important;border-color:#79efff!important}
  html body [data-match3-game].m3j-game .match3-hud>div:nth-child(3){background:#842ed1!important;border-color:#d49aff!important}
  html body [data-match3-game].m3j-game .match3-hud>.m3j-hud-audio{background:#3151bd!important;border-color:#829cff!important;color:#fff!important}
  html body [data-match3-game].m3j-game .match3-hud small{color:rgba(255,255,255,.82)!important}
  html body [data-match3-game].m3j-game .match3-hud strong{color:#fff!important;text-shadow:0 2px 2px rgba(0,0,0,.42)!important}

  html body [data-match3-game].m3j-game .match3-goals{
    margin-bottom:7px!important;padding:7px!important;border:2px solid rgba(192,132,252,.52)!important;border-radius:16px!important;
    background:#24143e!important;box-shadow:inset 0 2px 0 rgba(255,255,255,.12),inset 0 -6px 0 rgba(5,8,24,.24),0 5px 0 rgba(3,7,18,.34)!important;
  }
  html body [data-match3-game].m3j-game .match3-goals>header span{color:#f0abfc!important}
  html body [data-match3-game].m3j-game .match3-goals>header strong{color:#fde047!important;text-shadow:0 0 9px rgba(250,204,21,.55)!important}
  html body [data-match3-game].m3j-game .m3j-objective-chips>span{
    border-color:rgba(244,114,182,.38)!important;background:#48205f!important;
    box-shadow:inset 0 2px 0 rgba(255,255,255,.12),inset 0 -4px 0 rgba(9,5,24,.24)!important;
  }
  html body [data-match3-game].m3j-game .m3j-objective-chips{
    display:flex!important;flex-flow:row wrap!important;align-items:center!important;justify-content:flex-start!important;
    width:100%!important;gap:6px!important;margin:0!important;overflow:visible!important;
  }
  html body [data-match3-game].m3j-game .m3j-objective-chips>span,
  html body [data-match3-game].m3j-game .m3j-objective-chips>.objective-core.info-page{
    display:grid!important;flex:0 0 46px!important;width:46px!important;min-width:46px!important;max-width:46px!important;
    min-height:46px!important;height:46px!important;padding:3px!important;place-items:center!important;
  }
  html body [data-match3-game].m3j-game .m3j-objective-chips .m3j-objective-art{
    width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;max-width:38px!important;max-height:38px!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:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;max-width:40px!important;max-height:40px!important;
  }
  html body [data-match3-game].m3j-game .m3j-objective-chips>span>small{
    right:-2px!important;bottom:-2px!important;z-index:20!important;
  }
  html body [data-match3-game].m3j-game .m3j-star-track{
    border:1px solid rgba(250,204,21,.48)!important;background:#17294d!important;
    box-shadow:inset 0 2px 0 rgba(255,255,255,.1),inset 0 -4px 0 rgba(3,7,18,.23)!important;
  }
}

/* The Colour Core objective reserves the guide component's real footprint;
   it must never be squeezed by the generic compact objective card. */
html body [data-match3-game].m3j-game .m3j-objective-chips>.objective-core.info-page{
  flex:0 0 72px!important;width:72px!important;min-width:72px!important;min-height:72px!important;
  overflow:visible!important;grid-template-columns:1fr!important;grid-template-rows:1fr!important;
}
html body [data-match3-game].m3j-game .m3j-objective-chips>.objective-core.info-page>.guide-real-gem{
  position:absolute!important;top:50%!important;left:50%!important;
  transform:translate(-50%,-50%)!important;transform-origin:50% 50%!important;
}
html body [data-match3-game].m3j-game .m3j-objective-chips>.objective-core.info-page,
html body [data-match3-game].m3j-game .m3j-objective-chips>.objective-core.info-page .guide-real-gem,
html body [data-match3-game].m3j-game .m3j-objective-chips>.objective-core.info-page .match3-board,
html body [data-match3-game].m3j-game .m3j-objective-chips>.objective-core.info-page .match3-gem{
  cursor:default!important;pointer-events:none!important;
}
html body [data-match3-game].m3j-game .m3j-objective-chips>.objective-core.info-page .match3-gem:hover{
  transform:none!important;filter:none!important;
}
@media(max-width:699px){
  html body [data-match3-game].m3j-game .m3j-objective-chips>.objective-core.info-page{
    flex:0 0 46px!important;width:46px!important;min-width:46px!important;min-height:46px!important;
  }
  html body [data-match3-game].m3j-game .m3j-objective-chips>.objective-core.info-page>.guide-real-gem{
    transform:translate(-50%,-50%) scale(.69)!important;
  }
}
