/* v178 — explicit result actions per capture context */
html:not([data-promptcam-coach-capture="true"]) #resultDialog:not(.pc177-circle-result-mode) #telegramCircleShareV177,
html:not([data-promptcam-coach-capture="true"]) #resultDialog:not(.pc177-circle-result-mode) #telegramCircleVideoShareV177,
html:not([data-promptcam-coach-capture="true"]) #resultDialog:not(.pc177-circle-result-mode) .pc177-share-note,
html:not([data-promptcam-coach-capture="true"]) #resultDialog:not(.pc177-circle-result-mode) #returnToTextButton,
html:not([data-promptcam-coach-capture="true"]) #resultDialog:not(.pc177-circle-result-mode) #resultAccessStatus{display:none!important}

#resultDialog.pc177-circle-result-mode #shareButton,
#resultDialog.pc177-circle-result-mode #downloadButton,
#resultDialog.pc177-circle-result-mode #returnToTextButton,
#resultDialog.pc177-circle-result-mode #telegramCircleVideoShareV177,
#resultDialog.pc177-circle-result-mode #shareFallback,
#resultDialog.pc177-circle-result-mode #resultAccessStatus,
#resultDialog.pc177-circle-result-mode .pc177-share-note{display:none!important}
#resultDialog.pc177-circle-result-mode #retryButton,
#resultDialog.pc177-circle-result-mode #telegramCircleShareV177{display:flex!important}
html:not([data-access="pro"]) #resultDialog.pc177-circle-result-mode #upgradeButton:not(.hidden){display:flex!important}

html[data-promptcam-coach-capture="true"] #resultDialog #downloadButton,
html[data-promptcam-coach-capture="true"] #resultDialog #upgradeButton,
html[data-promptcam-coach-capture="true"] #resultDialog #returnToTextButton,
html[data-promptcam-coach-capture="true"] #resultDialog #shareFallback,
html[data-promptcam-coach-capture="true"] #resultDialog #resultAccessStatus,
html[data-promptcam-coach-capture="true"] #resultDialog #telegramCircleShareV177,
html[data-promptcam-coach-capture="true"] #resultDialog #telegramCircleVideoShareV177,
html[data-promptcam-coach-capture="true"] #resultDialog .pc177-share-note,
html[data-promptcam-coach-capture="true"] #resultDialog .pc97-coach-send > :not(#sendCoachButtonV97){display:none!important}
html[data-promptcam-coach-capture="true"] #resultDialog #sendCoachButtonV97,
html[data-promptcam-coach-capture="true"] #resultDialog #shareButton,
html[data-promptcam-coach-capture="true"] #resultDialog #retryButton{display:flex!important}

/* v179: ordinary video must explicitly restore its own actions after Circle mode. */
html:not([data-promptcam-coach-capture="true"]) #resultDialog:not(.pc177-circle-result-mode) #shareButton,
html:not([data-promptcam-coach-capture="true"]) #resultDialog:not(.pc177-circle-result-mode) #retryButton{display:flex!important}
html:not([data-promptcam-coach-capture="true"]):not([data-access="pro"]) #resultDialog:not(.pc177-circle-result-mode) #upgradeButton:not(.hidden){display:flex!important}

/* v180 Coach review order: assignment -> save/share -> retake. */
html[data-promptcam-coach-capture="true"] #resultDialog #sendCoachButtonV97{order:1!important}
html[data-promptcam-coach-capture="true"] #resultDialog #shareButton{order:2!important}
html[data-promptcam-coach-capture="true"] #resultDialog #retryButton{order:3!important}
html[data-promptcam-coach-capture="true"] #resultDialog .pc97-coach-send{order:0!important}

/* Result card follows the Coach camera's safe top inset on mobile. */
html:not([data-promptcam-coach-capture="true"]) #resultDialog{
  position:fixed!important;
  inset:0!important;
  width:100%!important;
  max-width:none!important;
  height:100dvh!important;
  max-height:100dvh!important;
  margin:0!important;
  padding:calc(env(safe-area-inset-top,0px) + clamp(54px,7.2vh,78px)) 20px calc(env(safe-area-inset-bottom,0px) + 18px)!important;
  box-sizing:border-box!important;
  overflow:auto!important;
}
html:not([data-promptcam-coach-capture="true"]) #resultDialog .result-card{
  width:min(100%,520px)!important;
  max-width:520px!important;
  max-height:none!important;
  margin:0 auto!important;
  box-sizing:border-box!important;
}
@media(max-height:700px){
  html:not([data-promptcam-coach-capture="true"]) #resultDialog{
    padding-top:calc(env(safe-area-inset-top,0px) + 42px)!important;
  }
}
#resultDialog #upgradeButton.hidden,
html[data-access="pro"] #resultDialog #upgradeButton{display:none!important}

/* Compact Pro action on the video result screen. */
#resultDialog .pro-button{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:52px;
  padding:0 42px;
  border-radius:15px;
  background:linear-gradient(110deg,#15cce8 0%,#347cf5 46%,#8d43ec 100%);
  box-shadow:0 10px 26px rgba(63,73,222,.26),inset 0 1px 0 rgba(255,255,255,.16);
  text-align:center;
  font-size:14px;
  font-weight:800;
  cursor:pointer;
}
#resultDialog .pro-button svg{position:absolute;top:50%;width:21px;height:21px;transform:translateY(-50%)}
#resultDialog .pro-button-crown{left:17px;color:#ffe493}
#resultDialog .pro-button-chevron{right:16px;color:#fff}

/* Ordinary take: retain a visible path when Android WebView cannot share files. */
html:not([data-promptcam-coach-capture="true"]) #resultDialog:not(.pc177-circle-result-mode) #downloadButton{display:flex!important}
html:not([data-promptcam-coach-capture="true"]) #resultDialog:not(.pc177-circle-result-mode) #shareFallback:not(.hidden){display:block!important}
html[data-promptcam-coach-capture="true"] #resultDialog .result-actions>#downloadButton{display:flex!important}
html[data-promptcam-coach-capture="true"] #resultDialog #shareFallback:not(.hidden){display:block!important}

#resultDialog.pc177-circle-result-mode .pc177-share-note:not([hidden]){display:block!important}
