.pearl-entry[data-pearl-presence="LOADING"] {
  cursor: progress;
  opacity: .78;
}

.pearl-chat[data-pearl-input-mode="TEXT"] {
  position: fixed;
  inset: max(.75rem, env(safe-area-inset-top)) .75rem auto;
  width: min(46rem, calc(100vw - 1.5rem));
  max-height: min(78vh, 42rem);
  margin: 0 auto;
  border-radius: 1.1rem;
  transform-origin: top right;
  animation: pearl-text-rail-open 150ms ease-out;
}

.pearl-chat[data-pearl-input-mode="TEXT"] .pearl-chat__input-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .55rem;
  align-items: end;
}

.pearl-chat[data-pearl-input-mode="TEXT"] .pearl-chat__input-strip label {
  grid-column: 1 / -1;
}

.pearl-chat[data-pearl-input-mode="TEXT"] textarea {
  min-width: 0;
  width: 100%;
  resize: vertical;
}

.pearl-chat[data-pearl-input-mode="VOICE"] .pearl-chat__status {
  font-weight: 800;
}

@keyframes pearl-text-rail-open {
  from { opacity: 0; transform: scaleX(.35) scaleY(.88); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .pearl-chat[data-pearl-input-mode="TEXT"] { animation: none; }
}

@media (max-width: 34rem) {
  .pearl-chat[data-pearl-input-mode="TEXT"] {
    inset-inline: .4rem;
    width: calc(100vw - .8rem);
  }
}
