/* EducTools Game Studio v1.15.4
   Cute 3D Garden — public game pages, template library and non-AR player. */

body.egs-kids-theme{
  --toy-ink:#44305d;
  --toy-purple:#7c4de4;
  --toy-pink:#ff6198;
  --toy-orange:#ff9c42;
  --toy-yellow:#ffd95a;
  --toy-green:#48bd69;
  --toy-blue:#47a9ec;
  --toy-sky:#a9e7ff;
  --toy-white:#fffdf8;
}

/* v1.15.4 — responsive optimized fantasy-zoo background */
body.egs-kids-theme.game-world-page{
  position:relative;
  background:#dff7f4;
}
body.egs-kids-theme.game-world-page::before{
  position:fixed;
  z-index:0;
  inset:0;
  background-color:#dff7f4;
  background-image:linear-gradient(rgba(255,255,255,.08),rgba(255,255,255,.08)),url('backgrounds/fantasy-zoo-desktop.webp');
  background-position:center center;
  background-repeat:no-repeat;
  background-size:cover;
  content:"";
  pointer-events:none;
}
body.egs-kids-theme.game-world-page > main,
body.egs-kids-theme.game-world-page > footer{
  position:relative;
  z-index:1;
}
body.egs-kids-theme.game-world-page main{
  background:transparent;
}
body.egs-kids-theme.game-world-page .catalog-hero,
body.egs-kids-theme.game-world-page .kids-template-library{
  background:linear-gradient(180deg,rgba(233,250,255,.3),rgba(255,250,239,.24));
}
body.egs-kids-theme.game-world-page .section.alt{
  background:linear-gradient(180deg,rgba(255,255,255,.72),rgba(251,247,255,.56),rgba(255,255,255,.68));
  backdrop-filter:blur(2px);
}
body.egs-kids-theme.game-world-page .catalog-section{
  background:rgba(255,255,255,.12);
}

/* Sky, hills and candy typography */
body.egs-kids-theme .catalog-hero,
body.egs-kids-theme .kids-template-library{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  border-top:4px solid rgba(255,255,255,.9);
  border-bottom:5px solid rgba(255,255,255,.95);
  background:
    radial-gradient(circle at 8% 16%,rgba(255,255,255,.95) 0 22px,transparent 23px),
    radial-gradient(circle at 12% 16%,rgba(255,255,255,.88) 0 34px,transparent 35px),
    radial-gradient(circle at 88% 18%,rgba(255,255,255,.9) 0 26px,transparent 27px),
    radial-gradient(circle at 92% 18%,rgba(255,255,255,.78) 0 42px,transparent 43px),
    radial-gradient(ellipse at 15% 112%,#8ed56d 0 33%,transparent 33.5%),
    radial-gradient(ellipse at 48% 118%,#6fca70 0 38%,transparent 38.5%),
    radial-gradient(ellipse at 86% 112%,#54b96c 0 34%,transparent 34.5%),
    linear-gradient(180deg,#9fe3ff 0%,#dff8ff 56%,#fff0a8 100%);
  box-shadow:inset 0 -12px 26px rgba(55,137,74,.13),0 9px 28px rgba(75,70,130,.08);
}
body.egs-kids-theme .catalog-hero::before,
body.egs-kids-theme .kids-template-library::before{
  position:absolute;
  z-index:-1;
  inset:0;
  background:
    radial-gradient(circle at 5% 30%,#fff 0 3px,transparent 4px),
    radial-gradient(circle at 22% 10%,#ffe26b 0 5px,transparent 6px),
    radial-gradient(circle at 40% 24%,#fff 0 3px,transparent 4px),
    radial-gradient(circle at 63% 8%,#ff83aa 0 5px,transparent 6px),
    radial-gradient(circle at 78% 28%,#fff 0 4px,transparent 5px),
    radial-gradient(circle at 96% 9%,#ffe26b 0 6px,transparent 7px);
  content:"";
  opacity:.95;
  pointer-events:none;
}
body.egs-kids-theme .kids-template-library::after{
  position:absolute;
  z-index:-1;
  right:clamp(18px,4vw,70px);
  bottom:24px;
  width:clamp(80px,10vw,145px);
  aspect-ratio:1;
  background:url('kids/star-mascot.svg') center/contain no-repeat;
  content:"";
  filter:drop-shadow(0 12px 14px rgba(75,64,126,.18));
  opacity:.34;
  transform:rotate(8deg);
}
body.egs-kids-theme .catalog-hero>.container,
body.egs-kids-theme .kids-template-library>.container{
  position:relative;
  z-index:1;
}
body.egs-kids-theme .catalog-hero h1,
body.egs-kids-theme .kids-template-library .section-head h2{
  width:fit-content;
  margin-top:4px;
  background:linear-gradient(90deg,#168fd1 0%,#6549d7 27%,#42a845 55%,#f08a2b 78%,#ed4b70 100%);
  background-clip:text;
  color:transparent;
  -webkit-background-clip:text;
  -webkit-text-stroke:3px #fff;
  filter:drop-shadow(0 4px 0 rgba(84,59,116,.22)) drop-shadow(0 9px 9px rgba(83,61,118,.12));
  font-family:"Mali","Noto Sans Thai",sans-serif;
  font-weight:900;
  letter-spacing:-.035em;
}
body.egs-kids-theme .kids-template-library .section-head{
  align-items:center;
  margin-bottom:34px;
  padding:22px 24px;
  border:3px solid rgba(255,255,255,.94);
  border-radius:30px;
  background:rgba(255,255,255,.72);
  box-shadow:0 8px 0 rgba(109,91,146,.12),0 22px 45px rgba(75,72,120,.12);
  backdrop-filter:blur(10px);
}
body.egs-kids-theme .kids-template-library .eyebrow,
body.egs-kids-theme .catalog-hero .eyebrow{
  display:inline-flex;
  padding:7px 13px;
  border:2px solid #fff;
  border-radius:999px;
  background:linear-gradient(180deg,#fff5a6,#ffd54d);
  color:#75461f;
  box-shadow:0 4px 0 #e7ad31,0 9px 18px rgba(137,91,30,.14);
  font-size:.74rem;
  font-weight:900;
}
body.egs-kids-theme .kids-template-library .section-head p,
body.egs-kids-theme .catalog-hero p{
  color:#4f4762;
  font-weight:650;
  text-shadow:0 1px 0 rgba(255,255,255,.8);
}
body.egs-kids-theme .kids-catalog-illustration{
  border:6px solid rgba(255,255,255,.94);
  border-radius:34px;
  box-shadow:0 9px 0 rgba(82,107,137,.16),0 25px 50px rgba(47,94,126,.2);
  transform:rotate(1.5deg);
}

/* 3D template cards */
body.egs-kids-theme .template-grid{
  align-items:stretch;
}
body.egs-kids-theme .template-card{
  --toy-card-accent:#d8c0f7;
  position:relative;
  overflow:hidden;
  border:4px solid #fff;
  border-radius:30px;
  background:linear-gradient(180deg,#fffefb,#fff9f3);
  box-shadow:0 8px 0 var(--toy-card-accent),0 20px 34px rgba(68,49,96,.16);
  transform:translateY(0);
  transition:transform .2s ease,box-shadow .2s ease,filter .2s ease;
}
body.egs-kids-theme .template-card:nth-child(4n+1){--toy-card-accent:#f6a4c3}
body.egs-kids-theme .template-card:nth-child(4n+2){--toy-card-accent:#9fd1f4}
body.egs-kids-theme .template-card:nth-child(4n+3){--toy-card-accent:#8bd8a3}
body.egs-kids-theme .template-card:nth-child(4n+4){--toy-card-accent:#f5ce6d}
body.egs-kids-theme .template-card:hover{
  border-color:#fff;
  box-shadow:0 12px 0 var(--toy-card-accent),0 30px 48px rgba(68,49,96,.2);
  filter:saturate(1.05);
  transform:translateY(-7px) rotate(.25deg);
}
body.egs-kids-theme .template-card-visual .template-preview{
  position:relative;
  overflow:hidden;
  margin:8px 8px 0;
  border:3px solid rgba(255,255,255,.98);
  border-radius:23px;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.72),0 8px 16px rgba(71,55,103,.13);
}
body.egs-kids-theme .template-card-visual .template-preview::after,
body.egs-kids-theme .public-game-cover::after{
  position:absolute;
  inset:0;
  background:linear-gradient(125deg,rgba(255,255,255,.38),transparent 30% 68%,rgba(255,255,255,.16));
  content:"";
  pointer-events:none;
}
body.egs-kids-theme .template-icon-badge{
  width:54px;
  height:54px;
  border:3px solid #fff;
  border-radius:19px;
  background:linear-gradient(180deg,#fff,#fff4df);
  box-shadow:0 6px 0 rgba(84,57,113,.14),0 13px 22px rgba(56,40,91,.18);
  font-size:1.7rem;
}
body.egs-kids-theme .template-content{
  padding:18px 19px 20px;
}
body.egs-kids-theme .template-content h3{
  color:var(--toy-ink);
  font-family:"Mali","Noto Sans Thai",sans-serif;
  font-size:1.08rem;
  font-weight:900;
  text-shadow:0 2px 0 #fff;
}
body.egs-kids-theme .template-content .badge{
  min-height:28px;
  padding:5px 10px;
  border:2px solid #fff;
  box-shadow:0 4px 0 rgba(78,57,106,.11);
}
body.egs-kids-theme .template-content .badge-free{
  background:linear-gradient(180deg,#dfffe9,#bff3cf);
  color:#13723b;
}
body.egs-kids-theme .template-content .badge-pro{
  background:linear-gradient(180deg,#f4e8ff,#dfc4ff);
  color:#6533b5;
}
body.egs-kids-theme .home-template-grid .kids-use-template,
body.egs-kids-theme .dashboard-templates .kids-use-template{
  border:3px solid #fff;
  border-radius:999px;
  background:linear-gradient(180deg,#67d66f,#3aae57);
  color:#fff;
  box-shadow:0 6px 0 #218b3f,0 12px 20px rgba(35,125,61,.2);
  font-weight:900;
  text-shadow:0 2px 0 rgba(27,101,49,.25);
}
body.egs-kids-theme .home-template-grid .btn-outline{
  border:3px solid #fff;
  border-radius:999px;
  background:linear-gradient(180deg,#ffc15c,#f28b32);
  color:#653914;
  box-shadow:0 6px 0 #d86e24,0 12px 20px rgba(155,76,24,.18);
  font-weight:900;
}
body.egs-kids-theme .home-template-grid .btn:hover,
body.egs-kids-theme .dashboard-templates .kids-use-template:hover{
  transform:translateY(-2px);
}
body.egs-kids-theme .home-template-grid .btn:active,
body.egs-kids-theme .dashboard-templates .kids-use-template:active{
  box-shadow:0 2px 0 rgba(83,70,102,.28);
  transform:translateY(4px);
}

/* Public game cards — one clear data strip, toy-like depth */
body.egs-kids-theme .kids-game-showcase{
  padding:clamp(18px,3vw,30px);
  border:4px solid rgba(255,255,255,.92);
  border-radius:34px;
  background:linear-gradient(145deg,rgba(255,255,255,.88),rgba(255,250,235,.82));
  box-shadow:0 9px 0 rgba(185,158,213,.2),0 24px 48px rgba(67,48,94,.1);
}
body.egs-kids-theme .public-game-card{
  --game-card-depth:#d7c2ef;
  overflow:hidden;
  border:4px solid #fff;
  border-radius:29px;
  background:linear-gradient(180deg,#fffefb,#fffaf4);
  box-shadow:0 8px 0 var(--game-card-depth),0 20px 34px rgba(61,46,87,.15);
  transform:translateY(0);
  transition:transform .2s ease,box-shadow .2s ease,filter .2s ease;
}
body.egs-kids-theme .public-game-card:nth-child(4n+1){--game-card-depth:#f3a9c3}
body.egs-kids-theme .public-game-card:nth-child(4n+2){--game-card-depth:#9ccff1}
body.egs-kids-theme .public-game-card:nth-child(4n+3){--game-card-depth:#8fd6a4}
body.egs-kids-theme .public-game-card:nth-child(4n+4){--game-card-depth:#f0ca6d}
body.egs-kids-theme .public-game-card:hover{
  border-color:#fff;
  box-shadow:0 12px 0 var(--game-card-depth),0 29px 44px rgba(61,46,87,.2);
  filter:saturate(1.05);
  transform:translateY(-7px) rotate(.2deg);
}
body.egs-kids-theme .public-game-card.is-premium{
  border-color:#fff7cf;
}
body.egs-kids-theme .public-game-cover{
  position:relative;
  overflow:hidden;
  margin:8px 8px 0;
  border:3px solid #fff;
  border-radius:22px;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.7),0 8px 16px rgba(67,50,95,.13);
}
body.egs-kids-theme .public-game-content{
  padding:17px 18px 19px;
}
body.egs-kids-theme .public-game-content h3{
  color:var(--toy-ink);
  font-family:"Mali","Noto Sans Thai",sans-serif;
  font-weight:900;
  text-shadow:0 2px 0 #fff;
}
body.egs-kids-theme .public-game-info{
  gap:7px;
  padding-top:13px;
  border-top:2px dashed #eadff2;
}
body.egs-kids-theme .public-game-info span{
  min-height:30px;
  border:2px solid #fff;
  background:linear-gradient(180deg,#fff,#f4f5f8);
  box-shadow:0 3px 0 rgba(83,67,107,.1);
  color:#534863;
  font-weight:850;
}
body.egs-kids-theme .public-game-info .game-info-access.is-free{
  border-color:#fff;
  background:linear-gradient(180deg,#ddffe8,#bdf1cd);
  color:#156f3b;
}
body.egs-kids-theme .public-game-info .game-info-access.is-pro{
  border-color:#fff;
  background:linear-gradient(180deg,#f2e4ff,#dcbfff);
  color:#6932b5;
}
body.egs-kids-theme .public-game-info .game-info-live{
  border-color:#fff;
  background:linear-gradient(180deg,#fff6b7,#ffdc66);
  color:#7b4d13;
}
body.egs-kids-theme .catalog-filter{
  border:4px solid #fff;
  border-radius:27px;
  background:rgba(255,255,255,.9);
  box-shadow:0 7px 0 rgba(149,128,181,.16),0 20px 35px rgba(71,53,98,.1);
}
body.egs-kids-theme .catalog-filter input,
body.egs-kids-theme .catalog-filter select{
  border:2px solid #ddd0ea;
  border-radius:15px;
  background:#fffefa;
}
body.egs-kids-theme .catalog-category-chips a{
  border:2px solid #fff;
  box-shadow:0 4px 0 rgba(92,70,123,.11);
  font-weight:900;
}

/* Non-AR game player — bright garden and chunky 3D controls */
body.egs-kids-theme.game-player-body:not(.ar-framed){
  background:
    radial-gradient(ellipse at 12% 105%,#84d363 0 25%,transparent 25.5%),
    radial-gradient(ellipse at 48% 112%,#67c96b 0 31%,transparent 31.5%),
    radial-gradient(ellipse at 90% 106%,#49b762 0 27%,transparent 27.5%),
    linear-gradient(180deg,#85dcff 0%,#dff8ff 58%,#fff0a8 100%);
}
body.egs-kids-theme.game-player-body:not(.ar-framed) .play-shell{
  border:6px solid rgba(255,255,255,.96);
  border-radius:34px;
  background:#fffdf8;
  box-shadow:0 10px 0 rgba(91,72,126,.2),0 30px 65px rgba(56,54,96,.24);
}
body.egs-kids-theme.game-player-body:not(.ar-framed) .play-topbar{
  border-bottom:3px solid #efe1f5;
  background:linear-gradient(180deg,#fff,#fff9ef);
}
body.egs-kids-theme.game-player-body:not(.ar-framed) .play-title-copy>b{
  color:var(--toy-ink);
  font-family:"Mali","Noto Sans Thai",sans-serif;
  font-size:1.12rem;
  font-weight:900;
  text-shadow:0 2px 0 #fff;
}
body.egs-kids-theme.game-player-body:not(.ar-framed) .play-game-icon{
  border:3px solid #fff;
  background:linear-gradient(180deg,#fff4ac,#ffd257);
  box-shadow:0 5px 0 #e6a82b,0 10px 18px rgba(121,78,29,.16);
}
body.egs-kids-theme.game-player-body:not(.ar-framed) .play-action{
  border:2px solid #fff;
  border-radius:15px;
  box-shadow:0 4px 0 rgba(80,62,108,.14);
  font-weight:900;
}
body.egs-kids-theme.game-player-body:not(.ar-framed) .play-stage-wrap{
  background:
    radial-gradient(circle at 13% 18%,rgba(255,255,255,.86) 0 32px,transparent 33px),
    radial-gradient(circle at 86% 15%,rgba(255,255,255,.74) 0 42px,transparent 43px),
    linear-gradient(180deg,#b8ebff 0%,#edfbff 60%,#fff2ba 100%);
}
body.egs-kids-theme.game-player-body:not(.ar-framed) .game-mount{
  background:
    radial-gradient(ellipse at 9% 105%,#7bd164 0 18%,transparent 18.5%),
    radial-gradient(ellipse at 45% 110%,#5cc36a 0 24%,transparent 24.5%),
    radial-gradient(ellipse at 87% 107%,#42ae5f 0 20%,transparent 20.5%);
}
body.egs-kids-theme.game-player-body .game-intro::before,
body.egs-kids-theme.game-player-body .result-screen::before{
  border:5px solid #fff;
  border-radius:38px;
  background:linear-gradient(160deg,rgba(255,255,255,.96),rgba(255,247,221,.92));
  box-shadow:0 9px 0 rgba(116,84,144,.16),0 26px 48px rgba(64,49,91,.2);
}
body.egs-kids-theme.game-player-body .game-intro h1,
body.egs-kids-theme.game-player-body .result-screen h1{
  background:linear-gradient(90deg,#168fd1,#6848da 30%,#42a845 57%,#ef8b2f 78%,#ec4d71);
  background-clip:text;
  color:transparent;
  -webkit-background-clip:text;
  -webkit-text-stroke:2px #fff;
  filter:drop-shadow(0 4px 0 rgba(83,59,112,.22));
  font-family:"Mali","Noto Sans Thai",sans-serif;
  font-weight:900;
}
body.egs-kids-theme.game-player-body .game-intro .btn-primary,
body.egs-kids-theme.game-player-body .result-screen .btn-primary{
  border:4px solid #fff;
  border-radius:999px;
  background:linear-gradient(180deg,#64d86e,#35a84f);
  box-shadow:0 7px 0 #21883b,0 15px 24px rgba(33,126,57,.23);
  color:#fff;
  font-weight:900;
  text-shadow:0 2px 0 rgba(27,98,44,.3);
}
body.egs-kids-theme.game-player-body .game-hud .hud-pill{
  border:3px solid #fff;
  background:linear-gradient(180deg,#fff,#fff6df);
  box-shadow:0 5px 0 rgba(89,65,120,.14),0 10px 18px rgba(60,48,88,.13);
}
body.egs-kids-theme.game-player-body .question-card h2{
  border:5px solid #fff;
  border-radius:27px;
  background:linear-gradient(100deg,#4eafe7 0%,#7652df 34%,#ef5f91 69%,#f3a343 100%);
  box-shadow:0 8px 0 rgba(81,48,127,.26),0 18px 32px rgba(66,43,100,.22);
  text-shadow:0 3px 0 rgba(70,35,93,.24);
}
body.egs-kids-theme.game-player-body .answer-grid{
  gap:18px;
}
body.egs-kids-theme.game-player-body .answer-button,
body.egs-kids-theme.game-player-body .tf-grid button{
  min-height:78px;
  border:4px solid #fff;
  border-radius:24px!important;
  background:linear-gradient(180deg,#fff,#fff7ee);
  box-shadow:0 7px 0 #f2a5bd,0 16px 25px rgba(61,46,87,.16);
  color:#49345f;
  font-weight:900;
}
body.egs-kids-theme.game-player-body .answer-button:nth-child(4n+2){box-shadow:0 7px 0 #93c9ed,0 16px 25px rgba(61,46,87,.16)}
body.egs-kids-theme.game-player-body .answer-button:nth-child(4n+3){box-shadow:0 7px 0 #80d09a,0 16px 25px rgba(61,46,87,.16)}
body.egs-kids-theme.game-player-body .answer-button:nth-child(4n+4){box-shadow:0 7px 0 #efc85f,0 16px 25px rgba(61,46,87,.16)}
body.egs-kids-theme.game-player-body .answer-button:hover,
body.egs-kids-theme.game-player-body .tf-grid button:hover{
  border-color:#fff;
  background:linear-gradient(180deg,#fff,#f4edff);
  transform:translateY(-4px) scale(1.015);
}
body.egs-kids-theme.game-player-body .answer-button.correct-answer{
  border-color:#fff!important;
  background:linear-gradient(180deg,#ecfff3,#c7f3d6)!important;
  box-shadow:0 7px 0 #43b96a,0 16px 25px rgba(31,127,66,.18)!important;
}
body.egs-kids-theme.game-player-body .answer-button.wrong-answer{
  border-color:#fff!important;
  background:linear-gradient(180deg,#fff2f4,#ffd2d9)!important;
  box-shadow:0 7px 0 #e56b79,0 16px 25px rgba(164,49,65,.17)!important;
}
body.egs-kids-theme.game-player-body .match-card{
  border:4px solid #fff;
  border-radius:22px;
  background:linear-gradient(180deg,#fff,#fff7ec);
  box-shadow:0 7px 0 #a9cfee,0 15px 24px rgba(57,44,80,.14);
}
body.egs-kids-theme.game-player-body .matching-board>div:nth-child(2) .match-card{
  box-shadow:0 7px 0 #f3a9c3,0 15px 24px rgba(57,44,80,.14);
}
body.egs-kids-theme.game-player-body .memory-card{
  filter:drop-shadow(0 9px 0 rgba(91,59,133,.18)) drop-shadow(0 18px 16px rgba(57,38,82,.2));
}
body.egs-kids-theme.game-player-body .memory-card>span{
  border:5px solid #fff;
  border-radius:27px;
}
body.egs-kids-theme.game-player-body .memory-card .card-back{
  background:linear-gradient(145deg,#ff76a5,#8151e5);
}

@media(max-width:760px){
  body.egs-kids-theme .catalog-hero,
  body.egs-kids-theme .kids-template-library{border-width:3px 0}
  body.egs-kids-theme .kids-template-library .section-head{padding:17px;border-radius:24px}
  body.egs-kids-theme .catalog-hero h1,
  body.egs-kids-theme .kids-template-library .section-head h2{-webkit-text-stroke:2px #fff}
  body.egs-kids-theme .template-card{border-width:3px;border-radius:24px;box-shadow:0 6px 0 var(--toy-card-accent),0 14px 24px rgba(61,46,87,.13)}
  body.egs-kids-theme .public-game-card{border-width:3px;border-radius:24px;box-shadow:0 6px 0 var(--game-card-depth),0 14px 24px rgba(61,46,87,.13)}
  body.egs-kids-theme .template-card-visual .template-preview,
  body.egs-kids-theme .public-game-cover{margin:6px 6px 0;border-width:2px;border-radius:18px}
  body.egs-kids-theme.game-player-body:not(.ar-framed) .play-shell{border-width:0;border-radius:0;box-shadow:none}
  body.egs-kids-theme.game-player-body .question-card h2{border-width:3px;border-radius:21px}
  body.egs-kids-theme.game-player-body .answer-button,
  body.egs-kids-theme.game-player-body .tf-grid button{border-width:3px;border-radius:20px!important}
}
@media(max-width:980px){
  body.egs-kids-theme .kids-catalog-illustration{
    display:block;
    width:100%;
    max-height:250px;
    object-fit:cover;
    object-position:center 48%;
    transform:none;
  }
}
@media(max-width:520px){
  body.egs-kids-theme .kids-template-library::after{display:none}
  body.egs-kids-theme .kids-template-library .section-head{align-items:flex-start}
  body.egs-kids-theme .template-content{padding:13px 12px 15px}
  body.egs-kids-theme .template-content h3{font-size:.92rem}
  body.egs-kids-theme .template-content .btn{min-height:42px;padding:8px 9px;font-size:.78rem}
  body.egs-kids-theme .public-game-content{padding:15px}
  body.egs-kids-theme .kids-catalog-illustration{max-height:190px;border-width:4px;border-radius:24px}
}
@media(max-width:700px){
  body.egs-kids-theme.game-world-page::before{
    background-image:linear-gradient(rgba(255,255,255,.1),rgba(255,255,255,.1)),url('backgrounds/fantasy-zoo-mobile.webp');
    background-position:center center;
  }
}
@media(prefers-reduced-data:reduce){
  body.egs-kids-theme.game-world-page::before{
    background-image:linear-gradient(180deg,#dff8ff,#ecfff2 56%,#f4edff);
  }
}
@media(prefers-reduced-motion:reduce){
  body.egs-kids-theme .template-card,
  body.egs-kids-theme .public-game-card,
  body.egs-kids-theme.game-player-body .answer-button{transition:none}
}
@media(prefers-contrast:more){
  body.egs-kids-theme .template-card,
  body.egs-kids-theme .public-game-card,
  body.egs-kids-theme.game-player-body .answer-button{border-color:#3c2d4d}
  body.egs-kids-theme .public-game-content h3,
  body.egs-kids-theme .template-content h3{color:#24172f;text-shadow:none}
}


/* EducTools Game Studio v1.22.0 — unified choices and answer feedback */
body.game-player-body .answer-button,
body.game-player-body .tf-grid button,
body.game-player-body .kids-answer,
body.game-player-body .kids-answer:nth-child(4n+1),
body.game-player-body .kids-answer:nth-child(4n+2),
body.game-player-body .kids-answer:nth-child(4n+3),
body.game-player-body .kids-answer:nth-child(4n){
  border-color:#fff!important;
  outline:3px solid #8f73df!important;
  background:linear-gradient(145deg,#fff,#eee9ff)!important;
  color:#3f3154!important;
  box-shadow:0 7px 0 #7157bd,0 16px 25px rgba(75,52,139,.16)!important
}
body.game-player-body .answer-button.selected-answer,
body.game-player-body .tf-grid button.selected-answer,
body.game-player-body .kids-answer.selected-answer,
body.game-player-body .ar-answer.selected-answer{
  border-color:#fff!important;
  outline:6px solid #237fd5!important;
  background:linear-gradient(145deg,#f4fbff,#bfe6ff)!important;
  color:#123f72!important;
  box-shadow:0 8px 0 #1767ad,0 0 0 8px rgba(44,139,224,.2)!important;
  transform:scale(.975)!important
}
body.game-player-body .answer-button.correct-answer,
body.game-player-body .tf-grid button.correct-answer,
body.game-player-body .kids-answer.correct-answer,
body.game-player-body .ar-answer.correct-answer{
  outline:6px solid #16985b!important;
  background:linear-gradient(145deg,#f3fff8,#bff0d3)!important;
  color:#0c623b!important;
  box-shadow:0 8px 0 #117643,0 18px 30px rgba(16,121,70,.22)!important
}
body.game-player-body .answer-button.wrong-answer,
body.game-player-body .tf-grid button.wrong-answer,
body.game-player-body .kids-answer.wrong-answer,
body.game-player-body .ar-answer.wrong-answer{
  outline:6px solid #dc3f5a!important;
  background:linear-gradient(145deg,#fff6f7,#ffc8d1)!important;
  color:#7e1830!important;
  box-shadow:0 8px 0 #b92f49,0 18px 30px rgba(171,38,63,.2)!important;
  animation:egsPlayerWrongShake .46s ease-in-out 1
}
.game-mount{position:relative;isolation:isolate}
.player-result-effects{position:absolute;z-index:60;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none}
.player-result-effects i{position:absolute;left:var(--x);font-style:normal;line-height:1;will-change:transform,opacity}
.player-result-effects.is-correct i{top:-8%;color:hsl(var(--hue) 88% 57%);font-size:clamp(.8rem,2.4vw,1.55rem);text-shadow:0 2px 0 rgba(255,255,255,.8);animation:egsPlayerConfettiFall var(--duration) cubic-bezier(.18,.68,.32,1) var(--delay) forwards}
.player-result-effects.is-wrong i{bottom:18%;font-size:clamp(1rem,2.8vw,1.7rem);opacity:0;animation:egsPlayerGentleWrong var(--duration) ease-out var(--delay) forwards}
.game-mount.player-result-correct-flash:before,
.game-mount.player-result-wrong-flash:before{position:absolute;z-index:55;inset:0;border-radius:inherit;content:"";pointer-events:none}
.game-mount.player-result-correct-flash:before{animation:egsPlayerCorrectGlow .75s ease-out 1;background:radial-gradient(circle,rgba(255,240,111,.52),rgba(68,216,137,.15) 45%,transparent 72%)}
.game-mount.player-result-wrong-flash:before{animation:egsPlayerWrongGlow .65s ease-out 1;background:radial-gradient(circle,rgba(148,195,255,.32),rgba(103,89,177,.11) 48%,transparent 72%)}
@keyframes egsPlayerConfettiFall{0%{opacity:0;transform:translate3d(0,-20px,0) rotate(0) scale(.75)}10%{opacity:1}100%{opacity:0;transform:translate3d(var(--drift),105vh,0) rotate(var(--spin)) scale(1.05)}}
@keyframes egsPlayerGentleWrong{0%{opacity:0;transform:translate3d(0,18px,0) scale(.7)}25%{opacity:.9}100%{opacity:0;transform:translate3d(0,-125px,0) scale(1.15)}}
@keyframes egsPlayerCorrectGlow{0%{opacity:0}30%{opacity:1}100%{opacity:0}}
@keyframes egsPlayerWrongGlow{0%{opacity:0}35%{opacity:1}100%{opacity:0}}
@keyframes egsPlayerWrongShake{0%,100%{transform:translateX(0)}25%{transform:translateX(-7px)}50%{transform:translateX(6px)}75%{transform:translateX(-3px)}}
@media(prefers-reduced-motion:reduce){.player-result-effects,.game-mount.player-result-correct-flash:before,.game-mount.player-result-wrong-flash:before{display:none!important}body.game-player-body .wrong-answer{animation:none!important}}


/* EducTools Game Studio v1.22.3 — centered answer celebration */
.answer-celebration-layer{position:fixed;z-index:2147483000;inset:0;display:grid;place-items:center;padding:clamp(14px,4vw,36px);background:rgba(35,23,64,.32);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);pointer-events:none;animation:egsCelebrationBackdrop .22s ease-out both}
.answer-celebration-card{--celebration-accent:#31c56f;position:relative;isolation:isolate;width:min(590px,calc(100vw - 28px));max-height:min(82svh,720px);overflow:auto;padding:clamp(24px,4.5vw,42px);border:5px solid rgba(255,255,255,.96);border-radius:clamp(26px,5vw,44px);background:linear-gradient(145deg,#f8fff9,#d6ffe5 66%,#fff5b5);box-shadow:0 22px 0 color-mix(in srgb,var(--celebration-accent) 72%,#193b2c),0 38px 85px rgba(31,22,58,.42),inset 0 0 0 3px rgba(255,255,255,.6);color:#164e36;text-align:center;transform-origin:center;animation:egsCelebrationCardIn .48s cubic-bezier(.18,.89,.32,1.28) both}
.answer-celebration-card.is-wrong{--celebration-accent:#e55770;background:linear-gradient(145deg,#fff8fb,#ffe0e8 64%,#e5e3ff);color:#75243a;box-shadow:0 20px 0 #b73752,0 38px 85px rgba(70,28,55,.38),inset 0 0 0 3px rgba(255,255,255,.65);animation-name:egsCelebrationWrongIn}
.answer-celebration-card.is-timeout{--celebration-accent:#f0a62d;background:linear-gradient(145deg,#fffdf5,#fff0ba 65%,#ffe0c9);color:#6f4304;box-shadow:0 20px 0 #bd7416,0 38px 85px rgba(81,49,15,.34),inset 0 0 0 3px rgba(255,255,255,.65)}
.answer-celebration-shine{position:absolute;z-index:-1;inset:-50%;background:conic-gradient(from 0deg,transparent,rgba(255,255,255,.72),transparent 18%,transparent 50%,rgba(255,255,255,.48),transparent 68%);animation:egsCelebrationSpin 5s linear infinite}
.answer-celebration-icon{display:grid;width:clamp(88px,18vw,126px);height:clamp(88px,18vw,126px);margin:-4px auto 10px;place-items:center;border:5px solid #fff;border-radius:50%;background:linear-gradient(145deg,#fff7a9,#ffd752);box-shadow:0 10px 0 rgba(152,101,0,.22),0 18px 35px rgba(78,50,0,.18);font-size:clamp(3rem,9vw,5.1rem);animation:egsCelebrationIcon .85s ease-in-out infinite alternate}
.answer-celebration-card.is-wrong .answer-celebration-icon{background:linear-gradient(145deg,#fff,#ffd6df);animation:egsCelebrationThink 1.2s ease-in-out infinite}
.answer-celebration-card.is-timeout .answer-celebration-icon{background:linear-gradient(145deg,#fff,#ffe09f);animation:egsCelebrationClock 1.1s ease-in-out infinite}
.answer-celebration-kicker{display:inline-flex;padding:6px 13px;border-radius:999px;background:rgba(255,255,255,.78);color:var(--celebration-accent);font-size:.82rem;font-weight:950;letter-spacing:.04em;box-shadow:0 5px 14px rgba(41,31,74,.09)}
.answer-celebration-card h2{margin:9px 0 4px;color:inherit!important;-webkit-text-fill-color:currentColor!important;font-family:"Mali","Noto Sans Thai",sans-serif;font-size:clamp(1.8rem,6vw,3.15rem)!important;line-height:1.12;text-shadow:0 3px 0 rgba(255,255,255,.75)!important}
.answer-celebration-message{margin:7px auto 0;color:inherit;font-size:clamp(1.04rem,2.8vw,1.35rem);font-weight:850;line-height:1.5}
.answer-celebration-streak{display:inline-flex;align-items:center;justify-content:center;margin-top:12px;padding:7px 13px;border:2px solid #ffbe33;border-radius:999px;background:#fff7cc;color:#814b00;font-size:.92rem;font-weight:950;box-shadow:0 6px 0 rgba(170,105,0,.14)}
.answer-celebration-explanation{display:grid;gap:5px;margin:16px auto 0;padding:14px 16px;border:3px solid rgba(255,255,255,.9);border-radius:20px;background:rgba(255,255,255,.84);color:#443558;text-align:left;box-shadow:0 9px 24px rgba(58,43,90,.12)}
.answer-celebration-explanation b{color:#6542b5;font-size:1rem}.answer-celebration-explanation span{font-size:clamp(.95rem,2.3vw,1.12rem);font-weight:750;line-height:1.55}
.answer-celebration-next{display:grid;gap:7px;margin:17px auto 0;color:inherit;font-size:.88rem;font-weight:850;opacity:.86}.answer-celebration-next i{display:block;width:min(330px,100%);height:8px;margin:auto;overflow:hidden;border-radius:999px;background:rgba(0,0,0,.12)}.answer-celebration-next em{display:block;width:100%;height:100%;border-radius:inherit;background:var(--celebration-accent);transform-origin:left;animation:egsFeedbackAdvance linear forwards}
.answer-celebration-stars i{position:absolute;color:#ffcf31;font-style:normal;text-shadow:0 2px 0 #fff;animation:egsCelebrationStar 1.1s ease-in-out infinite alternate}.answer-celebration-stars i:nth-child(1){top:8%;left:8%;font-size:2rem}.answer-celebration-stars i:nth-child(2){top:15%;right:8%;font-size:2.5rem;animation-delay:.18s}.answer-celebration-stars i:nth-child(3){bottom:11%;left:7%;font-size:1.8rem;animation-delay:.3s}.answer-celebration-stars i:nth-child(4){right:8%;bottom:9%;font-size:1.4rem;animation-delay:.44s}
.answer-celebration-layer.is-compact .answer-celebration-card{width:min(500px,calc(100vw - 24px));padding:22px 24px}.answer-celebration-layer.is-compact .answer-celebration-icon{width:84px;height:84px;font-size:3.4rem}.answer-celebration-layer.is-compact .answer-celebration-card h2{font-size:clamp(1.55rem,5vw,2.35rem)!important}
@keyframes egsCelebrationBackdrop{from{opacity:0}to{opacity:1}}
@keyframes egsCelebrationCardIn{0%{opacity:0;transform:scale(.58) rotate(-4deg)}70%{opacity:1;transform:scale(1.045) rotate(1deg)}100%{transform:scale(1) rotate(0)}}
@keyframes egsCelebrationWrongIn{0%{opacity:0;transform:scale(.72) translateX(-16px)}35%{transform:scale(1.02) translateX(13px)}60%{transform:translateX(-7px)}100%{opacity:1;transform:scale(1) translateX(0)}}
@keyframes egsCelebrationSpin{to{transform:rotate(360deg)}}
@keyframes egsCelebrationIcon{from{transform:translateY(0) rotate(-4deg)}to{transform:translateY(-8px) rotate(5deg)}}
@keyframes egsCelebrationThink{0%,100%{transform:rotate(-4deg)}50%{transform:rotate(5deg) scale(1.04)}}
@keyframes egsCelebrationClock{0%,100%{transform:scale(1)}50%{transform:scale(1.08)}}
@keyframes egsCelebrationStar{from{transform:scale(.72) rotate(-12deg);opacity:.55}to{transform:scale(1.2) rotate(14deg);opacity:1}}
@media(max-width:560px){.answer-celebration-layer{padding:12px}.answer-celebration-card{max-height:88svh;padding:22px 17px;border-width:4px;border-radius:28px;box-shadow:0 14px 0 color-mix(in srgb,var(--celebration-accent) 72%,#193b2c),0 28px 60px rgba(31,22,58,.38)}.answer-celebration-explanation{padding:11px 12px;border-radius:16px}.answer-celebration-stars i:nth-child(1),.answer-celebration-stars i:nth-child(3){left:4%}.answer-celebration-stars i:nth-child(2),.answer-celebration-stars i:nth-child(4){right:4%}}
@media(prefers-reduced-motion:reduce){.answer-celebration-layer,.answer-celebration-card,.answer-celebration-icon,.answer-celebration-shine,.answer-celebration-stars i{animation:none!important}.answer-celebration-shine{display:none}}


/* v1.24.0 — homepage pinned games + clearer catalog introduction */
body.egs-kids-theme .plg-pinned-section{padding:30px 0 14px;background:linear-gradient(180deg,rgba(255,249,218,.68),rgba(255,255,255,.22))}.plg-pinned-heading{margin-bottom:18px}.plg-pinned-heading .plg-heading-icon{background:linear-gradient(145deg,#fff2a8,#ffc93d);box-shadow:0 6px 0 #dca923}.plg-pinned-grid .public-game-card{border-color:#ffe178!important;box-shadow:0 8px 0 rgba(219,166,33,.18),0 20px 42px rgba(93,71,35,.12)!important}.plg-pinned-grid .public-game-card:before{position:absolute;z-index:5;top:10px;left:10px;padding:5px 9px;border:2px solid #fff;border-radius:999px;background:#ffcf3b;color:#6b4300;box-shadow:0 4px 0 #d99c16;content:"📌 แนะนำ";font-size:.72rem;font-weight:950}
body.egs-kids-theme .catalog-hero .kids-catalog-hero-copy{max-width:760px;padding:clamp(20px,3vw,34px);border:4px solid rgba(255,255,255,.96);border-radius:32px;background:rgba(255,255,255,.94);box-shadow:0 9px 0 rgba(76,80,135,.13),0 28px 60px rgba(55,72,119,.18);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}body.egs-kids-theme .catalog-hero .kids-catalog-hero-copy h1{color:#4f35bd!important;-webkit-text-fill-color:#4f35bd!important;background:none!important;background-clip:border-box!important;-webkit-background-clip:border-box!important;text-shadow:0 2px 0 #fff!important}body.egs-kids-theme .catalog-hero .kids-catalog-hero-copy p{color:#3e3657!important;font-size:clamp(1rem,1.7vw,1.16rem);font-weight:750;line-height:1.75;text-shadow:none!important}body.egs-kids-theme .catalog-hero .catalog-stats{color:#40375b!important}body.egs-kids-theme .catalog-hero .catalog-stats span{border:2px solid #e6dcff!important;background:#f8f5ff!important;color:#40375b!important;font-weight:850}
/* Extra safety when a camera/video scene is bright or similarly colored. */
body.egs-kids-theme.game-player-body.ar-framed .ar-feedback-toast{filter:drop-shadow(0 14px 28px rgba(0,0,0,.34))}body.egs-kids-theme.game-player-body.ar-framed .ar-auto-feedback{background:#fff!important;color:#231b3e!important;border:4px solid #fff!important;box-shadow:0 16px 48px rgba(0,0,0,.52)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}body.egs-kids-theme.game-player-body.ar-framed .ar-auto-feedback.is-correct{outline:4px solid #31c56f!important}body.egs-kids-theme.game-player-body.ar-framed .ar-auto-feedback.is-wrong{outline:4px solid #ef476f!important}body.egs-kids-theme.game-player-body.ar-framed .ar-auto-feedback strong,body.egs-kids-theme.game-player-body.ar-framed .ar-auto-feedback small{color:#231b3e!important;text-shadow:none!important;opacity:1!important}

/* v1.24.0 — AR feedback contrast hardening (framed + immersive) */
body.egs-kids-theme.game-player-body .ar-auto-feedback{background:#fff!important;color:#231b3e!important;border:4px solid #fff!important;box-shadow:0 16px 50px rgba(0,0,0,.58),0 0 0 3px rgba(255,255,255,.88)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
body.egs-kids-theme.game-player-body .ar-auto-feedback.is-correct{border-color:#31c56f!important;outline:3px solid #fff!important}
body.egs-kids-theme.game-player-body .ar-auto-feedback.is-wrong{border-color:#ef476f!important;outline:3px solid #fff!important}
body.egs-kids-theme.game-player-body .ar-auto-feedback strong,body.egs-kids-theme.game-player-body .ar-auto-feedback small{color:#231b3e!important;-webkit-text-fill-color:#231b3e!important;text-shadow:none!important;opacity:1!important}
body.egs-kids-theme.game-player-body.ar-framed .answer-celebration-card,body.egs-kids-theme.game-player-body.ar-immersive .answer-celebration-card{background:linear-gradient(145deg,#fff,#f6f2ff)!important;color:#241c3e!important;border:5px solid #fff!important;box-shadow:0 28px 76px rgba(0,0,0,.58),0 0 0 4px rgba(255,255,255,.92)!important}
body.egs-kids-theme.game-player-body.ar-framed .answer-celebration-card h2,body.egs-kids-theme.game-player-body.ar-immersive .answer-celebration-card h2,body.egs-kids-theme.game-player-body.ar-framed .answer-celebration-message,body.egs-kids-theme.game-player-body.ar-immersive .answer-celebration-message{color:#241c3e!important;-webkit-text-fill-color:#241c3e!important;text-shadow:none!important}
body.egs-kids-theme.game-player-body.ar-framed .answer-celebration-explanation,body.egs-kids-theme.game-player-body.ar-immersive .answer-celebration-explanation{background:#fff!important;color:#34284d!important;border:2px solid #ddd3ff!important;box-shadow:0 8px 22px rgba(29,21,54,.16)!important}
body.egs-kids-theme.game-player-body.ar-framed .answer-celebration-explanation b,body.egs-kids-theme.game-player-body.ar-framed .answer-celebration-explanation span,body.egs-kids-theme.game-player-body.ar-immersive .answer-celebration-explanation b,body.egs-kids-theme.game-player-body.ar-immersive .answer-celebration-explanation span{color:#34284d!important;-webkit-text-fill-color:#34284d!important}
