@import url('[https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap](https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap)');

:root {
    --primary-color: #4a90e2;
    --secondary-color: #50e3c2;
    --background-color: #f4f7f6;
    --text-color: #333;
    --card-bg-color: #ffffff;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --secondary-btn-bg: #6c757d;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

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

.screen {
    display: none;
}

.screen.active {
    display: block;
}

.card {
    background-color: var(--card-bg-color);
    border-radius: 12px;
    padding: 30px 40px;
    box-shadow: 0 4px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.title {
    color: var(--primary-color);
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
}

.description {
    text-align: center;
    line-height: 1.8;
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
    text-align: center;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

#employee-name {
    width: 100%;
    max-width: 300px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
}

.btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 20px auto 0;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
        border: none;
        border-radius: 8px;
        cursor: pointer;
        transition: transform 0.2s, box-shadow 0.2s;
        text-align: center;
    }
    
    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
    }
    
    .btn-secondary {
        background: var(--secondary-btn-bg);
    }
    .btn-secondary:hover {
        background: #5a6268;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    }
    
    #progress-container {
        width: 100%;
        background-color: var(--border-color);
        border-radius: 8px;
        overflow: hidden;
        margin-bottom: 10px;
    }
    
    #progress-bar {
        width: 0%;
        height: 10px;
        background-color: var(--primary-color);
        transition: width 0.3s ease-in-out;
    }
    
    #progress-indicator {
        text-align: center;
        margin-bottom: 20px;
        font-weight: bold;
        color: var(--primary-color);
    }
    
    #question-text {
        font-size: 18px;
        font-weight: bold;
        text-align: center;
        line-height: 1.7;
        margin-bottom: 30px;
        min-height: 50px;
    }
    
    #options-container {
        display: flex;
        flex-direction: column; /* ★★★ 修正点 ★★★ */
        align-items: center;   /* ★★★ 修正点 ★★★ */
        gap: 10px;
    }
    
    #navigation-buttons {
        margin-top: 20px;
    }
    
    .rating-options-wrapper { /* ★★★ 追加 ★★★ */
        display: flex;
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .rating-btn {
        width: 40px;
        height: 40px;
        border: 2px solid var(--border-color);
        border-radius: 50%;
        background-color: #fff;
        cursor: pointer;
        transition: all 0.2s;
        font-weight: bold;
    }
    
    .rating-btn:hover {
        background-color: var(--primary-color);
        color: #fff;
        border-color: var(--primary-color);
    }
    
    /* --- 結果画面レイアウト --- */
    .result-layout {
        display: flex;
        flex-direction: column;
        gap: 40px;
    }
    
    .result-top {
        display: flex;
        gap: 40px;
    }
    
    .result-bottom {
        border-top: 1px solid var(--border-color);
        padding-top: 30px;
    }
    
    .result-left {
        flex: 1;
        min-width: 300px;
    }
    
    .result-right {
        flex: 1.5;
    }
    
    .job-cards-wrapper {
        display: flex;
        gap: 20px;
        flex-wrap: wrap; /* カードを折り返し表示 */
    }
    
    .job-cards-wrapper .job-card {
        flex: 1 1 250px; /* 最小幅250pxで伸縮 */
    }
    
    .chart-container {
        position: relative;
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }
    
    #needs-ranking-list {
        padding-left: 20px;
    }
    
    #needs-ranking-list li {
        margin-bottom: 8px;
        font-weight: bold;
    }
    
    #main-job-container h3, #sub-jobs-container h3 {
        border-bottom: 3px solid var(--primary-color);
        padding-bottom: 5px;
        margin-bottom: 15px;
    }
    
    .special-case-description {
        font-size: 14px;
        background-color: #f0f8ff;
        border-left: 4px solid var(--primary-color);
        padding: 10px 15px;
        margin-bottom: 15px;
        border-radius: 4px;
    }
    
    .job-card {
        background-color: #f9f9f9;
        padding: 20px;
        border-radius: 8px;
        border: 1px solid var(--border-color);
        margin-bottom: 20px;
        height: 100%;
        box-sizing: border-box;
    }
    
    .job-card h4 {
        margin-top: 0;
        color: var(--primary-color);
    }
    
    .job-card h5 {
        margin-bottom: 5px;
        border-left: 4px solid var(--secondary-color);
        padding-left: 8px;
    }
    
    .job-card p, .job-card ul {
        margin-top: 5px;
        line-height: 1.7;
        font-size: 14px;
    }
    .job-card ul {
        padding-left: 20px;
    }
    
    .result-actions {
        display: flex;
        gap: 20px;
        justify-content: center;
        margin-top: 30px;
    }
    
    .result-actions .btn {
        width: auto;
        flex: 1;
    }
    
    @media (max-width: 768px) {
        body {
            padding: 10px;
        }
        .card {
            padding: 20px;
        }
        .result-top {
            flex-direction: column;
        }
        .job-cards-wrapper {
            flex-direction: column;
        }
    }
