.titti {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 8;
  display: grid;
  justify-items: end;
  gap: 10px;
}
.titti button { cursor: pointer; font: inherit; }
.titti-launch {
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 17px 5px 6px;
  border: 1px solid #fff;
  border-radius: 28px;
  background: var(--deep);
  color: #fff;
  box-shadow: 0 4px 18px #17355138;
}
.titti-launch span { font-weight: 700; }
.titti-launch img, .titti-head img {
  padding: 2px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--mist);
}
.titti-panel {
  grid-row: 1;
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 32px));
  height: min(540px, calc(100dvh - 95px));
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: white;
  box-shadow: 0 14px 45px #17355136;
}
.titti-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 3px solid var(--orange);
  background: var(--deep);
  color: white;
}
.titti-head h2 { margin: 0; font-size: 1.25rem; }
.titti-head span { font-size: .875rem; }
.titti .titti-close {
  margin-left: auto;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: white;
  font-size: 1.6rem;
}
.titti-close:focus-visible { outline-color: var(--orange); outline-offset: -3px; }
.titti-body { flex: 1; min-height: 0; overflow-y: auto; padding: 13px; }
.titti-log p { margin: 0 0 8px; padding: 9px 11px; border-radius: 9px; }
.titti-reply { background: var(--mist); }
.titti-reply a { font-weight: 700; }
.titti-user { width: fit-content; margin-left: auto !important; background: var(--deep); color: white; overflow-wrap: anywhere; }
.titti-prompts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.titti .titti-prompts button {
  padding: 6px 9px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: white;
  color: var(--deep);
  font-size: .875rem;
}
.titti-prompts button:hover { background: var(--mist); }
.titti-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.titti-form input {
  flex: 1;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--blue);
  border-radius: 4px;
  color: var(--ink);
  font: inherit;
}
.titti-form button { padding: 7px 12px; border: 0; border-radius: 4px; background: var(--deep); color: white; }
.titti-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.titti-reply { white-space: pre-line; }
