@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.fade-in {
    animation: fadeIn 0.4s forwards;
}

.fade-out {
    animation: fadeOut 0.4s forwards;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 50px;
    /*
    background-color: rgb(254, 255, 203);
    */
    padding: 5px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 10;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

#headerLeftItems {
    align-items: left;
    position: relative;
}

#headerIndexLink {
    font-family: "Sen", "Zen Old Mincho", sans-serif;
    color: #000000;
    text-decoration: none;
    font-weight: bold;
}

#headerCenterItems {
    display: flex;
    gap: 10px;
    align-items: center;
    position: relative;
    height: fit-content;
}

#headerRightItems {
    position: absolute;
    gap: 10px;
    right: 3%;
}

#headerRightItems img {
    height: 30px;
    width: auto;
    top: 8.5px;
    position: relative;
}

#headerRightItems button,
#modalExitButton {
    border-color: #000000;
    background-color: inherit;
    font-size: large;
}

#headerSpacer {
    margin-top: 60px
}

body {
    /*
    background-color: rgb(254, 255, 203);
    */
    color: rgb(0, 0, 0);
    /* background-imageはglobal.jsで */
    font-size: 18px;
    /* 参考サイトと同じサイズではない */

    vertical-align: middle;
    /* 子要素を横方向中央揃え */
    min-height: 100vh;
    /* 高さを画面いっぱいに */
    margin: 0 auto;
    /* デフォルトの余白をなくす */
    text-align: center;
    /* テキストの中央揃え（既にOK） */
    word-break: break-all;
}

body.lang-ja {
    font-family: "fot-tsukuardgothic-std", sans-serif;
}

body.lang-en {
    font-family: "Sen", sans-serif;
}

body.lang-th {
    font-family: "Sen", sans-serif;
}

body.lang-zh {
    font-family: "fot-tsukuardgothic-std", sans-serif;
}

body.lang-es {
    font-family: "Sen", sans-serif;
}

body.lang-fr {
    font-family: "Sen", sans-serif;
}

body.lang-de {
    font-family: "Sen", sans-serif;
}

body.lang-it {
    font-family: "Sen", sans-serif;
}

body.lang-nl {
    font-family: "Sen", sans-serif;
}

body.lang-ru {
    font-family: "fot-tsukuardgothic-std", sans-serif;
}

body.lang-ar {
    font-family: "fot-tsukuardgothic-std", sans-serif;
}

body.lang-ko {
    font-family: "fot-tsukuardgothic-std", sans-serif;
}

.lang-undefined {
    font-family: "Sen", sans-serif;
}

#languageSelect {
    text-align: center;
}

#modals {
    display: flex;
    justify-content: center;
    /* 中央揃え */
    align-items: center;
    box-sizing: border-box;
}

#modalOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    /* 黒の40%透明 */
    z-index: 99;
    /* モーダルより下、headerより上 */
}

#modals div {
    display: block;
    position: fixed;
    background-color: #FFFFFF;
    top: 0%;
    width: 40%;
    min-width: 300px;
    padding: 5px;
    border-radius: 10px 10px 10px 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 100;
    /* アニメーション用 */
    transform: translateY(-200%);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

#modals div.show {
    transform: translateY(80%);
    opacity: 1;
}

#modalExitButton {
    position: absolute;
    right: 10%;
}

#modals div ul {
    list-style: none;
    text-align: center;
}

.normal-link {
    text-decoration: none;
    color: rgb(0, 0, 0);
    transition: color 0.3s ease;
}

.underlined-link {
    color: rgb(51, 78, 255);
    text-decoration: underline;
    transition: color 0.3s ease;
}

#backgroundLayer {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.7;
    background-position: center;
    position: fixed;
    z-index: -1;
}

a:link,
#toSomethingPageContainer li:link .underlined-link,
#toSomethingPageContainer ul li.hover-disabled:hover .underlined-link {
    color: rgb(51, 78, 255);
}

a:visited,
#toSomethingPageContainer li:visited .underlined-link {
    color: blue;
}

a:hover,
#toSomethingPageContainer li:hover .underlined-link {
    color: brown;
}

a:active,
#toSomethingPageContainer li:active .underlined-link {
    color: chartreuse;
}

.temp-comment {
    color: rgb(255, 0, 0);
}

.buruburu {
    display: inline-block;
    animation: hurueru .1s infinite;
}

@keyframes hurueru {
    0% {
        transform: translate(0px, 0px) rotateZ(0deg)
    }

    25% {
        transform: translate(2px, 2px) rotateZ(1deg)
    }

    50% {
        transform: translate(0px, 2px) rotateZ(0deg)
    }

    75% {
        transform: translate(2px, 0px) rotateZ(-1deg)
    }

    100% {
        transform: translate(0px, 0px) rotateZ(0deg)
    }
}

/* 文字の下に文字背景が来るから文字の下に色背景を設置 */
#contents>h1,
#contents section h1,
#contents>h2,
#contents>h3,
#contents>p,
#contents>section>p,
#contents>span,
#contents>img,
#contents button,
#contents select,
#numericData span,
#backgroundColorSettingContainer,
/*
#indexContentsContainer div,
#indexContentsContainer p,
*/
#creditContentsContainer div,
#logContentsContainer div,
#memoContentsContainer section,
#pacmanGameContainer,
#termsOfUseContentsContainer1,
#termsOfUseContentsContainer2,
#toSomethingPageContainer ul h2,
#toSomethingPageContainer ul li {
    background-color: rgba(255, 255, 255);
}

select {
    background-color: inherit;
    color: inherit;
    font-family: inherit;
    border-style: solid;
    border-radius: 5px;
    border-width: 1px;
    height: 1.5em;
}

#contents {
    /* width は動的に変更(モバイルなら100%でPCなら70%) */
    margin: 0 auto;
    /* 中央揃え */
    padding: 0;
    text-align: center;
    box-sizing: border-box;
}

.reveal {
    opacity: 0;
    transform: scale(0.5);
    transform-origin: center center;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1), opacity 0.8s ease-out;
    pointer-events: none;
    /* 透明時にクリック無効 */
}

.reveal.show {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

#toSomethingPageContainer {
    text-align: left;
}

h1 {
    display: block;
    margin: 0;
    padding: 5px 0;
    border-radius: 15px;
    text-align: center;
}

h2 {
    margin: 0;
    padding: 5px 0;
    border-radius: 15px;
}

h3 {
    margin: 0;
    padding: 5px 0;
}

p {
    margin: 0;
    padding: 5px 0;
}

span {
    margin: 0;
    padding: 5px 0;
}

hr {
    display: block;
    /* いらない可能性出てきた */
    height: 5px;
    margin: 0;
    unicode-bidi: isolate;
    overflow: hidden;
    border-style: inset;
    border-width: 0;
}

#contents>hr,
#contents>section>hr {
    height: 90px;
}

ul {
    padding-left: 0;
}

p {
    margin: 0;
}

#toSomethingPageContainer>ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

#toSomethingPageContainer>ul>h2 {
    padding: 5px;
    flex-basis: 100%;
}

/* a.full-link を li 全体に広げて裏に置く */
#toSomethingPageContainer>ul>li>a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

#toSomethingPageContainer>ul>li:hover {
    background-color: rgb(232, 232, 232);
}

#toSomethingPageContainer>ul>li.hover-disabled:hover {
    background-color: inherit;
}

#toSomethingPageContainer>ul>li,
#backgroundColorSettingContainer>ul>li>p {
    list-style: none;
    flex: 1 1 100%;
    border: solid 2px #3a3a3a;
    border-radius: 10px;
    margin: 5px 0;
    padding: 10px 15px;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
    box-sizing: border-box;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@supports (width: min(100%, 400px)) {

    #toSomethingPageContainer>ul>li,
    #backgroundColorSettingContainer>ul>li>p {
        flex: 1 1 min(100%, 400px);
    }
}

#scrollButtonContainer button {
    background-color: white;
    color: black;
    border: 2px solid black;
    position: fixed;
    bottom: 10px;
    padding: 8px 8px;
    font-size: 20px;
    border-radius: 40px;
    z-index: 98;
}

#scrollToLeftButton {
    right: 130px;
}

#scrollToFrontButton {
    right: 90px;
}

#scrollToBottomButton {
    right: 50px;
}

#scrollToRightButton {
    right: 10px;
}

.temp-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10vw;
    opacity: 0.9;
    z-index: 100;
    /* もうとにかく最前面 */
    transition: all 1s ease;
    pointer-events: none;
    user-select: none;
}

footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    /*background-image: url('../cmn/images/BackgroundQ15.png');*/
    background-position: 0px;
    background-size: auto;
    background-color: rgba(255, 255, 255, 0.8);
    color: rgb(255, 255, 255);
    text-align: center;
    font-family: "Sen", sans-serif;
    padding: 10px 0;
    font-size: 20px;
    z-index: 1000;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

footer section a,
footer section div {
    transition: background-color 0.5s ease;
    /* ゆっくり変化 */
    padding-right: 15px;
    border-right-width: 1px 0 0 0;
    border-right-style: dotted;
    border-right-color: #1e88e5;
    margin-right: 15px;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.last-footer-link {
    transition: color 0.3s ease;
    /* ゆっくり変化 */
    border-right: none;
    margin-right: 0;
    padding-right: 0;
}

#footerSpacer {
    margin-bottom: 60px;
}

/*
* {
    outline: 1px solid red;
}