/**
 * ============================================================================
 * BOOFF — Tactical Ergonomic UI Theme (Dark Cyber & Light Daylight)
 * Copyright (c) 2026 aton-fux (https://codeberg.org/aton-fux/BOOFF)
 * Zero external dependencies. Mobile-first 60fps responsive design.
 * ============================================================================
 */

:root,
[data-theme="dark"],
[data-theme="cyber-cyan"] {
  --bg-primary: #0b141a;
  --bg-secondary: #111b21;
  --bg-elevated: #202c33;
  --bg-chat-wallpaper: #0b141a;
  --bg-bubble-out: #202c33;
  --bg-bubble-in: #111b21;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-primary: #ffffff;
  --accent-secondary: #e2e8f0;
  --accent-danger: #ef4444;
  --accent-warning: #f59e0b;
  --border-subtle: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(255, 255, 255, 0.45);
  --border-avatar: #ffffff;
  --shadow-card: 0 4px 18px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(17, 27, 33, 0.98);
}

/* Stile Luna Monocromo: sfondo box nero con testo e dettagli a contrasto bianco */
[data-theme="dark"] .contact-row {
  background: #0c0d0e !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 12px !important;
  margin: 6px 10px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
  color: #ffffff !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
[data-theme="dark"] .contact-row:hover,
[data-theme="dark"] .contact-row:active {
  background: #181a1d !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6) !important;
}
[data-theme="dark"] .contact-row .contact-name,
[data-theme="dark"] .contact-row .contact-name span {
  color: #ffffff !important;
}
[data-theme="dark"] .contact-row .contact-channel-code {
  color: #cbd5e1 !important;
}
[data-theme="dark"] .contact-row .contact-preview {
  color: #94a3b8 !important;
}
[data-theme="dark"] .contact-row .contact-star-btn svg {
  stroke: #ffffff !important;
}
[data-theme="dark"] .contact-row .contact-star-btn.starred svg {
  fill: #ffffff !important;
  stroke: #ffffff !important;
}
/* Stile Luna FAB +: Box bianco con simbolo + nero */
[data-theme="dark"] .fab-add-friend {
  background: #ffffff !important;
  color: #0c0d0e !important;
}
[data-theme="dark"] .fab-add-friend svg {
  stroke: #0c0d0e !important;
}
/* Stile Luna Chat Privata: Microfono con box bianco e icona nera */
[data-theme="dark"] .dynamic-send-mic-btn {
  background: #ffffff !important;
  color: #0c0d0e !important;
}
[data-theme="dark"] .dynamic-send-mic-btn svg {
  stroke: #0c0d0e !important;
  color: #0c0d0e !important;
}

/* Stile Luna Voice Player: contrasto monocromo netto */
[data-theme="dark"] .voice-player-btn {
  background: #ffffff !important;
  color: #0c0d0e !important;
  border: 1px solid #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6) !important;
}
[data-theme="dark"] .voice-player-btn .voice-play-icon {
  fill: #0c0d0e !important;
}
[data-theme="dark"] .voice-bar-col {
  background: rgba(255, 255, 255, 0.35) !important;
}
[data-theme="dark"] .voice-bar-col.played {
  background: #ffffff !important;
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f0f2f5;
  --bg-elevated: #ffffff;
  --bg-chat-wallpaper: #ffffff;
  --bg-bubble-out: #e2e8f0;
  --bg-bubble-in: #ffffff;
  --text-primary: #0c0d0e;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --accent-primary: #0c0d0e;
  --accent-secondary: #27272a;
  --accent-danger: #dc2626;
  --accent-warning: #d97706;
  --border-subtle: rgba(0, 0, 0, 0.12);
  --border-accent: rgba(0, 0, 0, 0.45);
  --border-avatar: #0c0d0e;
  --shadow-card: 0 2px 12px rgba(17, 27, 33, 0.08);
  --header-bg: rgba(240, 242, 245, 0.98);
}
[data-theme="light"] .chat-bubble.out {
  color: #0c0d0e;
}

/* Stile Sole Tactical High-Contrast Monochrome operational blocks */
[data-theme="light"] .booff-top-action-bar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
[data-theme="light"] .booff-top-action-bar .top-action-btn {
  color: #0c0d0e !important;
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
}
[data-theme="light"] .booff-top-action-bar .top-action-btn:hover {
  background: #f1f5f9 !important;
  color: #000000 !important;
}
[data-theme="light"] .booff-top-action-bar .top-action-btn.danger {
  color: #dc2626 !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
  background: rgba(220, 38, 38, 0.08) !important;
}
[data-theme="light"] .booff-tabs {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
[data-theme="light"] .booff-tabs .tab-btn {
  color: #4b5563 !important;
}
[data-theme="light"] .booff-tabs .tab-btn.active {
  color: #0c0d0e !important;
  border-bottom: 2px solid #0c0d0e !important;
}
[data-theme="light"] .booff-tabs .tab-btn .tab-svg-icon {
  stroke: currentColor !important;
}
[data-theme="light"] .contact-row {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 12px !important;
  margin: 6px 10px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
  color: #0c0d0e !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
[data-theme="light"] .contact-row:hover,
[data-theme="light"] .contact-row:active {
  background: #f3f4f6 !important;
}
[data-theme="light"] .contact-row .contact-name,
[data-theme="light"] .contact-row .contact-name span {
  color: #0c0d0e !important;
}
[data-theme="light"] .contact-row .contact-channel-code {
  color: #374151 !important;
}
[data-theme="light"] .contact-row .contact-preview {
  color: #4b5563 !important;
}
[data-theme="light"] .contact-row .contact-star-btn svg {
  stroke: #0c0d0e !important;
}
[data-theme="light"] .contact-row .contact-star-btn.starred svg {
  fill: #0c0d0e !important;
  stroke: #0c0d0e !important;
}

[data-theme="nero-rosso"],
[data-theme="tri-rosso"] {
  --bg-primary: #0c0d0e;
  --bg-secondary: #16181b;
  --bg-elevated: #22252a;
  --bg-chat-wallpaper: #08090a;
  --bg-bubble-out: #3b1219;
  --bg-bubble-in: #22252a;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-primary: #ef4444;
  --accent-secondary: #f87171;
  --accent-danger: #dc2626;
  --accent-warning: #f59e0b;
  --border-subtle: rgba(239, 68, 68, 0.18);
  --border-accent: rgba(239, 68, 68, 0.45);
  --border-avatar: rgba(239, 68, 68, 0.55);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.6);
  --header-bg: rgba(22, 24, 27, 0.98);
}

/* Stile Cerchio & Rombo (Clonato da Cyber Blue & Deep Black) */
[data-theme="white-green"] {
  --bg-primary: #0b141a;
  --bg-secondary: #111b21;
  --bg-elevated: #202c33;
  --bg-chat-wallpaper: #0b141a;
  --bg-bubble-out: #004b87;
  --bg-bubble-in: #202c33;
  --text-primary: #e9edef;
  --text-secondary: #8696a0;
  --text-muted: #667781;
  --accent-primary: #0084ff;
  --accent-secondary: #00c3ff;
  --accent-danger: #ef4444;
  --accent-warning: #f59e0b;
  --border-subtle: rgba(134, 150, 160, 0.16);
  --border-accent: rgba(0, 132, 255, 0.45);
  --border-avatar: rgba(0, 132, 255, 0.55);
  --shadow-card: 0 4px 18px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(17, 27, 33, 0.98);
}

[data-theme="black-yellow"],
[data-theme="bianco-nero"] {
  --bg-primary: #0c0d0e;
  --bg-secondary: #16181b;
  --bg-elevated: #22252a;
  --bg-chat-wallpaper: #08090a;
  --bg-bubble-out: #3d2806;
  --bg-bubble-in: #22252a;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-primary: #f59e0b;
  --accent-secondary: #fbbf24;
  --accent-danger: #ef4444;
  --accent-warning: #d97706;
  --border-subtle: rgba(245, 158, 11, 0.2);
  --border-accent: rgba(245, 158, 11, 0.45);
  --border-avatar: rgba(245, 158, 11, 0.55);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.6);
  --header-bg: rgba(22, 24, 27, 0.98);
}

/* Stile Cuore: ROSA FORTE (Hot Pink #ff2d75), NON Rosso */
[data-theme="pink-white"] {
  --bg-primary: #f8f6f9;
  --bg-secondary: #ffffff;
  --bg-elevated: #ffffff;
  --bg-chat-wallpaper: #fbf5f8;
  --bg-bubble-out: #ff2d75;
  --bg-bubble-in: #ffffff;
  --text-primary: #1e1924;
  --text-secondary: #64566c;
  --text-muted: #9c8ea6;
  --accent-primary: #ff2d75;
  --accent-secondary: #ff5c93;
  --accent-danger: #ff1493;
  --accent-warning: #d97706;
  --border-subtle: rgba(255, 45, 117, 0.18);
  --border-accent: rgba(255, 45, 117, 0.4);
  --border-avatar: #ff2d75;
  --shadow-card: 0 2px 14px rgba(255, 45, 117, 0.1);
  --header-bg: #ff2d75;
}

/* Header in Stile Cuore: Box completamente Rosa Forte con contrasto bianco */
[data-theme="pink-white"] .booff-topbar {
  background: #ff2d75 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}
[data-theme="pink-white"] .booff-topbar .brand-title,
[data-theme="pink-white"] .booff-topbar .topbar-profile-alias,
[data-theme="pink-white"] .booff-topbar .topbar-profile-code,
[data-theme="pink-white"] .booff-topbar .header-svg-icon {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

/* Contatti in Stile Cuore: Box bianco con accenti e contrasti Rosa Forte */
[data-theme="pink-white"] .contact-row {
  background: #ffffff !important;
  border: 1.5px solid rgba(255, 45, 117, 0.28) !important;
  border-radius: 12px !important;
  margin: 6px 10px !important;
  box-shadow: 0 3px 12px rgba(255, 45, 117, 0.12) !important;
  color: #1e1924 !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
[data-theme="pink-white"] .contact-row:hover,
[data-theme="pink-white"] .contact-row:active {
  background: #fff5f8 !important;
  border-color: #ff2d75 !important;
  box-shadow: 0 4px 16px rgba(255, 45, 117, 0.22) !important;
}
[data-theme="pink-white"] .contact-row .contact-name,
[data-theme="pink-white"] .contact-row .contact-name span {
  color: #1e1924 !important;
  font-weight: 700 !important;
}
[data-theme="pink-white"] .contact-row .contact-channel-code {
  color: #ff2d75 !important;
  font-weight: 700 !important;
  background: rgba(255, 45, 117, 0.08) !important;
  padding: 1px 6px !important;
  border-radius: 6px !important;
}
[data-theme="pink-white"] .contact-row .contact-preview {
  color: #64566c !important;
}
[data-theme="pink-white"] .contact-row .contact-star-btn svg {
  stroke: #ff2d75 !important;
}
[data-theme="pink-white"] .contact-row .contact-star-btn.starred svg {
  fill: #ff2d75 !important;
  stroke: #ff2d75 !important;
}
[data-theme="pink-white"] .contact-row .contact-more-btn {
  color: #ff2d75 !important;
}
/* Private Chat Header in Stile Cuore: Barra superiore Rosa Forte con icone, codice e testo bianchi */
[data-theme="pink-white"] .chat-room-header {
  background: #ff2d75 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
}
[data-theme="pink-white"] .chat-room-header .chat-peer-summary .icon-btn svg {
  stroke: #ffffff !important;
}
[data-theme="pink-white"] .chat-room-header #chatHeaderPeerName {
  color: #ffffff !important;
}
[data-theme="pink-white"] .chat-room-header #chatHeaderPeerStatus {
  color: rgba(255, 255, 255, 0.9) !important;
}
[data-theme="pink-white"] .chat-room-header #chatHeaderCodeText {
  color: #ffffff !important;
}
[data-theme="pink-white"] .chat-room-header .chat-header-actions .header-action-icon-btn svg {
  stroke: #ffffff !important;
}
[data-theme="pink-white"] .chat-room-header .chat-header-actions .header-action-icon-btn {
  color: #ffffff !important;
}

/* Microfono in Stile Cuore: Box bianco con microfono rosa */
[data-theme="pink-white"] .dynamic-send-mic-btn {
  background: #ffffff !important;
  color: #ff2d75 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}
[data-theme="pink-white"] .dynamic-send-mic-btn svg {
  stroke: #ff2d75 !important;
  color: #ff2d75 !important;
}

/* Chat Messages in Stile Cuore: Box bianco coordinato con i contatti, bordi rosa forte */
[data-theme="pink-white"] .chat-msg-card {
  background: #ffffff !important;
  border: 1.5px solid rgba(255, 45, 117, 0.28) !important;
  border-radius: 12px !important;
  box-shadow: 0 3px 12px rgba(255, 45, 117, 0.12) !important;
  color: #1e1924 !important;
}
[data-theme="pink-white"] .msg-bubble.outgoing .chat-msg-card {
  background: #ffffff !important;
  border: 1.5px solid rgba(255, 45, 117, 0.38) !important;
  border-left: 3.5px solid #ff2d75 !important;
}
[data-theme="pink-white"] .msg-bubble.incoming .chat-msg-card {
  background: #ffffff !important;
  border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
  border-left: 3.5px solid #64566c !important;
}
[data-theme="pink-white"] .msg-text-content {
  color: #1e1924 !important;
}
[data-theme="pink-white"] .msg-time {
  color: #64566c !important;
}
[data-theme="pink-white"] .msg-checks {
  color: #ff2d75 !important;
}
[data-theme="pink-white"] .voice-player-bubble {
  background: transparent !important;
}
[data-theme="pink-white"] .voice-time-text {
  color: #1e1924 !important;
  font-weight: 700 !important;
}
[data-theme="pink-white"] .voice-player-btn {
  background: #ffffff !important;
  color: #ff2d75 !important;
  border: 1.5px solid #ff2d75 !important;
  box-shadow: 0 2px 8px rgba(255, 45, 117, 0.2) !important;
}
[data-theme="pink-white"] .voice-player-btn .voice-play-icon {
  fill: #ff2d75 !important;
}
[data-theme="pink-white"] .voice-bar-col {
  background: rgba(255, 45, 117, 0.3) !important;
}
[data-theme="pink-white"] .voice-bar-col.played {
  background: #ff2d75 !important;
}
[data-theme="pink-white"] .voice-scramble-badge {
  background: rgba(255, 45, 117, 0.1) !important;
  color: #ff2d75 !important;
  border: 1px solid #ff2d75 !important;
}
/* Cuore Offline Outlines */
[data-theme="pink-white"] .presence-dot.offline {
  border: 1.5px solid #ffffff !important;
  background: #ff1a40 !important;
  box-shadow: 0 0 0 1px rgba(255, 45, 117, 0.4), 0 0 6px rgba(255, 26, 64, 0.7) !important;
}
[data-theme="pink-white"] .topbar-status-dot.offline {
  border: 1.5px solid #ffffff !important;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.8) !important;
}
[data-theme="pink-white"] .chat-room-header #chatHeaderPeerStatus {
  color: rgba(255, 255, 255, 0.95) !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  font-size: 0.70rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
}
/* Stile Cuore: Scritta Offline BIANCA pulita e senza box/bordo nell'header chat */
[data-theme="pink-white"] #chatHeaderStatusText.status-offline,
[data-theme="pink-white"] #chatHeaderStatusText[data-status="offline"],
[data-theme="pink-white"] .chat-room-header .chat-status-text.status-offline {
  border: none !important;
  color: #ffffff !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  display: inline !important;
  box-shadow: none !important;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior-y: none;
}

/* App Shell (Optimized for iOS Safe Areas & 100dvh) */
.booff-app,
.booff-app {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.65);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Top App Header */
.booff-topbar,
.booff-topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 20;
  min-height: 56px;
}

/* User Profile in Top Bar (Left) */
.topbar-profile-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  z-index: 2;
  min-width: 0;
  max-width: 44%;
  user-select: none;
}

.topbar-profile-canvas {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border-avatar, var(--border-subtle));
  background: var(--bg-elevated);
  flex-shrink: 0;
  display: block;
}

.topbar-profile-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  line-height: 1.15;
}

.topbar-profile-alias {
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
}

.topbar-profile-code {
  font-family: monospace;
  font-size: 0.66rem;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-weight: 800;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.contact-channel-code {
  font-family: monospace;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--accent-primary) !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.live-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00ff88 !important;
  box-shadow: 0 0 6px rgba(0, 255, 136, 0.7) !important;
  display: inline-block;
  flex-shrink: 0;
}

/* Centered BOOFF Brand Title (WhatsApp Minimalist Style) */
.topbar-brand-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: auto !important;
  cursor: pointer;
  z-index: 10;
  text-align: center;
}

.topbar-brand-center .brand-title {
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: 2.2px;
  color: var(--text-primary);
  margin: 0;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Frameless Transparent Icon in Header (NO BOX, NO BACKGROUND) */
.brand-logo-frameless {
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.brand-title {
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: 1.4px;
  color: var(--text-primary);
}

.brand-subtitle {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.mesh-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: inline-block;
}

/* WhatsApp Minimalist Vector Outline Icons */
.wa-icon,
.tab-svg-icon,
.header-svg-icon,
.action-svg-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: transform 0.12s ease, opacity 0.15s ease, stroke 0.15s ease;
}

.header-svg-icon {
  width: 22px;
  height: 22px;
  color: var(--text-primary) !important;
  stroke: var(--text-primary) !important;
}

/* BOOFF Official Monochrome Emblem — Dynamic High-Contrast Inversion */
.booff-icon-bw {
  filter: brightness(0) invert(1); /* Pure white on dark backgrounds */
  transition: filter 0.18s ease;
  flex-shrink: 0;
}

[data-theme="light"] .booff-icon-bw,
[data-theme="pink-white"] .booff-icon-bw {
  filter: brightness(0); /* Pure deep black on light backgrounds */
}

/* Stile Cuore Topbar: Pure white BOOFF icon on hot pink */
[data-theme="pink-white"] .booff-topbar .booff-icon-bw {
  filter: brightness(0) invert(1) !important;
}

/* Stile Cuore Chat Messages: High-contrast hot-pink BOOFF bomb icon on white cards */
[data-theme="pink-white"] .msg-bubble .booff-icon-bw,
[data-theme="pink-white"] .chat-bubble .booff-icon-bw,
[data-theme="pink-white"] .chat-msg-card .booff-icon-bw,
[data-theme="pink-white"] .msg-manual-boom-btn .booff-icon-bw {
  filter: invert(32%) sepia(85%) saturate(4529%) hue-rotate(327deg) brightness(101%) contrast(102%) !important;
}

/* Chat Bubble Detonate Icons */
.chat-bubble.out .booff-icon-bw {
  filter: brightness(0) invert(1);
}

[data-theme="light"] .chat-bubble.out .booff-icon-bw {
  filter: brightness(0);
}

.chat-bubble.in .booff-icon-bw {
  filter: brightness(0) invert(1);
}

[data-theme="light"] .chat-bubble.in .booff-icon-bw,
[data-theme="pink-white"] .chat-bubble.in .booff-icon-bw {
  filter: brightness(0);
}

/* In dark-backdrop modals and security overlays, the emblem remains pure white in all themes */
.booff-modal-backdrop .booff-icon-bw,
.app-pin-lock-overlay .booff-icon-bw,
.privacy-blur-shield .booff-icon-bw {
  filter: brightness(0) invert(1) !important;
}

.wa-icon-filled {
  fill: currentColor;
  stroke: none;
}

.wa-icon-sm {
  width: 22px;
  height: 22px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
  color: var(--text-primary);
}

/* Frameless Action Icons (NO BOX, NO BACKGROUND, CLEAN TACTILE ICONS) */
.frameless-icon-btn,
.contact-more-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 4px 6px !important;
  font-size: 1.25rem !important;
  color: var(--text-primary) !important;
  line-height: 1 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: transform 0.12s ease, opacity 0.15s ease;
  user-select: none;
}

.frameless-icon-btn:hover {
  opacity: 0.85;
  transform: scale(1.1);
}

.frameless-icon-btn:active {
  transform: scale(0.88);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.icon-btn:hover {
  border-color: var(--accent-primary);
}

.icon-btn:active {
  transform: scale(0.95);
}

.icon-btn.danger {
  background: rgba(255, 23, 68, 0.14);
  color: #ff4d6d;
  border-color: rgba(255, 23, 68, 0.45);
}

.icon-btn.danger:hover {
  border-color: #ff1744;
  box-shadow: 0 0 10px rgba(255, 23, 68, 0.35);
}

.icon-btn.accent {
  background: var(--bg-elevated);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.icon-btn.accent:hover {
  background: var(--bg-secondary);
}

/* Long-Press Contextual Action Bar */
.selection-action-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--accent-primary);
  color: var(--text-primary);
  z-index: 25;
  min-height: 54px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  animation: fadeDown 0.15s ease;
}

.selection-action-bar.active {
  display: flex;
}

.selection-action-btns {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.selection-action-btns .icon-btn {
  padding: 6px 8px;
  min-width: 36px;
  min-height: 36px;
  justify-content: center;
}

@media (max-width: 600px) {
  .selection-btn-text {
    display: none !important;
  }
  .selection-action-btns {
    gap: 2px !important;
  }
  .selection-action-btns .icon-btn {
    padding: 6px !important;
    min-width: 34px !important;
    min-height: 34px !important;
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* PWA Browser Install Banner (Hidden automatically when installed!) */
.pwa-install-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.76rem;
}

.pwa-install-banner.hidden {
  display: none !important;
}

/* Tactical Top Action Bar (RAM-ONLY + BOOM WIPE + LISTA AMICI) */
.booff-top-action-bar,
.booff-top-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 16;
}

.top-action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 6px;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.top-action-btn:hover {
  border-color: var(--border-accent);
}

.top-action-btn.active {
  background: rgba(0, 255, 157, 0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.top-action-btn.danger {
  border-color: rgba(255, 42, 109, 0.35);
  color: #ff2a6d;
}

.top-action-btn.danger:active {
  background: #ff2a6d;
  color: #03100a;
}

.contact-star-btn {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: transform 0.15s ease, color 0.15s ease, opacity 0.15s ease;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.contact-star-btn:hover {
  transform: scale(1.12);
}

.contact-star-btn.starred {
  color: var(--accent-primary);
  text-shadow: none;
}

.contact-star-btn.room-star {
  color: var(--text-secondary);
}

.contact-star-btn.room-star.starred {
  color: var(--accent-warning);
  text-shadow: none;
}

/* 4 Clean Navigation Tabs (WhatsApp Style) */
.booff-tabs,
.booff-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 15;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  padding: 11px 4px 9px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.tab-btn .tab-svg-icon {
  width: 19px;
  height: 19px;
  color: var(--text-secondary);
  transition: color 0.15s ease, transform 0.15s ease;
}

.tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  background: transparent;
}

.tab-btn.active .tab-svg-icon {
  color: var(--accent-primary);
}

/* Main Tab Views */
.tab-view {
  display: none;
  flex: 1;
  overflow-y: auto;
  position: relative;
  padding-bottom: 84px;
}

.tab-view.active {
  display: flex;
  flex-direction: column;
}

/* Quick Top Action Bar (Nuovo Amico + Crea Stanza - Point #2 & #5) */
.chat-quick-actions-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 9px 14px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

/* Contact List */
.contacts-list {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  position: relative;
}

.contact-row:hover {
  background: var(--bg-secondary);
}

.contact-row:active {
  background: var(--bg-elevated);
}

.contact-row.selected {
  background: rgba(0, 255, 136, 0.16);
  border-left: 3px solid var(--accent-primary);
}

.contact-avatar-wrap {
  position: relative;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.contact-avatar-canvas {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: block;
  border: 1.5px solid var(--border-avatar, var(--border-subtle));
  box-sizing: border-box;
}

/* Real-time Status Dot on Contact Avatar & Chat Header */
.presence-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
}

.presence-dot.online {
  background: #00ff88 !important;
  box-shadow: 0 0 6px rgba(0, 255, 136, 0.7) !important;
}

.presence-dot.offline {
  background: #ff1a40 !important;
  box-shadow: 0 0 6px rgba(255, 26, 64, 0.6) !important;
}

.presence-dot.unread {
  background: #ff1a40 !important;
  box-shadow: 0 0 8px rgba(255, 26, 64, 0.8) !important;
}

/* Header Bell Online/Offline Presence Indicator */
.topbar-status-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  border: 1.5px solid var(--bg-primary);
}

.topbar-status-dot.online {
  background: #00ff88 !important;
  box-shadow: 0 0 6px rgba(0, 255, 136, 0.7) !important;
}

.topbar-status-dot.offline {
  background: #ff1a40 !important;
  box-shadow: 0 0 6px rgba(255, 26, 64, 0.6) !important;
}

@keyframes pulseBadge {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.22);
  }
}

.contact-info {
  flex: 1;
  min-width: 0;
}

.contact-top-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.contact-name {
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}

.contact-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.contact-bottom-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.contact-preview {
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.contact-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.unread-pill {
  background: var(--accent-primary);
  color: #04130d;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}

.unread-pill.boom {
  background: var(--accent-danger);
  color: #fff;
  animation: pulseBadge 0.8s infinite alternate;
}

/* Empty Contacts State */
.empty-contacts-card {
  margin: 24px 16px;
  padding: 24px 18px;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-subtle);
  border-radius: 16px;
  text-align: center;
}

/* Floating Action Button (WhatsApp Style) */
.fab-add-friend {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 18;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fab-add-friend:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.fab-add-friend:active {
  transform: scale(0.92);
}

/* Slide-Over Fullscreen Chat Room */
.chat-room-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg-chat-wallpaper);
  display: none;
  flex-direction: column;
  z-index: 40;
}

.chat-room-overlay.open {
  display: flex;
}

/* Clean Non-Overlapping Chat Header (Point #4 Fix) */
.chat-room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-subtle);
  min-height: 60px;
  gap: 10px;
}

.chat-peer-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.chat-peer-summary .icon-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--text-primary) !important;
  padding: 6px 4px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.chat-header-avatar-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.chat-header-text-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.chat-header-actions .header-action-icon-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 4px 6px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 !important;
  color: var(--text-primary) !important;
  transition: opacity 0.15s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.chat-header-actions .header-action-icon-btn:active {
  transform: scale(0.90);
  opacity: 0.7;
}

.chat-messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-image: radial-gradient(rgba(0, 255, 157, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
}

.msg-bubble {
  max-width: 86%;
  padding: 3px 4px;
  position: relative;
  font-size: 0.92rem;
  line-height: 1.4;
  word-wrap: break-word;
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
  transition: transform 0.22s ease, opacity 0.22s ease;
  display: flex;
  flex-direction: column;
}

.msg-bubble.outgoing {
  align-self: flex-end;
  color: var(--text-primary);
  border: none !important;
  text-align: left;
}

.msg-bubble.incoming {
  align-self: flex-start;
  color: var(--text-primary);
  border: none !important;
  text-align: left;
}

/* Authentic Speech Bubble Card (Modern Minimalist Messaging, High Contrast) */
.chat-msg-card {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 14px;
  max-width: 100%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  word-break: break-word;
  box-sizing: border-box;
}

.msg-bubble.outgoing .chat-msg-card {
  background: var(--bg-bubble-out, #005c4b);
  color: var(--text-primary);
  border-bottom-right-radius: 3px;
  margin-left: auto;
}

.msg-bubble.incoming .chat-msg-card {
  background: var(--bg-bubble-in, #202c33);
  color: var(--text-primary);
  border-bottom-left-radius: 3px;
  margin-right: auto;
}

.msg-bubble.outgoing.boom-msg .chat-msg-card {
  border-left: 3px solid var(--accent-danger);
}

.msg-bubble.incoming.boom-msg .chat-msg-card {
  border-left: 3px solid var(--accent-danger);
}

.msg-bubble.msg-exploding {
  transform: scale(1.2);
  opacity: 0;
  filter: blur(8px);
  color: #ff2a6d !important;
}

.msg-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.68rem;
  opacity: 0.9;
  margin-top: 5px;
  width: 100%;
}

.msg-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

/* Live BOOM Countdown Badge & Manual Detonate Button (Point #3b) */
.boom-live-counter {
  background: transparent !important;
  color: #ff2a6d !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 4px;
  font-weight: 900;
  font-size: 0.72rem;
  font-family: monospace;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  text-shadow: 0 0 6px rgba(255, 42, 109, 0.4);
}

.msg-manual-boom-btn {
  background: transparent !important;
  color: #ff2a6d !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 4px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.msg-left-boom-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  vertical-align: middle;
}

.msg-card-top-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 5px;
  width: 100%;
}

.text-msg-body {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  width: 100%;
}

.text-start-boom {
  flex-shrink: 0;
  margin-top: 2px;
  padding: 0 !important;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.msg-text-content {
  flex: 1;
  word-break: break-word;
  line-height: 1.4;
}

.msg-manual-boom-btn:active {
  transform: scale(0.85);
  opacity: 0.8;
}

.msg-checks {
  font-weight: 800;
  color: var(--accent-primary);
}

/* Modern WhatsApp-Style Voice Note Bubble */
.voice-player-bubble {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 250px;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  box-sizing: border-box;
}

.msg-bubble.outgoing .voice-player-bubble {
  background: var(--bg-bubble-out, #005c4b);
  border-bottom-right-radius: 4px;
}

.msg-bubble.incoming .voice-player-bubble {
  background: var(--bg-bubble-in, #202c33);
  border-bottom-left-radius: 4px;
}

.voice-seal-badge {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-seal-canvas {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: block;
  border: 1.5px solid var(--accent-primary);
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.35);
}

.voice-mic-badge-icon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.voice-player-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
  padding: 0;
}

.voice-player-btn:active {
  transform: scale(0.92);
}

.voice-track-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* WhatsApp Realistic Waveform Bars */
.voice-waveform-visual {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 24px;
  cursor: pointer;
  padding: 2px 0;
  position: relative;
  overflow: hidden;
}

.voice-bar-col {
  width: 2.5px;
  min-width: 2.5px;
  border-radius: 2px;
  background: rgba(134, 150, 160, 0.4);
  transition: height 0.15s ease, background 0.1s linear;
}

.voice-bar-col.played {
  background: var(--accent-primary);
}

.voice-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.voice-scramble-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-secondary);
  background: rgba(83, 189, 235, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
}

/* Attachment Menu & Attachment Bubbles */
.attachment-popup-menu {
  position: absolute;
  bottom: 64px;
  left: 12px;
  z-index: 999;
}

.attachment-popup-menu.open {
  display: block !important;
}

.attachment-popup-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 1;
}

.attachment-popup-content {
  position: relative;
  z-index: 2;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  animation: fadeUp 0.16s ease;
  min-width: 250px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.attachment-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: transform 0.12s ease;
}

.attachment-item:active {
  transform: scale(0.92);
}

.attachment-icon-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

/* Bottom Chat Composer Bar */
.chat-composer-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  padding-right: calc(10px + env(safe-area-inset-right, 0px));
  background: var(--header-bg);
  border-top: 1px solid var(--border-subtle);
}

.composer-pill {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: none;
  border-radius: 24px;
  padding: 4px 12px;
  gap: 6px;
}

.composer-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 16px;
  padding: 7px 4px;
  outline: none;
}

.composer-icon-btn {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 50%;
  color: var(--text-secondary);
}


.dynamic-send-mic-btn.recording {
  background: linear-gradient(135deg, #ff1a40, #ff5e3a) !important;
  box-shadow: 0 0 16px rgba(255, 26, 64, 0.7) !important;
  animation: booff-pulse-rec 1.2s infinite alternate ease-in-out;
  color: #fff !important;
}

@keyframes booff-pulse-rec {
  0% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(255, 26, 64, 0.5);
  }
  100% {
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(255, 26, 64, 0.85);
  }
}

.dynamic-send-mic-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--accent-primary);
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 2px;
  margin-right: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.12s ease, background 0.15s ease;
}

.dynamic-send-mic-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

[data-theme="black-yellow"] .dynamic-send-mic-btn {
  color: #0c0d0e;
}

/* Voice Recording HUD Bar */
.voice-recording-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  background: #170b14;
  border-top: 1px solid var(--accent-danger);
  color: #fff;
}

.voice-recording-bar.active {
  display: flex;
}

.voice-rec-indicator {
  color: #ff2a6d;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ===============================================================
   STANZE PREFERITE & SUB-TAB NAVIGATION (Cross-Theme Architecture)
   =============================================================== */
.rooms-choice-card {
  cursor: pointer;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s ease;
}
.rooms-choice-card:hover,
.rooms-choice-card:active {
  transform: translateY(-1px);
}
.rooms-choice-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(0, 168, 132, 0.12);
  color: var(--accent-primary);
  flex-shrink: 0;
}
.rooms-choice-title {
  font-weight: 900;
  font-size: 0.96rem;
  color: var(--accent-primary);
  margin-bottom: 2px;
}
.rooms-choice-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.rooms-choice-arrow {
  display: flex;
  align-items: center;
  color: var(--accent-primary);
}
.rooms-choice-arrow svg {
  width: 16px;
  height: 16px;
}

/* Starred Room Item Card in Saved List */
.starred-room-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

/* Base Active Filter in Subnav */
.top-action-btn.active-filter {
  background: var(--accent-primary) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

/* ---------------------------------------------------------------
   THEME 1: CUORE (pink-white) - Rooms & Voice Recording Harmonization
   --------------------------------------------------------------- */
[data-theme="pink-white"] .rooms-choice-card.create {
  background: #ffffff !important;
  border: 1.5px solid rgba(255, 45, 117, 0.25) !important;
  box-shadow: 0 2px 10px rgba(255, 45, 117, 0.06) !important;
}
[data-theme="pink-white"] .rooms-choice-card.create .rooms-choice-icon-wrap {
  background: rgba(255, 45, 117, 0.12) !important;
  color: #ff2d75 !important;
}
[data-theme="pink-white"] .rooms-choice-card.create .rooms-choice-title {
  color: #ff2d75 !important;
}
[data-theme="pink-white"] .rooms-choice-card.create .rooms-choice-desc {
  color: #64566c !important;
}
[data-theme="pink-white"] .rooms-choice-card.create .rooms-choice-arrow {
  color: #ff2d75 !important;
}

[data-theme="pink-white"] .rooms-choice-card.saved {
  background: #ffffff !important;
  border: 1.5px solid rgba(255, 45, 117, 0.35) !important;
  box-shadow: 0 2px 12px rgba(255, 45, 117, 0.1) !important;
}
[data-theme="pink-white"] .rooms-choice-card.saved .rooms-choice-icon-wrap {
  background: rgba(255, 45, 117, 0.15) !important;
  color: #ff2d75 !important;
}
[data-theme="pink-white"] .rooms-choice-card.saved .rooms-choice-title {
  color: #ff2d75 !important;
}
[data-theme="pink-white"] .rooms-choice-card.saved .rooms-choice-desc {
  color: #64566c !important;
}
[data-theme="pink-white"] .rooms-choice-card.saved .rooms-choice-arrow {
  color: #ff2d75 !important;
}

[data-theme="pink-white"] .starred-room-card {
  background: #ffffff !important;
  border: 1.5px solid rgba(255, 45, 117, 0.3) !important;
  box-shadow: 0 2px 10px rgba(255, 45, 117, 0.08) !important;
  color: #1e1924 !important;
}
[data-theme="pink-white"] .starred-room-card .contact-star-btn svg {
  color: #ff2d75 !important;
}
[data-theme="pink-white"] .top-action-btn.active-filter {
  background: #ff2d75 !important;
  color: #ffffff !important;
  border: 1.5px solid #ff2d75 !important;
}

[data-theme="pink-white"] .dynamic-send-mic-btn.recording {
  background: #ffffff !important;
  color: #ff2d75 !important;
  border: 2px solid #ff2d75 !important;
  box-shadow: 0 0 16px rgba(255, 45, 117, 0.6) !important;
}
[data-theme="pink-white"] .dynamic-send-mic-btn.recording svg {
  stroke: #ff2d75 !important;
  color: #ff2d75 !important;
}
[data-theme="pink-white"] .voice-recording-bar {
  background: #ffffff !important;
  border-top: 1.5px solid rgba(255, 45, 117, 0.35) !important;
  color: #1e1924 !important;
}
[data-theme="pink-white"] .voice-recording-bar .voice-rec-indicator {
  color: #ff2d75 !important;
}
[data-theme="pink-white"] .voice-recording-bar #voiceRecTimer {
  color: #1e1924 !important;
}
[data-theme="pink-white"] .voice-recording-bar .icon-btn.accent {
  background: #ff2d75 !important;
  color: #ffffff !important;
  border: 1px solid #ff2d75 !important;
}

/* ---------------------------------------------------------------
   THEME 2: SOLE (light / bianco-nero) - Rooms & Voice Recording Harmonization
   --------------------------------------------------------------- */
[data-theme="light"] .rooms-choice-card.create,
[data-theme="bianco-nero"] .rooms-choice-card.create {
  background: #ffffff !important;
  border: 1.5px solid #0c0d0e !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] .rooms-choice-card.create .rooms-choice-icon-wrap,
[data-theme="bianco-nero"] .rooms-choice-card.create .rooms-choice-icon-wrap {
  background: #0c0d0e !important;
  color: #ffffff !important;
}
[data-theme="light"] .rooms-choice-card.create .rooms-choice-title,
[data-theme="bianco-nero"] .rooms-choice-card.create .rooms-choice-title {
  color: #0c0d0e !important;
}
[data-theme="light"] .rooms-choice-card.create .rooms-choice-desc,
[data-theme="bianco-nero"] .rooms-choice-card.create .rooms-choice-desc {
  color: #4b5563 !important;
}
[data-theme="light"] .rooms-choice-card.create .rooms-choice-arrow,
[data-theme="bianco-nero"] .rooms-choice-card.create .rooms-choice-arrow {
  color: #0c0d0e !important;
}

[data-theme="light"] .rooms-choice-card.saved,
[data-theme="bianco-nero"] .rooms-choice-card.saved {
  background: #ffffff !important;
  border: 1.5px solid #0c0d0e !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}
[data-theme="light"] .rooms-choice-card.saved .rooms-choice-icon-wrap,
[data-theme="bianco-nero"] .rooms-choice-card.saved .rooms-choice-icon-wrap {
  background: #0c0d0e !important;
  color: #ffffff !important;
}
[data-theme="light"] .rooms-choice-card.saved .rooms-choice-title,
[data-theme="bianco-nero"] .rooms-choice-card.saved .rooms-choice-title {
  color: #0c0d0e !important;
}
[data-theme="light"] .rooms-choice-card.saved .rooms-choice-desc,
[data-theme="bianco-nero"] .rooms-choice-card.saved .rooms-choice-desc {
  color: #4b5563 !important;
}
[data-theme="light"] .rooms-choice-card.saved .rooms-choice-arrow,
[data-theme="bianco-nero"] .rooms-choice-card.saved .rooms-choice-arrow {
  color: #0c0d0e !important;
}

[data-theme="light"] .starred-room-card,
[data-theme="bianco-nero"] .starred-room-card {
  background: #ffffff !important;
  border: 1.5px solid #0c0d0e !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  color: #0c0d0e !important;
}
[data-theme="light"] .starred-room-card .contact-star-btn svg,
[data-theme="bianco-nero"] .starred-room-card .contact-star-btn svg {
  color: #0c0d0e !important;
}
[data-theme="light"] .top-action-btn.active-filter,
[data-theme="bianco-nero"] .top-action-btn.active-filter {
  background: #0c0d0e !important;
  color: #ffffff !important;
  border: 1.5px solid #0c0d0e !important;
}

[data-theme="light"] .dynamic-send-mic-btn.recording,
[data-theme="bianco-nero"] .dynamic-send-mic-btn.recording {
  background: #0c0d0e !important;
  color: #ffffff !important;
  border: 1.5px solid #0c0d0e !important;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.5) !important;
}
[data-theme="light"] .voice-recording-bar,
[data-theme="bianco-nero"] .voice-recording-bar {
  background: #ffffff !important;
  border-top: 1.5px solid #0c0d0e !important;
  color: #0c0d0e !important;
}
[data-theme="light"] .voice-recording-bar .voice-rec-indicator,
[data-theme="bianco-nero"] .voice-recording-bar .voice-rec-indicator {
  color: #0c0d0e !important;
}
[data-theme="light"] .voice-recording-bar #voiceRecTimer,
[data-theme="bianco-nero"] .voice-recording-bar #voiceRecTimer {
  color: #0c0d0e !important;
}
[data-theme="light"] .voice-recording-bar .icon-btn.accent,
[data-theme="bianco-nero"] .voice-recording-bar .icon-btn.accent {
  background: #0c0d0e !important;
  color: #ffffff !important;
  border: 1px solid #0c0d0e !important;
}

/* ---------------------------------------------------------------
   THEME 3: FUOCO (nero-rosso / tri-rosso) - Rooms & Voice Recording Harmonization
   --------------------------------------------------------------- */
[data-theme="nero-rosso"] .rooms-choice-card.create,
[data-theme="tri-rosso"] .rooms-choice-card.create {
  background: #16181b !important;
  border: 1.5px solid rgba(239, 68, 68, 0.35) !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.1) !important;
}
[data-theme="nero-rosso"] .rooms-choice-card.create .rooms-choice-icon-wrap,
[data-theme="tri-rosso"] .rooms-choice-card.create .rooms-choice-icon-wrap {
  background: rgba(239, 68, 68, 0.16) !important;
  color: #ef4444 !important;
}
[data-theme="nero-rosso"] .rooms-choice-card.create .rooms-choice-title,
[data-theme="tri-rosso"] .rooms-choice-card.create .rooms-choice-title {
  color: #ef4444 !important;
}
[data-theme="nero-rosso"] .rooms-choice-card.create .rooms-choice-desc,
[data-theme="tri-rosso"] .rooms-choice-card.create .rooms-choice-desc {
  color: #94a3b8 !important;
}
[data-theme="nero-rosso"] .rooms-choice-card.create .rooms-choice-arrow,
[data-theme="tri-rosso"] .rooms-choice-card.create .rooms-choice-arrow {
  color: #ef4444 !important;
}

[data-theme="nero-rosso"] .rooms-choice-card.saved,
[data-theme="tri-rosso"] .rooms-choice-card.saved {
  background: #16181b !important;
  border: 1.5px solid rgba(239, 68, 68, 0.45) !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.15) !important;
}
[data-theme="nero-rosso"] .rooms-choice-card.saved .rooms-choice-icon-wrap,
[data-theme="tri-rosso"] .rooms-choice-card.saved .rooms-choice-icon-wrap {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #ef4444 !important;
}
[data-theme="nero-rosso"] .rooms-choice-card.saved .rooms-choice-title,
[data-theme="tri-rosso"] .rooms-choice-card.saved .rooms-choice-title {
  color: #ef4444 !important;
}
[data-theme="nero-rosso"] .rooms-choice-card.saved .rooms-choice-desc,
[data-theme="tri-rosso"] .rooms-choice-card.saved .rooms-choice-desc {
  color: #94a3b8 !important;
}
[data-theme="nero-rosso"] .rooms-choice-card.saved .rooms-choice-arrow,
[data-theme="tri-rosso"] .rooms-choice-card.saved .rooms-choice-arrow {
  color: #ef4444 !important;
}

[data-theme="nero-rosso"] .starred-room-card,
[data-theme="tri-rosso"] .starred-room-card {
  background: #16181b !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.12) !important;
  color: #ffffff !important;
}
[data-theme="nero-rosso"] .starred-room-card .contact-star-btn svg,
[data-theme="tri-rosso"] .starred-room-card .contact-star-btn svg {
  color: #ef4444 !important;
}
[data-theme="nero-rosso"] .top-action-btn.active-filter,
[data-theme="tri-rosso"] .top-action-btn.active-filter {
  background: #ef4444 !important;
  color: #ffffff !important;
  border: 1px solid #ef4444 !important;
}

[data-theme="nero-rosso"] .dynamic-send-mic-btn.recording,
[data-theme="tri-rosso"] .dynamic-send-mic-btn.recording {
  background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.8) !important;
}
[data-theme="nero-rosso"] .dynamic-send-mic-btn.recording svg,
[data-theme="tri-rosso"] .dynamic-send-mic-btn.recording svg {
  stroke: #ffffff !important;
  color: #ffffff !important;
}
[data-theme="nero-rosso"] .voice-recording-bar,
[data-theme="tri-rosso"] .voice-recording-bar {
  background: #16181b !important;
  border-top: 1.5px solid rgba(239, 68, 68, 0.5) !important;
  color: #ffffff !important;
}
[data-theme="nero-rosso"] .voice-recording-bar .voice-rec-indicator,
[data-theme="tri-rosso"] .voice-recording-bar .voice-rec-indicator {
  color: #ef4444 !important;
}
[data-theme="nero-rosso"] .voice-recording-bar #voiceRecTimer,
[data-theme="tri-rosso"] .voice-recording-bar #voiceRecTimer {
  color: #ffffff !important;
}
[data-theme="nero-rosso"] .voice-recording-bar .icon-btn.accent,
[data-theme="tri-rosso"] .voice-recording-bar .icon-btn.accent {
  background: #ef4444 !important;
  color: #ffffff !important;
  border: 1px solid #ef4444 !important;
}

/* ---------------------------------------------------------------
   THEME 4: CERCHIO CON ROMBO (white-green) - Rooms & Voice Recording Harmonization
   --------------------------------------------------------------- */
[data-theme="white-green"] .rooms-choice-card.create {
  background: #111b21 !important;
  border: 1.5px solid rgba(0, 132, 255, 0.35) !important;
  box-shadow: 0 0 10px rgba(0, 132, 255, 0.1) !important;
}
[data-theme="white-green"] .rooms-choice-card.create .rooms-choice-icon-wrap {
  background: rgba(0, 132, 255, 0.16) !important;
  color: #0084ff !important;
}
[data-theme="white-green"] .rooms-choice-card.create .rooms-choice-title {
  color: #0084ff !important;
}
[data-theme="white-green"] .rooms-choice-card.create .rooms-choice-desc {
  color: #94a3b8 !important;
}
[data-theme="white-green"] .rooms-choice-card.create .rooms-choice-arrow {
  color: #0084ff !important;
}

[data-theme="white-green"] .rooms-choice-card.saved {
  background: #111b21 !important;
  border: 1.5px solid rgba(0, 132, 255, 0.45) !important;
  box-shadow: 0 0 12px rgba(0, 132, 255, 0.15) !important;
}
[data-theme="white-green"] .rooms-choice-card.saved .rooms-choice-icon-wrap {
  background: rgba(0, 132, 255, 0.18) !important;
  color: #0084ff !important;
}
[data-theme="white-green"] .rooms-choice-card.saved .rooms-choice-title {
  color: #0084ff !important;
}
[data-theme="white-green"] .rooms-choice-card.saved .rooms-choice-desc {
  color: #94a3b8 !important;
}
[data-theme="white-green"] .rooms-choice-card.saved .rooms-choice-arrow {
  color: #0084ff !important;
}

[data-theme="white-green"] .starred-room-card {
  background: #111b21 !important;
  border: 1px solid rgba(0, 132, 255, 0.35) !important;
  box-shadow: 0 0 10px rgba(0, 132, 255, 0.12) !important;
  color: #ffffff !important;
}
[data-theme="white-green"] .starred-room-card .contact-star-btn svg {
  color: #0084ff !important;
}
[data-theme="white-green"] .top-action-btn.active-filter {
  background: #0084ff !important;
  color: #ffffff !important;
  border: 1px solid #0084ff !important;
}

[data-theme="white-green"] .dynamic-send-mic-btn.recording {
  background: linear-gradient(135deg, #0084ff, #00c3ff) !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(0, 132, 255, 0.85) !important;
}
[data-theme="white-green"] .voice-recording-bar {
  background: #111b21 !important;
  border-top: 1.5px solid rgba(0, 132, 255, 0.5) !important;
  color: #ffffff !important;
}
[data-theme="white-green"] .voice-recording-bar .voice-rec-indicator {
  color: #0084ff !important;
}
[data-theme="white-green"] .voice-recording-bar #voiceRecTimer {
  color: #ffffff !important;
}
[data-theme="white-green"] .voice-recording-bar .icon-btn.accent {
  background: #0084ff !important;
  color: #ffffff !important;
  border: 1px solid #0084ff !important;
}

/* ---------------------------------------------------------------
   THEME 5: FULMINE (black-yellow) - Rooms & Voice Recording Harmonization
   --------------------------------------------------------------- */
[data-theme="black-yellow"] .rooms-choice-card.create {
  background: #16181b !important;
  border: 1.5px solid rgba(245, 158, 11, 0.35) !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.1) !important;
}
[data-theme="black-yellow"] .rooms-choice-card.create .rooms-choice-icon-wrap {
  background: rgba(245, 158, 11, 0.16) !important;
  color: #f59e0b !important;
}
[data-theme="black-yellow"] .rooms-choice-card.create .rooms-choice-title {
  color: #f59e0b !important;
}
[data-theme="black-yellow"] .rooms-choice-card.create .rooms-choice-desc {
  color: #94a3b8 !important;
}
[data-theme="black-yellow"] .rooms-choice-card.create .rooms-choice-arrow {
  color: #f59e0b !important;
}

[data-theme="black-yellow"] .rooms-choice-card.saved {
  background: #16181b !important;
  border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.15) !important;
}
[data-theme="black-yellow"] .rooms-choice-card.saved .rooms-choice-icon-wrap {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #f59e0b !important;
}
[data-theme="black-yellow"] .rooms-choice-card.saved .rooms-choice-title {
  color: #f59e0b !important;
}
[data-theme="black-yellow"] .rooms-choice-card.saved .rooms-choice-desc {
  color: #94a3b8 !important;
}
[data-theme="black-yellow"] .rooms-choice-card.saved .rooms-choice-arrow {
  color: #f59e0b !important;
}

[data-theme="black-yellow"] .starred-room-card {
  background: #16181b !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.12) !important;
  color: #ffffff !important;
}
[data-theme="black-yellow"] .starred-room-card .contact-star-btn svg {
  color: #f59e0b !important;
}
[data-theme="black-yellow"] .top-action-btn.active-filter {
  background: #f59e0b !important;
  color: #0c0d0e !important;
  font-weight: 900 !important;
  border: 1px solid #f59e0b !important;
}

[data-theme="black-yellow"] .dynamic-send-mic-btn.recording {
  background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
  color: #0c0d0e !important;
  font-weight: 900 !important;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.85) !important;
}
[data-theme="black-yellow"] .voice-recording-bar {
  background: #16181b !important;
  border-top: 1.5px solid rgba(245, 158, 11, 0.5) !important;
  color: #ffffff !important;
}
[data-theme="black-yellow"] .voice-recording-bar .voice-rec-indicator {
  color: #f59e0b !important;
}
[data-theme="black-yellow"] .voice-recording-bar #voiceRecTimer {
  color: #ffffff !important;
}
[data-theme="black-yellow"] .voice-recording-bar .icon-btn.accent {
  background: #f59e0b !important;
  color: #0c0d0e !important;
  font-weight: 800 !important;
  border: 1px solid #f59e0b !important;
}

/* ---------------------------------------------------------------
   THEME 6: LUNA (dark / cyber-cyan) - Rooms & Voice Recording Harmonization
   --------------------------------------------------------------- */
[data-theme="dark"] .rooms-choice-card.create,
[data-theme="cyber-cyan"] .rooms-choice-card.create {
  background: #0e1626 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.08) !important;
}
[data-theme="dark"] .rooms-choice-card.create .rooms-choice-icon-wrap,
[data-theme="cyber-cyan"] .rooms-choice-card.create .rooms-choice-icon-wrap {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}
[data-theme="dark"] .rooms-choice-card.create .rooms-choice-title,
[data-theme="cyber-cyan"] .rooms-choice-card.create .rooms-choice-title {
  color: #ffffff !important;
}
[data-theme="dark"] .rooms-choice-card.create .rooms-choice-desc,
[data-theme="cyber-cyan"] .rooms-choice-card.create .rooms-choice-desc {
  color: #94a3b8 !important;
}
[data-theme="dark"] .rooms-choice-card.create .rooms-choice-arrow,
[data-theme="cyber-cyan"] .rooms-choice-card.create .rooms-choice-arrow {
  color: #ffffff !important;
}

[data-theme="dark"] .rooms-choice-card.saved,
[data-theme="cyber-cyan"] .rooms-choice-card.saved {
  background: #0e1626 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.1) !important;
}
[data-theme="dark"] .rooms-choice-card.saved .rooms-choice-icon-wrap,
[data-theme="cyber-cyan"] .rooms-choice-card.saved .rooms-choice-icon-wrap {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}
[data-theme="dark"] .rooms-choice-card.saved .rooms-choice-title,
[data-theme="cyber-cyan"] .rooms-choice-card.saved .rooms-choice-title {
  color: #ffffff !important;
}
[data-theme="dark"] .rooms-choice-card.saved .rooms-choice-desc,
[data-theme="cyber-cyan"] .rooms-choice-card.saved .rooms-choice-desc {
  color: #94a3b8 !important;
}
[data-theme="dark"] .rooms-choice-card.saved .rooms-choice-arrow,
[data-theme="cyber-cyan"] .rooms-choice-card.saved .rooms-choice-arrow {
  color: #ffffff !important;
}

[data-theme="dark"] .starred-room-card,
[data-theme="cyber-cyan"] .starred-room-card {
  background: #0e1626 !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}
[data-theme="dark"] .starred-room-card .contact-star-btn svg,
[data-theme="cyber-cyan"] .starred-room-card .contact-star-btn svg {
  color: #ffffff !important;
}
[data-theme="dark"] .top-action-btn.active-filter,
[data-theme="cyber-cyan"] .top-action-btn.active-filter {
  background: #ffffff !important;
  color: #0c0d0e !important;
  font-weight: 900 !important;
  border: 1px solid #ffffff !important;
}

[data-theme="dark"] .dynamic-send-mic-btn.recording,
[data-theme="cyber-cyan"] .dynamic-send-mic-btn.recording {
  background: #ffffff !important;
  color: #0c0d0e !important;
  font-weight: 900 !important;
  border: 1.5px solid #ffffff !important;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.8) !important;
}
[data-theme="dark"] .voice-recording-bar,
[data-theme="cyber-cyan"] .voice-recording-bar {
  background: #0e1626 !important;
  border-top: 1.5px solid rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
}
[data-theme="dark"] .voice-recording-bar .voice-rec-indicator,
[data-theme="cyber-cyan"] .voice-recording-bar .voice-rec-indicator {
  color: #ffffff !important;
}
[data-theme="dark"] .voice-recording-bar #voiceRecTimer,
[data-theme="cyber-cyan"] .voice-recording-bar #voiceRecTimer {
  color: #ffffff !important;
}
[data-theme="dark"] .voice-recording-bar .icon-btn.accent,
[data-theme="cyber-cyan"] .voice-recording-bar .icon-btn.accent {
  background: #ffffff !important;
  color: #0c0d0e !important;
  font-weight: 800 !important;
  border: 1px solid #ffffff !important;
}

/* Modals & Sheets */
.booff-modal-backdrop,
.booff-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 14, 0.85);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 80;
}

.booff-modal-backdrop.open,
.booff-modal-backdrop.open {
  display: flex;
}

.booff-modal-card,
.booff-modal-card {
  width: 100%;
  max-width: 440px;
  max-height: 90dvh;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-card);
}

/* Fullscreen HD Camera Studio (Point #3a Fix) */
.camera-fullscreen-backdrop {
  padding: 0 !important;
  background: #000 !important;
}

.camera-fullscreen-card {
  width: 100%;
  max-width: 560px;
  height: 100dvh;
  max-height: 100dvh;
  background: #03070b;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  padding: 0;
  border-radius: 0;
}

.camera-top-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(4, 10, 16, 0.88), transparent);
  z-index: 5;
  gap: 8px;
}

.camera-viewfinder-wrap {
  flex: 1;
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020609;
  overflow: hidden;
}

#cameraLiveCanvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.camera-bottom-hud {
  padding: 12px 14px 18px;
  background: linear-gradient(0deg, rgba(4, 10, 16, 0.96) 75%, transparent);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* ==========================================================================
   CAMERA STUDIO HUD — THEMED STYLING COHERENCE
   (Video, Ribalta, Mosaico, Termico, Shadow per Cuore, Fuoco, Cerchio Rombo, Fulmine, Sole, Luna)
   ========================================================================== */
.camera-top-hud .icon-btn,
.camera-bottom-hud .icon-btn {
  background: rgba(14, 18, 24, 0.78) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 8px !important;
  font-weight: 600;
  transition: all 0.18s ease;
}
.camera-top-hud .icon-btn:hover,
.camera-bottom-hud .icon-btn:hover {
  background: rgba(25, 32, 42, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
}
.camera-top-hud .icon-btn.accent,
.camera-bottom-hud .icon-btn.accent {
  background: var(--accent-primary) !important;
  border-color: var(--accent-primary) !important;
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 0 14px var(--accent-primary) !important;
}
.camera-top-hud .icon-btn.danger,
.camera-bottom-hud .icon-btn.danger {
  background: rgba(239, 68, 68, 0.85) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4) !important;
}

/* Stile Cuore (pink-white) Camera HUD */
[data-theme="pink-white"] .camera-top-hud .icon-btn,
[data-theme="pink-white"] .camera-bottom-hud .icon-btn {
  background: rgba(36, 12, 26, 0.85) !important;
  border: 1px solid rgba(255, 45, 117, 0.35) !important;
  color: #ffe4f0 !important;
}
[data-theme="pink-white"] .camera-top-hud .icon-btn.accent,
[data-theme="pink-white"] .camera-bottom-hud .icon-btn.accent {
  background: #ff2d75 !important;
  border-color: #ff2d75 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(255, 45, 117, 0.65) !important;
}
[data-theme="pink-white"] #camMainShutterBtn {
  background: linear-gradient(135deg, #ff2d75, #ff5c93) !important;
  border-color: #ff2d75 !important;
  color: #ffffff !important;
  box-shadow: 0 0 20px rgba(255, 45, 117, 0.65) !important;
}
[data-theme="pink-white"] #camVoice165Btn.accent {
  background: rgba(255, 45, 117, 0.22) !important;
  border-color: #ff2d75 !important;
  color: #ff2d75 !important;
}

/* Stile Fuoco (nero-rosso / tri-rosso) Camera HUD */
[data-theme="nero-rosso"] .camera-top-hud .icon-btn,
[data-theme="nero-rosso"] .camera-bottom-hud .icon-btn,
[data-theme="tri-rosso"] .camera-top-hud .icon-btn,
[data-theme="tri-rosso"] .camera-bottom-hud .icon-btn {
  background: rgba(32, 10, 10, 0.85) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  color: #fecaca !important;
}
[data-theme="nero-rosso"] .camera-top-hud .icon-btn.accent,
[data-theme="nero-rosso"] .camera-bottom-hud .icon-btn.accent,
[data-theme="tri-rosso"] .camera-top-hud .icon-btn.accent,
[data-theme="tri-rosso"] .camera-bottom-hud .icon-btn.accent {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.65) !important;
}
[data-theme="nero-rosso"] #camMainShutterBtn,
[data-theme="tri-rosso"] #camMainShutterBtn {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.65) !important;
}
[data-theme="nero-rosso"] #camVoice165Btn.accent,
[data-theme="tri-rosso"] #camVoice165Btn.accent {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: #ef4444 !important;
  color: #ef4444 !important;
}

/* Stile Cerchio con Rombo (white-green) Camera HUD */
[data-theme="white-green"] .camera-top-hud .icon-btn,
[data-theme="white-green"] .camera-bottom-hud .icon-btn {
  background: rgba(10, 24, 40, 0.85) !important;
  border: 1px solid rgba(0, 132, 255, 0.35) !important;
  color: #dbeafe !important;
}
[data-theme="white-green"] .camera-top-hud .icon-btn.accent,
[data-theme="white-green"] .camera-bottom-hud .icon-btn.accent {
  background: #0084ff !important;
  border-color: #0084ff !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(0, 132, 255, 0.65) !important;
}
[data-theme="white-green"] #camMainShutterBtn {
  background: linear-gradient(135deg, #0084ff, #00c3ff) !important;
  border-color: #0084ff !important;
  color: #ffffff !important;
  box-shadow: 0 0 20px rgba(0, 132, 255, 0.65) !important;
}
[data-theme="white-green"] #camVoice165Btn.accent {
  background: rgba(0, 132, 255, 0.22) !important;
  border-color: #0084ff !important;
  color: #00c3ff !important;
}

/* Stile Fulmine (black-yellow / bianco-nero) Camera HUD */
[data-theme="black-yellow"] .camera-top-hud .icon-btn,
[data-theme="black-yellow"] .camera-bottom-hud .icon-btn,
[data-theme="bianco-nero"] .camera-top-hud .icon-btn,
[data-theme="bianco-nero"] .camera-bottom-hud .icon-btn {
  background: rgba(34, 25, 8, 0.85) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #fef3c7 !important;
}
[data-theme="black-yellow"] .camera-top-hud .icon-btn.accent,
[data-theme="black-yellow"] .camera-bottom-hud .icon-btn.accent,
[data-theme="bianco-nero"] .camera-top-hud .icon-btn.accent,
[data-theme="bianco-nero"] .camera-bottom-hud .icon-btn.accent {
  background: #f59e0b !important;
  border-color: #f59e0b !important;
  color: #000000 !important;
  font-weight: 800;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.65) !important;
}
[data-theme="black-yellow"] #camMainShutterBtn,
[data-theme="bianco-nero"] #camMainShutterBtn {
  background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
  border-color: #f59e0b !important;
  color: #000000 !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.65) !important;
}
[data-theme="black-yellow"] #camVoice165Btn.accent,
[data-theme="bianco-nero"] #camVoice165Btn.accent {
  background: rgba(245, 158, 11, 0.22) !important;
  border-color: #f59e0b !important;
  color: #fbbf24 !important;
}

/* Stile Sole (light) Camera HUD */
[data-theme="light"] .camera-top-hud .icon-btn,
[data-theme="light"] .camera-bottom-hud .icon-btn {
  background: rgba(20, 24, 30, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
}
[data-theme="light"] .camera-top-hud .icon-btn.accent,
[data-theme="light"] .camera-bottom-hud .icon-btn.accent {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: #0c0d0e !important;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.5) !important;
}
[data-theme="light"] #camMainShutterBtn {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: #0c0d0e !important;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5) !important;
}

/* Stile Luna (dark) Camera HUD - Monocromo Notturno Bianco & Nero */
[data-theme="dark"] .camera-top-hud .icon-btn,
[data-theme="dark"] .camera-bottom-hud .icon-btn {
  background: rgba(18, 20, 24, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}
[data-theme="dark"] .camera-top-hud .icon-btn.accent,
[data-theme="dark"] .camera-bottom-hud .icon-btn.accent {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: #0c0d0e !important;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.6) !important;
}
[data-theme="dark"] #camMainShutterBtn {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: #0c0d0e !important;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.7) !important;
}
[data-theme="dark"] #camVoice165Btn.accent {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
}

/* Stile Cyber-Cyan Camera HUD */
[data-theme="cyber-cyan"] .camera-top-hud .icon-btn,
[data-theme="cyber-cyan"] .camera-bottom-hud .icon-btn {
  background: rgba(14, 22, 38, 0.85) !important;
  border: 1px solid rgba(0, 240, 255, 0.3) !important;
  color: #e0f2fe !important;
}
[data-theme="cyber-cyan"] .camera-top-hud .icon-btn.accent,
[data-theme="cyber-cyan"] .camera-bottom-hud .icon-btn.accent {
  background: #00f0ff !important;
  border-color: #00f0ff !important;
  color: #050b14 !important;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.6) !important;
}
[data-theme="cyber-cyan"] #camMainShutterBtn {
  background: linear-gradient(135deg, #00f0ff, #00a8ff) !important;
  border-color: #00f0ff !important;
  color: #050b14 !important;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.6) !important;
}

/* Chameleon Icon Disguise & Touchscreen Settings in Stile Sole (100% Monocromo B&W) */
[data-theme="light"] .chameleon-active-preview,
[data-theme="light"] #chameleonActivePreviewBadge {
  background: #ffffff !important;
  border: 1.5px solid #0c0d0e !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}
.chameleon-active-img,
#chameleonActiveIconImg {
  filter: none !important;
}

[data-theme="light"] .chameleon-active-img,
[data-theme="light"] #chameleonActiveIconImg {
  border: 1.5px solid #0c0d0e !important;
  box-shadow: none !important;
  background: #f0f2f5 !important;
  filter: none !important;
}
[data-theme="light"] .chameleon-active-badge,
[data-theme="light"] #chameleonActiveBadge {
  background: #0c0d0e !important;
  color: #ffffff !important;
  border: none !important;
}
[data-theme="light"] #chameleonActiveLabel {
  color: #0c0d0e !important;
}
[data-theme="light"] button[data-chameleon-btn] {
  border: 1px solid #0c0d0e !important;
  color: #0c0d0e !important;
  background: #ffffff !important;
}
[data-theme="light"] button[data-chameleon-btn].accent,
[data-theme="light"] button[data-chameleon-btn].active {
  background: #0c0d0e !important;
  color: #ffffff !important;
  border: 1.5px solid #0c0d0e !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}
[data-theme="light"] #chameleonInstallModal .booff-modal-card {
  background: #ffffff !important;
  color: #0c0d0e !important;
  border: 1.5px solid #0c0d0e !important;
}
[data-theme="light"] #chameleonInstallModal .icon-btn.accent {
  background: #0c0d0e !important;
  color: #ffffff !important;
  border: 1px solid #0c0d0e !important;
}

/* Chameleon Icon Disguise in Stile Cuore (Icona BOOFF Nera su Quadrato Bianco) */
[data-theme="pink-white"] .chameleon-active-preview,
[data-theme="pink-white"] #chameleonActivePreviewBadge {
  background: #ffffff !important;
  border: 1.5px solid rgba(255, 45, 117, 0.25) !important;
  box-shadow: 0 2px 10px rgba(255, 45, 117, 0.08) !important;
}
[data-theme="pink-white"] .chameleon-active-img,
[data-theme="pink-white"] #chameleonActiveIconImg {
  background: #ffffff !important;
  border: 1.5px solid #ff2d75 !important;
  box-shadow: 0 2px 8px rgba(255, 45, 117, 0.15) !important;
  filter: none !important;
}
[data-theme="pink-white"] .chameleon-active-badge,
[data-theme="pink-white"] #chameleonActiveBadge {
  background: #ff2d75 !important;
  color: #ffffff !important;
  border: none !important;
}
[data-theme="pink-white"] #chameleonActiveLabel {
  color: #ff2d75 !important;
}
[data-theme="pink-white"] button[data-chameleon-btn] {
  border: 1px solid rgba(255, 45, 117, 0.28) !important;
  color: #ff2d75 !important;
  background: #ffffff !important;
}
[data-theme="pink-white"] button[data-chameleon-btn].accent,
[data-theme="pink-white"] button[data-chameleon-btn].active {
  background: #ff2d75 !important;
  color: #ffffff !important;
  border: 1.5px solid #ff2d75 !important;
  box-shadow: 0 2px 8px rgba(255, 45, 117, 0.25) !important;
}

/* Pulsante SALVA TUTTO (Impostazioni Stealth) ad altissima leggibilità */
.save-all-stealth-btn {
  width: 100% !important;
  padding: 13px 16px !important;
  font-weight: 900 !important;
  font-size: 0.88rem !important;
  letter-spacing: 0.5px !important;
  min-height: 48px !important;
  touch-action: manipulation !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  text-align: center !important;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease !important;
}

[data-theme="light"] .save-all-stealth-btn {
  background: #0c0d0e !important;
  color: #ffffff !important;
  border: 1.5px solid #0c0d0e !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}
[data-theme="light"] .save-all-stealth-btn:active {
  background: #23272a !important;
  transform: scale(0.98) !important;
}

[data-theme="pink-white"] .save-all-stealth-btn {
  background: #ff2d75 !important;
  color: #ffffff !important;
  border: 1.5px solid #ff2d75 !important;
  box-shadow: 0 4px 14px rgba(255, 45, 117, 0.35) !important;
}
[data-theme="pink-white"] .save-all-stealth-btn:active {
  background: #e01b5f !important;
  transform: scale(0.98) !important;
}

/* Top Incoming BOOM Notification Banner */
.incoming-alert-banner {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 20px);
  max-width: 520px;
  background: linear-gradient(135deg, #1b0916, #2d0c22);
  border: 2px solid var(--accent-danger);
  border-radius: 14px;
  padding: 11px 14px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  z-index: 120;
  box-shadow: 0 10px 30px rgba(255, 42, 109, 0.45);
}

.incoming-alert-banner.visible {
  display: flex;
}

/* Abundant Seal Generator Grid (Point #7) */
.seal-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.seal-preset-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 4px;
  font-size: 1.35rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-primary);
}

.seal-preset-btn.active {
  border-color: var(--accent-primary);
  background: rgba(0, 255, 157, 0.18);
  box-shadow: 0 0 10px rgba(0, 255, 157, 0.25);
}

/* Stealth Cards */
.stealth-section-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px;
  margin: 10px 14px 0;
  flex-shrink: 0;
  box-sizing: border-box;
  width: calc(100% - 28px);
}

/* Fullscreen App Launch PIN Lock Overlay (Point #7) */
.app-pin-lock-overlay {
  position: fixed;
  inset: 0;
  background: #050c12;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 190;
}

.app-pin-lock-overlay.open {
  display: flex;
}

/* Privacy Blur Shield (Anti-Screenshot when app loses focus) */
.privacy-blur-shield {
  position: fixed;
  inset: 0;
  background: rgba(4, 10, 16, 0.96);
  backdrop-filter: blur(22px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  text-align: center;
}

.privacy-blur-shield.active {
  display: flex;
}

/* ==========================================================================
   DEDICATED IPHONE / IOS RESOLUTION & STATUS-BAR SAFE AREA ADAPTATION
   Applies STRICTLY to iPhone / iPad / iOS WebKit. Android & Desktop unaffected.
   ========================================================================== */
@supports (-webkit-touch-callout: none) {
  .booff-app,
  .booff-app {
    padding-top: 0 !important;
  }

  .booff-topbar,
  .booff-topbar {
    padding-top: max(env(safe-area-inset-top, 0px), 50px) !important;
    min-height: calc(56px + max(env(safe-area-inset-top, 0px), 50px)) !important;
  }

  .topbar-brand-center {
    top: auto !important;
    bottom: 16px !important;
    transform: translateX(-50%) !important;
  }

  .chat-room-header {
    padding-top: max(env(safe-area-inset-top, 0px), 50px) !important;
    min-height: calc(60px + max(env(safe-area-inset-top, 0px), 50px)) !important;
  }

  .camera-studio-topbar {
    padding-top: max(env(safe-area-inset-top, 0px), 50px) !important;
  }

  .app-pin-lock-overlay {
    padding-top: max(env(safe-area-inset-top, 0px), 50px) !important;
  }
}

html.is-ios .booff-app,
html.is-ios .booff-app {
  padding-top: 0 !important;
}

html.is-ios .booff-topbar,
html.is-ios .booff-topbar {
  padding-top: max(env(safe-area-inset-top, 0px), 50px) !important;
  min-height: calc(56px + max(env(safe-area-inset-top, 0px), 50px)) !important;
}

html.is-ios .topbar-brand-center {
  top: auto !important;
  bottom: 16px !important;
  transform: translateX(-50%) !important;
}

html.is-ios .chat-room-header {
  padding-top: max(env(safe-area-inset-top, 0px), 50px) !important;
  min-height: calc(60px + max(env(safe-area-inset-top, 0px), 50px)) !important;
}

html.is-ios .camera-studio-topbar {
  padding-top: max(env(safe-area-inset-top, 0px), 50px) !important;
}

/* iOS & Touch Screen Momentum Scrolling & Bounce Containment */
#chatMessagesContainer,
.tab-content,
.booff-modal-card,
.contacts-list,
.rooms-list,
.radar-peers-list {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* iOS Safari: Prevent Auto-Zoom on Form Inputs */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* Touch Action Ergonomics (Eliminates 300ms tap delay & iOS callouts) */
button,
.icon-btn,
.tab-btn,
.composer-icon-btn,
.frameless-icon-btn,
.header-action-icon-btn {
  touch-action: manipulation;
  -webkit-touch-callout: none;
}
