        /* CSS Custom Properties */
        :root {
            --primary: #2563eb;
            --primary-hover: #1d4ed8;
            --bg: #f8fafc;
            --surface: #ffffff;
            --text: #1e293b;
            --text-muted: #64748b;
            --border: #e2e8f0;
            --success: #22c55e;
            --error: #ef4444;
            --radius: 8px;
            --shadow: 0 1px 3px rgba(0,0,0,0.1);
            --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
        }

        /* Reset & Base */
        *, *::before, *::after {
            box-sizing: border-box;
        }

        html {
            font-size: 16px;
            -webkit-text-size-adjust: 100%;
        }

        body {
            margin: 0;
            padding: 0;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
            font-size: 1rem;
            line-height: 1.5;
            color: var(--text);
            background: var(--bg);
            min-height: 100vh;
        }

        /* Typography */
        h1, h2, h3, h4, h5, h6 {
            margin: 0 0 0.5em;
            font-weight: 600;
            line-height: 1.2;
        }

        h1 { font-size: 1.5rem; }
        h2 { font-size: 1.25rem; }
        h3 { font-size: 1.1rem; }

        p {
            margin: 0 0 1em;
        }

        a {
            color: var(--primary);
            text-decoration: none;
        }

        a:hover {
            text-decoration: underline;
        }

        /* Layout */
        .container {
            width: 100%;
            max-width: 640px;
            margin: 0 auto;
            padding: 0 1rem;
        }

        /* Header */
        .header {
            background: var(--surface);
            border-bottom: 1px solid var(--border);
            padding: 1rem 0;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .header h1 {
            font-size: 1.25rem;
            text-align: center;
            color: var(--text);
            margin-bottom: 0.25em;
        }

        .header .subtitle {
            font-size: 0.875rem;
            text-align: center;
            color: var(--text-muted);
            font-weight: normal;
            margin: 0;
        }

        /* Mode Selector Tabs */
        .mode-tabs {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-top: 1rem;
            padding: 0;
            list-style: none;
        }

        .mode-tab {
            flex: 0 0 auto;
            min-width: 130px;
            padding: 0.75rem 1.25rem;
            text-align: center;
            background: var(--bg);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            cursor: pointer;
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--text-muted);
            transition: all 0.2s ease;
            min-height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .mode-tab:hover {
            background: var(--surface);
            color: var(--text);
        }

        .mode-tab.active {
            background: var(--primary);
            border-color: var(--primary);
            color: white;
        }

        /* Main Content */
        .main {
            padding: 1.5rem 0;
        }

        .intro {
            text-align: center;
            margin-bottom: 1.5rem;
            padding: 0 0.5rem;
        }

        .intro p {
            font-size: 1rem;
            color: var(--text);
            line-height: 1.6;
        }

        /* Help Text */
        .help-text {
            text-align: center;
            color: var(--text-muted);
            font-size: 0.9rem;
            margin-bottom: 1rem;
            min-height: 1.5em;
        }

        .help-text.hidden {
            display: none;
        }

        /* Search Form */
        .search-form {
            margin-bottom: 1.5rem;
        }

        .form-group {
            margin-bottom: 1rem;
        }

        .search-input-wrap {
            position: relative;
        }

        .search-input {
            width: 100%;
            padding: 0.875rem 3rem 0.875rem 1rem;
            font-size: 1.25rem;
            border: 2px solid var(--border);
            border-radius: var(--radius);
            background: var(--surface);
            color: var(--text);
            text-transform: lowercase;
            min-height: 52px;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .clear-input-btn {
            position: absolute;
            top: 50%;
            right: 0.5rem;
            transform: translateY(-50%);
            display: none;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            padding: 0;
            border: none;
            border-radius: 50%;
            background: transparent;
            color: var(--text-muted);
            cursor: pointer;
            transition: background 0.2s ease, color 0.2s ease;
        }

        .clear-input-btn.visible {
            display: inline-flex;
        }

        .clear-input-btn:hover {
            background: var(--bg);
            color: var(--text);
        }

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

        .search-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

        .search-input::placeholder {
            color: var(--text-muted);
        }

        /* Buttons */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0.875rem 1.5rem;
            font-size: 1rem;
            font-weight: 600;
            border: none;
            border-radius: var(--radius);
            cursor: pointer;
            transition: all 0.2s ease;
            min-height: 48px;
            min-width: 44px;
        }

        .btn-primary {
            width: 100%;
            background: var(--primary);
            color: white;
        }

        .btn-primary:hover {
            background: var(--primary-hover);
        }

        .btn-primary:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .btn-secondary {
            background: var(--surface);
            color: var(--text);
            border: 1px solid var(--border);
        }

        .btn-secondary:hover {
            background: var(--bg);
        }

        /* Results */
        .results-container {
            min-height: 2em;
            margin-bottom: 1rem;
        }

        .results-list {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .results-list li {
            padding: 0.75rem 1rem;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            margin-bottom: 0.5rem;
            font-size: 1.1rem;
        }

        .results-list li:last-child {
            margin-bottom: 0;
        }

        .no-results {
            text-align: center;
            color: var(--text-muted);
            padding: 1rem;
        }

        .error-message {
            text-align: center;
            color: var(--error);
            padding: 1rem;
            background: #fef2f2;
            border-radius: var(--radius);
        }

        /* Loading Indicator */
        .loading {
            display: none;
            text-align: center;
            padding: 1rem;
        }

        .loading.visible {
            display: block;
        }

        .spinner {
            width: 32px;
            height: 32px;
            border: 3px solid var(--border);
            border-top-color: var(--primary);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin: 0 auto;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Action Buttons */
        .action-buttons {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
        }

        .action-buttons .btn {
            flex: 1;
            min-width: 100px;
        }

        #btnClear {
            display: none;
        }

        #btnClear.visible {
            display: inline-flex;
        }

        /* Ad Container */
        .ad-container {
            width: 100%;
            max-width: 100%;
            margin: 1.5rem auto;
            text-align: center;
            min-height: 250px;
            background: var(--bg);
            border-radius: var(--radius);
        }

        .ad-container .adsbygoogle {
            display: block;
            min-height: 250px;
        }

        /* Footer */
        .footer {
            background: var(--surface);
            border-top: 1px solid var(--border);
            padding: 1rem 0;
            text-align: center;
            color: var(--text-muted);
            font-size: 0.875rem;
        }

        /* Modal */
        .modal-backdrop {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 200;
            align-items: center;
            justify-content: center;
            padding: 1rem;
        }

        .modal-backdrop.visible {
            display: flex;
        }

        .modal {
            background: var(--surface);
            border-radius: var(--radius);
            max-width: 500px;
            width: 100%;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: var(--shadow-md);
        }

        .modal-header {
            padding: 1rem 1.5rem;
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-header h2 {
            margin: 0;
            font-size: 1.25rem;
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--text-muted);
            padding: 0;
            line-height: 1;
            min-width: 44px;
            min-height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-close:hover {
            color: var(--text);
        }

        .modal-body {
            padding: 1.5rem;
        }

        .modal-body h3 {
            color: var(--primary);
            margin-top: 1rem;
        }

        .modal-body h3:first-child {
            margin-top: 0;
        }

        .modal-body p {
            color: var(--text);
        }

        .modal-footer {
            padding: 1rem 1.5rem;
            border-top: 1px solid var(--border);
            text-align: right;
        }

        /* Responsive - Small Mobile (320px+) */
        @media (min-width: 320px) {
            .mode-tabs {
                gap: 0.375rem;
            }

            .mode-tab {
                padding: 0.625rem 0.375rem;
                font-size: 0.8125rem;
            }

            .action-buttons {
                gap: 0.375rem;
            }

            .action-buttons .btn {
                padding: 0.75rem 0.75rem;
                font-size: 0.875rem;
                min-width: 80px;
            }
        }

        /* Responsive - Tablet (640px+) */
        @media (min-width: 640px) {
            h1 { font-size: 1.75rem; }
            
            .header h1 {
                font-size: 1.5rem;
            }

            .header .subtitle {
                font-size: 1rem;
            }

            .container {
                padding: 0 1.5rem;
            }

            .mode-tabs {
                gap: 0.75rem;
            }

            .mode-tab {
                padding: 0.875rem 1rem;
                font-size: 1rem;
                min-height: 48px;
            }

            .intro p {
                font-size: 1.1rem;
            }

            .help-text {
                font-size: 1rem;
            }

            .search-input {
                font-size: 1.5rem;
                padding: 1rem 1.25rem;
                min-height: 60px;
            }

            .btn {
                padding: 1rem 1.75rem;
                font-size: 1.1rem;
            }

            .action-buttons {
                gap: 0.75rem;
            }

            .action-buttons .btn {
                padding: 0.875rem 1.25rem;
                font-size: 1rem;
                min-width: 120px;
            }

            .results-list li {
                padding: 1rem 1.25rem;
                font-size: 1.2rem;
            }

            .modal {
                max-width: 560px;
            }

            .modal-body {
                padding: 2rem;
            }
        }

        /* Responsive - Desktop (1024px+) */
        @media (min-width: 1024px) {
            .container {
                max-width: 800px;
                padding: 0 2rem;
            }

            .header h1 {
                font-size: 1.75rem;
            }

            .header .subtitle {
                font-size: 1.1rem;
            }

            .mode-tabs {
                gap: 1rem;
                max-width: 500px;
                margin-left: auto;
                margin-right: auto;
            }

            .mode-tab {
                padding: 1rem 1.5rem;
                font-size: 1.1rem;
            }

            .main {
                padding: 2rem 0;
            }

            .intro {
                margin-bottom: 2rem;
            }

            .intro p {
                font-size: 1.15rem;
                max-width: 700px;
                margin-left: auto;
                margin-right: auto;
            }

            .search-form {
                max-width: 600px;
                margin-left: auto;
                margin-right: auto;
                margin-bottom: 2rem;
            }

            .action-buttons {
                justify-content: center;
                gap: 1rem;
            }

            .action-buttons .btn {
                flex: 0 0 auto;
                min-width: 140px;
            }

            .results-container {
                max-width: 600px;
                margin-left: auto;
                margin-right: auto;
            }

            .ad-container {
                max-width: 728px;
            }

            .modal {
                max-width: 600px;
            }
        }

        /* Responsive - Large Desktop (1280px+) */
        @media (min-width: 1280px) {
            .container {
                max-width: 900px;
            }

            .search-form {
                max-width: 650px;
            }

            .results-container {
                max-width: 650px;
            }
        }

        /* Responsive - Extra Large (1920px+) */
        @media (min-width: 1920px) {
            .container {
                max-width: 1000px;
            }

            .header h1 {
                font-size: 2rem;
            }

            .intro p {
                font-size: 1.25rem;
            }
        }

        /* ===== Multi-page additions ===== */

        /* Mode tabs are now links */
        .mode-tab {
            text-decoration: none;
        }
        .mode-tab:hover {
            text-decoration: none;
        }

        /* SEO content sections below the tool */
        .content {
            max-width: 640px;
            margin: 2.5rem auto 0;
            padding: 1.5rem 1rem 0;
            border-top: 1px solid var(--border);
            text-align: left;
        }

        .content h2 {
            font-size: 1.25rem;
            margin-top: 1.75rem;
        }

        .content h3 {
            font-size: 1.05rem;
            margin-top: 1.5rem;
        }

        .content p {
            color: var(--text);
            line-height: 1.7;
        }

        .content ol {
            padding-left: 1.25rem;
            line-height: 1.7;
        }

        .content ol li {
            margin-bottom: 0.5rem;
        }

        .content code {
            background: var(--bg);
            border: 1px solid var(--border);
            border-radius: 4px;
            padding: 0.1em 0.35em;
            font-size: 0.95em;
        }

        /* FAQ accordion */
        .faq details {
            border: 1px solid var(--border);
            border-radius: var(--radius);
            background: var(--surface);
            margin-bottom: 0.75rem;
            overflow: hidden;
        }

        .faq summary {
            cursor: pointer;
            padding: 0.875rem 1rem;
            font-weight: 600;
            list-style: none;
            position: relative;
        }

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

        .faq summary::after {
            content: '+';
            position: absolute;
            right: 1rem;
            font-weight: 400;
            color: var(--text-muted);
        }

        .faq details[open] summary::after {
            content: '\2212';
        }

        .faq details p {
            margin: 0;
            padding: 0 1rem 1rem;
            color: var(--text-muted);
        }

        .content a {
            color: var(--primary);
            text-decoration: underline;
        }
