/* ======================================================
   RAYJOHN — diagnosis.css
   固定費無料診断フォームページ専用（style.css を継承）
====================================================== */

.main-nav a.is-current {
    color: var(--blue);
}

.container--narrow {
    max-width: 760px;
}


/* ================================================================
   診断できる項目
================================================================ */
.p-items {
    background: linear-gradient(180deg, var(--white) 0%, var(--bg) 12%, var(--bg) 88%, var(--white) 100%);
}

.item-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}

@media (min-width: 768px) {
    .item-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.item-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: .25s;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--blue-light);
}

.item-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--blue-pale);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.item-icon svg {
    width: 24px;
    height: 24px;
}

.item-card h3 {
    font-size: 1rem;
    color: var(--navy);
    margin-bottom: 10px;
    font-weight: 800;
    line-height: 1.5;
}

.item-card p {
    font-size: .85rem;
    color: var(--gray);
    line-height: 1.8;
}


/* ================================================================
   フォーム全体
================================================================ */
.diag-form-wrap {
    background: var(--white);
}

.diag-step {
    border: none;
    padding: 0;
    margin: 0 0 56px;
}

.diag-step:last-of-type {
    margin-bottom: 36px;
}

.diag-step-label {
    display: inline-block;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    color: var(--blue);
    background: var(--blue-pale);
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 10px;
}

.diag-step-title {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--navy);
    margin-bottom: 6px;
}

.diag-step-note {
    font-size: .8rem;
    color: var(--gray);
    margin-bottom: 24px;
    line-height: 1.7;
}

/* 条件分岐ステップ：非表示時は完全に隠す + フェードイン */
.diag-step--conditional {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px 26px;
    margin-bottom: 32px;
    animation: stepIn .35s ease;
}

@keyframes stepIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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


/* ── フォーム行 ── */
.form-row {
    margin-bottom: 24px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-row>label {
    display: block;
    font-size: .88rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
}

.req {
    display: inline-block;
    font-size: .625rem;
    font-weight: 800;
    color: var(--white);
    background: var(--blue);
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 6px;
    vertical-align: 2px;
}

.form-row input[type="text"],
.form-row input[type="tel"],
.form-row input[type="email"],
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 13px 16px;
    font-size: .92rem;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-pale);
}

.form-row textarea {
    resize: vertical;
    min-height: 100px;
}


/* ── 選択肢チップ（ラジオ／チェックボックス） ── */
.choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.choice-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.choice-chip input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
}

.choice-chip span {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--navy);
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 100px;
    transition: .18s;
}

.choice-chip input:checked+span {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--white);
}

.choice-chip input:focus-visible+span {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.choice-chip:hover span {
    border-color: var(--blue-light);
}

.choice-chip--agree span {
    display: block;
    position: relative;
    border-radius: 10px;
    padding: 14px 18px 14px 46px;
    font-weight: 500;
    line-height: 1.7;
}

.choice-chip--agree span::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 16px;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    border: 1.5px solid var(--gray-light);
    background-color: var(--white);
    background-size: 14px 14px;
    background-position: center;
    background-repeat: no-repeat;
    transition: .18s;
}

.choice-chip--agree input:checked+span::before {
    background-color: var(--blue);
    border-color: var(--blue);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

.choice-chip--agree input:focus-visible+span::before {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.choice-chip--agree input:checked+span {
    background: var(--blue-pale);
    border-color: var(--blue);
    color: var(--navy);
}

.choice-chip--agree a {
    color: var(--blue);
    text-decoration: underline;
}

.form-error {
    color: #DC2626;
    font-size: .8rem;
    font-weight: 700;
    margin-top: 10px;
}


/* ── 画像添付 ── */
.file-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 36px 20px;
    border: 2px dashed var(--blue-light);
    border-radius: var(--radius);
    background: var(--blue-pale);
    color: var(--blue);
    cursor: pointer;
    transition: .2s;
}

.file-drop:hover {
    background: #DCEBFF;
}

.file-drop svg {
    width: 32px;
    height: 32px;
}

.file-drop span {
    font-size: .85rem;
    font-weight: 700;
}

.file-drop input {
    display: none;
}

.file-list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.file-list li {
    font-size: .82rem;
    color: var(--navy);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 14px;
}


/* ── 送信ボタン行 ── */
.diag-submit-row {
    text-align: center;
    padding-top: 12px;
}

.diag-submit-row .btn {
    width: 100%;
    max-width: 340px;
}

.diag-submit-row--double {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.diag-submit-row--double .btn {
    max-width: 260px;
}


/* ================================================================
   確認画面
================================================================ */
.confirm-list {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 8px 28px;
    margin-bottom: 36px;
}

.confirm-list dt {
    font-size: .76rem;
    font-weight: 700;
    color: var(--blue);
    padding-top: 18px;
    letter-spacing: .02em;
}

.confirm-list dd {
    font-size: .92rem;
    color: var(--navy);
    font-weight: 600;
    padding: 4px 0 18px;
    border-bottom: 1px solid var(--border);
    line-height: 1.7;
}

.confirm-list dd:last-of-type {
    border-bottom: none;
}


/* ================================================================
   完了画面
================================================================ */
.complete-box {
    text-align: center;
    padding: 40px 10px 20px;
}

.complete-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--blue-pale);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.complete-icon svg {
    width: 38px;
    height: 38px;
}

.complete-box h2 {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--navy);
    margin-bottom: 20px;
    line-height: 1.5;
}

.complete-box p {
    font-size: .9rem;
    color: var(--gray);
    line-height: 2;
    margin-bottom: 32px;
}


/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 599px) {
    .diag-step--conditional {
        padding: 22px 18px;
    }

    .choice-chip span {
        padding: 9px 14px;
        font-size: .8rem;
    }

    .choice-chip--agree span {
        padding: 12px 14px 12px 42px;
        font-size: .8125rem;
    }

    .choice-chip--agree span::before {
        left: 14px;
        top: 14px;
    }

    .confirm-list {
        padding: 4px 18px;
    }
}