/* Homepage-preview surface language, applied to real playable gems only. */
.match3-game-page .match3-board .match3-gem:not(.special):not(.m3j-obstacle){container-type:inline-size}
.match3-game-page .match3-board .match3-gem:not(.special):not(.m3j-obstacle)>i{
  inset:5%;
  overflow:hidden;
  border:2px solid rgba(255,255,255,.3);
  border-radius:24%;
  box-shadow:inset 0 7px 12px rgba(255,255,255,.22),inset 0 -8px 14px rgba(0,0,0,.22),0 6px 15px rgba(0,0,0,.3);
  clip-path:none;
  filter:none;
  transform:rotate(0);
}
.match3-game-page .match3-board .match3-gem.gem-violet:not(.special):not(.m3j-obstacle){--m3-gem-rim:#4c1d95}
.match3-game-page .match3-board .match3-gem.gem-cyan:not(.special):not(.m3j-obstacle){--m3-gem-rim:#155e75}
.match3-game-page .match3-board .match3-gem.gem-coral:not(.special):not(.m3j-obstacle){--m3-gem-rim:#9f1239}
.match3-game-page .match3-board .match3-gem.gem-gold:not(.special):not(.m3j-obstacle){--m3-gem-rim:#92400e}
.match3-game-page .match3-board .match3-gem.gem-mint:not(.special):not(.m3j-obstacle){--m3-gem-rim:#166534}
.match3-game-page .match3-board .match3-gem.gem-pink:not(.special):not(.m3j-obstacle){--m3-gem-rim:#86198f}
.match3-game-page .match3-board .match3-gem.gem-violet{--m3-gem-rim:#4c1d95}.match3-game-page .match3-board .match3-gem.gem-cyan{--m3-gem-rim:#155e75}.match3-game-page .match3-board .match3-gem.gem-coral{--m3-gem-rim:#9f1239}.match3-game-page .match3-board .match3-gem.gem-gold{--m3-gem-rim:#92400e}.match3-game-page .match3-board .match3-gem.gem-mint{--m3-gem-rim:#166534}.match3-game-page .match3-board .match3-gem.gem-pink{--m3-gem-rim:#86198f}
@supports(width:1cqi){
  .match3-game-page .match3-board .match3-gem:not(.special):not(.m3j-obstacle)>i{
    border-width:max(2px,5cqi);
    border-bottom-color:color-mix(in srgb,var(--m3-gem-rim,#111827) 72%,white 28%);
    box-shadow:inset 0 18cqi 31cqi rgba(255,255,255,.28),inset 0 -23cqi 37cqi rgba(0,0,0,.27),inset 0 0 0 2cqi rgba(255,255,255,.08),0 7cqi 0 var(--m3-gem-rim,#111827),0 17cqi 36cqi rgba(0,0,0,.36);
  }
  .match3-game-page .match3-board .match3-gem:not(.special):not(.m3j-obstacle)>i>span{font-size:37cqi}
}
.match3-game-page .match3-board .match3-gem.gem-violet:not(.special):not(.m3j-obstacle)>i{background:linear-gradient(145deg,#d8b4fe 0%,#8b5cf6 48%,#5b21b6 100%)}
.match3-game-page .match3-board .match3-gem.gem-cyan:not(.special):not(.m3j-obstacle)>i{background:linear-gradient(145deg,#a5f3fc 0%,#06b6d4 48%,#0e7490 100%)}
.match3-game-page .match3-board .match3-gem.gem-coral:not(.special):not(.m3j-obstacle)>i{background:linear-gradient(145deg,#fecaca 0%,#f43f5e 48%,#be123c 100%)}
.match3-game-page .match3-board .match3-gem.gem-gold:not(.special):not(.m3j-obstacle)>i{background:linear-gradient(145deg,#fef3c7 0%,#f59e0b 48%,#b45309 100%)}
.match3-game-page .match3-board .match3-gem.gem-mint:not(.special):not(.m3j-obstacle)>i{background:linear-gradient(145deg,#bbf7d0 0%,#22c55e 48%,#15803d 100%)}
.match3-game-page .match3-board .match3-gem.gem-pink:not(.special):not(.m3j-obstacle)>i{background:linear-gradient(145deg,#fbcfe8 0%,#ec4899 48%,#a21caf 100%)}
.match3-game-page .match3-board .match3-gem:not(.special):not(.m3j-obstacle)>i:before{
  content:"";
  position:absolute;
  z-index:2;
  inset:15%;
  display:block;
  border:1px solid rgba(255,255,255,.13);
  border-top-color:rgba(0,0,0,.18);
  border-radius:19%;
  background:linear-gradient(145deg,rgba(0,0,0,.11),rgba(255,255,255,.035));
  box-shadow:inset 0 5cqi 9cqi rgba(0,0,0,.2),inset 0 -4cqi 8cqi rgba(255,255,255,.1),0 1cqi 0 rgba(255,255,255,.12);
  pointer-events:none;
}
.match3-game-page .match3-board .match3-gem:not(.special):not(.m3j-obstacle)>i:after{
  top:8%;
  right:13%;
  bottom:auto;
  width:34%;
  height:18%;
  border-radius:50%;
  background:rgba(255,255,255,.3);
  filter:blur(1px);
  transform:rotate(-18deg);
}

/* Ability gems share the same raised candy shell and recessed centre. */
.match3-game-page .match3-board .match3-gem:is(.special-1,.special-2,.special-3){container-type:inline-size}
.match3-game-page .match3-board .match3-gem:is(.special-1,.special-2,.special-3)>i{
  inset:5%!important;
  overflow:hidden!important;
  border:max(2px,5cqi) solid rgba(255,255,255,.3)!important;
  border-bottom-color:color-mix(in srgb,var(--m3-gem-rim,#111827) 72%,white 28%)!important;
  border-radius:24%!important;
  box-shadow:inset 0 18cqi 31cqi rgba(255,255,255,.28),inset 0 -23cqi 37cqi rgba(0,0,0,.27),inset 0 0 0 2cqi rgba(255,255,255,.08),0 7cqi 0 var(--m3-gem-rim,#111827),0 17cqi 36cqi rgba(0,0,0,.36)!important;
}
.match3-game-page .match3-board .match3-gem:is(.special-1,.special-2,.special-3)>i:before{
  display:none!important;
}
.match3-game-page .match3-board .match3-gem:is(.special-1,.special-2,.special-3)>i:after{
  z-index:3!important;inset:auto!important;top:50%!important;right:auto!important;bottom:auto!important;left:50%!important;width:70%!important;height:70%!important;display:block!important;
  border:1px solid rgba(255,255,255,.14)!important;border-top-color:rgba(0,0,0,.16)!important;border-radius:19%!important;
  background-color:rgba(255,255,255,.035)!important;background-position:center!important;background-repeat:no-repeat!important;background-size:68%!important;
  box-shadow:inset 0 4cqi 8cqi rgba(0,0,0,.16),inset 0 -3cqi 7cqi rgba(255,255,255,.09)!important;
  filter:drop-shadow(0 2px 2px rgba(3,7,18,.38))!important;transform:translate(-50%,-50%) translateZ(0)!important;animation:none!important;pointer-events:none!important;
}
.match3-game-page .match3-board .match3-gem.special-3>i:after{background-image:url('/assets/images/match3/special-bomb-overlay.svg?v=2')!important;background-size:82%!important;filter:drop-shadow(0 0 3px rgba(255,255,255,.7)) drop-shadow(0 2px 2px rgba(3,7,18,.42))!important}
.match3-game-page .match3-board .match3-gem.special-1>i:after{background-image:url('/assets/images/match3/special-row-overlay.svg?v=2')!important}
.match3-game-page .match3-board .match3-gem.special-2>i:after{background-image:url('/assets/images/match3/special-column-overlay.svg?v=2')!important}
.match3-game-page .match3-board .match3-gem.special-4{container-type:inline-size;--m3-gem-rim:#3b176b;isolation:isolate}
.match3-game-page .match3-board .match3-gem.special-4:before{
  display:none!important;
}
.match3-game-page .match3-board .match3-gem.special-4>i{
  z-index:1!important;inset:5% 5% calc(5% - 7cqi)!important;isolation:isolate;opacity:1!important;
  border:max(2px,5cqi) solid rgba(255,255,255,.34)!important;border-top-color:rgba(255,255,255,.72)!important;border-right-color:rgba(255,255,255,.28)!important;border-bottom-color:rgba(24,15,70,.52)!important;border-left-color:rgba(255,255,255,.42)!important;border-radius:24%!important;
  background-color:#2e1065!important;
  background-image:radial-gradient(ellipse at 29% 12%,rgba(255,255,255,.84) 0 4%,rgba(255,255,255,.38) 10%,rgba(255,255,255,.1) 22%,transparent 34%),linear-gradient(113deg,transparent 9%,rgba(255,255,255,.28) 17%,rgba(255,255,255,.07) 29%,transparent 39%),conic-gradient(from var(--core-angle),#8b5cf6,#06b6d4,#f43f5e,#f59e0b,#22c55e,#ec4899,#8b5cf6)!important;
  background-clip:padding-box!important;
  box-shadow:inset 0 18cqi 31cqi rgba(255,255,255,.34),inset 0 -29cqi 43cqi rgba(0,0,0,.38),inset 0 -7cqi 0 rgba(30,18,76,.23),inset 0 0 0 2cqi rgba(255,255,255,.13),0 17cqi 36cqi rgba(0,0,0,.4),0 0 18cqi rgba(192,132,252,.35)!important;
  animation:m3CoreSpectrumFlow 5.6s linear infinite!important;
}
.match3-game-page .match3-board .match3-gem.special-4>i:before{
  content:""!important;position:absolute!important;z-index:2!important;
  inset:15%!important;top:15%!important;right:15%!important;bottom:15%!important;left:15%!important;width:auto!important;height:auto!important;
  display:block!important;opacity:1!important;border:1px solid rgba(255,255,255,.19)!important;border-top-color:rgba(0,0,0,.3)!important;border-bottom-color:rgba(255,255,255,.24)!important;border-radius:19%!important;
  background:linear-gradient(145deg,rgba(0,0,0,.2),rgba(255,255,255,.045))!important;background-image:linear-gradient(145deg,rgba(0,0,0,.2),rgba(255,255,255,.045))!important;
  box-shadow:inset 0 7cqi 12cqi rgba(0,0,0,.32),inset 0 -5cqi 10cqi rgba(255,255,255,.14),0 2cqi 0 rgba(255,255,255,.17)!important;
  filter:none!important;transform:none!important;animation:none!important;pointer-events:none!important;
}
.match3-game-page .match3-board .match3-gem.special-4>i:after{
  content:""!important;position:absolute!important;z-index:3!important;inset:21%!important;display:block!important;
  border:0!important;border-radius:0!important;
  background-color:transparent!important;
  background-image: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='.9' stroke-width='4.5'%3E%3Cellipse cx='50' cy='50' rx='42' ry='17'%3E%3CanimateTransform attributeName='transform' type='rotate' values='0 50 50;42 50 50;0 50 50' dur='2.8s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3Cellipse cx='50' cy='50' rx='42' ry='17' transform='rotate(60 50 50)'%3E%3CanimateTransform attributeName='transform' type='rotate' values='60 50 50;16 50 50;60 50 50' dur='3.7s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3Cellipse cx='50' cy='50' rx='42' ry='17' transform='rotate(120 50 50)'%3E%3CanimateTransform attributeName='transform' type='rotate' values='120 50 50;166 50 50;120 50 50' dur='4.3s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='8' fill='white'/%3E%3Ccircle cx='47' cy='47' r='3' fill='%23fde68a'/%3E%3Ccircle cx='91' cy='50' r='5.5' fill='white'/%3E%3Ccircle cx='27' cy='18' r='4' fill='%23fef08a'/%3E%3Ccircle cx='31' cy='76' r='3.2' fill='%2367e8f9'/%3E%3C/svg%3E")!important;
  background-position:center!important;background-repeat:no-repeat!important;background-size:contain!important;
  box-shadow:none!important;filter:drop-shadow(0 0 4px #fff) drop-shadow(0 0 8px #67e8f9)!important;
  transform-origin:50% 50%!important;animation:m3CoreAtomOrbit 5.2s linear infinite!important;pointer-events:none!important;
}
.match3-game-page .match3-board .match3-gem.special-4{background:transparent!important;box-shadow:none!important}
@keyframes m3CoreSpectrumFlow{to{--core-angle:385deg}}
@keyframes m3CoreAtomOrbit{to{transform:rotate(360deg)}}
.match3-game-page .match3-board .match3-gem:not(.special):not(.m3j-obstacle)>i>span{
  z-index:3;
  color:rgba(255,255,255,.9);
  font-size:clamp(12px,2.2vw,25px);
  text-shadow:0 2px 4px rgba(0,0,0,.44);
}

/* Classic uses Journey's compact cockpit hierarchy, without a power-up region. */
.match3-classic-game{--m3v-accent:#ec4899;--m3x-muted:#aeb9cc;width:min(100%,1080px)}
.match3-classic-game .match3-game-shell{background:radial-gradient(circle at 82% 8%,rgba(236,72,153,.13),transparent 34%),linear-gradient(155deg,rgba(19,13,36,.92),rgba(4,10,22,.96));box-shadow:0 28px 80px rgba(0,0,0,.42),inset 0 1px rgba(255,255,255,.08)}
.match3-classic-game .m3c-play-nav{border-bottom:1px solid rgba(255,255,255,.07)}
.match3-classic-game .match3-hud,.match3-classic-game .match3-goals{border:1px solid rgba(244,114,182,.2);background:radial-gradient(circle at 90% 0,rgba(236,72,153,.1),transparent 42%),linear-gradient(155deg,rgba(18,14,35,.9),rgba(5,12,25,.92));box-shadow:inset 0 1px rgba(255,255,255,.08),0 16px 38px rgba(0,0,0,.3)}
.match3-classic-game .m3j-score-value{display:grid;justify-items:center;min-width:0;overflow:hidden}
.match3-classic-game .m3j-score-value strong{width:100%;font-variant-numeric:tabular-nums;white-space:nowrap;text-align:center}
.match3-classic-game .match3-goals>.m3j-star-track{position:static;display:grid;grid-template-columns:1fr;align-items:stretch;gap:5px;margin:0;padding:0;background:transparent}
.match3-classic-game .m3j-star-track>[data-match3-goal]{position:relative;display:grid;grid-template-columns:43px minmax(0,1fr);align-items:center;gap:7px;min-height:36px;margin:0;padding:5px 7px;border:1px solid rgba(250,204,21,.13);border-radius:12px;background:linear-gradient(90deg,rgba(250,204,21,.07),rgba(255,255,255,.018))}

@media(min-width:901px){
  .match3-classic-game .match3-game-shell{display:grid;grid-template-columns:minmax(0,650px) minmax(245px,285px);grid-template-rows:auto auto 1fr auto;align-items:start;justify-content:center;column-gap:clamp(18px,2.2vw,30px);row-gap:10px;padding:16px 20px 18px}
  .match3-classic-game .m3c-play-nav{grid-column:1/-1;grid-row:1;width:100%;margin:0}
  .match3-classic-game .match3-board-wrap{grid-column:1;grid-row:2/4;width:min(100%,620px);margin:0}
  .match3-classic-game .match3-touch-hint{grid-column:1;grid-row:4;margin:0}
  .match3-classic-game .match3-hud{grid-column:2;grid-row:2;display:grid;grid-template-columns:minmax(82px,1.25fr) minmax(54px,.8fr) minmax(70px,1fr) 34px;align-items:center;gap:5px;width:100%;margin:0;padding:6px;border-radius:18px}
  .match3-classic-game .match3-hud>div,.match3-classic-game .match3-hud>.m3j-hud-audio{min-height:64px;padding:7px 4px;border:1px solid rgba(255,255,255,.09);border-radius:14px;background:linear-gradient(145deg,rgba(255,255,255,.075),rgba(255,255,255,.025))}
  .match3-classic-game .match3-hud>.m3j-score-value{background:linear-gradient(145deg,rgba(236,72,153,.17),rgba(124,58,237,.07))}
  .match3-classic-game .match3-hud>.m3j-hud-moves{background:linear-gradient(145deg,rgba(251,191,36,.17),rgba(245,158,11,.045))}
  .match3-classic-game .match3-hud>.m3c-hud-combo{background:linear-gradient(145deg,rgba(34,211,238,.14),rgba(59,130,246,.04))}
  .match3-classic-game .match3-hud small{font-size:7px}.match3-classic-game .match3-hud strong{font-size:19px}
  .match3-classic-game .match3-hud>.m3j-hud-primary strong{font-size:24px;line-height:.95}
  .match3-classic-game .match3-hud>.m3j-hud-audio{width:34px;min-width:34px;min-height:38px;padding:3px;align-self:center;border-radius:12px}.match3-classic-game .m3j-hud-audio small{display:none}.match3-classic-game .m3j-hud-audio strong{font-size:15px}
  .match3-classic-game .match3-goals{grid-column:2;grid-row:3;display:grid;align-content:start;gap:9px;width:100%;margin:0;padding:11px;border-radius:22px}
  .match3-classic-game .match3-goals>header{padding:1px 2px 7px;border-bottom:1px solid rgba(255,255,255,.08)}
}
@media(max-width:680px){
  .match3-classic-game .match3-hud{grid-template-columns:1.15fr .85fr 1fr 42px;gap:5px}
  .match3-classic-game .match3-hud>div{min-width:0;padding:7px 3px}
  .match3-classic-game .match3-hud small{font-size:7px;letter-spacing:.07em}.match3-classic-game .match3-hud strong{font-size:17px}
  .match3-classic-game .match3-goals{padding:8px 9px}.match3-classic-game .match3-goals>.m3j-star-track{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
  .match3-classic-game .m3j-star-track>[data-match3-goal]{display:grid;grid-template-columns:1fr;justify-items:center;gap:2px;min-height:43px;padding:5px 3px;text-align:center}.match3-classic-game .m3j-star-track>[data-match3-goal]>b{font-size:8px}
  .match3-game-page .match3-board .match3-gem:not(.special):not(.m3j-obstacle)>i>span{font-size:37cqi}
}
