/* レイアウトの基盤：フッターを最下部に固定 */
html,
body {
    /* または、最新のブラウザであれば下記が推奨（スクロールバーが出ても幅が変わらない） */
    scrollbar-gutter: stable;
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    /* 縦並び */
    min-height: 100vh;
    /* 画面の高さいっぱいを最低保証 */
}

#content-area {
    flex: 1;
    /* 余ったスペースをすべて使い、フッターを下に押し出す */
    padding-top: 100px;
}

:root {
    --bg: #ffffff;
    --accent-blue: #007AFF;
    --soft-gray: #f0f0f0;
    --soft-blue: #F0F5FF;
    --text-main: #333333;
    --text-sub: #777777;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    margin: 0;
    overflow-x: hidden;
}

/* ページ切り替えの仕組み */
.page-section {
    display: none;
    /* 通常は隠す */
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
}

.page-section.active {
    display: block;
    /* 選択中だけ表示 */
    opacity: 1;
    transform: translateY(0);
}

/* ソフトなナビゲーション */
nav {
    display: flex;
    gap: 10px;
    background: var(--soft-gray);
    padding: 5px;
    border-radius: 16px;
}

.nav-item {
    text-decoration: none;
    color: var(--text-sub);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 10px 24px;
    border-radius: 12px;
    transition: 0.3s ease;
}

.nav-item.active {
    background-color: #ffffff;
    color: var(--accent-blue);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* ロゴ */
.logo-text {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 0.1em;
}

.logo-text span {
    font-weight: 300;
}

/* PC版のレイアウト */
.app-main-visual {
    display: flex;
    align-items: flex-start;
    /* 上揃え */
    gap: 40px;
    width: 100%;
    margin-bottom: 40px;
}

/* ヒーローエリアのソフトな装飾 */
.hero-section {
    flex: 1;
    /* 残りのすべてのスペースをこちらに割り当てる */
    min-width: 0;
    /* これが「残りのスペース内で折り返す」ための必須命令 */
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

/* アプリ名（h2） */
.hero-copy h2 {
    margin: 0;
    font-size: 1.8rem;
    line-height: 1.4;
    white-space: normal;
    word-break: break-all;
    overflow-wrap: break-word;
    width: 100%;
    /* 親が確保した「残りの幅」いっぱいに広がる */
}

.sub-title {
    font-size: 1.6rem;
    display: inline-block;
}

/* タイトル画像 */
.title-image {
    flex: 0 0 auto;
    /* 比率で伸び縮みさせない */
}

.title-image img {
    /* 画像本来のサイズを維持。ただし親(container)より大きい場合は突き抜けないようにする */
    width: auto;
    max-width: 600px;
    /* ここで「これ以上大きくしたくない最大幅」を指定（お好みで調整） */
    height: auto;
    display: block;
}

.app-description {
    padding: 15px 20px;
    background: #fafafa;
    /* 非常に薄いグレー */
    border-left: 5px solid #4a90e2;
    /* アクセントカラーの棒 */
    line-height: 1.8;
    border-radius: 4px;
    margin-top: 20px;
}

.lead-text {
    font-size: 1.1em;
    margin: 0;
    /* paddingを親に持たせたのでmarginは0でOK */
}

.hollow-circle {
    display: inline-block;
    width: 10px;
    /* 円の大きさ */
    height: 10px;
    /* 円の大きさ */
    border: 3px solid #4a90e2;
    /* 線の太さと色をここで自由に調整！ */
    border-radius: 50%;
    /* これで正方形が円になります */
    vertical-align: middle;
    margin-right: 6px;
}

/* アプリ詳細エリアのスタイル */
.app-details {
    padding: 40px 0;
}


/* playstoreボタン */
.play-store-badge {
    height: auto;
    /* 他の要素とのバランスを見て調整 */
    width: 200px;
    transition: opacity 0.3s ease;
}

.play-store-badge:hover {
    opacity: 0.6;
    /* マウスを乗せた時に少し薄くする演出 */
}

.button-group {
    display: flex;
    justify-content: flex-start;
    margin-top: 20px;
}


/* アイコン */
.icon-box {
    width: 64px;
    /* 四角形の幅 */
    height: 64px;
    /* 四角形の高さ */
    flex-shrink: 0;
    /* スマホで潰されないように固定 */
    background-color: #f0f0f5;
    /* 箱の背景色（ソフトなグレー） */
    border-radius: 16px;
    /* 角を丸くする（Appアイコン風） */
    display: flex;
    /* 中の画像を中央に寄せる */
    justify-content: center;
    /* 左右中央 */
    align-items: center;
    /* 上下中央 */
    overflow: hidden;
    /* はみ出た画像をカット */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* ほんのり影 */
}

.icon-box img {
    width: 100%;
    /* 箱に対して画像の大きさを調整（余白を作る） */
    height: auto;
    /* 比率を維持 */
    object-fit: contain;
    /* 画像を箱の中に綺麗に収める */
}


/* 共通パーツ */
.container {
    max-width: 90%;
    margin: 0 auto;
    padding: 0 40px;
}

.glass-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255);
    z-index: 100;
    border-bottom: 1px solid #f5f5f5;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-text {
    font-weight: 700;
    letter-spacing: 1px;
}

footer {
    text-align: center;
    padding: 80px 0;
    color: var(--text-sub);
    font-size: 0.8rem;
}



/* 機能カードのグリッド */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
    margin-bottom: 50px;
}

.feature-card {
    background: #fdfdfd;
    padding: 15px 30px;
    min-height: auto;
    border-radius: 20px;
    border: 1px solid #f0f0f0;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-0px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.feature-card h3 {
    font-size: 1.0rem;
    margin-top: 0;
    /* 上の余白を消す */
    margin-bottom: 10px;
    color: var(--accent-blue);
}

.feature-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* カテゴリタグ */
.category-section {
    text-align: center;
    background: var(--soft-gray);
    background: var(--soft-blue);
    padding: 10px 20px;
    border-radius: 16px;
    margin-top: 50px;
    margin-bottom: 50px;
}

.category-header {
    position: relative;
    /* 右端のテキストを配置する基準になります */
    display: flex;
    justify-content: center;
    /* 中身（h3）を中央に寄せます */
    align-items: center;
    /* 上下の中央を揃えます */
    margin-bottom: 20px;
    /* 下のタグ一覧との隙間 */
    min-height: 35px;
    /* 行の高さを確保 */
}

.category-header h3 {
    margin: 0;
    /* 余白をリセットして中央配置を正確に */
    font-size: 1.2rem;
}

.category-header .sub-text {
    position: absolute;
    /* 親要素に対して浮かせて配置 */
    right: 0;
    /* 右端に固定 */
    margin: 0;
    /* 余白をリセット */
    font-size: 0.85rem;
    color: var(--text-sub);
}


.category-tags {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 0px;
    display: grid;
    /* 横4列に均等分割。画面が狭いときは自動調整 */
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    /* マス目同士の間隔 */
}

.category-tags li {
    background: #fff;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-main);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.sub-text {
    font-size: 0.85rem;
    color: var(--text-sub);
}

/* ギャラリーセクションのスタイル */
.gallery-section {
    padding: 40px 0;
    text-align: center;
}

.gallery-grid {
    display: flex;
    gap: 30px;
    /* 横スクロールを有効にするための重要設定 */
    overflow-x: auto;
    /* 横方向に溢れたらスクロールさせる */
    white-space: nowrap;
    /* 子要素を改行させない */
    padding: 20px;
    /* 影が切れないように余白を確保 */

    /* これが重要！スルスル動くようになります */
    scroll-behavior: smooth;

    /* スナップ機能（ピタッと止まる）を合わせるとよりスライダーらしくなります */
    scroll-snap-type: x mandatory;
}

.gallery-item {
    flex: 0 0 auto;
    /* 幅を縮ませず、固定サイズを維持する */
    width: 270px;
    /* お好みの横幅に固定（重要） */

    background: #e5ecf5;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    /* flexからblockに変更（画像単体のため） */
    border-bottom: 1px solid #eee;
}



.image-caption {
    padding: 15px 20px;
    font-size: 0.9rem;
    color: #333;
    background-color: #f0f0f0f8;
    margin: 0;
}

/* ボタンの見た目（aタグなので装飾が必要） */
.scroll-btn {
    padding: 10px;
    text-decoration: none;
    /* あとは前回のボタン用CSSと同じ */
}


/* 会社概要テーブル */
.page-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 40px;
}

.company-table {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    border-collapse: collapse;
}

.company-table th,
.company-table td {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.company-table th {
    width: 20%;
    background: #f8f8f8;
    color: #777;
    text-align: left;
}

/* スマホ向けの調整（画面幅768px以下） */
@media (max-width: 768px) {

    .container {
        padding: 0 15px;
        max-width: 95%;
        /* スマホ時は幅いっぱい使う */
    }

    /* ヘッダー全体の高さを少し詰める */
    .nav-wrapper {
        height: 70px;
        padding: 0 15px;
        /* 左右の余白を削る */
    }

    /* ロゴのサイズを調整 */
    .logo-text {
        font-size: 1.3rem;
        min-width: fit-content;
    }

    /* ナビゲーション全体の余白を調整 */
    nav {
        gap: 5px;
        /* アイテム間の隙間を狭く */
        padding: 3px;
        border-radius: 12px;
    }

    /* メニューボタンの文字サイズと余白を小さく */
    .nav-item {
        padding: 8px 12px;
        /* 24pxから12pxへ半分に */
        font-size: 0.8rem;
        /* 少し小さくして1行に収める */
        white-space: nowrap;
        /* 絶対に改行させない指定 */
    }

    .app-main-visual {
        display: block;
    }

    .app-description {
        padding: 10px 10px;
        background: #fafafa;
        /* 非常に薄いグレー */
        border-left: 5px solid #4a90e2;
        /* アクセントカラーの棒 */
        line-height: 1.8;
        border-radius: 4px;
        margin-top: 10px;
    }

    .lead-text {
        font-size: 1.0em;
        margin: 0;
        /* paddingを親に持たせたのでmarginは0でOK */
    }

    /* 親要素の絶対配置を解除し、縦並びに変更 */
    .category-header {
        display: flex;
        flex-direction: column;
        /* 縦に並べる */
        align-items: center;
        /* 中央揃え */
        position: static;
        /* PC版の absolute 基準を無効化 */
        gap: 8px;
        /* タイトルと補足の間の隙間 */
        margin-bottom: 25px;
        min-height: auto;
        /* 固定高さを解除 */
    }

    /* 補足テキストの「右端固定」を解除 */
    .category-header .sub-text {
        position: static;
        /* 浮いているのをやめて普通に並べる */
        text-align: center;
        /* 文字を中央に */
        font-size: 0.8rem;
        /* スマホ用に少し小さく */
        margin: 0;
    }

    .category-header h3 {
        font-size: 1.1rem;
        /* タイトルのサイズ微調整 */
        margin: 0;
    }

    .category-tags {
        grid-template-columns: repeat(2, 1fr);
        font-size: 0.2rem;
        gap: 10px;
        white-space: nowrap;
    }

    .category-tags li {
        font-size: 0.8rem;
    }


    /* アイコン */
    .icon-box {
        width: 64px;
        /* 四角形の幅 */
        height: 64px;
        /* 四角形の高さ */
        margin-top: 15px;
    }

    /* アイコンと名前を包む親要素 */
    .hero-section {
        display: flex;
        align-items: center;
        gap: 15px;
        width: 100%;
        /* 親の幅（container）に従う */
        box-sizing: border-box;
        overflow: hidden;
        /* はみ出しを許さない */
    }

    /* 名前側のエリア */
    .hero-copy {
        flex: 1;
        min-width: 0;
        margin-top: 15px;
    }

    /* アプリ名本体 */
    .hero-copy h2 {
        width: 100%;
        margin: 0;
        font-size: 1.2rem;
        line-height: 1.4;

        /* 強制折り返しトリオ */
        white-space: normal;
        /* 改行禁止を解除 */
        word-break: break-all;
        /* 英語でも日本語でも端に来たら折る */
        overflow-wrap: break-word;
        /* 長い単語を分割してでも折る */
    }

    /* サブタイトル部分 */
    .hero-copy h2 span {
        font-size: 1.1rem;
        display: inline;
    }

    .title-image img {
        width: 100%;
        height: auto;
        /* 比率を維持 */
        object-fit: contain;
        /* 画像を箱の中に綺麗に収める */
    }

    .container {
        margin: 0 auto;
        padding: 0 10px;
    }

    .page-title {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    /* 会社概要 */
    .company-table {
        width: 100%;
        margin: 10px auto;
        border-collapse: collapse;
    }

    .company-table th,
    .company-table td {
        padding: 10px;
        border-bottom: 1px solid #eee;
        font-size: 0.8rem;
    }

    .company-table th {
        width: 20%;
        background: #f8f8f8;
        color: #777;
        text-align: left;
    }

    .company-table td ul {
        list-style-position: inside;
        /* 中点を内側に入れる */
        padding-left: 0;
        /* デフォルトの余白を消す */
        margin: 0;
    }

    footer {
        padding: 40px 0;
    }

    #content-area {
        padding-top: 80px;
        /* ヘッダーが少し低くなった分調整 */
    }
}