/*
 * EducTools Game Player Balance v1.23.3
 * Compact feedback modal, balanced spacing and responsive player proportions.
 */

body.egs-kids-theme.game-player-body:not(.ar-framed):not(.ar-immersive) .play-page{
  min-height:100dvh;
  padding:clamp(8px,1.6vw,20px)!important;
}
body.egs-kids-theme.game-player-body:not(.ar-framed):not(.ar-immersive) .play-shell{
  width:min(1180px,100%)!important;
  min-height:calc(100dvh - clamp(16px,3.2vw,40px))!important;
  gap:0;
}
body.egs-kids-theme.game-player-body:not(.ar-framed):not(.ar-immersive) .play-topbar{
  display:flex!important;
  min-height:auto!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:clamp(10px,2vw,20px)!important;
  padding:clamp(11px,1.6vw,17px)!important;
}
body.egs-kids-theme.game-player-body .play-title-area{
  min-width:0;
 /* flex:1 1 410px;*/ 
}
body.egs-kids-theme.game-player-body .play-title-copy{
  min-width:0;
}
body.egs-kids-theme.game-player-body .play-title-copy>b{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.egs-kids-theme.game-player-body .play-top-actions{
  max-width:min(100%,620px);
  flex:0 1 auto;
  justify-content:flex-end;
  gap:8px!important;
}
body.egs-kids-theme.game-player-body .play-action{
  min-height:40px!important;
  padding:8px 12px!important;
  line-height:1.15;
}
body.egs-kids-theme.game-player-body .play-subbar{
  display:flex!important;
  min-height:44px;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:9px 15px!important;
}
body.egs-kids-theme.game-player-body .play-subbar>span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.egs-kids-theme.game-player-body:not(.ar-framed):not(.ar-immersive) .play-stage-wrap{
  min-height:clamp(520px,68dvh,760px)!important;
}
body.egs-kids-theme.game-player-body:not(.ar-framed):not(.ar-immersive) .play-stage-wrap>.game-mount{
  min-height:clamp(520px,68dvh,760px)!important;
  padding:clamp(16px,2.7vw,30px)!important;
}
body.egs-kids-theme.game-player-body .standard-game,
body.egs-kids-theme.game-player-body .wide-game{
  width:min(920px,100%)!important;
  padding:clamp(12px,2vw,24px)!important;
}
body.egs-kids-theme.game-player-body .game-hud{
  width:min(900px,100%);
  margin:0 auto clamp(14px,2vw,22px);
}
body.egs-kids-theme.game-player-body .question-card{
  width:min(880px,100%);
  margin-inline:auto;
  padding:clamp(16px,2.4vw,26px)!important;
}
body.egs-kids-theme.game-player-body .question-card h2{
  margin:7px auto clamp(14px,2.2vw,22px)!important;
  line-height:1.28!important;
}
body.egs-kids-theme.game-player-body .answer-grid,
body.egs-kids-theme.game-player-body .kids-answer-grid,
body.egs-kids-theme.game-player-body .tf-grid{
  width:min(840px,100%);
  margin-inline:auto;
  gap:clamp(10px,1.5vw,15px)!important;
}
body.egs-kids-theme.game-player-body .answer-button,
body.egs-kids-theme.game-player-body .kids-answer,
body.egs-kids-theme.game-player-body .tf-grid button{
  min-height:clamp(60px,7vw,74px)!important;
  padding:clamp(11px,1.6vw,15px)!important;
}
body.egs-kids-theme.game-player-body .matching-board,
body.egs-kids-theme.game-player-body .memory-board,
body.egs-kids-theme.game-player-body .sentence-zone,
body.egs-kids-theme.game-player-body .sentence-actions{
  width:min(940px,100%);
  margin-inline:auto;
}
body.egs-kids-theme.game-player-body .game-intro{
  width:min(560px,100%)!important;
  padding:clamp(24px,3.4vw,38px)!important;
}
body.egs-kids-theme.game-player-body .result-screen{
  width:min(720px,100%)!important;
  padding:clamp(22px,3.4vw,38px)!important;
}
body.egs-kids-theme.game-player-body .play-member-strip{
  gap:12px!important;
  padding:13px 16px!important;
}

/* Smaller, clearer answer feedback popup. */
.answer-celebration-layer{
  padding:clamp(12px,3vw,26px)!important;
  background:rgba(35,23,64,.27)!important;
  backdrop-filter:blur(4px)!important;
  -webkit-backdrop-filter:blur(4px)!important;
}
.answer-celebration-card{
  width:min(510px,calc(100vw - 26px))!important;
  max-height:min(76svh,620px)!important;
  padding:clamp(19px,3.2vw,30px)!important;
  border-width:4px!important;
  border-radius:clamp(23px,4vw,34px)!important;
  box-shadow:0 16px 0 color-mix(in srgb,var(--celebration-accent) 72%,#193b2c),0 30px 64px rgba(31,22,58,.36),inset 0 0 0 2px rgba(255,255,255,.58)!important;
}
.answer-celebration-card.is-wrong,
.answer-celebration-card.is-timeout{
  box-shadow:0 15px 0 color-mix(in srgb,var(--celebration-accent) 72%,#5d2131),0 30px 64px rgba(55,25,52,.34),inset 0 0 0 2px rgba(255,255,255,.62)!important;
}
.answer-celebration-icon{
  width:clamp(70px,13vw,94px)!important;
  height:clamp(70px,13vw,94px)!important;
  margin:-2px auto 7px!important;
  border-width:4px!important;
  font-size:clamp(2.55rem,6.5vw,3.8rem)!important;
}
.answer-celebration-kicker{
  padding:5px 11px!important;
  font-size:.76rem!important;
}
.answer-celebration-card h2{
  margin:7px 0 3px!important;
  font-size:clamp(1.55rem,4.8vw,2.5rem)!important;
}
.answer-celebration-message{
  margin-top:5px!important;
  font-size:clamp(.98rem,2.4vw,1.18rem)!important;
  line-height:1.42!important;
}
.answer-celebration-streak{
  margin-top:9px!important;
  padding:6px 11px!important;
  font-size:.84rem!important;
}
.answer-celebration-explanation{
  gap:3px!important;
  margin-top:12px!important;
  padding:11px 13px!important;
  border-width:2px!important;
  border-radius:16px!important;
}
.answer-celebration-explanation b{font-size:.92rem!important}
.answer-celebration-explanation span{
  font-size:clamp(.9rem,2vw,1.02rem)!important;
  line-height:1.45!important;
}
.answer-celebration-next{
  gap:5px!important;
  margin-top:12px!important;
  font-size:.8rem!important;
}
.answer-celebration-next i{
  width:min(280px,100%)!important;
  height:7px!important;
}
.answer-celebration-layer.is-compact .answer-celebration-card{
  width:min(440px,calc(100vw - 22px))!important;
  padding:17px 20px!important;
}
.answer-celebration-layer.is-compact .answer-celebration-icon{
  width:68px!important;
  height:68px!important;
  font-size:2.7rem!important;
}
.answer-celebration-layer.is-compact .answer-celebration-card h2{
  font-size:clamp(1.4rem,4.5vw,2rem)!important;
}

@media(max-width:900px){
  body.egs-kids-theme.game-player-body .play-topbar{
    align-items:flex-start!important;
    flex-direction:column!important;
  }
  body.egs-kids-theme.game-player-body .play-title-area,
  body.egs-kids-theme.game-player-body .play-top-actions{
    width:100%;
    max-width:none;
  }
  body.egs-kids-theme.game-player-body .play-top-actions{
    justify-content:flex-start;
    overflow-x:auto;
    padding-bottom:3px;
    flex-wrap:nowrap!important;
    scrollbar-width:thin;
  }
  body.egs-kids-theme.game-player-body .play-action{flex:0 0 auto}
  body.egs-kids-theme.game-player-body .play-subbar{align-items:flex-start;flex-direction:column}
  body.egs-kids-theme.game-player-body .play-subbar>span{width:100%;white-space:normal}
  body.egs-kids-theme.game-player-body:not(.ar-framed):not(.ar-immersive) .play-stage-wrap,
  body.egs-kids-theme.game-player-body:not(.ar-framed):not(.ar-immersive) .play-stage-wrap>.game-mount{
    min-height:calc(100dvh - 250px)!important;
  }
}
@media(max-width:620px){
  body.egs-kids-theme.game-player-body:not(.ar-framed):not(.ar-immersive) .play-page{padding:6px!important}
  body.egs-kids-theme.game-player-body .play-title-copy>b{white-space:normal;line-height:1.32}
  body.egs-kids-theme.game-player-body .play-meta-chips{display:none!important}
  body.egs-kids-theme.game-player-body .play-stage-wrap>.game-mount{padding:12px!important}
  body.egs-kids-theme.game-player-body .standard-game,
  body.egs-kids-theme.game-player-body .wide-game{padding:6px!important}
  body.egs-kids-theme.game-player-body .question-card{padding:14px 12px!important}
  body.egs-kids-theme.game-player-body .answer-grid,
  body.egs-kids-theme.game-player-body .kids-answer-grid,
  body.egs-kids-theme.game-player-body .tf-grid{grid-template-columns:1fr!important}
  body.egs-kids-theme.game-player-body .answer-button,
  body.egs-kids-theme.game-player-body .kids-answer,
  body.egs-kids-theme.game-player-body .tf-grid button{min-height:58px!important}
  body.egs-kids-theme.game-player-body .play-member-strip{align-items:stretch!important;flex-direction:column!important}
  .answer-celebration-layer{padding:10px!important}
  .answer-celebration-card{max-height:82svh!important;padding:17px 14px!important;border-radius:24px!important}
  .answer-celebration-icon{width:66px!important;height:66px!important;font-size:2.55rem!important}
  .answer-celebration-stars i{font-size:1.35rem!important}
}
@media(max-height:650px) and (orientation:landscape){
  .answer-celebration-card{max-height:92svh!important;padding:14px 18px!important}
  .answer-celebration-icon{width:58px!important;height:58px!important;font-size:2.25rem!important}
  .answer-celebration-card h2{font-size:1.55rem!important}
  .answer-celebration-explanation{margin-top:8px!important;padding:8px 10px!important}
  .answer-celebration-next{margin-top:8px!important}
}

/* v1.24.1: AR answer feedback hard contrast fix.
   Scope by the real AR feedback host instead of relying on transient body classes. */
/* AR feedback host must not create a filtered containing block around the result card. */
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast{filter:none!important}
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-layer{
  background:rgba(9,12,24,.72)!important;
  backdrop-filter:blur(9px) saturate(.85)!important;
  -webkit-backdrop-filter:blur(9px) saturate(.85)!important;
}
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-card{
  background:#fff!important;
  background-image:none!important;
  color:#201832!important;
  border:5px solid #fff!important;
  outline:4px solid #7b61ff!important;
  box-shadow:0 0 0 100vmax rgba(9,12,24,.48),0 22px 0 rgba(46,35,91,.38),0 36px 90px rgba(0,0,0,.68),inset 0 0 0 2px rgba(107,86,190,.10)!important;
  opacity:1!important;
  filter:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  overflow-x:hidden!important;
}
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-card.is-correct{
  background:#f2fff6!important;
  outline-color:#20bd6b!important;
}
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-card.is-wrong{
  background:#fff3f6!important;
  outline-color:#ef476f!important;
}
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-card.is-timeout{
  background:#fff9e9!important;
  outline-color:#f0a62d!important;
}
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-shine{display:none!important}
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-kicker{
  background:#2c2442!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  border:1px solid rgba(255,255,255,.22)!important;
  text-shadow:none!important;
  opacity:1!important;
}
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-card.is-correct .answer-celebration-kicker{background:#147a48!important}
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-card.is-wrong .answer-celebration-kicker{background:#a72f4b!important}
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-card.is-timeout .answer-celebration-kicker{background:#8b5a0a!important}
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-card h2,
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-message{
  color:#201832!important;
  -webkit-text-fill-color:#201832!important;
  text-shadow:none!important;
  opacity:1!important;
}
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-message{font-weight:900!important}
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-explanation{
  background:#f4f0ff!important;
  background-image:none!important;
  color:#2b2143!important;
  border:2px solid #c9bcff!important;
  box-shadow:0 8px 22px rgba(46,35,91,.16)!important;
  opacity:1!important;
}
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-explanation b,
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-explanation span{
  color:#2b2143!important;
  -webkit-text-fill-color:#2b2143!important;
  text-shadow:none!important;
  opacity:1!important;
}
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-next{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  background:#302747!important;
  border:1px solid rgba(255,255,255,.18)!important;
  border-radius:16px!important;
  padding:9px 12px!important;
  opacity:1!important;
}
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-next i{background:rgba(255,255,255,.28)!important}
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-next em{background:#ffd93d!important}
body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-stars i{filter:drop-shadow(0 2px 1px rgba(0,0,0,.28))}
@media(max-width:600px){
  body.egs-kids-theme.game-player-body.game-player-cute-v4117 .ar-feedback-toast .answer-celebration-card{width:min(450px,calc(100vw - 24px))!important;border-width:4px!important;outline-width:3px!important}
}

