/* Reset basic margins & fonts */
body, h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dt, dd { margin: 0; padding: 0; }
* { box-sizing: border-box; }

body {
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
    color: #333;
    line-height: 1.6;
    background: #fbfcfe; /* 清潔感のある極薄いブルーグレー背景 */
}

/* ===================================================
   【福利厚生LP】 プロ仕様スタイル完全版
   （ヒロさん指摘：スマホ表示最適化・崩れ修正済み）
=================================================== */

/* --- 0. 全体の共通コンテナ --- */
.b-wrap {
    max-width: 1000px; /* 大画面でも広がりすぎないように制御 */
    margin: 0 auto;
    padding: 0 20px; /* ★下部メディアクエリで調整 */
}

/* --- 1. ヘッダー（ロゴ・タイトル） --- */
.b-header {
    background: #fff;
    padding: 30px 0; /* ★下部メディアクエリで調整 */
    text-align: center;
    border-bottom: 1px solid #edf1f5;
}
.b-header_logo {
    max-height: 50px; /* 圧迫感のない manage なサイズに調整。★下部メディアクエリで調整 */
    width: auto;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.b-header_title {
    font-size: 20px; /* ★下部メディアクエリで調整 */
    color: #1c0b5a; /* 太平ネイビー */
    font-weight: bold;
    letter-spacing: 0.1em;
    margin: 0;
}

/* --- 2. トップのメインビジュアル（ヒーロー画像） --- */
.b-hero-img-wrap {
    width: 100%;
    margin-top: 50px; /* ヘッダーとの隙間。★下部メディアクエリで調整 */
    margin-bottom: 50px; /* ★下部メディアクエリで調整 */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08); /* 影を上品に */
}
.b-hero-img-wrap img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- 3. Section 見出し --- */
.b-sec-title {
    font-size: 26px; /* ★下部メディアクエリで調整 */
    font-weight: bold;
    color: #1c0b5a;
    text-align: center;
    margin: 80px 0 50px; /* 縦の余白を多めに取ってLP感を出す。★下部メディアクエリで調整 */
    padding-bottom: 15px;
    position: relative;
}
.b-sec-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px; /* ★下部メディアクエリで調整 */
    height: 4px; /* ★下部メディアクエリで調整 */
    background: #1668ca; /* 太平ブルー */
    border-radius: 2px;
}

/* --- 4. DL Benefit Premium 推しセクション --- */
.b-hero-dl {
    background: linear-gradient(135deg, #1c0b5a 0%, #1668ca 100%);
    border-radius: 12px;
    color: #fff;
    padding: 60px 40px; /* 余白を増やしてリッチに。★下部メディアクエリで調整 */
    text-align: center;
    box-shadow: 0 10px 40px rgba(22, 104, 202, 0.25);
    margin-bottom: 80px; /* ★下部メディアクエリで調整 */
}
.b-hero-dl h2 {
    color: #fff !important;
    font-size: 32px; /* 少し大きく。★下部メディアクエリで調整 */
    font-weight: bold;
    margin-bottom: 25px; /* ★下部メディアクエリで調整 */
    line-height: 1.5;
    letter-spacing: 0.05em;
}
.b-hero-dl p {
    font-size: 16px; /* ★下部メディアクエリで調整 */
    margin-bottom: 50px; /* ★下部メディアクエリで調整 */
    opacity: 0.9;
}
/* 利用シーンのアイコン（Gridで自動調整） */
.b-use-cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}
.b-use-case {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 30px 20px;
}
.b-use-case i {
    font-size: 40px;
    margin-bottom: 20px;
    color: #ffd700; /* ゴールドで特別感を */
}
.b-use-case span {
    display: block;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 0.05em;
}
/* 登録ステップ */
.b-step-box {
    background: #fff;
    color: #333;
    border-radius: 8px;
    padding: 40px; /* ★下部メディアクエリで調整 */
    text-align: left;
    margin-bottom: 40px; /* ★下部メディアクエリで調整 */
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
}
.b-step-title {
    font-weight: bold;
    color: #1668ca;
    margin-bottom: 25px; /* ★下部メディアクエリで調整 */
    font-size: 20px; /* ★下部メディアクエリで調整 */
    border-bottom: 2px solid #edf1f5;
    padding-bottom: 15px;
}
.b-step-list {
    margin: 0;
    padding-left: 25px;
}
.b-step-list li {
    margin-bottom: 15px; /* ★下部メディアクエリで調整 */
    font-size: 16px; /* ★下部メディアクエリで調整 */
    font-weight: bold;
    list-style-type: decimal;
}
/* 立体ボタン */
.b-btn {
    display: inline-block;
    background: #ff9800; /* オレンジで行動喚起 */
    color: #fff !important;
    font-size: 19px; /* ★下部メディアクエリで調整 */
    font-weight: bold;
    text-decoration: none;
    padding: 20px 60px; /* ★下部メディアクエリで調整 */
    border-radius: 50px;
    box-shadow: 0 6px 0 #e65100, 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    letter-spacing: 0.05em;
    /* width: 100%; ★下部メディアクエリで設定 */
}
.b-btn:hover {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #e65100, 0 5px 10px rgba(0, 0, 0, 0.1);
}

/* --- 5. カードレイアウトのグリッド制御（CSS Grid） --- */
/* 基本（スマホ） */
.b-grid-2col, .b-grid-3col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px; /* ★下部メディアクエリで調整 */
}

/* タブレット・PCでの制御 */
@media screen and (min-width: 768px) {
    /* 太平グループ内優待などは2列 */
    .b-grid-2col {
        grid-template-columns: repeat(2, 1fr);
    }
    /* 業務提携などは3列 */
    .b-grid-3col {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* カードのデザイン */
.b-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(28, 11, 90, 0.05);
    border: 1px solid #edf1f5;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}
.b-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(28, 11, 90, 0.12);
}
.b-card-img {
    width: 100%;
    height: 190px;
    background-color: #edf1f5;
    background-size: cover;
    background-position: center;
}
.b-card-body {
    padding: 25px; /* ★下部メディアクエリで調整 */
    flex-grow: 1;
}
.b-card-title {
    font-size: 18px; /* ★下部メディアクエリで調整 */
    font-weight: bold;
    color: #1c0b5a;
    margin-bottom: 15px; /* ★下部メディアクエリで調整 */
    border-bottom: 2px dotted #edf1f5;
    padding-bottom: 10px;
}
.b-card-desc {
    font-size: 14px; /* ★下部メディアクエリで調整 */
    color: #555;
    margin-bottom: 20px; /* ★下部メディアクエリで調整 */
    line-height: 1.7;
}
.b-card-tag {
    display: inline-block;
    background: #1668ca;
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-weight: bold;
}
.b-card-info dt {
    float: left;
    clear: left;
    width: 80px; /* ★下部メディアクエリで調整 */
    font-weight: bold;
    color: #1668ca;
    font-size: 13px; /* ★下部メディアクエリで調整 */
    margin-bottom: 8px;
}
.b-card-info dd {
    margin-left: 80px; /* ★下部メディアクエリで調整 */
    font-size: 13px; /* ★下部メディアクエリで調整 */
    margin-bottom: 8px;
    color: #333;
}

/* 特殊カード（夢ポイントの横長レイアウト） */
.b-card-wide {
    display: grid;
    grid-template-columns: 1fr;
}
@media screen and (min-width: 768px) {
    .b-card-wide {
        grid-template-columns: 350px 1fr;
    }
    .b-card-wide .b-card-img {
        height: 100%;
    }
}

/* --- 6. フッター（コピーライト） --- */
.b-footer {
    background: linear-gradient(135deg, #1c0b5a 0%, #1668ca 100%);
    color: #fff;
    text-align: center;
    padding: 40px 0; /* ★下部メディアクエリで調整 */
    margin-top: 100px; /* Sectionとの隙間。★下部メディアクエリで調整 */
}
.b-footer_copy {
    font-size: 14px; /* ★下部メディアクエリで調整 */
    margin: 0;
    letter-spacing: 0.1em;
    opacity: 0.9;
}

/* --- 7. アクティベーションキー枠 --- */
.b-activation-box {
    background: #f4f7fb;
    border: 2px solid #1668ca;
    border-radius: 8px;
    padding: 30px; /* ★下部メディアクエリで調整 */
    margin-bottom: 40px; /* ★下部メディアクエリで調整 */
    color: #333;
    text-align: left;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
}
.b-activation-title {
    font-weight: bold;
    color: #1c0b5a;
    font-size: 20px; /* ★下部メディアクエリで調整 */
    margin-bottom: 15px; /* ★下部メディアクエリで調整 */
    border-bottom: 2px solid #caced5;
    padding-bottom: 10px;
}
.b-key-item {
    background: #fff;
    padding: 15px 20px; /* ★下部メディアクエリで調整 */
    border-radius: 6px;
    border: 1px dashed #ccc;
    margin-bottom: 15px; /* ★下部メディアクエリで調整 */
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.b-key-label {
    font-weight: bold;
    color: #555;
    font-size: 15px; /* ★下部メディアクエリで調整 */
}
.b-key-code {
    background: #eaf2f8;
    color: #1668ca;
    font-size: 22px; /* ★下部メディアクエリで調整 */
    font-weight: bold;
    padding: 8px 20px; /* ★下部メディアクエリで調整 */
    border-radius: 4px;
    letter-spacing: 2px; /* ★下部メディアクエリで調整 */
    /* ★魔法のコード：タップ（クリック）で全選択されるようになります */
    -webkit-user-select: all;
    user-select: all;
    cursor: pointer;
    /* word-wrap: break-word; ★下部メディアクエリで設定 */
}
/* 新しいキー（②）は色を変えて目立たせる */
.b-key-item.is-new {
    border-color: #cf2e2e;
    background: #fffafa;
}
.b-key-item.is-new .b-key-label {
    color: #cf2e2e;
}
.b-key-item.is-new .b-key-code {
    background: #fdeaea;
    color: #cf2e2e;
}
.b-activation-note {
    font-size: 14px; /* ★下部メディアクエリで調整 */
    color: #cf2e2e;
    margin-top: 20px; /* ★下部メディアクエリで調整 */
    line-height: 1.6;
    background: #fff;
    border-left: 4px solid #cf2e2e;
    padding: 15px; /* ★下部メディアクエリで調整 */
    border-radius: 4px;
}

/* --- 8. DL Benefit 具体例カード（4列グリッド） --- */
.b-example-grid {
    display: grid;
    /* 縦並び1列化をスマホメディアクエリ外で対応 */
    grid-template-columns: 1fr; /* ★スマホは1列に変更 */
    gap: 15px; /* ★下部メディアクエリで調整 */
    margin-bottom: 40px; /* ★下部メディアクエリで調整 */
}
@media screen and (min-width: 768px) {
    .b-example-grid {
        grid-template-columns: repeat(4, 1fr); /* PCは4列 */
        gap: 20px;
    }
}
.b-ex-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    text-align: left;
    color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}
.b-ex-card:hover {
    transform: translateY(-4px);
}
.b-ex-img {
    width: 100%;
    height: 110px; /* 画像の高さ。★下部メディアクエリで調整 */
    background-size: cover;
    background-position: center;
    background-color: #edf1f5;
}
.b-ex-body {
    padding: 15px; /* ★下部メディアクエリで調整 */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
/* 【決済後即時受取】などのタグ */
.b-ex-tags {
    margin-bottom: 8px;
}
.b-ex-tag {
    display: inline-block;
    background: #f39c12; /* お得なオレンジ */
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 4px;
    margin-bottom: 4px;
    font-weight: bold;
}
.b-ex-tag-blue { background: #1668ca; }
.b-ex-title {
    font-weight: bold;
    font-size: 14px; /* ★下部メディアクエリで調整 */
    margin-bottom: 8px;
    color: #1c0b5a;
    line-height: 1.4;
}
.b-ex-desc {
    font-size: 12px; /* ★下部メディアクエリで調整 */
    line-height: 1.5;
    margin: 0;
    color: #555;
}
/* お得な価格表示用 */
.b-ex-desc .strike { 
    text-decoration: line-through; 
    color: #999; 
    font-size: 11px;
}
.b-ex-desc .red-price { 
    color: #e60000; 
    font-size: 16px; /* ★下部メディアクエリで調整 */
    font-weight: bold; 
}


/* --- 9. デジタルクーポン用 ポップアップ（モーダル） --- */

/* カード内の表示ボタン */
.b-card-btn {
    display: block;
    text-align: center;
    background: #1668ca;
    color: #fff !important;
    padding: 12px; /* ★下部メディアクエリで調整 */
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px; /* ★下部メディアクエリで調整 */
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(22, 104, 202, 0.2);
    /* font-size: 14px; ★下部メディアクエリで設定 */
}
.b-card-btn:hover {
    background: #1152a3;
    transform: translateY(-2px);
}

/* ポップアップの背景（太平ネイビーの半透明） */
.b-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(28, 11, 90, 0.85); 
    z-index: 99999; /* 画面の一番手前に持ってくる */
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    display: flex; /* 初期表示で必要 */
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ポップアップの中身 */
.b-modal-content {
    background: #fff;
    padding: 25px; /* ★下部メディアクエリで調整 */
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* レジで見せる用のメッセージ */
.b-modal-msg {
    font-weight: bold;
    color: #e60000;
    margin-bottom: 15px;
    font-size: 15px; /* ★下部メディアクエリで調整 */
    line-height: 1.4;
}
.b-modal-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #edf1f5;
    margin-bottom: 20px;
}
.b-modal-close {
    display: inline-block;
    background: #555;
    color: #fff !important;
    padding: 10px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
}


/* --- 10. クリップボードコピーボタン --- */
.b-copy-wrap {
    display: inline-flex;
    align-items: center;
    background: #eaf2f8;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #1668ca;
    transition: all 0.2s ease;
    margin-top: 5px;
    max-width: 100%; /* 親からはみ出さない */
    flex-wrap: nowrap; /* PCでは横並び維持 */
}
.b-copy-wrap:hover {
    box-shadow: 0 4px 8px rgba(22, 104, 202, 0.2);
    transform: translateY(-2px);
}
.b-copy-wrap .b-key-code {
    background: transparent;
    padding: 10px 15px;
    margin: 0;
    -webkit-user-select: text; /* スマホでの誤作動防止 */
    user-select: text;
}
.b-copy-btn {
    background: #1668ca;
    color: #fff;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s ease;
    min-width: 130px; /* ★「コピー完了」時の幅を確保（PC） */
    justify-content: center; /* 中央揃え */
}
.b-copy-btn.is-copied {
    background: #00d084; /* コピー完了時はグリーンに変化 */
}

/* 新しいキー（②）用のカラー調整 */
.b-key-item.is-new .b-copy-wrap {
    border-color: #cf2e2e;
    background: #fdeaea;
}
.b-key-item.is-new .b-copy-btn {
    background: #cf2e2e;
}
.b-key-item.is-new .b-copy-btn.is-copied {
    background: #00d084;
}

/* --- 11. トップへ戻るボタン --- */
html {
    scroll-behavior: smooth; /* スムーススクロールの魔法 */
}
.b-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #1c0b5a; /* 太平ネイビー */
    color: #fff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    opacity: 0; /* 最初は透明 */
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
}
.b-back-to-top.show {
    opacity: 1; /* スクロールすると現れる */
    visibility: visible;
}
.b-back-to-top:hover {
    background: #1668ca;
    transform: translateY(-3px);
}


/* ===================================================
   【福利厚生LP】 スマホ表示最適化（★最重要追加★）
   ここに書かれた設定が、スマホで見た時に優先されます。
=================================================== */

@media screen and (max-width: 767px) {
    /* 全体・文字縮小、余白縮小 */
    body { font-size: 15px; } /* 基本文字サイズを少し小さく */

    .b-wrap { padding: 0 15px; } /* 横余白を少し詰める */

    .b-header { padding: 20px 0; }
    .b-header_logo { max-height: 40px; }
    .b-header_title { font-size: 18px; }

    .b-hero-img-wrap { margin-top: 30px; margin-bottom: 30px; }

    /* Section 見出し */
    .b-sec-title { font-size: 22px; margin: 50px 0 30px; padding-bottom: 10px; }
    .b-sec-title::after { width: 40px; height: 3px; }

    /* 4. DL Benefit Premium 推しセクション */
    .b-hero-dl { padding: 40px 20px; margin-bottom: 50px; } /* 横幅いっぱいにならないよう余白調整 */
    .b-hero-dl h2 { font-size: 24px; margin-bottom: 15px; }
    .b-hero-dl p { font-size: 15px; margin-bottom: 30px; }

    /* アイコン利用シーン（縦並びへ） */
    .b-use-cases { grid-template-columns: 1fr; gap: 15px; margin-bottom: 30px; }
    .b-use-case { padding: 20px; }
    .b-use-case i { font-size: 30px; margin-bottom: 10px; }
    .b-use-case span { font-size: 14px; }

    /* 8. 具体例カードの調整（縦並び1列化） */
    .b-example-grid { gap: 20px; margin-bottom: 30px; }
    .b-ex-img { height: auto; aspect-ratio: 16/9; } /* 1列の時は高さを自動調整（比率固定） */
    .b-ex-body { padding: 20px; }
    .b-ex-title { font-size: 15px; }
    .b-ex-desc { font-size: 13px; }
    .b-ex-desc .red-price { font-size: 18px; } /* 価格も少し小さく */

    /* 登録ステップ */
    .b-step-box { padding: 25px; margin-bottom: 30px; }
    .b-step-title { font-size: 18px; margin-bottom: 20px; padding-bottom: 10px; }
    .b-step-list li { font-size: 15px; margin-bottom: 10px; }

    /* アクティベーションキー枠（★崩れ・はみ出し修正★） */
    .b-activation-box { padding: 20px; margin-bottom: 30px; }
    .b-activation-title { font-size: 18px; margin-bottom: 10px; }
    .b-key-item { padding: 10px 15px; margin-bottom: 10px; flex-direction: column; align-items: flex-start; gap: 5px; white-space: wrap; overflow: hidden; } /* スマホでは縦並びに */
    .b-key-label { font-size: 14px; }
    
    /* ★コピー機能付きの枠（縦並びに変更） */
    .b-copy-wrap { 
        width: 100%; 
        flex-direction: column; /* 縦並び */
        align-items: stretch; /* 幅いっぱい */
        justify-content: flex-start;
        margin-top: 10px;
        border-radius: 8px; /* 角丸を少し大きく */
    }
    
    /* ★コード（数字）部分（縦並び用） */
    .b-copy-wrap .b-key-code { 
        font-size: 14px; /* ★さらに小さくして確実にはみ出しを防ぐ */
        padding: 10px; 
        width: 100%; 
        text-align: left; 
        display: block;
        max-width: 100%;
        word-wrap: break-word; /* はみ出し防止 */
        white-space: wrap;
        letter-spacing: 1px;
    }
    
    /* ★コピーボタン（縦並び用） */
    .b-copy-btn { 
        width: 100%; 
        min-width: 0; /* 固定幅解除 */
        text-align: center; 
        justify-content: center;
        border-radius: 0 0 8px 8px; /* 下部だけ角丸 */
        padding: 10px; 
        font-size: 14px;
    }

    /* 新しいキー（②）用のカラー調整（縦並び用） */
    .b-key-item.is-new .b-copy-wrap .b-key-code {
        color: #cf2e2e;
        background: #fdeaea;
    }

    .b-activation-note { font-size: 13px; margin-top: 15px; padding: 10px; }

    /* 立体ボタン */
    .b-btn { font-size: 16px; padding: 15px 40px; width: 100%; } /* スマホでは幅いっぱいに */

    /* 5. カードレイアウト（業務提携・グループ内・健康） */
    .b-grid-2col, .b-grid-3col { gap: 20px; }
    .b-card-body { padding: 15px; }
    .b-card-title { font-size: 16px; margin-bottom: 10px; }
    .b-card-desc { font-size: 13px; margin-bottom: 15px; }
    .b-card-info dt, .b-card-info dd { font-size: 12px; }
    .b-card-info dt { width: 70px; }
    .b-card-info dd { margin-left: 75px; }

    /* 夢ポイント（横長）をスマホでは縦に（既にメディアクエリ外で対応済みだが念のため） */
    .b-card-wide .b-card-img { height: 150px; } /* 画像を少し低く */

    /* デジタルクーポンボタン */
    .b-card-btn { padding: 10px; font-size: 14px; margin-top: 10px; text-align: center; }
    /* モーダル */
    .b-modal-content { padding: 15px; }
    .b-modal-msg { font-size: 13px; }

    /* 6. フッター */
    .b-footer { padding: 25px 0; margin-top: 50px; }
    .b-footer_copy { font-size: 12px; }

    /* 11. トップに戻るボタン */
    .b-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}