body.launcher-webstyle .teamchat-view {
  --chat-accent: #0f766e;
  --chat-accent-soft: #eef7f6;
  --chat-danger: #cc405d;
  --chat-admin: #2563eb;
  --chat-superadmin: #e47b16;
  --chat-developer: #7c3aed;
  --chat-line: #d7dee6;
  --chat-line-soft: #e7edf2;
  --chat-text: #1f2933;
  --chat-muted: #6b7785;
  --chat-panel: #fff;
  padding: 8px 10px 10px !important;
  background: transparent;
}

body.launcher-webstyle .teamchat-shell {
  position: relative;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #b8d1d6;
  border-radius: 12px;
  background: var(--chat-panel);
  color: var(--chat-text);
  box-shadow: 0 17px 42px rgba(0, 14, 21, .26);
}

body.launcher-webstyle .teamchat-rail {
  gap: 0;
  padding: 0;
  border-right: 1px solid var(--chat-line);
  background: #fff;
}

body.launcher-webstyle .teamchat-rail-head {
  min-height: 70px;
  padding: 14px 15px 10px;
}

body.launcher-webstyle .teamchat-rail-head > div { display: grid; gap: 3px; }
body.launcher-webstyle .teamchat-rail-head small,
body.launcher-webstyle .teamchat-side-head small {
  color: #7a8696;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
body.launcher-webstyle .teamchat-rail h3 { color: #16212b; font-size: 21px; }

body.launcher-webstyle .teamchat-icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-color: #cfd7df;
  padding: 0;
  color: #53616d;
}
body.launcher-webstyle .teamchat-icon-button svg,
body.launcher-webstyle .teamchat-room-search svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

body.launcher-webstyle .teamchat-status,
body.launcher-webstyle .teamchat-rail > [data-chat-login],
body.launcher-webstyle .teamchat-rail > [data-chat-logout] { margin: 0 14px 9px; }
body.launcher-webstyle .teamchat-status { min-height: 0; padding: 8px 10px; font-size: 11px; }

body.launcher-webstyle .teamchat-room-search {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  margin: 1px 14px 10px;
  border: 1px solid var(--chat-line);
  border-radius: 9px;
  padding: 7px 9px;
  background: #f8fafc;
  color: #71808c;
}
body.launcher-webstyle .teamchat-room-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #263843;
  font: inherit;
  font-size: 12px;
}

body.launcher-webstyle .teamchat-rooms { gap: 2px; padding: 0 11px 9px; }
body.launcher-webstyle .teamchat-room {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  justify-content: initial;
  margin-bottom: 5px;
  border: 1px solid #bed3d9;
  border-left-width: 4px;
  border-radius: 11px;
  padding: 10px 9px 10px 7px;
  background: #fff;
}
body.launcher-webstyle .teamchat-room:hover { border-color: var(--chat-line-soft); background: #fbfcfd; }
body.launcher-webstyle .teamchat-room.is-subchat { position: relative; padding-left: 28px; }
body.launcher-webstyle .teamchat-room.is-subchat .teamchat-tree-branch { position: absolute; left: 2px; margin: 0; font-size: 16px; }
body.launcher-webstyle .teamchat-room.is-active {
  border-color: #d9e1e8;
  border-left-color: var(--chat-accent);
  background: #f5f8fb;
}
body.launcher-webstyle .teamchat-room-symbol {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #acd7d1;
  border-radius: 10px;
  background: linear-gradient(145deg, #edf9f7, #dcefeb);
  color: var(--chat-accent);
}
body.launcher-webstyle .teamchat-room-symbol svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
body.launcher-webstyle .teamchat-room-copy strong { color: #16212b; font-size: 13px; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
body.launcher-webstyle .teamchat-room-copy small { color: #7b8794; font-size: 11px; }
body.launcher-webstyle .teamchat-count { min-width: 20px; padding: 3px 6px; font-size: 10px; }

body.launcher-webstyle .teamchat-retention {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 9px;
  margin: 8px 14px 14px;
  border: 1px solid var(--chat-line-soft);
  border-radius: 10px;
  padding: 9px;
  background: #f8fafc;
}
body.launcher-webstyle .teamchat-retention > span:first-child {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #c9d8dd;
  border-radius: 8px;
  color: var(--chat-accent);
  font-size: 9px;
  font-weight: 900;
}
body.launcher-webstyle .teamchat-retention > span:last-child { display: grid; gap: 2px; }
body.launcher-webstyle .teamchat-retention strong { font-size: 11px; }
body.launcher-webstyle .teamchat-retention small { color: var(--chat-muted); font-size: 10px; }

body.launcher-webstyle .teamchat-main { grid-template-rows: 76px minmax(0, 1fr) auto; background: #fff; }
body.launcher-webstyle .teamchat-conversation-head {
  min-width: 0;
  padding: 11px 16px;
  border-bottom-color: var(--chat-line-soft);
  background: #fbfcfd;
}
body.launcher-webstyle .teamchat-conversation-title { min-width: 0; display: flex; align-items: center; gap: 11px; }
body.launcher-webstyle .teamchat-conversation-title > div { min-width: 0; }
body.launcher-webstyle .teamchat-conversation-head .teamchat-room-symbol { width: 42px; height: 42px; }
body.launcher-webstyle .teamchat-conversation-head .teamchat-room-symbol svg { width: 23px; height: 23px; }
body.launcher-webstyle .teamchat-conversation-head p {
  margin: 0;
  color: #7a8696;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
body.launcher-webstyle .teamchat-conversation-head h3 {
  overflow: hidden;
  margin: 2px 0;
  color: #16212b;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.launcher-webstyle .teamchat-presence-summary {
  display: block;
  overflow: hidden;
  color: #526775;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.launcher-webstyle .teamchat-presence-summary::before {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 50%;
  background: #2aaf78;
  content: "";
}
body.launcher-webstyle .teamchat-presence-private { color: var(--chat-developer); font-size: 11px; line-height: 1.35; }

body.launcher-webstyle .teamchat-messages {
  padding: 12px clamp(16px, 3vw, 38px) 18px;
  background: #f8fafc;
}
body.launcher-webstyle .teamchat-message {
  --role-color: var(--chat-accent);
  max-width: 850px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 11px;
  margin: 0 auto;
  border: 0;
  border-bottom: 1px solid #e3e9ee;
  border-radius: 0;
  padding: 13px 0;
  background: transparent;
  box-shadow: none;
}
body.launcher-webstyle .teamchat-message.is-admin { --role-color: var(--chat-admin); }
body.launcher-webstyle .teamchat-message.is-superadmin { --role-color: var(--chat-superadmin); }
body.launcher-webstyle .teamchat-message.is-developer { --role-color: var(--chat-developer); }
body.launcher-webstyle .teamchat-message-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--role-color);
  color: #fff;
  font-size: 10px;
  font-weight: 850;
  box-shadow: 0 0 0 3px #fff;
}
body.launcher-webstyle .teamchat-message-body { min-width: 0; }
body.launcher-webstyle .teamchat-message-head strong { color: #16212b; font-size: 13px; }
body.launcher-webstyle .teamchat-role-label {
  border-radius: 999px;
  padding: 2px 7px;
  background: var(--role-color);
  color: #fff;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .025em;
  text-transform: uppercase;
}
body.launcher-webstyle .teamchat-message-head time { color: #87939f; font-size: 11px; }
body.launcher-webstyle .teamchat-text { margin: 7px 0; color: #2c3e49; font-size: 13px; line-height: 1.5; }
body.launcher-webstyle .teamchat-message-actions { margin-top: 5px; gap: 3px; }
body.launcher-webstyle .teamchat-message-actions button {
  border-radius: 5px;
  padding: 4px 6px;
  color: #71808c;
  font-size: 10px;
}
body.launcher-webstyle .teamchat-message-actions button:hover { background: #edf2f5; color: var(--chat-accent); }
body.launcher-webstyle .teamchat-translation-loading { display: flex; align-items: center; gap: 8px; margin: 7px 0; color: var(--chat-accent); font-size: 13px; line-height: 1.4; }
body.launcher-webstyle .teamchat-translation-loading[hidden] { display: none; }
body.launcher-webstyle .teamchat-translation-loading::before { content: ""; width: 16px; height: 16px; flex-shrink: 0; border: 2px solid #bddbd7; border-top-color: currentColor; border-radius: 50%; animation: teamchat-translation-spin .8s linear infinite; }
@keyframes teamchat-translation-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { body.launcher-webstyle .teamchat-translation-loading::before { animation: none; } }
body.launcher-webstyle .teamchat-reply-reference {
  display: grid;
  gap: 2px;
  margin: 7px 0;
  border-left: 3px solid var(--reply-color, var(--chat-accent));
  padding: 5px 8px;
  background: #edf2f5;
}
body.launcher-webstyle .teamchat-reply-reference.is-admin { --reply-color: var(--chat-admin); }
body.launcher-webstyle .teamchat-reply-reference.is-superadmin { --reply-color: var(--chat-superadmin); }
body.launcher-webstyle .teamchat-reply-reference.is-developer { --reply-color: var(--chat-developer); }
body.launcher-webstyle .teamchat-reply-reference strong { color: var(--reply-color, var(--chat-accent)); font-size: 10px; }
body.launcher-webstyle .teamchat-reply-reference span { overflow: hidden; color: #63717c; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

body.launcher-webstyle .teamchat-dms-card { grid-template-columns: 70px 1fr; border-color: #d3dde4; border-radius: 9px; background: #fff; }
body.launcher-webstyle .teamchat-dms-thumbnail { min-height: 60px; }

body.launcher-webstyle .teamchat-compose { padding: 10px 16px 14px; border-top-color: var(--chat-line); }
body.launcher-webstyle .teamchat-compose-box {
  max-width: 850px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #bdc9d2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(17, 28, 38, .05);
}
body.launcher-webstyle .teamchat-compose textarea {
  min-height: 54px;
  display: block;
  resize: none;
  border: 0;
  border-radius: 0;
  padding: 11px 12px 5px;
  outline: 0;
  font-size: 13px;
}
body.launcher-webstyle .teamchat-compose-actions { justify-content: space-between; margin: 0; padding: 5px 7px 7px; }
body.launcher-webstyle .teamchat-compose-attachments { display: flex; align-items: center; gap: 6px; }
body.launcher-webstyle .teamchat-compose-attachments > button,
body.launcher-webstyle .teamchat-file-label {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d4dde4;
  border-radius: 7px;
  padding: 0 9px;
  background: #f8fafc;
  color: #53616d;
  font-size: 10px;
  font-weight: 750;
}
body.launcher-webstyle .teamchat-compose-attachments > button[hidden] { display: none; }
body.launcher-webstyle .teamchat-compose-attachments small { color: #7d8995; font-size: 10px; }
body.launcher-webstyle .teamchat-compose kbd { border: 1px solid #ccd6de; border-bottom-width: 2px; border-radius: 4px; padding: 1px 4px; background: #fff; font: inherit; font-size: 9px; }
body.launcher-webstyle .teamchat-reply-staged,
body.launcher-webstyle .teamchat-images-staged,
body.launcher-webstyle .teamchat-compose > [data-chat-dms-staged] {
  max-width: 850px;
  margin: 0 auto;
  border: 1px solid var(--chat-line);
  border-bottom: 0;
  padding: 7px 10px;
  background: #f8fafc;
}
body.launcher-webstyle .teamchat-reply-staged { display: flex; align-items: center; gap: 9px; }
body.launcher-webstyle .teamchat-reply-staged[hidden] { display: none; }
body.launcher-webstyle .teamchat-reply-line { width: 3px; height: 30px; border-radius: 2px; background: var(--chat-accent); }
body.launcher-webstyle .teamchat-reply-staged > span:nth-child(2) { min-width: 0; display: grid; flex: 1; gap: 2px; }
body.launcher-webstyle .teamchat-reply-staged small { color: var(--chat-muted); font-size: 10px; }
body.launcher-webstyle .teamchat-reply-staged strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
body.launcher-webstyle .teamchat-reply-staged button { border: 0; background: transparent; color: #71808c; font-size: 18px; }
body.launcher-webstyle .teamchat-images-staged { flex-wrap: wrap; }
body.launcher-webstyle .teamchat-staged-image { display: grid; grid-template-columns: 42px minmax(80px, 1fr) auto; align-items: center; gap: 7px; min-width: 180px; }
body.launcher-webstyle .teamchat-staged-image img { width: 42px; height: 34px; border-radius: 5px; object-fit: cover; }
body.launcher-webstyle .teamchat-staged-image > span { min-width: 0; display: grid; }
body.launcher-webstyle .teamchat-staged-image strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
body.launcher-webstyle .teamchat-staged-image small { color: var(--chat-muted); font-size: 9px; }
body.launcher-webstyle .teamchat-staged-clear { margin-left: auto; }

body.launcher-webstyle .teamchat-side {
  position: absolute;
  z-index: 5;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 92%);
  max-height: none;
  grid-column: auto;
  overflow: auto;
  border-top: 0;
  border-left: 1px solid #c6d6dc;
  padding: 15px;
  background: #f8fafc;
  box-shadow: -16px 0 36px rgba(8, 29, 37, .18);
}
body.launcher-webstyle .teamchat-side[hidden] { display: none; }
body.launcher-webstyle .teamchat-side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
body.launcher-webstyle .teamchat-side-head > div { display: grid; gap: 3px; }
body.launcher-webstyle .teamchat-side-head button { border: 0; background: transparent; color: #71808c; font-size: 22px; }

/* Room identity, not the viewer's role: only the Developer-Chat is violet. */
body.launcher-webstyle .teamchat-room.is-developer-room { border-color: #c4b5fd; background: #faf7ff; }
body.launcher-webstyle .teamchat-room.is-developer-room:hover { border-color: #a78bfa; background: #f3edff; }
body.launcher-webstyle .teamchat-compact .teamchat-room.is-developer-room.is-active {
  border-color: #7c3aed; border-left-color: #7c3aed; background: #ede7ff;
}
body.launcher-webstyle .teamchat-room.is-developer-room .teamchat-room-copy strong { color: #7c3aed; }
body.launcher-webstyle .teamchat-room.is-developer-room .teamchat-room-symbol { border-color: #c4b5fd; background: #f3edff; color: #7c3aed; }
body.launcher-webstyle .teamchat-room-card:has(.is-developer-room) .teamchat-room-mute:not([data-muted="true"]) { color: #7c3aed; border-color: #c4b5fd; }
body.launcher-webstyle .teamchat-room-card:has(.is-developer-room) .teamchat-count { background: #7c3aed; }

@media (max-width: 800px) {
  body.launcher-webstyle .teamchat-view { padding: 0 !important; }
  body.launcher-webstyle .teamchat-shell { grid-template-columns: minmax(220px, 290px) minmax(0, 1fr); border-radius: 0; }
  body.launcher-webstyle .teamchat-retention { display: none; }
  body.launcher-webstyle .teamchat-compose-attachments small { display: none; }
}
