/* GACHAMON V6: plan-accurate composition using the approved two JPEG artboards
   converted to optimized WebP. Interactive controls live in independent layers. */
body.g4-active.g4-legacy-play {
  overflow-x:hidden!important; overflow-y:auto!important;
  background:#080921!important; overscroll-behavior-y:contain!important;
  -webkit-overflow-scrolling:touch;
}
body.g4-active.g4-legacy-play #g4-root{display:none!important}
body.g4-active.g4-legacy-play #app {
  position:relative!important; left:auto!important; top:auto!important; z-index:1!important;
  display:block!important; width:min(100vw,540px)!important; max-width:540px!important;
  height:auto!important; min-height:0!important; max-height:none!important;
  aspect-ratio:720/1560; overflow:visible!important; padding:0!important;
  margin:max(env(safe-area-inset-top,0px),0px) auto max(env(safe-area-inset-bottom,0px),0px)!important;
  isolation:isolate; background:#080921!important; box-shadow:0 0 38px #000b!important;
  container-type:inline-size;
}
body.g4-active.g4-legacy-play .app-header{display:none!important}
body.g4-active.g4-legacy-play #screens {
  position:relative!important; display:block!important; width:100%!important; height:100%!important;
  min-height:0!important; max-height:none!important; overflow:visible!important;
}
body.g4-active.g4-legacy-play #screen-buddy,
body.g4-active.g4-legacy-play #screen-arena {
  position:absolute!important; inset:0!important; width:100%!important; height:100%!important;
  margin:0!important; padding:0!important; display:block!important;
  overflow:hidden!important; box-shadow:none!important; border:none!important;
  background-repeat:no-repeat!important; background-position:center center!important;
  background-size:100% 100%!important; animation:none!important;
}
body.g4-active.g4-legacy-play #screen-buddy{background-image:url('/sources/ui/choose_buddy_v6.webp')!important}
body.g4-active.g4-legacy-play #screen-arena{background-image:url('/sources/ui/pick_capsule_v6.webp')!important}
body.g4-active.g4-legacy-play #screen-buddy[hidden],
body.g4-active.g4-legacy-play #screen-arena[hidden]{display:none!important}
body.g4-active.g4-legacy-play #screen-buddy::before,
body.g4-active.g4-legacy-play #screen-arena::before{display:none!important}
body.g4-active.g4-legacy-play #screen-buddy > :not(.buddy-picker):not(.sticky-action):not(.gx6-buddy-active),
body.g4-active.g4-legacy-play #screen-arena > :not(.arena-field):not(.arena-controls):not(.gx6-live-stats) {
  display:none!important;
}
/* Buddy: three fully rendered 3D characters and neon cutout cards are on the visual plate.
   The buttons are transparent hotspots with a soft state glow behind the artwork. */
body.g4-active.g4-legacy-play #screen-buddy .buddy-picker {
  position:absolute!important; display:block!important;
  left:0!important; top:60.1%!important; width:100%!important; height:16.2%!important;
  margin:0!important; padding:0!important; z-index:8!important; gap:0!important; pointer-events:none!important;
}
body.g4-active.g4-legacy-play #screen-buddy .buddy-picker .buddy-option{
  position:absolute!important; top:0!important; width:30.7%!important; height:100%!important;
  min-height:0!important; min-width:0!important; margin:0!important; padding:0!important;
  border:0!important; border-radius:12%!important; background:transparent!important;
  color:transparent!important; text-shadow:none!important; box-shadow:none!important;
  transform:none!important; filter:none!important; font-size:0!important;
  pointer-events:auto!important; isolation:isolate; transition:transform .16s ease,filter .16s ease!important;
}
body.g4-active.g4-legacy-play #screen-buddy .buddy-picker .buddy-option > * {visibility:hidden!important}
body.g4-active.g4-legacy-play #screen-buddy .buddy-picker .buddy-option:nth-child(1){left:1.5%!important}
body.g4-active.g4-legacy-play #screen-buddy .buddy-picker .buddy-option:nth-child(2){left:34.7%!important}
body.g4-active.g4-legacy-play #screen-buddy .buddy-picker .buddy-option:nth-child(3){left:67.8%!important}
body.g4-active.g4-legacy-play #screen-buddy .buddy-picker .buddy-option.is-selected::before{
  content:"";position:absolute;z-index:-1;inset:6% 5%;border:0!important;border-radius:28%;
  background:radial-gradient(ellipse,#50eaff8a 0%,#6a7bff65 46%,transparent 78%);
  filter:blur(9px);box-shadow:none!important;pointer-events:none;
  animation:gx6-glow 2.3s ease-in-out infinite alternate;
}
body.g4-active.g4-legacy-play #screen-buddy .buddy-picker .buddy-option:nth-child(2).is-selected::before{
  background:radial-gradient(ellipse,#ffde63b5 0%,#ff8b3570 42%,transparent 78%);
}
body.g4-active.g4-legacy-play #screen-buddy .buddy-picker .buddy-option:nth-child(3).is-selected::before{
  background:radial-gradient(ellipse,#ff79f5a3 0%,#ac44ff65 42%,transparent 78%);
}
body.g4-active.g4-legacy-play #screen-buddy .buddy-picker .buddy-option:active{
  transform:scale(.95)!important;filter:drop-shadow(0 0 18px #ffdd85)!important;
}
body.g4-active.g4-legacy-play #screen-buddy .sticky-action{
  position:absolute!important;inset:0!important;display:block!important;
  margin:0!important;padding:0!important;pointer-events:none!important;z-index:10;
}
body.g4-active.g4-legacy-play #screen-buddy .sticky-action small{display:none!important}
body.g4-active.g4-legacy-play #screen-buddy #buddy-continue{
  position:absolute!important;left:11.6%!important;top:82.65%!important;
  width:76.8%!important;height:7.6%!important;min-height:0!important;
  border:0!important;border-radius:999px!important;
  background:transparent!important;box-shadow:none!important;
  text-shadow:none!important;color:transparent!important;font-size:0!important;
  pointer-events:auto!important;transform-origin:center!important;
  transition:transform .17s ease,filter .17s ease!important;
}
body.g4-active.g4-legacy-play #screen-buddy #buddy-continue span{display:none!important}
body.g4-active.g4-legacy-play #screen-buddy #buddy-continue:active{
  transform:scale(.965)!important;
  filter:drop-shadow(0 0 24px #ffcf6c)!important;
}
body.g4-active.g4-legacy-play #screen-buddy .gx6-buddy-active{
  position:absolute;top:37.5%;left:0;width:33%;height:23%;pointer-events:none!important;z-index:2;
  background:radial-gradient(ellipse at center,#77e4ff22 0%,transparent 70%);
  transition:left .22s ease;
}
/* Capsule field: exact 3D prize-chamber visual remains unobstructed.
   Only actual selected HTML capsules surface above the approved illustration. */
body.g4-active.g4-legacy-play #screen-arena .arena-field{
  position:absolute!important;left:0!important;top:30.2%!important;
  width:100%!important;height:41.2%!important;min-height:0!important;
  margin:0!important;padding:0!important;overflow:hidden!important;isolation:isolate;
  display:block!important;background:transparent!important;box-shadow:none!important;border:0!important;
}
body.g4-active.g4-legacy-play #screen-arena .arena-field::before{display:none!important}
body.g4-active.g4-legacy-play #screen-arena .arena-field > :not(.capsule-crowd){display:none!important}
body.g4-active.g4-legacy-play #screen-arena .capsule-crowd{
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  overflow:hidden!important;z-index:5;
}
body.g4-active.g4-legacy-play #screen-arena .capsule-crowd .capsule{
  opacity:0!important;background:transparent!important;box-shadow:none!important;
  border:0!important;filter:none!important;cursor:pointer!important;
  transition:transform .18s ease,filter .18s ease,opacity .18s ease!important;
}
body.g4-active.g4-legacy-play #screen-arena .capsule-crowd .capsule::before,
body.g4-active.g4-legacy-play #screen-arena .capsule-crowd .capsule::after,
body.g4-active.g4-legacy-play #screen-arena .capsule-crowd .capsule .capsule-core{
  display:none!important;
}
body.g4-active.g4-legacy-play #screen-arena .capsule-crowd .capsule.is-selected{
  opacity:1!important;z-index:300!important;border-radius:50%!important;
  background-image:var(--capsule-sprite)!important;background-size:contain!important;
  background-repeat:no-repeat!important;background-position:center!important;
  transform:translate3d(0,-9px,0) scale(1.06)!important;
  filter:drop-shadow(0 0 8px #ffe685) drop-shadow(0 0 16px #ffdb5c) drop-shadow(0 9px 8px #0b1040)!important;
}
body.g4-active.g4-legacy-play #screen-arena .capsule-crowd .capsule.is-selected::after{
  content:"✓";display:grid!important;place-items:center;
  position:absolute;top:2%;right:1%;left:auto;width:29%;height:29%;
  font-size:14px;font-weight:950;color:#3e1c56;
  background:linear-gradient(#fff5ad,#ffc13a);border:2px solid #fff6cb;border-radius:50%;
  box-shadow:0 0 11px #ffde59;
}
/* Keep original game engine controls in DOM, move their hit areas precisely
   over the visual plan's sci-fi 3D action cards. */
body.g4-active.g4-legacy-play #screen-arena .arena-controls{
  position:absolute!important;inset:0!important;display:block!important;
  width:100%!important;height:100%!important;margin:0!important;padding:0!important;
  border:0!important;background:transparent!important;box-shadow:none!important;
  z-index:10!important;pointer-events:none!important;
}
body.g4-active.g4-legacy-play #screen-arena .arena-controls .controls-head{display:none!important}
body.g4-active.g4-legacy-play #screen-arena .arena-controls .controls-buttons{
  position:absolute!important;inset:0!important;display:block!important;
  width:100%!important;height:100%!important;margin:0!important;padding:0!important;
  gap:0!important;pointer-events:none!important;
}
body.g4-active.g4-legacy-play #screen-arena .arena-controls .quantity-tabs{
  position:absolute!important;left:0!important;top:75.7%!important;
  width:100%!important;height:11.3%!important;display:block!important;
  margin:0!important;padding:0!important;pointer-events:none!important;
}
body.g4-active.g4-legacy-play #screen-arena .arena-controls .qty-btn{
  position:absolute!important;top:0!important;width:46.5%!important;height:100%!important;
  padding:0!important;margin:0!important;min-height:0!important;min-width:0!important;
  border:0!important;border-radius:20%!important;
  background:transparent!important;color:transparent!important;font-size:0!important;
  text-shadow:none!important;box-shadow:none!important;pointer-events:auto!important;
  isolation:isolate;transform:none!important;
  transition:transform .14s ease,filter .14s ease!important;
}
body.g4-active.g4-legacy-play #screen-arena .arena-controls .qty-btn[data-qty="1"]{left:2.5%!important}
body.g4-active.g4-legacy-play #screen-arena .arena-controls .qty-btn[data-qty="5"]{left:51.0%!important}
body.g4-active.g4-legacy-play #screen-arena .arena-controls .qty-btn > *{visibility:hidden!important}
body.g4-active.g4-legacy-play #screen-arena .arena-controls .qty-btn.is-active::before{
  content:"";position:absolute;z-index:-1;inset:12% 8%;border:0!important;border-radius:30%;
  background:radial-gradient(ellipse,#7cdfff85 0%,#407aff66 48%,transparent 82%);
  filter:blur(14px);animation:gx6-glow 2.5s ease-in-out infinite alternate;
}
body.g4-active.g4-legacy-play #screen-arena .arena-controls .qty-btn[data-qty="5"].is-active::before{
  background:radial-gradient(ellipse,#fba2ff8c 0%,#dd50ff71 45%,transparent 82%);
}
body.g4-active.g4-legacy-play #screen-arena .arena-controls .qty-btn:active{
  transform:scale(.96)!important;filter:drop-shadow(0 0 20px #eea6ff)!important;
}
body.g4-active.g4-legacy-play #screen-arena #auto-pick-btn{
  position:absolute!important;left:3.0%!important;top:88.95%!important;
  width:34.1%!important;height:6.6%!important;min-height:0!important;
  padding:0!important;margin:0!important;border:0!important;
  border-radius:999px!important;background:transparent!important;
  color:transparent!important;font-size:0!important;text-shadow:none!important;
  box-shadow:none!important;pointer-events:auto!important;
  transition:transform .15s ease,filter .15s ease!important;
}
body.g4-active.g4-legacy-play #screen-arena #open-btn{
  position:absolute!important;left:39.3%!important;top:88.5%!important;
  width:58.1%!important;height:7.3%!important;min-height:0!important;
  padding:0!important;margin:0!important;border:0!important;
  border-radius:999px!important;background:transparent!important;
  color:transparent!important;font-size:0!important;text-shadow:none!important;
  box-shadow:none!important;pointer-events:auto!important;
  transition:transform .15s ease,filter .15s ease!important;
}
body.g4-active.g4-legacy-play #screen-arena #open-btn span{visibility:hidden!important}
body.g4-active.g4-legacy-play #screen-arena #auto-pick-btn:active,
body.g4-active.g4-legacy-play #screen-arena #open-btn:active:not(:disabled){
  transform:scale(.955)!important;filter:drop-shadow(0 0 23px #ffe083)!important;
}
body.g4-active.g4-legacy-play #screen-arena #open-btn:disabled{opacity:1!important;cursor:not-allowed!important}
/* Live HUD masks printed reference values, preserving actual points, score and
   navigation in the original game engine. */
body.g4-active.g4-legacy-play .gx6-hud{
  position:absolute;left:2.6%;top:3.9%;width:94.8%;height:4.3%;
  display:grid;grid-template-columns:14% 30% 30% 16%;justify-content:space-between;align-items:stretch;
  z-index:100;pointer-events:none;font-family:Inter,system-ui,-apple-system,sans-serif;
}
body.g4-active.g4-legacy-play .gx6-hud button{
  position:relative;display:flex;align-items:center;justify-content:center;gap:5%;
  min-width:0;min-height:0;margin:0;padding:0 4%;
  border-radius:999px;pointer-events:auto;isolation:isolate;
  background:linear-gradient(180deg,#1c134d,#0b103f);
  color:#fff!important;font-size:3.4cqw;font-weight:800;white-space:nowrap;
  border:2px solid #9f5fff;box-shadow:inset 0 2px 3px #ffffff88,0 3px 2px #030920,0 0 10px #a15bffb0;
  transition:transform .16s ease,filter .16s ease!important;
}
body.g4-active.g4-legacy-play .gx6-hud button:active{
  transform:scale(.94)!important;filter:brightness(1.16) drop-shadow(0 0 15px #d4baff)!important;
}
body.g4-active.g4-legacy-play .gx6-hud .gx6-back{font-size:6.5cqw;background:linear-gradient(#3e195e,#150f53)}
body.g4-active.g4-legacy-play .gx6-hud .gx6-points{border-color:#ff9f4c;box-shadow:inset 0 2px #fff5,0 0 10px #ffb353a6}
body.g4-active.g4-legacy-play .gx6-hud .gx6-score{border-color:#dd66ff;box-shadow:inset 0 2px #fff5,0 0 10px #e276fbb2}
body.g4-active.g4-legacy-play .gx6-hud .gx6-info{border-color:#5be3ff;box-shadow:inset 0 2px #fff5,0 0 10px #3abaffba;font-size:3.3cqw}
body.g4-active.g4-legacy-play .gx6-hud .gx6-goldicon{color:#ffd250;font-size:4.2cqw;text-shadow:0 0 7px #ffd350}
body.g4-active.g4-legacy-play .gx6-hud .gx6-diamond{color:#ef81ff;font-size:4.3cqw;text-shadow:0 0 7px #e7a0ff}
body.g4-active.g4-legacy-play .gx6-hud .gx6-hudsmall{font-size:2.2cqw;color:#d6dbfa;font-weight:700}
body.g4-active.g4-legacy-play #screen-arena .gx6-live-stats{
  position:absolute;left:4.8%;top:25.25%;width:90.5%;height:4.3%;z-index:9;
  display:flex;align-items:center;justify-content:space-between;
  font-family:Inter,system-ui,-apple-system,sans-serif;font-weight:800;
}
body.g4-active.g4-legacy-play .gx6-stats-selected,
body.g4-active.g4-legacy-play .gx6-stats-buddy{
  height:100%;display:flex;align-items:center;justify-content:center;gap:7%;
  border-radius:999px;background:linear-gradient(180deg,#24154d,#0d1440);
  box-shadow:inset 0 2px #ffffff77,0 0 13px #f479ffad;
  border:2px solid #f28aff;color:#fff;font-size:3.25cqw;white-space:nowrap;
}
body.g4-active.g4-legacy-play .gx6-stats-selected{width:41.7%}
body.g4-active.g4-legacy-play .gx6-stats-selected strong{font-size:4.1cqw;color:#ffd859}
body.g4-active.g4-legacy-play .gx6-stats-buddy{
  width:44%;border-color:#6cf1ff;box-shadow:inset 0 2px #ffffff77,0 0 13px #4bceffb7;font-size:3.15cqw;
}
body.g4-active.g4-legacy-play .gx6-buddy-head{width:16%;aspect-ratio:1;border-radius:50%;background:#64d2ff;
  border:2px solid #fff;box-shadow:0 0 11px #72ceff}
@keyframes gx6-glow{from{opacity:.48;transform:scale(.92)}to{opacity:1;transform:scale(1.09)}}
@media(max-width:365px){
 body.g4-active.g4-legacy-play .gx6-hud button{border-width:1px!important}
 body.g4-active.g4-legacy-play .gx6-hud{gap:4px}
}
@media (prefers-reduced-motion:reduce){
 body.g4-active.g4-legacy-play .gx6-stats-selected,
 body.g4-active.g4-legacy-play .buddy-option.is-selected::before,
 body.g4-active.g4-legacy-play .qty-btn.is-active::before{animation:none!important}
}
