:root {
  font-family:
    Manrope,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: #142746;
  background: #f3f6fc;
  font-synthesis: none;
  --blue: #1557dc;
  --navy: #182f69;
  --muted: #4b607d;
  --border: #d9e3f3;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.62;
}
:focus-visible {
  outline: 3px solid #4586ff;
  outline-offset: 3px;
}
.masthead {
  margin: 24px auto;
  max-width: min(100% - 32px, 1050px);
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 34px;
  background: var(--navy);
  color: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand strong {
  font-size: clamp(1rem, 4vw, 1.35rem);
}
.brand span {
  color: #70d2ff;
}
.preview-tag {
  font-size: 0.78rem;
  color: #dce7ff;
}
main {
  width: min(100% - 40px, 1000px);
  margin: 64px auto;
}
h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 6vw, 2.8rem);
  letter-spacing: -0.04em;
}
main p {
  max-width: 35rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.launcher,
.room {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  z-index: 1;
}
.launcher {
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 19px;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: 28px;
  box-shadow: 0 8px 22px #18377d33;
  font-weight: 750;
}
.chat-mark {
  width: 18px;
  height: 16px;
  border: 2px solid;
  border-radius: 5px 5px 5px 1px;
}
.room {
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + 66px);
  width: min(418px, 100% - 32px);
  height: min(550px, 100dvh - 104px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 48px #162f6729;
}
.room-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 17px 16px 15px 20px;
  color: #fff;
  background: var(--navy);
}
.room-header h2 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.connection {
  margin: 4px 0 0;
  color: #cfdefb;
  font-size: 0.76rem;
}
.close {
  min-width: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 50%;
  background: #ffffff20;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
}
.retention {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 17px;
  border-bottom: 1px solid var(--border);
  background: #eef4ff;
  color: #21457e;
  font-size: 0.79rem;
}
.clock {
  width: 14px;
  height: 14px;
  position: relative;
  flex: 0 0 auto;
  border: 1.5px solid;
  border-radius: 50%;
}
.clock::after {
  position: absolute;
  inset: 2px auto auto 5px;
  width: 3px;
  height: 4px;
  border-left: 1px solid;
  border-bottom: 1px solid;
  content: "";
}
.room-content {
  display: grid;
  min-height: 0;
  overflow: hidden;
  background: #f7f9fd;
}
.empty {
  align-self: center;
  grid-area: 1 / 1;
  z-index: 1;
  margin: 0;
  padding: 18px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}
.empty button {
  display: block;
  margin: 8px auto 0;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--blue);
  background: #fff;
}
.messages {
  grid-area: 1 / 1;
  min-height: 0;
  margin: 0;
  overflow: auto;
  padding: 14px 16px;
  list-style: none;
}
.messages li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: fit-content;
  max-width: 94%;
  margin: 0 0 9px;
}
.messages .own {
  flex-direction: row-reverse;
  margin-left: auto;
}
.avatar {
  position: relative;
  flex: 0 0 30px;
  aspect-ratio: 1;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--navy);
}
.avatar::before,
.avatar::after {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  content: "";
}
.avatar::before {
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.avatar::after {
  bottom: 6px;
  width: 13px;
  height: 8px;
  border-radius: 8px 8px 3px 3px;
}
.message-bubble {
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid #e3eafa;
  border-radius: 4px 13px 13px;
  background: #fff;
  overflow-wrap: anywhere;
}
.messages .own .message-bubble {
  border-color: #d5e3ff;
  border-radius: 13px 4px 13px 13px;
  background: #e7efff;
}
.message-meta {
  margin: 0 0 3px;
  color: #375887;
  font-size: 0.72rem;
}
.message-body {
  margin: 0;
  font-size: 0.87rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
form {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}
label {
  display: block;
  margin: 0 0 5px 2px;
  font-size: 0.76rem;
  font-weight: 650;
}
.compose-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.change-name {
  padding: 3px 2px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 650;
}
.change-name:hover {
  text-decoration: underline;
}
.compose-row {
  display: flex;
  gap: 8px;
}
input {
  min-width: 0;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #bccee9;
  border-radius: 9px;
  color: #142746;
  background: #fff;
  font-size: 1rem;
}
.primary {
  min-width: 65px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--blue);
  font-size: 0.83rem;
  font-weight: 750;
}
.send-status {
  margin: 5px 2px 0;
  color: #a12828;
  font-size: 0.75rem;
}
.send-status:empty {
  display: none;
}
.name-prompt {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #12274666;
}
#choose-name {
  width: min(100%, 320px);
  padding: 19px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px #14274633;
}
#choose-name h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}
.name-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 13px;
}
.name-actions button {
  min-height: 37px;
  padding: 0 12px;
}
.secondary {
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--muted);
  background: #fff;
  font-size: 0.83rem;
  font-weight: 650;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.embedded .masthead,
.embedded main,
.embedded .launcher {
  display: none;
}
.embedded .room {
  position: relative;
  inset: auto;
  height: 100dvh;
  width: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
