/* =========================================================
   RABBIT RESPONSIVE FAITHFUL V1
   Obiettivo:
   - rendere il responsive coerente con la versione desktop
   - preservare funzionalità esistenti
   - giustificare spazi di Chat, Assistente e Videocall
   - nessuna modifica a Supabase / realtime / LiveKit / logica JS
   ========================================================= */

:root{
  --rf-safe-top: env(safe-area-inset-top, 0px);
  --rf-safe-bottom: env(safe-area-inset-bottom, 0px);
  --rf-grid: rgba(99,102,241,.028);
  --rf-line: #e4ebf5;
  --rf-soft: #f8fafc;
  --rf-ink: #0f172a;
  --rf-muted: #64748b;
  --rf-shadow: 0 18px 45px rgba(15,23,42,.10), 0 6px 18px rgba(15,23,42,.05);
  --rf-shadow-strong: 0 32px 90px rgba(15,23,42,.22), 0 14px 32px rgba(15,23,42,.12);
}

html, body{
  overflow-x:hidden !important;
}

body{
  background-color:#f8fafc !important;
  background-image:
    linear-gradient(to right, var(--rf-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rf-grid) 1px, transparent 1px) !important;
  background-size:44px 44px !important;
}

/* =========================================================
   TABLET / MOBILE SHELL — fedele al desktop, senza finto browser
   ========================================================= */
@media (max-width: 900px){
  .scale-root,
  .scale-root .app,
  .app{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  .scale-root .app,
  .app.no-rightbar,
  .app{
    display:grid !important;
    grid-template-columns:1fr !important;
  }

  .app > .sidebar,
  .app > aside.sidebar,
  .rabbit-pro-sidebar,
  body > .sidebar,
  .rightbar{
    display:none !important;
  }

  /* Corregge le vecchie regole mobile troppo aggressive: gli aside interni di chat/call restano visibili. */
  #rc22Panel aside,
  #rc22Panel .rc22-sidebar,
  #rc22Panel .rc22-info,
  #rc22Call aside,
  #rc22Call .rc22-live,
  #rc22Incoming,
  #rc22ConferencePicker{
    visibility:visible !important;
    pointer-events:auto !important;
  }

  .main{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    margin:0 !important;
    padding:12px clamp(10px,2.4vw,18px) calc(96px + var(--rf-safe-bottom)) !important;
    overflow-x:hidden !important;
    background-color:#f8fafc !important;
    background-image:
      linear-gradient(to right, var(--rf-grid) 1px, transparent 1px),
      linear-gradient(to bottom, var(--rf-grid) 1px, transparent 1px) !important;
    background-size:44px 44px !important;
  }

  .view{
    width:100% !important;
    max-width:100% !important;
    padding:clamp(10px,2.4vw,18px) !important;
    margin:0 auto !important;
  }

  #home.view{
    max-width:100% !important;
    padding:clamp(10px,2.4vw,18px) !important;
  }

  /* Topbar: mantiene la logica desktop, ma compatta. Niente barra URL finta. */
  .topbar,
  .topbar.rabbit-pro-topbar{
    position:sticky !important;
    top:0 !important;
    z-index:90 !important;
    width:100% !important;
    min-height:62px !important;
    margin:0 0 14px !important;
    padding:9px 10px !important;
    display:grid !important;
    grid-template-columns:42px minmax(0,1fr) auto !important;
    grid-template-areas:"menu search user" !important;
    align-items:center !important;
    gap:9px !important;
    border-radius:20px !important;
    border:1px solid rgba(226,232,240,.95) !important;
    background:rgba(255,255,255,.94) !important;
    box-shadow:0 12px 32px rgba(15,23,42,.075) !important;
    backdrop-filter:blur(16px) saturate(145%) !important;
    -webkit-backdrop-filter:blur(16px) saturate(145%) !important;
  }

  .topbar::before,
  .topbar .search::before,
  .topbar .search::after{
    content:none !important;
    display:none !important;
  }

  .mobile-menu-btn{
    grid-area:menu !important;
    display:grid !important;
    width:42px !important;
    height:42px !important;
    min-width:42px !important;
    border-radius:14px !important;
    place-items:center !important;
    background:#ffffff !important;
    color:#0f172a !important;
    border:1px solid #dbe4ee !important;
    box-shadow:0 8px 18px rgba(15,23,42,.06) !important;
    font-size:22px !important;
    line-height:1 !important;
  }
  .mobile-menu-btn::before{content:none !important;}

  .topbar .search,
  .topbar.rabbit-pro-topbar .search{
    grid-area:search !important;
    width:100% !important;
    max-width:none !important;
    height:44px !important;
    min-height:44px !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    background:transparent !important;
    box-shadow:none !important;
  }

  .topbar .search input,
  .topbar input#globalSearch{
    width:100% !important;
    height:44px !important;
    min-height:44px !important;
    padding:0 40px 0 14px !important;
    border-radius:15px !important;
    border:1px solid #dbe4ee !important;
    background:#ffffff !important;
    color:#0f172a !important;
    font-size:15px !important;
    font-weight:650 !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.9) !important;
  }

  .topbar .search input::placeholder,
  .topbar input#globalSearch::placeholder{
    color:#94a3b8 !important;
    opacity:1 !important;
  }

  .topbar .search button{
    position:absolute !important;
    right:8px !important;
    top:50% !important;
    transform:translateY(-50%) !important;
    width:30px !important;
    height:30px !important;
    border:0 !important;
    background:transparent !important;
    color:#94a3b8 !important;
    font-size:17px !important;
    box-shadow:none !important;
  }
  .topbar .search button::before{content:none !important;}

  .rabbit-topbar-user{
    grid-area:user !important;
    justify-self:end !important;
    display:flex !important;
    align-items:center !important;
    gap:7px !important;
    min-width:0 !important;
  }

  .rabbit-bell{
    display:grid !important;
    width:38px !important;
    height:38px !important;
    min-width:38px !important;
    border-radius:14px !important;
  }

  .rabbit-admin-chip{
    height:40px !important;
    min-height:40px !important;
    max-width:172px !important;
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    padding:0 10px 0 6px !important;
    border-radius:999px !important;
    background:#fff !important;
    border:1px solid #e2e8f0 !important;
    box-shadow:0 8px 18px rgba(15,23,42,.055) !important;
  }
  .rabbit-admin-chip::after{content:none !important;}

  .rabbit-avatar-dot{
    width:30px !important;
    height:30px !important;
    min-width:30px !important;
    border-radius:999px !important;
  }

  .rabbit-admin-chip b{
    display:block !important;
    max-width:112px !important;
    overflow:hidden !important;
    white-space:nowrap !important;
    text-overflow:ellipsis !important;
    color:#0f172a !important;
    font-size:13px !important;
    line-height:1.05 !important;
    font-weight:850 !important;
  }
  .rabbit-admin-chip b::after{content:none !important;display:none !important;}
}

@media (max-width: 520px){
  .topbar,
  .topbar.rabbit-pro-topbar{
    grid-template-columns:42px minmax(0,1fr) auto !important;
    gap:7px !important;
    padding:8px !important;
    border-radius:18px !important;
  }
  .rabbit-bell{display:none !important;}
  .rabbit-admin-chip{max-width:124px !important;padding-right:6px !important;}
  .rabbit-admin-chip b{max-width:76px !important;font-size:12px !important;}
}

/* =========================================================
   HOME RESPONSIVE FEDELE: stessi blocchi desktop, solo impilati
   ========================================================= */
@media (max-width: 1180px){
  #home.view{max-width:1180px !important;}

  .command-center,
  .command-center.rabbit-pro-command,
  .rabbit-pro-command{
    grid-template-columns:1fr !important;
    gap:18px !important;
    margin-bottom:24px !important;
  }

  .pulse-strip,
  .rabbit-pro-kpis{
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  }

  .home-launcher-grid{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:16px !important;
  }
}

@media (max-width: 700px){
  #home.view{
    max-width:100% !important;
  }

  .command-panel,
  .rabbit-pro-hero,
  .command-panel.rabbit-pro-hero{
    width:100% !important;
    min-height:220px !important;
    height:auto !important;
    padding:22px !important;
    border-radius:24px !important;
    display:flex !important;
    align-items:center !important;
    overflow:hidden !important;
    box-shadow:0 18px 38px rgba(15,23,42,.18) !important;
  }

  .rabbit-pro-hero-content{
    height:auto !important;
    min-height:176px !important;
    padding:0 !important;
    display:flex !important;
    flex-direction:column !important;
    justify-content:space-between !important;
    gap:18px !important;
  }

  .rabbit-pro-hero h1,
  .command-title,
  .rabbit-pro-hero h1 span,
  .command-title span{
    display:block !important;
    max-width:100% !important;
    color:#fff !important;
    font-size:clamp(27px,7.4vw,36px) !important;
    line-height:1.04 !important;
    letter-spacing:-.055em !important;
    font-weight:950 !important;
    text-align:left !important;
    visibility:visible !important;
    opacity:1 !important;
  }

  .rabbit-pro-hero p,
  .command-subtitle,
  .rabbit-pro-hero .muted{
    display:block !important;
    color:rgba(226,232,240,.78) !important;
    font-size:13px !important;
    line-height:1.35 !important;
    max-width:100% !important;
    margin:0 !important;
  }

  .rabbit-mobile-hero-actions,
  .rabbit-pro-hero-actions,
  .hero-actions{
    display:flex !important;
    flex-wrap:nowrap !important;
    gap:9px !important;
    justify-content:flex-start !important;
    align-items:center !important;
    overflow-x:auto !important;
    padding:0 2px 2px !important;
    scrollbar-width:none !important;
  }
  .rabbit-mobile-hero-actions::-webkit-scrollbar,
  .rabbit-pro-hero-actions::-webkit-scrollbar,
  .hero-actions::-webkit-scrollbar{display:none !important;}

  .rabbit-mobile-hero-actions::before,
  .rabbit-mobile-hero-actions::after{display:none !important;content:none !important;}

  .rabbit-mobile-hero-actions button,
  .rabbit-pro-hero-actions button,
  .hero-actions button,
  .rabbit-mobile-hero-actions button.active{
    flex:0 0 auto !important;
    width:auto !important;
    min-width:112px !important;
    height:42px !important;
    min-height:42px !important;
    padding:0 14px !important;
    border-radius:14px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    background:rgba(255,255,255,.14) !important;
    border:1px solid rgba(255,255,255,.20) !important;
    color:#fff !important;
    font-size:13px !important;
    font-weight:850 !important;
    white-space:nowrap !important;
  }
  .rabbit-mobile-hero-actions button.active,
  .hero-actions button.primary{
    background:linear-gradient(135deg,#2563eb,#0f9aa8) !important;
  }

  .rabbit-pro-pulse,
  .command-center > .card.rabbit-pro-pulse{
    min-height:0 !important;
    padding:0 !important;
    border-radius:22px !important;
  }

  .rabbit-pro-pulse h3,
  .command-center > .card.rabbit-pro-pulse h3{
    display:block !important;
    margin:0 0 10px !important;
    color:#0f172a !important;
    font-size:15px !important;
    font-weight:900 !important;
  }

  .pulse-strip,
  .rabbit-pro-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
  }

  .pulse-card{
    min-height:88px !important;
    border-radius:18px !important;
    padding:14px 38px 12px 14px !important;
  }
  .pulse-card b{font-size:27px !important;}
  .pulse-card span,
  .pulse-card .muted{font-size:12px !important;margin-top:5px !important;}

  .home-launcher-shell,
  .rabbit-pro-modules{
    padding:0 !important;
  }

  .home-launcher-head h3{
    font-size:24px !important;
    margin-bottom:4px !important;
  }

  .rabbit-module-groups{
    gap:22px !important;
  }

  .home-launcher-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
  }

  .launch-card,
  .rabbit-pro-module-card{
    min-height:138px !important;
    padding:16px !important;
    border-radius:18px !important;
    grid-template-columns:42px minmax(0,1fr) 18px !important;
    gap:12px !important;
    background:#fff !important;
    box-shadow:0 12px 26px rgba(15,23,42,.065) !important;
  }

  .launch-icon{width:42px !important;height:42px !important;border-radius:14px !important;}

  .launch-title,
  .rabbit-pro-module-card .launch-title{
    display:block !important;
    font-size:14px !important;
    line-height:1.18 !important;
    font-weight:900 !important;
    color:#0f172a !important;
    white-space:normal !important;
    overflow:visible !important;
  }

  .launch-desc,
  .rabbit-pro-module-card .launch-desc{
    display:-webkit-box !important;
    -webkit-line-clamp:2 !important;
    -webkit-box-orient:vertical !important;
    color:#64748b !important;
    font-size:11.5px !important;
    line-height:1.32 !important;
    overflow:hidden !important;
    visibility:visible !important;
    opacity:1 !important;
  }

  #home .rabbit-pro-home-lower,
  #home .home-grid,
  #home .priority-board,
  #home .dashboard-grid{
    grid-template-columns:1fr !important;
    gap:14px !important;
    width:100% !important;
  }
}

@media (max-width: 380px){
  .home-launcher-grid{gap:10px !important;}
  .launch-card,
  .rabbit-pro-module-card{
    min-height:132px !important;
    padding:13px !important;
    grid-template-columns:38px minmax(0,1fr) 16px !important;
    gap:9px !important;
  }
  .launch-icon{width:38px !important;height:38px !important;}
  .launch-title{font-size:13px !important;}
  .launch-desc{font-size:10.5px !important;}
}

/* =========================================================
   UNIFIED HUB / ASSISTANT — sinistra, ordinato e non sovrapposto
   ========================================================= */
@media (max-width: 900px){
  #rabbitUnifiedHub{
    left:14px !important;
    bottom:calc(18px + var(--rf-safe-bottom)) !important;
    z-index:2147482500 !important;
  }

  #rabbitHubMain{
    min-width:64px !important;
    width:64px !important;
    height:64px !important;
    border-radius:22px !important;
    padding:0 !important;
  }
  #rabbitHubMain .rah-main-text{display:none !important;}
  #rabbitHubMain .rah-main-icon{width:48px !important;height:48px !important;}

  .rah-menu{
    align-items:flex-start !important;
    gap:8px !important;
  }

  .rah-choice{
    width:min(240px,calc(100vw - 28px)) !important;
    min-height:64px !important;
    border-radius:22px !important;
  }

  #rabbitAssistantPanel{
    left:10px !important;
    right:10px !important;
    bottom:calc(90px + var(--rf-safe-bottom)) !important;
    width:auto !important;
    height:min(640px,calc(100dvh - 112px - var(--rf-safe-bottom))) !important;
    max-height:calc(100dvh - 112px - var(--rf-safe-bottom)) !important;
    border-radius:24px !important;
  }
}

/* Il bottone chat nativo resta nascosto se esiste il macro-hub, ma la chat si apre regolarmente dal menu. */
#rabbitUnifiedHub ~ #rc22Button,
body:has(#rabbitUnifiedHub) #rc22Button.rc22-button{
  opacity:0 !important;
  pointer-events:none !important;
  transform:scale(.01) !important;
}

/* =========================================================
   CHAT RESPONSIVE — desktop fedele, mobile pieno e giustificato
   ========================================================= */
@media (min-width: 901px){
  #rc22Panel.rc22-panel{
    width:min(1180px,calc(100vw - 56px)) !important;
    height:min(720px,calc(100dvh - 132px)) !important;
    right:28px !important;
    bottom:106px !important;
    left:auto !important;
    top:auto !important;
    transform:none !important;
    grid-template-columns:226px minmax(420px,1fr) 238px !important;
  }
}

@media (max-width: 900px) and (min-width: 641px){
  #rc22Panel.rc22-panel{
    position:fixed !important;
    left:14px !important;
    right:14px !important;
    top:calc(var(--rf-safe-top) + 14px) !important;
    bottom:calc(var(--rf-safe-bottom) + 14px) !important;
    width:auto !important;
    height:auto !important;
    max-width:none !important;
    max-height:none !important;
    transform:none !important;
    display:none !important;
    grid-template-columns:250px minmax(0,1fr) !important;
    grid-template-rows:1fr !important;
    border-radius:28px !important;
    overflow:hidden !important;
    background:#fff !important;
    box-shadow:var(--rf-shadow-strong) !important;
    z-index:2147483001 !important;
  }

  #rc22Panel.rc22-panel.open{display:grid !important;}
  #rc22Panel .rc22-info{display:none !important;}

  #rc22Panel .rc22-sidebar{
    display:grid !important;
    grid-template-rows:auto auto minmax(0,1fr) !important;
    height:100% !important;
    min-height:0 !important;
    background:#f8fafc !important;
    border-right:1px solid #e5eaf2 !important;
  }

  #rc22Panel .rc22-list{
    overflow:auto !important;
    padding:10px 12px 16px !important;
  }

  #rc22Panel .rc22-main{
    display:grid !important;
    grid-template-rows:74px minmax(0,1fr) auto !important;
    min-width:0 !important;
    min-height:0 !important;
    height:100% !important;
    border-radius:0 !important;
  }

  #rc22Panel .rc22-messages{
    min-height:0 !important;
    height:100% !important;
    overflow:auto !important;
  }
}

@media (max-width: 640px){
  #rc22Panel.rc22-panel{
    position:fixed !important;
    left:8px !important;
    right:8px !important;
    top:calc(var(--rf-safe-top) + 8px) !important;
    bottom:calc(var(--rf-safe-bottom) + 8px) !important;
    width:auto !important;
    height:auto !important;
    max-width:none !important;
    max-height:none !important;
    transform:none !important;
    display:none !important;
    grid-template-columns:1fr !important;
    grid-template-rows:clamp(142px,25dvh,174px) minmax(0,1fr) !important;
    border-radius:24px !important;
    overflow:hidden !important;
    background:#fff !important;
    box-shadow:var(--rf-shadow-strong) !important;
    z-index:2147483001 !important;
  }
  #rc22Panel.rc22-panel.open{display:grid !important;}

  #rc22Panel .rc22-sidebar,
  #rc22Panel aside.rc22-sidebar{
    display:grid !important;
    grid-row:1 !important;
    height:100% !important;
    min-height:0 !important;
    width:100% !important;
    grid-template-rows:50px 0 minmax(0,1fr) !important;
    overflow:hidden !important;
    background:#fff !important;
    border:0 !important;
    border-bottom:1px solid #e5eaf2 !important;
  }

  #rc22Panel .rc22-head{
    height:50px !important;
    min-height:50px !important;
    padding:10px 12px 6px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    background:#fff !important;
  }
  #rc22Panel .rc22-head b{font-size:16px !important;line-height:1.05 !important;}
  #rc22Panel .rc22-head small{font-size:11px !important;line-height:1.1 !important;}

  #rc22Panel .rc22-search{display:none !important;}

  #rc22Panel .rc22-list{
    display:flex !important;
    flex-direction:row !important;
    gap:9px !important;
    padding:8px 12px 10px !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    background:#f8fafc !important;
    scroll-snap-type:x mandatory !important;
    -webkit-overflow-scrolling:touch !important;
    scrollbar-width:none !important;
  }
  #rc22Panel .rc22-list::-webkit-scrollbar{display:none !important;}

  #rc22Panel .rc22-contact{
    flex:0 0 clamp(190px,58vw,220px) !important;
    width:clamp(190px,58vw,220px) !important;
    min-width:clamp(190px,58vw,220px) !important;
    height:64px !important;
    min-height:64px !important;
    padding:9px 10px !important;
    border-radius:16px !important;
    grid-template-columns:40px minmax(0,1fr) !important;
    gap:10px !important;
    scroll-snap-align:start !important;
    background:#fff !important;
    border:1px solid #e5eaf2 !important;
    box-shadow:0 8px 18px rgba(15,23,42,.045) !important;
  }
  #rc22Panel .rc22-contact.active{
    background:#1e1b4b !important;
    color:#fff !important;
    border-color:#1e1b4b !important;
  }
  #rc22Panel .rc22-contact .rc22-avatar{
    width:40px !important;
    height:40px !important;
    border-radius:14px !important;
    font-size:12px !important;
  }
  #rc22Panel .rc22-contact-text b,
  #rc22Panel .rc22-contact-text small{
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  #rc22Panel .rc22-main{
    grid-row:2 !important;
    display:grid !important;
    grid-template-rows:64px minmax(0,1fr) auto !important;
    min-height:0 !important;
    height:100% !important;
    overflow:hidden !important;
    background:#fff !important;
    border-radius:0 !important;
    box-shadow:none !important;
  }
  #rc22Panel .rc22-thread-head{
    min-height:64px !important;
    height:64px !important;
    padding:9px 11px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:8px !important;
    border-bottom:1px solid #e5eaf2 !important;
    overflow:hidden !important;
  }
  #rc22Panel .rc22-peer{min-width:0 !important;gap:8px !important;}
  #rc22Panel .rc22-peer .rc22-avatar{
    display:grid !important;
    width:36px !important;
    height:36px !important;
    border-radius:13px !important;
    font-size:12px !important;
  }
  #rc22Panel .rc22-peer-text b,
  #rc22Panel .rc22-peer-text small{
    max-width:calc(100vw - 240px) !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
  #rc22Panel .rc22-peer-text b{font-size:14px !important;}
  #rc22Panel .rc22-peer-text small{font-size:11px !important;}

  #rc22Panel .rc22-tools{
    display:flex !important;
    flex:0 0 auto !important;
    gap:5px !important;
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    scrollbar-width:none !important;
  }
  #rc22Panel .rc22-tools::-webkit-scrollbar{display:none !important;}
  #rc22Panel .rc22-tool{
    width:34px !important;
    height:34px !important;
    min-width:34px !important;
    border-radius:12px !important;
    font-size:14px !important;
  }

  #rc22Panel .rc22-messages{
    min-height:0 !important;
    height:100% !important;
    padding:14px 12px !important;
    overflow:auto !important;
    background:#f4f8ff !important;
    gap:10px !important;
    -webkit-overflow-scrolling:touch !important;
  }
  #rc22Panel .rc22-empty{
    margin:auto !important;
    max-width:290px !important;
    padding:14px !important;
    font-size:15px !important;
    line-height:1.35 !important;
    text-align:center !important;
  }
  #rc22Panel .rc22-bubble{
    max-width:84% !important;
    padding:10px 12px !important;
    border-radius:16px 16px 16px 8px !important;
    font-size:13px !important;
    line-height:1.36 !important;
    overflow-wrap:anywhere !important;
  }
  #rc22Panel .rc22-bubble.me{
    margin-left:auto !important;
    border-radius:16px 16px 8px 16px !important;
    background:linear-gradient(135deg,#2563eb,#10b981) !important;
    color:#fff !important;
  }

  #rc22Panel .rc22-compose{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 58px !important;
    gap:8px !important;
    padding:10px 10px max(10px,var(--rf-safe-bottom)) !important;
    background:#fff !important;
    border-top:1px solid #e5eaf2 !important;
  }
  #rc22Panel .rc22-compose input{
    height:46px !important;
    min-height:46px !important;
    border-radius:16px !important;
    font-size:16px !important;
    padding:0 13px !important;
  }
  #rc22Panel .rc22-compose button{
    width:58px !important;
    min-width:58px !important;
    height:46px !important;
    min-height:46px !important;
    border-radius:16px !important;
    padding:0 !important;
    font-size:0 !important;
  }
  #rc22Panel .rc22-compose button::after{content:"➤" !important;font-size:18px !important;}
}

@media (max-width: 380px){
  #rc22Panel.rc22-panel{left:6px !important;right:6px !important;top:calc(var(--rf-safe-top) + 6px) !important;bottom:calc(var(--rf-safe-bottom) + 6px) !important;border-radius:22px !important;}
  #rc22Panel .rc22-peer-text b,
  #rc22Panel .rc22-peer-text small{max-width:calc(100vw - 222px) !important;}
  #rc22Panel .rc22-tool{width:32px !important;min-width:32px !important;height:32px !important;}
}

/* =========================================================
   VIDEO / AUDIO CALL RESPONSIVE — stage e chat sempre proporzionati
   ========================================================= */
.rc22-call.open,
#rc22Call.open,
#rc22Call.show{
  box-sizing:border-box !important;
}

#rc22Call .rc22-remote-grid,
.rc22-call .rc22-remote-grid{
  min-width:0 !important;
  min-height:0 !important;
}

@media (min-width: 901px){
  #rc22Call.open,
  #rc22Call.show,
  .rc22-call.open,
  .rc22-call.show{
    padding:14px 14px 16px !important;
  }
  #rc22Call .rc22-call-body,
  .rc22-call .rc22-call-body{
    grid-template-columns:minmax(0,1fr) minmax(300px,340px) !important;
    gap:16px !important;
  }
  #rc22Call .rc22-call-controls,
  .rc22-call .rc22-call-controls{
    display:flex !important;
    justify-content:center !important;
    gap:12px !important;
    flex-wrap:wrap !important;
  }
  #rc22Call .rc22-call-controls button,
  .rc22-call .rc22-call-controls button{
    min-width:118px !important;
  }
  #rc22Call #rc22Screen,
  .rc22-call #rc22Screen{
    min-width:170px !important;
  }
}

@media (max-width: 900px){
  html.rc22-mobile-call-open,
  body.rc22-mobile-call-open{
    overflow:hidden !important;
    height:100% !important;
  }

  #rc22Call.open,
  #rc22Call.show,
  .rc22-call.open,
  .rc22-call.show{
    position:fixed !important;
    inset:0 !important;
    width:100vw !important;
    height:100dvh !important;
    max-width:none !important;
    max-height:none !important;
    padding:0 !important;
    display:grid !important;
    grid-template-rows:auto minmax(0,1fr) auto !important;
    overflow:hidden !important;
    background:#020617 !important;
    color:#fff !important;
    z-index:2147483903 !important;
  }

  #rc22Call .rc22-call-head,
  .rc22-call .rc22-call-head{
    min-height:calc(66px + var(--rf-safe-top)) !important;
    padding:calc(8px + var(--rf-safe-top)) 10px 8px !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 48px !important;
    align-items:center !important;
    gap:9px !important;
    background:#08111f !important;
    border-bottom:1px solid rgba(148,163,184,.18) !important;
  }

  #rc22Call .rc22-call-title,
  .rc22-call .rc22-call-title{min-width:0 !important;}
  #rc22Call .rc22-call-title b,
  .rc22-call .rc22-call-title b{
    font-size:clamp(17px,4.9vw,21px) !important;
    line-height:1.08 !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }
  #rc22Call .rc22-call-title small,
  .rc22-call .rc22-call-title small{
    margin-top:4px !important;
    font-size:12px !important;
    line-height:1.18 !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }
  #rc22Call #rc22CallX,
  .rc22-call #rc22CallX{
    width:48px !important;
    height:48px !important;
    min-width:48px !important;
    border-radius:17px !important;
    display:grid !important;
    place-items:center !important;
  }

  #rc22Call .rc22-call-body,
  .rc22-call .rc22-call-body{
    min-height:0 !important;
    height:100% !important;
    width:100% !important;
    display:grid !important;
    grid-template-columns:1fr !important;
    grid-template-rows:minmax(0,1fr) clamp(176px,29dvh,250px) !important;
    gap:8px !important;
    padding:8px !important;
    overflow:hidden !important;
    background:#020617 !important;
  }

  #rc22Call .rc22-stage,
  .rc22-call .rc22-stage{
    position:relative !important;
    min-height:0 !important;
    height:100% !important;
    width:100% !important;
    border-radius:22px !important;
    overflow:hidden !important;
    background:#050a18 !important;
    border:1px solid rgba(148,163,184,.18) !important;
    display:grid !important;
    place-items:center !important;
  }

  #rc22Call .rc22-remote-grid,
  .rc22-call .rc22-remote-grid{
    position:absolute !important;
    inset:0 !important;
    display:grid !important;
    grid-template-columns:repeat(auto-fit,minmax(165px,1fr)) !important;
    gap:8px !important;
    padding:8px !important;
  }

  #rc22Call .rc22-remote-tile,
  .rc22-call .rc22-remote-tile{
    min-height:0 !important;
    border-radius:16px !important;
  }

  #rc22Call #rc22Remote,
  #rc22Call .rc22-stage video,
  .rc22-call .rc22-stage video{
    width:100% !important;
    height:100% !important;
    max-width:100% !important;
    max-height:100% !important;
    object-fit:contain !important;
    object-position:center center !important;
    background:#050a18 !important;
  }

  #rc22Call .rc22-placeholder,
  .rc22-call .rc22-placeholder{
    inset:0 !important;
    padding:20px !important;
    display:grid !important;
    place-items:center !important;
    text-align:center !important;
    color:rgba(226,232,240,.86) !important;
    font-size:15px !important;
    line-height:1.35 !important;
  }

  #rc22Call .rc22-local,
  .rc22-call .rc22-local{
    position:absolute !important;
    top:auto !important;
    right:10px !important;
    bottom:10px !important;
    transform:none !important;
    width:96px !important;
    height:126px !important;
    border-radius:18px !important;
    z-index:6 !important;
    border:2px solid rgba(255,255,255,.24) !important;
  }

  #rc22Call .rc22-live,
  .rc22-call .rc22-live{
    display:grid !important;
    grid-template-rows:auto minmax(0,1fr) auto !important;
    min-height:0 !important;
    height:100% !important;
    width:100% !important;
    overflow:hidden !important;
    border-radius:22px !important;
    background:#fff !important;
    color:#0f172a !important;
    border:1px solid rgba(226,232,240,.94) !important;
    box-shadow:0 -8px 26px rgba(0,0,0,.15) !important;
  }

  #rc22Call .rc22-live-head,
  .rc22-call .rc22-live-head{
    min-height:38px !important;
    padding:8px 12px !important;
    border-bottom:1px solid #e2e8f0 !important;
    background:#fff !important;
    color:#0f172a !important;
    font-size:14px !important;
    font-weight:950 !important;
  }

  #rc22Call .rc22-live-list,
  #rc22Call #rc22LiveList,
  .rc22-call .rc22-live-list{
    min-height:0 !important;
    height:100% !important;
    overflow:auto !important;
    padding:8px 10px !important;
    display:flex !important;
    flex-direction:column !important;
    gap:7px !important;
    background:#f8fbff !important;
    -webkit-overflow-scrolling:touch !important;
  }

  #rc22Call .rc22-live-msg,
  .rc22-call .rc22-live-msg,
  #rc22Call #rc22LiveList .rc22-empty{
    max-width:90% !important;
    width:max-content !important;
    padding:8px 10px !important;
    border-radius:14px !important;
    font-size:13px !important;
    line-height:1.3 !important;
    word-break:break-word !important;
    overflow-wrap:anywhere !important;
  }
  #rc22Call .rc22-live-msg.me,
  .rc22-call .rc22-live-msg.me{
    align-self:flex-end !important;
    background:#2563eb !important;
    border-color:#2563eb !important;
    color:#fff !important;
  }

  #rc22Call .rc22-live-compose,
  #rc22Call #rc22LiveForm,
  .rc22-call .rc22-live-compose{
    min-height:52px !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 56px !important;
    align-items:center !important;
    gap:8px !important;
    padding:7px 9px !important;
    border-top:1px solid #e2e8f0 !important;
    background:#fff !important;
  }
  #rc22Call #rc22LiveInput,
  .rc22-call .rc22-live-compose input{
    width:100% !important;
    min-width:0 !important;
    height:40px !important;
    border-radius:14px !important;
    padding:0 11px !important;
    font-size:16px !important;
    border:1px solid #cbd5e1 !important;
    background:#fff !important;
  }
  #rc22Call #rc22LiveForm button,
  .rc22-call .rc22-live-compose button{
    width:56px !important;
    height:40px !important;
    min-width:56px !important;
    border-radius:14px !important;
    padding:0 !important;
    font-size:12px !important;
    font-weight:950 !important;
  }

  #rc22Call .rc22-call-controls,
  .rc22-call .rc22-call-controls{
    min-height:calc(74px + var(--rf-safe-bottom)) !important;
    padding:9px 8px calc(9px + var(--rf-safe-bottom)) !important;
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    align-items:center !important;
    gap:8px !important;
    overflow:visible !important;
    background:#08111f !important;
    border-top:1px solid rgba(148,163,184,.18) !important;
  }
  #rc22Call .rc22-call-controls button,
  .rc22-call .rc22-call-controls button{
    min-width:0 !important;
    width:100% !important;
    height:52px !important;
    min-height:52px !important;
    border-radius:17px !important;
    padding:0 4px !important;
    font-size:clamp(10px,2.7vw,13px) !important;
    font-weight:950 !important;
    white-space:normal !important;
    line-height:1.05 !important;
  }
}

@media (max-width: 520px){
  #rc22Call .rc22-call-body,
  .rc22-call .rc22-call-body{
    grid-template-rows:minmax(0,1fr) clamp(158px,26dvh,220px) !important;
    gap:7px !important;
    padding:7px !important;
  }

  #rc22Call .rc22-call-controls,
  .rc22-call .rc22-call-controls{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    min-height:calc(126px + var(--rf-safe-bottom)) !important;
    gap:7px !important;
    padding:7px 8px calc(8px + var(--rf-safe-bottom)) !important;
  }
  #rc22Call .rc22-call-controls button,
  .rc22-call .rc22-call-controls button{
    height:54px !important;
    min-height:54px !important;
    font-size:13px !important;
  }

  #rc22Call .rc22-local,
  .rc22-call .rc22-local{
    width:86px !important;
    height:112px !important;
    right:9px !important;
    bottom:9px !important;
  }
}

@media (max-height: 720px) and (max-width: 900px){
  #rc22Call .rc22-call-head,
  .rc22-call .rc22-call-head{
    min-height:calc(58px + var(--rf-safe-top)) !important;
  }
  #rc22Call .rc22-call-body,
  .rc22-call .rc22-call-body{
    grid-template-rows:minmax(0,1fr) clamp(140px,24dvh,190px) !important;
  }
  #rc22Call .rc22-live-head,
  .rc22-call .rc22-live-head{
    min-height:32px !important;
    padding:6px 10px !important;
  }
  #rc22Call .rc22-live-compose,
  #rc22Call #rc22LiveForm,
  .rc22-call .rc22-live-compose{
    min-height:46px !important;
    padding:5px 8px !important;
  }
  #rc22Call #rc22LiveInput,
  #rc22Call #rc22LiveForm button,
  .rc22-call .rc22-live-compose input,
  .rc22-call .rc22-live-compose button{
    height:36px !important;
  }
}

/* Screen share: sempre a tutto campo, con PiP e chat proporzionata anche su smartphone. */
.rc22-call.screen-present .rc22-stage,
.rc22-call.screen-sharing .rc22-stage,
#rc22Call.screen-present .rc22-stage,
#rc22Call.screen-sharing .rc22-stage{
  background:#020617 !important;
}

.rc22-call.screen-present .rc22-remote-grid,
.rc22-call.screen-sharing .rc22-remote-grid,
#rc22Call.screen-present .rc22-remote-grid,
#rc22Call.screen-sharing .rc22-remote-grid{
  display:block !important;
  padding:0 !important;
  inset:0 !important;
  background:#020617 !important;
}

.rc22-call.screen-present .rc22-remote-tile.screen-share,
.rc22-call.screen-sharing .rc22-remote-tile.screen-share,
#rc22Call.screen-present .rc22-remote-tile.screen-share,
#rc22Call.screen-sharing .rc22-remote-tile.screen-share{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  min-height:0 !important;
  border-radius:22px !important;
  border:0 !important;
  box-shadow:none !important;
  z-index:2 !important;
  background:#020617 !important;
}

.rc22-call.screen-present .rc22-remote-tile.screen-share video,
.rc22-call.screen-sharing .rc22-remote-tile.screen-share video,
#rc22Call.screen-present .rc22-remote-tile.screen-share video,
#rc22Call.screen-sharing .rc22-remote-tile.screen-share video{
  object-fit:contain !important;
  background:#020617 !important;
}

@media (max-width: 640px){
  .rc22-call.screen-present .rc22-remote-tile:not(.screen-share),
  .rc22-call.screen-sharing .rc22-remote-tile:not(.screen-share),
  .rc22-call.screen-present .rc22-local,
  .rc22-call.screen-sharing .rc22-local,
  #rc22Call.screen-present .rc22-remote-tile:not(.screen-share),
  #rc22Call.screen-sharing .rc22-remote-tile:not(.screen-share),
  #rc22Call.screen-present .rc22-local,
  #rc22Call.screen-sharing .rc22-local{
    width:92px !important;
    height:58px !important;
    right:9px !important;
    bottom:9px !important;
    border-radius:13px !important;
  }
}

/* =========================================================
   RABBIT RESPONSIVE FAITHFUL V2 PATCH
   Correzioni richieste:
   - Home mobile di nuovo fedele alla versione PC: colori, KPI, hero e card non anonime
   - Chat mobile: torna la scelta contatto, spazi giustificati, conversazione/input proporzionati
   ========================================================= */

@media (max-width: 820px){
  /* Il mobile-lite non deve appiattire la Home professionale */
  body.rabbit-mobile-lite .main,
  body.rabbit-mobile-lite #home.view{
    background-color:#f8fafc !important;
    background-image:
      linear-gradient(to right, rgba(99,102,241,.028) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(99,102,241,.028) 1px, transparent 1px) !important;
    background-size:44px 44px !important;
  }

  body.rabbit-mobile-lite #home .command-center,
  body.rabbit-mobile-lite #home .command-center.rabbit-pro-command,
  body.rabbit-mobile-lite #home .rabbit-pro-command{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:14px !important;
    width:100% !important;
    padding:0 !important;
    margin:0 0 18px !important;
    background:transparent !important;
    box-shadow:none !important;
    border:0 !important;
  }

  body.rabbit-mobile-lite #home .command-panel,
  body.rabbit-mobile-lite #home .rabbit-pro-hero,
  body.rabbit-mobile-lite #home .command-panel.rabbit-pro-hero{
    display:flex !important;
    min-height:220px !important;
    padding:22px !important;
    border-radius:26px !important;
    overflow:hidden !important;
    background-image:var(--rhc114-overlay, linear-gradient(135deg,rgba(4,12,24,.72),rgba(15,23,42,.42))), var(--rhc-bg, linear-gradient(135deg,#0f172a,#0f766e)) !important;
    background-size:cover !important;
    background-position:center !important;
    box-shadow:0 20px 44px rgba(15,23,42,.18) !important;
    color:#fff !important;
  }

  body.rabbit-mobile-lite #home .rabbit-pro-hero::before,
  body.rabbit-mobile-lite #home .command-panel::before{
    display:block !important;
  }

  body.rabbit-mobile-lite #home .rabbit-pro-hero h1,
  body.rabbit-mobile-lite #home .command-title,
  body.rabbit-mobile-lite #home .rabbit-pro-hero h1 span,
  body.rabbit-mobile-lite #home .command-title span{
    color:#fff !important;
    font-size:clamp(27px,7.2vw,35px) !important;
    line-height:1.05 !important;
    letter-spacing:-.055em !important;
    text-align:left !important;
    opacity:1 !important;
    visibility:visible !important;
  }

  body.rabbit-mobile-lite #home .rabbit-pro-hero p,
  body.rabbit-mobile-lite #home .command-subtitle,
  body.rabbit-mobile-lite #home .rabbit-pro-hero .muted{
    display:block !important;
    color:rgba(226,232,240,.82) !important;
    font-size:12.5px !important;
    line-height:1.35 !important;
    opacity:1 !important;
  }

  body.rabbit-mobile-lite #home .rabbit-mobile-hero-actions,
  body.rabbit-mobile-lite #home .rabbit-pro-hero-actions,
  body.rabbit-mobile-lite #home .hero-actions{
    display:flex !important;
    flex-wrap:nowrap !important;
    gap:9px !important;
    overflow-x:auto !important;
    padding-bottom:2px !important;
    scrollbar-width:none !important;
  }
  body.rabbit-mobile-lite #home .rabbit-mobile-hero-actions::-webkit-scrollbar,
  body.rabbit-mobile-lite #home .rabbit-pro-hero-actions::-webkit-scrollbar,
  body.rabbit-mobile-lite #home .hero-actions::-webkit-scrollbar{display:none !important;}

  body.rabbit-mobile-lite #home .rabbit-mobile-hero-actions button,
  body.rabbit-mobile-lite #home .rabbit-pro-hero-actions button,
  body.rabbit-mobile-lite #home .hero-actions button{
    flex:0 0 auto !important;
    min-width:112px !important;
    height:42px !important;
    min-height:42px !important;
    padding:0 14px !important;
    border-radius:14px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    color:#fff !important;
    background:rgba(255,255,255,.16) !important;
    border:1px solid rgba(255,255,255,.24) !important;
    font-size:13px !important;
    font-weight:900 !important;
    white-space:nowrap !important;
  }
  body.rabbit-mobile-lite #home .rabbit-mobile-hero-actions button.active,
  body.rabbit-mobile-lite #home .rabbit-pro-hero-actions button.active,
  body.rabbit-mobile-lite #home .hero-actions button.primary{
    background:linear-gradient(135deg,#2563eb,#0f9aa8) !important;
    box-shadow:0 12px 24px rgba(37,99,235,.22) !important;
  }

  body.rabbit-mobile-lite #home .rabbit-pro-pulse,
  body.rabbit-mobile-lite #home .command-center > .card.rabbit-pro-pulse{
    display:block !important;
    padding:16px !important;
    border-radius:24px !important;
    background:#fff !important;
    border:1px solid #e2eaf3 !important;
    box-shadow:0 16px 34px rgba(15,23,42,.075) !important;
  }

  body.rabbit-mobile-lite #home .rabbit-pro-pulse h3,
  body.rabbit-mobile-lite #home .command-center > .card.rabbit-pro-pulse h3{
    display:block !important;
    margin:0 0 12px !important;
    color:#0f172a !important;
    font-size:15px !important;
    font-weight:950 !important;
  }

  body.rabbit-mobile-lite #home .pulse-strip,
  body.rabbit-mobile-lite #home .rabbit-pro-kpis{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
  }

  body.rabbit-mobile-lite #home .pulse-card{
    min-height:86px !important;
    border-radius:18px !important;
    padding:14px 38px 12px 14px !important;
    color:#fff !important;
    box-shadow:0 12px 26px rgba(15,23,42,.12) !important;
  }
  body.rabbit-mobile-lite #home .pulse-card:nth-child(1){background:#10b981 !important;}
  body.rabbit-mobile-lite #home .pulse-card:nth-child(2){background:linear-gradient(135deg,#ff9800,#ff5722) !important;}
  body.rabbit-mobile-lite #home .pulse-card:nth-child(3){background:#2563eb !important;}
  body.rabbit-mobile-lite #home .pulse-card:nth-child(4){background:#fef08a !important;color:#0f172a !important;}
  body.rabbit-mobile-lite #home .pulse-card b{font-size:27px !important;color:inherit !important;}
  body.rabbit-mobile-lite #home .pulse-card span,
  body.rabbit-mobile-lite #home .pulse-card .muted{font-size:12px !important;margin-top:5px !important;color:inherit !important;opacity:.9 !important;}

  body.rabbit-mobile-lite #home .home-launcher-shell,
  body.rabbit-mobile-lite #home .rabbit-pro-modules{
    padding:18px !important;
    border-radius:28px !important;
    background:rgba(255,255,255,.96) !important;
    border:1px solid #e2eaf3 !important;
    box-shadow:0 18px 42px rgba(15,23,42,.075) !important;
  }

  body.rabbit-mobile-lite #home .home-launcher-head h3{
    display:block !important;
    color:#0f172a !important;
    font-size:clamp(25px,7vw,34px) !important;
    line-height:1.05 !important;
    letter-spacing:-.055em !important;
    font-weight:950 !important;
    margin:0 0 8px !important;
  }

  body.rabbit-mobile-lite #home .rabbit-module-groups{gap:24px !important;}
  body.rabbit-mobile-lite #home .rabbit-module-group h4{
    color:#64748b !important;
    font-size:12px !important;
    letter-spacing:.08em !important;
    font-weight:950 !important;
    margin:0 0 12px !important;
  }

  body.rabbit-mobile-lite #home .home-launcher-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
  }

  body.rabbit-mobile-lite #home .launch-card,
  body.rabbit-mobile-lite #home .rabbit-pro-module-card{
    min-height:124px !important;
    max-height:124px !important;
    padding:14px !important;
    border-radius:20px !important;
    display:grid !important;
    grid-template-columns:42px minmax(0,1fr) 18px !important;
    grid-template-rows:auto 1fr !important;
    gap:11px !important;
    background:#fff !important;
    border:1px solid #e5edf6 !important;
    box-shadow:0 12px 26px rgba(15,23,42,.06) !important;
    overflow:hidden !important;
  }

  body.rabbit-mobile-lite #home .launch-icon{
    grid-column:1 !important;
    grid-row:1 / span 2 !important;
    width:42px !important;
    height:42px !important;
    border-radius:15px !important;
    display:grid !important;
    place-items:center !important;
    flex:0 0 auto !important;
  }
  body.rabbit-mobile-lite #home .launch-icon svg{width:21px !important;height:21px !important;stroke-width:2.15 !important;}

  body.rabbit-mobile-lite #home .rabbit-module-group:nth-child(1) .launch-icon{background:#dcfce7 !important;color:#15803d !important;border:1px solid #bbf7d0 !important;}
  body.rabbit-mobile-lite #home .rabbit-module-group:nth-child(2) .launch-icon{background:#fef9c3 !important;color:#854d0e !important;border:1px solid #fef08a !important;}
  body.rabbit-mobile-lite #home .rabbit-module-group:nth-child(3) .launch-icon{background:#f3e8ff !important;color:#7e22ce !important;border:1px solid #e9d5ff !important;}
  body.rabbit-mobile-lite #home .rabbit-module-group:nth-child(4) .launch-icon{background:#e0f2fe !important;color:#075985 !important;border:1px solid #bae6fd !important;}

  body.rabbit-mobile-lite #home .rabbit-module-text{
    grid-column:2 !important;
    grid-row:1 / span 2 !important;
    min-width:0 !important;
    display:flex !important;
    flex-direction:column !important;
    gap:6px !important;
    justify-content:flex-start !important;
  }

  body.rabbit-mobile-lite #home .launch-title,
  body.rabbit-mobile-lite #home .rabbit-pro-module-card .launch-title{
    display:block !important;
    color:#0f172a !important;
    font-size:15px !important;
    line-height:1.16 !important;
    font-weight:950 !important;
    letter-spacing:-.02em !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  body.rabbit-mobile-lite #home .launch-desc,
  body.rabbit-mobile-lite #home .rabbit-pro-module-card .launch-desc{
    display:-webkit-box !important;
    -webkit-line-clamp:2 !important;
    -webkit-box-orient:vertical !important;
    overflow:hidden !important;
    color:#64748b !important;
    font-size:11px !important;
    line-height:1.28 !important;
    font-weight:650 !important;
    opacity:1 !important;
    visibility:visible !important;
  }

  body.rabbit-mobile-lite #home .launch-arrow{
    grid-column:3 !important;
    grid-row:2 !important;
    align-self:end !important;
    justify-self:end !important;
    color:#0f5f92 !important;
    font-size:18px !important;
    opacity:.9 !important;
  }
}

@media (max-width: 390px){
  body.rabbit-mobile-lite #home .home-launcher-shell,
  body.rabbit-mobile-lite #home .rabbit-pro-modules{padding:14px !important;border-radius:24px !important;}
  body.rabbit-mobile-lite #home .home-launcher-grid{gap:10px !important;}
  body.rabbit-mobile-lite #home .launch-card,
  body.rabbit-mobile-lite #home .rabbit-pro-module-card{
    min-height:116px !important;
    max-height:116px !important;
    padding:12px !important;
    grid-template-columns:38px minmax(0,1fr) 16px !important;
    gap:9px !important;
  }
  body.rabbit-mobile-lite #home .launch-icon{width:38px !important;height:38px !important;border-radius:14px !important;}
  body.rabbit-mobile-lite #home .launch-title{font-size:14px !important;}
  body.rabbit-mobile-lite #home .launch-desc{font-size:10.5px !important;}
}

/* CHAT V2: su mobile la lista contatti resta sempre disponibile, sopra la conversazione. */
@media (max-width: 700px){
  body.rabbit-mobile-lite #rc22Panel.rc22-panel,
  #rc22Panel.rc22-panel{
    position:fixed !important;
    left:10px !important;
    right:10px !important;
    top:calc(var(--rf-safe-top) + 10px) !important;
    bottom:calc(var(--rf-safe-bottom) + 10px) !important;
    width:auto !important;
    height:auto !important;
    max-width:none !important;
    max-height:none !important;
    transform:none !important;
    display:none !important;
    grid-template-columns:1fr !important;
    grid-template-rows:196px minmax(0,1fr) !important;
    border-radius:26px !important;
    overflow:hidden !important;
    background:#fff !important;
    box-shadow:0 34px 90px rgba(15,23,42,.24),0 14px 34px rgba(15,23,42,.12) !important;
    z-index:2147483001 !important;
  }

  body.rabbit-mobile-lite #rc22Panel.rc22-panel.open,
  #rc22Panel.rc22-panel.open{display:grid !important;}

  body.rabbit-mobile-lite #rc22Panel .rc22-sidebar,
  body.rabbit-mobile-lite #rc22Panel aside.rc22-sidebar,
  #rc22Panel .rc22-sidebar,
  #rc22Panel aside.rc22-sidebar{
    display:grid !important;
    grid-row:1 !important;
    grid-template-rows:52px 44px minmax(0,1fr) !important;
    width:100% !important;
    height:196px !important;
    min-height:196px !important;
    max-height:196px !important;
    overflow:hidden !important;
    background:linear-gradient(180deg,#ffffff,#f8fbff) !important;
    border:0 !important;
    border-bottom:1px solid #e2e8f0 !important;
    visibility:visible !important;
    opacity:1 !important;
  }

  body.rabbit-mobile-lite #rc22Panel .rc22-head,
  #rc22Panel .rc22-head{
    display:flex !important;
    height:52px !important;
    min-height:52px !important;
    padding:10px 12px 6px !important;
    align-items:center !important;
    justify-content:space-between !important;
    background:transparent !important;
    border:0 !important;
  }
  body.rabbit-mobile-lite #rc22Panel .rc22-head b,
  #rc22Panel .rc22-head b{display:block !important;color:#0f172a !important;font-size:16px !important;line-height:1.05 !important;font-weight:950 !important;}
  body.rabbit-mobile-lite #rc22Panel .rc22-head small,
  #rc22Panel .rc22-head small{display:block !important;color:#64748b !important;font-size:11px !important;line-height:1.1 !important;font-weight:700 !important;}
  body.rabbit-mobile-lite #rc22Panel .rc22-close,
  #rc22Panel .rc22-close{width:36px !important;height:36px !important;min-width:36px !important;border-radius:14px !important;}

  body.rabbit-mobile-lite #rc22Panel .rc22-search,
  #rc22Panel .rc22-search{
    display:block !important;
    height:44px !important;
    min-height:44px !important;
    padding:0 12px !important;
    background:transparent !important;
  }
  body.rabbit-mobile-lite #rc22Panel .rc22-search input,
  #rc22Panel .rc22-search input{
    width:100% !important;
    height:40px !important;
    min-height:40px !important;
    border-radius:16px !important;
    border:1px solid #dbe4ee !important;
    background:#fff !important;
    color:#0f172a !important;
    font-size:14px !important;
    padding:0 13px !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.9) !important;
  }

  body.rabbit-mobile-lite #rc22Panel .rc22-list,
  #rc22Panel .rc22-list{
    display:flex !important;
    flex-direction:row !important;
    align-items:stretch !important;
    gap:10px !important;
    padding:9px 12px 12px !important;
    min-height:0 !important;
    height:100% !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    background:transparent !important;
    scroll-snap-type:x mandatory !important;
    -webkit-overflow-scrolling:touch !important;
    scrollbar-width:none !important;
    visibility:visible !important;
    opacity:1 !important;
  }
  body.rabbit-mobile-lite #rc22Panel .rc22-list::-webkit-scrollbar,
  #rc22Panel .rc22-list::-webkit-scrollbar{display:none !important;}

  body.rabbit-mobile-lite #rc22Panel .rc22-contact,
  #rc22Panel .rc22-contact{
    flex:0 0 220px !important;
    width:220px !important;
    min-width:220px !important;
    height:74px !important;
    min-height:74px !important;
    padding:10px !important;
    border-radius:18px !important;
    display:grid !important;
    grid-template-columns:44px minmax(0,1fr) !important;
    gap:10px !important;
    align-items:center !important;
    scroll-snap-align:start !important;
    background:#fff !important;
    border:1px solid #e5eaf2 !important;
    box-shadow:0 8px 18px rgba(15,23,42,.05) !important;
    color:#0f172a !important;
  }
  body.rabbit-mobile-lite #rc22Panel .rc22-contact.active,
  #rc22Panel .rc22-contact.active{
    background:#1e1b4b !important;
    border-color:#1e1b4b !important;
    color:#fff !important;
    box-shadow:0 14px 28px rgba(30,27,75,.24) !important;
  }
  body.rabbit-mobile-lite #rc22Panel .rc22-contact .rc22-avatar,
  #rc22Panel .rc22-contact .rc22-avatar{
    width:44px !important;
    height:44px !important;
    border-radius:16px !important;
    font-size:12px !important;
  }
  body.rabbit-mobile-lite #rc22Panel .rc22-contact-text,
  #rc22Panel .rc22-contact-text{display:block !important;min-width:0 !important;}
  body.rabbit-mobile-lite #rc22Panel .rc22-contact-text b,
  body.rabbit-mobile-lite #rc22Panel .rc22-contact-text small,
  #rc22Panel .rc22-contact-text b,
  #rc22Panel .rc22-contact-text small{
    display:block !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
  body.rabbit-mobile-lite #rc22Panel .rc22-contact-text b,
  #rc22Panel .rc22-contact-text b{font-size:13px !important;font-weight:950 !important;line-height:1.12 !important;}
  body.rabbit-mobile-lite #rc22Panel .rc22-contact-text small,
  #rc22Panel .rc22-contact-text small{font-size:11px !important;margin-top:4px !important;color:#64748b !important;}
  body.rabbit-mobile-lite #rc22Panel .rc22-contact.active .rc22-contact-text small,
  #rc22Panel .rc22-contact.active .rc22-contact-text small{color:#cbd5e1 !important;}

  body.rabbit-mobile-lite #rc22Panel .rc22-main,
  #rc22Panel .rc22-main{
    grid-row:2 !important;
    display:grid !important;
    grid-template-rows:64px minmax(0,1fr) auto !important;
    height:100% !important;
    min-height:0 !important;
    min-width:0 !important;
    overflow:hidden !important;
    background:#fff !important;
    border-radius:0 !important;
    box-shadow:none !important;
  }

  body.rabbit-mobile-lite #rc22Panel .rc22-thread-head,
  #rc22Panel .rc22-thread-head{
    height:64px !important;
    min-height:64px !important;
    padding:9px 11px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:8px !important;
    border-bottom:1px solid #e5eaf2 !important;
    background:#fff !important;
    overflow:hidden !important;
  }
  body.rabbit-mobile-lite #rc22Panel .rc22-peer,
  #rc22Panel .rc22-peer{min-width:0 !important;display:flex !important;align-items:center !important;gap:8px !important;}
  body.rabbit-mobile-lite #rc22Panel .rc22-peer .rc22-avatar,
  #rc22Panel .rc22-peer .rc22-avatar{width:36px !important;height:36px !important;min-width:36px !important;border-radius:13px !important;font-size:12px !important;}
  body.rabbit-mobile-lite #rc22Panel .rc22-peer-text,
  #rc22Panel .rc22-peer-text{min-width:0 !important;}
  body.rabbit-mobile-lite #rc22Panel .rc22-peer-text b,
  body.rabbit-mobile-lite #rc22Panel .rc22-peer-text small,
  #rc22Panel .rc22-peer-text b,
  #rc22Panel .rc22-peer-text small{
    display:block !important;
    max-width:calc(100vw - 232px) !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
  body.rabbit-mobile-lite #rc22Panel .rc22-peer-text b,
  #rc22Panel .rc22-peer-text b{font-size:14px !important;color:#0f172a !important;font-weight:950 !important;}
  body.rabbit-mobile-lite #rc22Panel .rc22-peer-text small,
  #rc22Panel .rc22-peer-text small{font-size:11px !important;color:#64748b !important;font-weight:700 !important;}

  body.rabbit-mobile-lite #rc22Panel .rc22-tools,
  #rc22Panel .rc22-tools{
    display:flex !important;
    flex:0 0 auto !important;
    gap:5px !important;
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    scrollbar-width:none !important;
  }
  body.rabbit-mobile-lite #rc22Panel .rc22-tools::-webkit-scrollbar,
  #rc22Panel .rc22-tools::-webkit-scrollbar{display:none !important;}
  body.rabbit-mobile-lite #rc22Panel .rc22-tool,
  #rc22Panel .rc22-tool{
    width:34px !important;
    height:34px !important;
    min-width:34px !important;
    border-radius:12px !important;
    font-size:14px !important;
  }

  body.rabbit-mobile-lite #rc22Panel .rc22-messages,
  #rc22Panel .rc22-messages{
    min-height:0 !important;
    height:100% !important;
    padding:14px 12px !important;
    overflow:auto !important;
    background:#f4f8ff !important;
    display:flex !important;
    flex-direction:column !important;
    gap:10px !important;
    -webkit-overflow-scrolling:touch !important;
  }
  body.rabbit-mobile-lite #rc22Panel .rc22-empty,
  #rc22Panel .rc22-empty{
    margin:auto !important;
    max-width:290px !important;
    padding:14px !important;
    font-size:14px !important;
    line-height:1.35 !important;
    text-align:center !important;
    color:#64748b !important;
  }
  body.rabbit-mobile-lite #rc22Panel .rc22-bubble,
  #rc22Panel .rc22-bubble{
    max-width:84% !important;
    padding:10px 12px !important;
    border-radius:16px 16px 16px 8px !important;
    font-size:13px !important;
    line-height:1.36 !important;
    overflow-wrap:anywhere !important;
  }
  body.rabbit-mobile-lite #rc22Panel .rc22-bubble.me,
  #rc22Panel .rc22-bubble.me{
    margin-left:auto !important;
    border-radius:16px 16px 8px 16px !important;
    background:linear-gradient(135deg,#2563eb,#10b981) !important;
    color:#fff !important;
  }

  body.rabbit-mobile-lite #rc22Panel .rc22-compose,
  #rc22Panel .rc22-compose{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 72px !important;
    gap:8px !important;
    padding:10px 10px max(10px,var(--rf-safe-bottom)) !important;
    background:#fff !important;
    border-top:1px solid #e5eaf2 !important;
  }
  body.rabbit-mobile-lite #rc22Panel .rc22-compose input,
  #rc22Panel .rc22-compose input{
    width:100% !important;
    height:46px !important;
    min-height:46px !important;
    border-radius:16px !important;
    font-size:16px !important;
    padding:0 13px !important;
    border:1px solid #cbd5e1 !important;
    background:#fff !important;
    color:#0f172a !important;
  }
  body.rabbit-mobile-lite #rc22Panel .rc22-compose button,
  #rc22Panel .rc22-compose button{
    width:72px !important;
    min-width:72px !important;
    height:46px !important;
    min-height:46px !important;
    border-radius:16px !important;
    padding:0 !important;
    font-size:13px !important;
    font-weight:950 !important;
  }
  body.rabbit-mobile-lite #rc22Panel .rc22-compose button::after,
  #rc22Panel .rc22-compose button::after{content:none !important;}

  body.rabbit-mobile-lite #rc22Panel .rc22-info,
  #rc22Panel .rc22-info{display:none !important;}
}

@media (max-width: 390px){
  body.rabbit-mobile-lite #rc22Panel.rc22-panel,
  #rc22Panel.rc22-panel{
    left:7px !important;right:7px !important;top:calc(var(--rf-safe-top) + 7px) !important;bottom:calc(var(--rf-safe-bottom) + 7px) !important;
    border-radius:24px !important;
    grid-template-rows:186px minmax(0,1fr) !important;
  }
  body.rabbit-mobile-lite #rc22Panel .rc22-sidebar,
  #rc22Panel .rc22-sidebar{height:186px !important;min-height:186px !important;max-height:186px !important;}
  body.rabbit-mobile-lite #rc22Panel .rc22-contact,
  #rc22Panel .rc22-contact{flex-basis:204px !important;width:204px !important;min-width:204px !important;}
  body.rabbit-mobile-lite #rc22Panel .rc22-peer-text b,
  body.rabbit-mobile-lite #rc22Panel .rc22-peer-text small,
  #rc22Panel .rc22-peer-text b,
  #rc22Panel .rc22-peer-text small{max-width:calc(100vw - 218px) !important;}
  body.rabbit-mobile-lite #rc22Panel .rc22-compose{grid-template-columns:minmax(0,1fr) 62px !important;}
  body.rabbit-mobile-lite #rc22Panel .rc22-compose button{width:62px !important;min-width:62px !important;font-size:12px !important;}
}

/* =========================================================
   RABBIT RESPONSIVE FAITHFUL V3
   Correzione reale floating chat mobile:
   - mantiene visibile “Chat aziendale” + ricerca + lista contatti
   - mantiene visibile “Contatti attivi” sotto la conversazione
   - non schiaccia input e messaggi
   - sovrascrive le vecchie regole che nascondevano .rc22-info
   ========================================================= */
@media (max-width: 700px){
  #rc22Panel.rc22-panel,
  body.rabbit-mobile-lite #rc22Panel.rc22-panel{
    position:fixed !important;
    left:10px !important;
    right:10px !important;
    top:calc(var(--rf-safe-top) + 10px) !important;
    bottom:calc(var(--rf-safe-bottom) + 10px) !important;
    width:auto !important;
    height:auto !important;
    max-width:none !important;
    max-height:none !important;
    display:none !important;
    grid-template-columns:1fr !important;
    grid-template-rows:204px minmax(0,1fr) 118px !important;
    border-radius:26px !important;
    overflow:hidden !important;
    background:#ffffff !important;
    box-shadow:0 34px 90px rgba(15,23,42,.24),0 14px 34px rgba(15,23,42,.12) !important;
    transform:none !important;
  }

  #rc22Panel.rc22-panel.open,
  body.rabbit-mobile-lite #rc22Panel.rc22-panel.open{
    display:grid !important;
  }

  /* Riga 1: area Chat aziendale + ricerca + scelta contatto */
  #rc22Panel .rc22-sidebar,
  #rc22Panel aside.rc22-sidebar,
  body.rabbit-mobile-lite #rc22Panel .rc22-sidebar,
  body.rabbit-mobile-lite #rc22Panel aside.rc22-sidebar{
    grid-row:1 !important;
    display:grid !important;
    grid-template-rows:54px 44px minmax(0,1fr) !important;
    width:100% !important;
    height:204px !important;
    min-height:204px !important;
    max-height:204px !important;
    min-width:0 !important;
    overflow:hidden !important;
    visibility:visible !important;
    opacity:1 !important;
    background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%) !important;
    border:0 !important;
    border-bottom:1px solid #e2e8f0 !important;
  }

  #rc22Panel .rc22-head,
  body.rabbit-mobile-lite #rc22Panel .rc22-head{
    height:54px !important;
    min-height:54px !important;
    padding:10px 12px 6px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    background:transparent !important;
    border:0 !important;
  }
  #rc22Panel .rc22-head b,
  body.rabbit-mobile-lite #rc22Panel .rc22-head b{
    display:block !important;
    color:#0f172a !important;
    font-size:16px !important;
    line-height:1.05 !important;
    font-weight:950 !important;
  }
  #rc22Panel .rc22-head small,
  body.rabbit-mobile-lite #rc22Panel .rc22-head small{
    display:block !important;
    color:#64748b !important;
    font-size:11px !important;
    line-height:1.12 !important;
    font-weight:700 !important;
  }
  #rc22Panel .rc22-close,
  body.rabbit-mobile-lite #rc22Panel .rc22-close{
    width:38px !important;
    height:38px !important;
    min-width:38px !important;
    border-radius:14px !important;
  }

  #rc22Panel .rc22-search,
  body.rabbit-mobile-lite #rc22Panel .rc22-search{
    display:block !important;
    height:44px !important;
    min-height:44px !important;
    padding:0 12px !important;
    border:0 !important;
    background:transparent !important;
  }
  #rc22Panel .rc22-search input,
  body.rabbit-mobile-lite #rc22Panel .rc22-search input{
    width:100% !important;
    height:40px !important;
    min-height:40px !important;
    border-radius:16px !important;
    border:1px solid #dbe4ee !important;
    background:#ffffff !important;
    color:#0f172a !important;
    font-size:14px !important;
    padding:0 13px !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.9) !important;
  }

  #rc22Panel .rc22-list,
  body.rabbit-mobile-lite #rc22Panel .rc22-list{
    display:flex !important;
    flex-direction:row !important;
    align-items:stretch !important;
    gap:10px !important;
    padding:9px 12px 12px !important;
    min-height:0 !important;
    height:100% !important;
    max-height:none !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    background:transparent !important;
    scroll-snap-type:x mandatory !important;
    -webkit-overflow-scrolling:touch !important;
    scrollbar-width:none !important;
    visibility:visible !important;
    opacity:1 !important;
  }
  #rc22Panel .rc22-list::-webkit-scrollbar,
  body.rabbit-mobile-lite #rc22Panel .rc22-list::-webkit-scrollbar{display:none !important;}

  #rc22Panel .rc22-contact,
  body.rabbit-mobile-lite #rc22Panel .rc22-contact{
    flex:0 0 220px !important;
    width:220px !important;
    min-width:220px !important;
    height:76px !important;
    min-height:76px !important;
    padding:10px !important;
    border-radius:18px !important;
    display:grid !important;
    grid-template-columns:44px minmax(0,1fr) !important;
    gap:10px !important;
    align-items:center !important;
    scroll-snap-align:start !important;
    background:#fff !important;
    border:1px solid #e5eaf2 !important;
    box-shadow:0 8px 18px rgba(15,23,42,.05) !important;
    color:#0f172a !important;
    text-align:left !important;
  }
  #rc22Panel .rc22-contact.active,
  body.rabbit-mobile-lite #rc22Panel .rc22-contact.active{
    background:#1e1b4b !important;
    border-color:#1e1b4b !important;
    color:#fff !important;
    box-shadow:0 14px 28px rgba(30,27,75,.24) !important;
  }
  #rc22Panel .rc22-contact .rc22-avatar,
  body.rabbit-mobile-lite #rc22Panel .rc22-contact .rc22-avatar{
    width:44px !important;
    height:44px !important;
    border-radius:16px !important;
    font-size:12px !important;
  }
  #rc22Panel .rc22-contact-text,
  body.rabbit-mobile-lite #rc22Panel .rc22-contact-text{display:block !important;min-width:0 !important;}
  #rc22Panel .rc22-contact-text b,
  #rc22Panel .rc22-contact-text small,
  body.rabbit-mobile-lite #rc22Panel .rc22-contact-text b,
  body.rabbit-mobile-lite #rc22Panel .rc22-contact-text small{
    display:block !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
  #rc22Panel .rc22-contact-text b,
  body.rabbit-mobile-lite #rc22Panel .rc22-contact-text b{
    font-size:13px !important;
    font-weight:950 !important;
    line-height:1.12 !important;
  }
  #rc22Panel .rc22-contact-text small,
  body.rabbit-mobile-lite #rc22Panel .rc22-contact-text small{
    font-size:11px !important;
    margin-top:4px !important;
    color:#64748b !important;
  }
  #rc22Panel .rc22-contact.active .rc22-contact-text small,
  body.rabbit-mobile-lite #rc22Panel .rc22-contact.active .rc22-contact-text small{color:#cbd5e1 !important;}

  /* Riga 2: conversazione, senza profilo gigante e spazi vuoti inutili */
  #rc22Panel .rc22-main,
  body.rabbit-mobile-lite #rc22Panel .rc22-main{
    grid-row:2 !important;
    display:grid !important;
    grid-template-rows:62px minmax(0,1fr) auto !important;
    height:100% !important;
    min-height:0 !important;
    min-width:0 !important;
    overflow:hidden !important;
    background:#fff !important;
    border-radius:0 !important;
    box-shadow:none !important;
  }
  #rc22Panel .rc22-thread-head,
  body.rabbit-mobile-lite #rc22Panel .rc22-thread-head{
    height:62px !important;
    min-height:62px !important;
    padding:8px 10px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:8px !important;
    border-bottom:1px solid #e5eaf2 !important;
    background:#fff !important;
    overflow:hidden !important;
  }
  #rc22Panel .rc22-peer,
  body.rabbit-mobile-lite #rc22Panel .rc22-peer{min-width:0 !important;display:flex !important;align-items:center !important;gap:8px !important;}
  #rc22Panel .rc22-peer .rc22-avatar,
  body.rabbit-mobile-lite #rc22Panel .rc22-peer .rc22-avatar{
    width:36px !important;height:36px !important;min-width:36px !important;border-radius:13px !important;font-size:12px !important;
  }
  #rc22Panel .rc22-peer-text,
  body.rabbit-mobile-lite #rc22Panel .rc22-peer-text{min-width:0 !important;}
  #rc22Panel .rc22-peer-text b,
  #rc22Panel .rc22-peer-text small,
  body.rabbit-mobile-lite #rc22Panel .rc22-peer-text b,
  body.rabbit-mobile-lite #rc22Panel .rc22-peer-text small{
    display:block !important;
    max-width:calc(100vw - 232px) !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
  #rc22Panel .rc22-peer-text b,
  body.rabbit-mobile-lite #rc22Panel .rc22-peer-text b{font-size:14px !important;color:#0f172a !important;font-weight:950 !important;}
  #rc22Panel .rc22-peer-text small,
  body.rabbit-mobile-lite #rc22Panel .rc22-peer-text small{font-size:11px !important;color:#64748b !important;font-weight:700 !important;}

  #rc22Panel .rc22-tools,
  body.rabbit-mobile-lite #rc22Panel .rc22-tools{
    display:flex !important;
    flex:0 0 auto !important;
    gap:5px !important;
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    scrollbar-width:none !important;
    max-width:150px !important;
  }
  #rc22Panel .rc22-tools::-webkit-scrollbar,
  body.rabbit-mobile-lite #rc22Panel .rc22-tools::-webkit-scrollbar{display:none !important;}
  #rc22Panel .rc22-tool,
  body.rabbit-mobile-lite #rc22Panel .rc22-tool{
    width:33px !important;height:33px !important;min-width:33px !important;border-radius:12px !important;font-size:13px !important;
  }

  #rc22Panel .rc22-messages,
  body.rabbit-mobile-lite #rc22Panel .rc22-messages{
    min-height:0 !important;
    height:100% !important;
    padding:12px 11px !important;
    overflow:auto !important;
    background:#f4f8ff !important;
    display:flex !important;
    flex-direction:column !important;
    gap:10px !important;
    -webkit-overflow-scrolling:touch !important;
  }
  #rc22Panel .rc22-empty,
  body.rabbit-mobile-lite #rc22Panel .rc22-empty{
    margin:auto !important;
    max-width:290px !important;
    padding:14px !important;
    font-size:14px !important;
    line-height:1.35 !important;
    text-align:center !important;
    color:#64748b !important;
  }
  #rc22Panel .rc22-bubble,
  body.rabbit-mobile-lite #rc22Panel .rc22-bubble{
    max-width:84% !important;
    padding:10px 12px !important;
    border-radius:16px 16px 16px 8px !important;
    font-size:13px !important;
    line-height:1.36 !important;
    overflow-wrap:anywhere !important;
  }
  #rc22Panel .rc22-bubble.me,
  body.rabbit-mobile-lite #rc22Panel .rc22-bubble.me{
    margin-left:auto !important;
    border-radius:16px 16px 8px 16px !important;
    background:linear-gradient(135deg,#2563eb,#10b981) !important;
    color:#fff !important;
  }

  #rc22Panel .rc22-compose,
  body.rabbit-mobile-lite #rc22Panel .rc22-compose{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 72px !important;
    gap:8px !important;
    padding:9px 10px max(9px,var(--rf-safe-bottom)) !important;
    background:#fff !important;
    border-top:1px solid #e5eaf2 !important;
  }
  #rc22Panel .rc22-compose input,
  body.rabbit-mobile-lite #rc22Panel .rc22-compose input{
    width:100% !important;
    height:46px !important;
    min-height:46px !important;
    border-radius:16px !important;
    font-size:16px !important;
    padding:0 13px !important;
    border:1px solid #cbd5e1 !important;
    background:#fff !important;
    color:#0f172a !important;
  }
  #rc22Panel .rc22-compose button,
  body.rabbit-mobile-lite #rc22Panel .rc22-compose button{
    width:72px !important;
    min-width:72px !important;
    height:46px !important;
    min-height:46px !important;
    border-radius:16px !important;
    padding:0 !important;
    font-size:13px !important;
    font-weight:950 !important;
  }

  /* Riga 3: contatti attivi veri, non nascosti */
  #rc22Panel .rc22-info,
  body.rabbit-mobile-lite #rc22Panel .rc22-info{
    grid-row:3 !important;
    display:grid !important;
    visibility:visible !important;
    opacity:1 !important;
    pointer-events:auto !important;
    grid-template-rows:auto minmax(0,1fr) !important;
    height:118px !important;
    min-height:118px !important;
    max-height:118px !important;
    overflow:hidden !important;
    padding:10px 12px !important;
    background:linear-gradient(180deg,#ffffff,#f8fbff) !important;
    border-left:0 !important;
    border-top:1px solid #e2e8f0 !important;
    gap:8px !important;
  }
  #rc22Panel .rc22-info-block,
  body.rabbit-mobile-lite #rc22Panel .rc22-info-block{min-width:0 !important;}
  #rc22Panel .rc22-info-block:not(:first-child),
  body.rabbit-mobile-lite #rc22Panel .rc22-info-block:not(:first-child){display:none !important;}
  #rc22Panel .rc22-info-block h3,
  body.rabbit-mobile-lite #rc22Panel .rc22-info-block h3{
    margin:0 !important;
    font-size:13px !important;
    line-height:1.1 !important;
    color:#0f172a !important;
    font-weight:950 !important;
  }
  #rc22Panel .rc22-info-contacts,
  body.rabbit-mobile-lite #rc22Panel .rc22-info-contacts{
    display:flex !important;
    flex-direction:row !important;
    gap:9px !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    scrollbar-width:none !important;
    min-height:0 !important;
    padding-bottom:2px !important;
  }
  #rc22Panel .rc22-info-contacts::-webkit-scrollbar,
  body.rabbit-mobile-lite #rc22Panel .rc22-info-contacts::-webkit-scrollbar{display:none !important;}
  #rc22Panel .rc22-info-contact,
  body.rabbit-mobile-lite #rc22Panel .rc22-info-contact{
    flex:0 0 176px !important;
    width:176px !important;
    min-width:176px !important;
    min-height:54px !important;
    height:54px !important;
    display:grid !important;
    grid-template-columns:36px minmax(0,1fr) 9px !important;
    align-items:center !important;
    gap:8px !important;
    padding:8px !important;
    border-radius:17px !important;
    background:#fff !important;
    border:1px solid #e5eaf2 !important;
    box-shadow:0 7px 16px rgba(15,23,42,.045) !important;
    text-align:left !important;
    color:#0f172a !important;
  }
  #rc22Panel .rc22-info-avatar,
  body.rabbit-mobile-lite #rc22Panel .rc22-info-avatar{
    width:36px !important;height:36px !important;min-width:36px !important;border-radius:50% !important;font-size:11px !important;
  }
  #rc22Panel .rc22-info-name b,
  #rc22Panel .rc22-info-name small,
  body.rabbit-mobile-lite #rc22Panel .rc22-info-name b,
  body.rabbit-mobile-lite #rc22Panel .rc22-info-name small{
    display:block !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
  #rc22Panel .rc22-info-name b,
  body.rabbit-mobile-lite #rc22Panel .rc22-info-name b{font-size:12px !important;font-weight:900 !important;color:#0f172a !important;}
  #rc22Panel .rc22-info-name small,
  body.rabbit-mobile-lite #rc22Panel .rc22-info-name small{font-size:10px !important;color:#64748b !important;margin-top:2px !important;}
}

@media (max-width: 390px){
  #rc22Panel.rc22-panel,
  body.rabbit-mobile-lite #rc22Panel.rc22-panel{
    left:6px !important;
    right:6px !important;
    top:calc(var(--rf-safe-top) + 6px) !important;
    bottom:calc(var(--rf-safe-bottom) + 6px) !important;
    grid-template-rows:188px minmax(0,1fr) 108px !important;
    border-radius:22px !important;
  }
  #rc22Panel .rc22-sidebar,
  #rc22Panel aside.rc22-sidebar,
  body.rabbit-mobile-lite #rc22Panel .rc22-sidebar,
  body.rabbit-mobile-lite #rc22Panel aside.rc22-sidebar{
    height:188px !important;
    min-height:188px !important;
    max-height:188px !important;
    grid-template-rows:50px 40px minmax(0,1fr) !important;
  }
  #rc22Panel .rc22-info,
  body.rabbit-mobile-lite #rc22Panel .rc22-info{
    height:108px !important;
    min-height:108px !important;
    max-height:108px !important;
  }
  #rc22Panel .rc22-contact,
  body.rabbit-mobile-lite #rc22Panel .rc22-contact{flex-basis:198px !important;width:198px !important;min-width:198px !important;height:68px !important;min-height:68px !important;}
  #rc22Panel .rc22-info-contact,
  body.rabbit-mobile-lite #rc22Panel .rc22-info-contact{flex-basis:160px !important;width:160px !important;min-width:160px !important;height:50px !important;min-height:50px !important;}
  #rc22Panel .rc22-tools,
  body.rabbit-mobile-lite #rc22Panel .rc22-tools{max-width:122px !important;}
}
