
        :root {
            --bg: #f0f2f5;
            --surface: #ffffff;
            --surface-alt: #f8fafc;
            --primary: #4f46e5;
            --primary-hover: #4338ca;
            --primary-light: #eef2ff;
            --danger: #ef4444;
            --danger-hover: #dc2626;
            --danger-light: #fef2f2;
            --success: #059669;
            --success-light: #ecfdf5;
            --warning: #d97706;
            --warning-light: #fffbeb;
            --text: #1e293b;
            --text-secondary: #64748b;
            --text-muted: #94a3b8;
            --border: #e2e8f0;
            --border-focus: #a5b4fc;
            --code-bg: #1e293b;
            --code-text: #e2e8f0;
            --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
            --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
            --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
            --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.08);
            --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);
            --radius-sm: 8px;
            --radius: 12px;
            --radius-lg: 16px;
            --radius-xl: 20px;
            --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        }

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

        body {
            font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
            background: var(--bg);
            color: var(--text);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            padding: 20px;
            -webkit-font-smoothing: antialiased;
        }

        body::before, body::after {
            content: '';
            position: fixed;
            pointer-events: none;
            z-index: 0;
            border-radius: 50%;
            opacity: 0.4;
        }
        body::before {
            top: -30%; left: -20%; width: 80%; height: 80%;
            background: radial-gradient(ellipse at center, rgba(79, 70, 229, 0.04) 0%, transparent 70%);
            animation: bgPulse 8s ease-in-out infinite;
        }
        body::after {
            bottom: -25%; right: -15%; width: 70%; height: 70%;
            background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.03) 0%, transparent 70%);
            animation: bgPulse 10s ease-in-out infinite reverse;
        }
        @keyframes bgPulse {
            0%, 100% { transform: translate(0, 0) scale(1); }
            33% { transform: translate(2%, -1%) scale(1.05); }
            66% { transform: translate(-1%, 2%) scale(0.95); }
        }

        .app-container {
            position: relative;
            z-index: 1;
            width: 100%;
            max-width: 1000px;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        /* ====== Header ====== */
        .header {
            background: var(--surface);
            border-radius: var(--radius-lg);
            padding: 20px 28px;
            box-shadow: var(--shadow-md);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            flex-wrap: wrap;
            border: 1px solid var(--border);
        }
        .header-brand { display: flex; align-items: center; gap: 12px; }
        .header-icon {
            width: 44px; height: 44px;
            border-radius: var(--radius-sm);
            background: linear-gradient(135deg, #4f46e5, #6366f1);
            display: flex; align-items: center; justify-content: center;
            font-size: 22px; color: #fff; flex-shrink: 0;
            box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
        }
        .header-title {
            font-size: 1.25rem; font-weight: 700;
            letter-spacing: -0.01em; color: var(--text); white-space: nowrap;
        }
        .header-subtitle { font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }
        .header-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
        .privacy-badge {
            display: inline-flex; align-items: center; gap: 5px;
            padding: 6px 12px; border-radius: 9999px;
            background: var(--success-light); color: var(--success);
            font-size: 0.74rem; font-weight: 600;
            border: 1px solid #a7f3d0;
        }

        /* ====== Buttons ====== */
        .btn {
            display: inline-flex; align-items: center; gap: 7px;
            padding: 10px 18px; border-radius: 9999px;
            font-weight: 600; font-size: 0.9rem; cursor: pointer;
            border: none; transition: var(--transition);
            white-space: nowrap; letter-spacing: 0.01em;
            font-family: inherit;
        }
        .btn:active { transform: scale(0.96); }
        .btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3); }
        .btn-primary:hover { background: var(--primary-hover); box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4); transform: translateY(-1px); }
        .btn-outline { background: var(--surface); color: var(--text); border: 2px solid var(--border); }
        .btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
        .btn-danger { background: var(--surface); color: var(--danger); border: 2px solid #fecaca; }
        .btn-danger:hover { background: var(--danger-light); border-color: var(--danger); }
        .btn-success { background: var(--success); color: #fff; box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3); }
        .btn-success:hover { background: #047857; transform: translateY(-1px); }
        .btn-sm { padding: 6px 12px; font-size: 0.78rem; }
        .btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
        .btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

        /* ====== 2-level Navigation ====== */
        .categories-nav {
            background: var(--surface);
            border-radius: var(--radius-lg);
            padding: 6px;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border);
            display: flex;
            gap: 4px;
            overflow-x: auto;
        }
        .cat-btn {
            flex: 1;
            min-width: 140px;
            padding: 12px 16px;
            border-radius: var(--radius);
            border: none;
            background: transparent;
            color: var(--text-secondary);
            font-weight: 700;
            font-size: 0.88rem;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            white-space: nowrap;
            font-family: inherit;
        }
        .cat-btn:hover { background: var(--surface-alt); color: var(--text); }
        .cat-btn.active {
            background: linear-gradient(135deg, var(--primary), #6366f1);
            color: #fff;
            box-shadow: 0 2px 10px rgba(79, 70, 229, 0.3);
        }
        .cat-count {
            background: rgba(0,0,0,0.08);
            padding: 2px 8px;
            border-radius: 9999px;
            font-size: 0.7rem;
            font-weight: 700;
        }
        .cat-btn.active .cat-count { background: rgba(255,255,255,0.25); }

        .tools-nav {
            background: var(--surface);
            border-radius: var(--radius-lg);
            padding: 6px;
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border);
            display: flex;
            gap: 4px;
            overflow-x: auto;
            scrollbar-width: thin;
            min-height: 52px;
            align-items: center;
        }
        .tools-nav::-webkit-scrollbar { height: 4px; }
        .tools-nav::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
        .tool-btn {
            padding: 9px 14px;
            border-radius: var(--radius-sm);
            border: none;
            background: transparent;
            color: var(--text-secondary);
            font-weight: 600;
            font-size: 0.82rem;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
            font-family: inherit;
            flex-shrink: 0;
        }
        .tool-btn:hover { background: var(--surface-alt); color: var(--text); }
        .tool-btn.active {
            background: var(--primary-light);
            color: var(--primary);
            box-shadow: inset 0 0 0 2px var(--primary);
        }

        .tool-content { display: none; flex-direction: column; gap: 16px; animation: fadeIn 0.25s ease; }
        .tool-content.active { display: flex; }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* ====== Dropzone ====== */
        .dropzone-wrapper { position: relative; }
        .dropzone {
            background: var(--surface);
            border: 3px dashed var(--border);
            border-radius: var(--radius-lg);
            padding: 36px 30px;
            text-align: center;
            cursor: pointer;
            transition: var(--transition-slow);
            box-shadow: var(--shadow-sm);
            position: relative;
        }
        .dropzone:hover { border-color: #b0b8d1; background: #fafbfd; box-shadow: var(--shadow); }
        .dropzone.active {
            border-color: var(--primary);
            background: var(--primary-light);
            box-shadow: 0 0 0 8px rgba(79, 70, 229, 0.06);
            transform: scale(1.008);
        }
        .dropzone-icon { font-size: 52px; margin-bottom: 10px; display: block; opacity: 0.8; }
        .dropzone.active .dropzone-icon { transform: translateY(-6px); opacity: 1; }
        .dropzone-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
        .dropzone-subtitle { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 14px; }
        .dropzone-formats {
            display: inline-block; background: #f1f5f9;
            padding: 5px 12px; border-radius: 9999px;
            font-size: 0.74rem; color: var(--text-muted); font-weight: 500;
        }
        .dropzone input[type="file"] { display: none; }

        /* ====== Card ====== */
        .card {
            background: var(--surface);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border);
            overflow: hidden;
        }
        .card-header {
            display: flex; align-items: center; justify-content: space-between;
            padding: 14px 20px;
            background: var(--surface-alt);
            border-bottom: 1px solid var(--border);
            gap: 12px; flex-wrap: wrap;
        }
        .card-title { font-weight: 700; font-size: 0.92rem; display: flex; align-items: center; gap: 8px; }
        .badge {
            background: var(--primary); color: #fff;
            border-radius: 9999px; padding: 3px 10px;
            font-size: 0.76rem; font-weight: 700;
            min-width: 26px; text-align: center;
        }
        .badge-secondary { background: var(--text-secondary); }
        .badge-success { background: var(--success); }

        /* ====== Thumbnails ====== */
        .thumbnails-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            gap: 10px; padding: 16px;
            min-height: 60px; max-height: 450px;
            overflow-y: auto; align-content: start;
        }
        .thumbnails-grid.empty-grid {
            display: flex; align-items: center; justify-content: center;
            min-height: 100px; color: var(--text-muted);
            font-size: 0.9rem; font-style: italic;
        }
        .thumbnail-item {
            position: relative; border-radius: var(--radius-sm);
            cursor: grab; border: 2px solid transparent;
            background: #f8fafc; transition: var(--transition);
            aspect-ratio: 1 / 1;
            display: flex; flex-direction: column;
            align-items: center; justify-content: center;
            box-shadow: var(--shadow-sm); user-select: none;
        }
        .thumbnail-item:hover { border-color: #cbd5e1; box-shadow: var(--shadow-md); z-index: 2; }
        .thumbnail-item:active { cursor: grabbing; }
        .thumbnail-item.dragging { opacity: 0.45; transform: scale(0.9); border-color: var(--primary); border-style: dashed; z-index: 10; }
        .thumbnail-item.drag-over { border-color: var(--primary) !important; background: var(--primary-light) !important; box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.12) !important; transform: scale(1.04); z-index: 3; }
        .thumbnail-img-wrapper { width: 100%; height: 100%; overflow: hidden; border-radius: var(--radius-sm); position: relative; }
        .thumbnail-item img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
        .thumbnail-index {
            position: absolute; top: 6px; left: 6px;
            background: rgba(0, 0, 0, 0.7); color: #fff;
            font-size: 0.7rem; font-weight: 700;
            width: 22px; height: 22px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            pointer-events: none; backdrop-filter: blur(4px); z-index: 1;
        }
        .thumbnail-controls {
            position: absolute; bottom: 4px; left: 4px; right: 4px;
            display: flex; justify-content: space-between; align-items: center;
            gap: 4px; z-index: 3; opacity: 0; transition: opacity 0.2s;
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(6px); border-radius: 20px; padding: 2px 4px;
        }
        .thumbnail-item:hover .thumbnail-controls { opacity: 1; }
        .btn-move {
            width: 22px; height: 22px; border-radius: 50%;
            background: rgba(79, 70, 229, 0.15); color: var(--primary);
            border: none; font-size: 0.8rem;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; transition: var(--transition);
            font-weight: bold; line-height: 1;
        }
        .btn-move:hover { background: var(--primary); color: white; transform: scale(1.1); }
        .btn-move:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
        .thumbnail-remove {
            width: 24px; height: 24px; border-radius: 50%;
            background: rgba(239, 68, 68, 0.85); color: #fff;
            border: none; cursor: pointer; font-size: 0.75rem;
            display: flex; align-items: center; justify-content: center;
            transition: var(--transition); backdrop-filter: blur(4px);
            line-height: 1; flex-shrink: 0;
        }
        .thumbnail-remove:hover { background: #dc2626; transform: scale(1.1); }

        /* ====== Options panel ====== */
        .options-panel {
            background: var(--surface);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border);
            padding: 18px 22px;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 14px;
        }
        .option-group { display: flex; flex-direction: column; gap: 6px; }
        .option-group label {
            font-weight: 600; font-size: 0.78rem;
            text-transform: uppercase; letter-spacing: 0.04em;
            color: var(--text-secondary);
        }
        .option-group select,
        .option-group input[type="number"],
        .option-group input[type="text"],
        .option-group input[type="password"],
        .option-group textarea {
            padding: 9px 12px;
            border: 2px solid var(--border);
            border-radius: var(--radius-sm);
            font-size: 0.9rem; font-family: inherit;
            background: var(--surface); transition: var(--transition);
            color: var(--text); width: 100%;
        }
        .option-group textarea { resize: vertical; min-height: 60px; line-height: 1.5; }
        .option-group select {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            background-repeat: no-repeat; background-position: right 12px center;
            padding-right: 36px; appearance: none;
        }
        .option-group select:focus,
        .option-group input:focus,
        .option-group textarea:focus {
            outline: none; border-color: var(--border-focus);
            box-shadow: 0 0 0 4px rgba(165, 180, 252, 0.2);
        }
        .option-group input[type="range"] { accent-color: var(--primary); padding: 0; }
        .option-group input[type="color"] {
            width: 100%; height: 40px;
            border: 2px solid var(--border); border-radius: var(--radius-sm);
            cursor: pointer; background: var(--surface); padding: 4px;
        }
        .range-labels { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text-muted); }
        .option-group .hint { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; line-height: 1.4; }

        /* ====== Progress ====== */
        .progress-container {
            display: none;
            background: var(--surface);
            border-radius: var(--radius-lg);
            padding: 14px 20px;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border);
            align-items: center; gap: 14px;
        }
        .progress-container.visible { display: flex; animation: fadeIn 0.3s ease; }
        .progress-bar-outer { flex: 1; height: 8px; background: #e2e8f0; border-radius: 9999px; overflow: hidden; }
        .progress-bar-inner {
            height: 100%;
            background: linear-gradient(90deg, #4f46e5, #818cf8);
            border-radius: 9999px; transition: width 0.3s ease; width: 0%;
        }
        .progress-text { font-weight: 600; font-size: 0.85rem; color: var(--text-secondary); white-space: nowrap; min-width: 80px; text-align: right; }

        /* ====== Toasts ====== */
        .toast-container {
            position: fixed; top: 20px; right: 20px;
            z-index: 9999;
            display: flex; flex-direction: column; gap: 10px;
            pointer-events: none;
        }
        .toast {
            background: #1e293b; color: #fff;
            padding: 12px 18px; border-radius: 9999px;
            font-weight: 600; font-size: 0.85rem;
            box-shadow: var(--shadow-xl);
            animation: slideIn 0.4s ease, fadeOut 0.3s ease 2.5s forwards;
            pointer-events: auto; max-width: 400px;
        }
        .toast.error { background: #dc2626; }
        .toast.success { background: #059669; }
        .toast.warning { background: #d97706; }
        @keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
        @keyframes fadeOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(60%); } }

        /* ====== Footer actions ====== */
        .footer-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
        .btn-generate { padding: 14px 32px; font-size: 1rem; font-weight: 700; border-radius: 9999px; }

        /* ====== Text editor ====== */
        .editor-textarea {
            width: 100%; min-height: 280px;
            padding: 16px 18px;
            border: 2px solid var(--border);
            border-radius: var(--radius);
            font-family: 'Georgia', 'Times New Roman', serif;
            font-size: 1rem; line-height: 1.7;
            color: var(--text); background: var(--surface);
            resize: vertical; transition: var(--transition);
        }
        .editor-textarea:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 4px rgba(165, 180, 252, 0.2); }
        .editor-textarea.mono { font-family: 'SF Mono', 'Consolas', 'Monaco', monospace; font-size: 0.88rem; line-height: 1.5; }

        /* ====== File list ====== */
        .file-list { padding: 12px 16px; max-height: 380px; overflow-y: auto; }
        .file-row {
            display: flex; align-items: center; gap: 12px;
            padding: 10px 12px; border-radius: var(--radius-sm);
            background: var(--surface-alt); margin-bottom: 8px;
            transition: var(--transition); border: 1px solid transparent;
        }
        .file-row:hover { background: var(--primary-light); border-color: var(--border-focus); }
        .file-row .file-icon { font-size: 1.4rem; flex-shrink: 0; }
        .file-row .file-info { flex: 1; min-width: 0; }
        .file-row .file-name { font-weight: 600; font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .file-row .file-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
        .file-row .file-actions { display: flex; gap: 4px; flex-shrink: 0; }
        .file-empty { padding: 40px 20px; text-align: center; color: var(--text-muted); font-style: italic; font-size: 0.9rem; }

        /* ====== Result card ====== */
        .result-card {
            display: none;
            background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
            border: 1px solid #a7f3d0;
            border-radius: var(--radius-lg);
            padding: 20px 24px;
            box-shadow: var(--shadow-md);
            align-items: center; gap: 20px; flex-wrap: wrap;
        }
        .result-card.visible { display: flex; animation: fadeIn 0.3s ease; }
        .result-icon {
            width: 52px; height: 52px; border-radius: 50%;
            background: var(--success);
            display: flex; align-items: center; justify-content: center;
            color: #fff; font-size: 1.5rem; flex-shrink: 0;
            box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
        }
        .result-info { flex: 1; min-width: 200px; }
        .result-title { font-size: 1rem; font-weight: 700; color: #065f46; margin-bottom: 4px; }
        .result-meta { font-size: 0.85rem; color: #047857; }
        .result-meta strong { color: #065f46; }

        /* ====== Code block ====== */
        .code-block {
            background: var(--code-bg);
            color: var(--code-text);
            padding: 16px 18px;
            border-radius: var(--radius);
            font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
            font-size: 0.85rem;
            line-height: 1.6;
            overflow-x: auto;
            white-space: pre-wrap;
            word-break: break-all;
            min-height: 60px;
            border: 1px solid #334155;
        }
        .code-block.light { background: var(--surface); color: var(--text); border: 1px solid var(--border); }

        /* ====== Stats grid ====== */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
            gap: 12px;
            padding: 16px;
        }
        .stat-card {
            background: var(--surface-alt);
            border-radius: var(--radius);
            padding: 14px 16px;
            border: 1px solid var(--border);
            text-align: center;
        }
        .stat-card .stat-value {
            font-size: 1.6rem; font-weight: 800;
            color: var(--primary);
            line-height: 1.2;
        }
        .stat-card .stat-label {
            font-size: 0.72rem; color: var(--text-secondary);
            text-transform: uppercase; letter-spacing: 0.05em;
            font-weight: 600; margin-top: 4px;
        }

        /* ====== Info table ====== */
        .info-table {
            width: 100%;
            border-collapse: collapse;
            padding: 16px;
        }
        .info-table tr { border-bottom: 1px solid var(--border); }
        .info-table tr:last-child { border-bottom: none; }
        .info-table td { padding: 10px 16px; font-size: 0.88rem; }
        .info-table td:first-child { font-weight: 600; color: var(--text-secondary); width: 40%; }
        .info-table td:last-child { color: var(--text); font-family: 'SF Mono', monospace; font-size: 0.84rem; }

        /* ====== Color palette ====== */
        .palette-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            gap: 10px;
            padding: 16px;
        }
        .color-swatch {
            border-radius: var(--radius);
            overflow: hidden;
            cursor: pointer;
            transition: var(--transition);
            box-shadow: var(--shadow-sm);
        }
        .color-swatch:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
        .color-swatch .swatch-color { height: 80px; }
        .color-swatch .swatch-info {
            padding: 8px 10px;
            background: var(--surface);
            text-align: center;
        }
        .color-swatch .swatch-hex { font-family: monospace; font-weight: 700; font-size: 0.8rem; color: var(--text); text-transform: uppercase; }

        /* ====== QR code display ====== */
        .qr-display {
            display: flex;
            justify-content: center;
            padding: 24px;
            background: var(--surface);
            border-radius: var(--radius);
            border: 1px solid var(--border);
        }
        .qr-display canvas, .qr-display img { max-width: 100%; height: auto; }

        /* ====== Output area ====== */
        .output-area {
            background: var(--surface);
            border-radius: var(--radius-lg);
            border: 1px solid var(--border);
            box-shadow: var(--shadow-md);
            overflow: hidden;
        }
        .output-header {
            padding: 12px 18px;
            background: var(--surface-alt);
            border-bottom: 1px solid var(--border);
            display: flex; justify-content: space-between; align-items: center;
            gap: 10px; flex-wrap: wrap;
        }
        .output-header .output-title { font-weight: 700; font-size: 0.88rem; }
        .output-body { padding: 16px 18px; }
        .output-body .code-block { border: none; border-radius: 0; }

        /* ====== Inline form rows ====== */
        .inline-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
        .inline-row .option-group { flex: 1; min-width: 140px; }

        /* ====== Checkbox group ====== */
        .checkbox-group { display: flex; flex-direction: column; gap: 8px; }
        .checkbox-item {
            display: flex; align-items: center; gap: 8px;
            padding: 8px 12px;
            background: var(--surface-alt);
            border-radius: var(--radius-sm);
            border: 1px solid var(--border);
            cursor: pointer;
            transition: var(--transition);
            font-size: 0.88rem; font-weight: 500;
        }
        .checkbox-item:hover { background: var(--primary-light); border-color: var(--border-focus); }
        .checkbox-item input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer; }
        .checkbox-item input[type="radio"] { accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer; }

        /* ====== Hint text ====== */
        .hint-text {
            font-size: 0.78rem; color: var(--text-muted);
            padding: 10px 16px; background: var(--surface-alt);
            border-radius: var(--radius-sm); line-height: 1.5;
        }
        .hint-text code {
            background: var(--surface);
            padding: 2px 6px; border-radius: 4px;
            font-family: monospace; font-size: 0.82rem;
            border: 1px solid var(--border);
        }

        /* ====== Diff viewer ====== */
        .diff-container { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
        @media (max-width: 700px) { .diff-container { grid-template-columns: 1fr; } }
        .diff-pane { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
        .diff-pane-header { padding: 8px 14px; background: var(--surface-alt); border-bottom: 1px solid var(--border); font-weight: 700; font-size: 0.82rem; color: var(--text-secondary); }
        .diff-pane-body { padding: 12px; max-height: 320px; overflow-y: auto; font-family: 'SF Mono', monospace; font-size: 0.82rem; line-height: 1.6; }
        .diff-line { padding: 1px 6px; border-radius: 3px; white-space: pre-wrap; word-break: break-word; }
        .diff-line.added { background: #dcfce7; color: #166534; }
        .diff-line.removed { background: #fee2e2; color: #991b1b; }
        .diff-line.same { color: var(--text-secondary); }

        /* ====== Live preview ====== */
        .live-preview {
            background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
            padding: 24px 28px; min-height: 200px; line-height: 1.7;
            font-family: 'Georgia', serif; color: #111;
        }
        .live-preview h1 { font-size: 1.7rem; margin: 0 0 12px; font-weight: 700; color: #0f172a; }
        .live-preview h2 { font-size: 1.35rem; margin: 16px 0 8px; font-weight: 700; color: #1e293b; }
        .live-preview h3 { font-size: 1.15rem; margin: 14px 0 6px; font-weight: 600; color: #334155; }
        .live-preview p { margin: 0 0 10px; }
        .live-preview ul, .live-preview ol { margin: 0 0 10px 22px; }
        .live-preview li { margin-bottom: 4px; }
        .live-preview code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 0.88em; }
        .live-preview pre { background: #f1f5f9; padding: 12px; border-radius: 6px; overflow-x: auto; margin: 10px 0; }
        .live-preview blockquote { border-left: 4px solid var(--primary); padding-left: 12px; margin: 10px 0; color: var(--text-secondary); font-style: italic; }
        .live-preview a { color: var(--primary); text-decoration: underline; }
        .live-preview table { border-collapse: collapse; margin: 10px 0; }
        .live-preview th, .live-preview td { border: 1px solid var(--border); padding: 6px 12px; }

        /* ====== Gradient preview ====== */
        .gradient-preview {
            height: 180px; border-radius: var(--radius);
            border: 1px solid var(--border);
            margin-bottom: 12px;
        }

        /* ====== Box shadow preview ====== */
        .shadow-preview {
            background: #fff; height: 160px; border-radius: var(--radius);
            display: flex; align-items: center; justify-content: center;
            margin-bottom: 12px;
        }
        .shadow-box {
            width: 100px; height: 100px; background: #4f46e5; border-radius: 12px;
        }

        /* ====== HTTP status grid ====== */
        .status-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            gap: 8px; padding: 16px;
        }
        .status-card {
            padding: 10px 12px; border-radius: var(--radius-sm);
            border: 1px solid var(--border); background: var(--surface);
            cursor: pointer; transition: var(--transition);
        }
        .status-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
        .status-card .status-code { font-weight: 800; font-size: 1.1rem; }
        .status-card .status-text { font-size: 0.74rem; color: var(--text-secondary); margin-top: 2px; }
        .status-card.info { border-left: 4px solid #3b82f6; }
        .status-card.success { border-left: 4px solid #10b981; }
        .status-card.redirect { border-left: 4px solid #f59e0b; }
        .status-card.client { border-left: 4px solid #ef4444; }
        .status-card.server { border-left: 4px solid #8b5cf6; }

        /* ====== Crop image preview ====== */
        .crop-area {
            position: relative; display: inline-block; max-width: 100%;
            background: var(--surface-alt); border-radius: var(--radius);
            overflow: hidden; padding: 12px; text-align: center;
        }
        .crop-area canvas { max-width: 100%; height: auto; cursor: crosshair; }

        /* ====== Toggle switch ====== */
        .toggle { position: relative; display: inline-block; width: 42px; height: 24px; }
        .toggle input { opacity: 0; width: 0; height: 0; }
        .toggle-slider {
            position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
            background: #cbd5e1; transition: var(--transition); border-radius: 9999px;
        }
        .toggle-slider:before {
            position: absolute; content: ""; height: 18px; width: 18px;
            left: 3px; bottom: 3px; background: white; transition: var(--transition); border-radius: 50%;
        }
        .toggle input:checked + .toggle-slider { background: var(--primary); }
        .toggle input:checked + .toggle-slider:before { transform: translateX(18px); }

        /* ====== HTML Viewer / Live Editor ====== */
        .live-editor-layout {
            display: grid;
            grid-template-columns: 1fr 1fr;
            grid-template-rows: 1fr;
            gap: 10px;
            background: var(--surface);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border);
            overflow: hidden;
            min-height: 600px;
        }
        .live-editor-layout.layout-vertical {
            grid-template-columns: 1fr;
            grid-template-rows: 1fr 1fr;
        }
        .live-editor-layout.layout-full {
            grid-template-columns: 1fr;
            grid-template-rows: 1fr;
        }
        .live-editor-layout.layout-full .editor-side {
            display: none;
        }
        .editor-side {
            display: flex;
            flex-direction: column;
            background: #1e293b;
            min-height: 0;
            min-width: 0;
        }
        .editor-tabs {
            display: flex;
            background: #0f172a;
            border-bottom: 1px solid #334155;
            flex-shrink: 0;
        }
        .editor-tab {
            padding: 10px 18px;
            background: transparent;
            color: #94a3b8;
            border: none;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.82rem;
            font-family: inherit;
            transition: var(--transition);
            border-bottom: 2px solid transparent;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .editor-tab:hover { color: #e2e8f0; background: rgba(255,255,255,0.03); }
        .editor-tab.active {
            color: #fff;
            background: #1e293b;
            border-bottom-color: var(--primary);
        }
        .editor-tab .dot {
            width: 8px; height: 8px; border-radius: 50%;
            display: inline-block;
        }
        .editor-tab .dot.html { background: #f97316; }
        .editor-tab .dot.css { background: #3b82f6; }
        .editor-tab .dot.js { background: #eab308; }
        .editor-pane {
            display: none;
            flex: 1;
            min-height: 0;
            position: relative;
        }
        .editor-pane.active { display: flex; flex-direction: column; }
        .editor-pane .CodeMirror {
            flex: 1;
            height: 100%;
            font-size: 13px;
            font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
            background: #1e293b !important;
        }
        .CodeMirror { background: #1e293b !important; color: #e2e8f0; }
        .CodeMirror-gutters { background: #0f172a !important; border-right: 1px solid #334155; }
        .CodeMirror-linenumber { color: #475569 !important; }
        .CodeMirror-cursor { border-left-color: #818cf8 !important; }
        .CodeMirror-selected { background: rgba(129, 140, 248, 0.2) !important; }
        .CodeMirror-activeline-background { background: rgba(255,255,255,0.04) !important; }

        .preview-side {
            display: flex;
            flex-direction: column;
            background: #fff;
            min-width: 0;
            min-height: 0;
        }
        .preview-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 12px;
            background: var(--surface-alt);
            border-bottom: 1px solid var(--border);
            gap: 8px;
            flex-shrink: 0;
            flex-wrap: wrap;
        }
        .preview-url-bar {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 6px;
            background: #fff;
            border: 1px solid var(--border);
            border-radius: 9999px;
            padding: 5px 12px;
            font-size: 0.78rem;
            color: var(--text-secondary);
            font-family: monospace;
            min-width: 200px;
        }
        .preview-url-bar::before { content: '🔒'; font-size: 0.85rem; }
        .preview-url-bar .url-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .preview-device-btns {
            display: flex;
            gap: 4px;
        }
        .device-btn {
            width: 32px; height: 32px;
            border-radius: 6px;
            border: 1px solid var(--border);
            background: var(--surface);
            cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            font-size: 0.9rem;
            transition: var(--transition);
        }
        .device-btn:hover { background: var(--primary-light); border-color: var(--primary); }
        .device-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
        .preview-frame-container {
            flex: 1;
            background: #f0f2f5;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: auto;
            padding: 12px;
            min-height: 0;
        }
        .preview-frame-wrapper {
            background: #fff;
            box-shadow: var(--shadow-lg);
            border-radius: 8px;
            overflow: hidden;
            transition: var(--transition);
            width: 100%;
            height: 100%;
        }
        .preview-frame-wrapper.device-mobile { width: 375px; height: 667px; }
        .preview-frame-wrapper.device-tablet { width: 768px; height: 1024px; max-height: 100%; }
        .preview-frame-wrapper.device-desktop { width: 100%; height: 100%; }
        .preview-frame {
            width: 100%; height: 100%;
            border: none;
            background: #fff;
        }

        .editor-console {
            background: #0f172a;
            color: #e2e8f0;
            font-family: 'SF Mono', monospace;
            font-size: 0.78rem;
            border-top: 1px solid #334155;
            max-height: 160px;
            overflow-y: auto;
            display: none;
            flex-shrink: 0;
        }
        .editor-console.visible { display: block; }
        .console-header {
            padding: 6px 12px;
            background: #1e293b;
            border-bottom: 1px solid #334155;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            font-weight: 700;
            font-size: 0.75rem;
            color: #94a3b8;
        }
        .console-clear-btn {
            background: transparent;
            border: 1px solid #475569;
            color: #94a3b8;
            padding: 2px 8px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 0.7rem;
            font-family: inherit;
        }
        .console-clear-btn:hover { background: #334155; color: #fff; }
        .console-line {
            padding: 4px 12px;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            display: flex;
            gap: 8px;
            align-items: flex-start;
            word-break: break-word;
        }
        .console-line.log { color: #e2e8f0; }
        .console-line.error { color: #f87171; background: rgba(239,68,68,0.08); }
        .console-line.warn { color: #fbbf24; background: rgba(251,191,36,0.08); }
        .console-line.info { color: #60a5fa; }
        .console-line .console-icon { flex-shrink: 0; font-weight: 700; }

        .editor-toolbar {
            display: flex;
            gap: 8px;
            padding: 10px 16px;
            background: var(--surface);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border);
            align-items: center;
            flex-wrap: wrap;
        }
        .editor-toolbar .toolbar-group {
            display: flex;
            gap: 4px;
            align-items: center;
            padding: 0 8px;
            border-right: 1px solid var(--border);
        }
        .editor-toolbar .toolbar-group:last-child { border-right: none; }
        .editor-toolbar .group-label {
            font-size: 0.7rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            font-weight: 700;
            margin-right: 4px;
        }
        .toolbar-btn {
            padding: 6px 10px;
            border-radius: 6px;
            border: 1px solid var(--border);
            background: var(--surface);
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 0.8rem;
            font-weight: 600;
            font-family: inherit;
            transition: var(--transition);
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }
        .toolbar-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--border-focus); }
        .toolbar-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

        .template-modal {
            display: none;
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            background: rgba(0,0,0,0.6);
            z-index: 10000;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        .template-modal.visible { display: flex; }
        .template-modal-content {
            background: var(--surface);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-xl);
            max-width: 900px;
            width: 100%;
            max-height: 85vh;
            overflow-y: auto;
            padding: 24px;
        }
        .template-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 16px;
            border-bottom: 1px solid var(--border);
        }
        .template-modal-title { font-size: 1.2rem; font-weight: 700; }
        .template-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 14px;
        }
        .template-card {
            border: 2px solid var(--border);
            border-radius: var(--radius);
            padding: 16px;
            cursor: pointer;
            transition: var(--transition);
            background: var(--surface-alt);
        }
        .template-card:hover { border-color: var(--primary); background: var(--primary-light); transform: translateY(-2px); }
        .template-card .template-icon { font-size: 2rem; margin-bottom: 8px; }
        .template-card .template-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
        .template-card .template-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4; }

        @media (max-width: 768px) {
            .live-editor-layout, .live-editor-layout.layout-vertical {
                grid-template-columns: 1fr;
                grid-template-rows: 300px 300px;
            }
        }

        
        /* ====== RTL Mode (Arabic) ====== */
        body.rtl-mode { direction: rtl; text-align: right; }
        body.rtl-mode .header { flex-direction: row-reverse; }
        body.rtl-mode .header-brand { flex-direction: row-reverse; }
        body.rtl-mode .header-actions { flex-direction: row-reverse; }
        body.rtl-mode .categories-nav { flex-direction: row-reverse; }
        body.rtl-mode .tools-nav { flex-direction: row-reverse; }
        body.rtl-mode .tool-btn { direction: rtl; }
        body.rtl-mode .options-panel { direction: rtl; }
        body.rtl-mode .option-group { text-align: right; }
        body.rtl-mode .card-header { flex-direction: row-reverse; }
        body.rtl-mode .footer-actions { flex-direction: row-reverse; }
        body.rtl-mode .dropzone { direction: rtl; }
        body.rtl-mode .file-row { flex-direction: row-reverse; }
        body.rtl-mode .file-info { text-align: right; }
        body.rtl-mode .stat-card { direction: rtl; }
        body.rtl-mode .hint-text { direction: rtl; text-align: right; }
        body.rtl-mode .editor-tabs { flex-direction: row-reverse; }
        body.rtl-mode .preview-toolbar { flex-direction: row-reverse; }
        body.rtl-mode .lang-dropdown { right: auto; left: 0; }
        body.rtl-mode .search-results { right: auto; left: 0; }
        body.rtl-mode .tool-header-bar { flex-direction: row-reverse; }
        body.rtl-mode .favorites-bar { flex-direction: row-reverse; }
        body.rtl-mode .btn { direction: rtl; }
        body.rtl-mode .checkbox-item { flex-direction: row-reverse; text-align: right; }
        body.rtl-mode .toast-container { right: auto; left: 20px; }
        body.rtl-mode .toast { direction: rtl; }
        body.rtl-mode .editor-toolbar { flex-direction: row-reverse; }
        body.rtl-mode .toolbar-group { flex-direction: row-reverse; }
        body.rtl-mode .inline-row { flex-direction: row-reverse; }
        body.rtl-mode .unit-converter-grid { direction: rtl; }
        body.rtl-mode .settings-modal-content { direction: rtl; text-align: right; }
        body.rtl-mode .template-modal-content { direction: rtl; text-align: right; }
        body.rtl-mode .shortcuts-list { direction: rtl; }
        body.rtl-mode .shortcut-item { flex-direction: row-reverse; }
        body.rtl-mode .info-table td { text-align: right; }
        body.rtl-mode .preview-url-bar { flex-direction: row-reverse; }
        body.rtl-mode .preview-url-bar::before { content: '🔒'; }
        body.rtl-mode .stats-grid { direction: rtl; }
        body.rtl-mode .output-header { flex-direction: row-reverse; }
        body.rtl-mode .diff-container { direction: rtl; }
        body.rtl-mode .qr-display { direction: ltr; }
        body.rtl-mode .palette-grid { direction: rtl; }
        body.rtl-mode .status-grid { direction: rtl; }
        body.rtl-mode .color-preview-large { direction: ltr; }
        body.rtl-mode .math-result { direction: ltr; }
        body.rtl-mode .regex-match-list { direction: ltr; }
        body.rtl-mode .jwt-section pre { direction: ltr; }
        body.rtl-mode .code-block { direction: ltr; }
        body.rtl-mode .editor-textarea { direction: ltr; }
        body.rtl-mode input[type="text"], body.rtl-mode input[type="number"], body.rtl-mode input[type="password"] { direction: ltr; text-align: right; }
        body.rtl-mode input[type="email"], body.rtl-mode input[type="url"] { direction: ltr; text-align: right; }
        body.rtl-mode textarea { direction: ltr; text-align: right; }
        body.rtl-mode select { direction: rtl; }
        body.rtl-mode .live-preview { direction: ltr; }
        body.rtl-mode .preview-frame-wrapper { direction: ltr; }

        /* ====== Responsive ====== */
        @media (max-width: 600px) {
            body { padding: 10px; }
            .thumbnails-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
            .btn { padding: 8px 14px; font-size: 0.8rem; }
            .cat-btn { min-width: 110px; font-size: 0.78rem; padding: 10px 10px; }
            .header { padding: 16px 20px; }
            .options-panel { padding: 14px 16px; }
        }

        /* ====== Dashboard View (modern grid of tool cards) ====== */
        .dashboard-view { display: flex; flex-direction: column; gap: 20px; }
        .dashboard-view.hidden { display: none; }
        .tool-view-container { display: none; flex-direction: column; gap: 16px; }
        .tool-view-container.visible { display: flex; }
        .dashboard-section { margin-bottom: 8px; }
        .dashboard-section-title {
            font-size: 1.1rem; font-weight: 800; color: var(--text);
            margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
            padding-bottom: 8px; border-bottom: 2px solid var(--border);
        }
        .dashboard-section-title .section-icon { font-size: 1.3rem; }
        .dashboard-section-title .section-count {
            background: var(--primary-light); color: var(--primary);
            padding: 2px 10px; border-radius: 9999px;
            font-size: 0.75rem; font-weight: 700;
        }
        .tools-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 12px;
        }
        .tool-card {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 18px 16px;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            flex-direction: column;
            gap: 8px;
            position: relative;
            overflow: hidden;
        }
        .tool-card::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 3px;
            background: var(--primary);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform 0.25s ease;
        }
        .tool-card:hover {
            border-color: var(--border-focus);
            box-shadow: var(--shadow-lg);
            transform: translateY(-3px);
        }
        .tool-card:hover::before { transform: scaleX(1); }
        .tool-card-icon {
            font-size: 2rem; line-height: 1;
            margin-bottom: 4px;
        }
        .tool-card-name {
            font-weight: 700; font-size: 0.92rem;
            color: var(--text);
        }
        .tool-card-desc {
            font-size: 0.76rem; color: var(--text-secondary);
            line-height: 1.4;
        }
        .tool-card-fav {
            position: absolute; top: 10px; right: 10px;
            font-size: 1rem; color: #fbbf24;
            opacity: 0; transition: opacity 0.2s;
        }
        .tool-card.is-favorite .tool-card-fav { opacity: 1; }
        .tool-card.is-recent::after {
            content: 'RECENT'; position: absolute; bottom: 8px; right: 10px;
            font-size: 0.6rem; font-weight: 700;
            background: var(--success); color: #fff;
            padding: 2px 6px; border-radius: 4px;
        }
        .dashboard-filter-bar {
            display: flex; gap: 8px; flex-wrap: wrap;
            margin-bottom: 16px;
        }
        .filter-tab {
            padding: 8px 16px;
            border-radius: 9999px;
            border: 2px solid var(--border);
            background: var(--surface);
            color: var(--text-secondary);
            font-weight: 600; font-size: 0.85rem;
            cursor: pointer; transition: var(--transition);
            font-family: inherit;
            display: inline-flex; align-items: center; gap: 6px;
        }
        .filter-tab:hover { border-color: var(--border-focus); color: var(--primary); }
        .filter-tab.active {
            background: var(--primary); color: #fff;
            border-color: var(--primary);
            box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
        }
        .filter-tab .filter-count {
            background: rgba(0,0,0,0.1);
            padding: 1px 7px;
            border-radius: 9999px;
            font-size: 0.72rem;
        }
        .filter-tab.active .filter-count { background: rgba(255,255,255,0.25); }
        .back-to-dashboard {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 8px 16px;
            border-radius: 9999px;
            border: 2px solid var(--border);
            background: var(--surface);
            color: var(--text-secondary);
            font-weight: 600; font-size: 0.85rem;
            cursor: pointer; transition: var(--transition);
            font-family: inherit;
        }
        .back-to-dashboard:hover {
            background: var(--primary-light);
            color: var(--primary);
            border-color: var(--border-focus);
        }
        .dashboard-empty {
            text-align: center; padding: 40px;
            color: var(--text-muted); font-style: italic;
        }

        /* ====== Footer ====== */
        .app-footer {
            background: var(--surface);
            border-top: 1px solid var(--border);
            border-radius: var(--radius-lg) var(--radius-lg) 0 0;
            padding: 20px 24px;
            margin-top: 24px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
        }
        .app-footer-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 12px;
        }
        .app-footer-brand {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 700;
            color: var(--text);
            font-size: 0.9rem;
        }
        .app-footer-brand .footer-icon {
            font-size: 1.3rem;
        }
        .app-footer-links {
            display: flex;
            gap: 16px;
            flex-wrap: wrap;
        }
        .app-footer-links a {
            color: var(--text-secondary);
            text-decoration: none;
            font-size: 0.82rem;
            font-weight: 600;
            transition: var(--transition);
        }
        .app-footer-links a:hover {
            color: var(--primary);
        }
        .app-footer-bottom {
            text-align: center;
            font-size: 0.76rem;
            color: var(--text-muted);
            padding-top: 8px;
            border-top: 1px solid var(--border);
        }
        .app-footer-privacy {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            background: var(--success-light);
            color: var(--success);
            padding: 3px 10px;
            border-radius: 9999px;
            font-size: 0.72rem;
            font-weight: 600;
        }

        /* ====== Ad placements ====== */
        .ad-container {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 90px;
            margin: 0 auto;
            max-width: 100%;
            overflow: hidden;
        }
        .ad-container.ad-top { margin-bottom: 16px; }
        .ad-container.ad-bottom { margin-top: 16px; }
        .ad-container.ad-sidebar { min-height: 600px; max-width: 300px; position: sticky; top: 20px; }
        .ad-placeholder {
            color: var(--text-muted);
            font-size: 0.72rem;
            font-style: italic;
            text-align: center;
            padding: 20px;
            background: var(--surface-alt);
            border: 1px dashed var(--border);
            border-radius: var(--radius);
            width: 100%;
        }
        .ad-label {
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-muted);
            text-align: center;
            margin-bottom: 4px;
            font-weight: 600;
        }
        @media (max-width: 768px) {
            .ad-container.ad-sidebar { display: none; }
        }

        
        /* ====== #5 Theme Picker ====== */
        .theme-picker {
            display: flex; gap: 8px; flex-wrap: wrap; padding: 12px;
        }
        .theme-swatch {
            width: 40px; height: 40px; border-radius: 50%;
            cursor: pointer; border: 3px solid transparent;
            transition: var(--transition); position: relative;
        }
        .theme-swatch:hover { transform: scale(1.15); }
        .theme-swatch.active { border-color: var(--text); transform: scale(1.1); }
        .theme-swatch::after {
            content: '✓'; position: absolute; top: 50%; left: 50%;
            transform: translate(-50%, -50%); color: #fff; font-size: 0.8rem;
            opacity: 0; transition: opacity 0.2s;
        }
        .theme-swatch.active::after { opacity: 1; }

        /* ====== #4 Before/After Comparator ====== */
        .ba-comparator {
            position: relative; overflow: hidden; border-radius: var(--radius);
            box-shadow: var(--shadow-md); user-select: none;
        }
        .ba-comparator img { display: block; width: 100%; }
        .ba-after { position: absolute; top: 0; left: 0; width: 50%; overflow: hidden; }
        .ba-after img { width: auto; min-width: 100%; }
        .ba-slider {
            position: absolute; top: 0; bottom: 0; left: 50%;
            width: 4px; background: var(--primary); cursor: ew-resize;
            z-index: 10; transform: translateX(-50%);
        }
        .ba-slider::before {
            content: '⇄'; position: absolute; top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            background: var(--primary); color: #fff;
            width: 36px; height: 36px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-size: 1.2rem; font-weight: 700;
        }
        .ba-label {
            position: absolute; top: 8px; padding: 4px 12px;
            background: rgba(0,0,0,0.7); color: #fff;
            border-radius: 9999px; font-size: 0.75rem; font-weight: 700;
        }
        .ba-label.before { left: 8px; }
        .ba-label.after { right: 8px; }

        /* ====== #6 Tip of the day ====== */
        .tip-banner {
            display: flex; align-items: center; gap: 12px;
            background: linear-gradient(135deg, var(--primary-light), #e0e7ff);
            border: 1px solid var(--border-focus);
            border-radius: var(--radius); padding: 12px 18px;
            margin-bottom: 16px; font-size: 0.85rem;
            animation: slideDown 0.4s ease;
        }
        @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
        .tip-banner .tip-icon { font-size: 1.3rem; flex-shrink: 0; }
        .tip-banner .tip-text { flex: 1; color: var(--text); line-height: 1.5; }
        .tip-banner .tip-close {
            background: none; border: none; cursor: pointer;
            font-size: 1.1rem; color: var(--text-muted); padding: 4px 8px;
        }
        .tip-banner .tip-close:hover { color: var(--danger); }

        /* ====== #7 Embed mode ====== */
        body.embed-mode .header, body.embed-mode .categories-nav,
        body.embed-mode .app-footer, body.embed-mode .ad-container,
        body.embed-mode .tool-header-bar .back-to-dashboard,
        body.embed-mode .favorites-bar { display: none !important; }
        body.embed-mode { padding: 0; }
        body.embed-mode .app-container { max-width: 100%; gap: 8px; padding: 8px; }
        body.embed-mode .tool-view-container { gap: 8px; }
        .embed-badge {
            display: none; text-align: center; padding: 8px;
            font-size: 0.72rem; color: var(--text-muted);
        }
        body.embed-mode .embed-badge { display: block; }

        /* ====== #8 Contextual shortcuts bar ====== */
        .shortcuts-bar {
            display: flex; gap: 8px; flex-wrap: wrap;
            padding: 8px 14px; background: var(--surface-alt);
            border-radius: var(--radius-sm); border: 1px solid var(--border);
            font-size: 0.75rem; color: var(--text-secondary);
            margin-top: 8px;
        }
        .shortcuts-bar kbd {
            background: var(--surface); border: 1px solid var(--border);
            border-radius: 4px; padding: 2px 6px;
            font-family: monospace; font-size: 0.72rem;
            font-weight: 600;
        }

        /* ====== #10 Workspace ====== */
        .workspace-panel {
            background: var(--surface); border: 1px solid var(--border);
            border-radius: var(--radius); padding: 16px; margin-bottom: 16px;
        }
        .workspace-header {
            display: flex; justify-content: space-between; align-items: center;
            margin-bottom: 12px;
        }
        .workspace-title { font-weight: 700; font-size: 0.95rem; }
        .workspace-steps {
            display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
        }
        .workspace-step {
            background: var(--primary-light); color: var(--primary);
            padding: 6px 12px; border-radius: 9999px;
            font-size: 0.78rem; font-weight: 600;
            display: flex; align-items: center; gap: 4px;
        }
        .workspace-arrow { color: var(--text-muted); font-size: 1rem; }
        .workspace-btn {
            padding: 6px 12px; border-radius: var(--radius-sm);
            border: 1px dashed var(--border); background: transparent;
            color: var(--text-muted); cursor: pointer; font-size: 0.78rem;
            font-family: inherit; font-weight: 600;
        }
        .workspace-btn:hover { border-color: var(--primary); color: var(--primary); }

        /* ====== #14 Rating widget ====== */
        .rating-widget {
            display: flex; align-items: center; gap: 8px;
            padding: 10px 14px; background: var(--surface-alt);
            border-radius: var(--radius-sm); border: 1px solid var(--border);
            margin-top: 12px;
        }
        .rating-stars { display: flex; gap: 2px; }
        .rating-star {
            font-size: 1.3rem; cursor: pointer; color: #cbd5e1;
            transition: var(--transition); user-select: none;
        }
        .rating-star:hover, .rating-star.active { color: #fbbf24; transform: scale(1.2); }
        .rating-text { font-size: 0.8rem; color: var(--text-secondary); }
        .rating-feedback {
            flex: 1; padding: 6px 10px; border: 1px solid var(--border);
            border-radius: var(--radius-sm); font-size: 0.8rem; font-family: inherit;
            display: none;
        }
        .rating-feedback.visible { display: block; }

        /* ====== #15 Help center ====== */
        .help-fab {
            position: fixed; bottom: 20px; right: 20px;
            width: 50px; height: 50px; border-radius: 50%;
            background: var(--primary); color: #fff;
            display: flex; align-items: center; justify-content: center;
            font-size: 1.5rem; font-weight: 700; cursor: pointer;
            box-shadow: var(--shadow-lg); z-index: 9998;
            transition: var(--transition); border: none;
        }
        .help-fab:hover { transform: scale(1.1) rotate(10deg); }
        .help-modal {
            display: none; position: fixed; top: 0; left: 0;
            width: 100%; height: 100%; background: rgba(0,0,0,0.6);
            z-index: 10001; align-items: center; justify-content: center; padding: 20px;
        }
        .help-modal.visible { display: flex; }
        .help-modal-content {
            background: var(--surface); border-radius: var(--radius-lg);
            box-shadow: var(--shadow-xl); max-width: 700px; width: 100%;
            max-height: 85vh; overflow-y: auto; padding: 24px; color: var(--text);
        }
        .help-search {
            width: 100%; padding: 10px 14px; border: 2px solid var(--border);
            border-radius: var(--radius); font-size: 0.9rem; margin-bottom: 16px;
            font-family: inherit;
        }
        .help-item {
            padding: 12px; border: 1px solid var(--border);
            border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer;
            transition: var(--transition);
        }
        .help-item:hover { border-color: var(--primary); background: var(--primary-light); }
        .help-item h4 { font-size: 0.9rem; margin-bottom: 4px; }
        .help-item p { font-size: 0.8rem; color: var(--text-secondary); }
        .help-answer { display: none; padding: 12px; background: var(--surface-alt); border-radius: var(--radius-sm); margin-top: 8px; font-size: 0.85rem; line-height: 1.6; }
        .help-item.expanded .help-answer { display: block; }

        /* ====== #13 Accessibility ====== */
        *:focus-visible {
            outline: 3px solid var(--primary) !important;
            outline-offset: 2px;
        }
        .sr-only {
            position: absolute; width: 1px; height: 1px;
            padding: 0; margin: -1px; overflow: hidden;
            clip: rect(0,0,0,0); white-space: nowrap; border: 0;
        }
        .font-size-btn {
            width: 32px; height: 32px; border-radius: 6px;
            border: 1px solid var(--border); background: var(--surface);
            cursor: pointer; font-weight: 700; font-size: 0.75rem;
            font-family: inherit; color: var(--text-secondary); transition: var(--transition);
        }
        .font-size-btn:hover { background: var(--primary-light); color: var(--primary); }
        .font-size-btn.active { background: var(--primary); color: #fff; }
        body.font-large { font-size: 1.1rem; }
        body.font-xl { font-size: 1.25rem; }

        /* ====== #2 Action history ====== */
        .history-panel {
            position: fixed; right: -350px; top: 0; bottom: 0;
            width: 320px; background: var(--surface);
            box-shadow: var(--shadow-xl); z-index: 9997;
            transition: right 0.3s ease; overflow-y: auto;
            border-left: 1px solid var(--border);
        }
        .history-panel.visible { right: 0; }
        .history-header {
            padding: 16px; background: var(--surface-alt);
            border-bottom: 1px solid var(--border);
            display: flex; justify-content: space-between; align-items: center;
            position: sticky; top: 0; z-index: 1;
        }
        .history-item {
            padding: 12px 16px; border-bottom: 1px solid var(--border);
            cursor: pointer; transition: var(--transition);
        }
        .history-item:hover { background: var(--primary-light); }
        .history-item-icon { font-size: 1.2rem; }
        .history-item-info { flex: 1; }
        .history-item-name { font-weight: 600; font-size: 0.82rem; }
        .history-item-time { font-size: 0.72rem; color: var(--text-muted); }

        /* ====== #9 Extension promo banner ====== */
        .ext-promo {
            display: flex; align-items: center; gap: 10px;
            padding: 8px 14px; background: linear-gradient(135deg, #f0fdf4, #dcfce7);
            border: 1px solid #86efac; border-radius: var(--radius);
            font-size: 0.8rem; margin-bottom: 12px; color: #166534;
        }
        .ext-promo a { color: #059669; font-weight: 700; text-decoration: underline; }

        /* ====== Dark Mode ====== */
        body.dark-mode {
            --bg: #0f172a;
            --surface: #1e293b;
            --surface-alt: #334155;
            --primary: #818cf8;
            --primary-hover: #6366f1;
            --primary-light: rgba(99, 102, 241, 0.15);
            --danger: #f87171;
            --danger-hover: #ef4444;
            --danger-light: rgba(239, 68, 68, 0.1);
            --success: #34d399;
            --success-light: rgba(52, 211, 153, 0.1);
            --warning: #fbbf24;
            --warning-light: rgba(251, 191, 36, 0.1);
            --text: #f1f5f9;
            --text-secondary: #94a3b8;
            --text-muted: #64748b;
            --border: #334155;
            --border-focus: #818cf8;
            --code-bg: #0f172a;
            --code-text: #e2e8f0;
        }
        body.dark-mode .CodeMirror { background: #0f172a !important; }
        body.dark-mode .CodeMirror-gutters { background: #1e293b !important; }
        body.dark-mode .editor-side { background: #0f172a; }
        body.dark-mode .editor-tabs { background: #1e293b; }
        body.dark-mode .preview-frame-container { background: #0f172a; }

        /* ====== Search bar ====== */
        .search-container {
            position: relative;
            flex: 1;
            min-width: 200px;
            max-width: 400px;
        }
        .search-input-wrapper {
            position: relative;
            display: flex;
            align-items: center;
            background: var(--surface);
            border: 2px solid var(--border);
            border-radius: 9999px;
            padding: 6px 14px;
            transition: var(--transition);
        }
        .search-input-wrapper:focus-within {
            border-color: var(--border-focus);
            box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.15);
        }
        .search-input-wrapper .search-icon { font-size: 0.95rem; opacity: 0.6; margin-right: 8px; }
        .search-input {
            flex: 1;
            border: none;
            background: transparent;
            color: var(--text);
            font-family: inherit;
            font-size: 0.88rem;
            outline: none;
        }
        .search-input::placeholder { color: var(--text-muted); }
        .search-kbd {
            background: var(--surface-alt);
            border: 1px solid var(--border);
            border-radius: 4px;
            padding: 2px 6px;
            font-size: 0.7rem;
            color: var(--text-muted);
            font-family: monospace;
            font-weight: 600;
        }
        .search-results {
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            right: 0;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            box-shadow: var(--shadow-xl);
            max-height: 400px;
            overflow-y: auto;
            display: none;
            z-index: 100;
        }
        .search-results.visible { display: block; }
        .search-result-item {
            padding: 10px 14px;
            cursor: pointer;
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            gap: 10px;
            transition: var(--transition);
        }
        .search-result-item:last-child { border-bottom: none; }
        .search-result-item:hover, .search-result-item.selected {
            background: var(--primary-light);
            color: var(--primary);
        }
        .search-result-icon { font-size: 1.2rem; flex-shrink: 0; }
        .search-result-info { flex: 1; min-width: 0; }
        .search-result-name { font-weight: 600; font-size: 0.88rem; }
        .search-result-cat { font-size: 0.72rem; color: var(--text-muted); }
        .search-result-fav { color: #fbbf24; font-size: 0.9rem; }
        .search-no-results { padding: 20px; text-align: center; color: var(--text-muted); font-style: italic; }
        .search-group-header {
            padding: 6px 14px;
            background: var(--surface-alt);
            font-size: 0.72rem;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        /* ====== Header buttons (dark mode, settings) ====== */
        .header-icon-btn {
            width: 38px; height: 38px;
            border-radius: 50%;
            border: 1px solid var(--border);
            background: var(--surface);
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            transition: var(--transition);
            flex-shrink: 0;
        }
        .header-icon-btn:hover {
            background: var(--primary-light);
            color: var(--primary);
            border-color: var(--border-focus);
        }

        /* ====== Star (favorite) button on tool ====== */
        .tool-header-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            background: var(--surface);
            border-radius: var(--radius-lg);
            padding: 12px 18px;
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border);
            margin-bottom: 16px;
        }
        .tool-header-bar .tool-current-name {
            font-weight: 700;
            font-size: 1rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .star-btn {
            background: transparent;
            border: none;
            cursor: pointer;
            font-size: 1.3rem;
            color: #cbd5e1;
            transition: var(--transition);
            padding: 4px 8px;
            border-radius: 6px;
        }
        .star-btn:hover { background: var(--surface-alt); transform: scale(1.15); }
        .star-btn.active { color: #fbbf24; }

        /* ====== Settings modal ====== */
        .settings-modal {
            display: none;
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            background: rgba(0,0,0,0.6);
            z-index: 10001;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        .settings-modal.visible { display: flex; }
        .settings-modal-content {
            background: var(--surface);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-xl);
            max-width: 600px;
            width: 100%;
            max-height: 85vh;
            overflow-y: auto;
            padding: 24px;
            color: var(--text);
        }
        .settings-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 16px;
            border-bottom: 1px solid var(--border);
        }
        .settings-modal-title { font-size: 1.2rem; font-weight: 700; }
        .settings-section { margin-bottom: 20px; }
        .settings-section h4 {
            font-size: 0.78rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 10px;
        }
        .setting-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 0;
            border-bottom: 1px solid var(--border);
            gap: 12px;
        }
        .setting-row:last-child { border-bottom: none; }
        .setting-label { font-weight: 600; font-size: 0.9rem; }
        .setting-desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
        .shortcuts-list {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            font-size: 0.85rem;
        }
        .shortcut-item {
            display: flex;
            justify-content: space-between;
            padding: 6px 0;
            border-bottom: 1px dashed var(--border);
        }
        .shortcut-item kbd {
            background: var(--surface-alt);
            border: 1px solid var(--border);
            border-radius: 4px;
            padding: 2px 6px;
            font-family: monospace;
            font-size: 0.78rem;
            color: var(--text-secondary);
        }

        /* ====== Favorites bar in tools nav ====== */
        .favorites-bar {
            background: var(--surface);
            border-radius: var(--radius);
            padding: 8px 12px;
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border);
            display: none;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
        }
        .favorites-bar.visible { display: flex; }
        .favorites-bar .fav-label {
            font-size: 0.72rem;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-right: 4px;
        }
        .fav-chip {
            padding: 4px 10px;
            border-radius: 9999px;
            background: var(--primary-light);
            color: var(--primary);
            font-size: 0.78rem;
            font-weight: 600;
            cursor: pointer;
            border: 1px solid var(--border-focus);
            transition: var(--transition);
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }
        .fav-chip:hover { background: var(--primary); color: #fff; }

        /* ====== Regex tester ====== */
        .regex-match-list {
            background: var(--code-bg);
            color: var(--code-text);
            padding: 12px;
            border-radius: var(--radius);
            font-family: monospace;
            font-size: 0.82rem;
            max-height: 300px;
            overflow-y: auto;
        }
        .regex-match {
            padding: 6px 8px;
            border-bottom: 1px solid #334155;
            display: flex;
            gap: 8px;
            align-items: center;
        }
        .regex-match-num {
            background: var(--primary);
            color: #fff;
            padding: 1px 6px;
            border-radius: 4px;
            font-size: 0.72rem;
            font-weight: 700;
            flex-shrink: 0;
        }
        .regex-match-text { word-break: break-all; }
        .regex-match .highlight {
            background: #fbbf24;
            color: #1e293b;
            padding: 1px 3px;
            border-radius: 2px;
            font-weight: 700;
        }

        /* ====== Color converter swatches ====== */
        .color-preview-large {
            height: 100px;
            border-radius: var(--radius);
            border: 1px solid var(--border);
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            color: rgba(255,255,255,0.9);
            text-shadow: 0 1px 4px rgba(0,0,0,0.5);
        }

        /* ====== JWT decoder ====== */
        .jwt-section {
            background: var(--surface);
            border-radius: var(--radius);
            padding: 14px;
            border: 1px solid var(--border);
            margin-bottom: 12px;
        }
        .jwt-section h4 {
            font-size: 0.78rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 8px;
        }
        .jwt-section pre {
            background: var(--code-bg);
            color: var(--code-text);
            padding: 12px;
            border-radius: var(--radius-sm);
            font-family: monospace;
            font-size: 0.82rem;
            overflow-x: auto;
            white-space: pre-wrap;
            word-break: break-all;
        }

        /* ====== Unit converter grid ====== */
        .unit-converter-grid {
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            gap: 12px;
            align-items: end;
        }
        @media (max-width: 600px) {
            .unit-converter-grid { grid-template-columns: 1fr; }
        }

        /* ====== Math result ====== */
        .math-result {
            background: linear-gradient(135deg, var(--primary), #6366f1);
            color: #fff;
            padding: 20px 24px;
            border-radius: var(--radius);
            text-align: center;
            font-size: 1.8rem;
            font-weight: 800;
            margin-top: 12px;
            word-break: break-all;
        }

        /* ====== Language selector ====== */
        .lang-selector {
            position: relative;
            flex-shrink: 0;
        }
        .lang-btn {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            border-radius: 9999px;
            border: 1px solid var(--border);
            background: var(--surface);
            color: var(--text-secondary);
            cursor: pointer;
            font-weight: 600;
            font-size: 0.85rem;
            font-family: inherit;
            transition: var(--transition);
            min-width: 80px;
            justify-content: center;
        }
        .lang-btn:hover {
            background: var(--primary-light);
            color: var(--primary);
            border-color: var(--border-focus);
        }
        .lang-btn .lang-flag {
            font-size: 1.2rem;
            line-height: 1;
        }
        .lang-btn .lang-code {
            font-weight: 700;
            text-transform: uppercase;
            font-size: 0.78rem;
        }
        .lang-dropdown {
            position: absolute;
            top: calc(100% + 6px);
            right: 0;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            box-shadow: var(--shadow-xl);
            min-width: 180px;
            overflow: hidden;
            display: none;
            z-index: 100;
        }
        .lang-dropdown.visible { display: block; }
        .lang-option {
            padding: 10px 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            border-bottom: 1px solid var(--border);
            transition: var(--transition);
            font-size: 0.88rem;
            font-weight: 500;
        }
        .lang-option:last-child { border-bottom: none; }
        .lang-option:hover {
            background: var(--primary-light);
            color: var(--primary);
        }
        .lang-option.active {
            background: var(--primary);
            color: #fff;
        }
        .lang-option .lang-flag {
            font-size: 1.3rem;
            line-height: 1;
        }
        .lang-option .lang-name { flex: 1; }
        .lang-option .lang-check {
            color: var(--success);
            font-weight: 700;
        }
        .lang-option.active .lang-check { color: #fff; }
        .lang-option:not(.active) .lang-check { display: none; }
    

\n' + css + '\n

' + css + '


${css}

/* pages outils */
.tool-page-intro{max-width:70ch;margin:0 auto;padding:24px 16px;line-height:1.65}
.tool-page-intro h2{margin:1.6em 0 .5em;font-size:1.05rem}
.tool-page-intro ol{padding-left:1.2em}
.related{display:flex;flex-wrap:wrap;gap:8px;padding:0 16px 32px}
.related a{display:inline-block;padding:10px 14px;min-height:44px;line-height:24px;border:1px solid var(--border,#ddd);border-radius:999px;text-decoration:none;font-size:14px}
