/* 基本スタイル */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 40px 20px;
    box-sizing: border-box;
}
.container {
    background-color: white;
    padding: 2rem 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 900px;
    margin: 0 auto;
}
.hidden { display: none; }

/* 共通 */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
}
.back-link:hover {
    text-decoration: underline;
}
.description {
    text-align: center;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 2rem;
}
.button-container {
    text-align: center;
    margin-top: 2rem;
}

/* 質問エリアのアコーディオン */
details.question-accordion {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 1rem;
}
details.question-accordion summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s;
}
details.question-accordion:first-of-type {
    border-top: 1px solid #dee2e6;
}
details.question-accordion:last-of-type {
    border-bottom: 1px solid #dee2e6;
}
details.question-accordion[open] > summary {
    background-color: #f8f9fa;
}
details.question-accordion summary::-webkit-details-marker {
    display: none;
}
details.question-accordion summary h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #0056b3;
}
details.question-accordion summary::after {
    content: '+';
    font-size: 1.8rem;
    font-weight: 300;
    color: #007bff;
    transition: transform 0.3s ease-in-out;
    line-height: 1;
}
details[open].question-accordion > summary::after {
    content: '−';
    transform: rotate(180deg);
}

.question-block {
    margin: 0;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}
.question-block:last-child {
    border-bottom: none;
}
.question-text {
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.options label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 結果エリア */
#result-summary {
    text-align: center;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 2.5rem;
}
.rank-display {
    font-size: 5rem;
    font-weight: bold;
    line-height: 1;
}
.rank-s { color: #dc3545; }
.rank-a { color: #fd7e14; }
.rank-b { color: #007bff; }
.rank-c { color: #6c757d; }
.rank-d { color: #343a40; }

.score-text {
    font-size: 1.2rem;
    margin-top: 0.5rem;
    color: #343a40;
}
.rank-message {
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 1rem;
}
.result-preface {
    font-size: 0.95rem;
    color: #6c757d;
    text-align: left;
    border-top: 1px solid #dee2e6;
    padding-top: 1.5rem;
    margin-top: 2rem;
    line-height: 1.6;
}

.advice-card {
    background-color: #fff;
    border: 1px solid #ffc107;
    border-left: 5px solid #ffc107;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}
.advice-card h5 {
    margin-top: 0;
    font-size: 1.1rem;
    color: #343a40;
}
.advice-card p {
    margin-bottom: 0;
    line-height: 1.6;
}

.next-step-item {
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 3px solid #e9ecef;
}
.next-step-item h4 {
    margin-bottom: 0.5rem;
}
.next-step-item ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 0;
}
.next-step-item a {
    color: #0056b3;
}

/* ボタンの共通スタイル */
button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0056b3;
}

.secondary-button {
    background-color: #6c757d;
}

.secondary-button:hover {
    background-color: #5a6268;
}

/* 結果エリアのアコーディオン */
details.result-accordion {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

details.result-accordion summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    transition: background-color 0.2s;
}

details.result-accordion summary:hover {
    background-color: #e9ecef;
}

details.result-accordion summary::-webkit-details-marker {
    display: none;
}

details.result-accordion summary h3, details.result-accordion summary h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #343a40;
}

details.result-accordion summary::after {
    content: '+';
    font-size: 1.8rem;
    font-weight: 300;
    color: #007bff;
    transition: transform 0.3s ease-in-out;
    line-height: 1;
}

details[open].result-accordion > summary::after {
    content: '−';
    transform: rotate(180deg);
}

.accordion-content {
    padding: 1.5rem;
    background-color: #fff;
    border-top: 1px solid #dee2e6;
}

/* お問い合わせ導線 */
.contact-lead {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
    font-size: 1rem;
    line-height: 1.7;
    color: #495057;
}
.contact-lead a {
    font-weight: bold;
    color: #007bff;
}
