@media (min-width:901px) {
  .slm-learning .slm-player { align-items:stretch; overflow:visible; transition:grid-template-columns .42s cubic-bezier(.22,1,.36,1); }
  .slm-learning .slm-content { min-width:0; width:100%; overflow:visible; position:relative; }
  .slm-learning .slm-sidebar { position:sticky; top:20px; height:calc(100vh - 40px); max-height:900px; overflow:hidden; border:1px solid var(--slm-line); border-width:0 1px 0 0; opacity:1; transform:translateX(0); transition:opacity .25s ease,transform .42s cubic-bezier(.22,1,.36,1); }
  .slm-learning .slm-curriculum { flex:1; min-height:0; max-height:none; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
  .slm-player.is-collapsed { grid-template-columns:0 minmax(0,1fr); min-height:100vh; height:auto; overflow:visible!important; }
  .slm-player.is-collapsed .slm-sidebar { opacity:0; transform:translateX(-40px); visibility:hidden; pointer-events:none; }
  .slm-player.is-collapsed .slm-content { grid-column:2; min-height:100vh; height:auto; overflow:visible!important; }
  .slm-player.is-collapsed .slm-content:before { display:none!important; }
  .slm-sidebar-reopen { display:none; position:sticky; z-index:30; top:20px; margin:14px 0 0 14px; width:44px; height:44px; border:1px solid var(--slm-line); border-radius:13px; background:#fff; color:var(--slm-brand); box-shadow:0 7px 20px rgba(20,34,51,.13); font-size:23px; cursor:pointer; animation:slmPop .3s ease; }
  .slm-player.is-collapsed .slm-sidebar-reopen { display:grid; place-items:center; }
  .slm-sidebar-reopen + .slm-sidebar-reopen { display:none!important; }
  .slm-collapse { display:grid; place-items:center; padding:0; transition:transform .22s ease,background .22s ease; }
  .slm-collapse:hover { transform:translateX(-2px); background:#eaf4fe; }
}

.slm-learning { width:100%; min-width:0; max-width:100%; container-type:inline-size; container-name:slm-player; }
.slm-learning .slm-player,
.slm-learning .slm-content,
.slm-learning .slm-lesson,
.slm-learning .slm-lesson-body { min-width:0; max-width:100%; }
.slm-learning .slm-player.is-one-page { display:grid; grid-template-columns:minmax(0,1fr)!important; }
.slm-learning .slm-player.is-one-page .slm-sidebar,
.slm-learning .slm-player.is-one-page .slm-sidebar-reopen,
.slm-learning .slm-player.is-one-page .slm-mobile-head { display:none!important; }
.slm-learning .slm-player.is-one-page .slm-content { grid-column:1; width:100%; }
.slm-learning .slm-player.is-one-page .slm-lesson { width:100%; max-width:1180px; }
.slm-html-frame-wrap { display:block; width:100%; min-width:0; max-width:100%; overflow:hidden; border-radius:16px; background:#fff; }
.slm-html-lesson { display:block; width:100%; min-width:0; max-width:100%; height:78vh; min-height:420px; border:0; background:#fff; transition:height .18s ease; }
.slm-floating-next,
.slm-floating-prev { position:fixed; z-index:9990; bottom:28px; min-width:210px; max-width:320px; border-radius:16px; box-shadow:0 12px 34px rgba(8,55,100,.28); transition:transform .22s ease,box-shadow .22s ease; }
.slm-floating-next { right:28px; display:grid; grid-template-columns:auto 28px; gap:1px 14px; align-items:center; padding:13px 16px; background:var(--slm-brand); color:#fff!important; }
.slm-floating-next:hover,
.slm-floating-prev:hover { transform:translateY(-3px); box-shadow:0 17px 40px rgba(8,55,100,.34); }
.slm-floating-next span { font-size:9px; text-transform:uppercase; letter-spacing:.09em; opacity:.78; }
.slm-floating-next strong { grid-column:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:13px; }
.slm-floating-next b { grid-column:2; grid-row:1/3; font-size:23px; }
.slm-floating-prev { left:28px; display:grid; grid-template-columns:28px auto; gap:1px 14px; align-items:center; padding:13px 16px; background:#fff; border:1px solid var(--slm-line); color:var(--slm-ink)!important; }
.slm-floating-prev b { grid-column:1; grid-row:1/3; color:var(--slm-brand); font-size:23px; }
.slm-floating-prev span { grid-column:2; color:var(--slm-brand); font-size:9px; text-transform:uppercase; letter-spacing:.09em; }
.slm-floating-prev strong { grid-column:2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:13px; }
.slm-floating-prev b svg { display:block; width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; }
.slm-back-top { position:fixed; z-index:9989; right:28px; bottom:100px; width:42px; height:42px; border:1px solid var(--slm-line); border-radius:50%; background:#fff; color:var(--slm-brand); box-shadow:0 7px 22px rgba(20,34,51,.14); font-size:19px; cursor:pointer; transition:transform .2s ease; }
.slm-back-top:hover { transform:translateY(-2px); }
@keyframes slmPop { from { opacity:0; transform:scale(.8); } to { opacity:1; transform:scale(1); } }

@media (max-width:900px) {
  .slm-sidebar-reopen { display:none!important; }
  .slm-learning .slm-content { min-width:0; max-width:100%; overflow:visible; }
  .slm-learning .slm-sidebar { height:100%; max-height:none; overflow:hidden; }
  .slm-learning .slm-curriculum { flex:1; min-height:0; max-height:none; overflow-y:auto; -webkit-overflow-scrolling:touch; }
  .slm-html-frame-wrap { overflow:visible; }
  .slm-html-lesson { height:72vh; min-height:420px; overflow:hidden; }
  .slm-floating-next { right:10px; bottom:10px; max-width:calc(100vw - 76px); min-width:160px; padding:10px 13px; }
  .slm-floating-prev { left:10px; bottom:10px; min-width:0; width:42px; height:42px; padding:0; display:grid; place-items:center; border:2px solid var(--slm-brand); border-radius:50%; box-shadow:0 8px 22px rgba(8,55,100,.18); }
  .slm-floating-prev b { grid-column:1; grid-row:1; display:grid; place-items:center; width:100%; height:100%; line-height:1; transform:none; }
  .slm-floating-prev b svg { transform:translateX(4px); }
  .slm-floating-prev span,.slm-floating-prev strong { display:none; }
  .slm-back-top { right:12px; bottom:78px; width:38px; height:38px; }
}

@media (max-width:520px) {
  .slm-html-lesson { height:68vh; min-height:420px; }
  .slm-floating-next { min-width:0; max-width:calc(100vw - 76px); }
}

/*
 * WordPress themes and page builders often place the player in a column that is
 * much narrower than the browser window. These container rules make the player
 * respond to its real available width instead of the viewport width.
 */
@container slm-player (max-width:900px) {
  .slm-learning .slm-player { display:block; border-radius:16px; }
  .slm-learning .slm-sidebar { position:fixed; z-index:99999; inset:0 12% 0 0; width:auto; height:100%; max-height:none; overflow:hidden; box-shadow:20px 0 50px rgba(0,0,0,.25); opacity:1; visibility:visible; pointer-events:auto; transform:translateX(-110%); }
  .slm-learning .slm-player.mobile-open .slm-sidebar { transform:translateX(0); }
  .slm-learning .slm-content { width:100%; min-width:0; max-width:100%; overflow:visible; }
  .slm-learning .slm-mobile-head { display:flex; height:56px; padding:0 16px; align-items:center; justify-content:space-between; border-bottom:1px solid var(--slm-line); }
  .slm-learning .slm-collapse { font-size:0; }
  .slm-learning .slm-collapse:after { content:'×'; font-size:23px; }
  .slm-learning .slm-sidebar-reopen { display:none!important; }
  .slm-learning .slm-lesson { width:100%; padding:40px 24px; }
  .slm-learning .slm-html-lesson { height:72vh; min-height:420px; }
}

@container slm-player (max-width:620px) {
  .slm-learning .slm-lesson { padding:32px 19px; }
  .slm-learning .slm-lesson h1 { font-size:34px; }
  .slm-learning .slm-lesson-footer { flex-direction:column-reverse; align-items:stretch; }
  .slm-learning .slm-footer-actions { flex-direction:column; }
  .slm-learning .slm-nav-btn { max-width:100%; }
  .slm-learning .slm-complete,
  .slm-learning .slm-next-btn { width:100%; }
}

@container slm-player (max-width:520px) {
  .slm-learning .slm-html-lesson { height:68vh; min-height:420px; }
}
