/* 全体共通 */
html,
body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: sans-serif;
    background: #fff;
    color: #333;
    transition: background-color 0.3s;
}



.diagnosis-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: #f8f8f8;
    border-bottom: 1px solid #ddd;
}

/* ヘッダーロゴ（Topは .diagnosis-header__logo、Mainは .logo を使用） */
.diagnosis-header__logo,
.logo {
    max-height: 40px;
    vertical-align: middle;
}

.diagnosis-title {
    margin: 0 0 0 16px;
    font-size: .85rem;
    color: #333;
}

/* 700px以下 */
@media (max-width: 700px) {
    .diagnosis-header {
        flex-direction: column;
        text-align: center;
    }

    .diagnosis-title {
        margin: 4px 0 0 0;
    }
}


.diagnosis-footer {
    text-align: center;
    padding: 1rem;
    background: #f8f8f8;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: .5rem;
}

.footer-links a {
    color: #333;
    text-decoration: none;
    font-size: 0.8rem;
}

.copyright {
    margin: .5rem 0 0;
    font-size: 0.8rem;
    color: #666;
}

.diagnosis-footer a {
    color: #333;
    text-decoration: none;
}

.diagnosis-logo {
    max-height: 40px;
    vertical-align: middle;
    margin-right: 10px;
}

.diagnosis-main {
    flex: 1;
    max-width: 600px;
    margin: 3rem auto;
    padding: 0 1rem;
    text-align: center;
}

.first-view-image {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.first-view-image img {
    width: 100%;
    height: auto;
}

/* スタートボタン */
.diagnosis-start-button {
    width: 100%;
    max-width: 275px;
    margin: 2rem 0;
    padding: .75rem;
    font-size: 1.25rem;
    font-weight: bold;
    background: #e60033;
    color: #fff;
    border: none;
    border-radius: 100px;
    cursor: pointer;
}

.diagnosis-start-button:hover {
    background: #cc002a;
}

/* 選択肢 */
.diagnosis-choice-list {
    list-style: none;
    padding: 0;
}

.diagnosis-choice-list li {
    margin: 1rem 0;
}

.diagnosis-choice-button {
    padding: 1rem 2rem;
    font-size: 1rem;
    background: #eee;
    border: 2px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    width: 100%;
    max-width: 400px;
}

.diagnosis-choice-button:hover,
.diagnosis-choice-button:focus {
    background: #f8dcdc;
    border-color: #e60033;
    color: #e60033;
}

/* フェードアニメーション */
.fade-in {
    animation: fadeIn 0.3s ease-in forwards;
}

.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* ローディングオーバーレイ（診断用クラス） */
.diagnosis-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.diagnosis-hidden {
    display: none;
}

.diagnosis-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ローディングオーバーレイ（HTML側の .overlay/.hidden/.spinner にも対応） */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hidden {
    display: none;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 診断ナビゲーション（戻る / やり直す） */
.diagnosis-nav {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    justify-content: center;
}

.diagnosis-nav-button {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: #fafafa;
    color: #333;
    font-size: .85rem;
    padding: .65rem 1.1rem;
    line-height: 1.2;
    border-radius: 6px;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
    font-weight: 600;
}

.diagnosis-nav-button:hover,
.diagnosis-nav-button:focus-visible {
    background: #f0f0f0;
    border-color: #999;
    outline: none;
}

.diagnosis-nav-button:active {
    background: #e5e5e5;
    border-color: #888;
}

/* 個別のバリエーション（必要なら色分け） */
.diagnosis-nav-back {
    /* 軽微な差別化 */
    background: #f8f8f8;
}

.diagnosis-nav-restart {
    border-color: #e60033;
    color: #e60033;
    background: #fff7f9;
}

.diagnosis-nav-restart:hover,
.diagnosis-nav-restart:focus-visible {
    background: #ffe7ee;
    border-color: #cc002a;
    color: #cc002a;
}

@media (max-width: 560px) {
    .diagnosis-nav-button {
        flex: 1 1 100%;
        text-align: center;
    }
}