/* 640px 以下用レイアウト調整 */
@media (max-width: 640px) {
    body {
        font-size: 12px;
    }

    .container {
        padding: 0 10px;
    }

    /* ヘッダー */
    .header-content {
        padding: 10px 0;
    }

    .logo-image {
        height: 30px;
    }

    .nav {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .nav-link {
        font-size: 0.8rem;
        padding: 4px 6px;
        min-height: 32px;
    }

    .contact-btn {
        padding: 5px 12px;
        font-size: 0.8rem;
        border-radius: 18px;
        box-shadow: 0 4px 14px rgba(255, 107, 53, 0.25);
    }

    /* FV（ヒーロー） */
    .hero {
        padding: 120px 0 50px;
    }

    .hero-title {
        font-size: 26px;
        line-height: 1.4;
        margin-bottom: 14px;
    }

    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 22px;
        padding: 0 6px;
    }

    .hero-buttons {
        gap: 10px;
    }

    .btn-large {
        padding: 10px 22px;
        font-size: 14px;
    }

    .btn {
        padding: 10px 22px;
        font-size: 14px;
    }

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

    .section-title {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .section-subtitle {
        font-size: 13px;
        margin-bottom: 24px;
        padding: 0 8px;
    }

    /* デモ案内 */
    .demo-wrapper {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-top: 24px;
    }

    .demo-highlight {
        padding: 20px 14px;
        border-radius: 12px;
    }

    .demo-badge {
        font-size: 12px;
        padding: 6px 12px;
        margin-bottom: 18px;
    }

    .demo-highlight h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .demo-highlight p {
        font-size: 0.9rem;
    }

    .demo-points {
        margin-top: 18px;
    }

    .demo-points li {
        padding: 5px 0;
        font-size: 0.85rem;
    }

    .demo-step {
        padding: 14px 14px;
        border-radius: 10px;
    }

    .demo-step h4 {
        font-size: 15px;
    }

    .demo-step p {
        font-size: 0.85rem;
    }

    .demo-cta {
        margin-top: 28px;
    }

    .demo-note {
        font-size: 12px;
        margin-top: 10px;
    }

    /* 課題セクション */
    .problem-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-top: 26px;
    }

    .problem-card {
        padding: 22px 14px;
        border-radius: 10px;
    }

    .problem-card i {
        font-size: 30px;
        margin-bottom: 12px;
    }

    .problem-card h3 {
        font-size: 17px;
        margin-bottom: 10px;
    }

    .problem-card p {
        font-size: 0.9rem;
    }

    /* 機能セクション */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 26px;
    }

    .feature-card {
        padding: 20px 14px;
    }

    .feature-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 12px;
    }

    .feature-icon i {
        font-size: 26px;
    }

    .feature-card h3 {
        font-size: 17px;
        margin-bottom: 10px;
    }

    .feature-card p {
        font-size: 0.9rem;
    }

    /* メリットセクション */
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-top: 26px;
    }

    .benefit-card {
        padding: 22px 14px;
        border-radius: 10px;
    }

    .benefit-number {
        font-size: 30px;
        top: 10px;
        right: 10px;
    }

    .benefit-card h3 {
        font-size: 17px;
        margin-bottom: 8px;
    }

    .benefit-card p {
        font-size: 0.9rem;
    }

    /* 料金プラン */
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 26px;
    }

    .pricing-card {
        padding: 22px 14px;
        border-radius: 12px;
    }

    .plan-badge {
        font-size: 12px;
        padding: 4px 12px;
        top: -12px;
    }

    .plan-header h3 {
        font-size: 19px;
        margin-bottom: 12px;
    }

    .plan-price {
        margin-bottom: 6px;
    }

    .price {
        font-size: 28px;
    }

    .period {
        font-size: 13px;
    }

    .plan-description {
        font-size: 0.9rem;
        margin-bottom: 20px;
        padding-bottom: 20px;
    }

    .plan-features li {
        font-size: 0.85rem;
        padding: 5px 0;
    }

    .pricing-note {
        margin-top: 24px;
        font-size: 12px;
    }

    /* カスタマイズセクション */
    .custom-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-top: 26px;
    }

    .custom-card {
        padding: 22px 14px;
    }

    .custom-card i {
        font-size: 34px;
        margin-bottom: 10px;
    }

    .custom-card h3 {
        font-size: 17px;
        margin-bottom: 8px;
    }

    .custom-card p {
        font-size: 0.9rem;
    }

    /* 導入の流れ */
    .flow-steps {
        margin: 26px auto 0;
    }

    .flow-step {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 16px 12px;
        gap: 10px;
    }

    .step-number {
        width: 60px;
        height: 60px;
        font-size: 12px;
    }

    .step-content h3 {
        font-size: 17px;
        margin-bottom: 6px;
    }

    .step-content p {
        font-size: 0.9rem;
    }

    .flow-arrow {
        font-size: 22px;
        margin: 6px 0;
    }

    /* お問い合わせ */
    .contact-info-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-top: 26px;
    }

    .info-item {
        padding: 20px 14px;
        border-radius: 10px;
    }

    .info-item i {
        font-size: 26px;
    }

    .info-item h3 {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .contact-detail {
        font-size: 15px;
        margin: 8px 0;
    }

    .contact-hours,
    .contact-address {
        font-size: 12px;
    }

    .contact-button-wrapper {
        margin-top: 30px;
    }

    /* フッター */
    .footer {
        padding: 30px 0 16px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-bottom: 24px;
        text-align: center;
    }

    .footer-section h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .footer-section h4 {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .footer-section p,
    .footer-section a {
        font-size: 0.85rem;
    }

    .footer-bottom {
        font-size: 0.8rem;
    }

    /* 利用規約（terms.html） */
    .terms-section {
        margin-top: 76px;
        padding: 24px 8px 32px;
    }

    .terms-container {
        padding: 18px 12px;
        border-radius: 8px;
    }

    .terms-header h2 {
        font-size: 1rem;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .terms-body {
        font-size: 0.85rem;
        line-height: 1.7;
    }

    .terms-body h3 {
        font-size: 0.95rem;
        margin-top: 18px;
        margin-bottom: 6px;
    }

    .terms-body p {
        margin-bottom: 8px;
    }

    .terms-list {
        margin: 2px 0 12px 1.1em;
    }

    .terms-list li {
        margin-bottom: 3px;
    }

    .terms-agree-box {
        margin-top: 18px;
        padding: 8px 10px;
    }

    .terms-agree-label {
        font-size: 0.85rem;
        gap: 6px;
    }

    .terms-submit-btn {
        min-width: 180px;
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}
