:root { 
    --bg-color: #fcfdfa;
    --card-bg: #fcfdfa;
    --text-color: #525252;
    --accent-green: #98e956;
    --border-color: #dcdde1;
    --primary-color: #4b7bec; 
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0; padding: 20px; display: flex; justify-content: center;
}

.container { max-width: 700px; width: 100%; }

header {
    text-align: center;
}

.test-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin-bottom: 20px;
    display: none; /* デフォルト非表示に戻したよ */
}
.test-card.active { display: block; }

#result-area {
    display: none;
}

#start-screen {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}

#test-container {
    display: none;
}

.past-scores-title {
    font-weight: bold;
    margin-top: 25px;
    margin-bottom: 10px;
}

#past-scores-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 220px;
    overflow-y: auto;
}

#past-scores-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

#past-scores-list li.empty-msg {
    display: block;
    color: #a0a0a0;
    border: none;
    padding: 4px 0;
    font-size: 0.85rem;
}

#result-area.show {
    display: block; /* display重複してたのを削除したよ */
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}

/* プログレスバー */
.progress-container { width: 100%; background-color: #dfe6e9; border-radius: 4px; height: 6px; margin-bottom: 20px; }
.progress-bar { height: 100%; background-color: var(--accent-green); border-radius: 4px; transition: width 0.4s ease; }

.question-text { font-size: 1.25rem; font-weight: bold; margin-bottom: 25px; line-height: 1.6; }

.option-btn {
    width: 100%;
    padding: 18px;
    margin: 10px 0;
    text-align: left;
    background-color: #fff;
    border: 5px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    /* 👇 スマホ・タブレット独自の四角いタップハイライトを完全に消去する魔法の1行です！ */
    -webkit-tap-highlight-color: transparent;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(152, 233, 86, 0.5); /* accent-greenベース */
    transform: scale(0);
    animation: ripple-effect 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-effect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ホバー時に黄緑色の枠 */
.option-btn:hover { border-color: var(--accent-green); background-color: #fcfdfc; }

.skip-btn { border-style: dashed; color: #636e72; }

/* --- 診断結果画面のスタイル調整 --- */

/* 点数の文字を大きく強調 */
.score-display {
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    color: var(--text-color);
    margin: 10px 0 20px 0;
}

/* 判定テキストのスタイル */
.result-title {
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
}

.breakdown-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

/* 内訳1問ごとのデザイン */
.breakdown-item {
    border-bottom: 1px dashed var(--border-color);
    padding: 15px 0;
}
.breakdown-item:last-child {
    border-bottom: none;
}
.breakdown-q {
    font-weight: bold;
    font-size: 1.05rem;
    margin-bottom: 8px;
    line-height: 1.5;
}
.breakdown-a {
    color: #555;
    font-size: 0.95rem;
}
.breakdown-s {
    font-weight: bold;
    color: var(--primary-color);
}

/* 診断結果の解説テキスト用デザイン */
#result-commentary {
    background-color: #f8f9fa;
    border-left: 5px solid var(--primary-color);
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 40px;
    line-height: 1.6;
    font-size: 1.05rem;
    text-align: left;
}
