/* Mobile keyboard: collapse companion/hero only. Chat + composer stay usable. */
@media (max-width: 767px) {
  body.mobile-keyboard-open .companion,
  body.mobile-keyboard-open .podium,
  body.mobile-keyboard-open .mood-label,
  body.mobile-keyboard-open .chat-wait,
  body.mobile-keyboard-open .chat-continue,
  body.mobile-keyboard-open .guest-access {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    max-height: 0 !important;
    min-height: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border-width: 0 !important;
    transform: none;
  }

  body.mobile-keyboard-open .companion {
    flex: 0 0 0;
    gap: 0 !important;
  }

  body.mobile-keyboard-open .stage-wrap {
    gap: 0 !important;
  }

  body.mobile-keyboard-open .chat {
    min-height: 0;
    height: 100%;
    flex: 1 1 auto;
    grid-template-rows: minmax(0, 1fr) auto auto auto auto;
  }

  body.mobile-keyboard-open .messages {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    min-height: 0;
    max-height: none !important;
    overflow-y: auto !important;
    padding-top: 8px;
    padding-bottom: 12px;
    transform: none;
  }

  body.mobile-keyboard-open .composer {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    z-index: 4;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.mobile-keyboard-open .companion,
  body.mobile-keyboard-open .podium,
  body.mobile-keyboard-open .mood-label,
  body.mobile-keyboard-open .chat-wait,
  body.mobile-keyboard-open .chat-continue,
  body.mobile-keyboard-open .guest-access,
  body.mobile-keyboard-open .composer {
    transition: none;
    transform: none;
  }
}
