/* Guest pages: keep the native logo and sign-in action in separate corners. */
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .navbar-area{padding:0!important;min-height:52px!important}
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .main-responsive-nav .container{width:100%!important;max-width:none!important;padding:6px 12px!important}
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .main-responsive-menu{position:relative!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;min-height:40px!important;padding:0!important;width:100%!important}
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .main-responsive-menu>.logo{position:static!important;inset:auto!important;transform:none!important;display:flex!important;align-items:center!important;width:64px!important;height:28px!important;margin:0!important;flex:0 0 64px!important;overflow:visible!important}
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .main-responsive-menu>.logo img{display:block!important;width:64px!important;min-width:0!important;height:28px!important;object-fit:contain!important;transform:none!important;margin:0!important}
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .main-responsive-menu>.option-item{position:static!important;margin:0 0 0 auto!important;flex:0 1 auto!important;min-width:0!important}
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .navbar-area .default-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:36px!important;padding:7px 12px!important;margin:0!important;font-size:13px!important;line-height:1.4!important;white-space:normal!important;text-align:center!important}
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .main-navbar .navbar{justify-content:space-between!important;gap:20px!important}
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .main-navbar .others-options{margin-left:auto!important;flex-shrink:0!important}
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .others-option-for-responsive{display:none!important}
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .navbar-area .option-item:has(>.user-btn[href*="/login/"]){display:none!important}
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .navbar-area .default-btn::after{display:none!important;content:none!important}
html body.notloggedin .navbar-area .nav-item:has(a[lang="ja"][role="menuitem"]){display:none!important}
/* The language chooser stays available, below the header, including safe-area phones. */
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) #sj-language-shortcut{display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;position:fixed!important;top:auto!important;right:auto!important;left:calc(12px + env(safe-area-inset-left,0px))!important;bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;min-width:48px!important;min-height:44px!important;width:auto!important;height:auto!important;padding:10px 12px!important;z-index:1060!important;box-sizing:border-box!important}
html body.notloggedin #sj-language-shortcut svg{flex-shrink:0;margin:0!important;width:26px!important;height:19px!important}
/* Keep Moodle's native password toggle inside its field. */
html body.notloggedin#page-login-index .login-form .toggle-sensitive-wrapper{position:relative!important;display:block!important;width:100%!important}
html body.notloggedin#page-login-index .login-form .toggle-sensitive-wrapper #password{padding-right:54px!important;border-radius:11px!important}
html body.notloggedin#page-login-index .login-form .toggle-sensitive-wrapper .input-group-append{position:absolute!important;right:7px!important;top:50%!important;transform:translateY(-50%)!important;margin:0!important;z-index:3!important;display:flex!important}
html body.notloggedin#page-login-index .login-form .toggle-sensitive-btn{display:flex!important;align-items:center!important;justify-content:center!important;width:36px!important;height:36px!important;min-height:36px!important;padding:0!important;margin:0!important;border:0!important;border-radius:8px!important;background:transparent!important;box-shadow:none!important;line-height:1!important}
html body.notloggedin#page-login-index .login-form .toggle-sensitive-btn .icon{margin:0!important;width:20px!important;height:20px!important;font-size:20px!important}
@media(max-width:768px){html body.notloggedin #sj-language-shortcut span{display:none!important}}

/* Match the visible guest bar to its contents rather than the account-only 42px height. */
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .main-responsive-nav{height:auto!important;min-height:52px!important;padding:0!important}
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .main-responsive-menu>.logo a{height:28px!important;min-height:0!important;line-height:1!important}
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .main-responsive-menu>.logo .s3-brand-name{display:none!important}
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .main-navbar .navbar-brand{min-width:80px!important;margin:0!important}
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .main-navbar .navbar-brand img{width:80px!important;min-width:0!important;height:32px!important;object-fit:contain!important;transform:none!important}
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .main-navbar .navbar-brand .s3-brand-name{display:none!important}
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .main-responsive-menu>.option-item{max-width:calc(100% - 76px)!important}
html body.notloggedin:not(#sj-unused-header):not(#sj-header65-unused):not(#sj-guest-header-unused) .navbar-area .default-btn{box-sizing:border-box!important;max-width:100%!important;overflow-wrap:anywhere!important}
