:root {
    --main-color: #1fa9df;
    --main-dark: #168bb8;
    --text-color: #333333;
    --bg-light: #f4f9fb;
    --white: #ffffff;
    --font-base: 'Noto Sans JP', sans-serif;
    --badge-required: #ff7043;
    --badge-any: #cfd8dc;
    --input-bg: #f8f9fa;
    --input-border: #e9ecef;
    --error-color: #ff0000;
    /* エラーカラー */
}

/* リセット & ベーススタイル */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-base);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    padding-bottom: 60px;
    padding-top: 0;
    /* モバイルのpaddingは0 */
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.8;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* 共通クラス */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section__title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 50px;
    position: relative;
}

.section__title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--main-color);
    margin: 15px auto 0;
}

.section__title--left {
    text-align: left;
}

.section__title--left::after {
    margin: 15px 0 0;
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}

.btn--primary {
    background-color: #df911f;
    color: var(--white);
    box-shadow: 0 4px 10px rgba(223, 145, 31, 0.3);
}

.btn--white {
    background-color: var(--white);
    color: #df911f;
}

.btn--lg {
    font-size: 18px;
    padding: 16px 40px;
    width: 100%;
    max-width: 300px;
}

/* ヘッダー */
.header {
    /* モバイルでは relative（追従なし）に設定 */
    position: relative;
    width: 100%;
    top: 0;
    z-index: 100;
    height: 70px;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header__inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__logo {
    display: flex;
    /* 画像の余白ズレを防ぐ */
    align-items: center;
}

/* ロゴ画像の基本設定（スマホ含む） */
.header__logo img {
    height: 36px;
    /* スマホでの高さ（ヘッダー70pxに対してバランス調整） */
    width: auto;
    /* 比率を保持 */
    display: block;
}

/* リンクにした場合の色リセット */
.header__logo a {
    display: block;
    color: transparent;
    /* 文字色が出ないように */
}

.btn--header {
    background-color: #df911f;
    color: var(--white);
    padding: 8px 20px;
    font-size: 14px;
}

/* ヒーローセクション */
.hero {
    background-image: url('img/mv.webp');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-color: rgba(120, 126, 129, 0.7);
    background-blend-mode: overlay;
    /* モバイルでタグが画像上部に被らないよう、上部の余白を調整 */
    padding: 100px 0 80px;
    color: var(--white);
    text-align: center;
}

.hero__container {
    display: block;
    text-align: center;
}

.hero__title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.4;
}

.hero__subtitle {
    color: var(--white);
    font-weight: 500;
}

.tag {
    background-color: var(--main-color);
    border: 1px solid var(--white);
    color: var(--white);
    border-radius: 6px;
    font-weight: 700;
    padding: 6px 15px;
    display: inline-block;
    margin-bottom: 5px;
}

.hero__features {
    margin-bottom: 40px;
}

/* お悩みセクション */
.problem {
    background-color: var(--white);
}

.problem__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.problem__item {
    background-color: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    position: relative;
    text-align: center;
    border: 2px solid #e0e0e0;
}

/* PACHEとは */
.about {
    background-color: var(--bg-light);
}

.about__container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.about__desc {
    margin-bottom: 30px;
}

.about__specs {
    background-color: var(--white);
    padding: 20px;
    border-radius: 8px;
}

.about__specs h3 {
    font-size: 16px;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

/* 選ばれる理由 */
.features__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.feature-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.feature-card__img {
    margin-bottom: 20px;
}

.feature-card__title {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--main-color);
}

.feature-card__text {
    font-size: 14px;
    text-align: left;
}

/* 流れ */
.flow {
    background-color: var(--bg-light);
}

.step {
    background: var(--white);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.step__num {
    background-color: var(--main-color);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

/* 料金 */
.price__box,
.price__simulation {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

/* 料金見出し (左寄せ) */
.price__subtitle {
    text-align: left;
    /* 左寄せ */
    display: block;
    width: 100%;
    margin-bottom: 20px;
    background-color: transparent;
    color: var(--main-color);
    padding: 0;
    font-size: 20px;
    font-weight: 700;
}

.price__box {
    text-align: center;
}

.price__item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.price__note {
    font-size: 12px;
    color: #777;
}

.price__calc {
    background-color: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    width: 100%;
}

.price__row,
.price__total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.price__total {
    font-weight: 700;
    border-top: 2px solid #ccc;
    padding-top: 10px;
    color: var(--main-color);
    font-size: 18px;
}

/* FAQ (背景色追加) */
.faq {
    background-color: var(--bg-light);
    /* 薄い水色 */
}

.faq__item {
    border-bottom: 1px solid #ddd;
}

.faq__question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 20px 0;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    padding-right: 30px;
}

.faq__question::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--main-color);
}

.faq__question.active::after {
    content: '-';
}

.faq__answer {
    display: none;
    padding-bottom: 20px;
    font-size: 14px;
    color: #555;
}

.faq__answer.active {
    display: block;
}

/* CTA & フォームデザイン */
.cta {
    background-color: var(--white);
    color: var(--text-color);
    text-align: center;
}

.contact__form-wrapper {
    background-color: var(--white);
    padding: 40px;
    border-radius: 12px;
    margin-top: 20px;
    text-align: left;
    color: var(--text-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: flex;
    align-items: center;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 15px;
}

/* 必須/任意バッジ */
.badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 10px;
    color: white;
    font-weight: 500;
}

.badge--required {
    background-color: var(--badge-required);
}

.badge--any {
    background-color: var(--badge-any);
    color: #555;
}

/* 入力欄スタイル */
.form-input {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    font-size: 16px;
    background-color: var(--input-bg);
    transition: border-color 0.3s;
    appearance: none;
}

.form-input:focus {
    outline: none;
    border-color: var(--main-color);
    background-color: #fff;
}

.form-textarea {
    height: 150px;
    resize: vertical;
}

.short-input {
    max-width: 200px;
}

/* お問い合わせ種別（ラジオボタン） */
.radio-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.radio-buttons-container input[type="radio"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.radio-btn-label {
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f8f9fa;
    color: #555;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

.radio-buttons-container input[type="radio"]:checked+.radio-btn-label {
    border-color: var(--main-color);
    background-color: #eef9fd;
    color: var(--main-color);
    border-width: 2px;
    padding: 11px 19px;
}


/* デバイス選択（チェックボックス） */
.checkbox-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-buttons-container input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.checkbox-btn-label {
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f8f9fa;
    color: #555;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    flex: 1 1 45%;
    /* モバイルは2列並び */
    text-align: center;
    white-space: nowrap;
}

.checkbox-buttons-container input[type="checkbox"]:checked+.checkbox-btn-label {
    border-color: var(--main-color);
    background-color: #eef9fd;
    color: var(--main-color);
    border-width: 2px;
    padding: 11px 19px;
    position: relative;
}

.checkbox-buttons-container input[type="checkbox"]:checked+.checkbox-btn-label::after {
    content: '✔';
    font-size: 12px;
    margin-left: 5px;
}

.error-message {
    border-color: #ff0000 !important;
    background-color: #fff8f8 !important;
}


/* プライバシーポリシーチェックボックス */
.form-privacy label {
    display: block;
    font-weight: 400;
    margin-top: 10px;
    cursor: pointer;
}

.form-privacy a {
    color: var(--main-color);
    text-decoration: underline;
}

/* 送信ボタン */
.form-submit {
    text-align: center;
    margin-top: 40px;
}

.btn--submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #1fa9df;
    color: white;
    width: 100%;
    max-width: 400px;
    padding: 18px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s;
    box-shadow: 0 5px 15px rgba(31, 169, 223, 0.3);
}

.btn--submit:hover {
    opacity: 0.9;
}

/* 認証グループ */
.form__auth-group {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.auth-fields {
    display: flex;
    gap: 10px;
}

.password-field {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0.5;
}


/* フッター */
.footer {
    background-color: #fff;
    color: #333;
    padding: 40px 0 20px;
    text-align: center;
    border-top: 1px solid #eee;
}

.fixed-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    text-align: center;
}

.fixed-cta .btn {
    width: 100%;
    max-width: 400px;
}

/* PC向けレスポンシブ (768px以上) */
@media (min-width: 768px) {
    .section {
        padding: 100px 0;
    }

    /* PCでヘッダーを固定 */
    .header {
        position: fixed;
    }

    /* PCで固定ヘッダーの高さ分、コンテンツ全体を下にずらす */
    body {
        padding-top: 70px;
    }

    .hero__container {
        flex-direction: row;
        justify-content: space-between;
    }

    .hero__content {
        width: 60%;
        text-align: left;
    }

    .hero__title {
        font-size: 40px;
    }

    .problem__item {
        width: calc(33.333% - 20px);
    }

    .about__container {
        flex-direction: row;
        align-items: center;
    }

    .about__text {
        width: 50%;
    }

    .about__image {
        width: 45%;
    }

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

    .flow__steps {
        display: flex;
        justify-content: space-between;
        gap: 20px;
    }

    .step {
        display: block;
        text-align: center;
        width: 25%;
    }

    .step__num {
        margin: 0 auto 15px;
    }

    .price__box,
    .price__simulation {
        max-width: 600px;
        margin: 0 auto 30px;
    }

    .form__auth-group {
        grid-template-columns: 1fr 1fr;
    }

    .checkbox-btn-label {
        flex: 1 1 30%;
        /* PCは3列並び */
    }

    /* ★修正点: OS・ブラウザグループのみを4列に調整★ */
    #os-browser-group .checkbox-btn-label {
        flex: 1 1 23%;
        /* 4列に分けるため、幅を23%に調整 */
    }

    .fixed-cta {
        display: none;
    }

    .footer {
        margin-bottom: 0;
    }
}

/* スマホ用ユーティリティ */
.sp-only {
    display: block;
}

@media (min-width: 768px) {
    .sp-only {
        display: none;
    }
}

/* ======== 追加: エラー表示スタイル ======== */
.error-message {
    color: var(--error-color);
    font-size: 13px;
    margin-top: 8px;
    font-weight: 500;
    display: none;
    /* JSで制御 */
}

.input-error {
    border-color: var(--error-color) !important;
    background-color: #fff8f8 !important;
}

/* PC向けレスポンシブ */
@media (min-width: 768px) {
    .section {
        padding: 100px 0;
    }

    .header {
        position: fixed;
    }

    .header__logo img {
        height: 48px;
        /* PCでは少し大きくする */
    }

    body {
        padding-top: 70px;
    }

    .hero__container {
        flex-direction: row;
        justify-content: space-between;
    }

    .hero__content {
        width: 60%;
        text-align: left;
    }

    .hero__title {
        font-size: 40px;
    }

    .problem__item {
        width: calc(33.333% - 20px);
    }

    .about__container {
        flex-direction: row;
        align-items: center;
    }

    .about__text {
        width: 50%;
    }

    .about__image {
        width: 45%;
    }

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

    .flow__steps {
        display: flex;
        justify-content: space-between;
        gap: 20px;
    }

    .step {
        display: block;
        text-align: center;
        width: 25%;
    }

    .step__num {
        margin: 0 auto 15px;
    }

    .price__box,
    .price__simulation {
        max-width: 600px;
        margin: 0 auto 30px;
    }

    .form__auth-group {
        grid-template-columns: 1fr 1fr;
    }

    .checkbox-btn-label {
        flex: 1 1 30%;
    }

    .fixed-cta {
        display: none;
    }

    .footer {
        margin-bottom: 0;
    }
}

.sp-only {
    display: block;
}

@media (min-width: 768px) {
    .sp-only {
        display: none;
    }
}

/* ----------------------------------------------------
   ▼ 追加：キーボード操作（フォーカス）時のスタイル
   Tabキーで移動した際に、ラベルを強調表示する
---------------------------------------------------- */

/* ラジオボタンにフォーカスが当たった時のラベル */
.radio-buttons-container input[type="radio"]:focus+.radio-btn-label {
    outline: 2px solid var(--main-color);
    outline-offset: 2px;
    background-color: #f0f8ff;
    /* 薄い青背景 */
}

/* チェックボックスにフォーカスが当たった時のラベル */
.checkbox-buttons-container input[type="checkbox"]:focus+.checkbox-btn-label {
    outline: 2px solid var(--main-color);
    outline-offset: 2px;
    background-color: #f0f8ff;
}