/* V155.9: acotado a la WebView Android; no modifica PC, navegador Chrome ni la UI general del alumno. */
@media(max-width:767px){
 html.tk-android-webview .tk-otp-scene{
  position:relative!important;inset:auto!important;display:flex!important;
  min-height:100vh!important;min-height:100dvh!important;width:100%!important;
  padding:18px 12px 30px!important;overflow:visible!important;
  box-sizing:border-box!important;background:#f6f7fa!important;color:#202a34!important;
  align-items:flex-start!important;justify-content:center!important; color-scheme:light!important;
 }
 html.tk-android-webview .tk-otp-card{
  position:relative!important;margin:8px auto!important;flex:0 1 410px!important;
  min-width:0!important;width:100%!important;max-width:410px!important;
  max-height:none!important;overflow:visible!important;padding:28px 18px!important;
  border-radius:20px!important;border:1px solid #e2e5ed!important;
  background:#fff!important;color:#26323e!important;color-scheme:light!important;
 }
 html.tk-android-webview .tk-otp-digits{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;min-width:0!important}
 html.tk-android-webview .tk-otp-digit{
  min-width:0!important;width:100%!important;max-width:100%!important;
  height:60px!important;color:#1d2733!important;background:#f5f7f9!important;
  -webkit-text-fill-color:#1d2733!important;color-scheme:light!important;
 }
 html.tk-android-webview .tk-otp-digit:focus{background:#fff!important}
 html.tk-android-webview .tk-otp-card h1{color:#18222e!important}
 html.tk-android-webview .tk-otp-intro{color:#637180!important}
 html.tk-android-webview .tk-otp-label{color:#607080!important}
 html.tk-android-webview .tk-otp-primary{color:#fff!important;background:#17191f!important;-webkit-text-fill-color:#fff!important}
 html.tk-android-webview .tk-otp-primary:disabled{background:#a5acb4!important}
 html.tk-android-webview .tk-v1385-search .tk-v78-search-panel:not([hidden]){
  position:fixed!important;top:58px!important;bottom:auto!important;left:12px!important;
  right:12px!important;width:calc(100vw - 24px)!important;max-width:calc(100vw - 24px)!important;
  min-width:0!important;max-height:65vh!important;max-height:65dvh!important;
  box-sizing:border-box!important;transform:none!important;background:#fff!important;
  color:#242936!important;color-scheme:light!important;overflow-y:auto!important;
  z-index:10010!important;
 }
 html.tk-android-webview .tk-v1385-search .tk-v78-search-panel form{
  display:grid!important;grid-template-columns:minmax(0,1fr) 45px!important;gap:8px!important;
  width:100%!important;min-width:0!important;
 }
 html.tk-android-webview .tk-v1385-search .tk-v78-search-panel input{
  width:100%!important;min-width:0!important;max-width:100%!important;
  color:#1b2330!important;background:#fff!important;-webkit-text-fill-color:#1b2330!important;
  font:400 16px/1.4 system-ui,sans-serif!important;color-scheme:light!important;
 }
 html.tk-android-webview .tk-v1385-search .tk-v78-search-panel form button{
  display:grid!important;place-items:center!important;height:51px!important;
  background:#16181c!important;color:#fff!important;-webkit-text-fill-color:#fff!important;
 }
}

/* V155.10: buscador del Dashboard movido al body por header-search-v78.js.
   V155.9 sólo apuntaba al panel anidado en .tk-v1385-search, que deja
   de existir cuando el buscador está abierto. Aplicar a la versión separada. */
@media(max-width:767px){
 html.tk-android-webview body > .tk-v1388-detached-panel.tk-v78-search-panel:not([hidden]){
  position:fixed!important;
  inset:auto 12px auto 12px!important;
  top:var(--tk-wv-search-top,50px)!important;
  bottom:auto!important;
  left:12px!important;right:12px!important;
  width:auto!important;max-width:none!important;
  height:auto!important;min-height:0!important;
  max-height:var(--tk-wv-search-max-height,65dvh)!important;
  padding:18px!important;box-sizing:border-box!important;
  overflow-y:auto!important;overscroll-behavior:contain;
  display:block!important;visibility:visible!important;opacity:1!important;
  transform:none!important;filter:none!important;
  background:#fff!important;color:#17202b!important;color-scheme:light!important;
  border:1px solid #dce2ea!important;border-radius:16px!important;
  box-shadow:0 14px 44px rgba(0,0,0,.30)!important;
  z-index:10012!important;pointer-events:auto!important;
 }
 html.tk-android-webview body > .tk-v1388-detached-panel.tk-v78-search-panel form{
  display:grid!important;grid-template-columns:minmax(0,1fr) 49px!important;
  align-items:center!important;gap:10px!important;width:100%!important;
  height:auto!important;min-width:0!important;
 }
 html.tk-android-webview body > .tk-v1388-detached-panel.tk-v78-search-panel label{
  display:block!important;grid-column:1 / -1!important;
  margin:0 0 3px!important;font:750 16px/1.3 system-ui,sans-serif!important;
  color:#1d2530!important;visibility:visible!important;
 }
 html.tk-android-webview body > .tk-v1388-detached-panel.tk-v78-search-panel input{
  grid-column:1!important;display:block!important;min-width:0!important;
  width:100%!important;height:50px!important;padding:0 13px!important;
  font:400 16px/1.3 system-ui,sans-serif!important;
  background:#fff!important;color:#17202b!important;-webkit-text-fill-color:#17202b!important;
  border:1px solid #bfc8d3!important;border-radius:11px!important;
 }
 html.tk-android-webview body > .tk-v1388-detached-panel.tk-v78-search-panel form button{
  grid-column:2!important;display:grid!important;place-items:center!important;
  height:50px!important;min-width:0!important;border-radius:11px!important;
  background:#17191f!important;color:#fff!important;-webkit-text-fill-color:#fff!important;
 }
 html.tk-android-webview body > .tk-v1388-detached-panel.tk-v78-search-panel .tk-v78-search-status,
 html.tk-android-webview body > .tk-v1388-detached-panel.tk-v78-search-panel .tk-v78-search-all{
  display:block!important;visibility:visible!important;opacity:1!important;
  height:auto!important;color:#647181!important;white-space:normal!important;
  max-width:100%!important;overflow-wrap:anywhere!important;
 }
 html.tk-android-webview body > .tk-v1388-detached-panel.tk-v78-search-panel .tk-v78-search-all{
  color:#1d2530!important;font-weight:700!important;
 }
}

/* V155.16: modales de la aplicación Android. No afectan Chrome, Dia ni PC.
   Evitar composiciones transform/backdrop de WebView que dejan una línea horizontal. */
html.tk-android-webview .tk-v140-avatar-overlay:not([hidden]){
  display:flex!important;align-items:center!important;justify-content:center!important;
  position:fixed!important;inset:0!important;z-index:2147482000!important;
  padding:16px!important;background:rgba(11,14,22,.80)!important;
  -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
  opacity:1!important;visibility:visible!important;transform:none!important;
}
html.tk-android-webview .tk-v140-avatar-overlay:not([hidden]) .tk-v140-avatar-dialog{
  display:flex!important;flex-direction:column!important;position:relative!important;
  flex:0 1 440px!important;width:100%!important;max-width:440px!important;
  height:auto!important;min-height:min(430px,calc(100vh - 56px))!important;
  max-height:calc(100vh - 48px)!important;max-height:calc(100dvh - 48px)!important;
  margin:0 auto!important;padding:0!important;background:#fff!important;color:#191b26!important;
  border-radius:20px!important;overflow:hidden!important;opacity:1!important;
  visibility:visible!important;transform:none!important;-webkit-transform:none!important;
  box-shadow:0 18px 52px rgba(0,0,0,.30)!important;
}
html.tk-android-webview .tk-v140-avatar-overlay:not([hidden]) .tk-v141-avatar-picker-scroll{
  display:block!important;flex:1 1 auto!important;min-height:130px!important;overflow-y:auto!important;
}
html.tk-android-webview .tk-v140-avatar-overlay:not([hidden]) .tk-v140-avatar-dialog header,
html.tk-android-webview .tk-v140-avatar-overlay:not([hidden]) .tk-v140-avatar-footer{flex:0 0 auto!important}
html.tk-android-webview body > .tk-notification-popover.tk-webview-note-dialog{
  position:fixed!important;z-index:2147481000!important;
  top:calc(76px + env(safe-area-inset-top,0px))!important;
  left:12px!important;right:12px!important;width:auto!important;max-width:480px!important;
  margin:0 auto!important;max-height:calc(100vh - 160px)!important;
  max-height:calc(100dvh - 160px)!important;min-height:180px!important;
  display:flex!important;flex-direction:column!important;
  background:#20242c!important;color:#f6f7fb!important;border-radius:18px!important;
  box-shadow:0 18px 50px rgba(0,0,0,.40)!important;
  opacity:1!important;visibility:visible!important;transform:none!important;overflow:hidden!important;
  --note-bg:#20242c;--note-panel:#292e39;--note-ink:#f6f7fb;
  --note-sub:#b3bed0;--note-border:#414958;--note-accent:#a995ff;
  --note-unread-bg:#302842;--note-unread-hover:#39304c;
}
html.tk-android-webview[data-tk-student-theme=light] body > .tk-notification-popover.tk-webview-note-dialog,
html.tk-android-webview[data-tk-instructor-theme=light] body > .tk-notification-popover.tk-webview-note-dialog{
 background:#fff!important;color:#181b32!important;
 --note-bg:#fff;--note-panel:#f5f6fa;--note-ink:#181b32;
 --note-sub:#65748e;--note-border:#dce3ef;--note-accent:#4b22f4;
 --note-unread-bg:#f1eeff;--note-unread-hover:#eae5ff;
}
html.tk-android-webview body > .tk-notification-popover.tk-webview-note-dialog[hidden]{display:none!important}
html.tk-android-webview body > .tk-notification-popover.tk-webview-note-dialog .tk-notification-items{
  flex:1 1 auto!important;min-height:90px!important;overflow-y:auto!important;
}
html.tk-android-webview body > .tk-notification-popover.tk-webview-note-dialog header,
html.tk-android-webview body > .tk-notification-popover.tk-webview-note-dialog footer{flex-shrink:0!important}

/* V155.17: avatar picker portalled into body, preventing fixed containment by mobile tab transforms. */
html.tk-android-webview body > .tk-v140-avatar-overlay:not([hidden]){display:flex!important;position:fixed!important;inset:0!important;overflow:hidden!important;z-index:2147482000!important;min-height:100vh!important;min-height:100dvh!important;align-items:center!important;justify-content:center!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
html.tk-android-webview body > .tk-v140-avatar-overlay:not([hidden]) .tk-v140-avatar-dialog{width:min(440px,100%)!important;max-width:100%!important;min-height:min(480px,calc(100dvh - 32px))!important;max-height:calc(100dvh - 32px)!important;transform:none!important;-webkit-transform:none!important;opacity:1!important;overflow:hidden!important;}
html.tk-android-webview body > .tk-v140-avatar-overlay:not([hidden]) .tk-v141-avatar-picker-scroll{overflow-y:auto!important;touch-action:pan-y!important;-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain;}
/* Notifications: 3+ visible rows, with independent touch scrolling. */
html.tk-android-webview body > .tk-notification-popover.tk-webview-note-dialog{top:calc(66px + env(safe-area-inset-top,0px))!important;max-height:calc(100dvh - 90px)!important;height:min(630px,calc(100dvh - 90px))!important;min-height:min(430px,calc(100dvh - 90px))!important;}
html.tk-android-webview body > .tk-notification-popover.tk-webview-note-dialog .tk-notification-items{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;touch-action:pan-y!important;overscroll-behavior-y:contain!important;-webkit-overflow-scrolling:touch;scrollbar-width:thin;}
html.tk-android-webview body > .tk-notification-popover.tk-webview-note-dialog .tk-notification-items::-webkit-scrollbar{width:4px}
html.tk-android-webview body > .tk-notification-popover.tk-webview-note-dialog .tk-notification-items::-webkit-scrollbar-thumb{background:var(--note-border);border-radius:8px}
@media(max-width:480px){html.tk-android-webview body > .tk-notification-popover.tk-webview-note-dialog{left:10px!important;right:10px!important;top:calc(62px + env(safe-area-inset-top,0px))!important;}}
