@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@700;800&display=swap');

        :root {
            --bg-color: #e0f2f1;
            --main-color: #ff8c00;
            --accent-color: #4682b4;
            --text-color: #333;
            --font-family: 'M PLUS Rounded 1c', sans-serif;
            --success-color: #4caf50;
            --fail-color: #f44336;
            --x-color: #000000;
            --line-color: #06C755;
        }

        body {
            font-family: var(--font-family);
            background-color: var(--bg-color);
            margin: 0; padding: 0; display: flex;
            justify-content: center; align-items: center;
            min-height: 100vh; color: var(--text-color); overflow: hidden;
            -webkit-user-select: none; user-select: none;
        }

        #game-container {
            width: 100%; max-width: 450px; height: 100vh; max-height: 900px;
            background-color: #fff; border-radius: 20px;
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
            position: relative; overflow: hidden; display: flex; flex-direction: column;
        }

        /* --- 画面制御 --- */
        .screen {
            position: absolute; width: 100%; height: 100%;
            display: flex; flex-direction: column; align-items: center;
            padding: 20px; box-sizing: border-box; opacity: 0;
            transform: scale(0.95);
            transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
            visibility: hidden;
        }
        .screen.active { opacity: 1; transform: scale(1); visibility: visible; }

        h1, h2 { text-align: center; margin: 0.5em 0; }
        
        button {
            font-family: var(--font-family); font-size: 1.3em; font-weight: 800;
            padding: 15px 30px; border: none; border-radius: 50px;
            background-color: var(--main-color); color: white; cursor: pointer;
            box-shadow: 0 5px 0 #c86e00; transition: all 0.2s ease;
            -webkit-tap-highlight-color: transparent; flex-shrink: 0;
        }
        button:hover { background-color: #ff9d2a; transform: translateY(-2px); box-shadow: 0 7px 0 #c86e00; }
        button:active { transform: translateY(3px); box-shadow: 0 2px 0 #c86e00; }
        button:disabled { background-color: #ccc; box-shadow: 0 5px 0 #999; cursor: not-allowed; transform: translateY(0); }

        /* --- スタート画面, キャラクター選択画面 --- */
        #start-screen { background: linear-gradient(135deg, #a8e6cf, #dcedc1); justify-content: center; }
        #start-screen .keropons-image-large { width: 150px; height: 150px; background: url('https://acochill.com/acc2025/wp-content/uploads/2025/02/keropons_web-1500x1000.jpg') center/cover; border-radius: 50%; border: 5px solid white; box-shadow: 0 4px 15px rgba(0,0,0,0.2); margin-bottom: 20px; }
        #character-select-screen { justify-content: flex-start; padding-top: 20px; padding-bottom: 20px; overflow-y: auto; }
        #characters-container { display: flex; flex-direction: column; gap: 10px; width: 100%; margin: 10px 0; }
        .character-card { display: flex; align-items: center; cursor: pointer; padding: 10px; border-radius: 15px; transition: transform 0.2s, box-shadow 0.2s; border: 4px solid transparent; background-color: #f9f9f9; }
        .character-card.selected { transform: scale(1.02); border-color: var(--main-color); background-color: #fff8e1; }
        .character-icon { font-size: 3em; margin-right: 15px; }
        .character-info { display: flex; flex-direction: column; }
        .character-name { font-size: 1.2em; font-weight: 800; margin-bottom: 5px; }
        .character-promise { font-size: 0.9em; line-height: 1.4; }

        /* --- ★コンセプト変更: ジャーニー画面 --- */
        #journey-screen { background: linear-gradient(to top, #90ee90 60%, #87ceeb 100%); justify-content: flex-start; padding: 0; }
        #journey-path { width: 100%; height: 100%; position: relative; }
        .player-character { font-size: 4em; position: absolute; transition: bottom 1s ease-in-out, left 1s ease-in-out; bottom: 10%; left: 50%; transform: translateX(-50%); animation: bounce-vertical 0.5s infinite alternate; }
        @keyframes bounce-vertical { from { transform: translate(-50%, 0); } to { transform: translate(-50%, -5px); } }
        #polling-station { position: absolute; top: 10%; left: 50%; transform: translateX(-50%); width: 100px; height: 100px; background-color: #fff; border: 5px solid var(--accent-color); border-radius: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; font-weight: 800; text-align: center; }
        #polling-station::before { content: '🗳️'; font-size: 3em; }
        
        /* --- クイズモーダル --- */
        #quiz-modal { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 100; background: rgba(0,0,0,0.7); display: none; justify-content: center; align-items: center; padding: 20px; box-sizing: border-box; }
        .quiz-content { background: white; padding: 25px; border-radius: 20px; width: 100%; max-width: 350px; text-align: center; box-shadow: 0 5px 25px rgba(0,0,0,0.3); animation: pop-in 0.3s ease-out; }
        @keyframes pop-in { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
        #quiz-question { font-size: 1.2em; margin-bottom: 20px; line-height: 1.6; }
        #quiz-options { display: flex; flex-direction: column; gap: 10px; }
        .quiz-option { width: 100%; font-size: 1.1em; }
        #quiz-feedback { margin-top: 15px; font-size: 1.5em; font-weight: 800; height: 50px; display: flex; align-items: center; justify-content: center; }
        .feedback-correct { color: var(--success-color); }
        .feedback-wrong { color: var(--fail-color); }

        /* --- 結果発表画面 --- */
        #result-screen { justify-content: center; background: linear-gradient(135deg, #dcedc1, #a8e6cf); }
        #result-screen h2 { margin-bottom: 15px; }
        .result-item { opacity: 0; transform: translateY(20px); animation: fade-in-up 0.5s ease-out forwards; }
        @keyframes fade-in-up { to { opacity: 1; transform: translateY(0); } }
        #arrival-podium { width: 150px; height: 150px; margin: 10px 0; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 50%; box-shadow: 0 5px 15px rgba(0,0,0,0.2); animation-delay: 0.2s; border: 5px solid var(--main-color); }
        #arrival-icon { font-size: 5em; }
        #arrival-message-box { background: #fff8e1; padding: 15px; border-radius: 15px; border: 3px solid var(--main-color); margin: 15px 0; width: 100%; max-width: 350px; box-sizing: border-box; text-align: center; animation-delay: 0.4s; }
        #final-message-box { display: flex; flex-direction: column; align-items: center; width: 100%; animation-delay: 0.6s; }
        
        /* --- SNSシェアボタン --- */
        #share-buttons-container { margin-top: 15px; text-align: center; animation-delay: 0.8s; }
        .share-title { font-weight: 700; margin-bottom: 10px; }
        .share-buttons { display: flex; justify-content: center; gap: 10px; }
        .share-button { font-size: 1em; padding: 10px 20px; width: 140px; }
        .share-button.x { background-color: var(--x-color); box-shadow: 0 5px 0 #333; }
        .share-button.line { background-color: var(--line-color); box-shadow: 0 5px 0 #05a544; }