        /* ─────────────────────────────────────────────────────────────────────
           PERFORMANCE NOTE: Google Fonts @import removed from here.
           Add these <link> tags in the <head> of main.html instead:
             <link rel="preconnect" href="https://fonts.googleapis.com">
             <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
             <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500&display=swap" rel="stylesheet">
           ───────────────────────────────────────────────────────────────────── */

        :root { --tw-color-primary: #c026d3; }

        html, body { width: 100%; max-width: 100%; overflow: hidden; box-sizing: border-box; height: 100dvh; }
        *, *::before, *::after { box-sizing: border-box; }

        /* ── Tap highlight removal only — NO global transition ──────────────
           The previous rule applied CSS transitions to every element on the page.
           This caused constant GPU repaints on every DOM update (chat messages,
           badge counts, hover states, etc). All transition rules are now scoped
           only to the elements that actually need them.
        ─────────────────────────────────────────────────────────────────────── */
        * { -webkit-tap-highlight-color: transparent; }

        body { font-family: 'DM Sans', system-ui, sans-serif; }
        .logo-font { font-family: 'Syne', sans-serif !important; }
        .nav-link { position: relative; }
        .nav-link:after {
            content:''; position:absolute; width:0; height:3px; bottom:-2px; left:0;
            background:linear-gradient(to right,#c026d3,#a855f7);
            transition: width .2s ease;
        }
        .nav-link:hover:after { width:100%; }
        .card-hover { transition: transform .25s cubic-bezier(.4,0,.2,1), border-color .25s, box-shadow .25s; }
        @media (hover:hover) { .card-hover:hover { transform:translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.5); border-color: rgba(255,255,255,0.12) !important; } }
        .modal { animation: modalPop .3s ease forwards; }
        @keyframes modalPop { 0%{opacity:0;transform:scale(.95) translateY(20px);} 100%{opacity:1;transform:scale(1) translateY(0);} }
        .sheet-modal { animation: slideUp .3s ease forwards; padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
        @keyframes slideUp { 0%{transform:translateY(100%);} 100%{transform:translateY(0);} }

        /* Chat panels: never both visible at once */
        #chat-global-panel, #chat-private-panel {
            min-width: 0;
            flex-shrink: 0;
            width: 100%;
        }

        /* ── Private chat: mobile single-column layout ── */
        @media (max-width: 767px) {
            #chat-private-panel { flex-direction: column; }
            #dm-list-panel { width: 100%; max-height: 100%; flex: 1; }
            #dm-thread-panel { width: 100%; flex: 1; }
        }

        /* Scrollbar hide utility */
        .scrollbar-hide { -ms-overflow-style:none; scrollbar-width:none; }
        .scrollbar-hide::-webkit-scrollbar { display:none; }

        .chat-bubble {
            padding: 10px 16px;
            border-radius: 20px;
            position: relative;
            display: inline-block;
            width: fit-content;
            max-width: 100%;
            word-break: break-word;
            overflow-wrap: anywhere;
            white-space: pre-wrap;
            box-sizing: border-box;
        }
        .chat-msg-wrapper { max-width: 80%; min-width: 0; }
        @media (min-width: 768px) { .chat-msg-wrapper { max-width: 70%; } }

        .chat-bubble-received { background:#27272a; border-bottom-left-radius:4px; }

        /* Chat tab: fixed overlay */
        #tab-chat {
            position: fixed;
            top: var(--nav-h, 130px);
            left: 0;
            right: 0;
            bottom: 0;
            height: auto !important;
            box-sizing: border-box;
            z-index: 10;
            /* Isolate chat panel rendering from the rest of the page */
            contain: layout style;
        }
        @media (max-width: 767px) {
            #tab-chat { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
        }

        #chat-messages { display: flex; flex-direction: column; }
        #chat-messages-spacer { flex: 1 1 auto; min-height: 0; }
        #chat-messages > div:not(#chat-messages-spacer) { margin-bottom: 0.75rem; }
        .chat-bubble-sent { color:white; border-bottom-right-radius:4px; }
        .neon-text { text-shadow: 0 0 14px rgba(217,70,239,0.6), 0 0 28px rgba(217,70,239,0.3); }

        /* ── Special profile colours ── */
        @keyframes sparkle-shift {
            0%   { background-position: 0% 50%; }
            50%  { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        .sparkle-bg {
            background: linear-gradient(270deg, #ff80bf, #c084fc, #67e8f9, #fbcfe8, #a78bfa, #ff80bf);
            background-size: 400% 400%;
            animation: sparkle-shift 4s ease infinite;
            /* Hint GPU to composite this layer independently */
            will-change: background-position;
        }
        .sparkle-text {
            background: linear-gradient(90deg, #ff80bf, #c084fc, #67e8f9, #a78bfa, #ff80bf);
            background-size: 300% 100%;
            animation: sparkle-shift 3s ease infinite;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            will-change: background-position;
        }

        @keyframes gold-shift {
            0%   { background-position: 0% 50%; }
            50%  { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        .admin-gold-bg {
            background: linear-gradient(270deg, #fbbf24, #f59e0b, #fde68a, #d97706, #fbbf24);
            background-size: 300% 300%;
            animation: gold-shift 3s ease infinite;
            will-change: background-position;
        }
        .admin-gold-text {
            background: linear-gradient(90deg, #fbbf24, #fde68a, #f59e0b, #fbbf24);
            background-size: 300% 100%;
            animation: gold-shift 2.5s ease infinite;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            will-change: background-position;
        }

        @keyframes hotpink-sparkle-shift {
            0%   { background-position: 0% 50%; }
            50%  { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        @keyframes sparkle-twinkle {
            0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
            25%  { opacity: 0.6; transform: scale(1.3) rotate(15deg); }
            50%  { opacity: 1; transform: scale(0.85) rotate(-10deg); }
            75%  { opacity: 0.7; transform: scale(1.2) rotate(20deg); }
        }
        .admin-hotpink-bg {
            background: linear-gradient(270deg, #ff0090, #ff69b4, #ff1493, #ff85c2, #ff0090);
            background-size: 400% 400%;
            animation: hotpink-sparkle-shift 2.5s ease infinite;
            position: relative;
            overflow: hidden;
            will-change: background-position;
        }
        .admin-hotpink-bg::after {
            content: '✦ ✧ ✦ ✧ ✦';
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 8px;
            color: rgba(255,255,255,0.55);
            letter-spacing: 2px;
            animation: sparkle-twinkle 1.4s ease-in-out infinite;
            pointer-events: none;
        }
        .admin-hotpink-text {
            background: linear-gradient(90deg, #ff0090, #ff69b4, #ff1493, #ff85c2, #ff0090);
            background-size: 300% 100%;
            animation: hotpink-sparkle-shift 2s ease infinite;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            will-change: background-position;
        }

        /* ── Donor: Flames ── */
        @keyframes flames-shift {
            0%   { background-position: 50% 100%; }
            50%  { background-position: 50% 0%; }
            100% { background-position: 50% 100%; }
        }
        @keyframes flames-flicker {
            0%, 100% { opacity: 1; transform: scaleY(1); }
            25%  { opacity: 0.85; transform: scaleY(1.04); }
            50%  { opacity: 1; transform: scaleY(0.97); }
            75%  { opacity: 0.9; transform: scaleY(1.03); }
        }
        .donor-flames-bg {
            background: linear-gradient(0deg, #7f1d1d, #dc2626, #f97316, #fbbf24, #fef08a);
            background-size: 100% 300%;
            animation: flames-shift 2s ease infinite;
            position: relative;
            overflow: hidden;
            will-change: background-position;
        }
        .donor-flames-bg::after {
            content: '🔥';
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            animation: flames-flicker 1.2s ease-in-out infinite;
            pointer-events: none;
        }
        .donor-flames-text {
            background: linear-gradient(90deg, #dc2626, #f97316, #fbbf24, #f97316, #dc2626);
            background-size: 300% 100%;
            animation: flames-shift 2s ease infinite;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            will-change: background-position;
        }

        /* ── Donor: Chrome ── */
        @keyframes chrome-shift {
            0%   { background-position: 0% 50%; }
            50%  { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        .donor-chrome-bg {
            background: linear-gradient(135deg, #71717a, #e4e4e7, #a1a1aa, #f4f4f5, #71717a, #d4d4d8, #52525b);
            background-size: 400% 400%;
            animation: chrome-shift 3s ease infinite;
            will-change: background-position;
        }
        .donor-chrome-text {
            background: linear-gradient(90deg, #a1a1aa, #f4f4f5, #71717a, #e4e4e7, #a1a1aa);
            background-size: 300% 100%;
            animation: chrome-shift 3s ease infinite;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            will-change: background-position;
        }

        .toy-pref-btn {
            padding: 8px 20px;
            border-radius: 9999px;
            font-size: 0.875rem;
            background: #27272a;
            color: #a1a1aa;
            border: 2px solid transparent;
            cursor: pointer;
            transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
            user-select: none;
        }
        .toy-pref-btn:hover { background: #3f3f46; color: #fff; }
        .toy-pref-btn[data-selected="true"] {
            background: linear-gradient(135deg, #ec4899, #8b5cf6);
            color: #fff;
            border-color: transparent;
            transform: scale(1.04);
        }
        .toy-pref-btn[data-selected="true"]:hover { background: linear-gradient(135deg, #db2777, #7c3aed); }

        .control-knob { transition: transform .2s ease, box-shadow .2s ease; }
        .active-nav { background: rgba(217,70,239,0.12); color: #d946ef; border: 1px solid rgba(217,70,239,0.2); }
        #bottom-nav { display:none !important; }

        input[type=range] { -webkit-appearance:none; appearance:none; height:6px; border-radius:9999px; background:#3f3f46; outline:none; }
        input[type=range]::-webkit-slider-thumb { -webkit-appearance:none; width:22px; height:22px; border-radius:50%; cursor:pointer; }
        #intensity-slider::-webkit-slider-thumb { background:#ec4899; }
        #speed-slider::-webkit-slider-thumb { background:#a855f7; }

        ::-webkit-scrollbar { width:4px; }
        ::-webkit-scrollbar-track { background:transparent; }
        ::-webkit-scrollbar-thumb { background:#3f3f46; border-radius:9999px; }

        @media (max-width:767px) {
            #bottom-nav { display:flex !important; }
            #desktop-secondary-nav { display:none !important; }
            #desktop-search { display:none !important; }
            #desktop-user-info { display:none !important; }
            #mobile-menu-btn { display:flex !important; }
            #mobile-menu-panel { display:none; }
            #mobile-menu-panel.open { display:flex; }
            .main-padding { padding:16px !important; }
            .tab-grid-4 { grid-template-columns:repeat(2,1fr)!important; }
            .tab-grid-3 { grid-template-columns:repeat(1,1fr)!important; }
            #chat-sidebar { display:none!important; }
            .sessions-row { flex-direction:column!important; gap:12px!important; }
        }
        @media (max-width: 400px) { .tab-grid-4 { grid-template-columns:repeat(1,1fr)!important; } }
        @media (min-width:768px) {
            #mobile-menu-btn { display:none; }
            #mobile-menu-panel { display:none!important; }
        }
        @media (min-width:768px) and (max-width:1023px) {
            #desktop-search { display:none; }
            .tab-grid-4 { grid-template-columns:repeat(2,1fr); }
            #chat-sidebar { display:none!important; }
        }

        /* Prevent iOS text-size boost and auto-zoom on inputs */
        input, textarea, select { font-size: max(16px, 1em) !important; }
        #mobile-menu-btn { align-items:center; justify-content:center; }

        /* ── Auto-fit: main area fills remaining viewport height ── */
        #main-scroll-area { height: calc(100dvh - var(--nav-h, 130px)); }
        @media (max-width: 767px) {
            #main-scroll-area { height: calc(100dvh - var(--nav-h, 130px) - 72px - env(safe-area-inset-bottom, 0px)); }
        }

        /* ── Safe-area insets for notch/home-bar/Dynamic Island ── */
        @supports (padding: env(safe-area-inset-bottom)) {
            #bottom-nav {
                padding-bottom: env(safe-area-inset-bottom);
                height: calc(72px + env(safe-area-inset-bottom));
            }
            nav { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
        }

        /* ── Tablet-specific tweaks (768px – 1023px) ── */
        @media (min-width: 768px) and (max-width: 1023px) {
            .tab-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
            .tab-grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
            #chat-sidebar { display: none !important; }
            .main-padding { padding: 20px !important; }
        }

        /* ── Large desktop (≥ 1280px) ── */
        @media (min-width: 1280px) { #chat-sidebar { display: flex !important; } }

        /* Comfortable tap targets */
        nav button, nav a, #bottom-nav button, #bottom-nav a,
        button[class*="bg-gradient"], button[class*="btn-primary"] { min-height: 44px; }
        button[class*="text-xs"], button[class*="text-[10px]"] { min-height: unset; }

        /* Online count badge */
        #ws-status-text.is-online { color: #34d399 !important; }
        #online-count-badge { display: none; }
        @media (max-width: 767px) { #online-count-badge { display: inline-flex; } }

        .ws-dot { width:10px; height:10px; border-radius:50%; display:inline-block; margin-right:6px; }
        .ws-dot.connected    { background:#34d399; animation:pulse 2s infinite; }
        .ws-dot.connecting   { background:#fbbf24; animation:pulse .8s infinite; }
        .ws-dot.disconnected { background:#f87171; }
        @keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.4;} }

        /* Toy scanning overlay */
        #scan-overlay { display:none; }
        #scan-overlay.active { display:flex; }

        /* Pattern button active state */
        .pattern-btn.active { background:rgba(236,72,153,.25); border:1px solid #ec4899; color:#f9a8d4; }

        /* BLE not supported warning */
        #ble-warning { display:none; }

        /* ── IDF Advanced Control Surface ── */
        .idf-panel { background: #18181b; border: 1px solid #3f3f46; border-radius: 20px; overflow: hidden; }
        .idf-panel-header { padding: 14px 18px; border-bottom: 1px solid #3f3f46; display: flex; align-items: center; justify-content: space-between; }
        .idf-panel-title { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #71717a; }
        .idf-panel-body { padding: 16px 18px; }
        .idf-vslider-wrap { display: flex; gap: 12px; align-items: flex-end; height: 110px; }
        .idf-vslider-track { position: relative; width: 36px; height: 100%; flex-shrink: 0; }
        .idf-vslider-track input[type="range"] {
            writing-mode: vertical-lr; direction: rtl;
            width: 100%; height: 100%;
            -webkit-appearance: none; appearance: none;
            background: transparent; cursor: pointer;
        }
        .idf-vslider-track input[type="range"]::-webkit-slider-runnable-track { background: #3f3f46; width: 5px; border-radius: 3px; }
        .idf-vslider-track input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 18px; height: 18px; border-radius: 50%;
            background: linear-gradient(135deg, #ec4899, #8b5cf6);
            border: none; box-shadow: 0 0 8px rgba(236,72,153,0.4);
            margin-left: -6px;
        }
        .idf-vslider-label { font-size: 0.62rem; color: #71717a; text-align: center; margin-top: 5px; font-family: monospace; }
        .idf-hslider {
            width: 100%; -webkit-appearance: none; appearance: none;
            height: 5px; border-radius: 3px; background: #3f3f46; cursor: pointer; margin: 10px 0;
        }
        .idf-hslider::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 18px; height: 18px; border-radius: 50%;
            background: linear-gradient(135deg, #ec4899, #8b5cf6);
            box-shadow: 0 0 8px rgba(236,72,153,0.4); cursor: pointer;
        }
        .idf-pattern-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
        .idf-pattern-btn {
            background: #27272a; border: 1px solid #3f3f46; border-radius: 8px;
            padding: 9px 4px; cursor: pointer; font-size: 0.68rem; font-weight: 500;
            color: #71717a; font-family: inherit; text-align: center;
            transition: border-color 0.12s, color 0.12s, background 0.12s;
        }
        .idf-pattern-btn:hover { border-color: #ec4899; color: #ec4899; }
        .idf-pattern-btn.active { background: rgba(236,72,153,0.15); border-color: #ec4899; color: #ec4899; }
        .idf-pattern-icon { display: block; font-size: 1rem; margin-bottom: 3px; }
        .idf-stop-btn {
            width: 100%; padding: 13px; font-size: 0.85rem; font-weight: 700;
            letter-spacing: 0.06em; background: rgba(239,68,68,0.12);
            border: 1px solid rgba(239,68,68,0.3); border-radius: 12px;
            color: #f87171; cursor: pointer; margin-top: 8px;
            transition: background 0.15s;
        }
        .idf-stop-btn:hover { background: rgba(239,68,68,0.22); }
        .idf-int-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
        .idf-int-btn {
            background: #27272a; border: 1px solid #3f3f46; border-radius: 7px;
            padding: 9px 2px; cursor: pointer; font-size: 0.68rem; font-weight: 600;
            color: #71717a; font-family: inherit; text-align: center;
            transition: background 0.12s, border-color 0.12s, color 0.12s;
        }
        .idf-int-btn:hover, .idf-int-btn.active { background: rgba(236,72,153,0.15); border-color: #ec4899; color: #ec4899; }
        .idf-touch-pad {
            background: #09090b; border: 1px solid #3f3f46; border-radius: 12px;
            height: 140px; position: relative; overflow: hidden;
            cursor: crosshair; touch-action: none; user-select: none;
        }
        .idf-touch-pad-label {
            position: absolute; top: 50%; left: 50%;
            transform: translate(-50%,-50%); font-size: 0.72rem;
            color: #3f3f46; pointer-events: none; text-align: center; line-height: 1.6;
        }
        .idf-touch-cursor {
            position: absolute; width: 28px; height: 28px; border-radius: 50%;
            background: radial-gradient(circle, rgba(236,72,153,0.8), rgba(139,92,246,0.4));
            box-shadow: 0 0 14px rgba(236,72,153,0.5);
            transform: translate(-50%,-50%); transition: opacity 0.15s;
            pointer-events: none; opacity: 0;
        }
        .idf-waveform-bar { display: flex; align-items: flex-end; gap: 2px; height: 28px; }
        .idf-waveform-bar span { flex: 1; background: #ec4899; border-radius: 2px 2px 0 0; opacity: 0.7; min-height: 2px; }
        .idf-peer-state {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 4px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 500;
        }
        .idf-peer-state.waiting  { background: rgba(113,113,122,0.12); color: #71717a; }
        .idf-peer-state.connecting { background: rgba(251,191,36,0.12); color: #fbbf24; }
        .idf-peer-state.connected  { background: rgba(52,211,153,0.12); color: #34d399; }
        .idf-peer-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
        .idf-peer-state.connecting .idf-peer-dot { animation: pulse 0.8s ease-in-out infinite; }
        .idf-connect-tabs { display: flex; gap: 3px; background: #09090b; border-radius: 8px; padding: 3px; margin-bottom: 14px; }
        .idf-tab-btn {
            flex: 1; text-align: center; padding: 6px 8px; border-radius: 6px;
            font-size: 0.7rem; font-weight: 500; cursor: pointer; border: none;
            background: transparent; color: #71717a; font-family: inherit;
            transition: background 0.15s, color 0.15s;
        }
        .idf-tab-btn.active { background: #27272a; color: #ec4899; border: 1px solid #3f3f46; }
        .idf-tab-pane { display: none; }
        .idf-tab-pane.active { display: block; }
        .idf-field { margin-bottom: 12px; }
        .idf-field label { display: block; font-size: 0.7rem; font-weight: 500; color: #71717a; margin-bottom: 5px; }
        .idf-field input {
            width: 100%; background: #09090b; border: 1px solid #3f3f46;
            border-radius: 8px; padding: 8px 10px; color: #e4e4e7;
            font-size: 0.8rem; font-family: monospace;
            transition: border-color 0.15s;
        }
        .idf-field input:focus { outline: none; border-color: #ec4899; }
        .idf-btn {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 8px 14px; border-radius: 9px; border: none; cursor: pointer;
            font-size: 0.8rem; font-weight: 500; font-family: inherit;
            transition: filter 0.15s, opacity 0.15s;
        }
        .idf-btn-primary { background: linear-gradient(135deg, #ec4899, #8b5cf6); color: #fff; }
        .idf-btn-ghost { background: transparent; border: 1px solid #3f3f46; color: #71717a; transition: border-color 0.15s, color 0.15s; }
        .idf-btn-ghost:hover { border-color: #ec4899; color: #ec4899; }
        .idf-btn-danger { background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.25); color: #f87171; }
        .idf-btn:disabled { opacity: 0.4; cursor: not-allowed; }
        .idf-consent-banner {
            background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.22);
            border-radius: 10px; padding: 12px 14px; font-size: 0.76rem; line-height: 1.6;
            display: flex; flex-direction: column; gap: 9px;
        }
        .idf-linear-display {
            width: 100%; height: 36px; background: #09090b; border: 1px solid #3f3f46;
            border-radius: 8px; position: relative; overflow: hidden; margin-bottom: 8px;
        }
        .idf-linear-indicator {
            position: absolute; top: 50%; transform: translateY(-50%);
            width: 12px; height: 12px; border-radius: 50%;
            background: linear-gradient(135deg, #ec4899, #8b5cf6);
            box-shadow: 0 0 8px rgba(236,72,153,0.5); left: 50%;
            transition: left 0.3s;
        }
        .idf-remote-tab-bar { display: flex; gap: 4px; margin-bottom: 12px; }
        .idf-remote-tab {
            flex: 1; padding: 7px; border-radius: 8px; font-size: 0.76rem; font-weight: 500;
            cursor: pointer; border: 1px solid #3f3f46; background: transparent;
            color: #71717a; font-family: inherit; text-align: center;
            transition: background 0.15s, border-color 0.15s, color 0.15s;
        }
        .idf-remote-tab.active { background: rgba(236,72,153,0.12); border-color: #ec4899; color: #ec4899; }
        .idf-remote-pane { display: none; }
        .idf-remote-pane.active { display: block; }
        .idf-session-code { font-size: 1.8rem; font-weight: 700; letter-spacing: 0.2em; font-family: monospace; color: #f472b6; text-align: center; padding: 12px 0 4px; }
        .idf-session-code-label { font-size: 0.7rem; color: #71717a; text-align: center; margin-bottom: 12px; }
        .idf-log-panel { font-family: monospace; font-size: 0.72rem; line-height: 1.6; max-height: 100px; overflow-y: auto; }
        .idf-log-panel .idf-log-line { display: flex; gap: 8px; }
        .idf-log-panel .idf-log-time { color: #52525b; flex-shrink: 0; }
        .idf-log-panel .idf-log-msg.info  { color: #a1a1aa; }
        .idf-log-panel .idf-log-msg.ok    { color: #34d399; }
        .idf-log-panel .idf-log-msg.warn  { color: #fbbf24; }
        .idf-log-panel .idf-log-msg.error { color: #f87171; }

        /* ── Friends filter tabs: mobile ── */
        @media (max-width: 767px) {
            .friends-filter-btn {
                flex: 1 1 0 !important;
                padding: 8px 4px !important;
                font-size: 0.72rem !important;
                gap: 4px !important;
                justify-content: center !important;
                min-width: 0 !important;
            }
            .friends-filter-btn span[class*="rounded-full"] {
                font-size: 0.6rem !important;
                padding: 0 5px !important;
            }
        }

        /* ── Reduce motion: disable all animations for users who prefer it.
              This also dramatically improves performance on low-end devices
              when the OS has "Reduce Motion" enabled.
        ─────────────────────────────────────────────────────────────────────── */
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
            /* Keep the waveform bar static */
            .idf-waveform-bar span { transition: none !important; }
        }

        /* ── Mobile: reduce expensive blur for weaker GPUs ── */
        @media (max-width: 767px) {
            .backdrop-blur-md { backdrop-filter: blur(6px) !important; }
        }
