/* Shared learning-page alignment and compact immersive teaching panel. */
body .ss-page:not(.ss-immersive){padding:0;max-width:none;margin:0;display:block;gap:0}
body .ss-page:not(.ss-immersive)>:not(:last-child){margin-bottom:1.5rem}
body .ss-immersive .ss-teaching{width:min(380px,32vw);padding:18px}
body .ss-immersive .ss-teaching h3{font-size:20px}
@media(max-width:899px){body .ss-immersive .ss-teaching{width:100%;padding:16px}}

/* Scene controls must never inherit the viewer's full-screen dimensions. */
body .ss-world>.ss-world-controls,body .ss-world>div.absolute.end-4.bottom-6.z-20{position:absolute;top:auto;inset-inline-start:auto;inset-inline-end:16px;bottom:24px;width:auto;height:auto;max-width:calc(100% - 32px);padding:8px 12px;display:flex;align-items:center;gap:12px;z-index:2;pointer-events:none;background:rgba(6,18,38,.88);border:1px solid rgba(255,255,255,.2);border-radius:8px;color:white;font-size:12px;line-height:1.5}
body .ss-world>.ss-world-controls button,body .ss-world>div.absolute.end-4.bottom-6.z-20 button{pointer-events:auto;border:1px solid #55758e;border-radius:6px;padding:4px 8px;min-height:32px;white-space:nowrap}

/* EMS_PILOT_CC_ONLY: avatar caption controls live inside the learning player. */
.learning-accessibility { display: none !important; }


/* Keep edit icons outside the media frame without obsolete panel blur. */
html #root [data-testid="virtual-course-hub"] .pilot-resource-tray .pilot-resource-row article{backdrop-filter:none!important;outline:none!important;display:block!important;min-width:0!important}

/* Keep resource action buttons centered without an opaque footer strip. */
#root [data-testid="virtual-course-hub"] .pilot-resource-edit-actions{background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important}

#root [data-testid="virtual-course-hub"] .pilot-resource-tray .pilot-resource-row article{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}

/* Expanded resources sit above the course, outside the gallery perspective. */
html #root [data-testid="virtual-course-hub"] .pilot-resource-row:has(article[data-expanded="true"]){perspective:none!important;transform:none!important}
html #root [data-testid="virtual-course-hub"] .pilot-resource-tray:has(article[data-expanded="true"]){z-index:150!important}
html #root [data-testid="virtual-course-hub"] .pilot-resource-tray .pilot-resource-row article[data-expanded="true"]{position:fixed!important;inset:4dvh 3vw!important;width:94vw!important;height:92dvh!important;max-width:none!important;max-height:none!important;transform:none!important;z-index:150!important}
html #root [data-testid="virtual-course-hub"] article[data-expanded="true"]>.pilot-media-frame{width:100%!important;height:100%!important;aspect-ratio:auto!important}

/* Course cover fills its frame; controls stay below the artwork. */
.course-artwork-section{padding:0!important;overflow:hidden}.course-artwork-section .course-cover-layout{display:flex!important;flex-direction:column;gap:0!important}.course-artwork-section .course-cover-layout>div:first-child{margin:0!important}.course-artwork-section .course-cover-layout>div:first-child>h3{display:none!important}.course-artwork-section .course-cover-preview{width:100%!important;max-width:none!important;margin:0!important;border:0!important;border-radius:0!important;aspect-ratio:16/9}.course-artwork-section .course-cover-preview img{display:block;width:100%!important;height:100%!important;object-fit:cover}.course-artwork-section .course-cover-layout>div:first-child>div.flex{padding:16px 16px 0}.course-artwork-section .course-cover-layout>div:first-child>p{padding:0 16px 16px}.course-artwork-section .course-cover-metadata{padding:16px!important}

/* Keep the full lesson toolbar inside the viewport, including short/mobile screens. */
.course-pilot .pilot-bottom{position:fixed;bottom:max(12px,env(safe-area-inset-bottom));max-width:calc(100vw - 24px);box-sizing:border-box}
.course-pilot .pilot-controls{flex-wrap:wrap;justify-content:center;max-width:100%;box-sizing:border-box}
.course-pilot .pilot-controls button{flex-shrink:0}
@media(max-width:900px){.course-pilot .virtual-scene-camera-controls{bottom:112px}}
@media(max-height:600px){.course-pilot .pilot-bottom{bottom:8px}.course-pilot .pilot-controls{padding:6px 8px;gap:2px}}

/* Account profile modal sizing; keep sign-in cards unchanged. */
.cl-modalContent:has(.cl-userProfile-root){width:min(960px,calc(100vw - 32px))!important;max-width:calc(100vw - 32px)!important}
.cl-userProfile-root{width:100%!important;max-width:none!important}
.cl-userProfile-root .cl-cardBox{width:100%!important;max-width:100%!important;height:min(720px,calc(100dvh - 32px))!important;min-height:0!important;max-height:calc(100dvh - 32px)!important}
.cl-userProfile-root .cl-pageScrollBox{min-width:0}
