/* One brand-styled dock, shared by narration and the original slide controls. */
#gx-presentation-controls{position:fixed;inset:auto 12px 10px;z-index:9999;display:flex;align-items:center;gap:12px;padding:8px 12px;box-sizing:border-box;background:var(--nav-bg,#101d32);color:var(--text-secondary,#d9e7f8);border:1px solid var(--divider,#31445f);border-radius:12px;box-shadow:0 4px 18px #0005;font:14px/1.4 var(--font-body,system-ui,sans-serif)}
#gx-narration{min-width:0;flex:1;display:flex;align-items:center;flex-wrap:wrap;gap:7px;max-height:32dvh;overflow:auto;box-sizing:border-box}
#gx-narration button,#gx-narration select,#gx-narration input{font:inherit;color:inherit;background:var(--bg-card,#192b44);border:1px solid var(--divider,#405578);border-radius:7px;padding:6px;color-scheme:dark}
#gx-narration button{cursor:pointer;min-height:34px}
#gx-narration button:hover{border-color:var(--accent,#4d9fff)}
#gx-narration label,#gx-narration .gx-voice-controls,#gx-narration .gx-audio-transport{display:inline-flex;align-items:center;flex-wrap:wrap;gap:6px}
#gx-narration label{white-space:nowrap}
#gx-narration input[type=number]{width:3.5em}
#gx-narration input[type=range]{width:130px;padding:0;accent-color:var(--accent,#4d9fff)}
#gx-narration audio[hidden],#gx-narration .gx-voice-controls[hidden]{display:none!important}
#gx-narration button:disabled,#gx-narration input:disabled,#gx-narration select:disabled{opacity:.55;cursor:default}
#gx-narration-status,#gx-narration-elapsed{font-size:12px}
#gx-narration-auto[aria-pressed=true]{background:var(--accent,#2468b0);color:#fff}
#gx-narration-toggle{flex-shrink:0}
#gx-narration[data-minimized=true]{overflow:visible;max-height:none}
#gx-narration[data-minimized=true]>.gx-player-options{display:none!important}
#gx-presentation-controls .bottom-nav{position:static!important;inset:auto!important;width:auto!important;height:auto!important;flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:0!important;border:0;background:transparent;backdrop-filter:none;box-shadow:none;overflow:visible}
#gx-presentation-controls .bottom-nav .dots{display:none}
#gx-presentation-controls .slide-counter{white-space:nowrap;min-width:3em;font-size:13px}
#gx-presentation-controls .nav-btn{height:36px;min-width:36px;border-radius:7px;background:var(--bg-card,#192b44);color:var(--text-secondary,#d9e7f8)}
#gx-presentation-controls #btn-fs{width:38px;font-size:0!important}
/* Always visible: independent of fallback text cleared by fullscreenchange. */
#gx-presentation-controls #btn-fs::after{content:'';display:block;width:22px;height:22px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' d='M8 3H3v5m13-5h5v5M3 16v5h5m13-5v5h-5'/%3E%3C/svg%3E") center/contain no-repeat}
#gx-presentation-controls .gx-fullscreen-stack{position:relative;display:flex;align-items:center;flex-shrink:0}
#gx-presentation-controls a.gx-player-logo{position:absolute!important;bottom:calc(100% + 16px)!important;right:0!important;left:auto!important;top:auto!important;transform:none;display:flex!important;align-items:center;justify-content:center;z-index:1;max-width:100px;opacity:1!important}
#gx-presentation-controls .gx-player-logo img{height:26px;width:auto;max-width:100px}
.gx-narration-active .slide{padding-bottom:calc(var(--gx-narration-reserve,110px) + 12px)!important}
#gx-presentation-controls :focus-visible{outline:3px solid var(--accent,#4d9fff);outline-offset:3px}
@media(max-width:760px){#gx-presentation-controls{inset:auto 5px 5px;gap:6px;padding:6px}#gx-narration{gap:5px;max-height:30dvh}#gx-narration select{max-width:170px}#gx-presentation-controls .bottom-nav{gap:4px}#gx-presentation-controls #btn-prev,#gx-presentation-controls #btn-next{width:34px;min-width:34px;padding:0}#gx-presentation-controls .nav-label{font-size:0}#gx-presentation-controls .nav-label::before,#gx-presentation-controls .nav-label::after{margin:0}#gx-presentation-controls .slide-counter{font-size:11px;min-width:2.6em}#gx-narration input[type=range]{width:105px}}
@media(max-width:760px){#gx-narration-toggle{font-size:0;min-width:65px}#gx-narration-toggle::after{content:attr(data-compact-label);font-size:12px}}

/* Common controls: main transport is always at the right, selectors use buttons. */
#gx-presentation-controls{align-items:stretch}
#gx-narration{overflow:visible;max-height:none;gap:8px}
#gx-narration [hidden]{display:none!important}
#gx-narration label:has(select[hidden]){display:none!important}
#gx-narration .gx-voice-controls{display:contents}
#gx-narration .gx-audio-transport{flex:1;min-width:180px}
#gx-narration .gx-player-main{display:flex;gap:6px;margin-left:auto;align-items:center;order:20;flex-shrink:0}
#gx-narration .gx-player-main button{min-width:44px;min-height:44px;font-size:22px}
#gx-narration-auto{background:var(--accent,#4d9fff)!important;color:var(--bg-base,#091525)!important}
#gx-narration .bottom-nav{order:19}
#gx-narration .gx-player-speed{display:flex;gap:6px}
#gx-narration .gx-player-speed input{width:100px}
#gx-narration .gx-player-speed output{min-width:3em}
#gx-narration .gx-player-options{display:flex;gap:10px;flex-wrap:wrap;flex-basis:100%;order:30;padding-top:8px}
#gx-narration .gx-player-choices{display:flex;gap:5px;flex-wrap:wrap}
#gx-narration button[aria-pressed=true]{border-color:var(--accent,#4d9fff);box-shadow:inset 0 0 0 1px var(--accent,#4d9fff)}

#gx-narration[data-minimized=true]>.gx-player-options{display:none!important}
#gx-narration[data-minimized=true]>[hidden],#gx-narration[data-minimized=true]>label[hidden]{display:none!important}
#gx-narration[data-minimized=true]>.gx-player-main{display:flex!important}
#gx-narration-toggle{font-size:18px!important;min-width:36px}
#gx-narration-toggle::after{display:none!important}
.gx-narration-active:not(.gx-player-index-open) .pres-toc{display:none!important}
.gx-narration-active.gx-player-index-open .pres-toc{display:flex!important;visibility:visible!important;width:260px!important;min-width:260px!important}
@media(max-width:760px){#gx-narration{gap:5px}#gx-narration .gx-audio-transport{flex-basis:100%;order:25}#gx-narration-status{flex-basis:100%;order:24}#gx-narration .gx-player-speed input{width:65px}#gx-narration .bottom-nav{margin-left:auto}#gx-narration .gx-player-main{margin-left:auto}#gx-narration input[type=number]{width:3em}.gx-narration-active.gx-player-index-open .pres-toc{position:fixed;inset:var(--nav-h,60px) auto var(--gx-narration-reserve,150px) 0;z-index:9000}}

/* Reserve the dock below the scene, including its subtitle track. */
.gx-narration-active .deck{bottom:var(--gx-narration-reserve,110px)!important}
.gx-narration-active .slide{padding-bottom:28px!important}

/* Single shared row: speed, Play/Stop, then page navigation. Options open above it. */
#gx-presentation-controls{align-items:center;flex-wrap:nowrap}
#gx-narration{flex-wrap:nowrap;gap:6px;overflow-x:auto;overflow-y:visible;min-height:44px}
#gx-narration>button{flex:0 0 auto}
#gx-narration .gx-audio-transport{flex:1 1 0;flex-basis:0;min-width:44px;flex-wrap:nowrap;order:3}
#gx-narration .gx-audio-transport input[type=range]{flex:1 1 0;width:auto;min-width:32px}
#gx-narration-status{flex:0 1 8em;flex-basis:auto;order:2;white-space:nowrap;overflow:auto;max-width:8em}
#gx-narration .gx-player-speed{flex:0 0 auto;order:17;align-items:center;white-space:nowrap;flex-wrap:nowrap}
#gx-narration .gx-player-speed input{width:85px}
#gx-narration .gx-player-main{order:18;flex:0 0 auto;margin-left:0;flex-wrap:nowrap}
#gx-narration .bottom-nav{order:19;flex:0 0 auto;margin-left:0;flex-wrap:nowrap}
#gx-narration .gx-player-options{position:fixed;right:12px;bottom:calc(var(--gx-narration-reserve,110px) - 28px);z-index:10001;flex-basis:auto;width:max-content;max-width:calc(100vw - 24px);max-height:50dvh;overflow:auto;box-sizing:border-box;padding:12px;gap:10px;border:1px solid var(--divider,#31445f);border-radius:10px;background:var(--bg-surface,#132238);box-shadow:0 4px 18px #0005}
#gx-narration .gx-player-options[hidden]{display:none!important}
@media(max-width:760px){#gx-narration .gx-audio-transport{flex-basis:0;order:3}#gx-narration-status{flex-basis:auto;order:2;max-width:5em}#gx-narration .gx-player-main,#gx-narration .bottom-nav{margin-left:0}#gx-narration .gx-player-speed input{width:55px}#gx-narration .gx-player-options{right:5px;max-width:calc(100vw - 10px)}}
/* The film keeps compact subtitles above the same dock, without overlaying them. */
html.gx-narration-active.gx-reader-content[data-gxi-kind=demo] .pres-main .deck{bottom:var(--gx-narration-reserve,110px)!important}

#gx-presentation-controls #gx-narration{flex-wrap:nowrap;overflow-x:auto;overflow-y:visible}
#gx-narration-elapsed{white-space:nowrap;flex:0 0 auto}

#gx-presentation-controls #gx-narration a.gx-player-logo{position:fixed!important;right:24px!important;bottom:calc(var(--gx-narration-reserve,110px) - 18px)!important}
@media(max-width:760px){#gx-presentation-controls #gx-narration a.gx-player-logo{right:11px!important}}

/* Reader152: one header reservation, full scene area and one obvious action. */
html.gx-narration-active body.gx-has-site-bar .pres-layout{padding-top:0!important}
html.gx-narration-active[data-gx-player-kind=demo] .slide{padding:4px 8px!important}
html.gx-narration-active[data-gx-player-kind=demo] .native-screen{min-width:0;min-height:0;max-width:none!important;max-height:none!important}
html.gx-narration-active[data-gx-player-kind=demo] .native-screen img{object-fit:contain!important;max-width:none!important;max-height:none!important}
#gx-presentation-controls .gx-player-main button.gx-player-action-current{min-width:56px;min-height:44px;border:2px solid var(--accent,#4d9fff);background:var(--accent,#4d9fff)!important;color:#081525!important;animation:gx-player-action-pulse 2.4s ease-in-out infinite}
#gx-presentation-controls .gx-player-main button[hidden]{display:none!important}
@keyframes gx-player-action-pulse{0%,100%{box-shadow:0 0 0 0 rgba(77,159,255,.15)}50%{box-shadow:0 0 0 5px rgba(77,159,255,.38)}}
@media(prefers-reduced-motion:reduce){#gx-presentation-controls .gx-player-main button.gx-player-action-current{animation:none;outline:2px solid var(--accent,#4d9fff);outline-offset:2px}}
@media(max-width:600px){#gx-narration[data-minimized=true]>.gx-player-speed,#gx-narration-status,#gx-narration-elapsed{display:none!important}#gx-narration .gx-audio-transport{min-width:24px}#gx-narration .gx-player-main button.gx-player-action-current{min-width:46px}#gx-presentation-controls{padding:6px}#gx-narration{gap:4px}}

/* Keep the final contents entries reachable above the fixed controls. */
html.gx-narration-active .pres-toc{box-sizing:border-box;padding-bottom:var(--gx-narration-reserve,78px)}

/* Manual start is deliberately visible; animate the glyph, not a clipped shadow. */
#gx-presentation-controls .gx-player-main button.gx-player-action-current{animation:none}
#gx-presentation-controls .gx-player-main #gx-narration-auto.gx-player-awaiting-start{animation:gx-play-ready 1.5s ease-in-out infinite;transform-origin:center;will-change:transform}
@keyframes gx-play-ready{0%,100%{transform:scale(.88);filter:brightness(.95)}50%{transform:scale(1.08);filter:brightness(1.4)}}
#gx-narration-total{white-space:nowrap;flex:0 0 auto;font-size:13px;font-variant-numeric:tabular-nums;font-weight:600}
#gx-narration .gx-audio-transport{gap:8px}
#gx-narration[data-minimized=true] #gx-narration-elapsed{display:none!important}
#gx-narration:not([data-minimized=true]) .gx-audio-transport{flex-wrap:wrap}
@media(max-width:600px){#gx-narration .gx-audio-transport{min-width:max-content;flex:1 0 auto}#gx-narration .gx-audio-transport input[type=range]{display:none}#gx-narration-total{font-size:11px}#gx-narration-seek{max-width:60px}}
@media(prefers-reduced-motion:reduce){#gx-presentation-controls .gx-player-main #gx-narration-auto.gx-player-awaiting-start{animation:none;outline:2px solid var(--accent,#4d9fff);outline-offset:2px}}

#gx-presentation-controls .gx-player-main #gx-narration-auto.gx-player-awaiting-start:is(:hover,:focus-visible){animation-play-state:paused}
