/* =========================================================
   AI Stock Intelligence — 和モダン ライトテーマ (日本向け)
   生成り色の背景・藍色のアクセント・細いけい線・広めの余白。
   見出しは明朝（Noto Serif JP）、本文はゴシック（Noto Sans JP）。
   株価の色は日本の慣習に合わせ「上昇=赤 / 下落=青」。
   ========================================================= */

:root {
    --primary-color: #1b4b73;   /* 藍 (ai)        */
    --primary-dark:  #143a5a;
    --secondary-color: #2c7a8c; /* 浅葱 (asagi)   */
    --accent-color:  #b5483a;   /* 朱 (shu)       */

    --bg:        #fbf9f5;        /* 生成り／ページ背景 */
    --bg-alt:    #f4f1ea;        /* 交互に敷く帯       */
    --surface:   #ffffff;        /* カード             */

    --text-primary:   #1f2328;   /* 墨色              */
    --text-secondary: #545c67;   /* 本文グレー         */
    --text-muted:     #6f7783;   /* 4.5:1 を満たす淡色 */

    --border:      #e6e1d7;
    --border-soft: #f0ece3;

    /* 日本の株式表示慣習：上昇は赤、下落は青 */
    --rise-color: #c0392b;
    --fall-color: #1a6fb0;

    --success-color: #2f7a55;
    --danger-color:  #c0392b;
    --warning-color: #96691b;

    /* LINE ブランドカラー */
    --line-green:      #06c755;
    --line-green-dark: #05a948;

    --shadow-sm: 0 1px 2px rgba(31, 35, 40, .04);
    --shadow-md: 0 4px 16px rgba(31, 35, 40, .06);
    --shadow-lg: 0 12px 32px rgba(31, 35, 40, .09);
    --ring: 0 0 0 3px rgba(27, 75, 115, .14);

    --radius:    8px;
    --radius-lg: 12px;

    --font-sans:  "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans",
                  "Yu Gothic Medium", "Yu Gothic", "Meiryo", sans-serif;
    --font-serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho",
                  "YuMincho", "MS PMincho", serif;

    --nav-h: 58px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.9;               /* 和文は行間を広めに */
    letter-spacing: .02em;
    font-feature-settings: "palt";  /* 和文の字詰め */
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

/* ---------- 共通ユーティリティ ---------- */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.svg-sprite { display: none; }

/* SVGアイコン（線幅1.5pxで統一） */
.icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-sm { width: 17px; height: 17px; }

/* キーボード操作用のスキップリンク */
.skip-link {
    position: absolute;
    top: -60px;
    left: 12px;
    z-index: 2000;
    background: var(--primary-color);
    color: #fff;
    padding: .7rem 1.2rem;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    transition: top .2s;
}

.skip-link:focus { top: 12px; }

/* ---------- フォーカスリング（キーボード操作時） ---------- */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.modal-btn:focus-visible,
.sticky-cta-btn:focus-visible { outline-color: #04703a; }

section:focus,
main:focus { outline: none; }

/* 背景：ごく淡い点描 */
.grid-background {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(27, 75, 115, .055) 1px, transparent 1px);
    background-size: 22px 22px;
    z-index: -1;
    pointer-events: none;
}

/* ---------- ナビゲーション ---------- */
nav {
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    padding: .7rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.logo-text {
    font-family: var(--font-serif);
    font-size: .98rem;
    letter-spacing: .04em;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 1.6rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: .92rem;
    transition: color .2s;
    position: relative;
}

.nav-links a:hover { color: var(--primary-color); }

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width .25s;
}

.nav-links a:hover::after { width: 100%; }

.menu-toggle {
    display: none;
    font-size: 22px;
    color: var(--text-primary);
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    line-height: 1;
    /* タップ領域 44px 以上を確保 */
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

/* ---------- コンテナ ---------- */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 2rem;
}

section { scroll-margin-top: calc(var(--nav-h) + 12px); }

/* ---------- 株価ティッカー ---------- */
.ticker {
    background: var(--surface);
    padding: .55rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow: hidden;
}

/* サンプル表示であることを明示するラベル */
.ticker-label {
    flex-shrink: 0;
    margin-left: 2rem;
    padding: .18rem .6rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    white-space: nowrap;
}

.ticker-viewport {
    flex: 1;
    overflow: hidden;
}

.ticker-content {
    display: flex;
    width: max-content;
    animation: ticker 36s linear infinite;
}

.ticker-item {
    padding: 0 1.8rem;
    white-space: nowrap;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: .86rem;
    letter-spacing: .01em;
}

.ticker-item .code {
    color: var(--text-muted);
    font-weight: 500;
    margin-right: .35rem;
    font-variant-numeric: tabular-nums;
}

.ticker-item .up   { color: var(--rise-color); }  /* 上昇＝赤 */
.ticker-item .down { color: var(--fall-color); }  /* 下落＝青 */

@keyframes ticker {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ---------- ヒーロー ---------- */
.hero {
    padding: 4.5rem 0 4rem;
    text-align: center;
    background:
        radial-gradient(900px 360px at 50% -10%, rgba(27, 75, 115, .06), transparent 70%),
        linear-gradient(180deg, #ffffff, var(--bg));
    border-bottom: 1px solid var(--border-soft);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #fff;
    color: var(--primary-dark);
    border: 1px solid var(--border);
    padding: .42rem 1rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 1.6rem;
    box-shadow: var(--shadow-sm);
    text-align: left;
}

.hero-ai-avatar {
    width: 88px;
    height: 88px;
    margin: 0 auto 1.4rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    animation: float 4s ease-in-out infinite;
    display: block;
}

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

.hero h1 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    line-height: 1.55;
    font-weight: 700;
    letter-spacing: .03em;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
}

.hero h1 .accent {
    color: var(--primary-color);
    position: relative;
    white-space: nowrap;
}

/* 見出しの朱色アンダーライン（和のディテール） */
.hero h1 .accent::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -.1em;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), rgba(181, 72, 58, .25));
    border-radius: 2px;
}

.hero .lead {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 1rem;
    font-weight: 500;
    line-height: 2;
}

.hero .sub {
    font-size: .92rem;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 2.2rem;
    line-height: 1.95;
}

/* ヒーロー直下の安心材料 */
.hero-trust {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .6rem 1.8rem;
    margin-top: 1.6rem;
}

.hero-trust li {
    display: flex;
    align-items: center;
    gap: .4rem;
    color: var(--text-secondary);
    font-size: .86rem;
    font-weight: 600;
}

.hero-trust .icon { color: var(--success-color); }

/* 検索ボックス */
.search-box {
    max-width: 620px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1.05rem 1.4rem;
    font-size: 1rem;
    font-family: inherit;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    outline: none;
    transition: box-shadow .2s, border-color .2s;
    box-shadow: var(--shadow-sm);
}

.search-input::placeholder { color: var(--text-muted); font-size: .92rem; }

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: var(--ring);
}

.search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    min-height: 44px;
    padding: .8rem 1.9rem;
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .06em;
    cursor: pointer;
    transition: background .2s, transform .2s, box-shadow .2s;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) translateY(-1px);
    box-shadow: var(--shadow-md);
}

.search-btn:active { transform: translateY(-50%) scale(.98); }

/* ---------- セクション見出し ---------- */
.section-title {
    font-family: var(--font-serif);
    text-align: center;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: .1em;
    margin-bottom: .9rem;
    color: var(--text-primary);
    line-height: 1.6;
}

/* 見出し下の細い朱色のけい線 */
.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--accent-color);
    margin: .9rem auto 0;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: .92rem;
    margin-bottom: 3rem;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.95;
}

/* ---------- カード共通の登場アニメーション ---------- */
.step-card, .feature-card, .stat-card,
.table-container, .insight-card, .faq-item {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .5s ease-out, transform .5s ease-out,
                box-shadow .2s, border-color .2s;
}

.step-card.is-visible, .feature-card.is-visible, .stat-card.is-visible,
.table-container.is-visible, .insight-card.is-visible, .faq-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- 仕組み ---------- */
.how { padding: 4.5rem 0; }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.4rem;
    margin-top: 2.5rem;
}

.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.8rem;
    box-shadow: var(--shadow-sm);
}

.step-card.is-visible:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.step-num {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1.1rem;
}

.step-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .04em;
    margin-bottom: .6rem;
    color: var(--text-primary);
}

.step-card p { color: var(--text-secondary); font-size: .9rem; line-height: 1.95; }

/* ---------- 機能 ---------- */
.features {
    padding: 4.5rem 0;
    background: var(--bg-alt);
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.4rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--surface);
    padding: 1.9rem 1.8rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.feature-card.is-visible:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(27, 75, 115, .3);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    background: var(--bg-alt);
    border: 1px solid var(--border-soft);
    color: var(--primary-color);
    margin-bottom: 1.1rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .04em;
    margin-bottom: .6rem;
    color: var(--text-primary);
}

.feature-card p { color: var(--text-secondary); font-size: .9rem; line-height: 1.95; }

/* ---------- 数値サマリー ---------- */
.stats { padding: 4.5rem 0; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1.2rem;
    margin-top: 3rem;
}

.stat-card {
    background: var(--surface);
    padding: 1.7rem 1.2rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.stat-card.is-visible:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-family: var(--font-serif);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: .35rem;
    letter-spacing: .01em;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    color: var(--text-secondary);
    font-size: .84rem;
    line-height: 1.7;
}

/* ---------- サンプルデータ表 ---------- */
.market-data {
    padding: 4.5rem 0;
    background: var(--bg-alt);
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}

.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 1.4rem;
    margin-top: 3rem;
}

.table-container {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.table-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    font-size: .98rem;
    font-weight: 700;
    letter-spacing: .06em;
    margin-bottom: 1.2rem;
    padding-bottom: .8rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}

/* 「サンプル」であることを明示するタグ */
.sample-tag {
    padding: .1rem .55rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .87rem;
}

th {
    background: transparent;
    padding: .55rem .5rem;
    text-align: left;
    color: var(--text-muted);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}

th:last-child { text-align: right; }

td {
    padding: .75rem .5rem;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-secondary);
    line-height: 1.6;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fbfaf7; }

.rank   { font-weight: 700; color: var(--text-muted); }
.symbol { font-weight: 700; color: var(--primary-color); font-variant-numeric: tabular-nums; }
.score  { font-weight: 700; color: var(--accent-color); font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- できること ---------- */
.insights { padding: 4.5rem 0; }

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.4rem;
    margin-top: 3rem;
}

.insight-card {
    background: var(--surface);
    padding: 1.9rem 1.8rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    border-top: 3px solid var(--secondary-color);
    box-shadow: var(--shadow-sm);
}

.insight-card.is-visible:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.insight-card h3 {
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: .04em;
    margin-bottom: .6rem;
    color: var(--primary-color);
}

.insight-card p {
    color: var(--text-secondary);
    font-size: .9rem;
    line-height: 1.95;
}

/* ---------- よくあるご質問 ---------- */
.faq {
    padding: 4.5rem 0;
    background: var(--bg-alt);
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}

.faq-list {
    max-width: 820px;
    margin: 3rem auto 0;
    display: flex;
    flex-direction: column;
    gap: .8rem;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-item summary {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: 1.1rem 1.4rem;
    font-size: .96rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    line-height: 1.8;
    min-height: 44px;
    transition: background .2s;
}

.faq-item summary::-webkit-details-marker { display: none; }

/* 質問の先頭に「Q」を置く（和文LPの定番） */
.faq-item summary::before {
    content: 'Q';
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-top: .22rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-family: var(--font-serif);
    font-size: .78rem;
    font-weight: 700;
}

/* 開閉を示す＋／−マーク（色だけに頼らない） */
.faq-item summary::after {
    content: '';
    flex-shrink: 0;
    width: 11px;
    height: 11px;
    margin: .6rem 0 0 auto;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    transition: transform .25s;
}

.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item summary:hover { background: #fbfaf7; }

.faq-body {
    padding: 0 1.4rem 1.2rem 3.9rem;
    border-top: 1px solid var(--border-soft);
    padding-top: 1rem;
}

.faq-body p {
    color: var(--text-secondary);
    font-size: .89rem;
    line-height: 2;
}

.faq-body a { color: var(--primary-color); }

/* ---------- 重要事項・リスク表示 ---------- */
.disclosure {
    padding: 3.2rem 0;
    background: var(--bg);
}

.disclosure-inner {
    max-width: 900px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--warning-color);
    border-radius: var(--radius);
    padding: 1.7rem 1.9rem;
    box-shadow: var(--shadow-sm);
}

.disclosure-inner h4 {
    color: var(--warning-color);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .05em;
    margin-bottom: .8rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.disclosure-inner p {
    color: var(--text-secondary);
    font-size: .84rem;
    line-height: 2;
}

/* ---------- CTA ---------- */
.cta {
    padding: 4.8rem 0;
    text-align: center;
    background:
        radial-gradient(800px 300px at 50% 120%, rgba(44, 122, 140, .09), transparent 70%),
        var(--bg-alt);
    border-top: 1px solid var(--border-soft);
}

.cta h2 {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: .08em;
    margin-bottom: .9rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.cta p {
    font-size: .96rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.95;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-height: 52px;
    padding: 1rem 2.6rem;
    font-size: 1rem;
    font-family: inherit;
    background: var(--line-green);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    font-weight: 700;
    letter-spacing: .06em;
    cursor: pointer;
    transition: background .2s, transform .2s, box-shadow .2s;
    box-shadow: var(--shadow-md);
}

.cta-btn:hover {
    background: var(--line-green-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cta-btn:active { transform: scale(.98); }

.cta-note {
    margin: 1rem 0 0;
    font-size: .82rem;
    color: var(--text-muted);
}

/* ---------- フッター ---------- */
footer {
    background: #f0ece3;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-content > div { flex: 1; min-width: 240px; }

.footer-content h3,
.footer-content h4 {
    font-family: var(--font-serif);
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .06em;
    margin-bottom: 1rem;
}

.footer-content p { color: var(--text-secondary); font-size: .86rem; }

.footer-links { list-style: none; }
.footer-links li { margin-bottom: .5rem; }

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color .2s;
    font-size: .86rem;
}

.footer-links a:hover { color: var(--primary-color); text-decoration: underline; }

.footer-bottom {
    text-align: center;
    padding-top: 1.8rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .8rem;
    line-height: 1.9;
}

/* ---------- スマートフォン用 追従CTAバー ---------- */
.sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(31, 35, 40, .1);
    transform: translateY(100%);
    transition: transform .3s ease-out;
}

.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta[hidden] { display: none !important; }

.sticky-cta-text {
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    min-width: 0;
}

.sticky-cta-text strong {
    font-size: .84rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-cta-text span {
    font-size: .72rem;
    color: var(--text-muted);
}

.sticky-cta-btn {
    flex-shrink: 0;
    min-height: 46px;
    padding: .7rem 1.6rem;
    background: var(--line-green);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: .92rem;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .2s, transform .15s;
}

.sticky-cta-btn:hover { background: var(--line-green-dark); }
.sticky-cta-btn:active { transform: scale(.97); }

/* ---------- モーダル ---------- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(31, 35, 40, .5);
    backdrop-filter: blur(5px);
    animation: modalFadeIn .25s ease-out;
    overflow-y: auto;
    padding: 1.5rem 0;
}

.modal[hidden] { display: none; }

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.2rem 2rem;
    max-width: 500px;
    width: 90%;
    margin: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn .3s ease-out;
    text-align: center;
}

@keyframes modalSlideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: .5rem;
    right: .6rem;
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    border-radius: var(--radius);
    transition: color .2s, background .2s;
}

.modal-close:hover { color: var(--primary-color); background: var(--bg-alt); }

.modal-ai-avatar {
    width: 76px;
    height: 76px;
    margin: 0 auto 1.2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    display: block;
}

.modal-title {
    font-family: var(--font-serif);
    font-size: 1.28rem;
    font-weight: 700;
    letter-spacing: .05em;
    color: var(--text-primary);
    margin-bottom: .8rem;
    line-height: 1.65;
}

.modal-text {
    color: var(--text-secondary);
    font-size: .9rem;
    line-height: 1.9;
    margin-bottom: 1.2rem;
}

/* 受け取れる内容 */
.modal-benefits {
    list-style: none;
    text-align: left;
    background: var(--bg-alt);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
}

.modal-benefits li {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-size: .88rem;
    color: var(--text-primary);
    line-height: 1.8;
}

.modal-benefits li + li { margin-top: .5rem; }
.modal-benefits .icon { color: var(--line-green-dark); margin-top: .28rem; }

/* 無料・所要時間・解除可能 */
.modal-meta {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .45rem;
    margin-bottom: 1.2rem;
}

.modal-meta li {
    padding: .22rem .7rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: .03em;
}

.modal-notice {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    color: var(--warning-color);
    font-size: .78rem;
    margin-bottom: 1.3rem;
    padding: .8rem .95rem;
    background: rgba(150, 105, 27, .07);
    border-radius: var(--radius);
    border: 1px solid rgba(150, 105, 27, .22);
    line-height: 1.8;
    text-align: left;
}

.modal-notice .icon { margin-top: .2rem; }

/* LINE ボタン（ブランドカラー #06C755） */
.modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-height: 52px;
    padding: 1rem 1.4rem;
    font-size: .97rem;
    font-family: inherit;
    background: var(--line-green);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .2s, transform .2s, box-shadow .2s;
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.modal-btn:hover {
    background: var(--line-green-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.modal-btn:active { transform: scale(.98); }

.line-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* ---------- 初回表示のフェード ---------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn .6s ease-out; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 900px) {
    .footer-content { gap: 2rem; }
    .logo-text { display: none; }
}

@media (max-width: 768px) {
    body { line-height: 1.85; }

    .hero { padding: 3rem 0 2.6rem; }
    .hero h1 { font-size: 1.6rem; line-height: 1.7; }
    .hero h1 .accent { white-space: normal; }
    .hero .lead { font-size: .96rem; }
    .hero .sub { font-size: .86rem; }
    .hero-badge { font-size: .73rem; }

    .container, .nav-container { padding: 0 1.2rem; }

    .section-title { font-size: 1.35rem; letter-spacing: .06em; }
    .cta h2 { font-size: 1.35rem; }

    .ticker-label { margin-left: 1.2rem; }

    .nav-links {
        position: absolute;
        top: 54px;
        right: 0;
        background: var(--surface);
        border: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        align-items: flex-start;
        width: 200px;
        padding: .5rem;
        border-radius: var(--radius);
        display: none;
        z-index: 20;
    }

    .nav-links.is-open { display: flex; }
    .nav-links li { width: 100%; }
    .nav-links a { display: block; width: 100%; padding: .7rem .6rem; }
    .nav-links a::after { display: none; }

    .menu-toggle { display: inline-flex; }

    .search-btn {
        position: static;
        transform: none;
        width: 100%;
        margin-top: .7rem;
    }
    .search-btn:hover { transform: translateY(-1px); }
    .search-input { padding: .95rem 1.2rem; font-size: 16px; } /* iOS の自動ズーム防止 */

    .tables-grid, .features-grid, .insights-grid, .steps-grid {
        grid-template-columns: 1fr;
    }

    .faq-item summary { font-size: .9rem; padding: 1rem 1.1rem; }
    .faq-body { padding-left: 3.4rem; padding-right: 1.1rem; }

    .sticky-cta { display: flex; }

    /* 追従CTAバーに隠れないよう、末尾に余白を確保 */
    footer { padding-bottom: 5.5rem; }

    .modal-content { padding: 1.8rem 1.3rem; }
    .modal-title { font-size: 1.12rem; }
}

@media (min-width: 769px) {
    .menu-toggle { display: none !important; }
    .nav-links { display: flex !important; }
}

/* ---------- モーション低減設定への対応 ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

    .ticker-content { animation: none; }
    .hero-ai-avatar { animation: none; }

    .step-card, .feature-card, .stat-card,
    .table-container, .insight-card, .faq-item {
        opacity: 1;
        transform: none;
    }

    .sticky-cta.is-visible { transform: none; }
}
