:root {
  color-scheme: light;
  --bg: #f5efe6;
  --panel: rgba(255, 252, 246, 0.86);
  --panel-strong: rgba(255, 251, 245, 0.96);
  --line: rgba(62, 47, 33, 0.12);
  --ink: #23170f;
  --muted: #6f6258;
  --accent: #ef6c3d;
  --accent-strong: #d94d21;
  --accent-soft: rgba(239, 108, 61, 0.14);
  --bubble-in: #fff9f3;
  --bubble-out: linear-gradient(135deg, #ef6c3d, #ff935a);
  --shadow: 0 30px 70px rgba(79, 51, 27, 0.18);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --sidebar-width: 360px;
  --font-ui: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  --auth-background-start: #7c4dff;
  --auth-background-end: #14b8a6;
  --auth-card-start: rgba(255, 250, 244, 0.94);
  --auth-card-end: rgba(255, 244, 235, 0.78);
  --auth-primary-button: #7c4dff;
  --auth-secondary-button: #14b8a6;
  --auth-secondary-text: #23170f;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 30%),
    linear-gradient(140deg, var(--auth-background-start) 0%, #efe6de 42%, var(--auth-background-end) 100%);
  color: var(--ink);
  font-family: var(--font-ui);
}

button,
input,
textarea {
  font: inherit;
}

.backdrop {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: fixed;
}

.glow {
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.7;
  position: absolute;
}

.glow-a {
  background: rgba(255, 159, 110, 0.45);
  height: 340px;
  left: -80px;
  top: 40px;
  width: 340px;
}

.glow-b {
  background: rgba(111, 183, 150, 0.38);
  bottom: 10%;
  height: 320px;
  right: -80px;
  width: 320px;
}

.app-shell {
  display: grid;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  place-items: center;
  padding: 24px;
}

.toast-stack {
  display: grid;
  gap: 10px;
  position: fixed;
  right: 20px;
  top: 20px;
  width: min(360px, calc(100vw - 32px));
  z-index: 20;
}

.toast {
  backdrop-filter: blur(16px);
  background: rgba(35, 23, 15, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(35, 23, 15, 0.22);
  color: #fff;
  display: grid;
  gap: 4px;
  padding: 14px 16px;
}

.toast-title {
  font-size: 0.92rem;
  font-weight: 700;
}

.toast-body {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
  line-height: 1.4;
}

.auth-screen {
  display: grid;
  align-self: stretch;
  min-height: calc(100vh - 48px);
  min-height: calc(100dvh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: auto;
  place-items: center;
  padding: 12px 0;
  position: relative;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  z-index: 2;
}

.auth-card {
  backdrop-filter: blur(18px);
  background:
    linear-gradient(155deg, var(--auth-card-start), var(--auth-card-end)),
    rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 40px;
  box-shadow: var(--shadow);
  max-height: calc(100dvh - 72px);
  max-width: 520px;
  min-height: 360px;
  margin: 0 auto;
  overflow-y: auto;
  pointer-events: auto;
  padding: 48px;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.auth-panel {
  display: none;
  min-height: 264px;
}

.auth-panel.is-active {
  display: grid;
  place-items: center;
}

.auth-choice-list {
  display: grid;
  gap: 16px;
  min-height: 264px;
  place-content: center;
  place-items: center;
  width: 100%;
}

.auth-form {
  display: grid;
  gap: 18px;
  min-height: 264px;
  width: 100%;
}

.auth-grid {
  display: grid;
  gap: 14px;
}

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

.auth-message {
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 600;
  min-height: 1.2em;
}

.auth-field {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 24px;
  display: grid;
  gap: 8px;
  padding: 14px 16px;
}

.auth-field span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.auth-field input {
  background: transparent;
  border: 0;
  color: var(--ink);
  outline: none;
}

.auth-actions,
.sidebar-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.magic-link-row {
  display: flex;
  gap: 10px;
}

.magic-link-button {
  flex: 1 1 0;
}

.auth-button {
  align-items: center;
  appearance: none;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  justify-content: center;
  padding: 14px 18px;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.auth-button:hover {
  transform: translateY(-1px);
}

.auth-button-primary {
  background: var(--auth-primary-button);
  color: #fff;
}

.auth-button-secondary {
  background: var(--auth-secondary-button);
  color: var(--auth-secondary-text);
}

.auth-button-hidden {
  display: none;
}

.auth-button-visible {
  display: inline-flex;
}

.auth-choice-list .auth-button {
  min-width: min(100%, 280px);
}

.auth-button,
.auth-field,
.avatar-swatch,
.avatar-emoji-option {
  pointer-events: auto;
}

.avatar-builder {
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.avatar-builder-top {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 84px 1fr;
}

.avatar-preview,
.session-avatar {
  align-items: center;
  aspect-ratio: 1;
  border-radius: 24px;
  color: #fff;
  display: inline-flex;
  font-size: 2rem;
  font-weight: 700;
  justify-content: center;
  width: 84px;
}

.avatar-emoji-field input {
  font-size: 1.2rem;
  text-transform: none;
}

.avatar-emoji-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.avatar-emoji-option {
  align-items: center;
  appearance: none;
  background: rgba(255, 255, 255, 0.78);
  border: 2px solid transparent;
  border-radius: 18px;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.45rem;
  height: 52px;
  justify-content: center;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
  width: 100%;
}

.avatar-emoji-option:hover {
  transform: translateY(-1px);
}

.avatar-emoji-option.is-active {
  border-color: rgba(35, 23, 15, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.72);
}

.avatar-swatch-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.avatar-swatch {
  appearance: none;
  border: 2px solid transparent;
  border-radius: 18px;
  cursor: pointer;
  height: 44px;
  width: 100%;
}

.avatar-swatch.is-active {
  border-color: rgba(35, 23, 15, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.72);
}

.phone-frame {
  backdrop-filter: blur(18px);
  background: rgba(255, 250, 244, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 40px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  height: min(780px, calc(100vh - 48px));
  isolation: isolate;
  margin: 0 auto;
  max-width: 1320px;
  max-height: calc(100vh - 48px);
  overflow: hidden;
  position: relative;
  width: min(100%, 1320px);
}

.settings-modal {
  align-items: center;
  background: rgba(35, 23, 15, 0.28);
  display: grid;
  inset: 0;
  justify-items: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  position: fixed;
  -webkit-overflow-scrolling: touch;
  z-index: 5;
}

.settings-card {
  backdrop-filter: blur(18px);
  background: rgba(255, 252, 246, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(820px, calc(100vh - 48px));
  max-height: min(820px, calc(100dvh - 48px));
  max-width: 560px;
  overflow: hidden;
  padding: 28px;
  width: 100%;
}

.settings-header,
.settings-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.settings-form {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}

.settings-section {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 24px;
  display: grid;
  gap: 16px;
  padding: 18px;
}

.settings-copy {
  color: var(--muted);
  line-height: 1.5;
  margin-top: 6px;
}

.settings-toggle {
  align-items: center;
  display: flex;
  gap: 10px;
}

.app-shell.is-authenticated .auth-screen {
  display: none;
}

.app-shell:not(.is-authenticated) .phone-frame {
  display: none;
}

.sidebar,
.thread-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  gap: 18px;
  padding: 24px;
  position: relative;
  z-index: 2;
}

.invite-list {
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 4;
}

.invite-card {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 24px;
  display: grid;
  gap: 10px;
  padding: 14px;
  position: relative;
  z-index: 1;
}

.invite-label {
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.invite-copy {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.invite-actions {
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 5;
}

.invite-actions .auth-button {
  flex: 1 1 0;
  padding: 12px 14px;
  position: relative;
  z-index: 1;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 6px;
}

.settings-launch {
  appearance: none;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 20px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 14px 16px;
  width: 100%;
}

.sidebar-header,
.thread-header,
.conversation-topline,
.conversation-bottomline,
.thread-actions,
.message-strip,
.filters,
.session-chip {
  align-items: center;
  display: flex;
}

.sidebar-header,
.thread-header {
  justify-content: space-between;
}

.eyebrow {
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.8rem, 2.4vw, 2.4rem);
}

h2 {
  font-size: 1.15rem;
}

.session-chip {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  gap: 10px;
  margin-top: 12px;
  padding: 0;
  text-align: left;
}

.session-avatar {
  border-radius: 16px;
  font-size: 1rem;
  width: 38px;
}

.session-chip:hover {
  transform: translateY(-1px);
}

.icon-button,
.composer-tool,
.send-button,
.filter-chip,
.conversation-card {
  appearance: none;
  border: 0;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.icon-button,
.composer-tool {
  align-items: center;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  color: var(--ink);
  display: inline-flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.icon-button:hover,
.composer-tool:hover,
.filter-chip:hover,
.conversation-card:hover,
.send-button:hover {
  transform: translateY(-1px);
}

.search-field {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  display: grid;
  gap: 6px;
  padding: 12px 16px;
}

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

.search-field input {
  background: transparent;
  border: 0;
  color: var(--ink);
  outline: none;
}

.filters {
  gap: 10px;
}

.filter-chip {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  padding: 10px 14px;
}

.filter-chip.is-active {
  background: var(--accent-soft);
  border-color: rgba(239, 108, 61, 0.24);
  color: var(--accent-strong);
}

.conversation-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  min-height: 0;
  overflow: auto;
  padding: 0 4px 6px 0;
}

.conversation-card {
  align-items: center;
  background: rgba(255, 255, 255, 0.42);
  border-radius: 22px;
  display: grid;
  gap: 14px;
  grid-template-columns: 56px 1fr;
  padding: 14px;
  text-align: left;
  width: 100%;
}

.conversation-card.is-active {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 34px rgba(125, 87, 49, 0.1);
}

.avatar {
  align-items: center;
  aspect-ratio: 1;
  background: linear-gradient(135deg, rgba(239, 108, 61, 0.88), rgba(239, 187, 118, 0.88));
  border-radius: 18px;
  color: #fff;
  display: inline-flex;
  font-size: 1.15rem;
  font-weight: 700;
  justify-content: center;
  width: 56px;
}

.thread-identity .avatar {
  width: 52px;
}

.conversation-copy {
  min-width: 0;
}

.conversation-topline,
.conversation-bottomline {
  gap: 12px;
  justify-content: space-between;
}

.conversation-time,
.conversation-preview,
#thread-status,
.thread-presence,
.message-meta {
  color: var(--muted);
}

.conversation-preview {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-unread {
  align-items: center;
  background: rgba(124, 77, 255, 0.12);
  border-radius: 999px;
  color: #6b3df0;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 700;
  gap: 6px;
  padding: 6px 10px;
}

.conversation-unread-dot {
  background: #7c4dff;
  border-radius: 999px;
  display: inline-flex;
  height: 10px;
  width: 10px;
}

.thread-panel {
  background: var(--panel-strong);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.thread-scroll-shell {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.thread-header {
  gap: 16px;
  padding-bottom: 18px;
}

.thread-identity {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: auto 1fr;
  min-width: 0;
}

.thread-identity > div:last-child {
  min-width: 0;
}

.thread-presence {
  align-items: center;
  display: flex;
  font-size: 0.84rem;
  font-weight: 700;
  gap: 8px;
  margin-top: 6px;
}

.presence-dot {
  background: #34c759;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.16);
  display: inline-flex;
  flex: 0 0 auto;
  height: 10px;
  width: 10px;
}

.message-strip {
  border-top: 1px solid var(--line);
  gap: 10px;
  padding: 16px 0;
}

.badge {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(230, 214, 199, 0.9);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 12px;
}

.messages {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior: contain;
  padding: 12px 4px 16px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.messages-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: flex-end;
  min-height: 100%;
}

.message {
  display: grid;
  gap: 6px;
  max-width: min(76%, 520px);
}

.message-sender {
  align-items: center;
  display: flex;
  gap: 8px;
  max-width: fit-content;
}

.message-sender-avatar {
  align-items: center;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.95rem;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.message-sender-name {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-text {
  border-radius: 22px;
  justify-self: start;
  line-height: 1.45;
  max-width: 100%;
  padding: 14px 16px;
  white-space: pre-wrap;
  width: fit-content;
  word-break: break-word;
}

.message-meta {
  font-size: 0.8rem;
}

.message.incoming {
  align-self: flex-start;
}

.message.incoming .message-text {
  background: var(--bubble-in);
  border: 1px solid rgba(209, 196, 182, 0.6);
}

.message.outgoing {
  align-self: flex-end;
  justify-items: end;
}

.message.outgoing .message-sender {
  justify-content: flex-end;
}

.message.outgoing .message-text,
.message.outgoing .message-meta {
  justify-self: end;
}

.message.outgoing .message-text {
  background: var(--bubble-out);
  color: #fff;
}

.composer {
  align-items: center;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  display: grid;
  flex-shrink: 0;
  gap: 12px;
  grid-template-columns: auto 1fr auto;
  padding: 14px;
  position: relative;
  z-index: 3;
}

.emoji-picker {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  box-shadow: 0 18px 36px rgba(79, 51, 27, 0.14);
  display: grid;
  gap: 10px;
  margin-top: 10px;
  max-height: min(360px, 42vh);
  min-height: 0;
  overflow: hidden;
  padding: 12px;
  position: relative;
  z-index: 3;
}

.emoji-search-field {
  background: rgba(255, 249, 243, 0.96);
  border: 1px solid rgba(230, 214, 199, 0.9);
  border-radius: 16px;
  display: block;
  padding: 10px 12px;
}

.emoji-search-field input {
  background: transparent;
  border: 0;
  color: var(--ink);
  outline: none;
  width: 100%;
}

.emoji-group-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.emoji-group-chip {
  appearance: none;
  background: rgba(255, 249, 243, 0.96);
  border: 1px solid rgba(230, 214, 199, 0.9);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 8px 12px;
}

.emoji-group-chip.is-active {
  background: rgba(124, 77, 255, 0.12);
  border-color: rgba(124, 77, 255, 0.24);
  color: #6b3df0;
}

.emoji-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  max-height: min(240px, 30vh);
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.emoji-option {
  appearance: none;
  background: rgba(255, 249, 243, 0.96);
  border: 1px solid rgba(230, 214, 199, 0.9);
  border-radius: 16px;
  cursor: pointer;
  font-size: 1.35rem;
  padding: 10px 0;
}

.emoji-option:hover {
  transform: translateY(-1px);
}

.composer-input-wrap {
  min-width: 0;
}

.composer textarea {
  background: transparent;
  border: 0;
  color: var(--ink);
  display: block;
  height: 24px;
  outline: none;
  overflow-y: auto;
  resize: none;
  width: 100%;
}

.send-button {
  background: var(--accent);
  border-radius: 18px;
  color: #fff;
  font-weight: 700;
  padding: 12px 18px;
}

.send-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.mobile-only {
  display: none;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (max-width: 1024px) {
  .phone-frame {
    grid-template-columns: 320px 1fr;
    height: min(720px, calc(100vh - 48px));
    max-height: calc(100vh - 48px);
  }
}

@media (max-width: 820px) {
  .app-shell {
    padding: 12px;
  }

  .auth-screen {
    min-height: calc(100vh - 24px);
    min-height: calc(100dvh - 24px);
    padding: 0;
    place-items: stretch center;
  }

  .auth-card {
    border-radius: 30px;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    min-height: 0;
    padding: 24px 18px;
  }

  .auth-panel.is-active {
    place-items: stretch;
  }

  .auth-panel,
  .auth-choice-list,
  .auth-form {
    min-height: 0;
  }

  .auth-grid-double {
    grid-template-columns: 1fr;
  }

  .auth-actions {
    display: grid;
  }

  .avatar-builder-top {
    grid-template-columns: 1fr;
  }

  .avatar-preview {
    margin: 0 auto;
  }

  .magic-link-row {
    flex-direction: column;
  }

  .phone-frame {
    grid-template-columns: 1fr;
    height: calc(100vh - 24px);
    height: calc(100dvh - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    position: relative;
  }

  .sidebar {
    inset: 0 auto 0 0;
    max-width: min(88vw, 360px);
    position: absolute;
    transform: translateX(-105%);
    transition: transform 220ms ease;
    width: 100%;
    z-index: 3;
  }

  .phone-frame.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .thread-panel {
    padding: 18px;
  }

  .emoji-picker {
    max-height: min(380px, 46vh);
  }

  .mobile-only {
    display: inline-flex;
  }

  .message {
    max-width: 88%;
  }

  .settings-modal {
    align-items: start;
    padding: 12px;
  }

  .settings-card {
    border-radius: 28px;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 22px 18px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .conversation-card,
  .message,
  .composer,
  .sidebar,
  .thread-panel {
    animation: fade-up 360ms ease;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
