        * {
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }
        
        :root {
            --primary: #4a90e2;
            --primary-dark: #357abd;
            --bg: #0a0a0f;
            --bg-card: #14141f;
            --bg-input: #1a1a2e;
            --text: #e0e0e0;
            --text-muted: #888;
            --border: #2a2a3e;
            --human: #4a90e2;
            --ai: #9b59b6;
            --system: #666;
        }
        
        html, body {
            margin: 0;
            padding: 0;
            height: 100%;
            background: var(--bg);
            color: var(--text);
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            font-size: 13px;
            overflow: hidden;
        }
        
        /* Main Layout */
        .app {
            display: flex;
            flex-direction: column;
            height: 100%;
            max-width: 600px;
            margin: 0 auto;
        }
        
        /* Minimal Header */
        .header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 12px;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border);
            flex-shrink: 0;
        }
        
        .header-title {
            font-size: 1rem;
            font-weight: 600;
            color: var(--primary);
        }
        
        .header-status {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        
        .header-btn {
            background: none;
            border: none;
            color: var(--text);
            font-size: 1.4rem;
            padding: 8px;
            cursor: pointer;
            border-radius: 50%;
            transition: background 0.2s;
        }
        
        .header-btn:active {
            background: var(--border);
        }
        
        /* Chat Area */
        .chat-area {
            flex: 1;
            overflow-y: auto;
            padding: 8px;
            -webkit-overflow-scrolling: touch;
        }
        
        .message {
            max-width: 88%;
            margin-bottom: 8px;
            animation: fadeIn 0.2s ease;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(8px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .message.human {
            margin-left: auto;
        }
        
        .message.ai {
            margin-right: auto;
        }
        
        .message.system {
            margin: 8px auto;
            max-width: 90%;
            text-align: center;
        }
        
        .message-bubble {
            padding: 8px 12px;
            border-radius: 16px;
            line-height: 1.35;
            word-wrap: break-word;
            font-size: 0.95rem;
        }
        
        .human .message-bubble {
            background: var(--human);
            color: white;
            border-bottom-right-radius: 4px;
        }
        
        .ai .message-bubble {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-bottom-left-radius: 4px;
        }
        
        .system .message-bubble {
            background: transparent;
            color: var(--text-muted);
            font-size: 0.8rem;
            padding: 6px 12px;
        }
        
        .message-sender {
            font-size: 0.65rem;
            color: var(--text-muted);
            margin-bottom: 2px;
            padding: 0 4px;
        }
        
        .message-time {
            font-size: 0.6rem;
            color: var(--text-muted);
            margin-top: 2px;
            padding: 0 4px;
        }
        
        .ai .message-sender {
            color: var(--ai);
            font-weight: 500;
        }
        
        /* Input Area */
        .input-area {
            padding: 8px 12px;
            background: var(--bg-card);
            border-top: 1px solid var(--border);
            flex-shrink: 0;
        }
        
        .input-row {
            display: flex;
            gap: 6px;
            align-items: flex-end;
        }
        
        .input-wrapper {
            flex: 1;
            position: relative;
        }
        
        .message-input {
            width: 100%;
            background: var(--bg-input);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 10px 14px;
            color: var(--text);
            font-size: 0.95rem;
            resize: none;
            min-height: 40px;
            max-height: 100px;
            outline: none;
            transition: border-color 0.2s;
        }
        
        .message-input:focus {
            border-color: var(--primary);
        }
        
        .message-input::placeholder {
            color: var(--text-muted);
        }
        
        .send-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--primary);
            border: none;
            color: white;
            font-size: 1.1rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: background 0.2s, transform 0.1s;
        }
        
        .send-btn:active {
            background: var(--primary-dark);
            transform: scale(0.95);
        }
        
        .send-btn:disabled {
            background: var(--border);
            cursor: not-allowed;
        }
        
        /* Settings Drawer */
        .drawer-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s, visibility 0.3s;
            z-index: 100;
        }
        
        .drawer-overlay.open {
            opacity: 1;
            visibility: visible;
        }
        
        .drawer {
            position: fixed;
            top: 0;
            right: -320px;
            width: 320px;
            max-width: 85vw;
            height: 100%;
            background: var(--bg-card);
            transition: right 0.3s ease;
            z-index: 101;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }
        
        .drawer.open {
            right: 0;
        }
        
        .drawer-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 16px;
            border-bottom: 1px solid var(--border);
            position: sticky;
            top: 0;
            background: var(--bg-card);
        }
        
        .drawer-title {
            font-weight: 600;
            font-size: 1.1rem;
        }
        
        .drawer-close {
            background: none;
            border: none;
            color: var(--text);
            font-size: 1.5rem;
            cursor: pointer;
            padding: 4px;
        }
        
        .drawer-section {
            padding: 16px;
            border-bottom: 1px solid var(--border);
        }
        
        .drawer-section-title {
            font-size: 0.75rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 12px;
        }
        
        /* Form Controls */
        .form-group {
            margin-bottom: 16px;
        }
        
        .form-label {
            display: block;
            font-size: 0.85rem;
            color: var(--text-muted);
            margin-bottom: 6px;
        }
        
        .form-select {
            width: 100%;
            background: var(--bg-input);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 10px 12px;
            color: var(--text);
            font-size: 0.95rem;
            outline: none;
        }
        
        .form-select:focus {
            border-color: var(--primary);
        }
        
        .form-toggle {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 0;
        }
        
        .toggle-switch {
            position: relative;
            width: 50px;
            height: 28px;
        }
        
        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        
        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--border);
            border-radius: 28px;
            transition: background 0.3s;
        }
        
        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 22px;
            width: 22px;
            left: 3px;
            bottom: 3px;
            background: white;
            border-radius: 50%;
            transition: transform 0.3s;
        }
        
        .toggle-switch input:checked + .toggle-slider {
            background: var(--primary);
        }
        
        .toggle-switch input:checked + .toggle-slider:before {
            transform: translateX(22px);
        }
        
        .slider-group {
            margin-bottom: 12px;
        }
        
        .slider-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 6px;
        }
        
        .slider-value {
            color: var(--primary);
            font-weight: 500;
        }
        
        .form-slider {
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: var(--border);
            outline: none;
            -webkit-appearance: none;
        }
        
        .form-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--primary);
            cursor: pointer;
        }
        
        /* Participant Pills */
        .participants-list {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        
        .participant-pill {
            display: flex;
            align-items: center;
            gap: 6px;
            background: var(--bg-input);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 6px 12px;
            font-size: 0.85rem;
        }
        
        .participant-status {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #38a169;
        }
        
        .participant-status.away {
            background: #e53e3e;
        }
        
        /* Action Buttons */
        .action-btn {
            width: 100%;
            padding: 12px;
            border-radius: 8px;
            border: none;
            font-size: 0.95rem;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.2s;
            margin-bottom: 8px;
        }
        
        .action-btn.primary {
            background: var(--primary);
            color: white;
        }
        
        .action-btn.secondary {
            background: var(--bg-input);
            color: var(--text);
            border: 1px solid var(--border);
        }
        
        .action-btn:active {
            opacity: 0.8;
        }
        
        /* Toast Notifications */
        .toast {
            position: fixed;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%) translateY(100px);
            background: var(--bg-card);
            border: 1px solid var(--border);
            padding: 12px 20px;
            border-radius: 8px;
            font-size: 0.9rem;
            opacity: 0;
            transition: transform 0.3s, opacity 0.3s;
            z-index: 200;
            max-width: 90%;
        }
        
        .toast.show {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }
        
        .toast.success {
            border-color: #38a169;
        }
        
        .toast.error {
            border-color: #e53e3e;
        }
        
        /* Loading States */
        .typing-indicator {
            display: flex;
            gap: 4px;
            padding: 12px 16px;
        }
        
        .typing-dot {
            width: 8px;
            height: 8px;
            background: var(--text-muted);
            border-radius: 50%;
            animation: typing 1.4s infinite;
        }
        
        .typing-dot:nth-child(2) { animation-delay: 0.2s; }
        .typing-dot:nth-child(3) { animation-delay: 0.4s; }
        
        @keyframes typing {
            0%, 60%, 100% { transform: translateY(0); }
            30% { transform: translateY(-8px); }
        }
        
        /* Empty State */
        .empty-state {
            text-align: center;
            padding: 40px 20px;
            color: var(--text-muted);
        }
        
        .empty-state-icon {
            font-size: 3rem;
            margin-bottom: 12px;
        }
        
        /* Quick Actions Bar */
        .quick-actions {
            display: flex;
            gap: 8px;
            padding: 8px 12px;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
        }
        
        .quick-actions::-webkit-scrollbar {
            display: none;
        }
        
        .quick-chip {
            flex-shrink: 0;
            background: var(--bg-input);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 6px 12px;
            font-size: 0.8rem;
            color: var(--text-muted);
            cursor: pointer;
            transition: border-color 0.2s, color 0.2s;
        }
        
        .quick-chip:active {
            border-color: var(--primary);
            color: var(--primary);
        }
        
        /* Participant Bar (at top) */
        .participant-bar {
            display: flex;
            gap: 6px;
            padding: 8px 12px;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border);
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            flex-shrink: 0;
        }
        
        .participant-bar::-webkit-scrollbar {
            display: none;
        }
        
        .participant-chip {
            flex-shrink: 0;
            display: flex;
            align-items: center;
            gap: 5px;
            background: var(--bg-input);
            border: 2px solid transparent;
            border-radius: 20px;
            padding: 6px 14px;
            font-size: 0.8rem;
            color: var(--text);
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
        }
        
        .participant-chip:hover {
            background: var(--border);
        }
        
        .participant-chip.selected {
            border-color: var(--primary);
            background: rgba(74, 144, 226, 0.15);
            color: var(--primary);
        }
        
        .participant-chip.all {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        .participant-chip.all.selected {
            background: var(--primary-dark);
        }
        
        .participant-chip .dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #38a169;
        }
        
        .recipient-indicator {
            font-size: 0.7rem;
            color: var(--text-muted);
            padding: 0 12px 4px;
            background: var(--bg-card);
        }
        
        /* Speak Button */
        .speak-btn {
            background: none;
            border: none;
            color: var(--text-muted);
            font-size: 1.2rem;
            padding: 8px;
            cursor: pointer;
            border-radius: 50%;
            transition: all 0.2s;
        }
        
        .speak-btn:hover {
            background: var(--border);
        }
        
        .speak-btn.active {
            color: #38a169;
            background: rgba(56, 161, 105, 0.15);
        }
        
        /* Speaking Indicator */
        .speaking-indicator {
            position: fixed;
            bottom: 100px;
            left: 50%;
            transform: translateX(-50%);
            background: var(--bg-card);
            border: 1px solid var(--ai);
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 0.8rem;
            color: var(--ai);
            display: none;
            align-items: center;
            gap: 8px;
            z-index: 50;
            animation: pulse 1.5s infinite;
        }
        
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.6; }
        }
        
        .speaking-indicator.show {
            display: flex;
        }
