@charset "utf-8";

/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* http://www.rain-road.com/font/
   DEKISOKONAIFONT by rain-road
*/
@font-face {
    font-family: dekisokonai;
    src: url('../font/dekisokonaifont.ttf') format('truetype');
    src: url('../font/dekisokonaifont.woff') format('woff');
}

:root {
    --mainBg: #f3f3f3;
    --mainInk: #333333;
}

header,
#loading,
#textDisplay,
#coinDisplay,
#korogiDisplay,
#cursor,
#stpbox,
#leftpad,
#rightpad,
#spacepad,
#copy {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;

    -webkit-touch-callout: none;
}

#leftpad:before,
#rightpad:before,
#spacepad:before {
    content: "";
    display: inline-block;
    height: 95px;
    vertical-align: middle;
}

html {
    touch-action: manipulation;
}

* {
    padding: 0;
    margin: 0;
}

a {
    color: var(--mainInk);
    text-decoration: none;
}

body {
    background: var(--mainBg);
    color: var(--mainInk);
    font-family: dekisokonai, 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', Osaka, 'メイリオ', Meiryo, 'ＭＳ Ｐゴシック', 'MS PGothic', sans-serif;
}

.notice {
    z-index: 99;
    width: 90%;
    max-width: 720px;
    height: 70px;
    padding: 20px;
    border-radius: 15px;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    background-color: rgba(256, 256, 256, 0.5);
    font-size: 50px;
    text-align: center;
    position: fixed;
    inset: 0;
    margin: 10px auto 0;
}

.hidden {
    display: none;
}

.popup {
    animation: popup 2.5s forwards;
}

@keyframes popup {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    15%, 85% {
        transform: none;
        opacity: 1;
    }
    100% {
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
    }
}

header{
    position: relative;
    width: 800px;
    margin: 0px auto;
    height: 30px;
}

#linkBox {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
}

.goLink {
    padding-top: 5px;
    font-size: 30px;
    display: inline-block;
    position: absolute;
    padding-left: 45px;
}

.goLink::after {
    content: '';
    position: absolute;
    display: inline-block;
    background-size: 40px;
    top: 5px;
    left: 0px;
    width: 40px;
    height: 40px;
}

#goHome::after {
    background-image: url(../img/home_icon.webp);
}

#goShop::after {
    background-image: url(../img/leopashop_icon.webp);
}

#goEx::after {
    background-image: url(../img/item_x4.webp);
    background-size: 120px;
    top: 5px;
    left: 0px;
    width: 30px;
    height: 30px;
}

#gamebox {
    position: relative;
    width: 800px;
    margin: 0px auto;
}

#slBox {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 320px;
    margin-left: 240px;
}

#saveBtn, #loadBtnL {
    background: var(--mainBg);
    color: var(--mainInk);
    text-align: center;
    font-family: dekisokonai;
    display: inline-block;
    padding-top: 5px;
    border: none;
    cursor: pointer;
    font-size: 30px;
}
input[type="file"] {
    display: none;
}

.emoji {
    font-size: 20px;
}

canvas {
    display: block;
}

.coinOff,
.korogiOff {
    display: none;
}

.coinOn::before,
.korogiOn::before {
    content: '';
    position: absolute;
    display: inline-block;
    background-image: url(../img/item_x4.webp);
    background-size: 80px;
    top: 11px;
    left: 0px;
    width: 20px;
    height: 20px;
}

.coinOn::before {
    background-position-x: -40px;
}

.stpcheck {
    display: none;
}

.stplabel {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 30px;
    border-radius: calc(30px / 2);
    background: #cccccc;
    transition: background 200ms;
}

.stplabel::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    display: block;
    width: calc(30px - 4px);
    height: calc(30px - 4px);
    border-radius: calc((30px - 4px) / 2);
    background: #ffffff;
    transform: translateX(0);
    transition: transform 200ms;
    box-shadow: 0 3px 3px rgba(0, 0, 0, .2), 0 0 0 0 #dddddd;
}

.stpcheck:checked+.stplabel {
    background: rgba(50, 173, 230, 1);
}

.stpcheck:checked+.stplabel::before {
    transform: translateX(calc((50px - 4px) - (30px - 4px)));
    box-shadow: 0 0 0 0 transparent, 0 3px 3px rgba(0, 0, 0, .3);
}

@keyframes fadeout {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        display: none;
    }
}

@keyframes fadein {
    from {
        display: inline;
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.default {
    display: none;
}

.show {
    animation: fadein .2s linear 0s;
    animation-fill-mode: forwards;
}

.hide {
    animation: fadeout .2s linear 0s;
    animation-fill-mode: forwards;
}

@media(prefers-color-scheme: dark) {
    :root {
        --mainBg: #272822;
        --mainInk: #ffffff;
    }

    .stpcheck:checked+.stplabel {
        background: rgba(100, 210, 255, 1);
    }

    .notice {
        background-color: rgba(0, 0, 0, .5);
    }
}