:root {
  color-scheme: light;
  --app-bg: #d7dbd6;
  --wa-green: #075e54;
  --wa-green-dark: #054c43;
  --wa-green-soft: #dcf8c6;
  --panel: #ffffff;
  --panel-soft: #f0f2f5;
  --chat-bg: #efe7dd;
  --text: #111b21;
  --muted: #667781;
  --line: #d9dee2;
  --danger: #b83245;
  --danger-soft: #ffe8ec;
  --warning: #9d5d00;
  --warning-soft: #fff1d1;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    linear-gradient(var(--wa-green) 0 128px, transparent 128px),
    var(--app-bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--wa-green);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  min-height: 42px;
  padding: 0 16px;
}

button:hover {
  background: var(--wa-green-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

button.ghost.dark {
  border-color: var(--line);
  color: var(--text);
}

button.ghost.dark:hover {
  background: var(--panel-soft);
}

button.danger {
  background: var(--danger);
}

button.danger:hover {
  background: #98283a;
}

button.compact {
  min-height: 34px;
  padding: 0 10px;
}

button.icon-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 1.45rem;
  height: 38px;
  justify-content: center;
  line-height: 1;
  min-height: 38px;
  padding: 0;
  width: 38px;
}

button.icon-button:hover {
  background: rgba(255, 255, 255, 0.24);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  outline: none;
  padding: 10px 12px;
}

input {
  min-height: 42px;
}

textarea {
  min-height: 78px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--wa-green);
  box-shadow: 0 0 0 3px rgba(7, 94, 84, 0.12);
}

label {
  display: grid;
  gap: 7px;
}

label span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

label span b {
  color: var(--danger);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  line-height: 1.05;
}

h2 {
  font-size: 1rem;
}

.shell {
  min-height: 100vh;
  padding: 22px;
}

.auth-panel {
  align-content: start;
  background: var(--panel);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(17, 27, 33, 0.18);
  display: grid;
  gap: 24px;
  margin: 6vh auto 0;
  max-width: 520px;
  padding: 34px;
  position: relative;
}

.auth-brand-logo {
  border-radius: 12px;
  display: block;
  height: 64px;
  margin-bottom: 18px;
  object-fit: cover;
  width: 64px;
}

.auth-form,
.create-group-card {
  display: grid;
  gap: 14px;
}

button.verification-edit {
  align-items: center;
  background: transparent;
  color: #1768a5;
  display: inline-flex;
  font-size: 0.9rem;
  gap: 6px;
  justify-self: center;
  min-height: 32px;
  padding: 0;
}

button.verification-back {
  align-items: center;
  background: transparent;
  border: 0;
  color: #1768a5;
  display: flex;
  height: 42px;
  justify-content: center;
  left: 16px;
  min-height: 42px;
  padding: 0;
  position: absolute;
  top: 14px;
  width: 42px;
  z-index: 1;
}

button.verification-back:hover {
  background: #edf6fb;
  color: #0c4f83;
}

.verification-back > span {
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-1px);
}

button.verification-edit:hover {
  background: transparent;
  color: #0c4f83;
}

.verification-edit > span {
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1;
}

.verification-edit small {
  color: var(--muted);
  font-size: 0.8rem;
}

.auth-panel.verification-step {
  gap: 20px;
  min-height: 520px;
  padding-top: 24px;
}

.verification-step .auth-brand-logo,
.verification-step .eyebrow,
.verification-step #authTitle,
.verification-step .auth-guide-link {
  display: none;
}

.verification-step #authIntro {
  color: var(--text);
  line-height: 1.55;
  margin: 34px auto 10px;
  max-width: 410px;
  text-align: center;
  white-space: pre-line;
}

.verification-step .auth-form {
  gap: 20px;
}

.verification-code-field {
  height: 64px;
  justify-self: center;
  max-width: 360px;
  position: relative;
  width: 100%;
}

.verification-code-slots {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.verification-code-slots > span {
  align-items: center;
  border-bottom: 3px solid #7c8790;
  color: var(--text);
  display: flex;
  font-size: 1.65rem;
  font-weight: 800;
  justify-content: center;
  min-width: 0;
}

.verification-code-slots > span.filled {
  border-color: var(--wa-green);
}

.verification-code-field:focus-within .verification-code-slots > span.active {
  border-color: #1768a5;
}

input.verification-code-input,
input.verification-code-input:focus {
  background: transparent;
  border: 0;
  box-shadow: none;
  caret-color: transparent;
  color: transparent;
  height: 64px;
  inset: 0;
  min-height: 64px;
  opacity: 0.02;
  padding: 0;
  position: absolute;
  width: 100%;
}

.verification-step #codeHint {
  text-align: center;
}

.verification-step .auth-actions {
  grid-template-columns: 1fr;
}

.verification-step #resendCodeButton {
  background: transparent;
  border: 0;
  color: var(--wa-green);
  min-height: 36px;
}

.verification-step #resendCodeButton:disabled {
  color: #aab0b4;
}

.verification-step .verification-edit {
  margin-top: -8px;
}

.auth-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-passkey-option {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto 1fr;
}

.auth-passkey-option::before,
.auth-passkey-option::after {
  background: var(--line);
  content: "";
  height: 1px;
}

.auth-passkey-option > span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.auth-passkey-option button {
  grid-column: 1 / -1;
}

.verification-step .auth-passkey-option {
  display: none;
}

button.auth-guide-link {
  align-items: center;
  background: #edf7f4;
  border: 1px solid #cfe4de;
  color: var(--text);
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 62px;
  padding: 10px 12px;
  text-align: left;
}

button.auth-guide-link:hover {
  background: #e2f2ed;
}

.auth-guide-link > span:first-child {
  align-items: center;
  background: #126b5f;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-family: Georgia, serif;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.auth-guide-link > span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.auth-guide-link small {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 600;
  line-height: 1.35;
}

.auth-guide-link > span:last-child {
  color: #61736e;
  font-size: 1.35rem;
}

.terms-consent {
  background: #f5f8fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.terms-consent-row {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 10px;
}

.terms-consent-row input {
  accent-color: #2f6fed;
  flex: 0 0 20px;
  height: 20px;
  min-height: 20px;
  width: 20px;
}

.terms-consent-row span {
  color: var(--text);
}

body.modal-open {
  overflow: hidden;
}

button.terms-link {
  align-self: start;
  background: transparent;
  color: #2458c2;
  font-size: 0.84rem;
  min-height: auto;
  padding: 2px 0 2px 30px;
}

button.terms-link:hover {
  background: transparent;
  color: #173f98;
  text-decoration: underline;
}

.muted {
  color: var(--muted);
  line-height: 1.45;
}

.small-copy {
  font-size: 0.86rem;
}

.eyebrow {
  color: var(--wa-green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.app-panel {
  min-height: calc(100vh - 44px);
}

.wa-layout {
  background: var(--panel);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(17, 27, 33, 0.2);
  display: grid;
  grid-template-columns: minmax(310px, 380px) minmax(420px, 1fr);
  height: calc(100vh - 44px);
  min-height: 680px;
  overflow: hidden;
}

.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  overflow: auto;
}

.sidebar-header {
  align-items: center;
  background: var(--wa-green);
  color: #fff;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 74px;
  padding: 12px 14px;
}

.profile-chip,
.chat-title-button {
  align-items: center;
  background: transparent;
  border-radius: 8px;
  color: inherit;
  display: flex;
  gap: 10px;
  min-height: 48px;
  min-width: 0;
  padding: 4px;
  text-align: left;
}

.profile-chip:hover,
.chat-title-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.profile-chip span:last-child,
.chat-title-button span:last-child {
  display: grid;
  min-width: 0;
}

.profile-chip strong,
.chat-title-button strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chip small,
.chat-title-button small {
  color: rgba(255, 255, 255, 0.78);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  align-items: center;
  background: #cfd8dc;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border-radius: 999px;
  color: var(--wa-green-dark);
  display: inline-flex;
  flex: 0 0 42px;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.avatar.has-image {
  color: transparent;
}

.group-avatar {
  background-color: #d9fdd3;
}

.group-create-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 90px minmax(0, 1fr);
}

.section-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 12px 14px 6px;
}

.section-heading > span {
  background: #e7fce3;
  border-radius: 999px;
  color: var(--wa-green-dark);
  font-size: 0.78rem;
  font-weight: 800;
  min-width: 28px;
  padding: 4px 9px;
  text-align: center;
}

.list {
  align-content: start;
  display: grid;
  gap: 0;
}

.compact-list {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.list-item {
  align-items: center;
  background: var(--panel);
  border: 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  display: grid;
  gap: 7px;
  min-height: 66px;
  padding: 12px 14px;
  text-align: left;
  width: 100%;
}

.list-content {
  align-self: center;
  display: grid;
  gap: 4px;
  min-width: 0;
}

button.list-item {
  background: var(--panel);
  color: var(--text);
  font-weight: 500;
}

.chat-list button.list-item {
  align-items: center;
  grid-template-columns: 46px minmax(0, 1fr);
  min-height: 72px;
}

.list-item.active {
  background: #f0f2f5;
}

.list-title {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.list-title strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.list-time {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 0.74rem;
  font-weight: 700;
}

.list-bottom {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.list-bottom .muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 8px;
  text-transform: capitalize;
  white-space: nowrap;
}

.badge.accepted {
  background: var(--wa-green-soft);
  color: var(--wa-green-dark);
}

.badge.pending {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge.denied {
  background: var(--danger-soft);
  color: var(--danger);
}

.unread-badge {
  align-items: center;
  background: var(--wa-green-soft);
  border-radius: 999px;
  color: var(--wa-green-dark);
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 900;
  justify-content: center;
  min-height: 24px;
  min-width: 24px;
  padding: 4px 8px;
}

.chat-pane {
  background: var(--chat-bg);
  display: grid;
  min-height: 0;
  position: relative;
}

.chat-content {
  display: grid;
  grid-template-rows: auto auto minmax(260px, 1fr) auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.chat-header {
  align-items: center;
  background: var(--wa-green);
  color: #fff;
  display: flex;
  grid-row: 1;
  min-height: 74px;
  padding: 10px 16px;
}

.pinned-message {
  background: #fffdf6;
  border-bottom: 1px solid #ead7a4;
  border-radius: 0;
  color: #5d4610;
  grid-row: 2;
  min-height: 42px;
  overflow: hidden;
  padding: 9px 18px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pinned-message:hover {
  background: #fff7dc;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-row: 3;
  min-height: 0;
  overscroll-behavior: contain;
  overflow: auto;
  padding: 20px;
}

.messages > :first-child {
  margin-top: auto;
}

.date-separator {
  align-self: center;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 10px;
}

.new-message-divider {
  align-self: stretch;
  align-items: center;
  color: var(--wa-green-dark);
  display: grid;
  font-size: 0.78rem;
  font-weight: 900;
  gap: 10px;
  grid-template-columns: 1fr auto 1fr;
  margin: 8px 0;
}

.new-message-divider::before,
.new-message-divider::after {
  background: rgba(7, 94, 84, 0.22);
  content: "";
  height: 1px;
}

.message {
  align-self: stretch;
  display: grid;
  gap: 4px;
  justify-items: start;
}

.message.mine {
  justify-items: end;
}

.bubble {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 1px rgba(17, 27, 33, 0.13);
  display: grid;
  gap: 7px;
  max-width: min(560px, 82%);
  overflow-wrap: anywhere;
  padding: 8px 10px;
}

.reply-preview {
  border-left: 3px solid var(--wa-green);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  overflow: hidden;
  padding-left: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deleted-message {
  color: var(--muted);
  font-style: italic;
}

.bubble.sticker-bubble {
  align-items: center;
  background: transparent;
  box-shadow: none;
  display: inline-grid;
  justify-items: center;
  padding: 0;
}

.sticker-message {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(17, 27, 33, 0.08);
  border-radius: 8px;
  display: inline-grid;
  gap: 4px;
  justify-items: center;
  min-width: 96px;
  padding: 10px 12px;
}

.sticker-emoji {
  font-size: 2.6rem;
  line-height: 1;
}

.sticker-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.bubble.gif-bubble {
  background: transparent;
  box-shadow: none;
  max-width: min(360px, 78%);
  padding: 0;
}

.chat-gif {
  background: #e8edf0;
  border-radius: 8px;
  display: block;
  height: auto;
  max-height: 340px;
  object-fit: cover;
  width: min(340px, 72vw);
}

.gif-message {
  align-content: center;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  color: #10233e;
  display: inline-grid;
  gap: 6px;
  justify-items: center;
  min-width: 180px;
  overflow: hidden;
  padding: 18px;
  text-align: center;
}

.chat-list-toolbar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px 8px;
}

.chat-list-heading {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.chat-list-heading h2 {
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list-heading span {
  background: #e7fce3;
  border-radius: 999px;
  color: var(--wa-green-dark);
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 800;
  min-width: 26px;
  padding: 4px 7px;
  text-align: center;
}

button.new-group-button {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.74rem;
  gap: 5px;
  min-height: 30px;
  padding: 0 7px;
}

button.new-group-button > span {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
}

.group-search {
  align-items: center;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  margin: 0 14px 10px;
  min-height: 42px;
  padding: 0 12px;
}

.group-search:focus-within {
  border-color: var(--wa-green);
  box-shadow: 0 0 0 2px rgba(7, 94, 84, 0.1);
}

.group-search input {
  background: transparent;
  border: 0;
  flex: 1;
  min-height: 40px;
  min-width: 0;
  outline: 0;
  padding: 0;
}

.group-search-icon {
  border: 2px solid var(--muted);
  border-radius: 999px;
  display: block;
  flex: 0 0 14px;
  height: 14px;
  position: relative;
  width: 14px;
}

.group-search-icon::after {
  background: var(--muted);
  content: "";
  height: 2px;
  position: absolute;
  right: -6px;
  top: 11px;
  transform: rotate(45deg);
  width: 7px;
}

.gif-message-emoji {
  animation: gif-bounce 1.25s ease-in-out infinite;
  font-size: 3.6rem;
  line-height: 1;
}

.gif-message strong {
  font-size: 0.86rem;
}

.meme-card {
  align-content: space-between;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #111b21, #305f58);
  border: 2px solid #111b21;
  border-radius: 8px;
  color: #fff;
  display: grid;
  font-weight: 950;
  justify-items: center;
  max-width: min(420px, 82vw);
  min-width: 260px;
  overflow: hidden;
  padding: 14px;
  position: relative;
  text-align: center;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.55);
  text-transform: uppercase;
}

.meme-card strong,
.meme-card span {
  font-size: clamp(1.2rem, 3vw, 2rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
  position: relative;
  z-index: 2;
}

.meme-card.has-image {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.meme-card.has-image:active {
  cursor: grabbing;
}

.meme-card.has-image::after {
  background: rgba(0, 0, 0, 0.18);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

.meme-image {
  height: 100%;
  max-width: none;
  object-fit: cover;
  pointer-events: none;
  position: absolute;
  transform-origin: center;
  width: 100%;
  z-index: 0;
}

button.meme-image-add {
  align-items: center;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  color: #183f39;
  display: inline-flex;
  font-size: 2.7rem;
  font-weight: 400;
  height: 74px;
  justify-content: center;
  left: 50%;
  line-height: 1;
  min-height: 74px;
  padding: 0 0 5px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 74px;
  z-index: 3;
}

button.meme-image-add.has-picture {
  background: rgba(255, 255, 255, 0.42);
  border-color: rgba(255, 255, 255, 0.5);
  opacity: 0.72;
}

button.meme-image-add:hover,
button.meme-image-add:focus-visible {
  background: rgba(255, 255, 255, 0.9);
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.04);
}

.meme-breaking {
  background: linear-gradient(135deg, #8f1d1d, #f0c44c);
}

.meme-quiet {
  background: linear-gradient(135deg, #20314d, #9ec7d3);
}

.mine .bubble {
  background: var(--wa-green-soft);
}

.mine .bubble.sticker-bubble,
.mine .bubble.meme-bubble {
  background: transparent;
}

.bubble.media-message-bubble {
  gap: 0;
  max-width: min(430px, 82%);
  padding: 4px;
}

.chat-media {
  aspect-ratio: 4 / 3;
  background: #101827;
  border-radius: 6px;
  display: block;
  object-fit: cover;
  width: min(410px, 72vw);
}

.chat-media-caption {
  color: var(--text);
  line-height: 1.35;
  padding: 8px 7px 6px;
}

.message-meta {
  color: var(--muted);
  font-size: 0.75rem;
  padding: 0 4px;
}

.message-status {
  color: var(--wa-green-dark);
  font-weight: 800;
}

.message-expiry {
  color: var(--warning);
}

.message-reactions {
  min-height: 0;
}

.reaction-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 4px;
}

.reaction-summary span {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 7px;
}

.reaction-summary .mine-reaction {
  border-color: var(--wa-green);
  color: var(--wa-green-dark);
}

.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  opacity: 0;
  padding: 0 4px;
  transition: opacity 120ms ease;
}

.message:focus-within .message-actions,
.message:hover .message-actions {
  opacity: 1;
}

button.message-action {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  min-height: 26px;
  padding: 0 8px;
}

button.message-action:hover,
button.message-action.active {
  background: var(--wa-green-soft);
  color: var(--wa-green-dark);
}

button.message-action.danger-text {
  color: var(--danger);
}

.message-form {
  align-items: center;
  background: #f0f2f5;
  display: grid;
  gap: 8px;
  grid-row: 4;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px 12px;
  position: relative;
}

.reply-composer {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--wa-green);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  grid-column: 1 / -1;
  justify-content: space-between;
  min-width: 0;
  padding: 8px 10px;
}

.reply-composer div {
  display: grid;
  min-width: 0;
}

.reply-composer strong {
  color: var(--wa-green-dark);
  font-size: 0.78rem;
}

.reply-composer span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.icon-light {
  background: var(--panel-soft);
  border-radius: 999px;
  color: var(--text);
  font-size: 1.2rem;
  height: 32px;
  min-height: 32px;
  padding: 0;
  width: 32px;
}

.composer-pill {
  align-items: center;
  background: #fff;
  border: 1px solid #dce1e5;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(17, 27, 33, 0.08);
  display: flex;
  gap: 2px;
  min-height: 52px;
  min-width: 0;
  padding: 4px;
}

button.composer-icon-button {
  align-items: center;
  background: transparent;
  border-radius: 999px;
  color: #394b59;
  display: inline-flex;
  flex: 0 0 42px;
  font-size: 1.35rem;
  height: 42px;
  justify-content: center;
  min-height: 42px;
  padding: 0;
  width: 42px;
}

button.composer-icon-button:hover,
button.composer-icon-button[aria-expanded="true"] {
  background: #edf1f4;
}

.composer-more-wrap {
  display: flex;
  flex: 0 0 42px;
  position: relative;
}

.composer-pill input {
  background: transparent;
  border: 0;
  box-shadow: none;
  flex: 1;
  min-height: 42px;
  min-width: 0;
  outline: 0;
  padding: 8px 6px;
}

button.composer-send-button {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 50px;
  font-size: 1.15rem;
  height: 50px;
  justify-content: center;
  min-height: 50px;
  padding: 0;
  width: 50px;
}

.composer-action-menu {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  bottom: calc(100% + 10px);
  box-shadow: 0 14px 36px rgba(17, 27, 33, 0.18);
  display: grid;
  gap: 4px;
  left: 0;
  padding: 6px;
  position: absolute;
  width: 136px;
  z-index: 6;
}

button.composer-action-item {
  align-items: center;
  background: #fff;
  border-radius: 7px;
  color: var(--text);
  display: grid;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 400;
  gap: 10px;
  grid-template-columns: 32px minmax(0, 1fr);
  justify-items: start;
  min-height: 44px;
  padding: 0 10px;
  text-align: left;
}

button.composer-action-item:hover {
  background: #edf1f4;
}

button.composer-action-item > span:first-child {
  display: grid;
  font-size: 1rem;
  place-items: center;
  width: 32px;
}

.composer-picker {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(17, 27, 33, 0.14);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  bottom: 72px;
  max-height: min(460px, calc(100vh - 150px));
  min-height: 360px;
  overflow: hidden;
  position: absolute;
  right: 70px;
  width: min(540px, calc(100% - 94px));
  z-index: 7;
}

.gif-category-tabs {
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 2px;
  grid-auto-columns: minmax(54px, 1fr);
  grid-auto-flow: column;
  grid-row: 1;
  overflow-x: auto;
  padding: 4px 8px 2px;
  scrollbar-width: none;
}

.gif-category-tabs::-webkit-scrollbar {
  display: none;
}

.gif-category-tabs button {
  align-items: center;
  background: transparent;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: #69777f;
  display: grid;
  gap: 1px;
  justify-items: center;
  min-height: 48px;
  padding: 4px 6px;
}

.gif-category-tabs button.active {
  border-bottom-color: #16a765;
  color: var(--wa-green-dark);
}

.gif-category-tabs span {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}

.gif-category-tabs small {
  font-size: 0.62rem;
  font-weight: 700;
  white-space: nowrap;
}

.composer-picker-search-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-row: 2;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 10px 12px;
}

.composer-picker-search-row > span {
  color: var(--muted);
  font-size: 1.25rem;
}

.composer-picker-search-row input {
  background: #f5f7f8;
  border: 1px solid #dce1e5;
  border-radius: 999px;
  min-height: 40px;
  padding: 8px 14px;
}

.composer-picker-panel {
  grid-row: 3;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
}

.giphy-grid {
  column-count: 3;
  column-gap: 8px;
}

button.giphy-result {
  background: #e7ecef;
  border: 0;
  border-radius: 5px;
  break-inside: avoid;
  display: block;
  margin: 0 0 8px;
  min-height: 74px;
  overflow: hidden;
  padding: 0;
  width: 100%;
}

button.giphy-result:hover,
button.giphy-result:focus-visible {
  box-shadow: 0 0 0 3px rgba(22, 167, 101, 0.3);
  transform: translateY(-1px);
}

.giphy-result img {
  display: block;
  height: auto;
  min-height: 74px;
  object-fit: cover;
  width: 100%;
}

.giphy-setup-note,
.giphy-error {
  background: #f4f7f8;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 12px;
}

.giphy-setup-note strong,
.giphy-error span {
  font-size: 0.82rem;
}

.giphy-setup-note span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.giphy-error {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.giphy-error button,
button.giphy-more {
  background: #e8f5f1;
  color: var(--wa-green-dark);
  min-height: 34px;
  padding: 6px 12px;
}

button.giphy-more {
  display: block;
  margin: 12px auto 4px;
}

.giphy-loading {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.78rem;
  gap: 9px;
  justify-content: center;
  padding: 22px 0;
}

.giphy-loading span {
  animation: spin 0.8s linear infinite;
  border: 2px solid #d7e0e3;
  border-radius: 50%;
  border-top-color: var(--wa-green);
  height: 18px;
  width: 18px;
}

.giphy-attribution {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.giphy-attribution img {
  display: block;
  height: 28px;
  object-fit: contain;
  width: 140px;
}

.meme-picker-panel {
  scrollbar-width: none;
}

.meme-picker-panel::-webkit-scrollbar {
  display: none;
}

.emoji-category + .emoji-category {
  margin-top: 18px;
}

.emoji-category h3 {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0 0 8px;
}

.emoji-grid {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
}

.emoji-grid button {
  background: transparent;
  border-radius: 7px;
  color: var(--text);
  font-size: 1.75rem;
  min-height: 42px;
  padding: 0;
}

.emoji-grid button:hover {
  background: #edf1f4;
  transform: scale(1.08);
}

.gif-picker-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gif-reaction-card {
  aspect-ratio: 16 / 10;
  border: 0;
  border-radius: 8px;
  color: #10233e;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  place-items: center;
  text-align: center;
}

.gif-reaction-card > span {
  animation: gif-bounce 1.25s ease-in-out infinite;
  font-size: 2.8rem;
  line-height: 1;
}

.gif-reaction-card strong {
  font-size: 0.8rem;
}

.gif-reaction-card small {
  color: rgba(16, 35, 62, 0.65);
  font-size: 0.68rem;
}

.gif-theme-sunny {
  background: #ffe7a3;
}

.gif-theme-coral {
  background: #ffc1b5;
}

.gif-theme-rose {
  background: #ffd1df;
}

.gif-theme-mint {
  background: #bfead8;
}

.gif-theme-sky {
  background: #c7e1ff;
}

.gif-theme-violet {
  background: #ddd2f8;
}

.gif-theme-lemon {
  background: #fff1a8;
}

.gif-theme-ice {
  background: #d7eef2;
}

.picker-meme-form {
  display: grid;
  gap: 12px;
}

.picker-meme-fields {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.picker-meme-fields label:first-child {
  grid-column: 1 / -1;
}

.picker-meme-fields label {
  display: grid;
  gap: 5px;
}

.picker-meme-fields label > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.picker-meme-form .meme-card {
  max-width: none;
  min-width: 0;
  width: 100%;
}

.composer-picker-tabs {
  border-top: 1px solid var(--line);
  display: grid;
  grid-row: 4;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 5px 10px;
}

.composer-picker-tabs button {
  align-items: center;
  background: transparent;
  border-radius: 7px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  justify-content: center;
  min-height: 42px;
  padding: 4px 8px;
}

.composer-picker-tabs button.active {
  background: #e8f5f1;
  color: var(--wa-green-dark);
}

.composer-picker-tabs button > span {
  font-size: 1rem;
  font-weight: 900;
}

.composer-picker-tabs small {
  font-size: 0.75rem;
  font-weight: 500;
}

.picker-empty {
  color: var(--muted);
  margin: 36px 0;
  text-align: center;
}

@keyframes gif-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-6px) scale(1.08);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state {
  align-self: center;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  justify-items: center;
  margin: auto;
  max-width: 440px;
  padding: 34px;
  text-align: center;
}

.invite-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.detail-view {
  align-content: start;
  background: var(--panel);
  display: grid;
  overflow: auto;
}

.detail-hero {
  align-items: center;
  background: var(--panel-soft);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  padding: 28px;
}

button.group-detail-back {
  align-items: center;
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  flex: 0 0 42px;
  font-size: 1.45rem;
  height: 42px;
  justify-content: center;
  min-height: 42px;
  padding: 0 0 2px;
  width: 42px;
}

button.group-detail-back:hover {
  background: #e8f5f1;
  color: var(--wa-green-dark);
}

.detail-avatar {
  flex: 0 0 84px;
  font-size: 1.6rem;
  height: 84px;
  width: 84px;
}

.detail-hero h2 {
  font-size: 1.5rem;
}

.lock-note {
  background: #fff7e2;
  border-bottom: 1px solid #f1d99e;
  color: #7a5200;
  padding: 12px 28px;
}

.rules-panel {
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 6px;
  padding: 16px 28px;
}

.rules-panel strong {
  color: var(--wa-green-dark);
}

.rules-panel p {
  color: var(--muted);
  line-height: 1.5;
}

.closure-grid {
  background: var(--panel-soft);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 14px 28px;
}

.closure-grid > div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 9px;
}

.closure-grid strong {
  color: var(--wa-green-dark);
  font-size: 1.1rem;
}

.closure-grid span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.detail-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 16px 28px 4px;
}

.compact-detail {
  padding-top: 18px;
  padding-bottom: 18px;
}

.detail-section-title {
  padding: 20px 28px 8px;
}

.detail-section-title.flush {
  padding-top: 0;
}

.detail-list {
  display: grid;
  padding: 0 28px 28px;
}

.profile-form {
  display: grid;
  gap: 12px;
}

.profile-edit-grid {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: 84px minmax(0, 1fr);
}

.profile-edit-fields {
  display: grid;
  gap: 12px;
}

.profile-stats-grid {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 16px 28px;
}

.profile-stat-tile {
  align-items: center;
  border-right: 1px solid var(--line);
  display: grid;
  gap: 2px;
  justify-items: center;
  min-width: 0;
}

.profile-stat-tile:last-child {
  border-right: 0;
}

.profile-stat-tile strong {
  color: var(--wa-green-dark);
  font-size: 1.25rem;
}

.profile-stat-tile span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.profile-menu-list {
  background: var(--panel-soft);
  display: grid;
  gap: 8px;
  padding: 18px 28px 28px;
}

.profile-menu {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.profile-menu summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 12px;
  min-height: 64px;
  padding: 11px 14px;
  user-select: none;
}

.profile-menu summary::-webkit-details-marker {
  display: none;
}

.profile-menu summary::marker {
  content: "";
}

.profile-menu summary:hover {
  background: #f8fafc;
}

.profile-menu-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.profile-menu-copy strong,
.profile-menu-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu-copy small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.profile-menu-count {
  align-items: center;
  background: var(--wa-green-soft);
  border-radius: 999px;
  color: var(--wa-green-dark);
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  justify-content: center;
  min-height: 24px;
  min-width: 24px;
  padding: 3px 7px;
}

.profile-menu-chevron {
  border-bottom: 2px solid var(--muted);
  border-right: 2px solid var(--muted);
  display: block;
  flex: 0 0 9px;
  height: 9px;
  margin: 0 3px 4px 2px;
  transform: rotate(45deg);
  transition: transform 160ms ease;
  width: 9px;
}

.profile-menu[open] .profile-menu-chevron {
  margin-bottom: -3px;
  transform: rotate(225deg);
}

.profile-menu-panel {
  background: #fbfcfe;
  border-top: 1px solid var(--line);
  padding: 16px;
}

.profile-menu-panel .detail-list {
  padding: 0;
}

.profile-menu-action-panel {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.profile-menu-action-panel > div {
  display: grid;
  gap: 3px;
}

.profile-account-panel {
  padding: 0;
}

.profile-account-row {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px;
}

.profile-account-row + .profile-account-row {
  border-top: 1px solid var(--line);
}

.profile-account-row > div {
  display: grid;
  gap: 3px;
}

.profile-account-row > button {
  flex: 0 0 216px;
  width: 216px;
}

.profile-account-danger strong {
  color: #a8243a;
}

.delete-account-modal {
  max-width: 460px;
}

.passkey-setup-modal {
  max-width: 460px;
}

.passkey-setup-copy {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.passkey-benefits {
  background: #eef8f5;
  border: 1px solid #cfe4de;
  border-radius: 8px;
  display: grid;
  gap: 9px;
  padding: 14px;
}

.passkey-benefits span {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 750;
  padding-left: 22px;
  position: relative;
}

.passkey-benefits span::before {
  color: var(--wa-green);
  content: "✓";
  font-weight: 900;
  left: 0;
  position: absolute;
}

.passkey-setup-actions button {
  min-width: 148px;
}

.danger-eyebrow,
.delete-account-warning strong {
  color: #a8243a;
}

.delete-account-warning {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.delete-account-actions button {
  min-width: 148px;
}

.sidebar-nav {
  background: var(--panel-soft);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 8px;
}

button.sidebar-nav-button {
  background: transparent;
  color: var(--muted);
  min-height: 38px;
  padding: 0 10px;
}

button.sidebar-nav-button:hover,
button.sidebar-nav-button.active {
  background: var(--panel);
  color: var(--wa-green-dark);
}

.nav-count {
  align-items: center;
  background: var(--wa-green);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.7rem;
  justify-content: center;
  margin-left: 5px;
  min-height: 20px;
  min-width: 20px;
  padding: 2px 6px;
}

.sidebar-section {
  min-height: 0;
  overflow: auto;
}

.status-list-item {
  grid-template-columns: 46px minmax(0, 1fr);
}

.status-sidebar-group + .status-sidebar-group {
  border-top: 1px solid var(--line);
}

.status-ring {
  align-items: center;
  border: 2px solid var(--wa-green);
  border-radius: 999px;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.status-ring span {
  align-items: center;
  background: var(--panel-soft);
  border-radius: 999px;
  color: var(--wa-green-dark);
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.status-unseen-dot {
  background: var(--wa-green);
  border-radius: 999px;
  height: 9px;
  width: 9px;
}

.status-hero {
  align-items: center;
  background: #eef5ff;
}

.status-add-control {
  margin-left: auto;
  position: relative;
}

button.status-add-button {
  align-items: center;
  background: var(--wa-green-dark);
  border-radius: 999px;
  display: inline-flex;
  font-size: 1.25rem;
  height: 32px;
  justify-content: center;
  line-height: 1;
  min-height: 32px;
  padding: 0;
  width: 32px;
}

.status-hero button.status-add-button {
  font-size: 1.5rem;
  height: 40px;
  min-height: 40px;
  width: 40px;
}

.status-type-menu {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 45px rgba(17, 27, 33, 0.2);
  display: grid;
  gap: 2px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 168px;
  z-index: 12;
}

.status-type-menu button {
  align-items: center;
  background: transparent;
  color: var(--text);
  display: flex;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 400;
  gap: 8px;
  justify-content: flex-start;
  min-height: 42px;
  padding: 6px 7px;
  text-align: left;
}

.status-type-menu button:hover {
  background: var(--panel-soft);
}

.status-type-menu button:first-child {
  border: 2px solid var(--wa-green);
}

.status-type-menu button span {
  font-size: 1rem;
  width: 18px;
}

.status-mark,
.contacts-mark {
  align-items: center;
  background: #152a46;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 72px;
  font-size: 1.5rem;
  font-weight: 900;
  height: 72px;
  justify-content: center;
  width: 72px;
}

.contacts-mark {
  background: #0f6b5f;
}

.contacts-hero {
  align-items: center;
  background: #f0f7f6;
}

.contacts-hero-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-left: auto;
}

button.contacts-add-button {
  background: #0f6b5f;
  color: #fff;
  flex: 0 0 auto;
}

button.contacts-add-button:hover {
  background: #0b574e;
}

.status-composer-modal {
  max-width: 520px;
}

.status-audience-fieldset {
  border: 0;
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
}

.status-audience-fieldset legend {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 7px;
  padding: 0;
}

.status-audience-tabs {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-audience-tabs label {
  cursor: pointer;
  display: block;
  position: relative;
}

.status-audience-tabs input {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.status-audience-tabs span {
  align-items: center;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 0.86rem;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 8px 12px;
}

.status-audience-tabs input:checked + span {
  background: #e8f0ff;
  border-color: #6f96e8;
  color: #2458c2;
}

.status-audience-tabs input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.18);
}

.status-group-picker {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.status-group-picker-heading {
  align-items: center;
  background: #f7f9fc;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
}

.status-group-options {
  display: grid;
  max-height: 230px;
  overflow-y: auto;
}

.status-group-choice {
  align-items: center;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  gap: 10px;
  min-height: 58px;
  padding: 9px 12px;
}

.status-group-choice:last-child {
  border-bottom: 0;
}

.status-group-choice.selected {
  background: #f1f6ff;
}

.status-group-choice input {
  accent-color: #2f6fed;
  flex: 0 0 20px;
  height: 20px;
  min-height: 20px;
  width: 20px;
}

.status-group-choice-identity {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.status-group-choice-identity strong,
.status-group-choice-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-media-fields {
  display: grid;
  gap: 12px;
}

.field-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.media-source-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-source-actions button {
  min-height: 44px;
}

.status-media-preview {
  align-items: center;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 112px minmax(0, 1fr);
  padding: 10px;
}

.status-media-preview img,
.status-media-preview video {
  aspect-ratio: 4 / 3;
  background: #101827;
  border-radius: 6px;
  object-fit: cover;
  width: 112px;
}

.status-media-preview span {
  color: var(--muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.status-feed {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 210px));
  padding: 0 28px 28px;
}

.status-card {
  aspect-ratio: 3 / 4;
  background: #152a46;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  overflow: hidden;
  width: min(100%, 210px);
}

.status-card.selected {
  border-color: var(--wa-green);
  box-shadow: 0 0 0 2px rgba(7, 94, 84, 0.1);
}

.status-card header {
  background: var(--panel);
  padding: 14px;
}

.status-card h3 {
  font-size: 1rem;
  margin: 3px 0 4px;
  overflow-wrap: anywhere;
}

.status-anonymous-label {
  color: var(--wa-green-dark);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-media {
  aspect-ratio: 4 / 3;
  background: #101827;
  object-fit: contain;
  width: 100%;
}

.status-card-preview {
  background: #eef4ef;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.status-card-preview::after {
  background: rgba(255, 255, 255, 0.2);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.status-card-preview-media {
  aspect-ratio: auto;
  filter: blur(13px);
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  pointer-events: none;
  transform: scale(1.12);
  width: 100%;
}

.status-card-preview .status-text-media {
  align-items: center;
  background: #dfe9e1;
  color: #17382a;
  display: flex;
  font-size: 1.25rem;
  font-weight: 800;
  justify-content: center;
  line-height: 1.25;
  overflow-wrap: anywhere;
  padding: 24px;
  text-align: center;
}

button.status-reveal {
  align-items: center;
  background: #152a46;
  border-radius: 6px;
  display: inline-flex;
  font-size: 0.86rem;
  justify-content: center;
  left: 50%;
  margin: 0;
  min-height: 36px;
  padding: 7px 12px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  width: auto;
  z-index: 2;
}

.status-viewer-modal {
  background: rgba(3, 9, 18, 0.88);
  z-index: 30;
}

.status-viewer-panel {
  background: #07111f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
  color: #fff;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: min(760px, calc(100vh - 36px));
  overflow: hidden;
  width: min(430px, 100%);
}

.status-viewer-progress {
  background: rgba(255, 255, 255, 0.22);
  height: 3px;
  margin: 10px 12px 0;
  overflow: hidden;
}

.status-viewer-progress span {
  background: #fff;
  display: block;
  height: 100%;
  transform-origin: left;
  width: 100%;
}

@keyframes status-viewer-countdown {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.status-viewer-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
}

.status-viewer-header > div {
  display: grid;
  gap: 2px;
}

.status-viewer-label {
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-viewer-time,
.status-viewer-footer span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
}

button.status-viewer-close {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #fff;
  font-size: 1.25rem;
  height: 38px;
  min-height: 38px;
  padding: 0;
  width: 38px;
}

button.status-viewer-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.status-viewer-media {
  align-items: center;
  background: #02060d;
  display: flex;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}

.status-viewer-asset {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.status-viewer-text {
  align-items: center;
  color: #fff;
  display: flex;
  font-size: 2rem;
  font-weight: 800;
  height: 100%;
  justify-content: center;
  line-height: 1.25;
  overflow-wrap: anywhere;
  padding: 32px;
  text-align: center;
  width: 100%;
}

.status-viewer-footer {
  padding: 14px 16px 18px;
}

button.status-viewer-delete {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  margin-top: 12px;
  width: 100%;
}

button.status-viewer-delete:hover {
  background: rgba(255, 255, 255, 0.2);
}

.status-viewer-footer h2 {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.status-card footer {
  align-items: center;
  background: var(--panel);
  display: flex;
  justify-content: space-between;
  min-height: 48px;
  padding: 8px 14px;
}

.contact-modal-form {
  gap: 0;
  min-height: min(620px, calc(100vh - 36px));
  max-width: 440px;
  overflow: hidden;
  padding: 0;
  width: min(100%, 440px);
}

.contact-page-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
  min-height: 58px;
  padding: 8px 16px;
}

.contact-page-header h2 {
  font-size: 1rem;
  font-weight: 600;
}

button.contact-back-button {
  align-items: center;
  background: transparent;
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 2rem;
  font-weight: 400;
  height: 40px;
  justify-content: center;
  line-height: 1;
  min-height: 40px;
  padding: 0 0 3px;
  width: 40px;
}

button.contact-back-button:hover {
  background: var(--panel-soft);
}

.contact-form-body {
  display: grid;
  gap: 34px;
  padding: 42px 28px 28px;
}

.contact-field-row {
  align-items: flex-start;
  display: grid;
  gap: 18px;
  grid-template-columns: 24px minmax(0, 1fr);
}

.contact-field-stack {
  display: grid;
  gap: 30px;
}

.contact-form-icon {
  color: #68727c;
  height: 24px;
  margin-top: 8px;
  position: relative;
  width: 24px;
}

.contact-person-icon::before {
  border: 2px solid currentColor;
  border-radius: 50%;
  content: "";
  height: 6px;
  left: 8px;
  position: absolute;
  top: 1px;
  width: 6px;
}

.contact-person-icon::after {
  border: 2px solid currentColor;
  border-radius: 9px 9px 3px 3px;
  bottom: 1px;
  content: "";
  height: 8px;
  left: 4px;
  position: absolute;
  width: 14px;
}

.contact-phone-icon {
  font-size: 1.25rem;
  line-height: 24px;
  text-align: center;
}

label.contact-line-field {
  display: grid;
  gap: 3px;
}

label.contact-line-field .contact-line-label {
  font-size: 0.72rem;
  font-weight: 500;
}

.contact-line-field input,
.contact-line-field input:focus {
  background: transparent;
  border: 0;
  border-bottom: 2px solid #9aa0a6;
  border-radius: 0;
  box-shadow: none;
  min-height: 44px;
  padding: 8px 2px;
}

.contact-line-field input:focus {
  border-bottom-color: #10a36f;
}

.contact-phone-field {
  min-width: 0;
}

.contact-lookup-message {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  min-height: 2.2em;
  padding-top: 5px;
}

.contact-lookup-message.success {
  color: #08785f;
}

.contact-lookup-message.error {
  color: var(--danger);
}

button.contact-save-button {
  margin-top: 24px;
}

.sidebar-contact-item {
  grid-template-columns: 46px minmax(0, 1fr);
}

.image-preview-row {
  align-items: center;
  display: flex;
  gap: 12px;
}

.group-create-modal {
  max-height: min(820px, calc(100vh - 36px));
  overflow-y: auto;
}

.group-members-field {
  display: grid;
  gap: 7px;
}

.member-summary-button {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  display: flex;
  font-weight: 600;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}

.member-summary-button:hover {
  background: #f7f9fc;
  border-color: #aebac3;
}

.member-summary-text {
  line-height: 1.4;
  min-width: 0;
  overflow-wrap: anywhere;
}

.member-summary-text.placeholder {
  color: var(--muted);
  font-weight: 500;
}

.member-summary-chevron {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 1.45rem;
  line-height: 1;
  margin-left: 12px;
}

.member-picker-modal {
  grid-template-rows: auto auto minmax(120px, 1fr) auto;
  height: min(680px, calc(100vh - 36px));
  max-width: 560px;
  overflow: hidden;
  padding-bottom: 14px;
  width: min(100%, 560px);
}

.member-picker-search-field input {
  background: #f7f9fc;
}

.member-picker-options {
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  min-height: 0;
  overflow-y: auto;
}

.group-contact-choice {
  align-items: center;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  gap: 10px;
  min-height: 62px;
  padding: 9px 12px;
}

.group-contact-choice:last-child {
  border-bottom: 0;
}

.group-contact-choice.selected {
  background: #f1f6ff;
}

.group-contact-choice .avatar {
  flex: 0 0 42px;
  height: 42px;
  width: 42px;
}

.group-contact-identity {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

.group-contact-identity strong,
.group-contact-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-contact-choice input {
  accent-color: var(--wa-green);
  flex: 0 0 20px;
  height: 20px;
  min-height: 20px;
  width: 20px;
}

.group-contact-empty {
  line-height: 1.45;
  margin: 0;
  padding: 16px;
}

.member-picker-footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

button.member-picker-confirm {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 1.35rem;
  height: 48px;
  justify-content: center;
  min-height: 48px;
  padding: 0;
  width: 48px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
}

.chip {
  align-items: center;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 800;
  min-height: 30px;
  padding: 5px 10px;
}

.modal {
  align-items: center;
  background: rgba(17, 27, 33, 0.52);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 20;
}

.modal-card {
  background: var(--panel);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(17, 27, 33, 0.32);
  display: grid;
  gap: 14px;
  max-width: 520px;
  padding: 20px;
  width: min(100%, 520px);
}

.bubble.poll-message-bubble {
  padding: 0;
  width: min(380px, 82vw);
}

.poll-message-card {
  display: grid;
  gap: 12px;
  padding: 13px;
  width: 100%;
}

.poll-message-heading {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.poll-message-heading strong {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.35;
}

.poll-message-heading > span {
  background: var(--panel-soft);
  border-radius: 999px;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 4px 7px;
  text-transform: uppercase;
}

.poll-message-options {
  display: grid;
  gap: 7px;
}

button.poll-message-option {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  display: grid;
  gap: 6px;
  min-height: 52px;
  padding: 8px 9px;
  text-align: left;
  width: 100%;
}

button.poll-message-option:hover:not(:disabled),
button.poll-message-option.selected {
  background: var(--wa-green-soft);
  border-color: var(--wa-green);
}

button.poll-message-option:disabled {
  cursor: default;
  opacity: 1;
}

.poll-option-label {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 18px minmax(0, 1fr) auto;
}

.poll-option-label b {
  color: var(--muted);
  font-size: 0.78rem;
}

.poll-option-marker {
  border: 2px solid #87949f;
  border-radius: 50%;
  height: 17px;
  position: relative;
  width: 17px;
}

.poll-option-marker.multiple {
  border-radius: 4px;
}

.poll-message-option.selected .poll-option-marker {
  background: var(--wa-green);
  border-color: var(--wa-green);
  box-shadow: inset 0 0 0 3px #fff;
}

.poll-option-track {
  background: #e6ebef;
  border-radius: 999px;
  display: block;
  height: 4px;
  overflow: hidden;
}

.poll-option-track > span {
  background: var(--wa-green);
  display: block;
  height: 100%;
  transition: width 180ms ease;
}

.poll-message-option small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.poll-message-footer {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.76rem;
  gap: 10px;
  justify-content: space-between;
}

button.poll-vote-button {
  background: transparent;
  border: 0;
  color: var(--wa-green-dark);
  min-height: 34px;
  padding: 5px 8px;
}

button.poll-vote-button:hover:not(:disabled) {
  background: var(--wa-green-soft);
}

.poll-modal-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(92dvh, 760px);
  overflow: hidden;
  padding: 0;
  width: min(520px, calc(100vw - 24px));
}

.poll-modal-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  min-height: 62px;
  padding: 10px 16px;
}

.poll-modal-header h2 {
  font-size: 1.08rem;
  margin: 0;
}

button.poll-close-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--ink);
  display: inline-flex;
  font-size: 1.55rem;
  height: 38px;
  justify-content: center;
  padding: 0;
  width: 38px;
}

button.poll-close-button:hover {
  background: var(--panel-soft);
}

.poll-modal-body {
  overflow-y: auto;
  padding: 22px 18px;
  scrollbar-width: none;
}

.poll-modal-body::-webkit-scrollbar {
  display: none;
}

.poll-field,
.poll-options-editor {
  display: grid;
  gap: 10px;
}

.poll-field > span,
.poll-options-editor h3 {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
  margin: 0;
}

.poll-field input,
.poll-option-editor-row input {
  background: transparent;
  border: 0;
  border-bottom: 2px solid #a7adb2;
  border-radius: 0;
  min-height: 44px;
  padding: 8px 0;
}

.poll-field input:focus,
.poll-option-editor-row input:focus {
  border-color: var(--wa-green);
  box-shadow: none;
}

.poll-options-editor {
  margin-top: 26px;
}

#pollOptionsList {
  display: grid;
  gap: 10px;
}

.poll-option-editor-row {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) 30px 22px;
}

button.poll-remove-option,
.poll-option-handle {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  display: inline-flex;
  font-size: 1.2rem;
  justify-content: center;
  min-height: 30px;
  padding: 0;
}

button.poll-remove-option:disabled {
  visibility: hidden;
}

button.poll-add-option {
  align-items: center;
  align-self: start;
  background: transparent;
  border: 0;
  color: var(--wa-green-dark);
  display: inline-flex;
  gap: 6px;
  min-height: 40px;
  padding: 6px 0;
}

.poll-settings {
  border-top: 1px solid var(--line);
  display: grid;
  margin-top: 22px;
  padding-top: 8px;
}

.poll-setting-row {
  align-items: center;
  cursor: pointer;
  display: grid;
  font-size: 0.92rem;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 52px;
  position: relative;
}

.poll-switch-input {
  height: 1px;
  opacity: 0;
  position: absolute;
  right: 0;
  width: 1px;
}

.poll-switch {
  background: #a9adaf;
  border-radius: 999px;
  height: 24px;
  padding: 3px;
  transition: background 160ms ease;
  width: 42px;
}

.poll-switch::after {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(17, 27, 33, 0.25);
  content: "";
  display: block;
  height: 18px;
  transition: transform 160ms ease;
  width: 18px;
}

.poll-switch-input:checked + .poll-switch {
  background: var(--wa-green);
}

.poll-switch-input:checked + .poll-switch::after {
  transform: translateX(18px);
}

.poll-switch-input:focus-visible + .poll-switch {
  outline: 3px solid rgba(22, 167, 101, 0.24);
  outline-offset: 2px;
}

.poll-end-time {
  display: grid;
  gap: 6px;
  padding: 4px 0 10px;
}

.poll-end-time > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.poll-modal-footer {
  align-items: center;
  background: #f6f8f8;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 68px;
  padding: 10px 16px;
}

button.poll-send-button {
  align-items: center;
  background: var(--wa-green);
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.1rem;
  height: 48px;
  justify-content: center;
  padding: 0;
  width: 48px;
}

@media (max-width: 560px) {
  .poll-modal {
    align-items: stretch;
    padding: 0;
  }

  .poll-modal-card {
    border-radius: 0;
    max-height: 100dvh;
    min-height: 100dvh;
    width: 100%;
  }
}

.onboarding-modal {
  background: rgba(12, 28, 27, 0.72);
  z-index: 40;
}

.onboarding-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(4, 20, 18, 0.34);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(760px, calc(100dvh - 36px));
  max-width: 900px;
  min-height: min(650px, calc(100dvh - 36px));
  overflow: hidden;
  width: min(100%, 900px);
}

.onboarding-header,
.onboarding-footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 18px 22px;
}

.onboarding-header {
  border-bottom: 1px solid #dfe5e3;
}

.onboarding-footer {
  border-top: 1px solid #dfe5e3;
}

.onboarding-brand {
  align-items: center;
  display: flex;
  gap: 11px;
}

.onboarding-brand img {
  border-radius: 8px;
  height: 42px;
  object-fit: cover;
  width: 42px;
}

.onboarding-brand div {
  display: grid;
  gap: 1px;
}

.onboarding-brand strong {
  font-size: 1rem;
}

.onboarding-brand span {
  color: var(--muted);
  font-size: 0.78rem;
}

button.onboarding-skip {
  background: transparent;
  color: var(--muted);
  min-height: 36px;
  padding: 0 8px;
}

button.onboarding-skip:hover {
  background: var(--panel-soft);
  color: var(--text);
}

.onboarding-slides {
  min-height: 0;
  overflow: auto;
}

.onboarding-slide {
  align-items: center;
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  min-height: 100%;
  padding: 36px 48px;
}

.onboarding-copy {
  display: grid;
  gap: 14px;
}

.onboarding-copy .eyebrow {
  margin: 0;
}

.onboarding-copy h1 {
  color: #172622;
  font-size: 2.15rem;
  line-height: 1.08;
}

.onboarding-copy > p:last-child {
  color: #64736f;
  line-height: 1.65;
}

.onboarding-demo {
  background: #eef5f3;
  border: 1px solid #d3e1dd;
  border-radius: 8px;
  min-height: 380px;
  overflow: hidden;
  position: relative;
}

.demo-topbar {
  background: #126b5f;
  color: #fff;
  display: grid;
  gap: 2px;
  padding: 16px 18px;
}

.demo-topbar span {
  font-weight: 850;
}

.demo-topbar small {
  color: rgba(255, 255, 255, 0.78);
}

.demo-chat-stream {
  background: #f2ece4;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 262px;
  padding: 28px 18px 18px;
}

.demo-chat-bubble {
  animation: onboarding-bubble 6s infinite both;
  background: #fff;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  max-width: 78%;
  opacity: 0;
  padding: 10px 12px;
  transform: translateY(12px);
}

.demo-chat-bubble:nth-child(2) {
  animation-delay: 1.6s;
}

.demo-chat-bubble:nth-child(3) {
  animation-delay: 3.2s;
}

.demo-chat-bubble.outgoing {
  align-self: flex-end;
  background: #d7f6d1;
}

.demo-chat-bubble small {
  color: #286d61;
  font-size: 0.68rem;
  font-weight: 850;
}

.demo-chat-bubble.outgoing small {
  color: #5b716b;
  text-align: right;
}

.demo-composer {
  align-items: center;
  background: #fff;
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr auto;
  min-height: 54px;
  padding: 9px 14px;
}

.demo-composer span,
.demo-composer b {
  color: #126b5f;
  font-size: 1.2rem;
}

.demo-composer small {
  color: #7d8985;
}

.demo-trust {
  display: grid;
  gap: 0;
  padding: 18px;
}

.demo-trust-head {
  align-items: center;
  display: flex;
  gap: 12px;
  padding: 4px 0 17px;
}

.demo-trust-head > div,
.demo-trust-row > div {
  display: grid;
  flex: 1;
  gap: 2px;
}

.demo-trust-head small,
.demo-trust-row small,
.demo-rule small {
  color: #697873;
}

.demo-group-mark,
.demo-trust-row > span {
  align-items: center;
  background: #caeee6;
  border-radius: 999px;
  color: #0b5d52;
  display: inline-flex;
  flex: 0 0 46px;
  font-size: 0.8rem;
  font-weight: 900;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.demo-trust-row {
  align-items: center;
  animation: onboarding-row 6s infinite both;
  border-top: 1px solid #d6e2df;
  display: flex;
  gap: 11px;
  min-height: 68px;
}

.demo-trust-row:nth-child(3) {
  animation-delay: 0.8s;
}

.demo-trust-row:nth-child(4) {
  animation-delay: 1.6s;
}

.demo-trust-row > span {
  flex-basis: 38px;
  height: 38px;
  width: 38px;
}

.demo-trust-row b {
  color: #168a78;
}

.demo-trust-row.pending b {
  color: #a96805;
}

.demo-rule {
  animation: onboarding-rule 6s infinite both;
  background: #fff6d9;
  border-left: 3px solid #d29327;
  display: grid;
  gap: 3px;
  margin-top: 14px;
  padding: 12px;
}

.demo-status {
  align-content: center;
  background: #172f49;
  color: #fff;
  display: grid;
  justify-items: center;
  padding: 22px;
}

.demo-status-ring {
  align-items: center;
  animation: onboarding-pulse 6s infinite;
  border: 3px solid #52cf9e;
  border-radius: 999px;
  display: flex;
  height: 62px;
  justify-content: center;
  width: 62px;
}

.demo-status-ring span {
  align-items: center;
  background: #e1e9e7;
  border-radius: inherit;
  color: #174d45;
  display: flex;
  font-weight: 900;
  height: 50px;
  justify-content: center;
  width: 50px;
}

.demo-status-caption {
  display: grid;
  gap: 4px;
  margin: 12px 0 18px;
  text-align: center;
}

.demo-status-caption small,
.demo-status-caption span {
  color: #c5d4e2;
}

.demo-status-caption strong {
  font-size: 1.12rem;
}

.demo-status-photo {
  align-content: space-between;
  animation: onboarding-photo 6s infinite both;
  background: #e8b95e;
  border-radius: 8px;
  color: #273331;
  display: grid;
  height: 155px;
  padding: 16px;
  width: min(100%, 250px);
}

.demo-status-photo span {
  justify-self: end;
}

.demo-status-photo strong {
  background: #fff;
  justify-self: start;
  padding: 7px 9px;
}

.demo-status-progress {
  background: rgba(255, 255, 255, 0.25);
  height: 3px;
  margin-top: 18px;
  overflow: hidden;
  width: min(100%, 250px);
}

.demo-status-progress span {
  animation: onboarding-progress 6s linear infinite;
  background: #fff;
  display: block;
  height: 100%;
}

.demo-invite {
  align-content: center;
  background: #eaf1fb;
  display: grid;
  justify-items: center;
  padding: 22px;
}

.demo-invite-card {
  animation: onboarding-card-in 6s infinite both;
  background: #fff;
  border: 1px solid #d5dfeb;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  max-width: 280px;
  padding: 18px;
  width: 100%;
}

.demo-invite-card > small {
  color: #257060;
  font-weight: 850;
  text-transform: uppercase;
}

.demo-invite-card > strong {
  font-size: 1.2rem;
}

.demo-invite-card p {
  color: #667781;
  font-size: 0.82rem;
}

.demo-invite-card > div,
.demo-invite-card footer {
  display: flex;
  gap: 8px;
}

.demo-invite-card > div span {
  background: #eef3f7;
  color: #52625e;
  font-size: 0.74rem;
  padding: 5px 7px;
}

.demo-invite-card footer {
  border-top: 1px solid #e1e7ed;
  margin-top: 5px;
  padding-top: 12px;
}

.demo-invite-card footer b {
  border: 1px solid #ccd7df;
  border-radius: 6px;
  color: #52625e;
  flex: 1;
  padding: 8px;
  text-align: center;
}

.demo-invite-card footer b:last-child {
  background: #126b5f;
  border-color: #126b5f;
  color: #fff;
}

.demo-lock {
  align-items: center;
  animation: onboarding-lock 6s infinite both;
  background: #14384d;
  border-radius: 8px;
  color: #fff;
  display: flex;
  gap: 9px;
  margin-top: 14px;
  opacity: 0;
  padding: 11px 14px;
}

.demo-lock span {
  color: #69d3aa;
}

.onboarding-dots,
.onboarding-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

button[data-onboarding-dot] {
  background: #cbd7d4;
  border-radius: 999px;
  height: 8px;
  min-height: 8px;
  padding: 0;
  transition: width 180ms ease, background-color 180ms ease;
  width: 8px;
}

button[data-onboarding-dot].active {
  background: #126b5f;
  width: 25px;
}

@keyframes onboarding-bubble {
  0%, 8% { opacity: 0; transform: translateY(12px); }
  18%, 78% { opacity: 1; transform: translateY(0); }
  92%, 100% { opacity: 0; transform: translateY(-5px); }
}

@keyframes onboarding-row {
  0%, 8% { opacity: 0.25; transform: translateX(-8px); }
  20%, 82% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0.25; }
}

@keyframes onboarding-rule {
  0%, 34% { opacity: 0; transform: translateY(8px); }
  48%, 84% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; }
}

@keyframes onboarding-pulse {
  0%, 100% { transform: scale(0.94); }
  45%, 65% { transform: scale(1); }
}

@keyframes onboarding-photo {
  0%, 12% { opacity: 0; transform: scale(0.96); }
  24%, 82% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.98); }
}

@keyframes onboarding-progress {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes onboarding-card-in {
  0%, 10% { opacity: 0; transform: translateY(16px); }
  24%, 88% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; }
}

@keyframes onboarding-lock {
  0%, 44% { opacity: 0; transform: translateY(9px); }
  58%, 88% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; }
}

.invite-detail-modal {
  max-height: min(760px, calc(100vh - 36px));
  max-width: 760px;
  overflow: auto;
  width: min(100%, 760px);
}

.modal-header {
  align-items: start;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.modal-header h2 {
  font-size: 1.35rem;
}

button.modal-close {
  background: var(--panel-soft);
  border-radius: 999px;
  color: var(--text);
  font-size: 1.2rem;
  height: 38px;
  min-height: 38px;
  padding: 0;
  width: 38px;
}

button.modal-close:hover {
  background: var(--line);
}

.invite-detail-title {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.invite-detail-title h2 {
  font-size: 1.35rem;
}

.invite-detail-summary {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px;
}

.invite-detail-summary div {
  display: grid;
  gap: 3px;
}

.trust-panel {
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.trust-panel div {
  display: grid;
  gap: 3px;
}

.trust-panel strong {
  color: var(--text);
  line-height: 1.4;
}

.invite-detail-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modal-section-heading {
  padding: 0 0 8px;
}

.modal-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 280px;
  overflow: auto;
  padding: 0 12px;
}

.modal-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.participant-row,
.profile-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  min-height: 66px;
  padding: 12px 0;
}

.profile-row .avatar,
.participant-row .avatar {
  flex: 0 0 42px;
}

.participant-row strong,
.profile-row strong {
  display: block;
}

.participant-action {
  margin-left: auto;
}

.toast {
  background: #111b21;
  border-radius: 8px;
  bottom: 20px;
  box-shadow: 0 20px 60px rgba(17, 27, 33, 0.22);
  color: #fff;
  left: 50%;
  max-width: min(540px, calc(100vw - 32px));
  opacity: 0;
  padding: 12px 16px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hidden {
  display: none !important;
}

.sr-only {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

@media (max-width: 860px) {
  .shell {
    padding: 0;
  }

  .app-panel,
  .wa-layout {
    min-height: 100vh;
  }

  .wa-layout {
    border-radius: 0;
    grid-template-columns: 1fr;
    height: auto;
  }

  .sidebar {
    border-right: 0;
    max-height: none;
  }

  .chat-pane {
    height: 100dvh;
    min-height: 100dvh;
  }

  .message-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .message-actions {
    opacity: 1;
  }

  .closure-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .status-feed {
    grid-template-columns: 1fr;
  }

  .onboarding-card {
    max-height: calc(100dvh - 20px);
    min-height: calc(100dvh - 20px);
  }

  .onboarding-slide {
    align-content: start;
    gap: 24px;
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .onboarding-demo {
    min-height: 320px;
  }

  .onboarding-copy h1 {
    font-size: 1.75rem;
  }
}

.terms-modal-card {
  gap: 12px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: min(860px, calc(100dvh - 36px));
  max-height: none;
  max-width: 1080px;
  min-height: 0;
  overflow: hidden;
  width: min(1080px, calc(100vw - 36px));
}

.terms-frame-wrap {
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.terms-frame-wrap iframe {
  border: 0;
  display: block;
  height: 100%;
  min-height: 100%;
  overflow: auto;
  touch-action: pan-y;
  width: 100%;
}

.terms-modal-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.legal-page-link {
  color: var(--wa-green-dark);
  font-size: 0.86rem;
  font-weight: 800;
  margin-right: auto;
  text-decoration: none;
}

.legal-page-link:hover {
  text-decoration: underline;
}

@media (max-width: 560px) {
  .auth-panel {
    border-radius: 0;
    margin: 0;
    min-height: 100vh;
    padding: 22px;
  }

  .group-create-grid {
    grid-template-columns: 1fr;
  }

  .auth-actions,
  .profile-edit-grid,
  .invite-detail-grid,
  .invite-detail-summary,
  .detail-actions,
  .modal-actions {
    grid-template-columns: 1fr;
  }

  .closure-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #contactModal {
    padding: 0;
  }

  .contact-modal-form {
    border-radius: 0;
    box-shadow: none;
    min-height: 100dvh;
    max-width: none;
    width: 100%;
  }

  .contact-form-body {
    padding: 38px 24px 24px;
  }

  .contacts-hero-actions {
    align-items: flex-end;
    flex-direction: column-reverse;
  }

  .composer-picker {
    bottom: 70px;
    left: 8px;
    max-height: min(430px, calc(100dvh - 170px));
    min-height: 330px;
    right: 8px;
    width: auto;
  }

  .picker-meme-fields {
    grid-template-columns: 1fr;
  }

  .picker-meme-fields label:first-child {
    grid-column: auto;
  }

  .composer-picker-tabs small {
    display: none;
  }

  .onboarding-modal {
    padding: 0;
  }

  .onboarding-card {
    border-radius: 0;
    max-height: 100dvh;
    min-height: 100dvh;
  }

  .onboarding-header,
  .onboarding-footer {
    padding: 13px 16px;
  }

  .onboarding-brand span {
    display: none;
  }

  .onboarding-slide {
    gap: 20px;
    padding: 18px 16px 24px;
  }

  .onboarding-demo {
    min-height: 300px;
  }

  .demo-chat-stream {
    min-height: 196px;
    padding-top: 18px;
  }

  .onboarding-copy {
    gap: 10px;
  }

  .onboarding-copy h1 {
    font-size: 1.55rem;
  }

  .onboarding-actions button {
    min-height: 38px;
    padding: 0 12px;
  }

  .profile-help-row {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-account-row {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-account-row > button {
    flex-basis: auto;
    width: 100%;
  }

  #termsModal {
    height: 100dvh;
    overflow: hidden;
    padding: 0;
  }

  .terms-modal-card {
    border-radius: 0;
    height: 100dvh;
    max-height: 100dvh;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gif-message-emoji,
  .gif-reaction-card > span,
  .demo-chat-bubble,
  .demo-trust-row,
  .demo-rule,
  .demo-status-ring,
  .demo-status-photo,
  .demo-status-progress span,
  .demo-invite-card,
  .demo-lock {
    animation: none;
  }

  .demo-chat-bubble,
  .demo-trust-row,
  .demo-rule,
  .demo-status-photo,
  .demo-invite-card,
  .demo-lock {
    opacity: 1;
    transform: none;
  }
}
