
        /* ===== DISCORD THEME COLORS & VARIABLES ===== */
        :root {
            --bg-primary: #313338;
            --bg-secondary: #2b2d31;
            --bg-tertiary: #1e1f22;
            --bg-floating: #111214;
            --text-normal: #dbdee1;
            --text-muted: #949ba4;
            --text-bright: #f2f3f5;
            --brand: #5865f2;
            --brand-hover: #4752c4;
            --green: #23a559;
            --red: #da373c;
            --yellow: #faa61a;
            --border-subtle: #3f4147;
            --spring-ios: cubic-bezier(0.25, 0.1, 0.25, 1);
        }
        * { margin:0; padding:0; box-sizing:border-box; }
        body {
            font-family: 'gg sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            background: var(--bg-primary); color: var(--text-normal); line-height: 1.5; min-height: 100vh; display: flex;
        }
        ::-webkit-scrollbar { width: 8px; height: 8px; }
        ::-webkit-scrollbar-track { background: var(--bg-secondary); border-radius: 4px; }
        ::-webkit-scrollbar-thumb { background: #1a1b1e; border-radius: 4px; }
        .dashboard-title { font-size: 1.4rem; font-weight: 700; color: var(--text-bright); letter-spacing: -0.01em; }
        .toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
        .toast {
            pointer-events: auto; min-width: 280px; max-width: 360px; padding: 12px 16px; border-radius: 4px; 
            background: var(--bg-floating); border: 1px solid rgba(255,255,255,0.05); box-shadow: 0 4px 12px rgba(0,0,0,0.2); 
            display: flex; align-items: center; gap: 12px; animation: toastSpring 0.4s var(--spring-ios); color: var(--text-normal);
        }
        .toast.success { border-left: 4px solid var(--green); } .toast.error { border-left: 4px solid var(--red); } .toast.warning { border-left: 4px solid var(--yellow); }
        .toast i { font-size: 1.3rem; } .toast.success i { color: var(--green); } .toast.error i { color: var(--red); } .toast.warning i { color: var(--yellow); }
        .toast-content { flex: 1; font-weight: 500; font-size: 0.95rem; }
        .toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.2rem; padding: 4px; }
        .toast-close:hover { color: var(--text-bright); } .toast.hiding { opacity: 0; transform: translateX(120%); transition: all 0.2s ease; }
        @keyframes toastSpring { 0%{transform:translateX(120%); opacity:0;} 100%{transform:translateX(0); opacity:1;} }
        .app { display: flex; width: 100%; min-height: 100vh; }
        .sidebar { width: 260px; background: var(--bg-secondary); border-right: 1px solid var(--bg-tertiary); display: flex; flex-direction: column; transition: transform 0.3s ease; z-index: 200; }
        .sidebar-header { padding: 16px; border-bottom: 1px solid var(--bg-tertiary); display: flex; align-items: center; gap: 10px; }
        .sidebar-header i { font-size: 1.4rem; color: var(--brand); } .sidebar-header h2 { font-size: 1rem; font-weight: 700; color: var(--text-bright); text-transform: uppercase; }
        .guild-list { flex: 1; overflow-y: auto; padding: 12px 8px; }
        .guild-item { display: flex; align-items: center; gap: 12px; padding: 6px 8px; margin: 2px 0; border-radius: 4px; cursor: pointer; transition: background 0.1s; color: var(--text-muted); }
        .guild-item:hover { background: rgba(78, 80, 88, 0.6); color: var(--text-normal); } .guild-item.selected { background: rgba(78, 80, 88, 0.6); color: var(--text-bright); }
        .guild-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-primary); display: flex; align-items: center; justify-content: center; font-size: 14px; overflow: hidden; flex-shrink: 0; transition: border-radius 0.2s ease; }
        .guild-item:hover .guild-icon, .guild-item.selected .guild-icon { border-radius: 30%; }
        .guild-icon img { width: 100%; height: 100%; object-fit: cover; } .guild-info { flex: 1; min-width: 0; } .guild-info h3 { font-size: 0.95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .main { flex: 1; background: var(--bg-primary); padding: 24px 32px; overflow-y: auto; padding-bottom: 90px; }
        .main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; border-bottom: 1px solid var(--bg-secondary); padding-bottom: 16px; }
        .user-profile { position: relative; } .user-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-secondary); border: 2px solid transparent; cursor: pointer; transition: border-color 0.2s; overflow: hidden; display: flex; align-items: center; justify-content: center; }
        .user-avatar:hover { border-color: var(--brand); } .user-avatar img { width: 100%; height: 100%; object-fit: cover; } .user-avatar i { font-size: 1.6rem; color: var(--text-muted); }
        .dropdown-menu { position: absolute; top: 50px; right: 0; width: 240px; background: var(--bg-floating); border-radius: 4px; border: 1px solid #1e1f22; box-shadow: 0 8px 16px rgba(0,0,0,0.24); padding: 8px 0; opacity: 0; transform: translateY(-10px); pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 500; }
        .dropdown-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
        .dropdown-item { padding: 8px 12px; margin: 0 8px; border-radius: 2px; display: flex; align-items: center; gap: 12px; color: var(--text-normal); cursor: pointer; transition: background 0.1s; font-size: 0.9rem; font-weight: 500; }
        .dropdown-item:hover { background: var(--brand); color: #fff; } .dropdown-divider { height: 1px; background: var(--bg-secondary); margin: 8px 12px; } .dropdown-item.danger:hover { background: var(--red); color: #fff; }
        .btn { padding: 8px 16px; border-radius: 3px; border: none; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background 0.2s ease; font-size: 0.9rem; background: var(--bg-secondary); color: var(--text-normal); }
        .btn:hover { background: #3b3f45; } .btn-primary { background: var(--brand); color: #fff; } .btn-primary:hover { background: var(--brand-hover); } .btn-danger { background: var(--red); color: #fff; } .btn-danger:hover { background: #c83336; } .btn-sm { padding: 6px 12px; font-size: 0.85rem; }
        .loading { text-align: center; padding: 60px 20px; color: var(--text-muted); } .loading i { margin-right: 6px; animation: spin 1s linear infinite; } @keyframes spin { to{transform:rotate(360deg);} }
        .no-servers { text-align: center; padding: 60px 20px; color: var(--text-muted); background: var(--bg-secondary); border-radius: 8px; }
        .mobile-server-list { display: none; margin-top: 20px; }
        .server-profile { background: var(--bg-secondary); border-radius: 8px; padding: 24px; margin-bottom: 24px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
        .server-icon-large { width: 80px; height: 80px; border-radius: 30%; background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: var(--text-muted); overflow: hidden; }
        .server-icon-large img { width: 100%; height: 100%; object-fit: cover; } .server-info h2 { font-size: 1.5rem; margin-bottom: 4px; color: var(--text-bright); font-weight: 700; } .server-info p { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
        .tabs { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; border-bottom: 1px solid var(--bg-secondary); padding-bottom: 0; }
        .tab { padding: 12px 0; background: transparent; border: none; border-bottom: 2px solid transparent; border-radius: 0; cursor: pointer; transition: all 0.2s ease; font-weight: 600; font-size: 1rem; color: var(--text-muted); margin-bottom: -1px; }
        .tab:hover { color: var(--text-normal); border-bottom-color: var(--text-muted); } .tab.active { color: var(--text-bright); border-bottom-color: var(--brand); } .tab-content { display: none; animation: fadeSlide 0.2s ease; } .tab-content.active { display: block; }
        @keyframes fadeSlide { 0%{opacity:0; transform:translateY(4px);} 100%{opacity:1; transform:translateY(0);} }
        .settings-section { margin-bottom: 24px; padding: 24px; background: var(--bg-secondary); border-radius: 8px; }
        .settings-section h3 { margin-bottom: 16px; font-size: 1.1rem; color: var(--text-bright); font-weight: 700; display: flex; align-items: center; gap: 8px; }
        .news-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
        .news-jump-selector { display: flex; align-items: center; gap: 8px; background: var(--bg-tertiary); padding: 8px 12px; border-radius: 4px; }
        .news-jump-selector select { background: transparent; border: none; color: var(--text-normal); font-size: 0.9rem; padding: 0; cursor: pointer; min-width: 160px; outline: none; }
        .form-group { margin-bottom: 20px; } .form-group label { display: block; margin-bottom: 8px; color: var(--text-muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; }
        .form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 12px; background: var(--bg-tertiary); border: none; border-radius: 3px; color: var(--text-normal); font-size: 0.95rem; transition: background 0.2s; }
        .form-group input:focus, .form-group select:focus, .form-group textarea:focus { background: #2b2d31; box-shadow: 0 0 0 1px var(--brand); } .form-group input[type="color"] { height: 40px; padding: 2px; cursor: pointer; }
        .form-row { display: flex; gap: 16px; flex-wrap: wrap; } .form-row .form-group { flex: 1 1 180px; }
        .toggle-switch { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; } .toggle-switch input[type="checkbox"] { width: 40px; height: 24px; appearance: none; background: #80848e; border-radius: 12px; position: relative; cursor: pointer; transition: background 0.2s ease; }
        .toggle-switch input[type="checkbox"]:checked { background: var(--green); } .toggle-switch input[type="checkbox"]::before { content: ''; position: absolute; width: 18px; height: 18px; background: white; border-radius: 50%; top: 3px; left: 3px; transition: left 0.2s ease; }
        .toggle-switch input[type="checkbox"]:checked::before { left: 19px; } .toggle-switch label { font-weight: 500; cursor: pointer; font-size: 1rem; color: var(--text-normal); }
        .conditional-settings { display: none; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--bg-primary); }
        .preview-container { margin-top: 16px; border-radius: 4px; background: var(--bg-primary); overflow: hidden; display: none; } .preview-header { padding: 12px 16px; background: var(--bg-secondary); border-bottom: 1px solid var(--bg-tertiary); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); display: flex; align-items: center; gap: 8px; } .preview-header i { color: var(--brand); } .preview-content { padding: 16px; }
        .preview-text { color: var(--text-normal); font-size: 1rem; white-space: pre-wrap; } .preview-embed { border-left: 4px solid var(--brand); background: var(--bg-secondary); border-radius: 4px; padding: 12px 16px; max-width: 520px; margin-top: 8px; } .embed-author { color: var(--text-normal); font-weight: 600; font-size: 0.85rem; margin-bottom: 4px; display: flex; align-items: center; gap: 8px;} .embed-title { color: var(--text-bright); font-weight: 600; font-size: 1rem; margin-bottom: 8px; } .embed-description { color: var(--text-normal); font-size: 0.9rem; margin-bottom: 12px; white-space: pre-wrap; } .embed-image { max-width: 100%; border-radius: 4px; margin-top: 8px; } .embed-image img { max-width: 100%; max-height: 250px; border-radius: 4px; } .embed-footer { color: var(--text-muted); font-size: 0.75rem; margin-top: 12px; } .preview-component { background: var(--bg-secondary); border: 1px solid var(--bg-tertiary); border-radius: 4px; padding: 16px; margin-top: 8px; } .component-message { color: var(--text-normal); font-size: 1rem; margin-bottom: 12px; white-space: pre-wrap; }
        .news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
        .news-channel-item { background: var(--bg-primary); border-radius: 8px; padding: 16px; transition: all 0.2s ease; border: 1px solid transparent; }
        .news-channel-item:hover { background: #35373c; } .news-channel-item.highlight { border-color: var(--brand); background: rgba(88,101,242,0.05); }
        .news-channel-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
        .news-channel-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1rem; color: var(--text-muted); }
        .news-channel-icon.announcement { color: var(--yellow); } .news-channel-meta { flex: 1; min-width: 0; } .news-channel-meta h4 { font-size: 1rem; font-weight: 600; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
        .channel-type-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); margin-top: 2px; }
        .news-enabled-count { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); background: var(--bg-secondary); border-radius: 12px; padding: 2px 8px; flex-shrink: 0; }
        .news-enabled-count.has-sources { color: var(--green); background: rgba(35,165,89,0.1); }
        .news-divider { height: 1px; background: var(--bg-secondary); margin: 12px 0; }
        .news-actions-row { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
        .news-action-btn { background: none; border: none; color: var(--brand); font-size: 0.8rem; font-weight: 500; cursor: pointer; padding: 4px; }
        .news-action-btn:hover { color: var(--brand-hover); text-decoration: underline; }
        .source-checkboxes { display: flex; flex-direction: column; gap: 8px; }
        .source-checkbox { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 4px; cursor: pointer; transition: background 0.2s ease; user-select: none; }
        .source-checkbox:hover { background: var(--bg-secondary); }
        .source-checkbox input[type="checkbox"] { width: 18px; height: 18px; appearance: none; border: 1px solid var(--text-muted); border-radius: 4px; background: transparent; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
        .source-checkbox.is-checked input[type="checkbox"] { background: var(--brand); border-color: var(--brand); }
        .source-checkbox.is-checked input[type="checkbox"]::after { content: '\f00c'; font-family: 'Font Awesome 5 Free'; font-weight: 900; color: white; font-size: 10px; }
        .source-checkbox span { font-size: 0.9rem; font-weight: 500; color: var(--text-normal); }
        .notification-bar { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 150%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1000; background-color: #232428; color: #ffffff; padding: 12px 16px 12px 24px; border-radius: 8px; display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 24px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); width: 90%; max-width: 700px; }
        .notification-bar.visible { transform: translate(-50%, 0); }
        .message-container { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 500; }
        .warning-icon { background-color: #f0b232; color: #000; width: 24px; height: 24px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: bold; font-size: 14px; flex-shrink: 0; }
        .notification-bar .actions { display: flex; align-items: center; gap: 12px; }
        .btn-reset { background: none; border: none; color: #8e92f5; cursor: pointer; font-size: 14px; font-weight: 500; padding: 8px 12px; }
        .btn-reset:hover { text-decoration: underline; }
        .btn-save { background-color: #008248; color: white; border: none; padding: 8px 16px; border-radius: 4px; font-size: 14px; font-weight: 500; cursor: pointer; }
        .btn-save:hover { background-color: #006b3b; }
        .hidden { display: none !important; }
        .mobile-menu-btn { display: none; background: transparent; border: none; color: var(--text-normal); font-size: 1.4rem; cursor: pointer; margin-right: 16px; padding: 4px; } 
        @media (max-width: 768px) { .mobile-menu-btn.visible { display: inline-flex; } .app { flex-direction: column; } .sidebar { position: fixed; top: 0; left: 0; height: 100vh; transform: translateX(-100%); width: 280px; z-index: 300; transition: transform 0.3s ease; } .sidebar.open { transform: translateX(0); } .mobile-server-list { display: block; } .main { padding: 16px; padding-bottom: 200px; } .settings-section { padding: 16px; } .server-profile { padding: 16px; gap: 16px; } .server-icon-large { width: 64px; height: 64px; font-size: 2rem; } .server-info h2 { font-size: 1.2rem; } .notification-bar { flex-direction: column; align-items: stretch; text-align: center; gap: 16px; bottom: 16px; padding: 16px; } .notification-bar .actions { justify-content: center; } .dropdown-menu { width: 260px; right: -10px; } }
        .sidebar.open + .main::before { content: ''; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); z-index: 250; pointer-events: auto; cursor: pointer; }
        .btn-test { background: var(--bg-tertiary); border: none; } .btn-test:hover { background: #3f4147; }
        .char-counter { font-size: 0.75rem; color: var(--text-muted); text-align: right; margin-top: 4px; }
        .char-counter.warning { color: var(--yellow); } .char-counter.over { color: var(--red); }
        .embed-builder { display: none; margin-top: 16px; padding: 16px; background: var(--bg-primary); border-radius: 4px; border: 1px solid var(--border-subtle); }
        .embed-builder.visible { display: block; }
        .embed-builder h4 { color: var(--text-muted); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
        .embed-field-item { background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-radius: 4px; padding: 12px; margin-bottom: 10px; position: relative; }
        .embed-field-item .field-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
        .embed-field-item .field-header span { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
        .embed-field-item .btn-delete-field { background: var(--red); color: #fff; border: none; border-radius: 3px; padding: 4px 8px; cursor: pointer; font-size: 0.8rem; }
        .embed-field-item .btn-delete-field:hover { background: #c83336; }
        .embed-field-item .field-inline-toggle { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-normal); margin-top: 8px; }
        .embed-field-item .field-inline-toggle input { width: 16px; height: 16px; appearance: none; border: 1px solid var(--text-muted); border-radius: 3px; background: transparent; cursor: pointer; }
        .embed-field-item .field-inline-toggle input:checked { background: var(--brand); border-color: var(--brand); }
        .embed-field-item .field-inline-toggle input:checked::after { content: '\f00c'; font-family: 'Font Awesome 5 Free'; font-weight: 900; color: white; font-size: 10px; display: block; text-align: center; }
        .component-settings { display: none; margin-top: 16px; padding: 16px; background: var(--bg-primary); border-radius: 4px; border: 1px solid var(--border-subtle); }
        .component-settings.visible { display: block; }
        .component-settings h4 { color: var(--text-muted); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
        .emoji-picker-btn { background: var(--bg-tertiary); border: none; color: var(--text-normal); cursor: pointer; border-radius: 3px; padding: 10px 14px; font-size: 1.1rem; transition: background 0.2s; white-space: nowrap; flex-shrink: 0; }
        .emoji-picker-btn:hover { background: #3b3f45; }
        .emoji-picker-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); z-index: 599; }
        .emoji-picker-overlay.open { display: block; }
        .emoji-picker-popup { display: none; position: fixed; z-index: 600; background: var(--bg-secondary); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); padding: 0; width: 380px; max-height: 480px; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.95); opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none; overflow: hidden; }
        .emoji-picker-popup.open { display: flex; flex-direction: column; opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; }
        .emoji-picker-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--bg-tertiary); border-bottom: 1px solid var(--border-subtle); }
        .emoji-picker-header span { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); }
        .emoji-picker-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.1rem; padding: 4px; transition: color 0.2s; }
        .emoji-picker-close:hover { color: var(--text-normal); }
        .emoji-search-wrap { padding: 12px 16px 0; }
        .emoji-search { width: 100%; padding: 8px 12px; background: var(--bg-tertiary); border: none; border-radius: 3px; color: var(--text-normal); font-size: 0.9rem; margin-bottom: 10px; }
        .emoji-search:focus { box-shadow: 0 0 0 1px var(--brand); }
        .emoji-picker-tabs { display: flex; gap: 4px; padding: 0 16px 8px; flex-wrap: wrap; border-bottom: 1px solid var(--border-subtle); }
        .emoji-picker-tab { padding: 6px 12px; background: transparent; border: none; border-radius: 3px; cursor: pointer; font-size: 0.8rem; font-weight: 500; color: var(--text-muted); transition: background 0.2s, color 0.2s; }
        .emoji-picker-tab.active { background: var(--bg-tertiary); color: var(--text-normal); }
        .emoji-picker-tab:hover:not(.active) { background: rgba(255,255,255,0.05); color: var(--text-normal); }
        .emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; padding: 12px 16px; flex: 1; overflow-y: auto; }
        .emoji-item { font-size: 1.5rem; cursor: pointer; padding: 6px; text-align: center; border-radius: 4px; transition: background 0.1s; display: flex; align-items: center; justify-content: center; }
        .emoji-item:hover { background: var(--bg-tertiary); }
        .emoji-item.server-emoji img { width: 28px; height: 28px; object-fit: contain; border-radius: 4px; }
        .emoji-empty { color: var(--text-muted); font-size: 0.85rem; text-align: center; padding: 20px; grid-column: 1 / -1; }
        .inline-emoji { width: 1.375em; height: 1.375em; vertical-align: -0.4em; object-fit: contain; margin: 0 1px; }
        .input-with-emoji { display: flex; gap: 8px; align-items: flex-start; }
        .input-with-emoji input, .input-with-emoji textarea { flex: 1; }
        .input-with-upload { display: flex; gap: 8px; align-items: center; }
        .input-with-upload input[type="url"] { flex: 1; }
        .upload-image-btn { background: var(--bg-tertiary); border: none; color: var(--text-normal); cursor: pointer; border-radius: 3px; padding: 10px 14px; font-size: 1rem; transition: background 0.2s, color 0.2s; white-space: nowrap; flex-shrink: 0; }
        .upload-image-btn:hover { background: var(--brand); color: #fff; }
        .upload-image-btn.uploading { pointer-events: none; opacity: 0.6; }
        .upload-hint { display: block; color: var(--text-muted); font-size: 0.75rem; margin-top: 6px; text-transform: none; }
        .multi-image-field { display: flex; flex-direction: column; gap: 8px; }
        .multi-image-list { display: flex; flex-wrap: wrap; gap: 8px; }
        .multi-image-chip { position: relative; width: 64px; height: 64px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border-subtle); background: var(--bg-tertiary); flex-shrink: 0; }
        .multi-image-chip img { width: 100%; height: 100%; object-fit: cover; display: block; }
        .multi-image-chip .remove-image-btn { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,0.7); color: #fff; border: none; cursor: pointer; font-size: 0.7rem; display: flex; align-items: center; justify-content: center; line-height: 1; padding: 0; }
        .multi-image-chip .remove-image-btn:hover { background: var(--red); }
        .multi-image-controls { display: flex; gap: 8px; align-items: center; }
        .multi-image-controls input[type="url"] { flex: 1; }
        .card-bg-controls { display: flex; gap: 8px; align-items: center; }
        .card-bg-controls input[type="url"] { flex: 1; }
        .emoji-picker-btn { position:absolute; top:8px; right:8px; background:transparent; border:none; color:var(--text-muted); cursor:pointer; font-size:1rem; z-index:3; padding:2px 4px; }
        .emoji-picker-btn:hover { color:var(--brand); }
        .emoji-picker-panel { position:absolute; top:34px; right:0; width:260px; max-height:220px; overflow-y:auto; background:var(--bg-tertiary); border:1px solid var(--border-subtle); border-radius:6px; box-shadow:0 8px 24px rgba(0,0,0,.5); padding:8px; z-index:20; display:none; }
        .emoji-picker-panel.open { display:block; }
        .emoji-picker-section-label { font-size:.65rem; text-transform:uppercase; color:var(--text-muted); margin:6px 2px 4px; }
        .emoji-picker-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }
        .emoji-picker-grid button { background:none; border:none; cursor:pointer; font-size:1.15rem; padding:3px; border-radius:4px; line-height:1; }
        .emoji-picker-grid button:hover { background:var(--bg-secondary); }
        .emoji-picker-grid button img { width:20px; height:20px; vertical-align:middle; }
        .emoji-picker-hint { font-size:.62rem; color:var(--text-muted); padding:4px 2px 0; line-height:1.3; }
        .btn-add-image { background: var(--bg-tertiary); border: none; color: var(--text-normal); cursor: pointer; border-radius: 3px; padding: 10px 14px; font-size: 0.9rem; transition: background 0.2s, color 0.2s; white-space: nowrap; flex-shrink: 0; }
        .btn-add-image:hover { background: var(--brand); color: #fff; }
        .btn-add-field { background: transparent; border: 1px solid var(--brand); color: var(--brand); border-radius: 3px; padding: 6px 12px; cursor: pointer; font-size: 0.85rem; transition: background 0.2s, color 0.2s; }
        .btn-add-field:hover { background: var(--brand); color: #fff; }
        .embed-fields-container { margin-top: 10px; }
        .preview-embed-fields { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
        .preview-embed-field { width: 100%; margin-bottom: 4px; }
        .preview-embed-field-name { font-weight: 600; color: #fff; font-size: 0.85rem; margin-bottom: 2px; }
        .preview-embed-field-value { color: #dcddde; font-size: 0.85rem; white-space: pre-wrap; }
        .preview-embed-field-inline { display: inline-block; width: 48%; vertical-align: top; }
        .preview-embed-thumbnail { float: right; max-width: 80px; max-height: 80px; border-radius: 4px; margin-left: 16px; }
        .preview-embed-author-icon { width: 24px; height: 24px; border-radius: 50%; vertical-align: middle; margin-right: 8px; }
        .preview-embed-footer-icon { width: 20px; height: 20px; border-radius: 50%; vertical-align: middle; margin-right: 8px; }

        /* ===== IMAGE CUSTOMIZER (BETA) ===== */
        .beta-toggle-row {
            display:flex; align-items:center; gap:12px; padding:10px 14px;
            background:linear-gradient(135deg,rgba(88,101,242,.12) 0%,rgba(235,87,255,.08) 100%);
            border:1px solid rgba(88,101,242,.3); border-radius:6px; margin-bottom:16px;
            cursor:pointer; user-select:none; transition:background .2s;
        }
        .beta-toggle-row:hover { background:linear-gradient(135deg,rgba(88,101,242,.2) 0%,rgba(235,87,255,.16) 100%); }
        .beta-badge {
            font-size:.65rem; font-weight:800; text-transform:uppercase; letter-spacing:.08em;
            background:linear-gradient(135deg,#5865f2,#eb57ff); color:#fff;
            padding:2px 7px; border-radius:10px; flex-shrink:0;
        }
        .beta-toggle-label { flex:1; font-size:.9rem; font-weight:600; color:var(--text-bright); }
        .beta-toggle-caret { font-size:.75rem; color:var(--text-muted); transition:transform .25s ease; }
        .beta-toggle-row.open .beta-toggle-caret { transform:rotate(90deg); }
        .customizer-panel {
            display:none; background:var(--bg-primary); border-radius:6px;
            border:1px solid var(--border-subtle); padding:20px; margin-bottom:16px;
            animation:fadeSlide .2s ease;
        }
        .customizer-panel.open { display:block; }
        .customizer-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
        @media(max-width:900px){ .customizer-grid { grid-template-columns:1fr; } }
        .customizer-label { display:block; font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); margin-bottom:6px; }
        .customizer-input { width:100%; padding:9px 11px; background:var(--bg-tertiary); border:1px solid var(--border-subtle); border-radius:4px; color:var(--text-normal); font-size:.9rem; transition:box-shadow .2s; }
        .customizer-input:focus { outline:none; box-shadow:0 0 0 2px var(--brand); }
        .customizer-color-row { display:flex; align-items:center; gap:10px; }
        .customizer-color-swatch { width:36px; height:36px; border-radius:4px; border:2px solid var(--border-subtle); cursor:pointer; flex-shrink:0; transition:transform .15s; }
        .customizer-color-swatch:hover { transform:scale(1.08); }
        .color-dot-grid { display:flex; gap:5px; flex-wrap:wrap; }
        .color-dot { width:16px; height:16px; border-radius:50%; cursor:pointer; border:2px solid transparent; transition:border-color .15s,transform .15s; flex-shrink:0; }
        .color-dot:hover { transform:scale(1.2); }
        .color-dot.active { border-color:#fff; }
        .avatar-shape-selector { display:flex; gap:12px; margin-top:4px; }
        .avatar-shape-btn { display:flex; flex-direction:column; align-items:center; gap:6px; cursor:pointer; padding:8px 12px; border-radius:6px; border:2px solid transparent; background:var(--bg-tertiary); transition:border-color .2s,background .2s; }
        .avatar-shape-btn:hover { background:var(--bg-secondary); }
        .avatar-shape-btn.active { border-color:var(--brand); background:rgba(88,101,242,.1); }
        .avatar-shape-btn .shape-icon { width:28px; height:28px; border:2px solid var(--text-muted); }
        .avatar-shape-btn.active .shape-icon { border-color:var(--brand); }
        .avatar-shape-btn span { font-size:.7rem; font-weight:600; text-transform:uppercase; color:var(--text-muted); }
        .avatar-shape-btn.active span { color:var(--brand); }
        .customizer-preview-wrap { display:flex; flex-direction:column; align-items:center; gap:10px; }
        .customizer-preview-card {
            width:100%; aspect-ratio:16/9; border-radius:10px; overflow:hidden;
            border:1px solid var(--border-subtle); display:flex; flex-direction:column;
            align-items:center; justify-content:center; background:center/cover;
            box-shadow:0 4px 20px rgba(0,0,0,.4); position:relative;
        }
        /* Layout: "left"/"right" lay the avatar and text out side by side (a banner),
           matching the two arrangements the real PNG renderer (imageCard.js) supports.
           "middle" (no data-layout, the default) keeps the original stacked/centered look. */
        .customizer-preview-card[data-layout="left"],
        .customizer-preview-card[data-layout="right"] { flex-direction:row; justify-content:flex-start; gap:22px; padding:0 30px; }
        .customizer-preview-card[data-layout="right"] { flex-direction:row-reverse; }
        .customizer-preview-card[data-layout="left"] .customizer-preview-text,
        .customizer-preview-card[data-layout="right"] .customizer-preview-text { text-align:left; margin-top:0; flex:1; min-width:0; }
        /* "text" = no avatar at all, bigger text taking over the space it
           would've used — matches the reference site's "Text" layout. */
        .customizer-preview-card[data-layout="text"] { justify-content:center; padding:0 34px; }
        .customizer-preview-card[data-layout="text"] .customizer-preview-avatar { display:none; }
        .customizer-preview-card[data-layout="text"] .customizer-preview-text { text-align:left; margin-top:0; width:100%; }
        .customizer-preview-card[data-layout="text"] .customizer-preview-title { font-size:2.3rem; }
        .customizer-preview-card[data-layout="text"] .customizer-preview-username { font-size:1.2rem; }
        .customizer-preview-avatar { width:72px; height:72px; overflow:hidden; border:4px solid #a900ff; box-shadow:0 2px 10px rgba(0,0,0,.4); flex-shrink:0; }
        .customizer-preview-avatar img { width:100%; height:100%; object-fit:cover; }
        .customizer-preview-text { text-align:center; margin-top:10px; transform-origin:center top; position:relative; z-index:2; }
        .customizer-preview-card[data-layout="left"] .customizer-preview-text { transform-origin:left center; }
        .customizer-preview-card[data-layout="right"] .customizer-preview-text { transform-origin:right center; }
        .customizer-preview-card[data-layout="text"] .customizer-preview-text { transform-origin:left center; }
        .customizer-preview-title { font-size:1.6rem; font-weight:900; font-style:italic; letter-spacing:-.04em; text-transform:uppercase; line-height:1; text-shadow:0 2px 6px rgba(0,0,0,.5); }
        .customizer-preview-username { font-size:.95rem; font-weight:700; color:#fff; line-height:1.2; margin-top:2px; text-shadow:0 1px 3px rgba(0,0,0,.6); }
        .customizer-preview-msg { font-size:.62rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; margin-top:4px; opacity:.9; text-shadow:0 1px 3px rgba(0,0,0,.6); }
        /* Font choice — mapped to the closest browser-safe equivalent of each TTF bundled
           for the real renderer, so switching fonts here changes how the preview looks too. */
        .customizer-preview-card[data-font="poppins"] { font-family:'Poppins',sans-serif; }
        .customizer-preview-card[data-font="liberation"] { font-family:Arial,'Liberation Sans',Helvetica,sans-serif; }
        .customizer-preview-card[data-font="carlito"] { font-family:Calibri,Carlito,sans-serif; }
        .customizer-preview-card[data-font="serif"] { font-family:'Times New Roman','Liberation Serif',Georgia,serif; }
        .customizer-preview-card[data-font="condensed"] { font-family:'Arial Narrow','DejaVu Sans Condensed',sans-serif; font-stretch:condensed; }
        /* Only Poppins ships a bold-italic weight in the real renderer's font set; every
           other family falls back to upright, same as generateImageCard()'s italicAttr logic. */
        .customizer-preview-card:not([data-font="poppins"]) .customizer-preview-title { font-style:normal; }
        .customizer-send-note { font-size:.78rem; color:var(--text-muted); text-align:center; display:flex; align-items:center; gap:6px; }
        .customizer-send-note i { color:var(--green); }
    

/* ===== CUSTOM RPC PAGE — uses the dashboard UI system, without modifying the dashboard ===== */
.rpc-page{max-width:1180px;margin:0 auto}
.rpc-intro{margin-bottom:24px}
.rpc-intro h2{font-size:1.35rem;color:var(--text-bright);margin-bottom:6px}
.rpc-intro p{color:var(--text-muted);font-size:.95rem}
.rpc-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.85fr);gap:24px;align-items:start}
.rpc-card{background:var(--bg-secondary);border-radius:8px;padding:24px;margin-bottom:24px}
.rpc-card h3{margin-bottom:18px;font-size:1.05rem;color:var(--text-bright);font-weight:700;display:flex;align-items:center;gap:8px}
.rpc-card h3 i{color:var(--brand)}
.rpc-card-subtitle{color:var(--text-muted);font-size:.85rem;margin:-10px 0 18px}
.rpc-divider{height:1px;background:var(--border-subtle);margin:22px 0}
.rpc-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:6px}
.rpc-toggle{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 16px;background:var(--bg-tertiary);border-radius:6px;margin-bottom:20px}
.rpc-toggle-copy strong{display:block;color:var(--text-bright);font-size:.95rem;margin-bottom:3px}
.rpc-toggle-copy span{display:block;color:var(--text-muted);font-size:.8rem}
.rpc-toggle input[type=checkbox]{width:44px;height:26px;appearance:none;background:#80848e;border-radius:14px;position:relative;cursor:pointer;transition:background .2s;flex-shrink:0}
.rpc-toggle input[type=checkbox]:checked{background:var(--green)}
.rpc-toggle input[type=checkbox]::before{content:'';position:absolute;width:20px;height:20px;background:#fff;border-radius:50%;top:3px;left:3px;transition:left .2s}
.rpc-toggle input[type=checkbox]:checked::before{left:21px}
.rpc-preview-wrap{position:sticky;top:20px}
.rpc-preview-label{color:var(--text-muted);font-size:.75rem;font-weight:600;text-transform:uppercase;margin-bottom:8px}
.discord-preview{background:#111214;border:1px solid #1e1f22;border-radius:8px;padding:16px;box-shadow:0 8px 20px rgba(0,0,0,.2)}
.preview-app{font-size:.7rem;font-weight:700;color:#949ba4;text-transform:uppercase;margin-bottom:12px;letter-spacing:.03em}
.preview-activity{display:flex;gap:14px}
.preview-large{width:80px;height:80px;border-radius:8px;background:#2b2d31;display:flex;align-items:center;justify-content:center;color:#5865f2;font-size:1.6rem;flex-shrink:0;overflow:hidden}
.preview-large img{width:100%;height:100%;object-fit:cover}
.preview-copy{min-width:0;flex:1}
.preview-name{color:#f2f3f5;font-weight:700;font-size:.95rem;margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.preview-details,.preview-state{color:#dbdee1;font-size:.82rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.preview-state{margin-top:2px}
.preview-time{color:#949ba4;font-size:.75rem;margin-top:7px}
.preview-buttons{display:flex;gap:8px;margin-top:14px;flex-wrap:wrap}
.preview-button{background:#2b2d31;color:#dbdee1;border-radius:3px;padding:6px 12px;font-size:.75rem}
.rpc-status{display:none;margin-bottom:16px;padding:10px 12px;border-radius:4px;background:rgba(35,165,89,.12);color:#57d98a;font-size:.85rem}
.rpc-status.show{display:block}
@media(max-width:900px){.rpc-grid{grid-template-columns:1fr}.rpc-preview-wrap{position:static}}
@media(max-width:768px){.rpc-card{padding:16px}.rpc-actions{justify-content:stretch}.rpc-actions .btn{flex:1;justify-content:center}}
