/* Hermarfit Education — phone-first interaction layer. */
@media(max-width:760px){
  :root{--hf-mobile-bar:calc(72px + env(safe-area-inset-bottom))}
  html,body{max-width:100%;overflow-x:hidden}
  body.hf-education-standalone{padding-bottom:env(safe-area-inset-bottom)!important}
  .hf-education-app,.hf-education-library,.hf-course-detail,.cinemaPlayer,.hf-login-shell{min-height:100svh}
  .hf-stream-top,.hf-library-top,.hf-course-detail-top,.cinemaTop{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}

  /* Public catalog */
  .hf-stream-rail{display:none!important}
  .hf-stream-top{position:absolute!important;z-index:70!important;left:0!important;right:0!important;top:0!important;height:68px!important;background:linear-gradient(#080808ed,transparent)!important;border:0!important}
  .hf-stream-top nav{display:none!important}
  .hf-stream-top .wordmark img{width:94px!important}
  .hf-stream-top .wordmark span{font-size:13px!important}
  .hf-stream-top .login{min-height:44px!important;padding:0 10px!important;border-radius:12px!important;gap:7px!important}
  .hf-stream-top .login b{max-width:90px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .hf-stream-hero{min-height:790px!important;padding:112px 18px 78px!important;align-items:flex-end!important;background:#080808!important}
  .hf-stream-hero .hero-media{object-position:67% center!important}
  .hf-stream-hero:after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,#080808 3%,rgba(8,8,8,.83) 40%,rgba(8,8,8,.1) 76%),linear-gradient(90deg,rgba(8,8,8,.7),transparent 74%);pointer-events:none}
  .hf-stream-hero>div{position:relative;z-index:2;max-width:100%!important}
  .hf-stream-hero>div>span{font-size:9px!important;letter-spacing:.16em!important}
  .hf-stream-hero h1{max-width:100%!important;margin:15px 0!important;font-size:clamp(54px,17vw,76px)!important;line-height:.84!important}
  .hf-stream-hero .facts{gap:8px!important;flex-wrap:wrap!important}
  .hf-stream-hero .original{font-size:16px!important;line-height:1.35!important}
  .hf-stream-hero>div>p{font-size:12px!important;line-height:1.55!important}
  .hf-stream-hero .actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .hf-stream-hero .actions>*{width:100%!important;min-height:50px!important;justify-content:center!important}
  .hf-stream-hero>aside{display:none!important}
  .hf-stream-hubs,.hf-stream-rows{padding-left:16px!important;padding-right:16px!important}
  .hf-stream-hubs{padding-top:44px!important}
  .hf-stream-hubs>header,.hf-stream-row>header{align-items:flex-end!important;gap:12px!important}
  .hf-stream-hubs h2,.hf-stream-row h2{font-size:28px!important;line-height:1!important}
  .hf-stream-shelf{margin-left:-16px!important;margin-right:-16px!important;padding:5px 16px 22px!important;display:flex!important;overflow-x:auto!important;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-padding-left:16px;scrollbar-width:none}
  .hf-stream-shelf::-webkit-scrollbar{display:none}
  .hf-stream-poster{flex:0 0 82vw!important;max-width:360px!important;scroll-snap-align:start;scroll-snap-stop:always}
  .hf-stream-poster.portrait{flex-basis:57vw!important;max-width:245px!important}
  .hf-stream-poster button,.hf-stream-poster a{min-height:44px}
  .hf-stream-footer{padding-bottom:calc(var(--hf-mobile-bar) + 30px)!important}
  .hf-stream-mobile{position:fixed!important;z-index:500!important;left:10px!important;right:10px!important;bottom:max(10px,env(safe-area-inset-bottom))!important;height:62px!important;padding:5px!important;border:1px solid #ffffff24!important;border-radius:18px!important;background:rgba(19,19,21,.94)!important;box-shadow:0 18px 55px #000c!important;backdrop-filter:blur(22px)!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .hf-stream-mobile>*{min-width:0;min-height:52px;border-radius:13px;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:8px!important}
  .hf-stream-mobile .active{background:#351617;color:#fff!important;box-shadow:inset 0 0 0 1px #e33b3b55}

  /* Catalog modal and search become native-feeling bottom sheets. */
  .hf-stream-modal-shade{padding:12px!important;align-items:flex-end!important}
  .hf-stream-modal{width:100%!important;max-height:92svh!important;overflow:auto!important;border-radius:24px 24px 16px 16px!important;padding-bottom:max(22px,env(safe-area-inset-bottom))!important}
  .hf-stream-modal .close{position:sticky!important;z-index:4!important;top:10px!important;float:right;width:44px!important;height:44px!important;border-radius:50%!important}
  .hf-stream-modal .hero{min-height:280px!important}
  .hf-stream-modal .body{padding:22px 18px!important}
  .hf-stream-modal .body h2{font-size:48px!important}
  .hf-stream-modal .body .actions{display:grid!important;grid-template-columns:1fr!important}
  .hf-stream-modal .body .actions>*{width:100%!important;min-height:48px!important;justify-content:center!important}
  .hf-stream-search{padding:0 14px calc(var(--hf-mobile-bar) + 18px)!important;overflow:auto!important}
  .hf-stream-search>header{height:72px!important;gap:10px!important}
  .hf-stream-search>header button{flex:0 0 44px;width:44px!important;height:44px!important}
  .hf-stream-search>section{grid-template-columns:1fr!important}

  /* Course sales / information screen. */
  .hf-course-detail-top{position:fixed!important;height:66px!important;background:rgba(8,8,9,.88)!important;backdrop-filter:blur(18px);border-bottom:1px solid #ffffff18!important}
  .hf-course-detail-top .brand{gap:9px!important}
  .hf-course-detail-top .brand img{width:55px!important;height:34px!important}
  .hf-course-detail-top .brand span{padding-left:9px!important;font-size:12px!important}
  .hf-course-detail-top>a:last-child{min-height:44px;padding:0 12px;border:1px solid #ffffff25;border-radius:12px;display:flex;align-items:center;font-size:0!important;background:#151517}
  .hf-course-detail-top>a:last-child:after{content:"← Volver";font-size:9px;font-weight:850}
  .hf-course-detail-hero{min-height:780px!important;padding:116px 18px 60px!important;align-items:flex-end!important;background:linear-gradient(0deg,#080809 3%,rgba(8,8,9,.88) 47%,rgba(8,8,9,.08) 80%),var(--course-cover) 67% center/cover!important}
  .hf-course-detail-hero h1{font-size:clamp(56px,18vw,76px)!important;overflow-wrap:anywhere}
  .hf-course-detail-hero p{font-size:12px!important}
  .hf-course-detail-hero ul{flex-wrap:wrap!important;gap:9px 0!important}
  .hf-course-detail-hero>div>div a{width:100%!important;min-height:50px!important;justify-content:center!important}
  .hf-course-detail-body{padding:64px 16px 95px!important;gap:35px!important}
  .hf-course-detail-body>header h2{font-size:58px!important}
  .hf-course-detail-body article{border-radius:14px!important}
  .hf-course-detail-body article>header{padding:16px!important}
  .hf-course-detail-body li{min-height:58px!important;padding:0 14px!important}

  /* Signed-in player: keep an exit and the course navigation reachable. */
  .cinemaTop{position:sticky!important;z-index:180!important;top:0;height:62px!important;grid-template-columns:1fr auto!important;background:rgba(7,7,8,.96)!important;backdrop-filter:blur(18px)}
  .cinemaTop .streamWordmark img{width:88px!important}
  .cinemaTop>div{display:none!important}
  .cinemaTop>a:last-child{min-width:78px;min-height:44px;padding:0 10px;border:1px solid #ffffff25;border-radius:12px;display:flex!important;align-items:center;justify-content:center;font-size:9px!important;font-weight:850;background:#161618}
  .cinemaTop>a:last-child b{font-size:16px!important}
  .cinemaStage{min-height:calc(100svh - 62px)!important;overflow:visible!important}
  .cinemaVideo{position:relative!important;inset:auto!important;min-height:calc(100svh - 62px)!important;width:100%!important}
  .cinemaPoster{padding:0 18px 116px!important;background-position:64% center!important}
  .cinemaPoster h1{font-size:clamp(48px,15vw,68px)!important;overflow-wrap:anywhere}
  .cinemaPoster>button{width:72px!important;height:72px!important;top:42%!important}
  .cinemaExitVideo{top:12px!important;left:12px!important;min-width:44px!important;min-height:44px!important;opacity:1!important}
  .cinemaPlaying iframe,.cinemaBunnyPlayer iframe{position:absolute;inset:0;width:100%!important;height:100%!important}
  .cinemaControls{height:88px!important;padding:25px 14px max(20px,env(safe-area-inset-bottom))!important}
  .cinemaControls button{min-width:44px!important;min-height:44px!important}
  .cinemaPanelHandle{position:fixed!important;z-index:210!important;right:10px!important;top:76px!important;min-width:48px!important;min-height:44px!important}
  .cinemaLibrary{position:fixed!important;z-index:220!important;inset:62px 0 0 0!important;width:100%!important;max-width:none!important;border-left:0!important;border-radius:0!important;background:#111113f7!important;padding-bottom:env(safe-area-inset-bottom)}
  .cinemaLibrary:not(.open){transform:translateX(100%)!important;pointer-events:none}
  .cinemaLibraryHead{min-height:72px!important;padding:12px 14px!important}
  .cinemaCollapseButton{min-width:44px!important;min-height:44px!important}
  .cinemaLibraryTabs{position:sticky!important;z-index:3!important;top:0;display:flex!important;overflow-x:auto!important;scrollbar-width:none;background:#171719}
  .cinemaLibraryTabs::-webkit-scrollbar{display:none}
  .cinemaLibraryTabs button{flex:0 0 auto!important;min-width:112px!important;min-height:52px!important}
  .cinemaLibraryBody{height:calc(100svh - 186px)!important;padding-bottom:calc(35px + env(safe-area-inset-bottom))!important;overflow-y:auto!important}
  .cinemaContinueCard.isPlaying{position:relative!important;min-height:0!important;aspect-ratio:16/9;overflow:hidden!important;padding:0!important;background:#000!important}
  .cinemaContinueCard.isPlaying>div:not(.cinemaBunnyPlayer),.cinemaContinueCard.isPlaying>button:not(.cinemaExitVideo),.cinemaContinueCard.isPlaying>i{visibility:hidden!important}
  .cinemaContinueCard>.cinemaBunnyPlayer{position:absolute!important;z-index:12!important;inset:0!important;width:100%!important;max-width:none!important;height:100%!important;display:block!important;visibility:visible!important;overflow:hidden;border-radius:inherit;background:#000!important}
  .cinemaContinueCard>.cinemaBunnyPlayer iframe{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;border:0!important}
  .cinemaContinueCard>.cinemaBunnyPlayer .cinemaExitVideo{display:grid!important;place-items:center;width:44px!important;height:44px!important;padding:0!important;font-size:0!important}
  .cinemaContinueCard>.cinemaBunnyPlayer .cinemaExitVideo:after{content:"×";font-size:22px;line-height:1}
  .cinemaSectionRail{display:flex!important;overflow-x:auto!important;scroll-snap-type:x mandatory;scrollbar-width:none}
  .cinemaSectionRail>*{flex:0 0 78vw!important;scroll-snap-align:start}
  .hf-course-lesson{min-height:92px!important;grid-template-columns:100px minmax(0,1fr) auto!important;gap:10px!important}
  .hf-course-lesson button{min-width:44px!important;min-height:44px!important}
  .cinemaToolPanel{padding:16px!important}
  .cinemaLesson{padding:32px 16px calc(100px + env(safe-area-inset-bottom))!important;gap:22px!important}
  .cinemaLesson h2{font-size:44px!important}
  .cinemaLesson>aside{display:grid!important;grid-template-columns:1fr!important}
  .cinemaLesson>aside button{width:100%;min-height:48px!important}

  /* Account / library and authentication. */
  .hf-library-top{height:66px!important;padding:0 15px!important}
  .hf-library-top img{width:88px!important}
  .hf-library-top .brand span{font-size:12px!important;padding-left:10px!important}
  .hf-library-main .intro{padding:48px 16px 34px!important}
  .hf-library-main h1{font-size:clamp(62px,20vw,82px)!important}
  .hf-library-main .intro>div{gap:8px!important}
  .hf-library-main .intro article{min-height:78px!important;padding:13px!important}
  .hf-library-main .courses{padding:32px 14px calc(var(--hf-mobile-bar) + 30px)!important}
  .hf-library-card .cover{border-radius:12px!important;min-height:210px}
  .hf-library-card .cover strong{font-size:36px!important}
  .hf-library-card>div>a{min-height:44px;display:flex;align-items:center}
  .hf-library-mobile{bottom:max(10px,env(safe-area-inset-bottom))!important;height:62px!important;border-radius:18px!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .hf-library-mobile a{min-height:52px;border-radius:13px;display:flex!important;flex-direction:column;gap:4px}
  .hf-library-mobile .active{background:#351617}
  .hf-login-shell{padding:82px 14px max(28px,env(safe-area-inset-bottom))!important;display:flex!important;align-items:center!important}
  .hf-login-back{position:fixed!important;z-index:30;left:max(14px,env(safe-area-inset-left))!important;top:max(12px,env(safe-area-inset-top))!important;min-height:44px;padding:0 13px;border:1px solid #ffffff25;border-radius:12px;background:#151517e8;display:flex;align-items:center;font-size:9px!important;backdrop-filter:blur(16px)}
  .hf-login-card{width:100%!important;max-width:520px!important;padding:30px 18px 24px!important;border-radius:22px!important}
  .hf-login-card h1{font-size:clamp(46px,15vw,64px)!important}
  .hf-login-card input,.hf-login-submit{min-height:50px!important;font-size:16px!important}
  .hf-login-options{align-items:flex-start!important;gap:12px!important;flex-wrap:wrap!important}
  .hf-login-legal{padding:0 14px 8px!important}
}

@media(max-width:390px){
  .hf-stream-hero{min-height:740px!important}
  .hf-stream-hero h1,.hf-course-detail-hero h1{font-size:52px!important}
  .hf-stream-poster{flex-basis:86vw!important}
  .hf-stream-poster.portrait{flex-basis:66vw!important}
  .hf-course-detail-top .brand span,.cinemaTop .streamWordmark span{display:none!important}
  .hf-course-detail-hero{min-height:730px!important}
  .cinemaPoster h1{font-size:48px!important}
  .hf-course-lesson{grid-template-columns:82px minmax(0,1fr)!important}
  .hf-course-lesson>*:last-child{display:none!important}
  .hf-login-card{padding-left:15px!important;padding-right:15px!important}
}

@media(hover:none) and (pointer:coarse){
  .hf-stream-poster:hover,.hf-library-card:hover,.hf-course-detail-body article:hover{transform:none!important}
  button,a,input,select,textarea{-webkit-tap-highlight-color:rgba(217,1,0,.18)}
}

/* Keep the full-category control available on touch devices. */
@media(max-width:700px){
  .hf-stream-row>header>button{display:inline-flex!important;align-items:center!important;gap:6px!important;border:0!important;background:transparent!important;color:#aaa!important}
  .hf-stream-row>header>button span{display:inline!important}
  .hf-stream-row.is-expanded .hf-stream-shelf,.hf-stream-row.is-portrait.is-expanded .hf-stream-shelf{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;overflow:visible!important;padding:6px 0 18px!important;margin:0!important}
  .hf-stream-row.is-expanded .hf-stream-poster{width:100%!important;min-width:0!important;flex:none!important}
}

@media(max-width:390px){.hf-stream-row.is-expanded .hf-stream-shelf,.hf-stream-row.is-portrait.is-expanded .hf-stream-shelf{grid-template-columns:1fr!important}}

/* Mobile course playback: a compact streaming detail with classes as episodes. */
@media(max-width:700px){
  body.hf-course-page{background:#0b0b0d!important}
  .cinemaStage{display:block!important;min-height:calc(100svh - 62px)!important;background:#0b0b0d!important}
  .cinemaVideo{display:none!important}
  .cinemaLibrary,.cinemaLibrary:not(.open){position:fixed!important;z-index:120!important;inset:62px 0 0!important;display:block!important;width:100%!important;height:auto!important;overflow-x:hidden!important;overflow-y:auto!important;border:0!important;background:linear-gradient(180deg,#101012,#08080a)!important;transform:none!important;-webkit-overflow-scrolling:touch}
  .cinemaLibraryHead{display:none!important}
  .cinemaContinueCard{width:auto!important;min-height:390px!important;margin:14px 14px 0!important;padding:190px 16px 16px!important;border:0!important;border-radius:0!important;background-image:linear-gradient(0deg,#101012 0,#101012 34%,rgba(16,16,18,.82) 52%,rgba(6,6,8,.04) 78%),var(--lesson-cover)!important;background-size:100% auto!important;background-repeat:no-repeat!important;background-position:center top!important;display:block!important;box-shadow:none!important}
  .cinemaContinueCard:before{content:"HF EDUCATION";position:absolute;z-index:1;top:16px;left:16px;color:#f4f2ed;font:700 9px/1 var(--font-body);letter-spacing:.16em;text-shadow:0 2px 8px #000}
  .cinemaContinueCard>div{position:relative;z-index:2;max-width:none!important;display:flex!important;align-items:flex-start!important}
  .cinemaContinueCard>div>span{font-size:8px!important;letter-spacing:.16em!important}
  .cinemaContinueCard>div>strong{margin:7px 0 5px!important;font-size:clamp(31px,10vw,44px)!important;line-height:.92!important}
  .cinemaContinueCard>div>small{font-size:9px!important;color:#d2d2d4!important}
  .cinemaMobileSummary{display:-webkit-box!important;overflow:hidden;margin:10px 0 13px!important;color:#aaa!important;font-size:10px!important;line-height:1.5!important;-webkit-box-orient:vertical;-webkit-line-clamp:3}
  .cinemaContinueCard>div>i{width:100%!important;height:3px!important;margin:0 0 13px!important;background:#353538!important}
  .cinemaContinueCard>button{position:relative!important;z-index:2!important;width:100%!important;height:46px!important;padding:0 18px!important;border:0!important;border-radius:2px!important;background:linear-gradient(90deg,#bd0000,#ef1210)!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;color:#fff!important;font-size:12px!important;font-weight:850!important;letter-spacing:.02em!important;box-shadow:0 8px 24px rgba(217,1,0,.22)!important;backdrop-filter:none!important}
  .cinemaContinueCard>button>i{font-size:12px!important;font-style:normal!important}
  .cinemaContinueCard>button>span{display:inline!important}
  .cinemaContinueCard.isPlaying{width:auto!important;min-height:0!important;margin:14px!important;padding:0!important;border-radius:10px!important;aspect-ratio:16/9!important}
  .cinemaContinueCard.isPlaying:before{display:none!important}
  .cinemaLibraryTabs{position:sticky!important;z-index:15!important;top:10px!important;width:calc(100% - 28px)!important;height:54px!important;margin:12px 14px 18px!important;padding:0 8px!important;border:1px solid #303035!important;border-radius:14px!important;background:rgba(20,20,23,.96)!important;box-shadow:0 14px 32px #0008,inset 0 1px #ffffff0b!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:3px!important;overflow:hidden!important;backdrop-filter:blur(16px)!important}
  .cinemaLibraryTabs button{min-width:0!important;min-height:52px!important;padding:0 2px!important;font-size:8px!important;letter-spacing:.035em!important;white-space:nowrap!important}
  .cinemaLibraryTabs button[data-tab="lessons"]{font-size:0!important}
  .cinemaLibraryTabs button[data-tab="lessons"]:before{content:"CLASES";font-size:8px!important}
  .cinemaLibraryTabs button:after{left:0!important;right:0!important;height:3px!important}
  .cinemaContinueCard.isTextLesson{display:none!important}
  .cinemaTextLesson.isMobileTextLesson{position:relative!important;z-index:4!important;inset:auto!important;width:auto!important;height:auto!important;min-height:0!important;max-height:none!important;margin:14px 14px 0!important;padding:0!important;overflow:visible!important;background:transparent!important}
  .cinemaTextLesson.isMobileTextLesson>header{max-width:none!important;margin:0 0 14px!important;padding:16px 4px 0!important}
  .cinemaTextLesson.isMobileTextLesson>header h1{margin:7px 0 5px!important;font-size:clamp(29px,9vw,39px)!important;line-height:.94!important}
  .cinemaTextLesson.isMobileTextLesson .cinemaTextContent{width:100%!important;margin:0!important;padding:10px!important;border-radius:19px!important;box-shadow:0 20px 55px #0009!important}
  .cinemaLibraryBody,.cinemaToolPanel{height:auto!important;min-height:0!important;padding:15px 14px calc(42px + env(safe-area-inset-bottom))!important;overflow:visible!important;background:transparent!important}
  .cinemaLibraryBody>.cinemaContinueCard{display:none!important}
  .cinemaSectionSelect{margin:0 0 14px!important;gap:6px!important}
  .cinemaSectionSelect>span{font-size:7px!important;color:#8c8c91!important}
  .cinemaSectionSelect select{height:42px!important;padding:0 38px 0 12px!important;border:1px solid #343438!important;border-radius:4px!important;background:#19191c!important;font-size:9px!important;font-weight:700!important}
  .cinemaSectionRail{display:none!important}
  .cinemaSectionDetail{margin:0!important}
  .cinemaSectionDetail>header{padding:8px 0 12px!important;grid-template-columns:1fr auto!important;align-items:end!important;border:0!important}
  .cinemaSectionDetail>header span{font-size:7px!important}
  .cinemaSectionDetail>header h2{display:block!important;width:100%!important;max-width:none!important;margin:4px 0 0!important;font-size:clamp(20px,5.7vw,27px)!important;line-height:.98!important;grid-template-columns:none!important;overflow-wrap:normal!important;word-break:normal!important;text-wrap:balance!important}
  .cinemaSectionDetail>header p{display:none!important}
  .cinemaSectionDetail>header>b{padding:0!important;border:0!important;color:#8d8d92!important;font-size:7px!important}
  .cinemaLessonCards{gap:0!important;border-top:1px solid #27272a!important}
  .cinemaLessonCards>button,.hf-course-lesson{min-height:92px!important;padding:11px 0!important;border:0!important;border-bottom:1px solid #27272a!important;border-radius:0!important;background:transparent!important;grid-template-columns:118px minmax(0,1fr)!important;gap:12px!important;box-shadow:none!important;transform:none!important}
  .cinemaLessonCards>button.active{background:linear-gradient(90deg,rgba(217,1,0,.12),transparent 72%)!important;box-shadow:inset 3px 0 0 var(--hf-red)!important}
  .cinemaLessonThumb{width:118px!important;border-radius:3px!important}
  .cinemaLessonThumb>span{width:32px!important;height:32px!important;font-size:9px!important}
  .cinemaLessonThumb>small{font-size:5px!important}
  .cinemaLessonCards>button>span{gap:4px!important;padding-right:4px!important}
  .cinemaLessonCards>button>span small{font-size:6px!important;color:#88888d!important}
  .cinemaLessonCards>button>span b{font-size:10px!important;line-height:1.25!important;white-space:normal!important;display:-webkit-box!important;overflow:hidden!important;-webkit-box-orient:vertical;-webkit-line-clamp:2}
  .cinemaLessonCards>button>span em{font-size:7px!important}
  .cinemaLessonProgressBar{margin-top:4px!important}
  .cinemaLessonProgress,.cinemaLessonCards>button>strong{display:none!important}
  .cinemaLesson{display:none!important}
  .cinemaPanelHandle,.cinemaControls{display:none!important}
}

@media(max-width:390px){
  .cinemaContinueCard{min-height:370px!important;padding-top:170px!important}
  .cinemaLessonCards>button,.hf-course-lesson{grid-template-columns:104px minmax(0,1fr)!important}
  .cinemaLessonThumb{width:104px!important}
}
