/* The help bubble. Lives on the app and Settings; uses the app's tokens with
   its own fallbacks so it reads the same in both rooms. */
.rh-support { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40; font-family: var(--sans, -apple-system, "Segoe UI", system-ui, sans-serif); }
.rh-support-launch {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px 11px 13px; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 99px;
  color: var(--text, #fff); background: var(--surface, #171025); box-shadow: 0 10px 30px rgba(0,0,0,.45); cursor: pointer; font: 700 13px inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.rh-support-launch:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(0,0,0,.5); }
.rh-support-launch svg { width: 18px; height: 18px; color: var(--hot, #ff2e86); }
.rh-support.open .rh-support-launch { display: none; }
.rh-support-panel {
  width: min(360px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 32px)); display: flex; flex-direction: column;
  background: var(--surface, #171025); border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.55); overflow: hidden;
  animation: rhSupportIn .18s ease-out;
}
.rh-support-panel[hidden] { display: none; }
@keyframes rhSupportIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.rh-support-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 14px 10px 16px; border-bottom: 1px solid var(--line, rgba(255,255,255,.1)); }
.rh-support-head strong { display: block; color: var(--text, #fff); font-size: 14px; }
.rh-support-head span { display: block; margin-top: 2px; color: var(--muted, #b3a3c4); font-size: 12px; line-height: 1.4; }
.rh-support-close { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--muted, #b3a3c4); font-size: 20px; line-height: 1; cursor: pointer; }
.rh-support-close:hover { background: rgba(255,255,255,.06); color: var(--text, #fff); }
.rh-support-kinds { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 14px 4px; }
.rh-support-kind { padding: 6px 10px; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 99px; background: transparent; color: var(--muted, #b3a3c4); font: 600 12px inherit; cursor: pointer; }
.rh-support-kind:hover { color: var(--text, #fff); border-color: rgba(255,255,255,.25); }
.rh-support-kind.active { color: var(--text, #fff); border-color: var(--hot, #ff2e86); background: var(--hot-soft, rgba(255,46,134,.14)); }
.rh-support-log { flex: 1; min-height: 160px; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.rh-support-bubble { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.rh-support-bubble.assistant { align-self: flex-start; background: rgba(255,255,255,.06); color: var(--text, #fff); border-bottom-left-radius: 5px; }
.rh-support-bubble.user { align-self: flex-end; background: var(--hot, #ff2e86); color: #fff; border-bottom-right-radius: 5px; }
.rh-support-bubble.thinking { color: var(--muted, #b3a3c4); letter-spacing: .2em; animation: rhSupportPulse 1s ease-in-out infinite; }
@keyframes rhSupportPulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
.rh-support-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line, rgba(255,255,255,.1)); }
.rh-support-input { flex: 1; min-height: 38px; max-height: 120px; padding: 9px 12px; resize: none; color: var(--text, #fff); background: rgba(255,255,255,.05); border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 12px; font-family: var(--sans, -apple-system, "Segoe UI", system-ui, sans-serif); font-size: 13.5px; font-weight: 500; line-height: 1.4; }
.rh-support-launch, .rh-support-kind, .rh-support-close, .rh-support-send { font-family: var(--sans, -apple-system, "Segoe UI", system-ui, sans-serif); }
.rh-support-input:focus { outline: none; border-color: var(--hot, #ff2e86); }
.rh-support-send { flex: none; width: 38px; height: 38px; border: 0; border-radius: 12px; background: var(--hot, #ff2e86); color: #fff; cursor: pointer; display: grid; place-items: center; }
.rh-support-send:disabled { opacity: .5; cursor: default; }
.rh-support-send svg { width: 17px; height: 17px; }
html[data-calm] .rh-support-panel { animation: none; }
html[data-calm] .rh-support-bubble.thinking { animation: none; }
@media (max-width: 480px) {
  .rh-support { right: 12px; bottom: 12px; }
  .rh-support-launch span { display: none; }
  .rh-support-launch { padding: 12px; }
}
