/* @font-face {
    font-family: 'Latin Modern Roman Italic';
    src: url('../fonts/lmroman12-italic.otf') format('opentype');
    font-weight: normal;
    font-style: italic;
} */


/*adds default padding to buttons
Maybe a bad idea...
*/

:root {
    --bottom-icons-margin: calc(var(--header-height) + 0.5rem);
    --bottom-icons-normal: 15rem;
    --bottom-icons-small: 10rem;
    --bottom-icons-tiny: 5rem;

}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

#overlaydimmer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

#footer {
    position: fixed !important;
}


button {
    padding: 0.5rem;
}

#loginOrSignup {
    font-size: calc(var(--header-height)* 0.75);
    font-weight: bolder;
    line-height: calc(var(--header-height)* 0.75);
    text-align: center;
}


.no-block-margin {
    margin-block: 0;
}


textarea {
    font-family: var(--font-family);
}

#mainWrapper {
    display: flex;
    flex-direction: column;
    overflow: visible;
    border-radius: var(--border-radius);
    border: 2px solid transparent;

}

html:has(#glupusHeader[data-darkmode="disabled"]) #mainWrapper {
    border-color: rgb(0 202 74 / 40%);
}



/*the spaceboy*/
.unstyledButton {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    /* display: inline-block;  */
    display: flex;
    height: 100%;


}

.unstyledButton:hover {
    background-color: transparent;

}

/* USER STATS */
#userStatsDiv {
    min-width: 30%;
    background-color: var(--panel-color);
    border-radius: 0px 0px calc(var(--border-radius) - 3px) calc(var(--border-radius) - 3px);
    padding-bottom: 0.4em;
    padding-inline: 2em;
    display: flex;
    justify-content: space-between;
    min-height: 1em;
}

#userResultDiv {
    color: greenyellow;
    font-size: large;
    font-weight: bold;
    display: none;
}


/*teacher and pupil mode*/

.changeViewBanner {
    display: none;
    position: absolute;
    top: calc(var(--header-height) + 0.5rem);
    left: calc (var(--header-height) + 0.5rem);
    padding: 0.5rem;
    margin: 0.5rem;
    background-color: var(--emphasis-color);
    color: black;
    font-weight: bold;
    cursor: pointer;
    z-index: 4;
}

/* LAYOUT */


#tvSectionTop {
    min-height: 1em;
}



#taskMetaDiv {
    display: flex;
    flex-direction: column;
    text-align: center;
}

#tvSectionTop {

    margin-top: calc(var(--header-height) + 0.5rem);
}

#taskExtraInfo {
    background-color: rgb(190, 255, 165);
    color: black;
    padding-block: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: absolute;
    top: 0;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    width: 100%;
    display: none;
}

#userIsLoggedOutDiv {
    background-color: yellow;
    padding: 0.5rem;
    border-radius: 10px;
    color: black;
    font-size: large;
    display: none;
}



#tvSectionMiddle {
    min-height: 30vh;
    background-color: transparent;
    transition: width 0.3s, height 0.3s;
    position: relative;
}




/* Animation */
@keyframes balloonEffect {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(3);
    }
}


#userStreakDiv {
    overflow: visible;
}

.userStreakDivStreakUp {
    animation: balloonEffect 0.6s ease-in-out;
}


#loadingP {
    color: black;
}


#tvSectionBottom {
    min-height: 10vh;
}

/* We add this if the mathtaskmain is to tall, so we can see the map and the helper */
#tvSectionBottom.tallbottom {
    min-height: calc(10rem + var(--header-height));
}

#mainCenterWrapper {
    min-width: 30%;
    display: flex;
    flex-direction: column;
    margin-left: 25%;
    width: 50%;
    transition: margin 1s ease-in-out;

}

#mainCenterWrapper[data-moveleft="true"] {
    margin-left: 5%;
    transition: margin-left 1s ease-in-out;

}


.groupSelectDiv {
    /* Place in the middle on top of the screen */

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    background-color: var(--bgcolor);
    border-radius: var(--border-radius);
    z-index: 2;
    border: 2px outset var(--color);
    text-align: center;
    cursor: pointer;
}

.groupSelectDiv button {
    font-size: x-large;
    padding: 0.5rem;
    border-radius: 10px;
    cursor: pointer;
}





/* Animation */
@keyframes shake {
    0% {
        margin-left: 0rem;
    }

    25% {
        margin-left: 0.5rem;
    }

    75% {
        margin-left: -0.5rem;
    }

    100% {
        margin-left: 0rem;
    }
}

#spaceBoyBubble {
    display: none;
    font-size: larger;
    padding: 1em;
    margin-right: 2em;
    z-index: 2;
    border-radius: 5px;
    color: black;

}




#userOptionsDiv {
    display: flex;
    position: absolute;
    right: 20%;
    bottom: var(--bottom-icons-margin);
    padding: 1rem;
    flex-direction: column;
    background-color: var(--bgcolor);
    width: 30%;
    visibility: hidden;
    border: 2px outset var(--color);
    border-radius: 1rem;
}

.userOptionsBtn {
    cursor: pointer;
    font-size: x-large;
    text-align: left;
    border-radius: 1rem;
    margin-bottom: 0.4rem;

    /* make a small glow */
    box-shadow: 0 0 10px rgba(125, 125, 125, 0.5);

}




/* TASKMENUBAR */

#taskMenuBar {
    position: absolute;
    /* border-right: 1px solid var(--bgcolor); */
    color: white;
    display: flex;
    height: calc(100vh - var(--header-height)*2);
    z-index: 2;

    border-radius: 10px;

    top: var(--header-height);
    width: 100%;
    pointer-events: none;


}

#taskMenuBarOuterWrapper.taskMenuBarOuterWrapperUnCollapse {
    --starmap-duration: 0.7s;
    --starmap-hide-delay: 0s;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
}

@media (pointer: coarse) {
    #taskMenuBarOuterWrapper.taskMenuBarOuterWrapperUnCollapse {
        --starmap-duration: 0.4s;
    }
}

@media (prefers-reduced-motion: reduce) {
    #taskMenuBar #taskMenuBarOuterWrapper {
        transition: none;
    }
}



#skillsDesch4 {
    width: 400px;
}

#mySkillTreeDiv {
    z-index: 2;
}

.nodeInfoDiv {
    position: absolute;

    background-color: var(--bgcolor);
    border-radius: 5px;
    padding: 0.5em;
    max-width: 10rem;
    z-index: 3;
}



#printSkillsBtn {
    position: absolute;
    right: 0;
    font-size: xx-large;
    background-color: transparent;
    border: none;
    z-index: 4;
}

.searchForNewTopicDiv {
    z-index: 1;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--bgcolor);
    border-radius: 5px;
    padding: 0.5rem;
    font-size: large;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color);
}

.changeTopicDiv {
    z-index: 2;
    position: absolute;
    background-color: var(--bgcolor);
    border-radius: 5px;
    padding: 0.5rem;
    font-size: large;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--color);

}


#taskMenuBarOuterWrapper {
    display: flex;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-6%);
    transition: opacity var(--starmap-duration, 0.3s) ease-in-out,
        transform var(--starmap-duration, 0.3s) ease-in-out,
        visibility 0s var(--starmap-hide-delay, 0.3s);
    /* Start hidden */
    overflow-x: hidden;
    flex-direction: column;
    align-items: center;
    padding: 0rem;
    background: url('../img/spacetile.avif') repeat;
    position: relative;
    overflow: hidden;
    /* Keep the canvas full-size; hide it only after the closing transition. */
    /* border-bottom: 10px solid var(--panel-color);
    border-top: 10px solid var(--panel-color); */



}

#taskMenuBarOuterWrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, black 75%);
    pointer-events: none;
    z-index: 3;
}



/* #taskMenuBarOuterWrapper::before,
#taskMenuBarOuterWrapper::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: transparent;

}

#taskMenuBarOuterWrapper::before {
    background-image:
        radial-gradient(white 1px, transparent 1px),
        radial-gradient(white 1px, transparent 1px),
        radial-gradient(white 1px, transparent 1px),
        radial-gradient(white 1px, transparent 1px);
    background-position:
        1px 1px,
        117px 97px,
        219px 232px;

    background-size: 300px 300px;
}

#taskMenuBarOuterWrapper::after {
    background-image:
        radial-gradient(white 2px, transparent 2px),
        radial-gradient(white 2px, transparent 2px);
    background-position:
        17px 2px,
        113px 191px,
        265px 296px;

    background-size: 500px 500px;
} */


#taskMenuBarCollapser {
    width: 2em;
    height: 100%;
    white-space: nowrap;
    margin-left: -2px;
    /* make it glow on the left side */
    /* box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); */
    border-radius: 0 10px 10px 0;
    background: var(--panel-color);
    display: none;


}


#graphCanvasButtonsWrapper {
    position: absolute;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    display: flex;
    border: 1px solid rgba(255,255,255,0.18);
    background-color: #1b2735ce;
    border-radius: var(--border-radius);
    z-index: 4;
    padding: 0.25rem;
    gap: 0.1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}

#graphCanvasButtonsWrapper button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.8rem;
    padding: 0.35rem;
    border-radius: calc(var(--border-radius) - 2px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

#graphCanvasButtonsWrapper button:hover {
    background-color: rgba(255, 255, 255, 0.14);
    color: white;
    transform: scale(1.1);
}



#cornerWrapper,
#taskMenuBarCollapserIcon {
    height: var(--bottom-icons-normal);
    width: auto;
    bottom: var(--bottom-icons-margin);
}

/* TERMINAL */
#terminalDiv {
    border: 1px solid black;
    background-color: rgb(70, 70, 70);
    width: 90%;
    height: 25vh;
    margin-top: 3em;
    padding: 5px;
    overflow-y: scroll;
    /* visibility: hidden; */
    display: none;
}



/* graphstuff */

#miniAvatar {
    position: absolute;
}



/* WHEN USER GETS A NEW TOPIC */

.completedTask {
    animation: completedAnimation 2.1s ease-in-out backwards;
}


@keyframes completedAnimation {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.5);
    }

    100% {
        transform: scale(1);
    }
}



/* Greeting stuff */

#newUserGreetDiv {
    margin: 0;
    box-sizing: border-box;
    max-width: calc(100vw - 16px);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 0.2rem;
    background-color: var(--bgcolor);
    border: 5px solid white;
    border-radius: var(--border-radius);

    min-width: min(300px, calc(100vw - 16px));
    z-index: 1001;

}

#newUsernoHelpBtn {
    display: none;
}


#newUserGreetWrapper {
    padding: 4rem;

}

#newUserGreetHeading {
    margin-bottom: 0;
}

#newUserGreetText {

    font-weight: bold;
}

#newUserGreetBtns {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    margin-top: 2rem;
}

#newUserGreetBtns button {
    margin: 0.5rem;
    padding: 0.5rem;
    font-size: large;
    cursor: pointer;

}


/* search bar */

.skillSearchDiv {
    position: absolute;
    display: flex;
    flex-direction: column;
    top: 1rem;
    z-index: 3;
    text-align: center;
    padding: 1rem;
    background-color: var(--bgcolor);
    border-radius: 10px;
    color: var(--color);
    align-items: center;
    min-width: 30%;
    max-width: 95vw;
    justify-content: space-around;
    border: 1px solid white;
    z-index: 4;
}


#skillSearchDiv[data-minimized="true"] {
    padding: 0;

}





#skillSearchDiv h2 {
    margin-top: 0rem;
    margin-bottom: 0rem;
    margin-left: 1rem;
}


#skillSearchBtn {
    height: 2rem;
    font-size: x-large;
    background-color: transparent;
    border: none;
    cursor: pointer;
    flex-grow: 1;
    padding: 0;
}

#skillSearchBtn:hover {
    /* make it glow and increase size, no box shadow */

    transform: scale(1.1);
    filter: brightness(150%);



}

#skillSearchWrapper {
    margin-top: 0.5rem;
    height: 2.5rem;
    display: flex;
}

#skillSearchInput {
    flex-grow: 5;
    height: 2rem;
    font-size: 1.3rem;
    border-radius: 5px;
    color: var(--color);
    margin-left: 1rem;
}






/* Categories menu */
#categoryMenuDiv {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 1rem;
    overflow-y: auto;
    border: 0.3px inset var(--color);
    height: 40vh;
    width: 100%;



}

#categoryMenuDiv button {
    flex: 5;
    padding: 0.5rem;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    padding-right: 1rem;
    font-size: 1rem;
    border-radius: 0;

}

#categoryMenuDiv .categoriesMenuBackBtn {
    position: sticky;
    top: 0;
    z-index: 1;
    
    flex: none;
}

#categoryMenuDiv .categoriesMenuBackBtn:hover {
    background-color: var(--hover-bg-color);
    
}

#hideShowBackCategoriesBtn {
    font-size: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}



/* Wrong once shake animation */

@keyframes shakeOnWrong {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }

    100% {
        transform: translateX(0);
    }
}

.wrongonceanimation {
    display: inline-block;
    animation: shakeOnWrong 0.5s;
    /* You can adjust the duration */
    animation-timing-function: ease-in-out;
}



/* text to speech stuff */

#readTaskDiv {
    position: absolute;
    top: 0%;
    right: 0.2rem;
    font-size: xx-large;
    text-shadow: #090A0F 0px 0px 10px;
}


/* dialogue stuff */

#dialogueDiv {
    display: none;
    position: fixed;
    flex-direction: column;
    border: 2px outset var(--color);
    border-radius: 10px;
    padding: 1rem;
    background-color: var(--bgcolor);
    bottom: 15rem;
    max-width: 30vw;
    padding-bottom: 0.5rem;
    z-index: 2;
    overflow: visible;
    cursor: default;
}




#dialogueOptionsDiv {
    display: flex;
    flex-direction: column;

}

#dialogueTextDiv {
    font-size: x-large;
    margin-left: 1rem;
    padding-bottom: 0.2rem;
}

.dialogueButton {
    text-align: left;
    border-radius: var(--border-radius);
    background-color: var(--panel-color);
    color: var(--color);
    margin-top: 0.5rem;
    font-size: clamp(0.75rem, 1.4vw, 1.1rem);
    padding: 0.5rem;
    padding-inline: 1rem;
    white-space: normal;
    overflow-wrap: break-word;
}

.dialogueLangImg {
    width: 2rem;
    height: 2rem;
    margin-top: 0.5rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;

}

.dialogueLangImg:hover {
    transform: scale(1.5);
    cursor: pointer;
}

#dialogueInfoWrapper {
    position: relative;
    display: none;
}

#dialogueInfoWrapper.visible {
    display: block;
}

#dialogueInfoTTS {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-image: url("../img/speaker.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width: 1.5rem;
    height: 1.5rem;
    opacity: 0.6;
    background-color: transparent;
    border: none;
    border-radius: 100%;
    cursor: pointer;
    z-index: 10;
}

#dialogueInfoTTS:hover {
    transform: scale(1.2);
    transition: transform 0.2s;
    opacity: 1;
}

#dialogueInfoTTS:focus {
    outline: 2px solid var(--color);
    opacity: 1;
}

#dialogueInfoDiv {
    background-color: var(--bgcolor);
    border: 2px outset var(--color);
    border-radius: 10px;
    padding: 1rem;
    overflow-y: auto;

    max-height: 50vh;
}

/* set own css for content inside the mini info */

#dialogueInfoDiv h1 {
    padding: 0.1rem;
    margin: 0.1rem;
    font-size: 2rem;
}


#dialogueInfoDiv h2 {
    padding: 0.1rem;
    margin: 0.1rem;
    font-size: 1.5rem;
}

#dialogueInfoDiv h3 {
    padding: 0.1rem;
    margin: 0.1rem;
    font-size: 1.2rem;
}

#dialogueInfoDiv h4 {
    padding: 0.1rem;
    margin: 0.1rem;
    font-size: 1.1rem;
}

#dialogueInfoDiv p {
    padding: 0.1rem;
    margin: 0.1rem;
    margin-bottom: 1rem;
}


/* make the code in the code block be centered */
#dialogueInfoDiv code {
    text-align: center;
    display: block;
    margin: 0 auto;
    padding: 0.5rem;
    font-size: large;
}

.clickableMathTerm {
    text-decoration: dotted underline;
    cursor: help;
    transition: transform 0.15s ease;
    display: inline-block;
}

.clickableMathTerm:hover {
    transform: scale(1.075);
}

.cornerlarge {
    display: block;
    width: 100%;
    right: 0%;

}

#cornerWrapper {
    position: fixed;
    right: 5px;
    display: flex;
    z-index: 1;
    cursor: pointer;
    flex-direction: row-reverse;
    justify-content: space-between;
}




#taskMenuBarCollapserIcon {
    position: fixed;
    left: 5px;
    width: auto;
    display: block;
    cursor: pointer;
}

#taskMenuBarCollapserIcon:hover {
    transform: scale(1.1);
}

#taskMenuBarCollapserImage {
    display: block;
    height: 100%;
    width: auto;
}

#taskMenuBarCollapserLabel {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.15em 0.4em;
    border-radius: 0.3em;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: clamp(0.6rem, 1.2vw, 1rem);
    font-weight: bold;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
}


#spaceboyImg {

    height: 100%;
    pointer-events: none;
    align-self: flex-end;
    width: auto;

}

#spaceBoyBtn:hover {
    cursor: pointer;
    transform: scale(1.1);
}



/* MODE SELECTOR */

.mediumWindow {

    position: absolute;
    min-width: 300px;
    max-width: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--bgcolor);
    padding: 1rem;
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.9);
    border-radius: 10px;
    text-align: center;
    display: none;
    z-index: 2;

}

.mediumWindowClose {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 2rem;
    cursor: pointer;

}

.mediumWindowInner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;


}

#modeSelectorWrapper h2 {
    margin-block: 0.5rem;
}

.modeCard {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    background-color: var(--panel-color);
    margin: 0 auto;
    border-radius: 10px;
    padding-inline: 1rem;
}

.modeCard button.callToAction {
    cursor: pointer;
    font-size: large;
    padding: 0.5rem;
    margin-bottom: 1rem;
    width: 50%;
    border-radius: 10px;
}

.modeCardImageWrapper {
    height: 20rem;
    width: 100%;

}

.modeCardImageWrapper>img {
    height: 100%;
    width: auto;
    margin: 0 auto;

}

.modeCardDesc {
    width: 100%;
    padding: 0.5rem;
}


#nextModeBtnWrapper {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

#nextModeBtnWrapper button {
    font-size: x-large;

    border-radius: 10px;
    margin: auto;

}



/* TASKSELECTOR */

#taskSelectOptionsWrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.taskSelectOptionsInnerWrapper {
    padding: 2rem;
    border-radius: 10px;
    background-color: var(--panel-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;


}

.taskSelectOptionsInnerWrapper button {
    font-size: large;
    padding: 0.5rem;
    margin: 0.5rem;
    border-radius: 10px;
    align-self: center;

}

#taskSelectLevelBtnsWrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}

#taskSelectLevelBtnsWrapper .taskSelectLevelBtn {
    flex: 0 0 auto;
    min-width: 2.8rem;
    padding: 0.5rem 0.7rem;
    font-size: large;
    border-radius: 10px;
    margin: 0;
    align-self: auto;
}



.MJX_ToolTip,
.MJX_HoverRegion,
.MJX_LiveRegion {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    background-color: transparent !important;
}




/* === RESPONSIVE: OLDER MOBILE PORTRAIT === */
@media only screen and (max-width: 600px) and (max-height: 1500px) and (orientation: portrait) {


    #graphCanvasButtonsWrapper {
        bottom: calc(3.25rem + env(safe-area-inset-bottom, 0px));
    }


    .dialogueLangImg:hover {
        transform: scale(1);
        cursor: pointer;
    }


    #taskMetaDiv>h1 {
        font-size: 1rem;
        margin: 0;
        padding-block: 0.5rem;
    }

    #cornerWrapper,
    #taskMenuBarCollapserIcon {
        height: var(--bottom-icons-small);
        /* adding some for the footer on mobile */
        bottom: calc(var(--bottom-icons-margin) + 4rem);
    }

    #newUserGreetWrapper {
        padding: 1rem;
        font-size: medium;
    }

    #newUserGreetBtns button {
        font-size: medium;
    }

    #cornerWrapper {
        max-width: none;
        display: flex;
        flex-direction: row-reverse;
        justify-content: space-between;
        font-size: medium;
    }

    #dialogueDiv {
        bottom: 10rem;
        max-width: 85vw;
    }


    .dialogueButton {
        font-size: small;
        padding: 0.3rem;
        padding-inline: 1rem;
        margin-top: 0.3rem;
    }

    #taskMenuBarCollapserIcon {
        display: block;
    }

    .mediumWindowInner h2 {
        font-size: large;
        margin-block: 0.5rem;
    }

    .mediumWindowClose {
        top: 5px;
        right: 5px;
        font-size: 1rem;
    }

    #skillSearchDiv {
        font-size: medium;
    }

    .mathTaskanswerInput {
        font-size: medium;
        max-width: 80%;
    }

    #mainCenterWrapper {
        width: 100%;
        margin-left: 0;
    }

    .changeViewBanner {

        position: static;
        margin-top: calc(var(--header-height) + 0.5rem);
        margin-left: 0.5rem;
        padding: 0.3rem;

        font-size: xx-small;

    }




    /* 400px and below tweaks */
    @media (max-width: 400px) {
        .mathTaskanswerInput {
            font-size: small;
        }

        #footer {
            position: fixed !important;
            font-size: x-small;
            display: flex;
        }

        #footerInner {
            flex-direction: row;
        }

        #cornerWrapper,
        #taskMenuBarCollapserIcon {
            height: calc(var(--bottom-icons-tiny));
            bottom: calc(var(--bottom-icons-margin) + 4rem);
        }


    }





    /* 700px height and below tweaks */
    @media (max-height: 800px) {

        .mathTaskanswerInput {
            font-size: small;
        }

        #footer {
            position: fixed !important;
            font-size: x-small;
            display: flex;
        }

        #footerInner {
            flex-direction: row;
        }
    }





}




/* === RESPONSIVE: MOBILE LANDSCAPE === */
@media only screen and (min-width: 500px) and (max-width: 1000px) and (max-height: 600px) {

    .dialogueLangImg:hover {
        transform: scale(1);
        cursor: pointer;
    }

    #taskMetaDiv>h1 {
        font-size: 1rem;
        margin: 0;
        padding-block: 0.5rem;
    }

    #cornerWrapper,
    #taskMenuBarCollapserIcon {
        height: var(--bottom-icons-small);
        bottom: var(--bottom-icons-margin);
    }

    #cornerWrapper {
        max-width: none;
        display: flex;
        flex-direction: row-reverse;
        justify-content: space-between;
        font-size: medium;
    }

    #dialogueDiv {
        bottom: 2rem;
        right: 4rem;
        max-width: 85vw;
    }

    .dialogueButton {
        font-size: small;
        padding: 0.2rem;
        padding-inline: 1rem;
        margin-top: 0.2rem;
    }

    #newUserGreetDiv>#newUserGreetWrapper {

        padding: 0;

    }







    /* hide footer */

    #footer {
        display: none;
    }


    /* 750px and below tweaks */
    @media (max-width: 750px) {
        .mathTaskanswerInput {
            font-size: small;
        }

        #footer {
            position: fixed !important;
            font-size: x-small;
            display: flex;
        }

        #footerInner {
            flex-direction: row;
        }

        #cornerWrapper,
        #taskMenuBarCollapserIcon {
            height: calc(var(--bottom-icons-tiny));
            bottom: var(--bottom-icons-margin);
        }
    }





}


/* === RESPONSIVE: SMALL LAPTOPS / LOW HEIGHT === */
@media only screen and (max-height: 800px) and (min-width: 1000px) {

    /* Expand mediumWindow for horizontal task selector layout */
    #taskSelectDiv.mediumWindow {
        max-width: 90vw;
        width: auto;
        padding: 1.5rem;
    }

    #taskSelectDiv .mediumWindowClose {
        font-size: 1.2rem;
        top: 0.5rem;
        right: 0.5rem;
    }

    /* Task selector horizontal layout for low-height wide screens (Chromebooks) */
    #taskSelectOptionsWrapper {
        flex-direction: row;
        align-items: stretch;
        justify-content: center;
        gap: 1.5rem;
    }

    #taskSelectOptionsWrapper > p {
        margin: 0;
        align-self: center;
    }

    .taskSelectOptionsInnerWrapper {
        padding: 1rem;
        min-width: 220px;
        max-width: 280px;
        flex: 0 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .taskSelectOptionsInnerWrapper button {
        margin-top: auto;
    }

    #taskSelectStarmapThumb {
        max-height: 12vh;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    #taskSelectWrapper h2 {
        margin-bottom: 0.5rem;
    }

    #taskMetaDiv>h1 {
        font-size: 1rem;
        margin: 0;
        padding-block: 0.5rem;
    }




    #cornerWrapper,
    #taskMenuBarCollapserIcon {
        height: var(--bottom-icons-small);
        width: auto;
        bottom: var(--bottom-icons-margin);
    }

    #cornerWrapper {
        font-size: x-small;
    }



    #dialogueDiv {
        bottom: 10rem;
        max-width: 85vw;
    }

    .dialogueButton {
        font-size: small;
        padding: 0.3rem;
        padding-inline: 1rem;
        margin-top: 0.3rem;
    }

    /* #dialogueDiv {
        bottom: 10vh;
        right: 20vh;
    } */
    .mathTaskanswerInput {
        font-size: medium;
        max-width: 80%;
    }

    #skillSearchDiv {
        font-size: small;
    }

    #skillSearchDiv h2 {
        font-size: medium;
    }

    #skillSearchWrapper {
        margin-top: 0.5rem;
        height: 1.5rem;
        display: flex;
    }

    #skillSearchInput {
        font-size: 1rem;
    }

    #categoryMenuDiv button {
        font-size: 1rem;
        padding: 0.2rem;
    }

    #hideShowBackCategoriesBtn {
        font-size: 1.5rem;
    }

    .modeCardImageWrapper {
        height: 10rem;
    }

    .modeSelectorDiv {
        top: 2rem;
    }

    .modeCard {
        border-radius: 0;
    }

    .mediumWindow {
        padding: 0;
    }

    #modeSelectCloseBtn {
        background-color: transparent;
        font-size: medium;
    }

    .mediumWindowInner {
        gap: 0;
    }

    #footer {
        position: fixed;
    }

    #footerInner {
        flex-direction: row;
    }
}

/* === RESPONSIVE: TABLETS / IPADS === */
@media only screen and (min-width: 600px) and (max-width: 1000px) and (min-height: 600px) and (max-height: 1200px) {

    #taskMetaDiv>h1 {
        font-size: small;
        margin: 0;
    }

    #cornerWrapper,
    #taskMenuBarCollapserIcon {
        height: var(--bottom-icons-small);
        width: auto;
        bottom: calc(var(--bottom-icons-margin) + 2rem);
    }

    #cornerWrapper {
        font-size: large;
        max-width: none;
        display: flex;
        flex-direction: row-reverse;
        justify-content: space-between;
    }

    /* Ensure icons do not overlap main content */
    #mainCenterWrapper {
        margin-bottom: 14rem;
    }

    #dialogueDiv {
        bottom: 10rem;
        max-width: 85vw;
    }

    .dialogueButton {
        font-size: small;
        padding: 0.3rem;
        padding-inline: 1rem;
        margin-top: 0.3rem;
    }

    #mainCenterWrapper {
        width: 90%;
        margin-left: 5%;
    }

    #newUserGreetDiv {
        min-width: 75%;
    }

}

/* Width between 1200 and 1000px */
@media only screen and (min-width: 1000px) and (max-width: 1200px) {

    #mainCenterWrapper {
        width: 85%;
        margin-left: 7.5%;
    }

}


/* === STUDENTTOOLS/Notepad needs smaller corner uis === */
[data-forcesmallcornericons="true"] {



    & #cornerWrapper,
    & #taskMenuBarCollapserIcon {
        height: var(--bottom-icons-small);
        width: auto;
        bottom: calc(var(--bottom-icons-margin) + 2rem);
    }

    & #cornerWrapper {
        font-size: large;
        max-width: none;
        display: flex;
        flex-direction: row-reverse;
        justify-content: space-between;
    }

    /* 
    & #dialogueDiv {
        bottom: 10rem;
        max-width: 85vw;
    }

    & .dialogueButton {
        font-size: small;
        padding: 0.3rem;
        padding-inline: 1rem;
        margin-top: 0.3rem;
    } */


}

/* ── Tooltip ─────────────────────────────────────────────────────────────── */

#glupus-tooltip {
    position: absolute;
    z-index: 9999;
    background: var(--panel-color);
    color: var(--color);
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    border-radius: var(--border-radius);
    pointer-events: none;
    white-space: normal;
    max-width: 240px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

#glupus-tooltip.tooltip-visible {
    opacity: 1;
    pointer-events: auto;
}

#newUserGreetDiv::backdrop {
    background: transparent;
}

#taskReportInbox {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    z-index: 20;
    cursor: default;
}

#taskReportLetterButton {
    border: 1px solid #c7a863;
    border-radius: 50px;
    background: #fff8e7;
    color: #352b20;
    min-width: 48px;
    min-height: 44px;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 3px 12px #0003;
}

#taskReportLetters {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    width: min(340px, calc(100vw - 24px));
    max-height: min(400px, 50vh);
    overflow: auto;
    background: #fffaf0;
    color: #352b20;
    border: 1px solid #c7a863;
    border-radius: 12px;
    box-shadow: 0 5px 24px #0003;
    text-align: left;
}

#taskReportLetters article { padding: 16px; border-bottom: 1px solid #ddceb2; }
#taskReportLetters h3 { margin: 0 0 8px; font-size: 17px; }
#taskReportLetters p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
#taskReportLetters button { padding: 8px 16px; cursor: pointer; }

/* Non-modal first-visit pointers. The two target controls remain clickable. */
.firstVisitHint {
    position: fixed;
    z-index: 1100;
    width: min(230px, calc(50vw - 18px));
    box-sizing: border-box;
    padding: 12px 16px;
    border: 2px solid #f5ce65;
    border-radius: 14px;
    background: #fff4ca;
    color: #252016;
    box-shadow: 0 4px 20px #0005;
    font: 600 clamp(12px, 1.6vw, 16px)/1.4 system-ui, sans-serif;
    text-align: center;
    cursor: pointer;
}
.firstVisitHint[hidden] { display: none; }
.firstVisitHint::after {
    content: '';
    position: absolute;
    left: var(--arrow-x, 50%);
    top: 100%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 18px solid #f5ce65;
}
.firstVisitHint:focus-visible { outline: 3px solid #4794ff; outline-offset: 4px; }

#privateTaskSelectInfo {
    max-width: 42rem;
    margin: 0.5rem auto 1rem;
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
}
