@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Outfit:wght@400;600;700&display=swap');

:root {
    /* Semantic Colors */
    --color-primary: #2563EB;
    /* 落ち着いたブルー */
    --color-primary-light: #3B82F6;
    --color-accent: #DBEAFE;

    /* Highlight */
    --color-highlight: #F59E0B;

    /* Backgrounds */
    --color-bg: #FFFFFF;
    /* ホワイト */
    --color-bg-secondary: #F3F4F6;
    /* 柔らかいライトグレー */
    --color-bg-tertiary: #E5E7EB;

    /* Text */
    --color-text-main: #1F2937;
    /* ダークグレー文字 */
    --color-text-sub: #4B5563;
    --color-text-light: #9CA3AF;

    /* Borders & Glass */
    --color-border: #D1D5DB;
    --color-glass: rgba(255, 255, 255, 0.85);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(11, 60, 112, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(11, 60, 112, 0.1), 0 2px 4px -1px rgba(11, 60, 112, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(11, 60, 112, 0.1), 0 4px 6px -2px rgba(11, 60, 112, 0.05);
    --shadow-blue-glow: 0 0 20px rgba(56, 189, 248, 0.2);

    /* Radius */
    --radius-md: 12px;
    --radius-lg: 6px;
    --radius-full: 9999px;

    --container-width: 1000px;
}

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

body {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    color: var(--color-text-main);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    opacity: 0.7;
}

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

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.3;
    font-weight: 700;
}

.section-title {
    font-size: clamp(1.6rem, 6vw, 3rem);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--color-text-main);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    margin: 1rem auto 0;
    border-radius: var(--radius-full);
}

.lead-text {
    font-size: 1.125rem;
    color: var(--color-text-sub);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.keyword-tag {
    display: inline-block;
    background-color: #ffffff;
    border: 1px solid var(--color-primary);
    padding: 0.1rem 0.6rem;
    margin: 0.2rem;
    /* 上下左右均等に0.2rem */
    border-radius: 4px;
    font-size: 0.95em;
    vertical-align: middle;
    box-shadow: var(--shadow-sm);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--color-primary);
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--color-primary);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-blue-glow);
    background: var(--color-accent);
    color: var(--color-primary);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-lg {
    font-size: 1.25rem;
    padding: 1.25rem 3rem;
}

/* Utility */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-3 {
    margin-bottom: 3rem;
}

.text-primary-bold {
    color: var(--color-primary);
    font-weight: 700;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: var(--color-glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav-desktop {
    display: none;
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
        gap: 2rem;
        align-items: center;
        /* Ensure items inside nav are centered */
    }
}

/* SP Header adjustment */
@media (max-width: 767px) {
    header {
        position: absolute;
        background-color: transparent;
        border-bottom: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 1.5rem 0;
        /* 少し余白を調整 */
    }
}

/* Hamburger Button */
.hamburger-btn {
    display: none;
    border: none;
    background: var(--color-glass);
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 200;
    /* above mobile nav */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

@media (max-width: 767px) {
    .hamburger-btn {
        display: flex;
        /* show on mobile */
    }
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-primary);
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

/* Hamburger active state (X shape) */
.hamburger-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Nav Overlay (Full Screen) */
.nav-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-bg);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.nav-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-mobile-inner {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.nav-mobile-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-mobile-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-text-main);
    cursor: pointer;
    line-height: 1;
    padding: 0.5rem;
}

.nav-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex-grow: 1;
}

.nav-mobile-list a {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-main);
    display: block;
    padding: 0.5rem 0;
    text-align: center;
}

.nav-mobile-cta {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 2rem;
}


/* Hero Section */
.hero {
    padding-bottom: 30px;
    padding-top: 100px;
    /* offset for header */
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 50%, #DBEAFE 100%);

    min-height: 55vh;
    display: flex;
    align-items: center;

    /* Sticky Parallax Effect */
    position: sticky;
    top: 0;
    z-index: 0;
}

@media (max-width: 991px) {
    .hero {
        /* SP環境では要素が画面より縦に長いため、最後までスクロールしてから固定させる */
        top: auto;
        bottom: 0;
    }
}

/* Main Content Wrapper (Scrolls over Hero) */
.main-content {
    position: relative;
    z-index: 1;
    background-color: var(--color-bg);
    box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.05);
    /* margin-bottom will be added via JS */
    margin-bottom: 0;
}

.hero-inner {
    max-width: 1200px;
    display: flex;
    flex-direction: column-reverse;
    /* image on top on SP if image is second in HTML */
    gap: 3rem;
    align-items: center;
    height: 100%;
    min-height: inherit;
}

@media (min-width: 992px) {
    .hero-inner {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

.hero-image {
    display: flex;
    /* make visible on SP */
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
    /* Ensure full width on SP for alignment */
}

@media (max-width: 991px) {
    .hero-image {
        margin-bottom: -1rem;
        /* reduce distance to text if necessary */
    }
}

.hero-image img {
    max-width: 65%;
    /* decreased for SP to fit floating items */
    height: auto;
    max-height: 40vh;
    /* slightly shorter on SP */
    border-radius: 0;
    box-shadow: none;
    aspect-ratio: auto;
    object-fit: contain;
    opacity: 1;
    transform: none;
}

@media (min-width: 992px) {
    .hero-image img {
        max-width: 50%;
        max-height: 60vh;
    }
}


/* Floating Items around Hero Image */
/* Floating Items around Hero Image */
.hero-floating-item {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem;
    backdrop-filter: blur(4px);
    /* 背景ぼかしを少し弱めて柔らかく */
    -webkit-backdrop-filter: blur(4px);
    border-radius: 50%;
    /* 完全な丸 */
    width: 115px;
    /* 少し大きくしてゆとりを */
    height: 115px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* 影も柔らかく */
    font-weight: 500;
    /* 太字を解除 */
    color: var(--color-text-main);
    /* 文字色は黒 */
    white-space: normal;
    text-align: center;
    z-index: 5;
    pointer-events: none;
    font-size: 0.85rem;
    border: none;
    /* 枠線を削除 */

    /* アニメーション設定 */
    opacity: 0;
    --delay: 0s;
    --duration: 4s;
    animation:
        heroItemReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) var(--delay) forwards,
        heroFloatingInfinite var(--duration) ease-in-out infinite alternate calc(var(--delay) + 1.2s);
}

.hero-floating-item span {
    line-height: 1.3;
    display: inline-block;
    max-width: 90%;
}

.hero-floating-item i {
    font-size: 1.7rem;
    margin-bottom: 0.1rem;
}

@keyframes heroItemReveal {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroFloatingInfinite {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-15px);
    }
}

/* Item Specific Colors & Positions */
.hero-floating-item.item-1 {
    background: rgba(224, 242, 254, 0.8);
    /* 淡いスカイブルー */
    top: 5%;
    left: 8%;
    --duration: 3.5s;
    --delay: 0.2s;
}

.hero-floating-item.item-1 i {
    color: #38bdf8;
}

.hero-floating-item.item-2 {
    background: rgba(224, 231, 255, 0.85);
    /* 少し濃いラベンダー */
    /* 淡いラベンダー */
    top: 42%;
    left: -5%;
    --duration: 4.5s;
    --delay: 0.5s;
}

.hero-floating-item.item-2 i {
    color: #6366f1;
    /* アイコンも少し濃く */
}

.hero-floating-item.item-3 {
    background: rgba(255, 241, 242, 0.8);
    top: 8%;
    right: 8%;
    --duration: 3.8s;
    --delay: 0.8s;
}

.hero-floating-item.item-3 i {
    color: #fb7185;
}

.hero-floating-item.item-4 {
    background: rgba(255, 247, 237, 0.8);
    /* 淡いアプリコット */
    top: 55%;
    right: 0%;
    --duration: 5.2s;
    --delay: 0.1s;
}

.hero-floating-item.item-4 i {
    color: #fb923c;
}

.hero-floating-item.item-5 {
    background: rgba(240, 253, 244, 0.8);
    /* 淡いミント */
    bottom: 8%;
    /* より下へ */
    left: 23%;
    /* より左へ */
    --duration: 4.2s;
    --delay: 1.2s;
}

.hero-floating-item.item-5 i {
    color: #22c55e;
    /* アイコンも少し濃く */
}



@media (max-width: 991px) {
    .hero-floating-item {
        width: 80px;
        height: 80px;
        font-size: 0.65rem;
        padding: 0.3rem;
    }

    .hero-floating-item i {
        font-size: 1.2rem;
        margin-bottom: 0.05rem;
    }

    /* Pull items closer to the center on mobile */
    .hero-floating-item.item-1 {
        top: -5%;
        left: 20%;
    }

    .hero-floating-item.item-2 {
        top: 35%;
        left: 5%;
    }

    .hero-floating-item.item-3 {
        top: -5%;
        right: 20%;
    }

    .hero-floating-item.item-4 {
        top: 45%;
        right: 5%;
    }

    .hero-floating-item.item-5 {
        bottom: 14%;
        left: 29%;
    }
}


.hero-content {
    z-index: 2;
    position: relative;
    padding-right: 0;
    text-align: center;
}

@media (min-width: 992px) {
    .hero-content {
        padding-right: 2rem;
        /* Ensure clean spacing if no overlap */
        text-align: left;
    }
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: var(--color-bg-tertiary);
    color: var(--color-primary);
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(11, 60, 112, 0.05);
}

.hero-content h1 {
    font-size: clamp(1.4rem, 6.8vw, 2.2rem);
    white-space: nowrap;
    /* Adjusted for mobile base */
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--color-text-main);
}

@media (min-width: 768px) {
    .hero-content h1 {
        font-size: 2.8rem;
        white-space: nowrap;
    }
}

.hero-sub {
    font-size: 1.15rem;
    margin-top: 1rem;
    color: var(--color-text-sub);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem; /* PC版も1remに変更 */
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Center hero buttons on SP */
@media (max-width: 991px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .hero-buttons .btn {
        width: 100%;
        max-width: 320px; /* 横幅を統一 */
    }
}

/* .hero-visual は HTMLから削除されたため、CSSも削除または無効化 */
/* 
.hero-visual {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background-color: #fff;
    border: 1px solid var(--color-border);
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

@media (min-width: 992px) {
    .hero-visual {
        margin-left: -60px;
        box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.1);
    }
}
*/

.placeholder-loop {
    display: none;
}

.placeholder-loop {
    color: var(--color-primary-light);
    font-weight: 600;
}

/* Problem Section */
.problems {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--color-bg-secondary) 0%, var(--color-bg) 100%);
    color: var(--color-text-main);
}

.problem-checklist {
    max-width: 400px;
    margin: 4rem auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    cursor: default;
    /* Remove pointer since it's automatic */
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}


.checkbox-visual {
    width: 24px;
    height: 24px;
    border: 2px solid #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    background: transparent;
    transition: border-color 0.3s ease;
}

.checkbox-visual i {
    position: absolute;
    /* 大きめのチェックマークをはみ出させる設定 */
    font-size: 2.2rem;
    left: -2px;
    top: -12px;
    color: var(--color-primary);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.checklist-item.checked .checkbox-visual {
    border-color: var(--color-primary);
}

.checklist-item.checked .checkbox-visual i {
    opacity: 1;
    transform: scale(1.1);
}

.checklist-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-main);
    transition: color 0.3s ease;
}

.problem-grid {
    display: none;
    /* Old grid replaced by checklist */
}

/* Solutions Categories */
.solutions {
    padding: 100px 0 0 0;
    /* padding-bottomを0に */
}

.solution-categories {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    /* 数字がはみ出す分のスペース確保 */
}

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

.category-card {
    position: relative;
    /* 子要素の絶対配置の基準 */
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 3rem 1.5rem;
    /* 左右のパディングを狭めてコンテンツ幅を確保 */
    transition: all 0.3s ease;
    overflow: visible;
    /* はみ出しを表示 */
    background: var(--color-bg-secondary);
    /* ボーダーの上に数字を乗せるため背景が必要 */
}

/* hover時の背景色変更は既に#fffなのでそのままで良いが、重複しないよう整理も可能。現状維持 */
.category-card:hover {
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-lg), var(--shadow-blue-glow);
}

.category-number {
    position: absolute;
    top: -25px;
    /* 上にはみ出す */
    left: 20px;
    /* 左端から少し配置 */

    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    /* サイズ調整 */
    font-weight: 700;
    color: var(--color-primary);
    /* 濃い青に変更 */
    background-color: transparent;
    /* ボーダーを隠すための背景色 -> 透過に変更 */
    padding: 0 10px;
    /* 背景色の幅確保 */

    line-height: 1;
    margin-bottom: 0;
    opacity: 1;
    /* 不透明に */

    /* 以前のスタイルをリセット */
    -webkit-text-stroke: 0;
}

.category-title {
    font-size: 1.5rem;
    /* サイズを元に戻す */
    margin-bottom: 1.5rem;
    color: var(--color-text-main);
    /* ページ共通のメインテキスト色に変更 */
    text-align: center;
}

.category-sub {
    color: var(--color-accent);
    /* 明るい青 */
}

/* Category Card Color Variants */
.category-01 {
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    border-color: #E5E7EB;
}

.category-01 .category-number {
    color: #2563EB;
    background-color: transparent;
}

.category-01 .category-sub {
    color: #2563EB;
}

.category-01:hover {
    border-color: #2563EB;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.1), 0 4px 6px -2px rgba(37, 99, 235, 0.05);
}

.category-02 {
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    border-color: #E5E7EB;
}

.category-02 .category-number {
    color: #10B981;
    background-color: transparent;
}

.category-02 .category-sub {
    color: #10B981;
}

.category-02:hover {
    border-color: #10B981;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.1), 0 4px 6px -2px rgba(16, 185, 129, 0.05);
}

.category-03 {
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    border-color: #E5E7EB;
}

.category-03 .category-number {
    color: #F43F5E;
    background-color: transparent;
}

.category-03 .category-sub {
    color: #F43F5E;
}

.category-03:hover {
    border-color: #F43F5E;
    box-shadow: 0 10px 15px -3px rgba(244, 63, 94, 0.1), 0 4px 6px -2px rgba(244, 63, 94, 0.05);
}

.feature-list li {
    margin-bottom: 0.75rem;
    padding-left: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.feature-list li i {
    width: 24px;
    text-align: center;
    color: var(--color-primary);
    font-size: 1.1rem;
}


.category-desc {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--color-text-sub);
    font-weight: 700;
}

/* Deep Dive Sections */
.deep-dive {
    padding: 100px 0;
}

.deep-dive:nth-child(even) {
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-secondary) 100%);
}

.writing-features {
    padding-top: 80px !important;
    padding-bottom: 200px !important;
}

.feature-block {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .feature-block {
        grid-template-columns: 1fr 1fr;
    }

    /* Alternating */
    .feature-block.reverse .feature-text {
        order: 2;
    }

    .feature-block.reverse .feature-visual {
        order: 1;
    }
}

.visual-box {
    background-color: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-light);
    font-weight: 600;
}

.feature-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Quantitative Effect */
.effects {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-secondary) 100%);
    /* 薄い水色に変更 */
    color: var(--color-text-main);
    /* 文字色を黒に戻す */
}

.effects .section-title {
    color: var(--color-text-main);
}

.effects .lead-text {
    color: var(--color-text-sub);
}

.effects .section-title::after {
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    /* 下線も戻す */
}

.effect-grid {
    display: none;
    /* Deprecated */
}

/* Mobile responsive helper for line breaks */
.d-md-none {
    display: inline;
}

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

/* Effects Table Layout */
.effects-table {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* PC Layout */
@media (min-width: 768px) {
    .effects-table {
        display: block;
        background: var(--color-bg-secondary);
        /* 背景白にしてカード化 */
        border-radius: var(--radius-lg);
        padding: 3rem;
        box-shadow: var(--shadow-md);
        /* 影追加 */
    }

    .effects-header {
        display: grid;
        grid-template-columns: 240px 1fr 1fr;
        font-weight: 700;
        font-size: 1.5rem;
        text-align: center;
        padding-bottom: 1.5rem;
        border-bottom: 2px solid var(--color-border);
        margin-bottom: 0;
        color: var(--color-text-main);
    }

    .effects-row {
        display: grid;
        grid-template-columns: 240px 1fr 1fr;
        align-items: center;
        padding: 2rem 0;
        border-bottom: 1px solid var(--color-border);
    }

    .effects-row:last-child {
        border-bottom: none;
    }

    .row-label {
        font-weight: 700;
        font-size: 1.4rem;
        text-align: left;
        padding-left: 1rem;
        letter-spacing: 0.05em;
        color: var(--color-primary);
        display: flex;
        align-items: center;
        gap: 0.8rem;
    }

    .row-label i {
        color: var(--color-primary);
        width: 30px;
        text-align: center;
        font-size: 1.6rem;
    }

    .cell-before,
    .cell-after {
        padding: 0 2rem;
        font-size: 1rem;
        line-height: 1.7;
        font-weight: normal;
        color: var(--color-text-main);
    }

    .cell-after {
        font-weight: 700;
    }
}

/* Colors */
.th-before {
    color: #42A060;
    /* Bright Green for Header */
    font-weight: 700;
}

.th-after {
    color: #ef4444;
    /* Bright Red for Header */
    font-weight: 700;
}

/* Mobile Layout */
@media (max-width: 767px) {
    .effects-header {
        display: none;
    }

    .effects-row {
        background: var(--color-bg-secondary);
        /* 背景白 */
        border-radius: var(--radius-md);
        padding: 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        box-shadow: var(--shadow-sm);
        /* 影追加 */
        border: 1px solid var(--color-border);
    }

    .row-label {
        font-size: 1.4rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid var(--color-border);
        padding-bottom: 0.8rem;
        color: var(--color-primary);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .row-label i {
        color: var(--color-primary);
        font-size: 1.4rem;
        width: 24px;
        text-align: center;
    }

    .cell-before,
    .cell-after {
        position: relative;
        padding-left: 0;
        font-size: 1.05rem;
        line-height: 1.6;
        font-weight: normal;
        /* 太さをノーマルに */
        color: var(--color-text-main);
        /* 通常色に */
    }

    .cell-before::before {
        content: 'Before';
        display: block;
        color: #22c55e;
        /* Green Label */
        font-weight: 700;
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
        opacity: 1;
    }

    .cell-after {
        margin-top: 0.5rem;
        font-weight: 700;
    }

    .cell-after::before {
        content: 'After';
        display: block;
        color: #ef4444;
        /* Red Label */
        font-weight: 700;
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
        opacity: 1;
    }

    .cell-before {
        border-bottom: 1px dashed var(--color-border);
        padding-bottom: 1.2rem;
    }
}

/* Pricing & Flow */
.pricing-flow {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--color-bg-secondary) 0%, #E2E8F0 100%);
}

.pricing-card {
    background: var(--color-bg-secondary);
    max-width: 600px;
    margin: 0 auto 4rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 3rem 1rem;
    text-align: center;
}

.price-tag {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 1rem 0;
    color: var(--color-primary);
    font-family: 'Inter', sans-serif;
    /* 追加 */
}

.price-unit {
    font-size: 1rem;
    color: var(--color-text-sub);
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    /* 単位は元のフォントに戻すなど調整可能だが、ひとまず親に従うか指定 */
    font-weight: 500;
}

.pricing-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
    margin: 2rem 0;
}

.price-feature {
    background: var(--color-bg-tertiary);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.flow-steps {
    padding-top: 50px;
    max-width: 900px;
    margin: 0 auto;
}

.flow-footer-text {
    margin-top: 4rem;
    text-align: center;
    font-size: 1.1rem;
    /* フローコンテンツ(0.9rem)より少し大きく、強調しすぎない */
    font-weight: 700;
    line-height: 1.8;
    color: var(--color-primary);
}

.flow-footer-text .highlight {
    background: linear-gradient(180deg, transparent 60%, rgba(37, 99, 235, 0.2) 60%);
    display: inline-block;
}

@media (min-width: 768px) {
    .pricing-card {
        padding: 3rem;
    }
    .pricing-features {
        gap: 1rem;
    }
    .flow-footer-text {
        font-size: 1.25rem;
    }
}

.flow-title {
    /* sub-section-titleと共通スタイルになるため、個別指定は削除または微調整 */
    margin-bottom: 3rem;
    /* sub-section-titleのmargin-bottomがあるので重複するが、調整が必要ならここに記述 */
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

@media (min-width: 768px) {
    .steps-container {
        flex-direction: row;
        justify-content: space-between;
        gap: 0;
    }
}

.step-item {
    text-align: center;
    flex: 1;
    position: relative;
    padding: 0 1rem;
}

/* 直線でつなぐ (PCのみ) */
@media (min-width: 768px) {
    .step-item:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 25px;
        /* step-circleの中心高さ (50px/2) */
        left: 50%;
        /* 自身の中心から開始 */
        width: 100%;
        /* 隣の要素の中心まで (自身50% + 隣50%) */
        height: 5px;
        background-color: var(--color-primary);
        z-index: 0;
    }
}

.step-circle {
    width: 50px;
    height: 50px;
    background-color: var(--color-bg);
    /* 背景白（線のみ） */
    border: 2px solid var(--color-primary);
    /* 枠線追加 */
    color: var(--color-primary);
    /* 文字色をテーマカラーに */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
    /* 影を少し弱めるか、そのまま */
    position: relative;
    z-index: 1;
    /* 線より上に表示 */
}

.step-icon {
    display: block;
    color: var(--color-primary);
    font-size: 3rem;
    /* 1.5rem * 2 = 3rem */
    margin-bottom: 1rem;
    /* 少し余白広げる */
}

/* SP Layout for Step Items */
@media (max-width: 767px) {
    .steps-container {
        gap: 0;
        margin: 0 auto;
        width: fit-content; /* Ensure the block centers perfectly */
        position: relative;
        z-index: 1;
    }

    .step-item {
        display: grid;
        grid-template-columns: 34px auto 1fr;
        grid-template-areas: 
            "number icon title"
            "number desc desc";
        column-gap: 1.25rem;
        row-gap: 0.25rem;
        align-items: flex-start; /* Align all to top */
        text-align: left;
        padding: 0 0 2.5rem 0;
        margin: 0; /* Remove individual item auto margin */
        position: relative; /* For the vertical line */
    }
    
    .step-item:last-child {
        padding-bottom: 0;
    }

    /* Individual continuous vertical lines */
    .step-item:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 34px; /* Start at the bottom of the 34px circle */
        left: 17px; /* Center of the 34px circle */
        width: 3px;
        height: calc(100% - 34px); /* Stretch to the bottom of padding */
        background-color: var(--color-primary);
        z-index: -1;
        transform: translateX(-50%);
        display: block !important;
    }

    .step-item .step-circle {
        grid-area: number;
        margin: 0; 
        align-self: flex-start; /* 丸数字をアイコン・テキストの頭に合わせる */
        justify-self: center;
        width: 34px; /* Reduced to make less prominent */
        height: 34px;
        font-size: 1rem;
        z-index: 1;
        background-color: var(--color-bg);
        margin-top: 0.15rem; /* 微調整でアイコンと高さをさらに揃える */
    }

    .step-item .step-icon {
        grid-area: icon;
        margin: 0;
        font-size: 1.8rem; /* Make icon larger and more prominent */
    }

    .step-item h4 {
        grid-area: title;
        margin: 0;
        font-size: 1.6rem; /* Make title larger and more prominent */
    }

    .step-item p {
        grid-area: desc;
        margin: 0;
        margin-top: 0.35rem;
    }
}

/* FAQ */
.faq {
    padding: 100px 0;
}

.faq-item {
    border-bottom: 1px solid var(--color-border);
    max-width: 800px;
    margin: 0 auto;
}

.faq-question {
    padding: 1.5rem 0;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text-main);
    transition: color 0.3s ease;
}

.faq-question:hover,
.faq-item.active .faq-question {
    color: var(--color-primary);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-out;
}

.faq-answer-inner {
    overflow: hidden;
    color: var(--color-text-sub);
}

.faq-item.active .faq-answer {
    grid-template-rows: 1fr;
}

/* Padding is handled inside the inner element to avoid jumpy animation */
.faq-item.active .faq-answer-inner {
    padding-bottom: 1.5rem;
}

/* Footer (CTA) */
.footer-cta {
    background-color: var(--color-primary);
    color: #fff;
    padding: 100px 0;
    text-align: center;
    background-image: radial-gradient(circle at 50% 0, var(--color-primary-light) 0%, var(--color-primary) 70%);
}

.footer-cta-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    line-height: 1.3;
}

.footer-cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 767px) {
    .footer-cta-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .footer-cta-buttons {
        flex-direction: column;
        align-items: center;
        padding: 0 1.5rem;
        gap: 1rem;
    }

    .footer-cta-buttons .btn {
        width: 100%;
        max-width: 320px;
    }
}

.footer-main {
    padding: 40px 0;
    background: linear-gradient(0deg, var(--color-bg-secondary) 0%, var(--color-bg) 100%);
    font-size: 0.9rem;
    color: var(--color-text-sub);
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1rem;
}

/* Responsive Helper */
.d-none-mobile {
    display: none;
}

@media (min-width: 768px) {
    .d-none-mobile {
        display: block;
    }
}

/* Animations */
.fade-in-hidden {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Problems Solution Text */
.problem-solution-text {
    margin-top: 4rem;
    text-align: center;
    font-weight: 700;
    line-height: 1.5;
    color: var(--color-primary);
}

.problem-solution-lead {
    font-size: clamp(0.9rem, 4vw, 1.25rem);
    margin-bottom: 2rem;
    color: var(--color-text-main);
}

.problem-solution-main {
    font-size: clamp(1.1rem, 5vw, 1.8rem);
}

.problem-solution-text .highlight {
    background: linear-gradient(180deg, transparent 60%, rgba(37, 99, 235, 0.2) 60%);
    font-size: clamp(1.4rem, 6.2vw, 2.2rem);
    display: inline-block;
    margin-top: 0.5rem;
    white-space: nowrap; /* 1行に収めるための必須指定 */
}

@media (min-width: 768px) {
    .problem-solution-lead {
        font-size: 1.25rem;
    }
    
    .problem-solution-main {
        font-size: 2.2rem;
    }

    .problem-solution-text .highlight {
        font-size: 2.8rem;
    }
}

/* Solutions Note */
.solutions-footer-banner {
    text-align: center;
    margin-top: 5rem;
    margin-bottom: 6rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-primary);
}

@media (max-width: 767px) {
    .solutions-footer-banner {
        margin-top: 3rem;
    }
}



/* Feature Grid Items */
.feature-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.sub-section-title {
    font-size: clamp(1.2rem, 4.5vw, 2rem);
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--color-text-main);
    font-weight: 600;
    position: relative;
}

.sub-section-title::before {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--color-primary);
    margin: 0 auto 1rem;
    border-radius: 2px;
}

.feature-item {
    padding: 1rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    transition: all 0.2s;
    background-color: #ffffff;
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    box-shadow: var(--shadow-sm);
}

.feature-item:hover {
    transform: translateY(-2px);
}

.feature-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    color: var(--color-primary);
}

/* Section Connector */
.section-connector {
    width: 2px;
    height: 80px;
    background: linear-gradient(to bottom, var(--color-primary), transparent);
    margin: 3rem auto 0;
    opacity: 0.3;
}

/* Scroll Image Generation Demo */
.scroll-demo-container {
    position: relative;
    /* 固定の高さを設定して、解像度による余白の差をなくす */
    /* 1200pxから1600pxに増やして、切り替わりをゆっくりにする */
    height: 1600px;
    margin: 40px 0;
}

.scroll-demo-sticky {
    position: sticky;
    top: 120px;
    /* ヘッダーを避ける */
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    padding: 60px 0;
}

.demo-split-layout {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    width: 100%;
    max-width: 1000px;
}

@media (min-width: 768px) {
    .demo-split-layout {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.demo-split-left {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* 画像比率を維持するためのラッパー */
.demo-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    /* 固定高さを削除し、アスペクト比または内容に合わせる */
    aspect-ratio: 3/4;
    /* 写真の一般的な縦横比に近いもの */
    /* 角丸を削除 */
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: #f3f4f6;
    /* ローディング前の背景色 */
}

@media (min-width: 768px) {
    .demo-image-wrapper {
        max-width: 500px;
    }
}

.demo-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* コンテナの比率に合わせて内包する(端が切れても比率維持) */
    object-fit: cover;
    opacity: 0;
    /* transition時間を短く（例：0.4s）してもっさり感を解消 */
    transition: opacity 0.3s ease-in-out;
}

.demo-img.active {
    opacity: 1;
}

.demo-split-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 767px) {
    .demo-split-right {
        padding: 0 1.5rem;
        text-align: center;
    }
}

.demo-sticky-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 2rem;
    line-height: 1.3;
}

.demo-number-indicator {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .demo-number-indicator {
        flex-direction: column;
        margin-bottom: 0;
        /* 重ならないようにマージンを調整（-5.5remから-1.5rem付近へ） */
        margin-left: -1.75rem;
        padding: 0 1rem;
    }
}

.demo-number-item {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    /* 2pxから1pxに */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 400;
    /* 700から400に（細く） */
    color: var(--color-text-light);
    transition: all 0.4s ease;
}

.demo-number-item.active {
    border-color: var(--color-primary);
    color: #ffffff;
    background-color: var(--color-primary);
    box-shadow: none;
    font-weight: 500;
    /* アクティブ時のみ少し視認性上げ */
}

.demo-label-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.demo-label-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text-light);
    transition: all 0.4s ease;
    opacity: 0.5;
}

.demo-label-item.active {
    color: var(--color-primary);
    opacity: 1;
    transform: translateX(10px);
}

.demo-label-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: transparent;
    border: 2px solid var(--color-text-light);
    transition: all 0.4s ease;
}

.demo-label-item.active .demo-label-dot {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

.demo-desc-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text-sub);
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

/* Infinite Marquee Section */
.marquee-section {
    width: 100%;
    overflow: hidden;
    padding: 3rem 0;
}


.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 1rem 0;
}

.marquee-container::before,
.marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, var(--color-bg), transparent);
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, var(--color-bg), transparent);
}

/* Update Announcement Section */
.update-announcement {
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.announcement-card {
    background: transparent;
    padding: 2rem 1.5rem;
    position: relative;
    overflow: visible;
    text-align: center;
}

@media (max-width: 767px) {
    .announcement-card {
        padding: 0;
    }
}

.announcement-text {
    text-align: center;
}

.announcement-title {
    font-size: 2.25rem;
    font-weight: 700;
    font-family: Meiryo, "Hiragino Kaku Gothic ProN", Arial, sans-serif;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

/* 下線アニメーション */
.announcement-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--color-primary);
    transition: width 1s ease-out;
}

.announcement-title.is-active::after {
    width: 100%;
}

.announcement-title-icon {
    font-size: 1.8rem;
    display: inline-block;
    transform: rotate(-20deg);
    /* 左に20度 */
}

.announcement-desc {
    font-size: 1.25rem;
    color: var(--color-text-main);
    font-weight: 500;
    line-height: 1.6;
}



@media (max-width: 768px) {
    .announcement-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .announcement-text {
        text-align: center;
    }

    .announcement-title {
        font-size: 1.5rem;
    }
}

.marquee-content {
    display: flex;
    width: max-content;
    animation: marquee-scroll 45s linear infinite;
}



.marquee-group {
    display: flex;
    gap: 1.5rem;
    padding-right: 1.5rem;
}

.marquee-img {
    height: 200px;
    width: auto;
    border-radius: 0;
    box-shadow: var(--shadow-sm);
    object-fit: contain;
    background: var(--color-bg-secondary);
}

@media (min-width: 768px) {
    .marquee-img {
        height: 300px;
    }
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Highlight Animation Settings */
.highlight {
    /* グラデーションを用いたマーカー風ハイライト。初期は幅0 */
    background: linear-gradient(transparent 60%, rgba(37, 99, 235, 0.2) 60%);
    background-repeat: no-repeat;
    background-size: 0% 100%;
    transition: background-size 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    /* 確実にインラインブロック等として扱うため場合により追加が必要だが今回は省略 */
}

/* クラス付与で幅100%に広がる */
.highlight.animated {
    background-size: 100% 100%;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 60px;
    height: 60px;
    background-color: #ffffff;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .back-to-top {
        right: 20px;
        bottom: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* Override FontAwesome Icon Content */
.fa-ad:before,
.fa-rectangle-ad:before {
    content: "\f53f" !important;
}
