/* Edit Screen Mobile Styles (for screens <= 1200px) */
            }

            body.mode-edit .container.desktop-only {
                display: none !important;
            }

            body.mode-edit .preview-action-container {
                display: none !important;
            }
        }

        /* プレースホルダーと入力済み文字のコントラスト改善 */
        input::placeholder,

        @media (max-width: 1200px) {

            .tools-panel,
            .guide-panel {
                width: 100%;
            }
        }

        /* Promo Card Styles */
        .promo-card {

        /* ========== Mobile/Tablet Responsive Styles ========== */

        /* Visibility Toggles */
        .mobile-only {
            display: none;
        }

        @media (max-width: 1200px) {
            .desktop-only {
                display: none !important;
            }

            .mobile-only {
                display: block !important;
            }

            /* Reset body overflow for mobile form scrolling */
            body {
                overflow: auto;
                /* Allow body scroll */
                background-color: #f5f7fa;
            }

            .mobile-app-container {
                display: block;
                /* Normal flow */
                min-height: 100vh;
                background-color: #f5f7fa;
                padding-bottom: 80px;
                /* Space for fixed button */
            }

            /* Wizard Content Area: Just padding now */
            .mobile-wizard-content {
                padding: 8px;
                /* Optimized: 15px -> 8px */
            }

            /* Guide Banner (Top) - KEEP for specific step usage or general info */
            .mobile-guide-banner {
                background: #e8eaf6;
                /* Light Indigo */
                border-left: 4px solid #3A47C6;
                padding: 12px 15px;
                display: flex;
                gap: 12px;
                align-items: flex-start;
                margin: 0;
            }

            .guide-icon {
                font-size: 18px;
            }

            .guide-text {
                font-size: 12px;
                color: #333;
                line-height: 1.5;
            }

            /* Embedded Guide Info (Per Section) */
            .mobile-guide-info {
                background-color: #e8eaf6;
                padding: 10px 12px;
                margin-bottom: 20px;
                border-radius: 4px;
                font-size: 12px;
                color: #333;
                line-height: 1.5;
            }

            .mobile-guide-info ul {
                margin: 5px 0 0 0;
                padding-left: 20px;
            }

            .mobile-guide-info li {
                margin-bottom: 4px;
            }

            .mobile-guide-info strong {
                color: #3A47C6;
            }

            /* Step Sections: Always visible */
            .mobile-section {
                display: block;
                margin-bottom: 20px;
            }

            /* Navigation Buttons (Footer) */
            .mobile-nav-buttons {
                position: fixed;
                bottom: 0;
                left: 0;
                width: 100%;
                background: white;
                padding: 12px 15px;
                box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
                display: flex;
                gap: 12px;
                z-index: 20;
            }

            .mobile-nav-btn {
                height: 44px;
                border-radius: 22px;
                font-weight: bold;
                font-size: 14px;
                border: none;
                cursor: pointer;
                transition: background 0.2s;
            }

            .prev-btn {
                background: #f0f0f0;
                color: #666;
                flex: 0 0 80px;
            }

            .prev-btn:disabled {
                opacity: 0.5;
                cursor: not-allowed;
            }

            .next-btn {
                background: #333;
                color: white;
                flex: 1;
            }

            .mobile-preview-btn-nav {
                flex: 1;
                height: 48px;
                border-radius: 24px;
                font-weight: 700;
                font-size: 15px;

                background: linear-gradient(180deg, #FFB74D 0%, #FF9800 100%);
                border: none;
                color: white;
                text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);

                box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
                cursor: pointer;
                transition: transform 0.2s ease, box-shadow 0.2s ease;
            }

            .mobile-preview-btn-nav:active {
                transform: scale(0.98);
                background: linear-gradient(180deg, #FF9800 0%, #FFB74D 100%);
                box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
            }

            /* Adjust existing styles */
            .mobile-card {
                background: white;
                border-radius: 12px;
                padding: 15px;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
                margin-bottom: 15px;
            }

            .input-group {
                margin-bottom: 15px;
            }

            /* Remove bottom margin for input-group inside flex containers */
            [style*="display: flex"] .input-group,
            [style*="display:flex"] .input-group {
                margin-bottom: 0;
            }

            /* Hide old fixed preview button since we use nav now */
            .mobile-bottom-actions {
                display: none;
            }

        }

        /* Tablet Portrait / Large Phone (900px以下) */
        @media (max-width: 900px) {

            /* トップバー最適化 */
            .top-bar {
                padding: 0 12px;
                height: 50px;
            }

            .top-bar-left {
                gap: 8px;
            }

            .brand-name {
                font-size: 14px;
            }

            .brand-icon {
                width: 28px;
                height: 28px;
            }

            .top-bar-divider {
                display: none;
            }

            #newCreateBtn {
                display: none;
            }

            .document-toggle button {
                padding: 6px 12px;
                font-size: 12px;
            }

            .action-btn {
                padding: 6px 12px;
                font-size: 12px;
            }

            /* コンテナレイアウト */
            .container {
                flex-direction: column;
                height: auto;
                padding: 10px;
                gap: 15px;
            }

            /* メインエリア */
            .main-area {
                padding: 15px;
                height: auto;
                overflow: visible;
            }

            /* 請求書コンテナのスケーリング */
            .invoice-wrapper {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            .invoice-container {
                transform: scale(0.65);
                transform-origin: top left;
                margin-bottom: -300px;
                /* スケール後の余白調整 */
            }

            /* ツールパネル */
            .tools-panel {
                width: 100%;
                order: 2;
                max-height: none;
                height: auto;
            }

            /* ガイドパネル */
            .guide-panel {
                width: 100%;
                order: 3;
                max-height: none;
                height: auto;
            }
        }

        /* Phone (600px以下) */
        @media (max-width: 600px) {
            .top-bar {
                padding: 0 10px;
                height: 48px;
            }

            .brand-name {
                display: none;
            }

            .document-toggle {
                padding: 3px;
            }

            .document-toggle button {
                padding: 5px 10px;
                font-size: 11px;
            }

            .action-btn {
                padding: 5px 10px;
                font-size: 11px;
            }

            #generateUrlBtnHeader {
                display: none;
            }

            /* 請求書をさらに縮小 */
            .invoice-container {
                transform: scale(0.45);
                margin-bottom: -450px;
            }

            .main-area {
                padding: 10px;
            }

            .tools-panel {
                padding: 15px;
            }

            .tools-panel .section-title {
                font-size: 13px;
            }

            .tools-panel .control-label {
                font-size: 11px;
            }

            .top-bar-actions {
                display: none !important;
            }
        }

        /* Very Small Phone (400px以下) */
        @media (max-width: 400px) {
            .invoice-container {
                transform: scale(0.38);
                margin-bottom: -520px;
            }

            .top-bar-actions {
                display: none !important;
            }
        }

        /* Mobile Form UI Styles */
        .mobile-app-container {
            padding: 20px 8px;
            /* Optimized: 16px -> 8px */
            background: #f5f5f5;
            min-height: 100vh;
            padding-bottom: 80px;
        }

        .mobile-section {
            margin-bottom: 24px;
            /* Optimized: 32px -> 24px */
        }

        .mobile-section-header h2 {
            font-size: 18px;
            font-weight: 700;
            color: #333;
            margin-bottom: 12px;
            padding-left: 4px;
        }

        .mobile-card {
            background: white;
            padding: 16px 12px;
            /* Optimized: 20px -> 12px (kept top/bottom slightly more breathable) */

