/*
 * EducTools Game Studio — ธีมสนามเด็กเล่นพาสเทล v1.46.0
 * ชั้นสุดท้ายของหน้าตา ให้ Game Studio เป็นแบรนด์เดียวกับเว็บหลัก
 * พื้นเขียวมิ้นต์ หมึกกรมท่า สีส้มเป็นสีหลัก การ์ดขาวมุมโค้ง หัวข้อ Mitr เนื้อหา Sarabun
 * หน้าเล่นเกม (game-player-body) เปลี่ยนแค่สีพื้นฐานและฟอนต์ ไม่แตะกลไกเกม
 */
@font-face{font-family:"Mitr";src:url("../../assets/fonts/mitr-medium.woff") format("woff");font-weight:500;font-display:swap}
@font-face{font-family:"Mitr";src:url("../../assets/fonts/mitr-semibold.woff") format("woff");font-weight:600 1000;font-display:swap}
@font-face{font-family:"Sarabun";src:url("../../assets/fonts/sarabun-regular.woff") format("woff");font-weight:400;font-display:swap}
@font-face{font-family:"Sarabun";src:url("../../assets/fonts/sarabun-medium.woff") format("woff");font-weight:500;font-display:swap}
@font-face{font-family:"Sarabun";src:url("../../assets/fonts/sarabun-semibold.woff") format("woff");font-weight:600;font-display:swap}
@font-face{font-family:"Sarabun";src:url("../../assets/fonts/sarabun-bold.woff") format("woff");font-weight:700 1000;font-display:swap}

:root{
  --pt-ground:#EEF7F2;--pt-surface:#FFFFFF;--pt-ink:#1B2559;--pt-ink-soft:#4B5578;--pt-muted:#5E6786;--pt-line:#DCE8E1;
  --pt-accent:#F0742A;--pt-accent-deep:#D65F17;--pt-accent-text:#B9500F;--pt-accent-large:#E0601A;--pt-on-accent:#1B2559;
  --pt-sky:#CFE7FF;
  --pt-indigo-wash:#E6E9FF;--pt-indigo:#4253C9;
  --pt-peach-wash:#FFE8D6;--pt-peach:#C25A12;
  --pt-mint-wash:#D7F2E3;--pt-mint:#2E7D57;
  --pt-butter-wash:#FFF1C2;--pt-butter:#8A6400;
  --pt-shadow:0 10px 30px rgba(27,37,89,.08);
  --pt-shadow-hover:0 18px 40px rgba(27,37,89,.14);
  --pt-display:"Mitr","Sarabun","Noto Sans Thai",system-ui,sans-serif;
  --pt-font:"Sarabun","Noto Sans Thai","Leelawadee UI",Tahoma,system-ui,sans-serif;

  /* ส่งค่าให้ตัวแปรสีของธีมเดิม */
  --bg:var(--pt-ground);--primary:var(--pt-ink);
  --kids-purple:var(--pt-ink);--kids-purple-dark:#0D1640;--kids-purple-soft:var(--pt-indigo-wash);
  --kids-pink:var(--pt-accent);--kids-pink-soft:var(--pt-peach-wash);
  --kids-blue:var(--pt-indigo);--kids-blue-soft:var(--pt-indigo-wash);
  --kids-green:#2E9E6B;--kids-green-soft:var(--pt-mint-wash);
  --kids-yellow:#FFD166;--kids-yellow-soft:var(--pt-butter-wash);
  --kids-orange:var(--pt-accent);
  --kids-ink:var(--pt-ink);--kids-muted:var(--pt-muted);--kids-line:var(--pt-line);
  --kids-shadow:var(--pt-shadow-hover);--kids-shadow-soft:var(--pt-shadow);
  --plg-blue:var(--pt-indigo);--plg-blue-deep:var(--pt-ink);--plg-sky:var(--pt-sky);
  --plg-purple:var(--pt-ink);--plg-violet:var(--pt-indigo);--plg-pink:var(--pt-accent);
  --plg-ink:var(--pt-ink);--plg-muted:var(--pt-muted);--plg-line:var(--pt-line);
  --plg-shadow:var(--pt-shadow);--plg-shadow-strong:var(--pt-shadow-hover);
  --toy-ink:var(--pt-ink);--toy-purple:var(--pt-ink);--toy-pink:var(--pt-accent);
}

/* ---------- พื้นหลังและฟอนต์ ---------- */
html body.egs-kids-theme:not(.game-player-body){
  background:var(--pt-ground)!important;
  color:var(--pt-ink);
  font-family:var(--pt-font)!important;
}
body.egs-kids-theme:not(.game-player-body) :is(h1,h2,h3){font-family:var(--pt-display)!important;color:var(--pt-ink);letter-spacing:0;font-weight:600}
body.egs-kids-theme:not(.game-player-body) p{color:var(--pt-muted)}

/* ---------- header ---------- */
body.egs-kids-theme:not(.game-player-body) .site-header{
  background:color-mix(in srgb,var(--pt-ground) 88%,transparent)!important;
  backdrop-filter:saturate(1.4) blur(10px);
  border-bottom:0!important;
  box-shadow:none!important;
}
.pastel-brand-mark{display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:50%;background:var(--pt-accent);color:#fff}
body.egs-kids-theme .brand-wordmark.pastel-wordmark{font-family:var(--pt-display);font-weight:600;font-size:1.32rem;letter-spacing:0;color:var(--pt-ink)}
body.egs-kids-theme .brand-tagline{color:var(--pt-muted);font-family:var(--pt-font);font-weight:600;letter-spacing:.02em}
body.egs-kids-theme:not(.game-player-body) .site-nav{
  background:var(--pt-surface)!important;
  border:0!important;
  border-radius:999px!important;
  box-shadow:var(--pt-shadow)!important;
  padding:6px!important;
  gap:2px!important;
}
html body.egs-play-learn-grow:not(.game-player-body) .site-nav>a.game-nav-item{
  --game-nav-bg:transparent;--game-nav-ink:var(--pt-ink);--game-nav-border:transparent;
  background:transparent!important;
  color:var(--pt-ink)!important;
  border:0!important;
  border-radius:999px!important;
  box-shadow:none!important;
  font-family:var(--pt-font);
  font-weight:700!important;
  padding:8px 14px;
  transform:none!important;
  filter:none!important;
}
html body.egs-play-learn-grow:not(.game-player-body) .site-nav>a.game-nav-item:hover{background:var(--pt-ground)!important}
html body.egs-play-learn-grow:not(.game-player-body) .site-nav>a.game-nav-item.is-active{background:var(--pt-ink)!important;color:#fff!important}
html body.egs-play-learn-grow:not(.game-player-body) .site-nav>a.game-nav-item .kids-nav-icon{display:none}
html body.egs-play-learn-grow:not(.game-player-body) .site-nav>a.game-nav-register{background:var(--pt-accent)!important;color:var(--pt-on-accent)!important}
html body.egs-play-learn-grow:not(.game-player-body) .site-nav>a.game-nav-register:hover{background:var(--pt-accent-deep)!important}
@media(max-width:760px){
  body.egs-kids-theme:not(.game-player-body) .site-nav{border-radius:24px!important}
  html body.egs-play-learn-grow:not(.game-player-body) .site-nav>a.game-nav-item{width:100%;justify-content:flex-start}
}

/* ---------- ปุ่ม ---------- */
body.egs-kids-theme:not(.game-player-body) .btn{border-radius:999px!important;font-family:var(--pt-font);font-weight:700}
body.egs-kids-theme:not(.game-player-body) .btn-primary{
  background:var(--pt-ink)!important;
  color:#fff!important;
  border:0!important;
  box-shadow:none!important;
}
body.egs-kids-theme:not(.game-player-body) .btn-primary:hover{background:#0D1640!important;transform:translateY(-2px)}
body.egs-kids-theme:not(.game-player-body) :is(.btn-outline,.btn-secondary,.btn-light){
  background:var(--pt-surface)!important;
  color:var(--pt-ink)!important;
  border:2px solid var(--pt-line)!important;
  box-shadow:none!important;
}
body.egs-kids-theme:not(.game-player-body) :is(.btn-outline,.btn-secondary,.btn-light):hover{border-color:var(--pt-ink)!important}

/* ---------- หน้าแรก Game Studio ---------- */
body.egs-kids-theme .plg-hero{background:var(--pt-ground)!important;padding-bottom:70px}
body.egs-kids-theme .plg-hero:before{background:var(--pt-sky);opacity:.55}
body.egs-kids-theme .plg-hero:after{background:var(--pt-peach-wash);opacity:.8}
body.egs-kids-theme :is(.plg-welcome-card,.plg-quick-tools a){border:0!important;background:var(--pt-surface)!important;box-shadow:var(--pt-shadow)!important}
body.egs-kids-theme .plg-welcome-copy strong{color:var(--pt-ink);font-family:var(--pt-display)}
body.egs-kids-theme .plg-welcome-copy small{color:var(--pt-muted)}
body.egs-kids-theme .plg-welcome-plan{background:var(--pt-peach-wash);color:var(--pt-accent-text)}
body.egs-kids-theme .plg-hero-stage{border:0!important;background:var(--pt-surface)!important;box-shadow:var(--pt-shadow)!important;border-radius:40px}
body.egs-kids-theme .plg-hero-stage:before{display:none}
body.egs-kids-theme .plg-hero-kicker{background:var(--pt-peach-wash);color:var(--pt-accent-text);letter-spacing:.04em}
body.egs-kids-theme .plg-hero-copy h1{text-transform:none;line-height:1.15;font-weight:600}
body.egs-kids-theme .plg-hero-copy h1 span{color:var(--pt-ink)!important;-webkit-text-fill-color:var(--pt-ink)!important;background:none!important;text-shadow:none!important;-webkit-text-stroke:0!important;filter:none!important}
body.egs-kids-theme .plg-hero-copy h1 span:nth-child(2){color:var(--pt-accent-large)!important;-webkit-text-fill-color:var(--pt-accent-large)!important}
body.egs-kids-theme .plg-hero-copy p{color:var(--pt-ink-soft);font-weight:500}
body.egs-kids-theme .plg-hero-stats span{border:0;background:var(--pt-ground);border-radius:18px}
body.egs-kids-theme .plg-hero-stats b{color:var(--pt-ink);font-family:var(--pt-display)}
body.egs-kids-theme .plg-hero-art{background:var(--pt-sky)!important;box-shadow:none!important;border-radius:32px}
body.egs-kids-theme .plg-hero-art:after{display:none}
body.egs-kids-theme .plg-category-dock{border:0!important;background:var(--pt-surface)!important;box-shadow:var(--pt-shadow)!important;border-radius:32px}
body.egs-kids-theme .plg-category-card{box-shadow:none!important;border:0!important;border-radius:22px}
body.egs-kids-theme :is(.plg-popular-panel,.plg-membership-panel){border:0!important;background:var(--pt-surface)!important;box-shadow:var(--pt-shadow)!important;border-radius:32px}
body.egs-play-learn-grow .plg-create-card{background:var(--pt-ink)!important}
body.egs-play-learn-grow .plg-progress-card{background:var(--pt-accent)!important}
body.egs-play-learn-grow .plg-progress-card :is(.plg-action-title,.plg-level-row b,.plg-level-row small,.plg-progress-caption,.plg-progress-caption a,h3,p){color:var(--pt-on-accent)!important}
body.egs-play-learn-grow .plg-tip-card{background:var(--pt-butter-wash)!important;color:var(--pt-ink)!important}
body.egs-play-learn-grow .plg-tip-card .plg-tip-copy :is(span,p){color:var(--pt-ink)!important}
body.egs-kids-theme :is(.plg-template-section,.plg-how-section,.plg-membership-section){background:var(--pt-ground)!important;border-top:0!important}
body.egs-kids-theme .plg-centered-heading>span{background:var(--pt-peach-wash);color:var(--pt-accent-text)}
body.egs-kids-theme .plg-package-summary article{border:0!important;box-shadow:var(--pt-shadow)!important;border-radius:28px!important}

/* ---------- การ์ดเกม ---------- */
body.egs-kids-theme:not(.game-player-body) .public-game-card{
  border:0!important;
  border-radius:28px!important;
  background:var(--pt-surface)!important;
  box-shadow:var(--pt-shadow)!important;
}
body.egs-kids-theme:not(.game-player-body) .public-game-card:hover{box-shadow:var(--pt-shadow-hover)!important;transform:translateY(-4px)}
body.egs-kids-theme:not(.game-player-body) .public-game-card::after{display:none!important}
body.egs-kids-theme:not(.game-player-body) .public-game-card :is(h3,.public-game-title){font-family:var(--pt-display)!important;font-weight:500}

/* ---------- หัวหน้าคลังเกม ราคา และหน้าย่อยที่เคยเป็นสีฟ้าไล่สี ---------- */
html body.egs-play-learn-grow:not(.game-player-body) .catalog-hero,
body.egs-kids-theme .game-pricing-hero{
  background:var(--pt-ground)!important;
  color:var(--pt-ink)!important;
}
html body.egs-play-learn-grow:not(.game-player-body) :is(.kids-catalog-hero-copy h1,.kids-catalog-hero-copy p,.catalog-hero h1,.catalog-hero p),
body.egs-kids-theme .game-pricing-hero :is(h1,p,span){color:var(--pt-ink)!important}
body.egs-kids-theme .game-pricing-hero::before,body.egs-kids-theme .game-pricing-hero::after{background:var(--pt-sky)!important;opacity:.5}
body.egs-kids-theme .game-pricing-hero span{background:var(--pt-surface)!important}
body.egs-kids-theme .public-category-chips a{border-radius:999px!important;border:0!important;background:var(--pt-surface)!important;color:var(--pt-ink)!important;box-shadow:none!important}
body.egs-kids-theme .public-category-chips a.active{background:var(--pt-ink)!important;color:#fff!important}
body.egs-kids-theme .public-category-chips a.active b{color:#fff}
body.egs-kids-theme .catalog-filter{border:0!important;border-radius:28px!important;background:var(--pt-surface)!important;box-shadow:var(--pt-shadow)!important}
body.egs-kids-theme .topic-hub-chip{background:var(--pt-peach-wash)!important;color:var(--pt-accent-text)!important}

/* ---------- แผง การ์ด และกล่องทั่วไป ---------- */
body.egs-kids-theme:not(.game-player-body) :is(.panel,.assign-card,.dash-card,.dashboard-card,.game-price-card){
  border:0!important;
  border-radius:28px!important;
  box-shadow:var(--pt-shadow)!important;
}
body.egs-kids-theme .game-price-card.featured,body.egs-kids-theme .game-price-card.is-featured{outline:3px solid var(--pt-accent);outline-offset:-3px}

/* ---------- footer ---------- */
html body.egs-play-learn-grow:not(.game-player-body) .site-footer{background:var(--pt-ink)!important;color:#CDD3F2!important}
html body.egs-play-learn-grow:not(.game-player-body) .site-footer :is(a,p,span){color:#CDD3F2!important}
html body.egs-play-learn-grow:not(.game-player-body) .site-footer :is(strong,b){color:#fff!important;font-family:var(--pt-display)}
html body.egs-play-learn-grow:not(.game-player-body) .site-footer a:hover{color:#FFB37E!important}

/* ---------- หน้าเล่นเกม: แค่ฟอนต์และปุ่มหลัก ---------- */
body.egs-kids-theme .game-intro h1{font-family:var(--pt-display)}
body.egs-kids-theme #startGameButton{background:var(--pt-ink)!important;color:#fff!important;border-radius:999px!important;box-shadow:none!important}

/* ---------- ปุ่มและป้ายเฉพาะหน้าแรก Game Studio ---------- */
body.egs-kids-theme .plg-btn-main{background:var(--pt-ink)!important;color:#fff!important;border:0!important;box-shadow:none!important;border-radius:999px!important}
body.egs-kids-theme .plg-btn-light{background:var(--pt-surface)!important;color:var(--pt-ink)!important;border:2px solid var(--pt-line)!important;box-shadow:none!important;border-radius:999px!important}
body.egs-kids-theme .plg-see-all{background:var(--pt-surface)!important;color:var(--pt-ink)!important;border:2px solid var(--pt-line)!important;box-shadow:none!important;border-radius:999px!important}
body.egs-kids-theme .plg-see-all:hover{border-color:var(--pt-ink)!important}
body.egs-kids-theme :is(.plg-panel-heading small,.plg-template-heading small,.plg-section-heading small){color:var(--pt-accent-text)!important}
body.egs-kids-theme .plg-heading-icon{background:var(--pt-butter-wash)!important;box-shadow:none!important}
body.egs-kids-theme .plg-create-card>a{background:var(--pt-accent)!important;color:var(--pt-on-accent)!important;box-shadow:none!important;border:0!important;border-radius:999px!important}
body.egs-kids-theme .plg-progress-card a{color:var(--pt-on-accent)!important}
body.egs-kids-theme .kids-use-template{background:var(--pt-accent)!important;color:var(--pt-on-accent)!important;border:0!important;box-shadow:none!important}
body.egs-kids-theme .kids-use-template:hover{background:var(--pt-accent-deep)!important}
body.egs-kids-theme .plg-step-grid article{border:0!important;box-shadow:var(--pt-shadow)!important;background:var(--pt-surface)!important;border-radius:28px!important}
body.egs-kids-theme .plg-step-grid article b{background:var(--pt-peach-wash)!important;color:var(--pt-accent-text)!important;border-radius:999px!important;box-shadow:none!important}
body.egs-kids-theme .plg-step-grid article:nth-child(2) b{background:var(--pt-indigo-wash)!important;color:var(--pt-indigo)!important}
body.egs-kids-theme .plg-step-grid article:nth-child(3) b{background:var(--pt-mint-wash)!important;color:var(--pt-mint)!important}
body.egs-kids-theme .plg-step-grid article:nth-child(4) b{background:var(--pt-butter-wash)!important;color:var(--pt-butter)!important}
body.egs-kids-theme .plg-package-summary article{background:var(--pt-surface)!important}
body.egs-kids-theme .plg-package-summary article b{color:var(--pt-accent-text)!important}
body.egs-kids-theme .plg-package-summary article strong{font-family:var(--pt-display);color:var(--pt-ink)!important}
body.egs-kids-theme .public-game-card .btn-primary,body.egs-kids-theme .public-game-card .play-button{background:var(--pt-ink)!important;color:#fff!important}
body.egs-kids-theme .plg-heading-icon+span>small{color:var(--pt-accent-text)!important}
body.egs-kids-theme .game-pricing-section{background:var(--pt-ground)!important}
body.egs-kids-theme .game-price-value b{color:var(--pt-ink)!important;font-family:var(--pt-display);font-weight:600}
body.egs-kids-theme .game-price-card small{color:var(--pt-accent-text)!important}
body.egs-kids-theme .game-price-icon{background:var(--pt-ground)!important;box-shadow:none!important}
body.egs-kids-theme .game-price-card.is-super{outline:3px solid var(--pt-accent);outline-offset:-3px}
body.egs-kids-theme :is(.game-price-badge,.game-price-card .badge){background:var(--pt-accent)!important;color:var(--pt-on-accent)!important}

/* ---------- แดชบอร์ดครู ---------- */
body.egs-kids-theme .dashboard-sidebar{background:var(--pt-surface)!important;border-right:0!important}
body.egs-kids-theme .dash-nav a{border-radius:999px!important}
html body.egs-kids-theme .dash-nav a.active,html body.egs-kids-theme .dash-nav a.active:hover{background:var(--pt-ink)!important;color:#fff!important;box-shadow:none!important}
html body.egs-kids-theme .dash-nav a.active span{color:#fff!important}
body.egs-kids-theme .dash-nav a:not(.active):hover{background:var(--pt-ground)!important}
body.egs-kids-theme .metric{border:0!important;border-radius:24px!important;box-shadow:var(--pt-shadow)!important;background:var(--pt-surface)!important}
body.egs-kids-theme .metric strong{color:var(--pt-ink)!important;font-family:var(--pt-display);font-weight:600}
body.egs-kids-theme .dash-head .eyebrow,body.egs-kids-theme .dash-head>div>span:first-child{background:var(--pt-peach-wash)!important;color:var(--pt-accent-text)!important}
body.egs-kids-theme .dashboard-content{background:var(--pt-ground)!important}
/* ตัวเลขสถิติใช้ Sarabun (เลขศูนย์ของ Mitr มีขีด อ่านเหมือนตัว Ø) */
body.egs-kids-theme :is(.metric strong,.plg-hero-stats b,.game-price-value b,.plg-package-summary article strong){font-family:var(--pt-font)!important;font-weight:800!important}
body.egs-kids-theme .public-game-card img{color:transparent}

/* =====================================================================
 * v1.48.0 ปรับความสมดุลทุกหน้า และรองรับมือถือ/แท็บเล็ต
 * ===================================================================== */

/* ตัวหนังสือบนการ์ดพื้นเข้ม ต้องเป็นสีขาวเสมอ */
html body.egs-kids-theme .plg-create-card :is(h3,p,strong,span){color:#fff!important;-webkit-text-fill-color:#fff!important}
html body.egs-kids-theme .plg-create-card p{color:#C9D0F2!important;-webkit-text-fill-color:#C9D0F2!important}
html body.egs-kids-theme .demo-privacy :is(h2,h3){color:#fff!important}
html body.egs-kids-theme .demo-privacy-grid>div:first-child p{color:#C9D0F2!important}

/* ปุ่มเมนูบนมือถือ */
html body.egs-kids-theme:not(.game-player-body) .nav-toggle{
  display:none;width:46px;height:46px;border:0!important;border-radius:50%!important;
  background:var(--pt-surface)!important;color:var(--pt-ink)!important;box-shadow:var(--pt-shadow)!important;
  place-items:center;
}
@media(max-width:760px){
  html body.egs-kids-theme:not(.game-player-body) .nav-toggle{display:grid}
  html body.egs-kids-theme:not(.game-player-body) .site-nav{top:76px!important;left:12px!important;right:12px!important;padding:10px!important;box-shadow:var(--pt-shadow-hover)!important}
}

/* ระยะห่างของ section ให้เท่ากันทั้งเว็บ */
body.egs-kids-theme:not(.game-player-body) .section{padding-block:clamp(36px,6vw,72px)}
body.egs-kids-theme .container{width:min(calc(100% - 32px),1240px)}

/* การ์ดเกม: ปกสัดส่วนเดียวกันทุกใบ ไม่สูงล้นบนมือถือ */
body.egs-kids-theme:not(.game-player-body) .public-game-cover{aspect-ratio:16/10!important;height:auto!important;min-height:0!important;max-height:none!important;border-radius:22px!important;overflow:hidden}
body.egs-kids-theme:not(.game-player-body) .public-game-cover :is(img,svg,.egs-cover,.animated-cover){width:100%!important;height:100%!important;object-fit:cover}
body.egs-kids-theme:not(.game-player-body) .public-game-grid{gap:18px!important}

/* หน้าแรก: แผงหมวดหมู่ */
@media(max-width:650px){
  body.egs-kids-theme .plg-category-dock{display:flex!important;overflow-x:auto;scroll-snap-type:x mandatory;gap:10px!important;padding:12px!important;scrollbar-width:none}
  body.egs-kids-theme .plg-category-dock::-webkit-scrollbar{display:none}
  body.egs-kids-theme .plg-category-card{flex:0 0 108px;min-height:108px!important;padding:10px 6px!important;scroll-snap-align:start}
  body.egs-kids-theme .plg-category-card small{display:none}
  body.egs-kids-theme .plg-category-card strong{font-size:.86rem}
  /* แม่แบบเกมเลื่อนซ้าย-ขวา แทนการเรียงยาว */
  body.egs-kids-theme .plg-template-grid{display:flex!important;overflow-x:auto;scroll-snap-type:x mandatory;gap:14px!important;padding:4px 2px 14px;margin-inline:-16px;padding-inline:16px;scrollbar-width:none}
  body.egs-kids-theme .plg-template-grid::-webkit-scrollbar{display:none}
  body.egs-kids-theme .plg-template-grid>*{flex:0 0 78%;scroll-snap-align:start}
  body.egs-kids-theme .plg-step-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  body.egs-kids-theme .plg-step-grid article{padding:16px 12px!important}
  body.egs-kids-theme .plg-step-grid article span{font-size:1.8rem!important}
  body.egs-kids-theme .plg-step-grid article p{font-size:.82rem}
  body.egs-kids-theme .plg-hero-art{min-height:220px!important}
  body.egs-kids-theme .plg-quick-tools a{width:70px!important;min-height:64px!important}
  body.egs-kids-theme .plg-side-stack{grid-template-columns:1fr!important}
  body.egs-kids-theme .plg-tip-card{grid-template-columns:1fr 90px!important;min-height:0!important}
}
@media(min-width:651px) and (max-width:1024px){
  body.egs-kids-theme .plg-template-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.egs-kids-theme .plg-step-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
body.egs-kids-theme .template-card{border:0!important;border-radius:28px!important;box-shadow:var(--pt-shadow)!important;background:var(--pt-surface)!important}
body.egs-kids-theme .template-card:hover{box-shadow:var(--pt-shadow-hover)!important}
body.egs-kids-theme .template-preview{border-radius:22px!important}

/* หน้าเข้าร่วมห้องแข่ง: ท้องฟ้าพาสเทลและเนินหญ้าโทนเดียวกับธีม */
html body.egs-kids-theme .live-join-page{background:linear-gradient(180deg,#CFE7FF 0%,#EAF3FF 45%,var(--pt-ground) 100%)!important}
html body.egs-kids-theme .live-join-page:after{background:linear-gradient(180deg,#BDEBD2,#9BDDB8)!important}
html body.egs-kids-theme .live-join-card{border:0!important;border-radius:36px!important;background:var(--pt-surface)!important;box-shadow:0 24px 60px rgba(27,37,89,.14)!important}
html body.egs-kids-theme .live-join-card .eyebrow{background:var(--pt-peach-wash)!important;color:var(--pt-accent-text)!important}
html body.egs-kids-theme .live-join-card input{border:2px solid var(--pt-line)!important;border-radius:18px!important;background:#fff!important}
html body.egs-kids-theme .live-join-card input:focus{border-color:var(--pt-ink)!important;outline:none}

/* ตัวสร้างเกม: เปลี่ยนสีม่วงเดิมให้เข้าธีม */
html body.egs-kids-theme .creator-hero{border:0!important;border-radius:32px!important;background:var(--pt-surface)!important;box-shadow:var(--pt-shadow)!important}
html body.egs-kids-theme .creator-hero-icon{background:var(--pt-peach-wash)!important;box-shadow:none!important;border:0!important}
html body.egs-kids-theme :is(.creator-hero .eyebrow,.creator-hero>div>span:first-child){background:var(--pt-peach-wash)!important;color:var(--pt-accent-text)!important}
html body.egs-kids-theme .builder-step::before,html body.egs-kids-theme .builder-steps::before{background:var(--pt-line)!important}
html body.egs-kids-theme .builder-step span,html body.egs-kids-theme .builder-step b{box-shadow:none!important}
html body.egs-kids-theme .builder-step.active :is(span,b,i){background:var(--pt-ink)!important;color:#fff!important;border-color:var(--pt-ink)!important}
html body.egs-kids-theme .builder-step.active{color:var(--pt-ink)!important}
html body.egs-kids-theme .creator-section-number{background:var(--pt-ink)!important;color:#fff!important;box-shadow:none!important}
html body.egs-kids-theme .creator-quick-start>*{border:0!important;border-radius:24px!important;box-shadow:none!important}
html body.egs-kids-theme .creator-quick-start>*:first-child{background:var(--pt-mint-wash)!important}
html body.egs-kids-theme .creator-quick-start>*:last-child{background:var(--pt-indigo-wash)!important}
html body.egs-kids-theme .creator-catalog-tools button,html body.egs-kids-theme .creator-catalog-tools .chip{border-radius:999px!important;border:0!important;background:var(--pt-surface)!important;color:var(--pt-ink)!important;box-shadow:none!important}
html body.egs-kids-theme .creator-catalog-tools :is(button.active,button.is-active,button[aria-pressed="true"]){background:var(--pt-ink)!important;color:#fff!important}
html body.egs-kids-theme .creator-search input{border:2px solid var(--pt-line)!important;border-radius:999px!important}
html body.egs-kids-theme .creator-method-card{border:2px solid transparent!important;border-radius:26px!important;background:var(--pt-surface)!important;box-shadow:var(--pt-shadow)!important}
html body.egs-kids-theme .creator-method-card:hover{border-color:var(--pt-line)!important}
html body.egs-kids-theme .creator-method-choice:checked+.creator-method-card,
html body.egs-kids-theme .creator-method-card:has(input:checked),
html body.egs-kids-theme .creator-method-card.is-selected{border-color:var(--pt-accent)!important;box-shadow:0 0 0 4px var(--pt-peach-wash)!important}
html body.egs-kids-theme .ai-set-cta,html body.egs-kids-theme .creator-ai-cta{border:2px dashed var(--pt-line)!important;border-radius:24px!important;background:var(--pt-surface)!important}
html body.egs-kids-theme :is(.ai-set-cta,.creator-ai-cta) :is(a,.btn){background:var(--pt-accent)!important;color:var(--pt-on-accent)!important;border:0!important;box-shadow:none!important}
html body.egs-kids-theme .field :is(input,select,textarea),html body.egs-kids-theme .panel :is(input,select,textarea){border-radius:14px;border-color:var(--pt-line)}

/* ตารางเกมของฉัน: บนมือถือเปลี่ยนเป็นการ์ดทีละเกม */
@media(max-width:760px){
  html body.egs-kids-theme .my-games-table thead{display:none}
  html body.egs-kids-theme .my-games-table,html body.egs-kids-theme .my-games-table tbody{display:block;width:100%}
  html body.egs-kids-theme .my-games-table tr{display:grid;grid-template-columns:1fr auto;gap:8px 10px;padding:14px;margin-bottom:12px;border-radius:22px;background:var(--pt-ground)}
  html body.egs-kids-theme .my-games-table td{display:block;padding:0!important;border:0!important;min-width:0}
  html body.egs-kids-theme .my-games-table td:first-child{grid-column:1/-1}
  html body.egs-kids-theme .my-games-table td:last-child{grid-column:1/-1}
  html body.egs-kids-theme .my-games-table td:last-child :is(div,form){display:flex;flex-wrap:wrap;gap:6px}
  html body.egs-kids-theme .table-wrap{overflow:visible}
}

/* หน้ารวมเกม/ตัวกรอง บนมือถือ */
@media(max-width:760px){
  html body.egs-kids-theme .catalog-filter{grid-template-columns:1fr 1fr!important;padding:16px!important;gap:10px!important}
  html body.egs-kids-theme .catalog-filter .catalog-search,html body.egs-kids-theme .catalog-filter-actions{grid-column:1/-1}
  html body.egs-kids-theme .public-category-chips{flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;padding-bottom:6px}
  html body.egs-kids-theme .public-category-chips a{flex:none}
}

/* หน้าตัวอย่างเกม */
html body.egs-kids-theme .demo-hand{position:static!important;transform:none!important}
@media(max-width:760px){html body.egs-kids-theme .demo-grid{grid-template-columns:1fr 1fr!important;gap:12px!important}}
@media(max-width:430px){html body.egs-kids-theme .demo-grid{grid-template-columns:1fr!important}}

/* แท็บเล็ต: เมนูบนไม่อัดแน่น */
@media(min-width:761px) and (max-width:1100px){
  html body.egs-play-learn-grow:not(.game-player-body) .site-nav>a.game-nav-item{padding:7px 9px!important;font-size:.82rem!important}
  body.egs-kids-theme .brand-tagline{display:none}
}

/* ตัวแปรสีของหน้าตัวสร้างเกม ให้ใช้โทนธีม */
html body.egs-kids-theme .creator-wizard,html body.egs-kids-theme .creator-builder-page,html body.egs-kids-theme .dashboard-content{
  --creator-ink:var(--pt-ink);--creator-muted:var(--pt-muted);--creator-violet:var(--pt-ink);--creator-violet-dark:#0D1640;
  --creator-line:var(--pt-line);--creator-surface:var(--pt-surface);--creator-shadow:var(--pt-shadow);
}
html body.egs-kids-theme .creator-progress li:not(:last-child)::after{background:var(--pt-line)!important}
html body.egs-kids-theme .creator-progress b{border-color:var(--pt-line)!important;box-shadow:none!important}
html body.egs-kids-theme .creator-progress .is-active b{background:var(--pt-ink)!important;border-color:var(--pt-ink)!important;color:#fff!important}
html body.egs-kids-theme .creator-progress .is-complete b{background:var(--pt-mint)!important;border-color:var(--pt-mint)!important;color:#fff!important}
html body.egs-kids-theme .creator-progress .is-active{color:var(--pt-ink)!important}
html body.egs-kids-theme .creator-catalog-tools .chip{border-radius:999px!important;border:2px solid var(--pt-line)!important;background:var(--pt-surface)!important;color:var(--pt-ink)!important;box-shadow:none!important}
html body.egs-kids-theme .creator-catalog-tools .chip.active{background:var(--pt-ink)!important;border-color:var(--pt-ink)!important;color:#fff!important}
/* การ์ดเคล็ดลับ: ภาพไม่ทับตัวหนังสือ */
html body.egs-kids-theme .plg-tip-card{grid-template-columns:minmax(0,1fr) 110px!important;align-items:end;gap:10px}
html body.egs-kids-theme .plg-tip-card>img{width:110px!important;max-width:110px!important;height:auto!important;max-height:170px;object-fit:contain;justify-self:end;border-radius:18px}
html body.egs-kids-theme .plg-tip-copy{min-width:0}
html body.egs-kids-theme .ai-set-cta strong{background:var(--pt-accent)!important;color:var(--pt-on-accent)!important}
html body.egs-kids-theme .ai-set-cta:hover{border-color:var(--pt-accent)!important}
html body.egs-kids-theme .creator-quick-start :is(strong,b,h3){color:var(--pt-ink)!important}
/* ปุ่มเล็กในตาราง/ฟอร์ม ไม่ใช้สีม่วงเดิม */
html body.egs-kids-theme:not(.game-player-body) .btn-sm{border-radius:999px!important}
html body.egs-kids-theme:not(.game-player-body) .my-games-table .btn-outline{background:var(--pt-ink)!important;color:#fff!important;border-color:var(--pt-ink)!important}
html body.egs-kids-theme:not(.game-player-body) .my-games-table select{border:2px solid var(--pt-line)!important;border-radius:12px!important;background:#fff!important}
html body.egs-kids-theme:not(.game-player-body) .my-games-table a{color:var(--pt-ink)}
/* การ์ดเกมตัวอย่าง: 5 เกมเรียงแถวเดียวบนจอกว้าง */
@media(min-width:1180px){html body.egs-kids-theme .demo-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}}
