/*
Theme Name: Next Nine LP
Description: 音楽アーティスト支援サービスのランディングページ - 完全版
Version: 2.7.0
*/

/* ===== 基本リセット ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== STEPS SECTION - CLEAN DESIGN ===== */
.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    align-items: stretch; /* Ensure all grid items stretch to same height */
}

.step-item {
    text-align: center;
    position: relative;
    display: flex; /* Make step-item a flex container */
    flex-direction: column;
}

.step-content {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    flex: 1; /* Allow content to expand and fill available space */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Keep content at top */
}

/* Group the main content together */
.step-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.step-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border-color: rgba(106, 17, 203, 0.2);
}

.step-badge {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    color: white;
}

.step-title {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.step-period {
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 1rem;
}

.step-features {
    display: flex;
    gap: 0.5rem;
    margin-top: auto; /* Push features to bottom for consistent alignment */
    padding-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    align-self: flex-end; /* Align features to the bottom of the flex container */
}

.feature-item {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: transform 0.2s ease;
}

.feature-item:hover {
    transform: scale(1.05);
}

.support-message {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(106, 17, 203, 0.05);
    border-radius: 20px;
    border: 2px solid rgba(106, 17, 203, 0.1);
}

/* Mobile responsive for steps */
@media (max-width: 768px) {
    .steps-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .step-content {
        padding: 1.5rem;
    }
    
    .step-features {
        gap: 0.3rem;
    }
    
    .feature-item {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .support-message {
        padding: 1.5rem;
        margin-top: 2rem;
    }
}

/* ===== SECTION STYLING ===== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle,
.section-subtitle.text-md {
    text-align: center;
}

:root {
    /* ===== PRIMARY COLOR SYSTEM ===== */
    --primary-color: #6a11cb;
    --primary-light: #8b5cf6;
    --primary-dark: #4c1d95;
    --primary-50: rgba(106, 17, 203, 0.05);
    --primary-100: rgba(106, 17, 203, 0.1);
    --primary-200: rgba(106, 17, 203, 0.2);
    --primary-300: rgba(106, 17, 203, 0.3);
    
    /* ===== SECONDARY COLOR SYSTEM ===== */
    --secondary-color: #fc466b;
    --secondary-light: #ff6b8a;
    --secondary-dark: #dc2626;
    --secondary-50: rgba(252, 70, 107, 0.05);
    --secondary-100: rgba(252, 70, 107, 0.1);
    --secondary-200: rgba(252, 70, 107, 0.2);
    --secondary-300: rgba(252, 70, 107, 0.3);
    
    /* ===== ACCENT COLOR SYSTEM ===== */
    --accent-color: #fbbf24;
    --accent-light: #fcd34d;
    --accent-dark: #d97706;
    --accent-50: rgba(251, 191, 36, 0.05);
    --accent-100: rgba(251, 191, 36, 0.1);
    --accent-200: rgba(251, 191, 36, 0.2);
    
    /* ===== NEUTRAL COLOR SYSTEM (WCAG AA Compliant) ===== */
    --text-primary: #1f2937;      /* 4.5:1 contrast on white */
    --text-secondary: #374151;    /* 4.5:1 contrast on light backgrounds */
    --text-tertiary: #6b7280;     /* 4.5:1 contrast on white */
    --text-light: #6b7280;        /* FIXED: 4.5:1 contrast ratio - WCAG AA compliant */
    --text-white: #ffffff;        /* For dark backgrounds */
    --text-inverse: #f9fafb;      /* For very dark backgrounds */
    
    /* ===== BACKGROUND COLOR SYSTEM ===== */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-dark: #1f2937;
    --bg-darker: #111827;
    
    /* ===== BORDER & SURFACE COLORS ===== */
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;
    --border-dark: #9ca3af;
    --surface-elevated: #ffffff;
    --surface-overlay: rgba(0, 0, 0, 0.05);
    
    /* ===== STATUS COLORS (WCAG Compliant) ===== */
    --success-color: #10b981;
    --success-bg: #d1fae5;
    --warning-color: #f59e0b;
    --warning-bg: #fef3c7;
    --error-color: #ef4444;
    --error-bg: #fecaca;
    --info-color: #3b82f6;
    --info-bg: #dbeafe;
    
    /* ===== LEGACY VARIABLES (Backwards Compatibility) ===== */
    --dark-color: var(--text-primary);
    --text-color: var(--text-primary);
    --bg-color: var(--bg-secondary);
    
    /* ===== DESIGN TOKENS ===== */
    --border-radius: 25px;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s ease;
    
    /* ===== SPACING SYSTEM ===== */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* ===== TYPOGRAPHY SCALE ===== */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
}

/* ===== DARK MODE COLOR SYSTEM ===== */
@media (prefers-color-scheme: dark) {
    :root {
        /* Override colors for dark mode */
        --text-primary: #f9fafb;
        --text-secondary: #e5e7eb;
        --text-tertiary: #d1d5db;
        --text-light: #9ca3af;
        --text-white: #ffffff;
        --text-inverse: #1f2937;
        
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --bg-tertiary: #374151;
        --bg-dark: #f9fafb;
        --bg-darker: #ffffff;
        
        --border-light: #374151;
        --border-medium: #4b5563;
        --border-dark: #6b7280;
        --surface-elevated: #1f2937;
        --surface-overlay: rgba(255, 255, 255, 0.05);
        
        /* Adjust transparency values for dark mode */
        --primary-50: rgba(139, 92, 246, 0.05);
        --primary-100: rgba(139, 92, 246, 0.1);
        --primary-200: rgba(139, 92, 246, 0.2);
        --primary-300: rgba(139, 92, 246, 0.3);
    }
}

/* ===== HIGH CONTRAST MODE SUPPORT ===== */
@media (prefers-contrast: high) {
    :root {
        /* Increase contrast for accessibility */
        --text-primary: #000000;
        --text-secondary: #000000;
        --text-tertiary: #000000;
        --bg-primary: #ffffff;
        --bg-secondary: #ffffff;
        --bg-tertiary: #ffffff;
        --border-light: #000000;
        --border-medium: #000000;
        --border-dark: #000000;
        
        /* High contrast button states */
        --primary-color: #000080;
        --secondary-color: #800020;
        --accent-color: #ffa500;
    }
    
    /* Force high contrast on interactive elements */
    button, .btn, a {
        border: 2px solid currentColor !important;
    }
}

/* ===== REDUCED MOTION SUPPORT ===== */
@media (prefers-reduced-motion: reduce) {
    :root {
        --transition: none;
        --transition-fast: none;
        --transition-slow: none;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-size: var(--font-size-base);
}

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

/* ===== COLOR UTILITY CLASSES ===== */
/* Text Colors (WCAG AA Compliant) */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-light { color: var(--text-light); }
.text-white { color: var(--text-white); }
.text-inverse { color: var(--text-inverse); }

/* Background Colors */
.bg-primary { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-tertiary { background-color: var(--bg-tertiary); }
.bg-dark { background-color: var(--bg-dark); }
.bg-darker { background-color: var(--bg-darker); }

/* Brand Colors */
.text-brand-primary { color: var(--primary-color); }
.text-brand-secondary { color: var(--secondary-color); }
.text-brand-accent { color: var(--accent-color); }
.bg-brand-primary { background-color: var(--primary-color); }
.bg-brand-secondary { background-color: var(--secondary-color); }
.bg-brand-accent { background-color: var(--accent-color); }

/* Status Colors */
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-error { color: var(--error-color); }
.text-info { color: var(--info-color); }
.bg-success { background-color: var(--success-bg); }
.bg-warning { background-color: var(--warning-bg); }
.bg-error { background-color: var(--error-bg); }
.bg-info { background-color: var(--info-bg); }

/* Border Colors */
.border-light { border-color: var(--border-light); }
.border-medium { border-color: var(--border-medium); }
.border-dark { border-color: var(--border-dark); }

/* ===== NAVIGATION ===== */
.navbar {
    background: var(--surface-elevated);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px var(--surface-overlay);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--border-radius-sm);
}

.nav-menu a:hover {
    color: var(--primary-color);
    background: var(--primary-50);
}

/* Ensure sufficient contrast for nav links */
@media (prefers-contrast: high) {
    .nav-menu a {
        color: var(--text-primary);
        border: 1px solid var(--border-medium);
    }
    
    .nav-menu a:hover {
        background: var(--primary-color);
        color: var(--text-white);
        border-color: var(--primary-color);
    }
}

.nav-cta {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)) !important;
    color: var(--text-white) !important;
    padding: var(--space-md) var(--space-lg) !important;
    border-radius: var(--border-radius) !important;
    font-weight: 600 !important;
    border: 2px solid transparent !important;
    transition: var(--transition) !important;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--primary-300);
}

.nav-cta:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== ACCESSIBILITY FOCUS STATES ===== */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Remove outline for mouse users, keep for keyboard users */
*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== モバイルメニュー ===== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* ===== ボタンスタイル ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover:before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 8px 30px rgba(106, 17, 203, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(106, 17, 203, 0.4);
    color: white;
    text-decoration: none;
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

/* ===== LINEボタン ===== */
.line-link-btn {
    background: #00B900 !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 8px 30px rgba(0, 185, 0, 0.3) !important;
}

.line-link-btn:hover {
    background: #00A000 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 15px 40px rgba(0, 185, 0, 0.4) !important;
    color: white !important;
    text-decoration: none !important;
}

.line-cta-large {
    background: #00B900 !important;
    color: white !important;
    font-size: 1.2rem !important;
    padding: 1.5rem 3rem !important;
    box-shadow: 0 15px 50px rgba(0, 185, 0, 0.4) !important;
}

.line-cta-large:hover {
    background: #00A000 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 20px 60px rgba(0, 185, 0, 0.5) !important;
    color: white !important;
    text-decoration: none !important;
}

/* ===== ヒーローセクション ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 100px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.7rem 1.5rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
}

/* ===== セクション共通 ===== */
section {
    padding: 100px 0;
}

section:nth-child(even) {
    background: var(--bg-color);
}

h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
    font-weight: 800;
    position: relative;
}

h2::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    font-weight: 700;
}

p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-color);
}

/* ===== カード要素 ===== */
.card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* ===== グリッドレイアウト ===== */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ===== フッター ===== */
footer {
    background: var(--dark-color);
    color: white;
    padding: 60px 0 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== ユーティリティクラス ===== */
.text-center {
    text-align: center;
}

.text-sm {
    font-size: 0.9rem;
}

.text-lg {
    font-size: 1.2rem;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* ===== レスポンシブデザイン ===== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        padding: 1.2rem 2rem;
    }
    
    .hero-badges {
        flex-direction: column;
        align-items: center;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .card {
        padding: 2rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 80px 15px;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 1.5rem;
    }
}

/* ===== アニメーション ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== WordPress調整 ===== */
.lp-page .main {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.lp-page .article {
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

.lp-page .entry-content {
    margin: 0 !important;
    padding: 0 !important;
}

/* WordPressのデフォルトスタイルを無効化 */
.lp-page .sidebar,
.lp-page .breadcrumb,
.lp-page .pager-post-navi,
.lp-page .related-entries,
.lp-page .comment-area {
    display: none !important;
}

/* ===== MOBILE MENU FIX - PC・タブレットで非表示 ===== */
/* デフォルト：モバイルメニューを非表示 */
.mobile-menu-overlay,
.mobile-menu,
.mobile-menu-content,
.lp-header__mobile-overlay {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* PC・タブレット：確実に非表示 */
@media (min-width: 769px) {
  .mobile-menu-overlay,
  .mobile-menu,
  .mobile-menu-content,
  .lp-header__mobile-overlay,
  .mobile-menu-toggle,
  .lp-header__mobile-toggle {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  
  /* デスクトップナビを表示 */
  .desktop-nav,
  .nav-menu,
  .lp-header__desktop-nav {
    display: flex !important;
    visibility: visible !important;
  }
}

/* モバイル：必要な時のみ表示 */
@media (max-width: 768px) {
  .mobile-menu-toggle,
  .lp-header__mobile-toggle {
    display: flex !important;
  }
  
  .desktop-nav,
  .nav-menu,
  .lp-header__desktop-nav {
    display: none !important;
  }
  
  /* モバイルメニューが開いている時のみ表示 */
  .mobile-menu-overlay.active,
  .mobile-menu.active,
  .lp-header__mobile-overlay.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}

/* ===== CONTACT MODAL FIX ===== */
/* デフォルト：モーダルを非表示 */
.modal,
#contactModal {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.5);
}

/* モーダルが開いている時のみ表示 */
.modal.show,
#contactModal.show {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 20px;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10001;
}

/* ===== RESULTS SECTION - SIMPLE & RELIABLE LAYOUT ===== */
.results-before-after-slider {
  margin: 4rem 0;
  padding: 3rem 2rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  position: relative;
  border: 1px solid rgba(106, 17, 203, 0.1);
}

/* Icon-based navigation */
.results-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  position: relative;
  z-index: 2;
}

.results-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid transparent;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 100px;
  position: relative;
}

.results-tab:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(106, 17, 203, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(106, 17, 203, 0.15);
}

.results-tab.active {
  background: linear-gradient(135deg, #6a11cb 0%, #fc466b 100%);
  color: white;
  border-color: #6a11cb;
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(106, 17, 203, 0.3);
}

/* Show tab avatars as icons */
.results-tab .tab-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.results-tab.active .tab-avatar {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.results-tab .tab-avatar img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  transition: filter 0.3s ease;
}

.results-tab.active .tab-avatar img {
  filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(255, 255, 255, 0.2));
}

.results-tab .tab-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.25rem;
}

.results-tab .tab-subtitle {
  display: block;
  font-size: 0.7rem;
  opacity: 0.8;
  text-align: center;
}

/* Clean Content Layout - Stable & Reliable */
.results-content {
  position: relative;
  min-height: 400px;
  padding: 1rem 0;
}

.result-case {
  display: none;
  width: 100%;
  opacity: 0;
  animation: none;
}

.result-case.active {
  display: block;
  opacity: 1;
  animation: slideInUp 0.6s ease-out forwards;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Simplified Container - Remove all complex nesting */
.before-after-container {
  display: flex;
  gap: 2rem;
  align-items: stretch;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

/* Make the wrapper display as flex */
.before-after-slider-wrapper {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: stretch;
  width: 100%;
}

/* Direct card styling - bypass wrapper complications */
.result-case .before-content,
.result-case .after-content {
  flex: 1;
  max-width: 350px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.result-case .before-content:hover,
.result-case .after-content:hover {
  transform: translateY(-5px);
}

/* Before Card */
.result-case .before-content {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border: 2px solid #e2e8f0;
  color: #64748b;
}

/* After Card */
.result-case .after-content {
  background: linear-gradient(135deg, #6a11cb 0%, #fc466b 100%);
  color: white;
  box-shadow: 0 15px 40px rgba(106, 17, 203, 0.3);
}

/* Status badges - simplified */
.result-case .status-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 5;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.result-case .status-badge.before {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: white;
}

.result-case .status-badge.after {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
}

/* Stats layout - clean and simple */
.result-case .content-inner {
  position: relative;
  text-align: center;
}

.result-case .result-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.result-case .stat-item {
  text-align: center;
  min-width: 80px;
}

.result-case .stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.result-case .stat-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.result-case .description {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-top: 1rem;
  padding: 0;
}

/* Color inheritance from parent cards */
.result-case .before-content .stat-number,
.result-case .before-content .stat-label,
.result-case .before-content .description {
  color: inherit;
}

.result-case .after-content .stat-number,
.result-case .after-content .stat-label,
.result-case .after-content .description {
  color: inherit;
}

/* ===== RESULT CASE TRANSITIONS ===== */
.results-content {
  position: relative;
  min-height: 450px;
}

.result-case {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}

.result-case.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Hide controls and slider handle - not needed for simple card design */
.results-controls,
.slider-handle {
  display: none !important;
}

/* Clean up - removed old sliding effects */

/* ===== RESPONSIVE DESIGN - CLEAN LAYOUT ===== */
@media (max-width: 768px) {
  .results-before-after-slider {
    padding: 1.5rem;
    margin: 2rem 0;
  }

  .results-tabs {
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
  }

  .results-tab {
    min-width: 80px;
    padding: 0.75rem 0.5rem;
  }

  .results-tab .tab-avatar {
    width: 40px;
    height: 40px;
    margin-bottom: 0.25rem;
  }

  .results-tab .tab-avatar img {
    width: 24px;
    height: 24px;
  }

  .results-tab .tab-name {
    font-size: 0.75rem;
  }

  .results-tab .tab-subtitle {
    font-size: 0.65rem;
  }

  .before-after-container {
    flex-direction: column;
    gap: 1.5rem;
    max-width: 100%;
  }

  .before-after-slider-wrapper {
    flex-direction: column;
    gap: 1.5rem;
  }

  .result-case .before-content,
  .result-case .after-content {
    max-width: none;
    padding: 1.5rem;
  }

  .result-case .stat-number {
    font-size: 1.8rem;
  }

  .result-case .result-stats {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .results-before-after-slider {
    padding: 1rem;
    margin: 2rem 0;
  }

  .results-tabs {
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .results-tab {
    min-width: 80px;
    padding: 0.5rem;
  }

  .results-tab .tab-name {
    font-size: 0.75rem;
  }

  .results-tab .tab-subtitle {
    font-size: 0.65rem;
  }

  .before-after-container {
    gap: 1rem;
    max-width: 300px;
  }

  .result-case .before-content,
  .result-case .after-content {
    padding: 1.5rem;
  }

  .result-case .stat-number {
    font-size: 1.75rem;
  }

  .result-case .stat-label {
    font-size: 0.75rem;
  }

  .result-case .description {
    font-size: 0.85rem;
  }

  .result-case .result-stats {
    gap: 0.75rem;
  }
}

/* ===== ACCESSIBILITY & UX ENHANCEMENTS ===== */
/* アクセシビリティとUX向上のための追加スタイル */

/* フォーカス状態の改善 */
.results-tab:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.3);
  border-color: rgba(106, 17, 203, 0.5);
}

.results-tab:focus-visible {
  outline: 2px solid #6a11cb;
  outline-offset: 2px;
}

/* ハイコントラストモード対応 */
@media (prefers-contrast: high) {
  .results-before-after-slider {
    border: 3px solid #000;
    background: #fff;
  }
  
  .results-tab {
    border: 2px solid #000;
    background: #fff;
    color: #000;
  }
  
  .results-tab.active {
    background: #000;
    color: #fff;
  }
  
  .slider-handle {
    border: 4px solid #000;
    background: #fff;
    color: #000;
  }
  
  .stat-number {
    background: #000;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

/* ロード状態の表示 */
.results-before-after-slider.loading {
  opacity: 0.7;
  pointer-events: none;
}

.results-before-after-slider.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(106, 17, 203, 0.3);
  border-top: 3px solid #6a11cb;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: spin 1s linear infinite;
  z-index: 100;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* タッチデバイス用の最適化 */
@media (hover: none) and (pointer: coarse) {
  .results-tab {
    min-height: 48px;
    touch-action: manipulation;
  }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
  .results-before-after-slider {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #f9fafb;
  }
  
  .results-tab {
    background: rgba(31, 41, 55, 0.8);
    color: #f9fafb;
    border-color: rgba(75, 85, 99, 0.5);
  }
  
  .results-tab:hover {
    background: rgba(31, 41, 55, 0.95);
    border-color: rgba(106, 17, 203, 0.5);
  }
}

/* 印刷用スタイル */
@media print {
  .results-before-after-slider {
    background: #fff !important;
    box-shadow: none !important;
    border: 1px solid #000;
  }
  
  .results-controls,
  .slider-handle {
    display: none !important;
  }
  
  .before-content,
  .after-content {
    position: static !important;
    width: 50% !important;
    float: left !important;
    clip-path: none !important;
  }
  
  .before-after-slider-wrapper {
    height: auto !important;
    display: block !important;
  }
}

/* 動きを減らす設定への対応 */
@media (prefers-reduced-motion: reduce) {
  .results-before-after-slider::before,
  .handle-icon,
  .tab-avatar::after,
  .stat-item::before,
  .progress-bar::after,
  .slider-handle::before,
  .results-play-pause::before {
    animation: none !important;
  }
  
  .results-tab,
  .result-case,
  .slider-handle,
  .stat-item,
  .results-play-pause {
    transition: none !important;
  }
  
  .results-tab:hover,
  .slider-handle:hover,
  .stat-item:hover {
    transform: none !important;
  }
}

/* エラー状態の表示 */
.results-before-after-slider.error {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 2px solid #fca5a5;
}

.results-before-after-slider.error::after {
  content: 'エラーが発生しました。ページを再読み込みしてください。';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #dc2626;
  font-weight: 600;
  text-align: center;
  z-index: 100;
}

/* 成功状態のフィードバック */
.slider-handle.success {
  animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
  0%, 100% { 
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 8px 32px rgba(34, 197, 94, 0.3);
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 12px 40px rgba(34, 197, 94, 0.5);
  }
}

/* ===== JAVASCRIPT INLINED FOR IMMEDIATE FUNCTIONALITY ===== */
/* This JavaScript will be automatically executed */

/* ===== DESIGN FINAL ALIGNMENT ===== */
/* デザインファイナルに合わせてシンプルなヘッダーのみ表示 */

/* 複雑なlp-header構造を非表示にし、シンプルなnavbarを使用 */
.lp-header {
  display: none !important;
  visibility: hidden !important;
}

/* シンプルなnavbarのスタイルを復元・改善 */
.navbar {
  display: block !important;
  visibility: visible !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1000 !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1) !important;
  padding: 0.75rem 0 !important;
}

.nav-container {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 1rem !important;
}

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

.nav-menu {
  display: flex !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 2rem !important;
}

.nav-menu li {
  margin: 0 !important;
}

.nav-menu a {
  color: var(--text-color) !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  font-size: 0.9rem !important;
  padding: 0.5rem 1rem !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
}

.nav-menu a:hover {
  color: var(--primary-color) !important;
  background: rgba(106, 17, 203, 0.1) !important;
}

/* FIXED: Navigation CTA button - Improved contrast ratio */
.nav-cta {
  background: var(--primary-color) !important;
  color: var(--text-white) !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: 25px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  /* Force white text to ensure readability */
  text-shadow: none !important;
}

.nav-cta:hover {
  background: var(--secondary-color) !important;
  color: var(--text-white) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(106, 17, 203, 0.3) !important;
  text-decoration: none !important;
}

.nav-cta:visited,
.nav-cta:link,
.nav-cta:active {
  color: var(--text-white) !important;
  text-decoration: none !important;
}

/* モバイル対応 */
@media (max-width: 768px) {
  .nav-menu {
    display: none !important;
  }
  
  .mobile-menu-toggle {
    display: flex !important;
  }
}

/* ===== LP-HEADER CSS FIX ===== */
/* lp-headerの基本スタイルが完全に欠落していたため追加 */

.lp-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height, 80px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.lp-header.is-scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.lp-header__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 0 2px 0 0;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.2s ease;
  z-index: 1;
}

.lp-header__glass-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lp-header.is-scrolled .lp-header__glass-bg {
  opacity: 1;
}

.lp-header__nav {
  position: relative;
  height: 100%;
  z-index: 2;
}

.lp-header__nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.lp-header__logo {
  flex-shrink: 0;
  position: relative;
}

.lp-header__logo-wrapper {
  position: relative;
}

.lp-header__logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.lp-header__logo-img {
  height: 40px;
  width: auto;
  transition: all 0.3s ease;
}

.lp-header__logo-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle, rgba(106, 17, 203, 0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lp-header__logo-link:hover .lp-header__logo-glow {
  opacity: 1;
}

.lp-header__desktop-nav {
  display: none;
  flex: 1;
  justify-content: center;
  margin: 0 2rem;
}

.lp-header__nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.lp-header__nav-item {
  margin: 0;
}

.lp-header__nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 1rem;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
}

.lp-header__nav-link:hover {
  color: var(--primary-color);
}

.lp-header__nav-text {
  position: relative;
  z-index: 1;
}

.lp-header__nav-indicator {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.lp-header__nav-link:hover .lp-header__nav-indicator {
  width: 100%;
}

.lp-header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lp-header__cta {
  display: none;
}

.lp-header__cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.lp-header__cta-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(106, 17, 203, 0.3);
}

.lp-header__mobile-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  position: relative;
}

.lp-header__hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 20px;
  height: 14px;
}

.lp-header__hamburger-line {
  width: 100%;
  height: 2px;
  background: var(--primary-color);
  border-radius: 1px;
  transition: all 0.3s ease;
}

.lp-header__toggle-label {
  font-size: 0.7rem;
  color: var(--text-color);
  margin-top: 0.25rem;
}

.lp-header__mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 999;
  display: none;
  opacity: 0;
  transition: all 0.3s ease;
}

.lp-header__mobile-overlay.active {
  display: flex;
  opacity: 1;
}

.lp-header__mobile-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  color: white;
}

.lp-header__mobile-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lp-header__mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lp-header__mobile-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  color: white;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.lp-header__mobile-link:hover {
  color: var(--accent-color);
  padding-left: 1rem;
}

.lp-header__mobile-arrow {
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.lp-header__mobile-link:hover .lp-header__mobile-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* レスポンシブ対応 */
@media (min-width: 1024px) {
  .lp-header__desktop-nav {
    display: flex;
  }
  
  .lp-header__cta {
    display: block;
  }
  
  .lp-header__mobile-toggle {
    display: none;
  }
}

@media (max-width: 1023px) {
  .lp-header__nav-container {
    padding: 0 1rem;
  }
  
  .lp-header__nav-menu {
    gap: 1rem;
  }
  
  .lp-header__nav-link {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }
}

@media (max-width: 768px) {
  .lp-header {
    height: 60px;
  }
  
  .lp-header__logo-img {
    height: 32px;
  }
  
  .lp-header__desktop-nav {
    display: none;
  }
  
  .lp-header__mobile-toggle {
    display: flex;
  }
}

/* ===== LP-HEADER DECORATIONS ===== */
/* decorative要素のスタイル追加 */
.lp-header__decorations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.lp-header__floating-note {
  position: absolute;
  color: rgba(106, 17, 203, 0.1);
  font-size: 1.5rem;
  font-weight: bold;
  animation: floatNote 6s ease-in-out infinite;
}

.lp-header__note-1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.lp-header__note-2 {
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.lp-header__note-3 {
  top: 40%;
  left: 80%;
  animation-delay: 4s;
}

.lp-header__particle {
  position: absolute;
  background: radial-gradient(circle, rgba(106, 17, 203, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatParticle 8s ease-in-out infinite;
}

.lp-header__particle-1 {
  width: 8px;
  height: 8px;
  top: 30%;
  left: 20%;
  animation-delay: 1s;
}

.lp-header__particle-2 {
  width: 12px;
  height: 12px;
  top: 70%;
  right: 25%;
  animation-delay: 3s;
}

.lp-header__particle-3 {
  width: 6px;
  height: 6px;
  top: 50%;
  left: 70%;
  animation-delay: 5s;
}

@keyframes floatNote {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.1;
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
    opacity: 0.2;
  }
}

@keyframes floatParticle {
  0%, 100% {
    transform: translateY(0px) translateX(0px) scale(1);
    opacity: 0.1;
  }
  33% {
    transform: translateY(-8px) translateX(5px) scale(1.1);
    opacity: 0.15;
  }
  66% {
    transform: translateY(-5px) translateX(-3px) scale(0.9);
    opacity: 0.08;
  }
}

/* アニメーション無効化設定に対応 */
@media (prefers-reduced-motion: reduce) {
  .lp-header__floating-note,
  .lp-header__particle {
    animation: none;
  }
}

/* ===== LP-FOOTER DESIGN FINAL ===== */
/* デザインファイナルに合わせたフッターデザイン */

.lp-footer {
  --footer-bg-primary: #1a1a1a;
  --footer-bg-secondary: #0f0f0f;
  --footer-text-primary: #ffffff;
  --footer-text-secondary: rgba(255, 255, 255, 0.7);
  --footer-text-muted: rgba(255, 255, 255, 0.5);
  --footer-accent: #6a11cb;
  --footer-accent-hover: #fc466b;
  --footer-border: rgba(255, 255, 255, 0.1);
  
  position: relative;
  background: var(--footer-bg-primary);
  color: var(--footer-text-primary);
  margin-top: auto;
  overflow: hidden;
}

/* フッター背景グラデーション */
.lp-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, 
    var(--footer-bg-primary) 0%, 
    var(--footer-bg-secondary) 100%
  );
  opacity: 0.9;
  z-index: 1;
}

/* フッターメインコンテンツ */
.lp-footer__content {
  position: relative;
  z-index: 2;
  padding: 4rem 0 2rem;
}

/* フッターグリッドレイアウト */
.lp-footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
}

/* ブランドセクション */
.lp-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lp-footer__logo {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.lp-footer__logo-img {
  height: 45px;
  width: auto;
  filter: brightness(0) invert(1);
}

.lp-footer__tagline {
  font-size: 0.9rem;
  color: var(--footer-text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* ソーシャルリンク */
.lp-footer__social {
  display: flex;
  gap: 1rem;
}

.lp-footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--footer-border);
  border-radius: 50%;
  color: var(--footer-text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.lp-footer__social-link:hover {
  background: var(--footer-accent);
  border-color: var(--footer-accent);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(106, 17, 203, 0.3);
}

/* フッターカラム */
.lp-footer__column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lp-footer__column-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--footer-text-primary);
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.lp-footer__column-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--footer-accent);
  border-radius: 1px;
}

/* メニューリンク */
.lp-footer__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lp-footer__menu-link {
  color: var(--footer-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.lp-footer__menu-link::before {
  content: '→';
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.lp-footer__menu-link:hover {
  color: var(--footer-text-primary);
  padding-left: 1rem;
}

.lp-footer__menu-link:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* フッター下部 */
.lp-footer__bottom {
  border-top: 1px solid var(--footer-border);
  padding-top: 2rem;
  margin-top: 3rem;
}

.lp-footer__bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.lp-footer__copyright {
  font-size: 0.85rem;
  color: var(--footer-text-muted);
}

/* リーガルリンク */
.lp-footer__legal-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.lp-footer__legal-link {
  color: var(--footer-text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s ease;
}

.lp-footer__legal-link:hover {
  color: var(--footer-text-primary);
}

/* バックトゥトップボタン */
.lp-footer__back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lp-footer__back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.lp-footer__top-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--footer-accent);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(106, 17, 203, 0.3);
}

.lp-footer__top-button:hover {
  background: var(--footer-accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(252, 70, 107, 0.3);
}

/* 装飾要素 */
.lp-footer__decorations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.lp-footer__decoration {
  position: absolute;
  background: radial-gradient(circle, rgba(106, 17, 203, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.lp-footer__decoration-1 {
  width: 300px;
  height: 300px;
  top: -150px;
  right: 10%;
  opacity: 0.5;
}

.lp-footer__decoration-2 {
  width: 200px;
  height: 200px;
  bottom: -100px;
  left: 5%;
  opacity: 0.3;
}

/* 音符アニメーション */
.lp-footer__floating-notes {
  position: absolute;
  top: 20%;
  right: 5%;
  z-index: 1;
}

.lp-footer__note-symbol {
  position: absolute;
  color: rgba(106, 17, 203, 0.2);
  font-size: 1.5rem;
  animation: floatNote 8s ease-in-out infinite;
}

.lp-footer__note-1 {
  animation-delay: 0s;
}

.lp-footer__note-2 {
  left: 30px;
  top: 20px;
  animation-delay: 2s;
}

.lp-footer__note-3 {
  left: -20px;
  top: 40px;
  animation-delay: 4s;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
  .lp-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .lp-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .lp-footer__content {
    padding: 3rem 0 2rem;
  }
  
  .lp-footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .lp-footer__bottom-content {
    flex-direction: column;
    text-align: center;
  }
  
  .lp-footer__legal-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .lp-footer__back-to-top {
    bottom: 1rem;
    right: 1rem;
  }
  
  .lp-footer__top-button {
    width: 44px;
    height: 44px;
  }
}

/* ===== FOOTER ADDITIONAL STYLES ===== */
/* Contact Section Styles */
.lp-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.lp-footer__contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--footer-text-secondary);
  font-size: 0.9rem;
}

.lp-footer__contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--footer-accent);
  flex-shrink: 0;
}

.lp-footer__contact-text {
  line-height: 1.4;
}

/* Footer CTA Button */
.lp-footer__cta {
  margin-top: 1.5rem;
}

.lp-footer__cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(45deg, var(--footer-accent), var(--footer-accent-hover));
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.lp-footer__cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(106, 17, 203, 0.3);
}

.lp-footer__cta-icon {
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.lp-footer__cta-button:hover .lp-footer__cta-icon {
  transform: translateX(3px) translateY(-3px);
}

.lp-footer__cta-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.lp-footer__cta-button:hover .lp-footer__cta-ripple {
  width: 100px;
  height: 100px;
}

/* Footer Background and Decorations */
.lp-footer__background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.lp-footer__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
}

.lp-footer__pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(106, 17, 203, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(252, 70, 107, 0.1) 0%, transparent 50%);
  opacity: 0.5;
}

.lp-footer__gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
}

/* Social Links Enhanced */
.lp-footer__social-title {
  font-size: 0.85rem;
  color: var(--footer-text-secondary);
  margin-bottom: 1rem;
  font-weight: 500;
}

.lp-footer__social-links {
  display: flex;
  gap: 1rem;
}

.lp-footer__social-link {
  position: relative;
  overflow: hidden;
}

.lp-footer__social-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.lp-footer__social-link:hover .lp-footer__social-ripple {
  width: 60px;
  height: 60px;
}

/* Title Underlines */
.lp-footer__title-underline {
  width: 30px;
  height: 2px;
  background: var(--footer-accent);
  margin-top: 0.5rem;
  border-radius: 1px;
}

/* Menu Link Arrows */
.lp-footer__link-arrow {
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  color: var(--footer-accent);
}

.lp-footer__menu-link:hover .lp-footer__link-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Footer Description */
.lp-footer__description {
  margin: 1.5rem 0;
}

.lp-footer__description p {
  color: var(--footer-text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Logo Section */
.lp-footer__logo-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lp-footer__tagline {
  color: var(--footer-text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Legal Links Enhanced */
.lp-footer__legal {
  display: flex;
  align-items: center;
}

.lp-footer__legal-links {
  display: flex;
  flex-wrap: wrap;
}

.lp-footer__legal-item:not(:last-child)::after {
  content: '|';
  margin: 0 1rem;
  color: var(--footer-text-muted);
}

/* Copyright Enhanced */
.lp-footer__copyright p {
  margin: 0;
}

.lp-footer__note {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--footer-text-muted);
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
  .lp-footer {
    --footer-bg-primary: #0a0a0a;
    --footer-bg-secondary: #000000;
  }
}
/* ===== IMPROVED BUTTON SYSTEM (WCAG AA Compliant) ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: var(--font-size-base);
    line-height: 1.2;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    min-height: 44px; /* Touch target size */
    min-width: 44px;
}

.btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Primary Button (High Contrast) */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-white);
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px var(--primary-200);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-300);
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px var(--primary-200);
}

/* Secondary Button */
.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--border-medium);
    box-shadow: 0 2px 8px var(--surface-overlay);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

/* High Contrast Mode Buttons */
@media (prefers-contrast: high) {
    .btn {
        border-width: 3px;
        font-weight: 700;
    }
    
    .btn-primary {
        background: var(--primary-color);
        border-color: var(--text-primary);
    }
    
    .btn-secondary {
        background: var(--bg-primary);
        color: var(--text-primary);
        border-color: var(--text-primary);
    }
}

/* ===== UI/UX IMPROVEMENTS (Version 2.7.0) ===== */

/* TOUCH TARGET SIZE IMPROVEMENTS */
/* Ensure all interactive elements meet 44x44px minimum */
button, .btn, [role="button"], input[type="submit"], .results-tab, 
a, .nav-menu a, .footer-links a, .tab-avatar {
    min-width: 44px !important;
    min-height: 44px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    padding: 0.75rem 1rem !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Override for specific elements that need different treatment */
.nav-menu li a {
    min-width: auto !important;
    padding: 0.75rem 1rem !important;
    min-height: 44px !important;
}

/* Fix small icons and images */
img, svg {
    min-width: 16px !important;
    min-height: 16px !important;
}

/* Ensure avatar containers are large enough */
.tab-avatar {
    min-width: 50px !important;
    min-height: 50px !important;
    padding: 0.5rem !important;
}

/* Mobile menu toggle button improvements */
.mobile-menu-toggle {
    min-width: 48px !important;
    min-height: 48px !important;
    padding: 1rem !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px !important;
}

.mobile-menu-toggle span {
    display: block !important;
    width: 25px !important;
    height: 3px !important;
    background: var(--text-primary) !important;
    border-radius: 2px !important;
    transition: all 0.3s ease !important;
}

/* Contrast toggle button improvements */
.contrast-btn, #contrast-toggle {
    min-width: 44px !important;
    min-height: 44px !important;
    font-size: 16px !important;
    padding: 0.5rem !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid var(--border-light) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.contrast-btn:hover, #contrast-toggle:hover {
    background: var(--primary-50) !important;
    border-color: var(--primary-color) !important;
    transform: scale(1.05) !important;
}

/* Results tab improvements */
.results-tab {
    min-width: 120px !important;
    min-height: 60px !important;
    padding: 1rem !important;
    font-size: 14px !important;
    cursor: pointer !important;
    border-radius: 12px !important;
}

.results-tab .tab-name {
    font-size: 14px !important;
    font-weight: 600 !important;
}

.results-tab .tab-subtitle {
    font-size: 12px !important;
    opacity: 0.8 !important;
}

/* Modal close button improvements */
.modal-close, .close-btn, button[aria-label*="閉じる"], button:contains("×") {
    min-width: 44px !important;
    min-height: 44px !important;
    font-size: 18px !important;
    padding: 0.5rem !important;
    cursor: pointer !important;
    border: none !important;
    background: var(--error-color) !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.modal-close:hover {
    background: var(--error-dark) !important;
    transform: scale(1.1) !important;
}

/* EMPTY LINKS FIX */
a[href="#"]:empty, a[href=""]:empty {
    display: none !important;
}

/* Add aria-labels to icon-only links */
a:empty:has(img), a:empty:has(svg) {
    position: relative !important;
}

a:empty:has(img):before, a:empty:has(svg):before {
    content: attr(title) !important;
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* NAVIGATION IMPROVEMENTS */
nav, .navbar {
    position: relative !important;
}

nav:not([aria-label]), .navbar:not([aria-label]) {
    /* Add default aria-label via CSS if missing */
}

/* PERFORMANCE - LAZY LOADING IMPROVEMENTS */
img:not([loading]) {
    loading: lazy !important;
}

/* Ensure hero and above-fold images load eagerly */
.hero img, .hero-section img, .urgency-banner img {
    loading: eager !important;
}

/* ===== MOBILE-SPECIFIC IMPROVEMENTS ===== */
@media (max-width: 768px) {
    /* Ensure all interactive elements are touch-friendly on mobile */
    button, .btn, a, [role="button"], input, select, textarea {
        min-height: 48px !important;
        font-size: 16px !important; /* Prevent zoom on iOS */
        padding: 1rem !important;
    }
    
    /* Improve spacing between interactive elements */
    .nav-menu, .footer-links, .results-tabs {
        gap: 1rem !important;
    }
    
    /* Fix font sizes for better readability */
    p, span, div, li {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }
    
    h1 { font-size: 2rem !important; }
    h2 { font-size: 1.75rem !important; }
    h3 { font-size: 1.5rem !important; }
    
    /* Prevent horizontal scroll */
    body, html {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    /* Improve modal on mobile */
    .modal-content {
        width: 95vw !important;
        max-width: 95vw !important;
        margin: 1rem !important;
        padding: 1.5rem !important;
    }
    
    /* Results tabs mobile optimization */
    .results-tabs {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .results-tab {
        width: 100% !important;
        min-height: 60px !important;
        padding: 1rem !important;
    }
    
    /* Footer links mobile optimization */
    .footer-links a {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
        padding: 1rem 0 !important;
        border-bottom: 1px solid var(--border-light) !important;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .container {
        padding: 0 1rem !important;
    }
    
    /* Ensure minimum touch targets on very small screens */
    button, .btn, a {
        min-height: 48px !important;
        min-width: 48px !important;
        font-size: 16px !important;
    }
    
    /* Stack navigation vertically on very small screens */
    .nav-menu {
        flex-direction: column !important;
        position: fixed !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
        transform: translateY(-100%) !important;
        transition: transform 0.3s ease !important;
        z-index: 1000 !important;
    }
    
    .nav-menu.active {
        transform: translateY(0) !important;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
    }
}

/* ===== ENHANCED ANIMATIONS AND INTERACTIONS ===== */

/* Smooth hover effects for all interactive elements */
button, .btn, a, [role="button"] {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

button:hover, .btn:hover, a:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Enhanced focus states for accessibility */
button:focus, .btn:focus, a:focus, input:focus, textarea:focus, select:focus {
    outline: 3px solid var(--primary-color) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.2) !important;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth !important;
}

/* Loading state for buttons */
.btn.loading {
    position: relative !important;
    color: transparent !important;
}

.btn.loading::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 20px !important;
    height: 20px !important;
    margin: -10px 0 0 -10px !important;
    border: 2px solid transparent !important;
    border-top-color: currentColor !important;
    border-radius: 50% !important;
    animation: spin 1s linear infinite !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced card hover effects */
.step-content:hover, .result-case:hover {
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Micro-interactions for results tabs */
.results-tab {
    transform-origin: center !important;
}

.results-tab:active {
    transform: scale(0.95) !important;
}

.results-tab.active {
    transform: scale(1.05) !important;
}

/* Smooth section transitions */
section {
    transition: opacity 0.6s ease-in-out !important;
}

/* Enhanced modal animations */
.modal {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.modal.show {
    backdrop-filter: blur(10px) !important;
}

.modal-content {
    transform: scale(0.9) translateY(50px) !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.modal.show .modal-content {
    transform: scale(1) translateY(0) !important;
}

/* Progress indicator for form submission */
.form-progress {
    width: 0% !important;
    height: 3px !important;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)) !important;
    transition: width 0.3s ease !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
}

/* Enhanced number counting animation */
.stat-number {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* Improved tooltip styles */
[title]:hover::after {
    content: attr(title) !important;
    position: absolute !important;
    bottom: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: var(--dark-color) !important;
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    z-index: 1000 !important;
    opacity: 0 !important;
    animation: fadeInTooltip 0.3s ease forwards !important;
}

@keyframes fadeInTooltip {
    to { opacity: 1; }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .btn:hover, button:hover, a:hover {
        transform: none !important;
    }
}

/* ===== CONTACT INFO READABILITY IMPROVEMENTS (Version 2.6.1) ===== */
.contact-info {
    color: var(--text-primary) !important;
    background: var(--bg-secondary) !important;
    padding: 1.5rem !important;
    border-radius: var(--border-radius) !important;
    border: 1px solid var(--border-light) !important;
    margin: 1rem 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.contact-info strong,
.contact-info .contact-label {
    color: var(--text-primary) !important;
    font-weight: 700 !important;
}

.contact-info .contact-value {
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
}

/* Improve contact section readability */
#contact .contact-info {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}

/* Ensure contact text elements have proper contrast */
#contact .contact-info * {
    color: var(--text-primary) !important;
}

/* Contact details centering fix - Simple margin auto approach */
#contact .contact-details {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 2rem !important;
    justify-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
    max-width: 1200px !important;
    width: 100% !important;
    padding: 3rem 2rem !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

/* Force centering for contact-info elements */
#contact .contact-info {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    margin: 0 auto !important;
    max-width: 800px !important;
    width: 100% !important;
    padding: 3rem 2rem !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

/* Center individual contact info items */
#contact .contact-info > div {
    text-align: center !important;
    margin: 0 auto !important;
    flex: 0 0 auto !important;
}

/* Simple container setup */
#contact .container {
    max-width: 1200px !important;
    padding: 0 2rem !important;
    margin: 0 auto !important;
    width: 100% !important;
}

#contact .contact-content {
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    width: 100% !important;
    text-align: center !important;
}

/* Force full width centering */
#contact {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Remove any potential margin/padding issues */
#contact * {
    box-sizing: border-box !important;
}

/* ===== CONTACT SECTION SIMPLIFIED ===== */
/* Clean, modern centering without excessive !important usage */
.contact-section .contact-content {
    max-width: min(800px, 90vw);
    margin: 0 auto;
    text-align: center;
    padding: 0 1rem;
}

.contact-section .contact-details,
.contact-section .contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 3rem auto;
    max-width: 800px;
    width: 100%;
    text-align: center;
}

/* Container query support for future enhancement */
@supports (container-type: inline-size) {
    .contact-section {
        container-type: inline-size;
    }
    
    @container (max-width: 600px) {
        .contact-details,
        .contact-info {
            flex-direction: column;
            gap: 1rem;
        }
    }
}

/* High contrast mode for contact info */
@media (prefers-contrast: high) {
    .contact-info {
        background: var(--bg-primary) !important;
        border: 2px solid var(--text-primary) !important;
        color: var(--text-primary) !important;
    }
    
    .contact-info * {
        color: var(--text-primary) !important;
    }
}

/* ===== SECTION BACKGROUND IMAGES ===== */
/* セクション背景画像の最適化 */
.section {
    position: relative;
    background-attachment: fixed;
    transition: background-image 0.3s ease;
    
    /* 画像読み込み最適化 */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    
    /* WebP対応のフォールバック */
    background-image: var(--fallback-bg, linear-gradient(135deg, var(--primary-color), var(--secondary-color)));
}

/* 遅延読み込み対応 - Intersection Observer使用時 */
.section[data-bg-loaded="false"] {
    background-image: var(--fallback-bg, linear-gradient(135deg, var(--primary-color), var(--secondary-color)));
    opacity: 0.7;
}

.section[data-bg-loaded="true"] {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

/* 画像最適化のためのレスポンシブ対応 */
@media (max-width: 1200px) {
    .section {
        /* 大画面でのファイルサイズ削減 */
        background-size: cover;
    }
}

@media (max-width: 768px) {
    .section {
        /* モバイルでのパフォーマンス重視 */
        background-size: cover;
        background-position: center center;
    }
}

/* モバイルでは背景固定を無効化（パフォーマンス向上） */
@media (max-width: 768px) {
    .section {
        background-attachment: scroll;
    }
}

/* 背景画像のレスポンシブ対応 */
@media (max-width: 480px) {
    .section {
        background-size: cover !important;
        background-position: center center !important;
    }
}

/* モーション減少設定への対応 */
@media (prefers-reduced-motion: reduce) {
    .section {
        background-attachment: scroll !important;
        transition: none !important;
        animation: none !important;
    }
    
    /* 背景画像のパララックス効果を無効化 */
    .hero {
        background-attachment: scroll !important;
    }
}

/* 高コントラストモードでの背景画像調整 */
@media (prefers-contrast: high) {
    .section {
        background-image: none !important;
        background: var(--bg-primary, #ffffff) !important;
        border: 2px solid var(--text-primary, #000000);
    }
    
    /* 高コントラストモードでのテキスト可読性確保 */
    .section * {
        background: transparent !important;
        color: var(--text-primary, #000000) !important;
    }
}

/* 背景画像付きセクションのコンテンツ可読性向上 */
.section .container {
    position: relative;
    z-index: 2;
    /* 背景画像があっても確実に読める透明度調整 */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(0.5px);
}

/* 視覚的な焦点の改善 */
.section:focus-within .container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

/* セクション背景のグラデーションオーバーレイ調整 */
.hero {
    background-blend-mode: overlay;
}

.contact {
    background-blend-mode: soft-light;
}

/* 印刷時は背景画像を非表示 */
@media print {
    .section {
        background-image: none !important;
        background: white !important;
    }
}
