/*/////////////////////////////// MOBILE CSS  ///////////////////////////////*/
@media (max-width: 468px) {
    html {
        touch-action: manipulation;
    }
}

#start-image {
    width: 85%;
}

#start-screen > button {
    width: 70%;
    max-width: 500px;
    top: 0;
    font-size: 1.6em;
}

#start-idle-nahida {
    bottom: 0;
    right: 2%;
    height: 30%;
}

#start-idle-dori {
    bottom: 8%;
    left: 5%;
    height: 30%;
    z-index: 10001;
}

#start-idle-scara {
    bottom: 2%;
    left: 2%;
    height: 30%;
}

.overlay-tutorial {
    width: 95% !important;
    object-fit: contain;
}

.tutorial-screen {
    width: 90%;
}

#loading > p {
    bottom: unset;
    transform: translateY(-300%);
}

body {
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
}

.copyright-text, .version-text {
    bottom: 50%;
}

/* MOBILE CSS FOR MAIN GAME */
.left-area {
    width: 100%;
    height: 46%;
    position: absolute;
    left: 0;
    top: 5%;
}

.middle-area {
    padding-left: 1%;
    padding-right: 1%;
    width: 100%;
    height: 5%;
    left: 0;
    top: 0%;
    flex-direction: row;
    justify-content: space-around;
    border: 0;
    border-top: 0.2em solid #1c2441;
    border-bottom: 0.2em solid #1c2441;
    box-sizing: border-box;
    background-image: url(./assets/frames/bar-horizontal.webp);
}

.energy-primo-container {
    width: 30%;
    column-gap: 5%;
    left: 0;
    flex-direction: row;
}

.pill-value {
    height: 70%;
    border-radius: 2em;
}

.pill-value > span {
    font-size: 1.4em;
}

.pill-value > img {
    transform: scale(1.2);
}

.temp-buff {
    width: 25%;
    top: 0;
    flex-direction: row-reverse;
}

.temp-buff > div {
    height: 100%;
    width: auto;
    aspect-ratio: 1;
}

.multiplier-button-container {
    width: fit-content;
    padding-right: 1%;
    box-sizing: border-box;
    position: relative;
    flex-direction: row-reverse;
    flex-wrap: wrap;
    justify-content: flex-start;
    flex-grow: 1;
}

.multiplier-button-container > button {
    padding: 0.5%;
    width: auto;
    height: 100%;
    aspect-ratio: 1;
}

.middle-area > div {
    height: 100%;
}

.right-area {
    width: 100%;
    height: 50%;
    top: 50%;
}

.score-container {
    top: 0;
    white-space: nowrap;
    display: block;
}

#score {
    margin-right: 1em;
}

#demo-container {
    top: 0%;
    height: 64%;
}

.screen-tips {
    padding: 0.2%;
    font-size: 0.9em;
    max-width: 20%;
    left: 0;
    top: 8%;
    height: fit-content;
    opacity: 0;
}

.settings-menu {
    left: 5%;
    top: 24%;
    width: 85%;
    max-height: 60%;
    aspect-ratio: 1.18;
    font-size: 1.2em;
}

.settings-bottom {
    width: 100%;
}

.advanced-settings-box {
    width: 80% !important;
    font-size: 1.4em !important;
}

.patch-notes-div {
    width: 85%;
}

.patch-notes-div > img {
    height: 5%;
}

.switch {
    font-size: 0.8em;
}

.pop-new {
    width: 55%;
    right: -15%;
}

.pop-new-corner {
    width: auto;
    height: 25%;
}

.achieve {
    bottom: 3%;
    height: 15%;
    width: auto;
    max-width: 95%;
    aspect-ratio: 7;
    z-index: 11;
}

.confirm-box {
    font-size: 1.15em;
    width: 90%;
    left:5%;
    height: fit-content;
    padding-top: 1%;
    padding-bottom: 1%;
}

.nut-store-access {
    right: 2%;
    bottom: 7%;
    height: 25%;
}

#nut-shop-div, #nut-shop-transcend, #nut-shop-ascend {
    height: 75%;
    width: 95%;
    top: 10%;
}

.nut-shop-button {
    height: 50%;
}

#nut-store-currency {
    height: fit-content;
    bottom: 90%;
    left: 12%;
}

.nut-store-table > img {
    opacity: 0;
}

.nut-store-table > button {
    height: 12%;
}

#nut-shop-transcend {
    justify-content: unset;
    row-gap: 3%;
}

.nut-transcend > p {
    height: auto;
    font-size: 1.4em;
}

.nut-transcend > div > p {
    font-size: 1em;
}

.nut-transcend > div {
    height: 80%;
}

/*/////////////////////////////////// MOBILE CSS FOR TABLES ///////////////////////////////////////*/
.right-area {
    z-index: 3;
}
#table1 {
    gap: 2%;
}

.upgrade {
    max-height: 24%;
}

#expedDiv {
    position: relative;
    left: -15%;
    border-radius: 0;
    width: 65%;
    height: 70%;
    overflow-x: scroll;
    flex-direction: row;
    justify-content:initial;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
}

#expedDiv::-webkit-scrollbar {
    height: 1.5vh;
}

.button-container {
    aspect-ratio: 13/17;
    flex-basis: 18%;
}

.flex-container-INVENTORY {
    gap: 4% 2%;
}

.inventory-selected {
    border: 0.35em inset #867357;
    border-radius: 1em;
    transform: scale(1.10);
}

.inventory-selected :first-child {
    border-radius: 0.75em;
}

.expedition {
    flex: 0 0 auto;
    height: 95%;
    width: 33%;
    background-position: center;
    background-size: cover;
}

#expedDiv > .expedition-selected {
    border-top: 0.3em solid #816355;
    border-bottom: 0.3em solid #816355;
}

.adventure-map {
    height: 98%;
}

#exped-row-1 {
    align-items: center;
}

#exped-row-1 > img {
    height: 65%;
}

.wish-button {
    top: unset;
    width: 80%;
    bottom: -22.5%;
    max-height: 30%;
}

#wish-tutorial {
    height: 15%;
}

#wish-tutorial-text {
    padding: 1.5%;
    bottom: 30%;
    font-size: 1.1em;
    border: 0.2em solid #876547;
}

#wish-counter-display {
    height: 13%;
}

#wish-nps-display {
    top: 20%;
}

#table6 {
    height: 81%;
    width: 50%;
    padding-left: 1.5%;
    padding-right: 1.5%;
}

.toolInfo {
    width: 100%;
    height: fit-content;
    flex-direction: row;
}

.toolImgContainer {
    aspect-ratio: 1;
    width: 25%;
}

#upgrade-menu-button {
    right: 3%;
}

#tool-tip-button {
    height: 20%;
}

.tool-tip-lore {
    overflow-y: auto;
    height: auto;
    font-size: 1em;
}

.tool-tip-extraimg {
    width: 13%;
    gap:1%;
    aspect-ratio: 0.5;
    flex-direction: column;
}

.toolImgOverlay {
    left: 2.5%;
    top: 4px;
}

.tool-tip-text {
    width: auto;
    font-size: 0.9em;
    text-align: center;
}

.tool-tip-extraimg > img {
    height: 40%;
    width: 100%;
    object-fit: contain;
}

.table-with-tooltip {
    height: 85%;
    padding: 1%;
}

.filter-row {
    width: 58%;
    height: 15%;
}
/* 
.filter-row div:nth-child(3), .filter-row div:nth-child(2) {
    grid-template-columns: repeat(auto-fill, minmax(3em, 1fr));
} */

.wish-img {
    width: 90%;
    height: auto;
}

#table7 {
    justify-content: center;
}

#table7 > img {
    height: 30%;
}

#table7 > :last-child {
    height: 25%;
    width: 75%;
    position: relative;
    right: 0%;
    transform: translateX(10%);
}

.store-buy {
    height: 80%;
}

.store-div {
    width: unset;
    max-width: 90%;
    height: 50%;
    aspect-ratio: 2.44;
    scrollbar-width: 0.1vw;
    scrollbar-color: #9b744f #cda682;
    padding-left: 1%;
    padding-right: 1%;
    box-sizing: border-box;
}

.store-div::-webkit-scrollbar {
    height: 1.5vh;
    background-color: #947c6676;
}

.store-div::-webkit-scrollbar-thumb {
    background-color: #362515;
}

.store-timer {
    height: 17%;
    width: 90%;
    background-image: url(./assets/frames/dori-deals-long.webp);
}

.shop-button {
    max-height: 45%;
    aspect-ratio: 1;
    width: 15%;
    flex: 0 0 auto;
}

.store-dialog {
    height: 30%;
    left: 0%;
    width: 65%;
    border: 0.2em solid #756F60;
}

/*////////////////////////// EVENTS MOBILE CSS //////////////////////////*/
.event-description {
    top: -1%;
}

.event-dark {
    row-gap: 1%;
}

.event-dropdown {
    width: 80%;
    left: 10%;
}

.event-dropdown-text {
    padding-left: 5%;
    box-sizing: border-box;
}

.raining-image {
    width: 15%;
}

.currency-pop {
    top: 6%;
    left: 6%;
    width: fit-content;
    padding-left: 1%;
    padding-right: 1%;
    max-width: 20%;
    height: 9%;
    font-size: 1.1em;
}

#reaction-image {
    height: 60%;
}

#reaction-button {
    width: 55%;
}

.box-outer-div {
    top: 15%;
    left: 10%;
    width: 80%;
    height: 70%;
    flex-direction: row-reverse;
}

.box-image-div {
    width: 50%;
    height: 25%;
}

.minesweeper-backdrop {
    flex-direction: column;
}

.minesweeper-backdrop > p {
    height: auto;
    width: 100%;
    flex-basis: 0;
}

.event-mine-bg {
    left: 0;
    top: 0;
    left: 0;
    height: 60%;
    aspect-ratio: 1;
}

.event-mine-bg > tr > td {
    width: 12%;
    height: 12%;
    background-size: cover;
}

#mine-info {
    position: relative;
    flex-direction: row;
    height: 20%;
    width: 90%;
}

#mine-info > img {
    height: 100%;
    width: 50%;
    object-fit: contain;
}

.weasel-back {
    aspect-ratio: 1.23;
    max-height: 70%;
    height: unset;
    width: 80%;
    left: 0;
    top: -5%;
}

.weasel-timer-div {
    left: 0;
    height: auto;
    top: -5%;
}

#fake-weasel-alert {
    width: 70%;
    height: 8%;
    font-size: 1.5em;
}

/*////////////////////////// ADVENTURE MOBILE CSS //////////////////////////*/
.char-select {
    height: 17%;
}

.char-menu {
    height: 70%;
    max-height: unset;
    top: 20%;
    width: auto;
}

.char-morale > p {
    bottom: 135%;
}

.exped-xpbar,.drag-icon {
    bottom: 3%;
}

.drag-icon  {
    height: 13%;
}

.exped-xpbar {
    width: 80%;
}

.notif-select {
    height: 13%;
    right: 0;
    aspect-ratio: 4;
}

#zoom-scroller {
    right: 1.5%;
    bottom: 20%;
    width: auto;
    height: 25%;
}

#zoom-scroller > button {
    font-size: 4vw;
}

.exped-loot {
    overflow-y: auto;
    justify-content: flex-start;
}

.inv-div {
    flex-grow: 0;
    height: 90%;
    overflow-y: unset;
}

#adventure-button {
    max-height: 17%;
    height: auto;
    flex-grow: 1;
}

.adventure-video {
    width: 98%;
}
/* 
#adventure-health {
    width: 95%;
    height: 5%;
    left: unset;
    transform: none;
} */

.adventure-text {
    max-height: 43%;
    height: auto;
    width: 99%;
}

.adventure-fight {
    aspect-ratio: unset;
}

.adventure-fight > p {
    font-size: 1.7em;
}

#adventure-gif,#combo-number {
    top: 8%;
    font-size: 1.2em;
}

.rank-button {
    height: unset;
    width: 100%;
    flex-basis: 15%;
}

.rank-button > p {
    font-size: 1.6em;
    filter: drop-shadow(0 0 0.2em #3556B0);
}

.rank-menu {
    flex-wrap: wrap;
}

.rank-menu > :first-child {
    flex-direction: column;
    height: 100%;
    width: 25%;
    overflow-x: hidden;
    overflow-y: scroll;
}

.rank-lore {
    width: 73%;
    height: 85%;
    font-size: 1.2em;
}

.rank-lore > div {
    height: 30%;
}

.rank-menu > :last-child {
    height: 14%;
}

/* .select-indicator {
    top: 15%;
    width: 30%;
} */

#adventure-encounter {
    width: 95%;
}

.notif-ele > div {
    width: 60%;
    max-width: 60%;
 }


/* PHONE SPECIFIC CSS */
@media (max-aspect-ratio: 9.5 / 9) {
    .settings-menu {
        max-height: 50%;
        aspect-ratio: 1.18;
    }

    .notif-select {
        height:10%;
    }

    .notif-ele > div {
       width: 60%;
       max-width: 60%;
    }

    .notif-item {
        grid-template-columns: repeat(4, 25%);
    }
}