@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&family=Poppins:wght@700;800;900&display=swap');

:root {
    --primary-color: #92C65A;    /* メインの黄緑 */
    --accent-color: #5ea12a;     /* アクセントの深めの緑 */
    --bg-color: #f7f9f5;          /* 清潔感のある薄い黄緑グレー */
    --card-bg: #ffffff;           /* コンテンツ背景（白ベース） */
    --text-color: #2e3528;        /* 視認性の高い、緑みのあるダークグレー */
    --border-color: #cbd5c5;      /* 柔らかなオリーブグレー */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column; 
    align-items: center;
}

body * {
    font-family: "Noto Sans", sans-serif;
    letter-spacing: 0.1em;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

.container {
    background-color: var(--card-bg);
    padding: 40px 35px;
    max-width: 680px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid #eef2eb;
    box-shadow: 0 6px 20px rgba(146, 198, 90, 0.08);
    box-sizing: border-box;
}

h1 {
    text-align: center;
    color: var(--accent-color);
    font-size: 26px;
    margin: 10px 0;
    font-weight: bold;
    letter-spacing: 2px;
}

.thick-line { border-top: 3px solid var(--primary-color); margin: 20px 0; }
.double-line { border-top: 5px double var(--primary-color); margin: 25px 0; }
.thin-line { border-top: 2px dotted var(--border-color); margin: 25px 0; }

h2 { 
    font-size: 17px; 
    margin: 0 0 15px 0; 
    color: var(--text-color);
    padding-left: 10px;
    border-left: 4px solid var(--primary-color);
    line-height: 1.4;
}
.step-title { font-size: 11px; color: var(--accent-color); font-weight: bold; margin-bottom: 5px; letter-spacing: 1px;}
.step-box { margin-bottom: 25px; }

.options-list { list-style: none; padding: 0; margin: 0; }
.options-list li { margin-bottom: 10px; }
.options-list label {
    display: block;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #e2e8dd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.options-list label:hover { 
    background: #f4f8f1; 
    border-color: var(--primary-color);
}
input[type="radio"], input[type="checkbox"] { 
    margin-right: 12px; 
    transform: scale(1.2); 
    accent-color: var(--accent-color);
}

/* --- STEP6: PC版マトリクス構造 --- */
.matrix-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.matrix-table th, .matrix-table td { border: 1px solid #e2e8dd; padding: 14px 8px; text-align: center; font-size: 14px; }
.matrix-table th { background-color: #f4f8f1; color: var(--text-color); font-weight: bold; }
.matrix-table td:first-child { text-align: left; font-weight: bold; color: var(--text-color); }
.matrix-table input[type="radio"] { accent-color: var(--accent-color); cursor: pointer; }
.sub-desc { font-size: 0.85em; color: #666; }

/* PC表示のときは、マトリクス内のlabelテキストを隠す */
.matrix-table td label span {
    display: none;
}

.btn {
    display: block;
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 16px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 35px;
    letter-spacing: 2px;
    box-shadow: 0 4px 12px rgba(146, 198, 90, 0.3);
    transition: all 0.2s ease;
}
.btn:hover { 
    background-color: #7fb247; 
    transform: translateY(1px);
}
.return-btn { background: #7f8c8d; margin-top: 20px; box-shadow: none; }
.hidden { display: none !important; }

/* === 診断結果画面用の装飾エリア === */
.type-badge {
    background: var(--accent-color);
    color: #fff;
    padding: 4px 14px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 20px;
    margin-bottom: 12px;
    display: inline-block;
}
.type-title { 
    font-size: 26px; 
    font-weight: bold; 
    margin-bottom: 18px; 
    color: var(--accent-color);
}
.score-box { 
    font-size: 16px; 
    margin-bottom: 25px; 
    background-color: #fbfdfa;
    padding: 15px;
    border-radius: 8px;
    border: 1px dashed var(--border-color);
    line-height: 2; 
}
#res-score-text{ line-height: 1; }
.score-num {
    font-size: 36px;
    font-weight: 900;
    color: #e67e22; 
    margin-right: 2px;
    font-family: 'Arial Black', sans-serif;
}
.score-box-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    align-items: center;
}
#res-level-msg {
    margin: 10px 0;
    font-size: 17px;
    font-weight: 700; 
    color: #e67e22; 
    line-height: 1.25;
}
.stars { 
    font-size: 24px; 
    color: #d9a74a; 
    letter-spacing: 3px; 
    line-height: 1;
}

.advice-box {
    background: #f4f8f1; 
    padding: 15px; 
    border-radius: 6px; 
    margin-bottom: 20px; 
    border-left: 5px solid var(--accent-color);
}
#res-advice-p {
    line-height: 1.6; 
    font-size: 15px; 
    color: #444; 
    margin: 0;
}

.section-header {
    font-weight: bold;
    font-size: 16px;
    margin: 35px 0 12px 0;
    color: var(--text-color);
    padding: 10px 15px;
    border-radius: 6px;
}

.bg-pastel-pink { background-color: #fbebee; }
.bg-pastel-orange { background-color: #fbf0e6; }
.bg-pastel-yellow { background-color: #fcf8e3; }
.bg-pastel-green { background-color: #eff5e9; } 
.bg-pastel-blue { background-color: #ebf3f5; }

/* --- カテゴリの行デザイン --- */
.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 15px;
    border: 1px solid #e2e8dd; 
    border-radius: 8px;
    font-size: 15px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s ease;
    background-color: #fff;
    box-sizing: border-box;
}
.category-item:hover {
    background-color: #f4f8f1; 
    padding-left: 20px;
    border-color: var(--primary-color);
}
.go-arrow {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: bold;
    transition: transform 0.2s ease;
}
.category-item:hover .go-arrow {
    transform: translateX(3px);
    color: var(--accent-color);
}

/* リンクがないカテゴリのスタイル制御 */
.category-item.no-link {
    cursor: default !important;      /* カーソルを指マークにしない */
    pointer-events: none;           /* クリック（タップ）を完全に無効化 */
    background-color: #f1f1f1;      /* 未実装感を出す */
    border-color: #f1f1f1; 
    transform: none !important;     /* ホバー時のアニメーション禁止 */
    box-shadow: none !important;
    transition: none !important;
}

#box-s, #box-a, #box-b, #box-family, #box-shelter {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    overflow: hidden;
}

/* ==========================================
   スマホ表示（画面横幅600px以下）
   ========================================== */
@media screen and (max-width: 600px) {
    .container { padding: 20px 20px 30px; }
    #box-s, #box-a, #box-b, #box-family, #box-shelter { grid-template-columns: 1fr; }

    .matrix-table, .matrix-table thead, .matrix-table tbody, .matrix-table tr, .matrix-table th, .matrix-table td {
        display: block; width: 100%; box-sizing: border-box; border: none; padding: 0;
    }
    .matrix-table tr:first-child { display: none; }
    .matrix-table tr {
        background-color: #ffffff; border: 1px solid #e2e8dd; border-radius: 10px; padding: 15px; margin-bottom: 15px;
        box-shadow: 0 2px 8px rgba(146, 198, 90, 0.04);
    }
    .matrix-table td:first-child {
        font-size: 15px; color: var(--text-color); margin-bottom: 12px; padding-bottom: 6px;
        border-bottom: 1px dashed #e2e8dd; background-color: transparent;
    }
    .matrix-table td:not(:first-child) { display: block; margin-top: 8px; }
    .matrix-table td label {
        display: flex; align-items: center; padding: 11px 14px; background: #ffffff; border: 1px solid #e2e8dd;
        border-radius: 6px; cursor: pointer; width: 100%; box-sizing: border-box; transition: background 0.2s, border-color 0.2s;
    }
    
    .matrix-table td label:has(input:checked),
    .matrix-table td label:hover { 
        background: #f4f8f1; 
        border-color: var(--primary-color); 
    }
    
    .matrix-table td label span { display: inline !important; font-size: 14px; color: var(--text-color); margin-left: 10px; }
    .matrix-table input[type="radio"] { cursor: pointer; transform: scale(1.2); margin-right: 0; }
}