.exercise-coach-bridge{margin:24px 0 0;padding:22px 0 0;border-top:1px solid var(--theme-border,#819bb5);text-align:start}
.exercise-coach-bridge h4{font:750 1.25rem/1.3 system-ui,sans-serif;margin:14px 0 8px;color:var(--theme-text,#20374f)}
.exercise-coach-bridge p{font:400 .9rem/1.5 system-ui,sans-serif;margin:0 0 14px}
.exercise-coach-bridge select{box-sizing:border-box;width:100%;max-width:100%;min-height:44px;border:1px solid var(--theme-border,#819bb5);border-radius:12px;padding:10px 12px;background:var(--theme-bg,#dbe7f2);color:var(--theme-text,#20374f);font:600 1rem/1.3 system-ui,sans-serif;margin-bottom:12px}
.exercise-coach-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
html body .exercise-coach-actions button{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:7px;width:100%;min-height:50px;margin:0;padding:12px 8px;font:650 1rem/1.3 system-ui,sans-serif;white-space:normal;border:1px solid #f3ede2;border-radius:14px;background:#111318;color:#fff;cursor:pointer}
.exercise-coach-actions svg{width:20px;height:20px;flex:none;color:#25d366;fill:currentColor}
html[data-theme=mono] body .exercise-coach-actions svg{filter:none!important}
html body .exercise-coach-actions button:hover{background:#28303a}
.exercise-coach-actions button:focus-visible,.exercise-coach-chat :is(button,textarea):focus-visible{outline:3px solid var(--theme-accent,#284d70);outline-offset:3px}
html body dialog.exercise-coach-chat{box-sizing:border-box;width:min(560px,calc(100% - 24px));max-height:calc(100dvh - 32px);padding:20px;border:1px solid var(--theme-border,#819bb5);border-radius:20px;background:var(--theme-bg,#dbe7f2);color:var(--theme-text,#20374f);text-align:start}
.exercise-coach-chat::backdrop{background:#10182099}
.exercise-coach-chat header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.exercise-coach-chat h2{font:700 1.3rem/1.3 system-ui,sans-serif;margin:0}
.exercise-coach-chat header button{border:0;background:transparent;color:inherit;font-size:28px;min-height:44px;min-width:44px;cursor:pointer}
.exercise-coach-log{min-height:120px;max-height:45dvh;overflow:auto;margin:16px 0;display:flex;flex-direction:column;gap:10px}
.exercise-coach-message{max-width:90%;white-space:pre-wrap;overflow-wrap:anywhere;font:400 1rem/1.5 system-ui,sans-serif;padding:12px 14px;border-radius:14px;background:var(--theme-surface,#ccdced);color:var(--theme-text,#20374f)}
.exercise-coach-message.user{align-self:flex-end;background:var(--theme-action,#284d70);color:var(--primary-ink,#fff)}
.exercise-coach-chat textarea{box-sizing:border-box;display:block;width:100%;min-height:84px;padding:12px;border:1px solid var(--theme-border,#819bb5);border-radius:12px;background:var(--theme-surface,#ccdced);color:inherit;font:400 1rem/1.5 system-ui,sans-serif;resize:vertical}
.exercise-coach-chat form button{display:block;width:100%;min-height:46px;padding:10px;margin-top:10px;border:0;border-radius:12px;background:var(--theme-action,#284d70);color:var(--primary-ink,#fff);font:600 1rem system-ui,sans-serif;cursor:pointer}
.exercise-coach-chat button:disabled{opacity:.55;cursor:default}
.exercise-coach-chat .chat-status{font-size:.9rem;line-height:1.4;margin:10px 0}


/* Both coaches stay in view while the feedback above can scroll. */
html body .exercise-feedback-layout:not([hidden]){box-sizing:border-box;display:flex;flex-direction:column;height:var(--feedback-height,calc(80dvh - 48px));min-height:0!important;overflow:hidden}
.exercise-feedback-copy{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding-inline-end:4px;scrollbar-width:thin}
html body .exercise-coach-bridge{flex:none;margin:12px 0 0;padding:10px 0 0;text-align:start}
html body .exercise-coach-bridge h4{margin:0 0 3px;font-size:1.05rem;line-height:1.25}
html body .exercise-coach-bridge>p{margin:0 0 8px;font-size:.8rem;line-height:1.3}
.exercise-coach-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.exercise-coach-card{display:flex;flex-direction:column;align-items:center;min-width:0;gap:4px}
.exercise-coach-card>strong{font:650 .95rem/1.2 system-ui,sans-serif;color:inherit}
.exercise-coach-face{width:64px;height:64px;overflow:hidden;border-radius:50%;background:var(--theme-surface,#dbe7f2);flex:none}
html body .exercise-coach-face img{display:block!important;width:190%!important;max-width:none!important;height:auto!important;margin:0!important;transform:translate(-24%,-2%);filter:none!important}
html body .exercise-coach-face img[data-coach=leon]{width:290%!important;transform:translate(-30%,-1%)}
html body .exercise-coach-face img[data-coach=maya]{width:270%!important;transform:translate(-28%,-1%)}
.exercise-coach-card .exercise-coach-actions{width:100%;gap:5px}
html body .exercise-coach-card .exercise-coach-actions button{min-height:44px;padding:8px 4px;font-size:.85rem;gap:4px;border-radius:11px;overflow-wrap:anywhere}
.exercise-coach-card .exercise-coach-actions svg{width:15px;height:15px}
@media(max-width:360px){.exercise-coach-grid{gap:8px}.exercise-coach-card .exercise-coach-actions{grid-template-columns:1fr}.exercise-coach-face{width:48px;height:48px}}
@media(max-height:540px){.exercise-coach-face{width:42px;height:42px}html body .exercise-coach-bridge>p{display:none}.exercise-coach-card{gap:2px}html body .exercise-coach-bridge{margin-top:6px;padding-top:6px}}

/* Dialog chrome remains outside the scrolling area. */
html body dialog.lesson-framed[open]{display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;max-height:calc(100dvh - 32px);height:min(760px,calc(100dvh - 32px));padding:12px 18px 10px!important}
html body .lesson-framed>.lesson-toolbar{flex:none;position:relative;display:flex;justify-content:flex-end;align-items:center;min-height:44px;margin:0 0 6px!important;gap:12px;direction:ltr}
html body .lesson-framed>.lesson-toolbar>.lesson-back{display:none}
html body .lesson-framed .lesson-close{position:static!important;display:grid;place-items:center;min-width:44px;min-height:44px;margin:0!important;flex:none;font-size:27px;z-index:2}
html body .lesson-scroll-area{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:2px 2px 8px;scroll-padding:4px}
html body .lesson-framed>.lesson-back-footer{flex:none;display:flex;justify-content:flex-start;direction:ltr;margin:10px 0 0!important;padding-top:8px;border-top:1px solid var(--theme-border,#819bb5)}
html body .lesson-framed>.lesson-back-footer .lesson-back{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:8px 14px;margin:0;border-radius:22px;font:600 .95rem/1.2 system-ui,sans-serif;color:var(--theme-text,#20374f);background:var(--theme-bg,#dbe7f2);border:1px solid var(--theme-border,#819bb5)}
html body .lesson-framed>.lesson-back-footer .lesson-back-arrow{font-size:24px;line-height:1}
html body .lesson-framed .exercise-feedback-layout{margin:0!important;padding:12px!important}
html body .lesson-framed .exercise-feedback-layout .lesson-actions{margin-bottom:10px}
@media(max-height:540px){html body dialog.lesson-framed[open]{max-height:calc(100dvh - 12px);height:calc(100dvh - 12px);padding:6px 12px!important}html body .lesson-framed>.lesson-back-footer{margin-top:4px!important;padding-top:4px}}

/* Mini feedback shares the dialog scroll; no cramped nested response box. */
html body .exercise-feedback-layout:not([hidden]){display:block;height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important}
html body .exercise-feedback-copy{overflow:visible;max-height:none;min-height:0;flex:none;padding-inline-end:0}
html body .exercise-coach-bridge>p{font-size:.95rem;line-height:1.45}
.exercise-call-actions{display:flex;gap:12px;margin-top:18px}
.exercise-call-actions button{flex:1;min-height:48px;border-radius:12px;font:600 1rem system-ui;cursor:pointer}
.exercise-call-notice p{font:400 1rem/1.5 system-ui;overflow-wrap:anywhere}

/* Roomy profile cards; crop the original head/upper torso without shrinking faces. */
.exercise-coach-grid{gap:20px}
html body .exercise-coach-face{width:136px;height:136px;border-radius:50%}
html body .exercise-coach-card{gap:8px}
html body .exercise-coach-card>strong{font-size:1.1rem}
html body .exercise-coach-card .exercise-coach-actions{grid-template-columns:1fr;gap:8px}
html body .exercise-coach-card .exercise-coach-actions button{font-size:1rem;min-height:48px;padding:10px 8px}
@media(max-width:500px){html body .exercise-coach-face{width:104px;height:104px}.exercise-coach-grid{gap:12px}}
@media(max-width:340px){html body .exercise-coach-face{width:92px;height:92px}}

/* Own top-layer chrome so modal calls never hide navigation below the dialog. */
html body dialog.exercise-coach-chat{padding:70px 24px 30px 84px}
html body dialog.exercise-coach-chat .exercise-dialog-back{position:fixed!important;left:max(10px,env(safe-area-inset-left))!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important;z-index:2147483647;width:64px!important;height:64px!important;min-width:64px!important;min-height:64px!important;border:0!important;padding:6px!important;margin:0!important;border-radius:50%;background:var(--theme-card,#f4f6f5);color:var(--theme-text,#20374f)}
html body dialog.exercise-coach-chat .exercise-dialog-back svg{width:52px;height:52px;display:block}
html body dialog.exercise-coach-chat .exercise-dialog-close{position:fixed!important;right:max(12px,env(safe-area-inset-right))!important;top:max(12px,env(safe-area-inset-top))!important;z-index:2147483647;display:grid;place-items:center;min-height:48px;min-width:48px;border-radius:50%;background:var(--theme-card,#f4f6f5);color:var(--theme-text,#20374f)}
@media(max-width:500px){html body dialog.exercise-coach-chat{padding-left:24px;padding-top:70px;padding-bottom:30px}.exercise-coach-voice .chat-status{padding-inline-start:62px}}

/* Explicit call/chat colors requested for every localized exercise. */
html body .exercise-coach-actions button.is-voice{background:#111318!important;color:#fff!important;border-color:#111318!important}
html body .exercise-coach-actions button.is-chat{background:#25D366!important;color:#071b10!important;border-color:#25D366!important}
html body .exercise-coach-actions button.is-voice svg{color:#25D366!important;fill:currentColor!important;stroke:none!important}
html body .exercise-coach-actions button.is-chat svg{color:inherit!important;stroke:currentColor!important}

/* Clear invitation and spacious coach cards after the complete feedback. */
html body .exercise-coach-bridge{margin-top:28px;padding-top:22px}
html body .exercise-coach-bridge h4{text-align:center;font-size:1.2rem;line-height:1.4;margin:0 0 28px}
html body .exercise-coach-face{width:148px;height:148px}
html body .exercise-coach-card>strong{font-size:1.25rem;line-height:1.35;margin:4px 0}
html body .exercise-coach-actions button.is-chat{color:#fff!important}
html body .exercise-coach-actions button.is-chat svg{color:#fff!important;fill:currentColor!important}
html body :is(.lesson-choices,#lesson-choices) button{display:block;box-sizing:border-box;width:100%;min-height:56px;padding:16px 18px!important;font:600 1rem/1.5 system-ui,sans-serif!important;text-align:start;border:2px solid var(--theme-action,#284d70)!important;border-radius:14px!important;background:var(--theme-action,#284d70)!important;color:var(--primary-ink,#fff)!important;cursor:pointer;overflow-wrap:anywhere;box-shadow:none!important}
html body :is(.lesson-choices,#lesson-choices) button[aria-pressed=true]{outline:3px solid var(--theme-accent,#c89f45);outline-offset:3px}
html body :is(.lesson-choices,#lesson-choices) button:focus-visible{outline:3px solid var(--theme-accent,#c89f45);outline-offset:3px}
html body .lesson-choice-instruction{font:400 1rem/1.45 system-ui,sans-serif;margin:14px 0 12px;color:var(--theme-text,#20374f)}
html body :is(.lesson-choices,#lesson-choices){display:grid;gap:12px}
html body :is(.lesson-choices,#lesson-choices) .choice-connector{text-align:center;margin:0;font-size:.95rem}
@media(max-width:500px){html body .exercise-coach-face{width:116px;height:116px}}
@media(max-width:340px){html body .exercise-coach-face{width:96px;height:96px}}

/* Consent starts the call clearly; no extra destination page. */
html body .exercise-call-actions .exercise-call-start{display:flex;align-items:center;justify-content:center;gap:10px;box-sizing:border-box;width:100%;min-height:56px;padding:15px 18px;background:#111318!important;border:1px solid #111318!important;color:#fff!important;font:650 1.05rem/1.3 system-ui,sans-serif;border-radius:14px;cursor:pointer}
html body .exercise-call-actions .exercise-call-start svg{width:22px;height:22px;color:#fff!important;fill:currentColor;flex:none}
html body .exercise-call-actions .exercise-call-start.end{background:#111318!important;color:#fff!important;border-color:#fff!important}
html body .exercise-call-actions .exercise-call-start:focus-visible{outline:3px solid var(--theme-accent,#c89f45);outline-offset:3px}

/* Calls use the full screen with a large original profile crop. */
html body dialog.exercise-coach-voice[open]{position:fixed;inset:8px;box-sizing:border-box;width:calc(100% - 16px)!important;max-width:none!important;height:calc(100dvh - 16px)!important;max-height:calc(100dvh - 16px)!important;margin:0!important;padding:72px 24px 28px!important;border:0;display:flex;flex-direction:column;align-items:center;gap:16px;overflow:auto;text-align:center}
html body dialog.exercise-coach-voice header{justify-content:center;flex:none;max-width:680px;width:100%}
html body dialog.exercise-coach-voice h2{font-size:1.8rem;line-height:1.3}
html body dialog.exercise-coach-voice .exercise-call-portrait{width:clamp(180px,36dvh,340px)!important;height:clamp(180px,36dvh,340px)!important;flex:none}
html body dialog.exercise-coach-voice .exercise-call-notice{width:min(600px,100%);font-size:1rem}
html body dialog.exercise-coach-voice .chat-status{min-height:28px;margin:0;padding:0;max-width:600px}
html body dialog.exercise-coach-voice .exercise-call-actions{width:min(600px,100%);margin:0 0 8px;flex:none}
html body dialog.exercise-coach-voice .exercise-call-start{min-height:64px;font-size:1.15rem}
@media(max-height:620px){html body dialog.exercise-coach-voice .exercise-call-portrait{width:160px!important;height:160px!important}html body dialog.exercise-coach-voice[open]{gap:10px;padding-top:64px!important}}

@media(max-width:600px){html body dialog.exercise-coach-voice .exercise-call-portrait{width:clamp(180px,32dvh,240px)!important;height:clamp(180px,32dvh,240px)!important}}
html body dialog.exercise-coach-voice .exercise-call-notice p{margin:0 0 10px}
html body dialog.exercise-coach-voice .exercise-call-portrait{margin:0 auto}

@media(max-width:600px){html body dialog.exercise-coach-voice .exercise-call-portrait{width:min(240px,32dvh,calc(100vw - 164px))!important;height:min(240px,32dvh,calc(100vw - 164px))!important}}

/* Larger readable profiles and round WhatsApp-style conversations. */
html body .exercise-coach-face{border:2px solid #fff!important;box-sizing:border-box;width:164px;height:164px}
html body .exercise-coach-card>strong{font-size:1.5rem;line-height:1.3}
html body .exercise-coach-face img[data-coach=marcus]{transform:translate(-24%,1%)!important}
html body dialog.exercise-coach-voice h2{font-size:2.1rem}
html body .exercise-coach-message{border-radius:22px 22px 22px 6px;padding:12px 16px}
html body .exercise-coach-message.user{border-radius:22px 22px 6px 22px}
html body .exercise-coach-actions button{border:2px solid #fff!important;border-radius:28px!important}
html body .exercise-coach-actions button.is-chat{background:#25D366!important;color:#fff!important}
html body dialog.exercise-coach-chat:not(.exercise-coach-voice) .exercise-dialog-back{top:auto!important;bottom:max(12px,env(safe-area-inset-bottom))!important;transform:none!important}
html body dialog.exercise-coach-voice .exercise-dialog-back{top:50%!important;bottom:auto!important;transform:translateY(-50%)!important}
html body :is(.exercise-dialog-back,.exercise-dialog-close){inset:auto!important;margin:0!important;overflow:visible!important;box-sizing:border-box!important;background:#111318!important;color:#fff!important;max-width:none!important}
html body .exercise-dialog-close{top:max(14px,env(safe-area-inset-top))!important;right:max(14px,env(safe-area-inset-right))!important;border:1px solid #fff!important;width:48px!important;height:48px!important;padding:0!important}
html body .exercise-dialog-back{left:max(8px,env(safe-area-inset-left))!important;border:0!important}
html body dialog.exercise-coach-chat{filter:none!important;contain:none!important;perspective:none!important;will-change:auto!important;padding-bottom:92px!important}
html body #lesson-other-topic{display:flex!important;align-items:center;justify-content:center;gap:10px;min-height:52px;background:#284d70!important;color:#fff!important;border:1px solid #fff!important;border-radius:28px!important;padding:12px 18px!important}
html body #lesson-other-topic svg{width:28px;height:28px;flex:none}
html body .exercise-call-actions .exercise-call-start{border:2px solid #fff!important;border-radius:32px!important}
html body .exercise-call-start svg[data-call-state=call]{color:#25D366!important;fill:currentColor!important}
html body .exercise-call-start svg[data-call-state=hangup]{color:#ff453a!important;fill:currentColor!important}
@media(max-width:500px){html body .exercise-coach-face{width:132px;height:132px}}
@media(max-width:340px){html body .exercise-coach-face{width:108px;height:108px}}

html body dialog.exercise-coach-chat:has(.exercise-dialog-back){transform:none!important;translate:none!important}
html body :is(.exercise-dialog-back,.exercise-dialog-close):popover-open{position:fixed!important;inset:auto!important;margin:0!important;overflow:visible!important;max-width:none!important}
html body .exercise-dialog-back:popover-open{left:max(8px,env(safe-area-inset-left))!important}
html body .exercise-dialog-close:popover-open{right:max(14px,env(safe-area-inset-right))!important;top:max(14px,env(safe-area-inset-top))!important}
html body dialog.exercise-coach-voice .exercise-dialog-back:popover-open{top:50%!important;bottom:auto!important;transform:translateY(-50%)!important}
html body dialog.exercise-coach-chat:not(.exercise-coach-voice) .exercise-dialog-back:popover-open{top:auto!important;bottom:max(12px,env(safe-area-inset-bottom))!important;transform:none!important}

/* Mini calls share the ordinary call page's exact navigation controls. */
html:root:root:root:root:root:root:root:root:root:root[data-theme] body dialog.exercise-coach-chat .exercise-dialog-back{display:inline-grid!important;place-items:center!important;position:fixed!important;inset:auto!important;left:max(8px,env(safe-area-inset-left))!important;bottom:max(12px,env(safe-area-inset-bottom))!important;top:auto!important;transform:none!important;translate:none!important;width:64px!important;height:64px!important;min-width:64px!important;min-height:64px!important;max-height:64px!important;padding:0!important;border:2px solid #1d3f60!important;border-radius:50%!important;background:#fff!important;color:#1d3f60!important;box-shadow:none!important;box-sizing:border-box!important}
html:root:root:root:root:root:root:root:root:root:root[data-theme] body dialog.exercise-coach-chat .exercise-dialog-back svg{width:52px!important;height:52px!important}
html:root:root:root:root:root:root:root:root:root:root[data-theme] body dialog.exercise-coach-chat .exercise-dialog-back svg circle{display:none!important}
html:root:root:root:root:root:root:root:root:root:root[data-theme] body dialog.exercise-coach-chat .exercise-dialog-back svg path{stroke:#1d3f60!important}
html:root:root:root:root:root:root:root:root:root:root[data-theme] body dialog.exercise-coach-chat .exercise-dialog-close{display:grid!important;place-items:center!important;position:fixed!important;inset:auto!important;right:max(12px,env(safe-area-inset-right))!important;top:max(12px,env(safe-area-inset-top))!important;width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;padding:4px!important;border:2px solid #fff!important;border-radius:50%!important;background:#bfd8ef!important;color:#1d3f60!important;box-shadow:none!important;box-sizing:border-box!important}
html:root:root:root:root:root:root:root:root:root:root[data-theme] body dialog.exercise-coach-chat .exercise-dialog-close svg{width:22px!important;height:22px!important;stroke:currentColor!important}
/* 12 Oct 2026: calls from exercises use the same home-style controls. */
html:root:root:root:root:root:root:root:root:root:root:root[data-theme] body dialog.exercise-coach-voice :is(.exercise-dialog-back,.exercise-dialog-close){
 padding:0!important;box-sizing:border-box!important;background:#bfd8ef!important;color:#fff!important;
 border:1.5px solid #fff!important;border-radius:50%!important;box-shadow:none!important;
}
html:root:root:root:root:root:root:root:root:root:root:root[data-theme] body dialog.exercise-coach-voice .exercise-dialog-back{width:64px!important;height:64px!important;min-width:64px!important;min-height:64px!important;max-height:64px!important}
html:root:root:root:root:root:root:root:root:root:root:root[data-theme] body dialog.exercise-coach-voice .exercise-dialog-back svg{width:52px!important;height:52px!important}
html:root:root:root:root:root:root:root:root:root:root:root[data-theme] body dialog.exercise-coach-voice .exercise-dialog-back svg circle{display:none!important}
html:root:root:root:root:root:root:root:root:root:root:root[data-theme] body dialog.exercise-coach-voice .exercise-dialog-back svg path{stroke:#fff!important}
html:root:root:root:root:root:root:root:root:root:root:root[data-theme] body dialog.exercise-coach-voice .exercise-dialog-close{width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;max-height:48px!important}
html:root:root:root:root:root:root:root:root:root:root:root[data-theme] body dialog.exercise-coach-voice .exercise-dialog-close svg{width:24px!important;height:24px!important;stroke:currentColor!important}

/* Reflection handoff: actions immediately follow the reply; portraits below. */
html body .exercise-coach-bridge.reflection-coach-bridge{margin-top:8px;padding-top:10px}
html body .exercise-coach-bridge.reflection-coach-bridge h4{margin:0 0 10px}
html body .reflection-coach-bridge .exercise-coach-card{gap:8px}
html body .vq-reflection .vq-coach-reply{margin-bottom:8px}

.exercise-coach-voice .exercise-call-invitation{text-align:center;font-size:1.1rem;line-height:1.5;margin:14px 0 10px}

html:root:root:root:root:root:root:root:root:root:root:root:root[data-theme] body dialog.exercise-coach-voice .exercise-dialog-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;}
