/* The same circle and left arrow control on every return action. */
html body :is(.back-link,.home-back,.lesson-back,#cancel).korys-back-button{display:inline-grid!important;place-items:center!important;box-sizing:border-box!important;flex:none!important;width:48px!important;min-width:48px!important;height:48px!important;min-height:48px!important;max-height:48px!important;padding:0!important;gap:0!important;border:0!important;border-radius:50%!important;background:transparent!important;color:var(--theme-accent,#701c32)!important;box-shadow:none!important;text-decoration:none!important;cursor:pointer}
html body .korys-back-button svg{display:block!important;width:32px!important;height:32px!important;max-width:none!important;pointer-events:none}
html body .korys-back-button:focus-visible{outline:3px solid var(--theme-accent,#701c32)!important;outline-offset:3px!important}

/* Keep the call-page colour theme consistent with its other controls. */
html[data-theme=color] body :is(.back-link,.home-back,.lesson-back,#cancel).korys-back-button{background:transparent!important;color:var(--theme-text,#fff8ed)!important}

/* User: circular back navigation stays at the bottom-left. */
html body :is(.back-link,.home-back,.lesson-back,#cancel).korys-back-button{position:fixed!important;left:max(8px,env(safe-area-inset-left))!important;right:auto!important;top:auto!important;bottom:max(12px,env(safe-area-inset-bottom))!important;transform:none!important;translate:none!important;z-index:60!important}

html body :is(.back-link,.home-back,.lesson-back,#cancel).korys-back-button{width:64px!important;min-width:64px!important;height:64px!important;min-height:64px!important;max-height:64px!important}
html body .korys-back-button svg{width:52px!important;height:52px!important}

/* Calls intentionally use the same control at viewport left middle. */
html[data-theme] body main.coach-page :is(a.back-link,a.home-back,button.back-link,button.home-back).korys-back-button{position:fixed!important;left:max(8px,env(safe-area-inset-left))!important;top:50%!important;bottom:auto!important;right:auto!important;transform:translateY(-50%)!important;translate:none!important;width:64px!important;height:64px!important;min-width:64px!important;min-height:64px!important;z-index:60!important}

html[data-theme] body a.korys-call-close{position:fixed!important;top:max(12px,env(safe-area-inset-top))!important;right:max(12px,env(safe-area-inset-right))!important;left:auto!important;bottom:auto!important;display:grid!important;place-items:center!important;width:48px!important;height:48px!important;border:1px solid var(--theme-border,#819bb5)!important;border-radius:50%!important;background:var(--theme-card,#ccdced)!important;color:var(--theme-text,#20374f)!important;z-index:61!important}
html body a.korys-call-close svg{width:24px!important;height:24px!important;pointer-events:none}

/* Latest owner position: active learning and call controls remain in the viewport middle. */
html[data-theme] body :is(dialog[open] .lesson-back,dialog[open] .dialog-fixed-back,.training-chrome .training-back).korys-back-button,html[data-theme] body .training-chrome .training-back{position:fixed!important;left:max(8px,env(safe-area-inset-left))!important;right:auto!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important;translate:none!important;z-index:100!important}

/* Owner correction: white circular navigation; only calls stay at left middle. */
html[data-theme] body .korys-back-button{color:#fff!important;background:transparent!important}
html[data-theme] body :is(dialog[open] .lesson-back,dialog[open] .dialog-fixed-back,.training-chrome .training-back){top:auto!important;bottom:max(12px,env(safe-area-inset-bottom))!important;transform:none!important}
html[data-theme] body :is(.lesson-close,.dialog-fixed-close,.training-close,.exercise-dialog-close,a.korys-call-close){background:#111318!important;color:#fff!important;border:1px solid #fff!important;box-sizing:border-box!important;overflow:visible!important;right:max(14px,env(safe-area-inset-right))!important;top:max(14px,env(safe-area-inset-top))!important;margin:0!important;border-radius:50%!important}
html[data-theme] body .korys-back-button svg circle{fill:#111318!important;stroke:#fff!important}
html[data-theme] body .korys-back-button svg path{stroke:#fff!important}

html[data-theme] body :is(.korys-home-close,.training-chrome>button:last-child){background:#111318!important;color:#fff!important;border:1px solid #fff!important;border-radius:50%!important;box-sizing:border-box!important;overflow:visible!important;right:max(14px,env(safe-area-inset-right))!important;top:max(14px,env(safe-area-inset-top))!important}
html[data-theme] body :is(.training-back,.korys-home-return) svg circle{fill:#111318!important;stroke:#fff!important}
html[data-theme] body :is(.training-back,.korys-home-return) svg path{stroke:#fff!important}
html[data-theme] body .video-mini-quiz .vq-next svg{color:#fff!important;fill:none!important;stroke:#fff!important}

html body button.topics-back{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:10px!important}
html body button.topics-back>svg{display:block!important;flex:none;width:28px!important;height:28px!important;pointer-events:none}

html body :is(#korys-menu-dialog button.korys-menu-close, .korys-home-close, .training-chrome>button:last-child, .lesson-close, .dialog-fixed-close, .training-close, .exercise-dialog-close, a.korys-call-close, button[aria-label="Sluiten"], button[aria-label="Close"]) {
  color: #183246 !important;
  background-color: #bfd8ef !important;
}
html body :is(#korys-menu-dialog button.korys-menu-close, .korys-home-close, .training-chrome>button:last-child, .lesson-close, .dialog-fixed-close, .training-close, .exercise-dialog-close, a.korys-call-close) svg path {
  stroke: #183246 !important;
}
