/* --- 全体スタイル --- */
:root {
    --bg-start: #f6d365; --bg-end: #fda085;
    --ui-bg: rgba(255, 255, 255, 0.95); --text-color: #333;
    --accent-color: #ff758c;
    --btn-bg: #ff9a8b;
    --btn-hover-bg: #ff6a88;
    --twitter-color: #1DA1F2; --line-color: #06C755;
}
html, body {
    margin: 0; padding: 0; width: 100%; height: 100%;
    overflow: hidden; background-color: #f0f0f0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}

/* --- コンテナ --- */
#game-container {
    position: relative; width: 100%; height: 100%;
    max-width: 450px; max-height: 800px; margin: auto;
    background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    color: var(--text-color);
}

/* --- ★★★ スクリーン共通 (修正箇所) ★★★ --- */
.screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center;
    box-sizing: border-box; padding: 30px;
    opacity: 0;
    pointer-events: none; /* ★変更: 非表示のときはクリック不可に */
    transition: opacity 0.5s ease; /* ★変更: transitionをopacityに限定 */
}
.screen.active {
    opacity: 1;
    pointer-events: auto; /* ★変更: 表示されたらクリック可能に */
}

/* --- 各画面のコンテンツ --- */
#start-screen h1 { font-size: 2em; margin-bottom: 20px; }
#start-screen p { font-size: 1.1em; line-height: 1.6; margin-bottom: 30px; }

#question-container {
    width: 100%;
    background: var(--ui-bg);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
#question-number {
    font-size: 1em; color: var(--accent-color); font-weight: bold;
    margin: 0 0 10px;
}
#question-text {
    font-size: 1.4em; margin: 0 0 25px;
}
#choices-container {
    display: flex; flex-direction: column; gap: 15px;
}

/* --- ボタン共通 --- */
.btn {
    padding: 15px 40px; font-size: 1.5em; font-weight: bold; color: white;
    background-color: var(--btn-bg); border: none; border-radius: 50px;
    cursor: pointer; box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    transition: background-color 0.2s, transform 0.2s;
}
.btn:hover {
    background-color: var(--btn-hover-bg);
    transform: translateY(-3px);
}
.choice-btn {
    width: 100%; padding: 15px; font-size: 1.1em;
    color: var(--text-color); font-weight: 500;
    background-color: #fff; border: 2px solid #eee; border-radius: 15px;
    cursor: pointer; text-align: center;
    transition: background-color 0.2s, border-color 0.2s;
}
.choice-btn:hover {
    background-color: #f0f0f0;
    border-color: var(--accent-color);
}
.btn.retry { background-color: #aaa; margin-top: 20px; font-size: 1.1em; }

/* --- 結果画面 --- */
#loading-content h1, #result-content h2 { font-size: 1.8em; margin-bottom: 15px; }
#result-details { margin-bottom: 15px; font-size: 1.1em; }
#result-details p { margin: 0; color: #666; }
#result-details strong { font-size: 1.6em; color: var(--accent-color); line-height: 1.5; display: block; }
#recommendation {
    width: 100%;
    background: white; border-radius: 15px; padding: 20px;
    margin-bottom: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    box-sizing: border-box;
}
#recommendation h3 { margin: 0 0 10px; font-size: 1em; color: #888; text-transform: uppercase; }
#rec-image { max-width: 50%; height: auto; margin-bottom: 10px; }
#rec-name { margin: 0; font-size: 1.4em; color: var(--accent-color); font-weight: bold; }
#share-buttons { display: flex; justify-content: center; gap: 15px; margin-top: 15px; }
.share-btn {
    display: inline-block; padding: 10px 20px; border-radius: 20px; color: white;
    text-decoration: none; font-weight: bold; font-size: 1em;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}
#twitter-share { background-color: var(--twitter-color); }
#line-share { background-color: var(--line-color); }