/* DEMO 10.107.9 — head-only Xiaoyin for pronunciation focus.
   Visual-only. Existing audio timing and live mouth animation remain unchanged. */

/* Pronunciation Xiaoyin now uses a direct <img src> path in index.html / JS.
   This avoids Safari/WebKit inconsistencies with CSS content:url() on <img>. */

/* Pronunciation guide: the face is the focal point, not character gestures. */
.new-xiaoyin-face{
  width:166px!important;
  height:166px!important;
  border-radius:50%!important;
  overflow:hidden!important;
  background:#eefaff!important;
  box-shadow:
    0 0 0 4px rgba(255,255,255,.92),
    0 0 0 7px rgba(119,205,220,.24),
    0 12px 30px rgba(66,115,103,.14)!important;
}
.new-xiaoyin-face .xiaoyin-face-img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center center!important;
  border-radius:50%!important;
  filter:saturate(.98) contrast(1.01)!important;
}

/* Keep the live mouth exactly over the photographed/illustrated mouth area.
   Only the lips animate; eyes/head remain calm. */
.new-xiaoyin-face .mouth-mask{
  top:64%!important;
  width:58px!important;
  height:34px!important;
  background:
    radial-gradient(ellipse at 50% 42%,rgba(255,248,242,.99) 0 58%,rgba(249,238,231,.98) 100%)!important;
  filter:blur(.15px);
}
.new-xiaoyin-face .cartoon-mouth{
  top:64%!important;
  width:64px!important;
  height:45px!important;
}

/* Main articulation panel: larger face, less surrounding visual noise. */
.mouth-animation #guideFace{
  min-height:184px!important;
  padding-top:8px!important;
  align-items:center!important;
}
.mouth-animation #guideFace .new-xiaoyin-face{
  width:174px!important;
  height:174px!important;
}
.mouth-animation #guideFace .new-xiaoyin-face .mouth-mask{
  top:64%!important;
  width:61px!important;
  height:35px!important;
}
.mouth-animation #guideFace .new-xiaoyin-face .cartoon-mouth{
  top:64%!important;
  width:67px!important;
  height:47px!important;
}

/* Small speaking popup: still large enough to see lip shape clearly. */
#popFace .new-xiaoyin-face{
  width:106px!important;
  height:106px!important;
}
#popFace .new-xiaoyin-face .mouth-mask{
  top:64%!important;
  width:38px!important;
  height:22px!important;
}
#popFace .new-xiaoyin-face .cartoon-mouth{
  top:64%!important;
  width:43px!important;
  height:31px!important;
}

/* Tiny title avatar stays quiet and secondary. */
#mouthPop .mouth-title-icon{
  width:34px!important;
  height:34px!important;
  border-radius:50%!important;
  object-fit:cover!important;
  object-position:center!important;
  box-shadow:0 2px 8px rgba(65,110,94,.16)!important;
}

/* Keep the popup compact enough for phones despite the larger mouth-focused avatar. */
#mouthPop .mouth-pop-main{
  align-items:center!important;
}
@media(max-width:390px){
  .mouth-animation #guideFace{
    min-height:168px!important;
  }
  .mouth-animation #guideFace .new-xiaoyin-face{
    width:158px!important;
    height:158px!important;
  }
  .mouth-animation #guideFace .new-xiaoyin-face .mouth-mask{
    width:56px!important;height:32px!important;
  }
  .mouth-animation #guideFace .new-xiaoyin-face .cartoon-mouth{
    width:62px!important;height:43px!important;
  }
  #popFace .new-xiaoyin-face{
    width:98px!important;height:98px!important;
  }
}

/* No decorative body/hand motion in pronunciation mode. */
.new-xiaoyin-face{
  animation:none!important;
  transform:none!important;
}
.new-xiaoyin-face .xiaoyin-face-img{
  animation:none!important;
  transform:none!important;
}

/* DEMO 10.107.13 — pronunciation panel visual refinement.
   Scope: visual only. No audio / timing / scoring / recording logic changes. */

/* Remove the heavy double-ring feeling and crop away the source artwork's
   decorative top/bottom edges. Keep only a very soft depth cue. */
.new-xiaoyin-face{
  border-radius:34px!important;
  background:transparent!important;
  box-shadow:0 8px 22px rgba(58,104,93,.10)!important;
  overflow:hidden!important;
}
.new-xiaoyin-face .xiaoyin-face-img{
  width:118%!important;
  height:118%!important;
  max-width:none!important;
  object-fit:cover!important;
  object-position:center 52%!important;
  margin:-9% 0 0 -9%!important;
  border-radius:0!important;
}

/* The title already has a small Xiaoyin icon, so the live mouth face sits on
   the right and the explanatory text gets the wider left column. */
#mouthPop .mouth-pop-main{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 112px!important;
  gap:10px!important;
  align-items:center!important;
}
#mouthPop .mouth-pop-info{
  order:1!important;
  min-width:0!important;
}
#mouthPop #popFace{
  order:2!important;
  min-width:0!important;
  width:112px!important;
  justify-self:end!important;
}
#mouthPop #popFace .new-xiaoyin-face{
  width:108px!important;
  height:108px!important;
  border-radius:30px!important;
}

/* Move the animated lips down to cover the artwork's own mouth instead of
   floating over the nose. Slightly reduce the overlay for a more natural fit. */
.new-xiaoyin-face .mouth-mask{
  top:73%!important;
  width:54px!important;
  height:38px!important;
}
.new-xiaoyin-face .cartoon-mouth{
  top:73%!important;
  width:58px!important;
  height:41px!important;
}
.mouth-animation #guideFace .new-xiaoyin-face .mouth-mask{
  top:73.5%!important;
  width:57px!important;
  height:40px!important;
}
.mouth-animation #guideFace .new-xiaoyin-face .cartoon-mouth{
  top:73.5%!important;
  width:61px!important;
  height:43px!important;
}
#popFace .new-xiaoyin-face .mouth-mask{
  top:72.5%!important;
  width:37px!important;
  height:26px!important;
}
#popFace .new-xiaoyin-face .cartoon-mouth{
  top:72.5%!important;
  width:40px!important;
  height:29px!important;
}

@media(max-width:390px){
  #mouthPop .mouth-pop-main{
    grid-template-columns:minmax(0,1fr) 98px!important;
    gap:7px!important;
  }
  #mouthPop #popFace{width:98px!important}
  #mouthPop #popFace .new-xiaoyin-face{width:94px!important;height:94px!important}
}
