.chat-body { background: #f6f3fb; }
.page.chat-page {
  min-height: calc(100dvh - 66px);
  background: #f6f3fb;
}
.page.chat-page .page-inner { padding: 0; }
.chat-shell {
  max-width: 760px;
  margin: 0 auto;
  min-height: calc(100dvh - 66px);
  display: flex;
  flex-direction: column;
  padding: calc(66px + 18px) var(--woms-gutter, 20px) 0;
  box-sizing: border-box;
}
.chat-head { padding-bottom: 14px; }
.chat-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a50ff;
}
.chat-head h1 {
  margin: 0 0 6px;
  font-size: clamp(26px, 4vw, 34px);
  color: #350c7f;
}
.chat-lead {
  margin: 0;
  color: #6b6280;
  font-size: 15px;
  line-height: 1.45;
  max-width: 52ch;
}
.chat-msgs {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0 16px;
  min-height: 240px;
}
.chat-empty {
  margin: 24px 0;
  color: #8a80a0;
  font-size: 15px;
}
.chat-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 100%;
}
.chat-row.is-mine { flex-direction: row-reverse; }
.chat-ava, .chat-ava img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 40px;
  background: #eee6fb;
}
.chat-bubble {
  background: #fff;
  border: 1px solid #eee6fb;
  border-radius: 16px;
  padding: 10px 14px 8px;
  max-width: min(520px, calc(100% - 50px));
  box-shadow: 0 1px 0 rgba(53, 12, 127, 0.04);
}
.chat-row.is-mine .chat-bubble {
  background: #f4edff;
  border-color: #e3d8ff;
}
.chat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  margin-bottom: 4px;
}
.chat-name {
  font-weight: 800;
  color: #350c7f;
  font-size: 14px;
  text-decoration: none;
}
.chat-name:hover { text-decoration: underline; }
.chat-time { font-size: 12px; color: #9a90b0; }
.chat-body-txt {
  margin: 0;
  color: #2c2440;
  font-size: 15.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}
.chat-actions button {
  background: none;
  border: none;
  color: #b0a7c4;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
}
.chat-actions button:hover { color: #7c3aed; }
.chat-composer {
  position: sticky;
  bottom: 0;
  background: #f6f3fb;
  padding: 10px 0 18px;
  border-top: 1px solid #eee6fb;
}
.chat-form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.chat-form textarea {
  flex: 1;
  min-height: 46px;
  max-height: 120px;
  border: 1px solid #e3d8ff;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  resize: none;
  background: #fff;
  color: #2c2440;
}
.chat-form textarea:focus {
  outline: 2px solid #8a50ff;
  outline-offset: 1px;
}
.chat-form button[type="submit"] {
  flex: 0 0 auto;
  min-height: 46px;
}
.chat-guest {
  background: #fff;
  border: 1px solid #eee6fb;
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  justify-content: space-between;
}
.chat-guest p {
  margin: 0;
  color: #4a4060;
  font-size: 15px;
  flex: 1 1 220px;
}
.chat-err {
  margin: 8px 0 0;
  color: #b42318;
  font-size: 13px;
}
.chat-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: #9a90b0;
}
@media (max-width: 640px) {
  .chat-shell { padding-top: calc(66px + 12px); min-height: calc(100dvh - 120px); }
  .chat-ava, .chat-ava img { width: 34px; height: 34px; flex-basis: 34px; }
  .chat-body-txt { font-size: 15px; }
  .chat-form button[type="submit"] { padding-left: 16px; padding-right: 16px; }
}
