:root {
  --top: #00796b;
  --top-dark: #006b60;
  --wall: #efe7dc;
  --in: #ffffff;
  --out: #d9ffca;
  --text: #111b21;
  --muted: #667781;
  --green: #25d366;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  display: grid;
  place-items: center;
  font-family: Roboto, Arial, sans-serif;
  color: var(--text);
  background: #eef2f3;
}

.screen {
  position: relative;
  width: min(390px, 100vw);
  height: 870px;
  overflow: hidden;
  background: var(--wall);
  box-shadow: 0 18px 52px rgba(0, 0, 0, .18);
}

.top {
  color: #fff;
  background: var(--top);
}

.status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 26px;
  padding: 0 13px;
  border-top: 1px solid var(--top-dark);
  font-size: 12px;
  font-weight: 700;
}

.status-right {
  font-size: 10px;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 8px 7px;
}

.icon {
  width: 18px;
  font-size: 30px;
  line-height: 1;
}

.head-logo {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.head-text {
  flex: 1;
  min-width: 0;
}

.head-text strong,
.head-text span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.head-text strong {
  font-size: 14px;
  line-height: 17px;
}

.head-text span {
  margin-top: 1px;
  font-size: 11px;
  opacity: .92;
}

.head-action {
  width: 22px;
  text-align: center;
  font-size: 20px;
  line-height: 1;
}

.pin {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 24px;
  padding: 0 9px;
  background: #f8fbf6;
  border-bottom: 1px solid rgba(0, 0, 0, .04);
  font-size: 10px;
}

.pin p,
.chat p,
.composer p {
  margin: 0;
}

.chat {
  position: absolute;
  inset: 96px 0 74px;
  padding: 10px 6px 10px;
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(130, 115, 96, .14) 1px, transparent 1.5px) 0 0 / 28px 28px,
    var(--wall);
}

.date,
.notice {
  width: max-content;
  max-width: 78%;
  margin: 0 auto 10px;
  text-align: center;
  border-radius: 10px;
}

.date {
  padding: 8px 12px;
  background: #fff5c9;
  font-size: 10px;
}

.notice {
  padding: 8px 15px;
  background: #fff1c8;
  font-size: 10px;
  line-height: 1.35;
}

.msg {
  position: relative;
  width: fit-content;
  max-width: 76%;
  min-width: 86px;
  margin: 2px 0;
  padding: 6px 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.25;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .08);
}

a.msg {
  display: block;
  color: inherit;
  text-decoration: none;
}

.msg.in {
  margin-left: 6px;
  background: var(--in);
  border-top-left-radius: 2px;
}

.msg.out {
  margin-left: auto;
  margin-right: 8px;
  background: var(--out);
  border-top-right-radius: 2px;
}

.name {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  line-height: 1;
}

.pink {
  color: #e91e63;
}

.blue {
  color: #0a7cff;
}

.purple {
  color: #8e44ad;
}

.green {
  color: #008f5a;
}

.msg time {
  position: absolute;
  right: 8px;
  bottom: 4px;
  color: var(--muted);
  font-size: 9px;
}

.checks {
  position: absolute;
  right: 25px;
  bottom: 4px;
  color: #53bdeb;
  font-size: 9px;
}

.invite {
  width: 220px;
  max-width: 62%;
  padding: 7px 8px 16px;
}

.invite-top {
  display: flex;
  gap: 9px;
  align-items: center;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.invite-top img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.invite-top strong,
.invite-top span {
  display: block;
}

.invite-top strong {
  font-size: 12px;
  line-height: 1.15;
}

.invite-top span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.badges {
  display: flex;
  gap: 4px;
  margin-top: 5px;
}

.badges b {
  padding: 2px 5px;
  border-radius: 999px;
  color: #fff;
  background: #0f6d5f;
  font-size: 8px;
}

.badges b + b {
  background: #1ba96b;
}

.invite p {
  margin-top: 7px;
}

.typing {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 132px;
  margin: 7px 0 0 5px;
  padding: 7px 10px;
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .08);
}

.typing span {
  letter-spacing: 2px;
}

.composer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 8px 10px;
  background: #f3f0ec;
}

.input {
  display: grid;
  grid-template-columns: 22px 1fr 22px 22px;
  align-items: center;
  gap: 6px;
  height: 36px;
  margin-right: 45px;
  padding: 0 10px;
  border-radius: 20px;
  color: #456;
  background: #fff;
  font-size: 12px;
}

.mic {
  position: absolute;
  right: 10px;
  top: 8px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #22c55e;
  font-size: 18px;
  font-weight: 700;
}

.join {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 39px;
  margin-top: 5px;
  border-radius: 22px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .26);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.composer small {
  display: block;
  margin-top: 8px;
  color: #78909c;
  text-align: center;
  font-size: 8px;
}

@media (min-width: 700px) {
  body {
    padding: 18px;
  }
}
