.chat-panel {
  width: min(600px, 100vw);
  background: var(--bg-secondary);
  box-shadow: -16px 0 44px rgba(0, 0, 0, 0.36);
}
body.chat-autostart-reserved .main {
  padding-right: calc(32px + min(600px, 100vw));
}
body.chat-autostart-reserved.chat-fullscreen .main {
  padding-right: 32px;
}
.chat-fab {
  color: var(--on-accent);
  box-shadow: 0 12px 28px -8px color-mix(in srgb, var(--accent) 55%, transparent);
}
.chat-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -10px color-mix(in srgb, var(--accent) 65%, transparent);
}
.chat-fab svg {
  stroke: currentColor;
}

.view-btn.active,
.sex-toggle-btn.active,
.unit-toggle-btn.active,
.time-toggle-btn.active,
.range-toggle-btn.active,
.range-btn.active,
.settings-theme-btn.active,
.ai-provider-btn.active,
.emf-room-tab.active,
.cl-tag-chip.active,
.chat-hd-btn.active,
.welcome-sex-btn.active,
.onboarding-sex-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

@media (min-width: 1400px) {
  .chat-panel { width: 600px; }
  body.chat-autostart-reserved .main { padding-right: calc(32px + 600px); }
  body.chat-autostart-reserved.chat-fullscreen .main { padding-right: 32px; }
}
@media (max-width: 768px) {
  .chat-panel:not(.open) {
    display: none;
  }
  .chat-panel {
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    border-left: 0;
  }
  body.chat-autostart-reserved .main { padding-right: 0; }
  body.chat-autostart-reserved.chat-fullscreen .main { padding-right: 0; }
}
body.chat-autostart-reserved:has(#chat-thread-rail.open) .main {
  padding-right: calc(32px + min(820px, 100vw));
}
body.chat-autostart-reserved.chat-fullscreen:has(#chat-thread-rail.open) .main {
  padding-right: 32px;
}
@media (max-width: 768px) {
  body.chat-autostart-reserved:has(#chat-thread-rail.open) .main { padding-right: 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
