:root {
  --bg: #0b0b0e;
  --panel: rgba(20, 20, 26, 0.88);
  --panel-strong: rgba(27, 27, 34, 0.96);
  --panel-muted: rgba(255, 255, 255, 0.04);
  --panel-muted-2: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f8f6f2;
  --text-muted: rgba(248, 246, 242, 0.7);
  --text-faint: rgba(248, 246, 242, 0.5);
  --accent: #971b23;
  --accent-2: #bf2a35;
  --success: #2eaa72;
  --warning: #d3a634;
  --danger: #d9535f;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --sidebar-width: 360px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  background:
    radial-gradient(circle at top left, rgba(151, 27, 35, 0.28), transparent 28%),
    radial-gradient(circle at bottom right, rgba(128, 35, 49, 0.18), transparent 22%),
    linear-gradient(180deg, #111114 0%, #09090b 100%);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  overflow: hidden;
}

body {
  min-height: 100dvh;
}

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

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 800;
}

.app-shell {
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
}

.auth-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem;
  overflow: auto;
}

.auth-card {
  width: min(560px, 100%);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(25, 25, 33, 0.96), rgba(13, 13, 18, 0.96));
  border-radius: 32px;
  padding: 2rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.auth-brand img {
  width: 64px;
  height: 64px;
}

.auth-brand h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1.05;
}

.auth-copy {
  margin: 1.2rem 0 1.5rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.auth-form,
.composer {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.5rem;
}

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

.field input,
.field textarea,
.field select,
.composer-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.composer-field textarea:focus {
  border-color: rgba(191, 42, 53, 0.72);
  background: rgba(255, 255, 255, 0.07);
}

.field textarea {
  resize: vertical;
  min-height: 88px;
}

.advanced-settings {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
}

.advanced-settings summary {
  cursor: pointer;
  color: var(--text-muted);
}

.advanced-settings[open] {
  display: grid;
  gap: 0.9rem;
}

.hint,
.form-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-faint);
}

.primary-button,
.ghost-button,
.attach-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 16px;
  padding: 0.95rem 1.1rem;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff8f6;
  font-weight: 800;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
}

.ghost-button.danger {
  color: #ffd3d6;
}

.primary-button:hover,
.ghost-button:hover,
.attach-button:hover {
  transform: translateY(-1px);
}

.client-screen {
  min-height: 100dvh;
  height: 100dvh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  overflow: hidden;
}

.sidebar {
  border-right: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(24, 24, 32, 0.96), rgba(9, 9, 13, 0.96)),
    var(--panel);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-height: 0;
  height: 100dvh;
  overflow: hidden;
}

.sidebar-top {
  display: grid;
  gap: 1rem;
}

.brand-row,
.me-card,
.conversation-meta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-row h2,
.conversation-meta h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.brand-mark-wrap,
.avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(151, 27, 35, 0.28), rgba(191, 42, 53, 0.1));
  border: 1px solid rgba(191, 42, 53, 0.28);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-mark-wrap {
  width: 52px;
  height: 52px;
}

.brand-mark-wrap img {
  width: 28px;
  height: 28px;
}

.avatar {
  width: 44px;
  height: 44px;
  font-weight: 800;
  color: #fff7f4;
}

.avatar-large {
  width: 54px;
  height: 54px;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.me-card {
  padding: 0.9rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--panel-muted);
}

.me-copy {
  display: grid;
  gap: 0.15rem;
}

.me-copy span,
.conversation-meta p,
.chat-item-subtitle,
.message-meta,
.message-attachment-meta {
  color: var(--text-faint);
  font-size: 0.86rem;
}

.search-block,
.chat-list-wrap {
  display: grid;
  gap: 0.75rem;
}

.chat-list-wrap {
  min-height: 0;
  flex: 1;
}

.search-field input {
  padding-right: 2.5rem;
}

.search-results,
.chat-list {
  display: grid;
  gap: 0.55rem;
}

.chat-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.15rem;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.connection-pill,
.subtle-pill,
.unread-badge,
.mode-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
}

.connection-pill,
.subtle-pill {
  border: 1px solid var(--border);
  padding: 0.45rem 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: rgba(255, 255, 255, 0.05);
}

.connection-pill.online {
  color: #d6ffec;
  background: rgba(46, 170, 114, 0.16);
  border-color: rgba(46, 170, 114, 0.4);
}

.connection-pill.connecting {
  color: #ffebb6;
  background: rgba(211, 166, 52, 0.16);
  border-color: rgba(211, 166, 52, 0.4);
}

.sidebar-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.creation-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.chat-item,
.search-result-item {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  padding: 0.8rem 0.85rem;
  display: grid;
  gap: 0.55rem;
}

.chat-item:hover,
.search-result-item:hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.06);
}

.chat-item.active {
  background: linear-gradient(180deg, rgba(151, 27, 35, 0.2), rgba(151, 27, 35, 0.08));
  border-color: rgba(191, 42, 53, 0.35);
}

.chat-item-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-item-main {
  min-width: 0;
  display: grid;
  gap: 0.18rem;
  flex: 1;
}

.chat-item-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.chat-item-title {
  font-weight: 800;
  color: #fff7f4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-item .chat-item-title,
.message-sender {
  color: #fff7f4;
}

.chat-item-preview {
  color: var(--text-muted);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unread-badge {
  min-width: 1.55rem;
  padding: 0.2rem 0.4rem;
  background: var(--accent);
  color: white;
}

.conversation-panel {
  min-width: 0;
  min-height: 0;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.conversation-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 8, 10, 0.45);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 2;
}

.conversation-meta p {
  margin: 0.2rem 0 0;
}

.conversation-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

#call-button {
  min-width: 88px;
}

.conversation-empty,
.conversation-body {
  min-height: 0;
  overflow: hidden;
}

.conversation-empty {
  display: grid;
  place-items: center;
  padding: 2rem;
}

.empty-card {
  width: min(520px, 100%);
  text-align: center;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  padding: 2rem;
}

.empty-card img {
  width: 64px;
  height: 64px;
}

.empty-card h2 {
  margin: 1rem 0 0.5rem;
  font-family: "Space Grotesk", sans-serif;
}

.empty-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.conversation-body {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
}

.message-list {
  min-height: 0;
  overflow-y: auto;
  padding: 1.5rem;
  display: grid;
  gap: 0.9rem;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.message-card {
  max-width: min(740px, 82%);
  border-radius: 22px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  gap: 0.55rem;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.message-card.own {
  justify-self: end;
  background: linear-gradient(180deg, rgba(151, 27, 35, 0.24), rgba(151, 27, 35, 0.1));
  border-color: rgba(191, 42, 53, 0.35);
}

.message-topline,
.message-footer,
.message-actions,
.reaction-row,
.attachment-grid {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.message-topline {
  justify-content: space-between;
}

.message-sender {
  font-weight: 800;
  font-size: 0.92rem;
}

.message-text {
  line-height: 1.55;
  word-break: break-word;
}

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

.message-reply {
  padding: 0.7rem 0.8rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid rgba(191, 42, 53, 0.7);
}

.message-reply strong {
  display: block;
  margin-bottom: 0.18rem;
}

.message-attachment {
  min-width: 190px;
  max-width: 280px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.message-attachment img,
.message-attachment video {
  width: 100%;
  display: block;
  max-height: 240px;
  object-fit: cover;
  background: #07070a;
}

.message-attachment audio {
  width: 100%;
}

.message-attachment-copy {
  display: grid;
  gap: 0.3rem;
  padding: 0.75rem 0.8rem;
}

.attachment-grid {
  align-items: stretch;
}

.reaction-chip,
.message-action-button,
.attachment-chip-remove {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.83rem;
}

.reaction-chip.active {
  background: rgba(191, 42, 53, 0.18);
  border-color: rgba(191, 42, 53, 0.35);
}

.typing-line {
  min-height: 1.6rem;
  padding: 0 1.5rem 0.5rem;
  color: var(--text-faint);
  font-size: 0.9rem;
}

.composer-wrap {
  border-top: 1px solid var(--border);
  padding: 1rem 1.2rem 1.2rem;
  background: rgba(8, 8, 10, 0.52);
  backdrop-filter: blur(12px);
  display: grid;
  gap: 0.75rem;
  position: relative;
  flex-shrink: 0;
}

.composer {
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: end;
}

.composer-field textarea {
  resize: none;
  min-height: 52px;
  max-height: 200px;
}

.attach-button {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 1.3rem;
  font-weight: 800;
}

.attach-button input {
  display: none;
}

.mic-button {
  min-width: 72px;
  height: 52px;
  font-weight: 800;
}

.mic-button.recording {
  background: rgba(217, 83, 95, 0.18);
  border-color: rgba(217, 83, 95, 0.38);
  color: #ffd7db;
}

.send-button {
  min-width: 112px;
}

.attachment-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.attachment-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.55rem;
}

.attachment-chip-preview {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.attachment-chip-preview img,
.attachment-chip-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment-chip-copy {
  display: grid;
  gap: 0.15rem;
}

.attachment-chip-remove {
  padding-inline: 0.6rem;
}

.edit-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.reply-banner,
.voice-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.reply-banner {
  border-left: 3px solid rgba(191, 42, 53, 0.7);
}

.voice-banner {
  align-items: flex-start;
}

.reply-banner p,
.voice-banner p {
  margin: 0.25rem 0 0;
  color: var(--text-faint);
}

.voice-banner-copy {
  min-width: 0;
  flex: 1;
}

.voice-banner audio {
  width: min(280px, 100%);
}

.drop-zone {
  position: absolute;
  inset: 1rem 1.2rem 1.2rem;
  display: grid;
  place-items: center;
  border-radius: 24px;
  border: 2px dashed rgba(191, 42, 53, 0.42);
  background: rgba(13, 13, 18, 0.86);
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  z-index: 3;
  pointer-events: none;
}

.composer-wrap.drag-active {
  box-shadow: inset 0 0 0 1px rgba(191, 42, 53, 0.28);
}

.empty-list {
  border-radius: 18px;
  border: 1px dashed var(--border);
  color: var(--text-faint);
  padding: 1rem;
  text-align: center;
}

.call-overlay {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 18;
  width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}

.call-card {
  pointer-events: auto;
  display: grid;
  gap: 1rem;
  border-radius: 28px;
  border: 1px solid rgba(191, 42, 53, 0.24);
  background:
    radial-gradient(circle at top left, rgba(151, 27, 35, 0.22), transparent 32%),
    linear-gradient(180deg, rgba(26, 26, 34, 0.98), rgba(9, 9, 13, 0.98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  padding: 1.15rem;
  backdrop-filter: blur(18px);
}

.call-status-row,
.call-meta-row,
.call-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.call-status-row {
  justify-content: space-between;
}

.call-duration {
  font-weight: 800;
  color: #fff7f4;
  letter-spacing: 0.04em;
}

.call-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar-call {
  width: 72px;
  height: 72px;
  font-size: 1.15rem;
}

.call-hero-copy {
  min-width: 0;
}

.call-hero-copy h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.45rem;
}

.call-hero-copy p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.call-meta-row .subtle-pill {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.8rem;
}

.call-actions .ghost-button,
.call-actions .primary-button {
  min-width: 112px;
}

.call-debug {
  display: grid;
  gap: 0.28rem;
  padding: 0.75rem 0.9rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-faint);
  font-size: 0.78rem;
  line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

#call-remote-audio,
#call-local-audio {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(2, 2, 5, 0.72);
  backdrop-filter: blur(18px);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-card {
  width: min(1040px, 100%);
  max-height: calc(100dvh - 2rem);
  border-radius: 30px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(25, 25, 33, 0.98), rgba(10, 10, 14, 0.98));
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.modal-header {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-header h2,
.settings-section h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.settings-modal-body {
  min-height: 0;
  overflow-y: auto;
  padding: 1.2rem;
  display: grid;
  gap: 1rem;
}

.settings-section {
  display: grid;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
}

.settings-section-header,
.settings-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.settings-section-header p,
.settings-profile-meta span {
  margin: 0.3rem 0 0;
  color: var(--text-faint);
}

.settings-profile-meta {
  display: grid;
  gap: 0.1rem;
}

.settings-avatar-actions,
.settings-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.settings-avatar-actions label input {
  display: none;
}

.settings-form {
  display: grid;
  gap: 1rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.toggle-list {
  display: grid;
  gap: 0.75rem;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-2);
}

.session-list {
  display: grid;
  gap: 0.8rem;
}

.selected-member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.selected-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: #fff7f4;
}

.invite-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
}

.invite-card input {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 16px;
  padding: 0.9rem 1rem;
}

.session-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.9rem 1rem;
}

.session-copy {
  display: grid;
  gap: 0.25rem;
}

.session-copy strong {
  color: #fff7f4;
}

.session-copy span {
  color: var(--text-faint);
  font-size: 0.88rem;
}

.session-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 1080px) {
  .client-screen {
    grid-template-columns: 320px minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .client-screen {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(240px, 38dvh) minmax(0, 1fr);
  }

  .sidebar {
    position: relative;
    min-height: auto;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .conversation-panel {
    min-height: 0;
    height: auto;
  }

  .message-card {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .auth-screen {
    padding: 1rem;
  }

  .auth-card,
  .empty-card {
    padding: 1.3rem;
    border-radius: 24px;
  }

  .conversation-header,
  .message-list,
  .composer-wrap,
  .typing-line {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .sidebar {
    padding: 1rem;
  }

  .sidebar-actions,
  .creation-actions,
  .composer {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .invite-card {
    grid-template-columns: 1fr;
  }

  .send-button,
  .attach-button,
  .mic-button {
    width: 100%;
  }

  .reply-banner,
  .voice-banner,
  .edit-banner,
  .session-item,
  .settings-section-header,
  .settings-profile-head,
  .call-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .call-overlay {
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  .call-actions .ghost-button,
  .call-actions .primary-button {
    flex: 1 1 calc(50% - 0.35rem);
  }

  .modal-backdrop {
    padding: 0.5rem;
  }

  .modal-card {
    max-height: calc(100dvh - 1rem);
  }
}
