/* ===================================
   リセット & 基本設定
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
    line-height: 1.7;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8f4f8 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===================================
   画面制御
   =================================== */
.screen {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    min-height: 100vh;
    padding: 16px;
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* ===================================
   コンテナ
   =================================== */
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 16px;
}

/* ===================================
   キャラクター画像
   =================================== */
.hero-character {
    width: 140px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
    animation: float 3s ease-in-out infinite;
}

.page-character {
    width: 100px;
    height: auto;
    margin: 0 auto 16px;
    display: block;
}

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

/* ===================================
   スタート画面
   =================================== */
.hero-content {
    text-align: center;
    padding: 40px 16px 32px;
}

.main-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 20px;
    line-height: 1.3;
}

.subtitle {
    font-size: 0.95rem;
    color: #4a5568;
    margin-bottom: 20px;
    line-height: 1.8;
}

.duration {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 32px;
}

/* ===================================
   入り口選択画面
   =================================== */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a365d;
    text-align: center;
    margin-bottom: 10px;
    margin-top: 20px;
}

.section-description {
    font-size: 0.9rem;
    color: #718096;
    text-align: center;
    margin-bottom: 24px;
}

.category-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

.category-card {
    background: white;
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-card:active {
    transform: scale(0.98);
    background: #f7fafc;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 6px;
}

.card-description {
    font-size: 0.85rem;
    color: #718096;
}

/* ===================================
   診断画面
   =================================== */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4299e1 0%, #48bb78 100%);
    transition: width 0.3s ease;
    border-radius: 6px;
}

.progress-text {
    font-size: 0.85rem;
    color: #718096;
    text-align: center;
    margin-bottom: 24px;
    font-weight: 600;
}

.question-content {
    margin-bottom: 24px;
}

.question-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
    line-height: 1.5;
}

.options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.option-btn {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
    font-size: 0.95rem;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
    font-family: inherit;
    line-height: 1.6;
    min-height: 56px;
}

.option-btn:active {
    transform: scale(0.98);
    background: #f7fafc;
    border-color: #4299e1;
}

/* ===================================
   診断結果画面
   =================================== */
.result-header {
    text-align: center;
    margin-bottom: 24px;
    margin-top: 20px;
}

.result-label {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 10px;
    font-weight: 600;
}

.result-type {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 8px;
    line-height: 1.4;
}

.result-card {
    background: white;
    border-radius: 14px;
    padding: 24px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.result-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    margin-top: 20px;
}

.result-section-title:first-child {
    margin-top: 0;
}

.result-text {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 14px;
}

.result-list {
    list-style: none;
    padding-left: 0;
}

.result-list li {
    font-size: 0.9rem;
    color: #4a5568;
    padding: 8px 0 8px 8px;
    line-height: 1.6;
    border-left: 3px solid #4299e1;
    margin-bottom: 8px;
    padding-left: 14px;
}

.result-next-step {
    background: #f0f9ff;
    padding: 14px;
    border-radius: 8px;
    border-left: 4px solid #4299e1;
    font-weight: 600;
    margin-bottom: 0;
}

/* タイプ別カラー */
.result-type.type-1 .result-list li {
    border-left-color: #4299e1;
}

.result-type.type-2 .result-list li {
    border-left-color: #48bb78;
}

.result-type.type-3 .result-list li {
    border-left-color: #ed8936;
}

.result-type.type-4 .result-list li {
    border-left-color: #9f7aea;
}

/* ===================================
   公式LINE誘導画面
   =================================== */
.cta-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a365d;
    text-align: center;
    margin-bottom: 20px;
    margin-top: 20px;
}

.cta-card {
    background: white;
    border-radius: 14px;
    padding: 24px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.cta-text {
    font-size: 1rem;
    color: #2d3748;
    line-height: 1.9;
    text-align: center;
    margin-bottom: 24px;
}

.cta-text strong {
    color: #4299e1;
    font-weight: 700;
}

.cta-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 14px;
    text-align: center;
}

.cta-benefits {
    list-style: none;
    padding-left: 0;
    margin-bottom: 24px;
}

.cta-benefits li {
    font-size: 0.95rem;
    color: #4a5568;
    padding: 10px 0;
    line-height: 1.7;
}

.cta-reassurance {
    font-size: 0.9rem;
    color: #718096;
    text-align: center;
    line-height: 1.8;
    margin-top: 20px;
    margin-bottom: 0;
}

.cta-instruction {
    font-size: 0.95rem;
    color: #2d3748;
    text-align: center;
    margin-bottom: 16px;
    font-weight: 600;
}

.cta-note {
    font-size: 0.8rem;
    color: #718096;
    text-align: center;
    margin-top: 12px;
    margin-bottom: 20px;
}

/* ===================================
   ボタン
   =================================== */
.btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: inherit;
    text-decoration: none;
    line-height: 1.5;
    min-height: 52px;
}

.btn-primary {
    background: linear-gradient(135deg, #4299e1 0%, #48bb78 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

.btn-secondary {
    background: white;
    color: #4a5568;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-secondary:active {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.btn-large {
    padding: 16px 24px;
    font-size: 1.05rem;
    min-height: 56px;
}

.btn-line {
    margin-bottom: 14px;
}

/* ボタン間隔 */
.btn + .btn {
    margin-top: 12px;
}

/* ===================================
   レスポンシブ対応
   =================================== */
@media (min-width: 768px) {
    .container {
        padding: 32px;
    }

    .hero-content {
        padding: 60px 32px 48px;
    }

    .hero-character {
        width: 180px;
        margin-bottom: 24px;
    }

    .page-character {
        width: 120px;
        margin-bottom: 20px;
    }

    .main-title {
        font-size: 2.8rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .category-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .category-card {
        padding: 28px 24px;
    }

    .card-icon {
        font-size: 3rem;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .card-description {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 2rem;
        margin-top: 32px;
    }

    .question-title {
        font-size: 1.5rem;
    }

    .option-btn {
        padding: 18px 20px;
        font-size: 1rem;
    }

    .result-type {
        font-size: 2rem;
    }

    .result-card {
        padding: 32px 28px;
    }

    .cta-title {
        font-size: 2.2rem;
    }

    .cta-card {
        padding: 32px 28px;
    }

    .btn {
        padding: 16px 32px;
    }

    .btn-large {
        padding: 18px 32px;
        font-size: 1.1rem;
    }
}

/* タッチデバイス対応 */
@media (hover: none) and (pointer: coarse) {
    .btn:active,
    .option-btn:active,
    .category-card:active {
        opacity: 0.9;
    }

    /* hover効果を無効化 */
    .category-card:hover,
    .option-btn:hover,
    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none;
        box-shadow: none;
    }
}

/* アクセシビリティ */
.btn:focus,
.option-btn:focus,
.category-card:focus {
    outline: 3px solid #4299e1;
    outline-offset: 2px;
}

/* 印刷時 */
@media print {
    .btn,
    .progress-bar,
    .progress-text {
        display: none;
    }

    .screen {
        display: block !important;
        opacity: 1 !important;
    }
}