/* ==============================================
   診断コンテンツ専用スタイル
   ============================================== */

/* --- 診断エリア全体 --- */
.p-diagnostic {
    position: relative;
    max-width: 1240px;
    margin: 30px auto;
    padding: 60px 40px 100px;
    background-color: #fff;
    border-radius: 80px;
    overflow: hidden;
}

/* --- 浮遊デコレーション --- */
.p-diagnostic__deco {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.p-diagnostic__deco--1 {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(44, 227, 192, 0.12) 0%, transparent 70%);
    top: -40px;
    right: -40px;
    animation: decoFloat 6s ease-in-out infinite;
}

.p-diagnostic__deco--2 {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(243, 182, 18, 0.10) 0%, transparent 70%);
    bottom: 60px;
    left: -20px;
    animation: decoFloat 8s ease-in-out infinite reverse;
}

.p-diagnostic__deco--3 {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(44, 227, 192, 0.08) 0%, transparent 70%);
    top: 50%;
    right: 10%;
    animation: decoFloat 7s ease-in-out infinite 2s;
}

@keyframes decoFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.1); }
}

.p-diagnostic__inner {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

/* --- イントロ --- */
.p-diagnostic__intro {
    text-align: center;
    padding: 20px 0 60px;
    background: #fff;
}

.p-diagnostic__intro-visual {
    margin-bottom: 24px;
}

.p-diagnostic__intro-illust {
    width: 200px;
    height: auto;
    animation: illustBounce 3s ease-in-out infinite;
}

@keyframes illustBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.p-diagnostic__intro-badge {
    display: inline-block;
    padding: 6px 20px;
    background: linear-gradient(135deg, #e8f9f6 0%, #d4f5ef 100%);
    border-radius: 60px;
    font-size: 13px;
    font-weight: 600;
    color: #1ab6a1;
    margin-bottom: 20px;
    letter-spacing: .05em;
}

.p-diagnostic__intro-head {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 12px;
}

.p-diagnostic__intro-txt {
    font-size: 15px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 32px;
}

/* --- ステップインジケーター --- */
.p-diagnostic__intro-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.p-diagnostic__intro-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.p-diagnostic__intro-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2CE3C0 0%, #1ab6a1 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.p-diagnostic__intro-step-txt {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.p-diagnostic__intro-step-arrow {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.p-diagnostic__start-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #2CE3C0 0%, #1ab6a1 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .05em;
    padding: 18px 48px;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 16px rgba(26, 182, 161, 0.3);
    animation: btnPulse 2s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(26, 182, 161, 0.3); }
    50% { box-shadow: 0 6px 28px rgba(26, 182, 161, 0.5); }
}

.p-diagnostic__start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(26, 182, 161, 0.4);
    animation: none;
}

.p-diagnostic__start-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* --- 診断アプリ --- */
.p-diagnostic__app {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.p-diagnostic__app.--visible {
    opacity: 1;
}

/* --- プログレスバー --- */
.p-diagnostic__progress {
    margin-bottom: 40px;
}

.p-diagnostic__progress-text {
    font-size: 14px;
    font-weight: 700;
    color: #1ab6a1;
    margin-bottom: 8px;
    text-align: center;
}

.p-diagnostic__progress-bar {
    width: 100%;
    height: 8px;
    background: #e8f9f6;
    border-radius: 4px;
    overflow: hidden;
}

.p-diagnostic__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2CE3C0, #1ab6a1);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(.4, 0, .2, 1);
    position: relative;
}

.p-diagnostic__progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 24px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
    border-radius: 4px;
}

/* --- 設問 --- */
.p-diagnostic__question {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.p-diagnostic__question.--active {
    opacity: 1;
    transform: translateY(0);
}

.p-diagnostic__question-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.7;
    margin-bottom: 28px;
    text-align: center;
    padding: 0 8px;
}

.p-diagnostic__question-num {
    color: #1ab6a1;
    font-size: 22px;
    font-weight: 700;
    margin-right: 4px;
}

/* --- 選択肢（リスト） --- */
.p-diagnostic__choices {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.p-diagnostic__choice {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 60px;
    padding: 16px 20px;
    background: #fff;
    border: 2px solid #e0ddd4;
    border-radius: 16px;
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
    color: #303135;
    transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.p-diagnostic__choice:hover {
    border-color: #1ab6a1;
    background-color: #f8fffe;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(26, 182, 161, 0.1);
}

.p-diagnostic__choice:active {
    transform: scale(0.98) translateY(0);
}

.p-diagnostic__choice.--selected {
    border-color: #1ab6a1;
    background-color: #edfaf8;
    box-shadow: 0 2px 12px rgba(26, 182, 161, 0.15);
}

.p-diagnostic__choice-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: #f4f0e5;
    font-size: 16px;
    font-weight: 700;
    color: #1ab6a1;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.p-diagnostic__choice:hover .p-diagnostic__choice-icon {
    transform: scale(1.05);
}

.p-diagnostic__choice.--selected .p-diagnostic__choice-icon {
    background: #1ab6a1;
    color: #fff;
    transform: scale(1.1);
}

.p-diagnostic__choice-label {
    flex: 1;
}

/* --- Q1 カード型選択肢 --- */
.p-diagnostic__choices--grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.p-diagnostic__choices--grid > li:last-child {
    grid-column: 1 / -1;
}

.p-diagnostic__choice--card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 24px 16px 20px;
    min-height: auto;
    border-radius: 20px;
    background: linear-gradient(180deg, #fff 0%, #fafaf6 100%);
}

.p-diagnostic__choice--card:hover {
    background: linear-gradient(180deg, #f8fffe 0%, #edfaf8 100%);
}

.p-diagnostic__choice--card.--selected {
    background: linear-gradient(180deg, #edfaf8 0%, #d4f5ef 100%);
}

.p-diagnostic__choice-emoji {
    font-size: 36px;
    line-height: 1;
    display: block;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.p-diagnostic__choice--card:hover .p-diagnostic__choice-emoji {
    transform: scale(1.15) rotate(-5deg);
}

.p-diagnostic__choice-card-label {
    font-size: 16px;
    font-weight: 700;
    color: #303135;
    line-height: 1.4;
}

.p-diagnostic__choice-card-sub {
    font-size: 12px;
    color: #888;
    line-height: 1.5;
}

/* --- 戻るボタン --- */
.p-diagnostic__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    padding: 10px 16px;
    background: none;
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.p-diagnostic__back:hover {
    color: #303135;
    border-color: #303135;
}

.p-diagnostic__back svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ==============================================
   結果ページ
   ============================================== */
.p-diagnostic__result {
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.p-diagnostic__result.--visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 紙吹雪コンテナ --- */
.p-diagnostic__confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px;
    pointer-events: none;
    overflow: hidden;
    z-index: 2;
}

.p-diagnostic__confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% { opacity: 1; transform: translateY(-20px) rotate(0deg) scale(1); }
    100% { opacity: 0; transform: translateY(300px) rotate(720deg) scale(0.3); }
}

/* --- ブロック1: 結果ヘッダー --- */
.p-diagnostic__result-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 40px;
    padding: 48px 24px 40px;
    background: linear-gradient(135deg, rgba(44, 227, 192, 0.10) 0%, rgba(26, 182, 161, 0.06) 50%, rgba(243, 182, 18, 0.06) 100%);
    border-radius: 24px;
    border: 1px solid rgba(44, 227, 192, 0.15);
}

.p-diagnostic__result-icon {
    display: block;
    font-size: 48px;
    margin-bottom: 12px;
    animation: iconPop 0.6s cubic-bezier(.175, .885, .32, 1.275) forwards;
}

@keyframes iconPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.p-diagnostic__result-label {
    font-size: 14px;
    font-weight: 700;
    color: #1ab6a1;
    letter-spacing: .1em;
    margin-bottom: 12px;
}

.p-diagnostic__result-name {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    color: #303135;
    margin-bottom: 8px;
}

.p-diagnostic__result-tagline {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

/* --- 結果ボディ --- */
.p-diagnostic__result-body {
    margin-bottom: 40px;
}

.p-diagnostic__result-images {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.p-diagnostic__result-images img {
    width: auto;
    height: 180px;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.p-diagnostic__result-images img:hover {
    transform: scale(1.03);
}

.p-diagnostic__result-description {
    font-size: 15px;
    line-height: 2;
    color: #303135;
    margin-bottom: 20px;
}

.p-diagnostic__result-price {
    margin-bottom: 20px;
}

.p-diagnostic__result-price-text {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f8fffe 0%, #edfaf8 100%);
    border: 1px solid #d4f5ef;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.6;
}

.p-diagnostic__result-price-text strong {
    color: #1ab6a1;
    font-size: 18px;
}

.p-diagnostic__result-magazine {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e0ddd4;
    border-radius: 16px;
    color: #303135;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.6;
    transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.2s ease;
}

.p-diagnostic__result-magazine:hover {
    border-color: #1ab6a1;
    background-color: #f8fffe;
    transform: translateY(-2px);
}

.p-diagnostic__result-magazine-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.p-diagnostic__result-magazine-text {
    flex: 1;
}

.p-diagnostic__result-magazine svg {
    flex-shrink: 0;
    color: #1ab6a1;
}

/* --- ブロック2: サポート訴求 --- */
.p-diagnostic__support {
    padding: 32px 24px;
    background: linear-gradient(135deg, #fff 0%, #fafaf6 100%);
    border-radius: 20px;
    border: 1px solid #e0ddd4;
    margin-bottom: 40px;
}

.p-diagnostic__support-head {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 16px;
    color: #303135;
}

.p-diagnostic__support-txt {
    font-size: 14px;
    line-height: 2;
    color: #555;
    margin-bottom: 12px;
}

.p-diagnostic__support-txt:last-child {
    margin-bottom: 0;
}

#support-ai-emphasis.--highlight {
    font-weight: 700;
    color: #1ab6a1;
    background: linear-gradient(transparent 60%, rgba(26, 182, 161, 0.15) 60%);
}

/* --- ブロック3: CTA --- */
.p-diagnostic__cta {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.p-diagnostic__cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 24px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    line-height: 1.5;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.p-diagnostic__cta-btn:hover {
    transform: translateY(-2px);
}

.p-diagnostic__cta-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.p-diagnostic__cta-btn.--primary {
    background: linear-gradient(135deg, #2CE3C0 0%, #1ab6a1 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(26, 182, 161, 0.3);
}

.p-diagnostic__cta-btn.--primary:hover {
    box-shadow: 0 6px 24px rgba(26, 182, 161, 0.4);
}

.p-diagnostic__cta-btn.--secondary {
    background: #fff;
    color: #1ab6a1;
    border: 2px solid #1ab6a1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.p-diagnostic__cta-btn.--secondary:hover {
    background: #f8fffe;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* --- SNSシェア --- */
.p-diagnostic__share {
    text-align: center;
    margin-bottom: 32px;
}

.p-diagnostic__share-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.p-diagnostic__share-btns {
    display: flex;
    justify-content: center;
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.p-diagnostic__share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    color: #fff;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.p-diagnostic__share-btn:hover {
    transform: scale(1.1);
    opacity: 0.85;
}

.p-diagnostic__share-btn.--x {
    background: #000;
}

.p-diagnostic__share-btn.--line {
    background: #06C755;
}

.p-diagnostic__share-btn.--facebook {
    background: #1877F2;
}

.p-diagnostic__share-btn svg {
    width: 20px;
    height: 20px;
}

.p-diagnostic__share-btn.--line svg {
    width: 24px;
    height: 24px;
}

/* --- もう一度診断する --- */
.p-diagnostic__retry {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e0ddd4;
}

.p-diagnostic__retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: none;
    border: 1px solid #ccc;
    border-radius: 60px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.p-diagnostic__retry-btn:hover {
    color: #303135;
    border-color: #303135;
}

.p-diagnostic__retry-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ==============================================
   レスポンシブ - PC
   ============================================== */
@media screen and (min-width: 901px) {
    .p-diagnostic__intro-head {
        font-size: 32px;
    }

    .p-diagnostic__intro-txt {
        font-size: 16px;
    }

    .p-diagnostic__intro-illust {
        width: 240px;
    }

    .p-diagnostic__start-btn {
        font-size: 20px;
        padding: 20px 56px;
    }

    .p-diagnostic__question-title {
        font-size: 20px;
    }

    .p-diagnostic__question-num {
        font-size: 26px;
    }

    .p-diagnostic__choice {
        font-size: 16px;
        padding: 18px 24px;
        min-height: 64px;
    }

    .p-diagnostic__choices--grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .p-diagnostic__choices--grid > li:nth-child(4),
    .p-diagnostic__choices--grid > li:nth-child(5) {
        grid-column: auto;
    }

    .p-diagnostic__choices--grid > li:last-child {
        grid-column: auto;
    }

    .p-diagnostic__choice--card {
        padding: 28px 16px 24px;
    }

    .p-diagnostic__choice-emoji {
        font-size: 42px;
    }

    .p-diagnostic__result-name {
        font-size: 34px;
    }

    .p-diagnostic__result-tagline {
        font-size: 18px;
    }

    .p-diagnostic__result-description {
        font-size: 16px;
    }

    .p-diagnostic__support {
        padding: 40px 40px;
    }

    .p-diagnostic__support-head {
        font-size: 22px;
    }

    .p-diagnostic__support-txt {
        font-size: 15px;
    }

    .p-diagnostic__cta {
        flex-direction: row;
    }

    .p-diagnostic__cta-btn {
        flex: 1;
    }

    .p-diagnostic__result-images img {
        height: 220px;
    }
}

/* ==============================================
   レスポンシブ - SP小 (〜500px)
   ============================================== */
@media screen and (max-width: 500px) {
    .p-diagnostic {
        padding: 40px 0 60px;
        border-radius: 40px;
    }

    .p-diagnostic__deco--1 {
        width: 100px;
        height: 100px;
    }

    .p-diagnostic__deco--2 {
        width: 70px;
        height: 70px;
    }

    .p-diagnostic__intro {
        padding: 16px 0 32px;
    }

    .p-diagnostic__intro-illust {
        width: 160px;
    }

    .p-diagnostic__intro-head {
        font-size: 22px;
    }

    .p-diagnostic__intro-steps {
        gap: 8px;
        margin-bottom: 28px;
    }

    .p-diagnostic__intro-step-num {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .p-diagnostic__intro-step-txt {
        font-size: 11px;
    }

    .p-diagnostic__intro-step-arrow svg {
        width: 12px;
        height: 12px;
    }

    .p-diagnostic__start-btn {
        font-size: 16px;
        padding: 16px 36px;
        width: 100%;
        justify-content: center;
    }

    .p-diagnostic__question-title {
        font-size: 16px;
        text-align: left;
    }

    .p-diagnostic__choices--grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .p-diagnostic__choices--grid > li:last-child {
        grid-column: 1 / -1;
    }

    .p-diagnostic__choice--card {
        padding: 18px 12px 14px;
    }

    .p-diagnostic__choice-emoji {
        font-size: 28px;
    }

    .p-diagnostic__choice-card-label {
        font-size: 13px;
    }

    .p-diagnostic__choice-card-sub {
        font-size: 11px;
    }

    .p-diagnostic__choice {
        font-size: 14px;
        padding: 14px 16px;
        gap: 12px;
    }

    .p-diagnostic__choice-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 14px;
    }

    .p-diagnostic__result-header {
        padding: 32px 16px 28px;
        border-radius: 20px;
    }

    .p-diagnostic__result-icon {
        font-size: 40px;
    }

    .p-diagnostic__result-name {
        font-size: 22px;
    }

    .p-diagnostic__result-tagline {
        font-size: 14px;
    }

    .p-diagnostic__support {
        padding: 24px 16px;
    }

    .p-diagnostic__support-head {
        font-size: 18px;
    }

    .p-diagnostic__cta-btn {
        font-size: 14px;
        padding: 18px 16px;
    }

    .p-diagnostic__result-images img {
        height: 140px;
    }
}
