@charset "UTF-8";

/* ==========================================================================
   1. リセットCSS
   ========================================================================== */
*,*::before,*::after{box-sizing:border-box}
html{-moz-text-size-adjust:none;-webkit-text-size-adjust:none;text-size-adjust:none}
body,h1,h2,h3,h4,p,figure,blockquote,dl,dd{margin:0}
ul[role='list'],ol[role='list']{list-style:none}
body{min-height:100vh;line-height:1.5}
h1,h2,h3,h4,button,input,label{line-height:1.1}
h1,h2,h3,h4{text-wrap:balance}
a:not([class]){text-decoration-skip-ink:auto;color:currentColor}
img,picture{max-width:100%;display:block}
input,button,textarea,select{font:inherit}
textarea:not([rows]){min-height:10em}
:target{scroll-margin-block:5ex}


/* ==========================================================================
   2. 基本スタイル
   ========================================================================== */
html {
    overflow: auto;
}

body {
    overflow-x: hidden;
    overflow-y: hidden;
    margin: 0;
    padding: 0;
    font-family: 'Yu Gothic','ヒラギノ角ゴシック','Hiragino Sans', sans-serif;
    font-weight: bold;
    line-height: 2;
    color: #000;
    background-color: #fff;
    background-image: url("http://novel.test2223.com/wp-content/uploads/2025/11/Group-28-scaled.webp");
    background-size: cover;
}

img {
    width: 70%;
}

.start-img,
.popup img {
    width: 90%;
}

#test {
    display: none;
}


/* ==========================================================================
   3. ノベル画面 (#screen)
   ========================================================================== */
#screen {
    position: relative;
    max-width: 420px;
    width: 100%;
    max-height: 700px;
    margin: auto;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    position: absolute;
    background-color: #000;
    overflow: hidden;
    border: 2px solid #000;
}


/* ==========================================================================
   4. キャラクター表示
   ========================================================================== */
.charabox {
    position: relative;
    height: -webkit-fill-available;
}

.charaposition {
    position: absolute;
    width: 220px;
    height: 615px;
    bottom: -35px;
    text-align: center;
    z-index: 2;
}

.charaposition img {
    transition: transform 0.5s;
    margin: 0 auto;
}

/* キャラクター位置 */
#charaposition1 {
    left: -30px;
    bottom: -50px;
    width: 70%;
}

#charaposition2 {
    right: -30px;
    bottom: -50px;
    width: 70%;
}

#charaposition3 {
    left: 0;
    right: 0;
    margin: auto;
    width: 270px;
    transition: transform 3s;
}

/* キャラクター演出 */
.chara-none {
    opacity: 0.4;
    transform: scale(0.95, 0.95);
    transition: transform 0.2s;
}

.chara-none1 {
    opacity: 0.4;
    transform: scale(0.95, 0.95);
    transition: transform 0.2s;
}

.chara-none2 {
    opacity: 0.4;
    transform: scale(0.95, 0.95);
    transition: transform 0.2s;
}

.chara-none3 {
    opacity: 0.4;
    transform: scale(0.95, 0.95);
    transition: transform 0.2s;
}

/* キャラクター移動エフェクト */
.left-in {
    transition: transform 3s;
    transform: translateX(250px) !important;
}

.right-in {
    transition: transform 3s;
    transform: translateX(-250px) !important;
}

.bottom-up {
    transform: translateY(500px) !important;
}


/* ==========================================================================
   5. 背景画像
   ========================================================================== */
#bgimg {
    position: absolute;
    width: 110%;
    z-index: 1;
    object-fit: cover;
}


/* ==========================================================================
   6. メッセージボックス
   ========================================================================== */
#messbox {
    position: absolute;
    height: 45%;
    bottom: 24px;
    width: 92%;
    left: 0px;
    right: 0px;
    max-height: 320px;
    margin: auto;
    background-image: url("http://novel.test2223.com/wp-content/uploads/2025/11/Group-1.webp");
    z-index: 3;
    box-shadow: 0px 5px 15px 0px rgba(0, 0, 0, 0.2);
    border: 4px solid transparent;
    border-image: linear-gradient(90deg, #2BCCCC 0%, #0681D3 100%) 1;
    background-size: cover;
}

#textbox {
    position: relative;
    width: 90%;
    height: 90%;
    margin: -10px auto;
    margin-top: 20px;
}

#text {
    color: #1E1E1E;
    font-size: 16px;
    line-height: 2;
    margin: 0;
}

#namebox {
    display: none;
}

#name {
    border-bottom: 1px solid #aaaaaa;
    padding-bottom: 8px;
    color: #1E1E1E;
    font-size: 20px;
    margin: 12px 0;
}

/* TAPインジケーター */
#tap-indicator {
    position: absolute;
    color: #000000;
    bottom: 10px;
    right: 10px;
    font-size: 16px;
    font-weight: bold;
    animation: bounceFromRight 4s ease-in-out infinite;
    z-index: 5;
}

.tap {
    position: absolute;
    color: #593118;
    bottom: 20px;
    right: 0;
    animation: rightLeft 1s ease-in-out;
    animation-iteration-count: infinite;
}


/* ==========================================================================
   7. 選択肢
   ========================================================================== */
.selectBox {
    position: absolute;
    top: 0px;
    padding-top: 180px;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, .5);
    z-index: 10;
    display: none;
}

.select {
    border: solid 4px #0681D3;
    border-radius: 50px;
    width: 350px;
    margin: 0 auto;
    margin-top: 30px;
    display: grid;
    background: #fff;
}

.select a {
    text-decoration: none;
}

.selectText {
    margin: 15px auto;
    text-align: center;
    color: #333;
    font-size: 14px;
    padding: 0 20px;
    line-height: 1.5;
}

/* choice-buttonクラス(もし使ってる場合) */
.choice-button {
    display: block;
    text-decoration: none;
    color: inherit;
}


/* ==========================================================================
   8. ハンバーガーメニュー
   ========================================================================== */
#overlay-button {
    position: absolute;
    right: 15px;
    top: 15px;
    padding: 23.5px 16px;
    z-index: 500;
    cursor: pointer;
    user-select: none;
    background-image: linear-gradient(125deg, rgba(255, 255, 255, 1) 50%, rgba(244, 244, 244, 1) 50%);
    border-radius: 50%;
    box-shadow: 0px 5px 15px 0px rgba(0, 0, 0, 0.2);
}

#overlay-button span {
    height: 3px;
    width: 18px;
    border-radius: 2px;
    background-color: #593118;
    position: relative;
    display: block;
    transition: all .2s ease-in-out;
}

#overlay-button span:before {
    top: -8px;
    visibility: visible;
}

#overlay-button span:after {
    top: 8.5px;
}

#overlay-button span:before,
#overlay-button span:after {
    height: 3px;
    width: 18px;
    border-radius: 2px;
    background-color: #593118;
    position: absolute;
    content: "";
    transition: all .2s ease-in-out;
}

#overlay-button:hover span,
#overlay-button:hover span:before,
#overlay-button:hover span:after {
    background: #593118;
}

input[type=checkbox] {
    display: none;
}

input[type=checkbox]:checked ~ #overlay {
    visibility: visible;
}

input[type=checkbox]:checked ~ #overlay-button:hover span,
input[type=checkbox]:checked ~ #overlay-button span {
    background: transparent;
}

input[type=checkbox]:checked ~ #overlay-button span:before {
    transform: rotate(45deg) translate(6px, 6px);
}

input[type=checkbox]:checked ~ #overlay-button span:after {
    transform: rotate(-45deg) translate(6px, -6px);
}

#overlay {
    height: 100vh;
    max-height: 900px;
    width: 100%;
    background-color: hsl(0deg 0% 0% / 70%);
    z-index: 200;
    visibility: hidden;
    position: absolute;
    background-size: cover;
}

#overlay ul {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    height: 100vh;
    max-height: 900px;
    padding-left: 0;
    list-style-type: none;
}

#overlay ul li {
    padding: 1em;
    width: 100%;
    color: white;
}

#overlay ul li a {
    text-decoration-line: unset;
}

#overlay ul li a:hover {
    color: #000!important;
}


/* ==========================================================================
   9. ポップアップ
   ========================================================================== */
.popupbox {
    position: absolute;
    top: 0px;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .8);
    z-index: 11;
    display: none;
    overflow-y: auto;
}

.popup-container {
    position: relative;
    width: 90%;
    max-width: 500px;
    max-height: 500px;
    margin: 60px auto 20px auto;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 10px 30px 0px rgba(0, 0, 0, 0.3);
}

.popup-content {
    max-height: inherit;
    overflow-y: auto;
    overflow-x: hidden;
}

.popup-content::-webkit-scrollbar {
    width: 8px;
}

.popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.popup-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.popup-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.popup-image {
    width: 100%;
    height: auto;
    display: block;
}

.popup-html {
    padding: 20px;
    line-height: 1.6;
}

.popup-buttons {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 12;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.popupbutton,
.contactbutton {
    position: relative;
    padding: 16px 32px;
    border: solid 3px #0681D3;
    background: linear-gradient(90deg, rgba(247, 208, 93, 1), rgba(254, 153, 64, 1));
    border-radius: 50px;
    box-shadow: 0px 5px 15px 0px rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 200px;
    margin: 0;
}

.popupbutton:hover,
.contactbutton:hover {
    transform: translateY(-2px);
    box-shadow: 0px 7px 20px 0px rgba(0, 0, 0, 0.3);
}

.popupbutton:active,
.contactbutton:active {
    transform: translateY(0);
    box-shadow: 0px 3px 10px 0px rgba(0, 0, 0, 0.2);
}

#contactbutton {
    display: block;
    text-align: center;
}

#contactbutton-text {
    text-align: center;
}

/* ポップアップ内フォーム(Contact Form 7対応) */
.popup-html .wpcf7-form {
    margin: 0;
}

.popup-html .wpcf7-form input[type="text"],
.popup-html .wpcf7-form input[type="email"],
.popup-html .wpcf7-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
}

.popup-html .wpcf7-form input[type="submit"] {
    background: linear-gradient(90deg, rgba(247, 208, 93, 1), rgba(254, 153, 64, 1));
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
}

.popup-html .wpcf7-form input[type="submit"]:hover {
    opacity: 0.9;
}

.popup-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.popup-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top: 2px solid #666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}


/* ==========================================================================
   10. アーティファクト(アイテム表示)
   ========================================================================== */
.artifactbox {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.artifactposition {
    position: absolute;
    top: 75px;
    text-align: center;
    pointer-events: none;
}

.artifactposition img {
    transition: transform 0.5s, opacity 0.5s;
    margin: 0 auto;
    object-fit: contain;
    max-height: 300px;
}

#artifactposition1 {
    left: 10px;
    max-width: 170px;
}

#artifactposition2 {
    right: 10px;
    max-width: 170px;
}

#artifactposition3 {
    left: 0;
    right: 0;
    margin: auto;
    max-width: 250px;
}

.artifact-none {
    opacity: 0.6;
    transform: scale(0.95, 0.95);
    transition: transform 0.2s, opacity 0.2s;
}

.artifact-fadein {
    animation-name: fadein;
    animation-fill-mode: forwards;
    animation-duration: 0.5s;
    animation-timing-function: ease;
}

.artifact-fadeout {
    animation-name: fadeout;
    animation-fill-mode: forwards;
    animation-duration: 0.5s;
    animation-timing-function: ease;
}


/* ==========================================================================
   11. シーンタイトル
   ========================================================================== */
#scene-title {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 5;
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    pointer-events: none;
}

#scene-title.show {
    opacity: 1;
    transform: translateX(0);
}

.scene-title-box {
    background: none;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 0;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    min-width: auto;
    text-align: left;
}

.scene-title-box.fade-in {
    animation: titleSlideInFromLeft 1.0s ease-out;
}

.scene-title-box.fade-out {
    animation: titleSlideOutToRight 0.8s ease-in;
}


/* ==========================================================================
   12. タップエフェクト
   ========================================================================== */
.tap-effect {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
    animation: tapRipple 0.6s ease-out;
    z-index: 9999;
}

.tap-effect-color {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(43, 204, 204, 0.6) 0%, rgba(6, 129, 211, 0.3) 50%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
    animation: tapRipple 0.6s ease-out;
    z-index: 9999;
}

.tap-effect-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: transparent;
    pointer-events: none;
    animation: tapRing 0.5s ease-out;
    z-index: 9999;
    transform: translate(-50%, -50%) scale(0.5);
}


/* ==========================================================================
   13. アニメーション定義
   ========================================================================== */
/* フェードイン・フェードアウト(キーフレーム) */
@keyframes fadein {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fadeout {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes fadeoutin {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* フェードクラス(背景・キャラクター変更に使用) */
.fadein {
    animation-name: fadein;
    animation-fill-mode: forwards;
    animation-duration: .5s;
    animation-timing-function: ease;
}

.fadeout {
    animation-name: fadeout;
    animation-fill-mode: forwards;
    animation-duration: .5s;
    animation-timing-function: ease;
}

.fadeoutin {
    animation-name: fadeoutin;
    animation-fill-mode: forwards;
    animation-duration: 3s;
    animation-timing-function: ease;
}

/* その他アニメーション */

@keyframes rightLeft {
    0% {
        transform: translateX(0px);
    }
    15% {
        transform: translateX(10px);
    }
    30% {
        transform: translateX(0px);
    }
    45% {
        transform: translateX(10px);
    }
    60% {
        transform: translateX(0px);
    }
    75% {
        transform: translateX(10px);
    }
    90% {
        transform: translateX(0px);
    }
    100% {
        transform: translateX(0px);
    }
}

@keyframes bounceFromRight {
    0%, 100% {
        transform: translateX(0);
        opacity: 1;
    }
    50% {
        transform: translateX(-5px);
        opacity: 0.7;
    }
}

@keyframes titleSlideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes titleSlideOutToRight {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(100px);
    }
}

@keyframes tapRipple {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 100px;
        height: 100px;
        opacity: 0;
    }
}

@keyframes tapRing {
    0% {
        width: 20px;
        height: 20px;
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.5);
    }
    100% {
        width: 80px;
        height: 80px;
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* ==========================================================================
   14. その他キャラクターアニメーション
   ========================================================================== */
.left-lean {
    transform: rotate(-5deg);
}

.right-lean {
    transform: rotate(5deg);
}

.pyon {
    animation: pyon 0.4s linear 1;
}

@keyframes pyon {
    0%   { transform: scale(1.0, 1.0) translate(0%, 0%); }
    10%  { transform: scale(1.1, 0.9) translate(0%, 5%); }
    30%  { transform: scale(1.2, 0.8) translate(0%, 15%); }
    50%  { transform: scale(1.0, 1.0) translate(0%, 0%); }
    60%  { transform: scale(0.9, 1.2) translate(0%, -80%); }
    75%  { transform: scale(0.9, 1.2) translate(0%, -20%); }
    85%  { transform: scale(1.2, 0.8) translate(0%, 15%); }
    100% { transform: scale(1.0, 1.0) translate(0%, 0%); }
}

.buruburu {
    animation: buruburu01 .1s  infinite;
}

@keyframes buruburu01 {
    0% {
        transform: translate(0, 2px) rotateZ(0deg);
    }
    25% {
        transform: translate(2px, 0) rotateZ(1deg);
    }
    50% {
        transform: translate(2px, 2px) rotateZ(0deg);
    }
    75% {
        transform: translate(2px, 0) rotateZ(-1deg);
    }
    100% {
        transform: translate(0, 0) rotateZ(0deg);
    }
}

.step {
    animation: step 1s ease-in-out infinite;
}

@keyframes step {
    0% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(-60px, -80px) rotate(-20deg);
    }
    50% {
        transform: translate(0, 0);
    }
    75% {
        transform: translate(60px, -80px) rotate(20deg);
    }
    100% {
        transform: translate(0, 0);
    }
}


/* ==========================================================================
   15. レスポンシブ対応
   ========================================================================== */
@media (max-width: 600px) {
    body {
        background-image: unset;
    }
    
    #screen {
        max-width: 600px;
    }
    
    #scene-title {
        top: 15px;
        left: 15px;
    }
    
    .scene-title-box {
        font-size: 16px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .popup-container {
        width: 95%;
        margin: 40px auto 20px auto;
        max-height: 70vh;
    }
    
    .popup-html {
        padding: 15px;
    }
    
    .popup-buttons {
        bottom: 15px;
    }
    
    .popupbutton,
    .contactbutton {
        min-width: 180px;
        font-size: 16px;
    }
}

@media (max-height: 600px) {
    .popup-container {
        max-height: 50vh;
        margin: 20px auto 10px auto;
    }
    
    .popup-buttons {
        bottom: 10px;
    }
}