/* K STELLA WAY RC131 — unified Instagram/YouTube WebView stabilization.
   Scope: question wizard light lock + seek safety shield only.
   The approved source video, timestamps, playback-rate formula, D1/admin/engine are unchanged. */

/* 1) Question wizard must remain the approved light design even when an Android in-app
      browser requests or forces a dark color scheme. */
body.questionMode,
body.questionMode .shell,
body.questionMode .topBrand,
body.questionMode #questionScreen,
body.questionMode #questionScreen .questionHero,
body.questionMode #questionScreen .questionBody,
body.questionMode #questionScreen .wizardNav,
body.questionMode #questionScreen .errorLine{
  background-color:#fff!important;
  color:#211f1b!important;
  color-scheme:only light!important;
  forced-color-adjust:none!important;
}
body.questionMode #questionScreen{
  background-image:linear-gradient(#fff,#fff)!important;
}
body.questionMode #questionScreen .questionHero:after{
  background:linear-gradient(transparent,#fff)!important;
}
body.questionMode #questionScreen .stepLine{background:#eee8dd!important}
body.questionMode #questionScreen .questionBody h2{color:#211f1b!important;-webkit-text-fill-color:#211f1b!important}
body.questionMode #questionScreen .questionBody>p{color:#78726b!important;-webkit-text-fill-color:#78726b!important}
body.questionMode #questionScreen .questionBody .kicker{color:#b37a2b!important;-webkit-text-fill-color:#b37a2b!important}
body.questionMode #questionScreen .examples{color:#9a9083!important;-webkit-text-fill-color:#9a9083!important}
body.questionMode #questionScreen .examples b{color:#b37d2d!important;-webkit-text-fill-color:#b37d2d!important}
body.questionMode #questionScreen .deepGuide{background:#fff!important;color:#7d766e!important;border-color:#efe8dc!important;-webkit-text-fill-color:#7d766e!important}
body.questionMode #questionScreen .deepGuide strong{color:#9f6b25!important;-webkit-text-fill-color:#9f6b25!important}
body.questionMode #questionScreen .storyText,
body.questionMode #questionScreen .priorityBtn,
body.questionMode #questionScreen .ghostBtn{
  background:#fff!important;
  background-color:#fff!important;
  background-image:linear-gradient(#fff,#fff)!important;
  color:#272521!important;
  -webkit-text-fill-color:#272521!important;
  border-color:#dfd8cc!important;
  color-scheme:only light!important;
  forced-color-adjust:none!important;
  filter:none!important;
}
body.questionMode #questionScreen .storyText{
  caret-color:#272521!important;
  box-shadow:none;
}
body.questionMode #questionScreen .storyText:focus{border-color:#d1a457!important;box-shadow:0 0 0 3px rgba(201,149,62,.10)!important}
body.questionMode #questionScreen .storyText::placeholder{color:#9b968f!important;-webkit-text-fill-color:#9b968f!important;opacity:1!important}
body.questionMode #questionScreen .priorityBtn.selected{background:#fff9ee!important;background-image:linear-gradient(#fff9ee,#fff9ee)!important;color:#8d5d17!important;-webkit-text-fill-color:#8d5d17!important;border-color:#ce9b48!important}
body.questionMode #questionScreen .primaryGold{color:#493318!important;-webkit-text-fill-color:#493318!important;forced-color-adjust:none!important}
body.questionMode .topBrand b{color:#a6752d!important;-webkit-text-fill-color:#a6752d!important}
body.questionMode .topBrand span{color:#9a9489!important;-webkit-text-fill-color:#9a9489!important}

@media (prefers-color-scheme:dark){
  body.questionMode,body.questionMode .shell,body.questionMode .topBrand,body.questionMode #questionScreen,
  body.questionMode #questionScreen .questionHero,body.questionMode #questionScreen .questionBody,body.questionMode #questionScreen .wizardNav{
    background-color:#fff!important;color:#211f1b!important;color-scheme:only light!important;
  }
}

/* 2) Seek shield: while an in-app WebView is seeking/recovering, keep the last approved
      forward-facing frame above the video. It fades only after the target frame is rendered.
      This prevents a failed seek from flashing the old back-facing 0–3s frames. */
#introFlowApp .sw-seek-shield{
  position:absolute;inset:0;z-index:5;width:100%;height:100%;object-fit:cover;
  opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .11s linear;
  transform:scale(1.002);transform-origin:50% 48%;
  background:#030711;
}
#introFlowApp .sw-seek-shield.on{opacity:1;visibility:visible}
#introFlowApp .sw-seek-shield.fade{opacity:0;visibility:visible}
@media(prefers-reduced-motion:reduce){#introFlowApp .sw-seek-shield{transition:none}}
