:root{
    --safe-area-inset-bottom: env(safe-area-inset-bottom);
    --sad-height: 50px;
}

html,
body {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    color: #333;
    margin: 0;
    padding: 8px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

a {
    color: rgb(0, 100, 200);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:visited {
    color: rgb(0, 80, 160);
}

label {
    display: block;
}

input,
button,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    -webkit-padding: 0.4em 0;
    padding: 0.4em;
    margin: 0 0 0.5em 0;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 6px;
}

input:disabled {
    color: #ccc;
}

button {
    color: #333;
    background-color: #f4f4f4;
    outline: none;
}

button:disabled {
    color: #999;
}

button:not(:disabled):active {
    background-color: #ddd;
}

button:focus {
    border-color: #666;
}

.snackbar-container {
    width: 100%;
    padding: 0 16px;
    justify-content: center;
    position: absolute;
    z-index: 9999;
    top: 60px;
}

#snackbar {
    visibility: hidden;
    opacity: 0;
    /* Hidden by default. Visible on click */
    background-color: var(--color-tone-1);
    color: var(--color-tone-7);
    font-weight: 600;
    text-align: center;
    border-radius: 5px;
    padding: 10px 16px;
    max-width: var(--game-max-width);
    margin: auto;
    width: fit-content;
    -webkit-transition: visibility 0.3s ease-in-out, opacity 0.3s ease-in-out;
    transition: visibility 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#snackbar.show {
    visibility: visible;
    opacity: 1;
    -webkit-transition: visibility 0.3s ease-in-out, opacity 0.3s ease-in-out;
    transition: visibility 0.3s ease-in-out, opacity 0.3s ease-in-out;
}







.ad-main-index {
    position: absolute;
    bottom: var(--safe-area-inset-bottom);
    width: 100%;
    max-width: var(--game-max-width);
    left: 0;
    right: 0;
    margin: 0 auto;
    background-color: var(--color-tone-5);
}

.sponsored{
    font-size: 12px;
    font-weight: 700;
    margin: 20px 0 0 0;
    justify-content: center;
    text-align: center;
    color: var(--color-tone-2);
    background-color: var(--color-tone-5);
    height: 20px;
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
    display: flex;
    align-items: center;
    display: none;
}

.ad-main {
    margin-top: 0;
    background-color: var(--color-tone-5);
    position: absolute;
    bottom: var(--safe-area-inset-bottom);
    width: 100%;
}

@media only screen and (min-height : 100px) and (max-height : 720px) {
    :root {
        --sad-height: 50px !important;
    }
}

@media only screen and (min-height : 720px) {
    :root {
        --sad-height: 125px !important;
    }
}

@media only screen and (max-width : 910px) {
    .ad-left,
    .ad-right {
        display: none !important;
    }
}

@media only screen and (min-width : 910px) {
    .ad-left {
        position: absolute !important;
        left: 0;
        margin: auto 0;
        top: 0;
        bottom: 0;
        align-items: center;
        width: calc(50% - var(--game-max-width)/2);
    }

    .ad-right {
        position: absolute !important;
        right: 0;
        margin: auto 0;
        top: 0;
        bottom: 0;
        align-items: center;
        width: calc(50% - var(--game-max-width)/2);
    }
}

@-webkit-keyframes fadein {
    from {
        top: 0;
        opacity: 0;
    }

    to {
        top: 60px;
        opacity: 1;
    }
}

@keyframes fadein {
    from {
        top: 0;
        opacity: 0;
    }

    to {
        top: 60px;
        opacity: 1;
    }
}

@-webkit-keyframes fadeout {
    from {
        top: 60px;
        opacity: 1;
    }

    to {
        top: 0;
        opacity: 0;
    }
}

@keyframes fadeout {
    from {
        top: 60px;
        opacity: 1;
    }

    to {
        top: 0;
        opacity: 0;
    }
}
