:root {
  --aift: #1671e8;
  --aift-deep: #0b57c5;
  --aift-soft: #eef5ff;
  --aift-line: #cfe0f7;
  --ink: #101828;
  --text: #344054;
  --muted: #667085;
  --subtle: #98a2b3;
  --line: #e5eaf0;
  --line-strong: #d6dde7;
  --panel: #ffffff;
  --page: #f5f7fa;
  --chat: #f6f9fc;
  --mine: #dcecff;
  --mine-border: #c7dcf7;
  --other: #ffffff;
  --green: #12b76a;
  --danger: #d92d20;
  --warning: #f79009;
  --shadow-sm: 0 2px 8px rgba(16, 24, 40, 0.06);
  --shadow: 0 14px 38px rgba(16, 24, 40, 0.12);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}
body {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--page);
  color: var(--ink);
  font-size: 13px;
  overflow: hidden;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
video {
  display: block;
  max-width: 100%;
}
svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hidden {
  display: none !important;
}
.messages-app {
  height: 100dvh;
  display: grid;
  grid-template-columns: 382px minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
}
.sidebar {
  height: 100dvh;
  min-width: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar-header {
  padding: 20px 18px 13px;
  background: #fff;
  position: relative;
  z-index: 20;
}
.sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
.sidebar-eyebrow {
  display: none;
}
.sidebar-title-row h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.sidebar-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-btn,
.composer-icon {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #475467;
  display: grid;
  place-items: center;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}
.icon-btn:hover,
.composer-icon:hover {
  background: #f2f4f7;
  color: var(--aift);
}
.icon-btn:active,
.composer-icon:active {
  transform: scale(0.96);
}
.icon-btn.primary-soft {
  background: var(--aift);
  color: #fff;
  box-shadow: 0 5px 14px rgba(22, 113, 232, 0.22);
}
.icon-btn.primary-soft:hover {
  background: var(--aift-deep);
}
.search-box {
  height: 42px;
  border: 1px solid #e3e8ef;
  border-radius: 11px;
  background: #f7f8fa;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  transition: 0.16s ease;
}
.search-box svg {
  width: 17px;
  height: 17px;
  color: #7d8998;
  flex: none;
}
.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #101828;
  font-size: 12px;
}
.search-box input::placeholder {
  color: #98a2b3;
}
.search-box:focus-within {
  background: #fff;
  border-color: #a9c9f2;
  box-shadow: 0 0 0 3px rgba(22, 113, 232, 0.07);
}
.search-box.compact {
  margin-top: 10px;
}
.new-chat-panel {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 73px;
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 70;
}
.new-chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.new-chat-head strong {
  font-size: 12px;
}
.new-chat-head button {
  border: 0;
  background: transparent;
  color: var(--aift);
  font-size: 10px;
  font-weight: 800;
}
.user-search-results {
  margin-top: 8px;
  max-height: 330px;
  overflow: auto;
}
.stories-section {
  padding: 4px 0 12px;
  border-bottom: 1px solid #eef1f4;
  background: #fff;
}
.stories-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 9px;
}
.stories-head strong {
  font-size: 11px;
  font-weight: 800;
  color: #344054;
}
.stories-head button {
  border: 0;
  background: transparent;
  color: var(--aift);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 0;
}
.stories-strip {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  overflow-x: auto;
  padding: 0 15px 1px;
  scrollbar-width: none;
}
.stories-strip::-webkit-scrollbar {
  display: none;
}
.conversation-stories {
  display: flex;
  gap: 11px;
}
.story-card {
  width: 57px;
  flex: 0 0 57px;
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #475467;
  font-size: 9px;
  overflow: hidden;
}
.story-card > span:last-child {
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.story-avatar {
  width: 51px;
  height: 51px;
  padding: 2px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1671e8 0%, #7457e8 56%, #12b76a 100%);
  display: grid;
  place-items: center;
  transition:
    transform 0.15s ease,
    filter 0.15s ease;
  box-shadow: 0 1px 5px rgba(22, 113, 232, 0.12);
}
.story-card:hover .story-avatar {
  transform: scale(1.04);
  filter: saturate(1.08);
}
.story-avatar img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  background: #f2f4f7;
}
.story-card.add-story .story-avatar {
  background: #f2f4f7;
  border: 1px solid #dce3eb;
  padding: 0;
  box-shadow: none;
}
.story-card.seen .story-avatar {
  background: #d7dee8;
}
.story-card.unseen .story-avatar {
  box-shadow: 0 0 0 2px rgba(22, 113, 232, 0.08);
}
.story-card.own-story .story-avatar {
  background: linear-gradient(145deg, #1671e8, #12b76a);
}
.story-plus {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--aift);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  border: 2px solid #fff;
}
.story-loading {
  min-width: 90px;
  padding: 16px 4px;
  color: #98a2b3;
  font-size: 9px;
}
.conversation-tabs {
  display: flex;
  gap: 6px;
  padding: 11px 13px 9px;
  background: #fff;
  overflow-x: auto;
  scrollbar-width: none;
}
.conversation-tabs::-webkit-scrollbar {
  display: none;
}
.conversation-tabs button {
  border: 1px solid #e2e7ee;
  background: #fff;
  color: #475467;
  min-height: 31px;
  padding: 0 13px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
  transition: 0.15s ease;
}
.conversation-tabs button:hover {
  border-color: #c9d5e3;
  background: #f8fafc;
}
.conversation-tabs button.active {
  border-color: var(--aift);
  background: var(--aift);
  color: #fff;
  box-shadow: 0 3px 9px rgba(22, 113, 232, 0.15);
}
.conversation-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 8px 12px;
  background: #fff;
}
.conversation-list::-webkit-scrollbar {
  width: 4px;
}
.conversation-list::-webkit-scrollbar-thumb {
  background: #d8dee8;
  border-radius: 20px;
}
.loading-card,
.empty-list {
  padding: 28px 16px;
  color: #667085;
  text-align: center;
  font-size: 11px;
}
.conversation-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 70px;
  padding: 9px 10px;
  border-radius: 11px;
  cursor: pointer;
  transition:
    background 0.14s ease,
    transform 0.14s ease;
}
.conversation-item:hover {
  background: #f7f9fb;
}
.conversation-item.active {
  background: #edf5ff;
}
.conversation-item.active:before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 4px;
  background: var(--aift);
}
.conversation-item.active .conversation-name {
  color: #0b4fb8;
}
.conversation-item.active .conversation-preview {
  color: #506c8e;
}
.conversation-avatar-wrap {
  position: relative;
  flex: none;
}
.conversation-avatar {
  width: 49px;
  height: 49px;
  border-radius: 50%;
  object-fit: cover;
  background: #eef1f5;
  border: 1px solid #e7ebf0;
}
.online-dot {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(18, 183, 106, 0.08);
}
.conversation-main {
  flex: 1;
  min-width: 0;
}
.conversation-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.conversation-name {
  min-width: 0;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conversation-time {
  font-size: 9px;
  color: #98a2b3;
  flex: none;
}
.conversation-preview {
  margin-top: 4px;
  color: #667085;
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.draft-label {
  color: #d92d20;
  font-weight: 800;
}
.conversation-meta-row {
  min-height: 16px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.mini-pill {
  padding: 2px 5px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #667085;
  font-size: 8px;
  font-weight: 700;
}
.mini-pill.blue {
  background: #e8f2ff;
  color: var(--aift);
}
.unread-count {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--aift);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 8px;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(22, 113, 232, 0.18);
}
.conversation-item:has(.unread-count) .conversation-name {
  font-weight: 900;
}
.conversation-item:has(.unread-count) .conversation-preview {
  color: #344054;
  font-weight: 600;
}
.chat-panel {
  position: relative;
  height: 100dvh;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--chat);
}
.chat-header {
  height: 68px;
  min-height: 68px;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 15;
}
.chat-user {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}
.mobile-back {
  display: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #475467;
  place-items: center;
}
.active-avatar-wrap {
  position: relative;
  flex: none;
}
.chat-avatar {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e6ebf0;
  background: #eef1f5;
}
.active-online-dot {
  position: absolute;
  right: -1px;
  bottom: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid #fff;
}
.chat-title {
  min-width: 0;
}
.chat-title h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-title p {
  margin: 3px 0 0;
  color: #667085;
  font-size: 9.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}
.chat-header-actions .icon-btn {
  width: 38px;
  height: 38px;
}
.chat-header-actions svg {
  width: 18px;
  height: 18px;
}
.empty-state {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(
      circle at 18% 16%,
      rgba(22, 113, 232, 0.055),
      transparent 25%
    ),
    radial-gradient(
      circle at 82% 78%,
      rgba(18, 183, 106, 0.035),
      transparent 20%
    ),
    linear-gradient(180deg, #fbfdff, #f6f9fd);
}
.empty-card {
  width: min(430px, 100%);
  text-align: center;
}
.empty-icon {
  width: 66px;
  height: 66px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #e9f3ff;
  color: var(--aift);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px #d8e8fb;
}
.empty-icon svg {
  width: 29px;
  height: 29px;
}
.empty-card h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.03em;
}
.empty-card p {
  max-width: 360px;
  margin: 9px auto 17px;
  color: #667085;
  font-size: 11px;
  line-height: 1.65;
}
.empty-card button,
.meeting-coming-btn {
  height: 39px;
  padding: 0 17px;
  border: 0;
  border-radius: 9px;
  background: var(--aift);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 5px 14px rgba(22, 113, 232, 0.18);
}
.messages-box {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 17px clamp(24px, 5vw, 76px) 20px;
  background-color: #efeae2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27180%27 height=%27180%27 viewBox=%270 0 180 180%27%3E%3Cg fill=%27none%27 stroke=%27%237d8b85%27 stroke-opacity=%27.10%27 stroke-width=%271.4%27%3E%3Ccircle cx=%2726%27 cy=%2728%27 r=%2710%27/%3E%3Cpath d=%27M20 28h12M26 22v12M72 18l9 9-9 9-9-9zM120 20h24v16h-24zM132 36v9M18 84c12-10 23-10 35 0-12 10-23 10-35 0zM78 70h18l6 12-15 10-15-10zM130 72c12 0 20 7 20 16s-8 16-20 16M36 128l13-11 13 11-13 11zM91 120c0-7 6-13 13-13s13 6 13 13-6 13-13 13M138 134h23M149 123v23M18 161h25l6-8 7 8h19%27/%3E%3C/g%3E%3C/svg%3E");
  background-size: 180px 180px;
  background-position: center;
  scroll-behavior: auto;
}
.messages-box::-webkit-scrollbar {
  width: 5px;
}
.messages-box::-webkit-scrollbar-thumb {
  background: #d8e0e9;
  border-radius: 10px;
}
.day-divider {
  align-self: center;
  margin: 7px 0 11px;
  padding: 5px 11px;
  border: 1px solid #e4e9ef;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #667085;
  font-size: 9px;
  font-weight: 800;
  box-shadow: 0 2px 7px rgba(16, 24, 40, 0.04);
}
.system-message {
  align-self: center;
  margin: 6px 0;
  max-width: 500px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #eef2f6;
  color: #667085;
  font-size: 9px;
  text-align: center;
}
.message-row {
  width: 100%;
  display: flex;
  margin: 1px 0;
}
.message-row.me {
  justify-content: flex-end;
}
.message-row.other {
  justify-content: flex-start;
}
.message-row.me + .message-row.me,
.message-row.other + .message-row.other {
  margin-top: -1px;
}
.message-row.me + .message-row.me .message-bubble.me {
  border-top-right-radius: 5px;
}
.message-row.other + .message-row.other .message-bubble.other {
  border-top-left-radius: 5px;
}
.message-row.me:has(+ .message-row.me) .message-bubble.me {
  border-bottom-right-radius: 5px;
}
.message-row.other:has(+ .message-row.other) .message-bubble.other {
  border-bottom-left-radius: 5px;
}
.message-row:has(+ .day-divider) {
  margin-bottom: 8px;
}
.message-bubble {
  max-width: min(590px, 68%);
  min-width: 68px;
  position: relative;
  padding: 8px 10px 5px;
  border-radius: 11px;
  color: #172033;
  font-size: 12px;
  line-height: 1.44;
  word-break: break-word;
  overflow-wrap: anywhere;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.07);
  transition:
    box-shadow 0.12s ease,
    transform 0.12s ease;
}
.message-bubble:hover {
  box-shadow: 0 3px 10px rgba(16, 24, 40, 0.08);
}
.message-bubble.me {
  background: var(--mine);
  border: 1px solid var(--mine-border);
  border-bottom-right-radius: 3px;
}
.message-bubble.other {
  background: #fff;
  border: 1px solid #e7edf3;
  border-bottom-left-radius: 3px;
}
.message-bubble.selected {
  outline: 0;
  box-shadow: none;
}
.message-row.selected {
  position: relative;
  background: rgba(22, 113, 232, 0.14);
}
.message-text {
  white-space: pre-wrap;
}
.message-deleted {
  color: #7e8895;
  font-style: italic;
}
.reply-preview {
  display: block;
  width: calc(100% + 2px);
  margin: -1px -1px 6px;
  padding: 6px 8px;
  border: 0;
  border-left: 3px solid var(--aift);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.64);
  font-size: 9.5px;
  color: #475467;
  text-align: left;
  cursor: pointer;
}
.reply-preview:active {
  background: rgba(22, 113, 232, 0.12);
}
.reply-preview strong {
  display: block;
  margin-bottom: 2px;
  color: var(--aift);
}
.reply-preview span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.message-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 3px;
  color: #8b95a5;
  font-size: 8px;
  line-height: 1.2;
}
.status-read {
  color: #1683ea;
  font-weight: 700;
}
.status-failed {
  color: var(--danger);
  font-weight: 800;
}
.message-file-image {
  width: min(330px, 72vw);
  max-height: 350px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 4px;
  background: #eef2f6;
}
.message-video-card {
  position: relative;
  width: min(300px, 72vw);
  aspect-ratio: 16 / 9;
  max-height: min(500px, 58vh);
  overflow: hidden;
  border: 1px solid rgba(16, 24, 40, 0.1);
  border-radius: 13px;
  background: #0b1018;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.11);
  cursor: pointer;
}
.message-file-video {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  background: #0b1018;
  pointer-events: none;
}
.message-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(9, 15, 24, .68);
  color: #fff;
  box-shadow: 0 3px 16px rgba(0,0,0,.28);
  backdrop-filter: blur(7px);
}
.message-video-play svg {
  width: 28px;
  height: 28px;
  margin-left: 3px;
  fill: currentColor;
  stroke: none;
}
.message-video-duration {
  position: absolute;
  left: 9px;
  bottom: 8px;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(9, 15, 24, .7);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  backdrop-filter: blur(6px);
}
.message-file-audio {
  width: min(320px, 74vw);
  height: 40px;
}
.file-card {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 230px;
  padding: 10px;
  border: 1px solid rgba(16, 24, 40, 0.07);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
}
.file-card svg {
  color: var(--aift);
  flex: none;
}
.file-card strong {
  display: block;
  max-width: 250px;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-card span {
  display: block;
  margin-top: 2px;
  color: #7f8998;
  font-size: 8px;
}
.asset-save-btn {
  position: absolute;
  right: 7px;
  top: 7px;
  width: 29px;
  height: 29px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(16, 24, 40, 0.68);
  color: #fff;
  backdrop-filter: blur(5px);
}
.meeting-invite-card {
  min-width: 250px;
  padding: 4px;
}
.meeting-invite-header {
  display: flex;
  align-items: center;
  gap: 9px;
}
.meeting-invite-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}
.meeting-invite-host {
  margin-top: 2px;
  color: #667085;
  font-size: 9px;
}
.meeting-code-box {
  margin: 9px 0;
  padding: 7px 8px;
  border-radius: 7px;
  background: #f2f6fa;
  font-size: 9px;
}
.meeting-join-btn {
  width: 100%;
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: var(--aift);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}
.jump-bottom {
  position: absolute;
  right: 28px;
  bottom: 84px;
  z-index: 35;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #dce4ed;
  border-radius: 50%;
  background: #fff;
  color: #344054;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.12);
  display: grid;
  place-items: center;
  align-items: center;
}
.jump-bottom svg {
  width: 19px;
  height: 19px;
  color: #344054;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.jump-bottom-count {
  position: absolute;
  right: -5px;
  top: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.28);
}
.jump-bottom:hover {
  border-color: #c7d7e9;
  background: #fbfdff;
}
.reply-bar,
.attachment-preview {
  margin: 0 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
}
.reply-bar {
  padding: 8px 11px;
  border-left: 3px solid var(--aift);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.reply-bar strong {
  font-size: 9px;
  color: var(--aift);
}
.reply-bar p {
  margin: 2px 0 0;
  max-width: 650px;
  color: #667085;
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reply-bar button {
  border: 0;
  background: transparent;
  color: #667085;
  font-size: 18px;
  line-height: 1;
}
.attachment-preview {
  padding: 8px;
}
.preview-card {
  display: flex;
  align-items: center;
  gap: 9px;
}
.preview-card img,
.preview-card video {
  width: 44px;
  height: 44px;
  border-radius: 7px;
  object-fit: cover;
}
.preview-info {
  flex: 1;
  min-width: 0;
}
.preview-info strong {
  display: block;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-info span {
  display: block;
  margin-top: 2px;
  color: #667085;
  font-size: 8px;
}
.preview-card > button {
  border: 0;
  background: #f2f4f7;
  color: #475467;
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 8px;
  font-weight: 800;
}
.preview-file-icon {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  background: #eef5ff;
  color: var(--aift);
  display: grid;
  place-items: center;
}
.composer {
  min-height: 66px;
  padding: 10px 16px;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  gap: 6px;
  z-index: 20;
  box-shadow: 0 -8px 28px rgba(16, 24, 40, 0.025);
}
.composer-input-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  background: #f5f7fa;
  border: 1px solid #e1e6ed;
  border-radius: 23px;
  padding: 2px 13px;
  transition: 0.15s ease;
}
.composer-input-wrap:focus-within {
  background: #fff;
  border-color: #b8d2f2;
  box-shadow: 0 0 0 3px rgba(22, 113, 232, 0.06);
}
.composer textarea {
  width: 100%;
  min-height: 38px;
  max-height: 120px;
  padding: 10px 0 8px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #101828;
  font-size: 11.5px;
  line-height: 1.4;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.composer textarea::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.composer textarea::placeholder {
  color: #98a2b3;
}
.send-btn {
  width: 41px;
  height: 41px;
  flex: none;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--aift);
  color: #fff;
  box-shadow: 0 5px 14px rgba(22, 113, 232, 0.24);
  transition:
    transform 0.12s ease,
    background 0.12s ease;
}
.send-btn:hover {
  background: var(--aift-deep);
  transform: scale(1.03);
}
.send-btn:active {
  transform: scale(0.97);
}
.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.attachment-wrap {
  position: relative;
}
.attachment-menu {
  position: absolute;
  left: -45px;
  bottom: 51px;
  width: 250px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow);
  z-index: 80;
}
.attachment-menu button {
  width: 100%;
  min-height: 52px;
  padding: 6px 8px;
  border: 0;
  border-radius: 9px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: #344054;
}
.attachment-menu button:hover {
  background: #f7f9fb;
}
.attach-icon {
  width: 35px;
  height: 35px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 15px;
}
.attach-icon.document {
  background: #edf4ff;
  color: #266acb;
}
.attach-icon.media {
  background: #f0f9ff;
  color: #1570ef;
}
.attach-icon.camera {
  background: #ecfdf3;
  color: #039855;
}
.attach-icon.profile {
  background: #f4f3ff;
  color: #6941c6;
}
.attach-icon.career {
  background: #fff6ed;
  color: #c4320a;
}
.attachment-menu strong {
  display: block;
  font-size: 10px;
}
.attachment-menu small {
  display: block;
  margin-top: 2px;
  color: #98a2b3;
  font-size: 8px;
}
.typing-indicator {
  align-self: flex-start;
  margin: 3px 0 5px clamp(24px, 5vw, 76px);
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e6ebf1;
  color: #667085;
  font-size: 9px;
  box-shadow: var(--shadow-sm);
}
.chat-picker {
  position: absolute;
  left: 20px;
  bottom: 74px;
  width: 370px;
  max-width: calc(100% - 40px);
  height: 390px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 90;
  flex-direction: column;
}
.chat-picker:not(.hidden) {
  display: flex;
}
.picker-toolbar {
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid #e2e7ed;
  background: #fff;
}
.picker-tabs {
  width: min(260px, calc(100% - 50px));
  height: 38px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid #d8dee6;
  border-radius: 20px;
  overflow: hidden;
}
.picker-tabs button {
  height: 100%;
  border: 0;
  border-right: 1px solid #d8dee6;
  background: #fff;
  color: #667085;
  display: grid;
  place-items: center;
}
.picker-tabs button:last-child {
  border-right: 0;
}
.picker-tabs button svg {
  width: 22px;
  height: 22px;
}
.picker-tabs button strong {
  font-size: 10px;
  letter-spacing: 0.04em;
}
.picker-tabs button.active {
  color: var(--aift);
  background: #eef5ff;
}
.picker-backspace {
  width: 38px;
  height: 38px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #475467;
  display: grid;
  place-items: center;
}
.picker-backspace:hover {
  background: #eef2f6;
}
.picker-panel {
  padding: 0;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  background: #f8fafc;
}
.picker-search {
  height: 40px;
  border: 1px solid #d8dee6;
  border-radius: 20px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  margin: 12px;
}
.picker-search svg {
  width: 17px;
  height: 17px;
  color: #667085;
}
.picker-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
}
.emoji-scroll {
  height: calc(100% - 52px);
  padding: 12px 14px 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.emoji-scroll h3 {
  margin: 0 0 10px;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 5px;
}
.emoji-btn {
  min-width: 0;
  height: 42px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 25px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.emoji-btn:hover,
.emoji-btn:focus-visible {
  background: #e9eef4;
}
.emoji-categories {
  height: 52px;
  padding: 4px 7px max(4px, env(safe-area-inset-bottom));
  border-top: 1px solid #e1e6ec;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow-x: auto;
  scrollbar-width: none;
}
.emoji-categories::-webkit-scrollbar {
  display: none;
}
.emoji-categories button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #7b8794;
  font-size: 17px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.emoji-categories button.active {
  background: #e7edf3;
  color: #263442;
}
.emoji-categories button span {
  line-height: 1;
}
.asset-grid {
  padding: 0 12px 14px;
  max-height: 286px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.asset-card {
  border-radius: 8px;
  overflow: hidden;
  background: #e9edf2;
  cursor: pointer;
}
.asset-card img {
  width: 100%;
  height: 96px;
  object-fit: cover;
}
.asset-label {
  display: block;
  padding: 4px;
  font-size: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asset-empty {
  grid-column: 1/-1;
  padding: 30px 8px;
  color: #667085;
  text-align: center;
  font-size: 10px;
}
.sticker-actions-row {
  display: flex;
  gap: 8px;
  padding: 12px;
}
.sticker-actions-row button {
  flex: 1;
  height: 38px;
  border: 1px solid #d8dee6;
  background: #fff;
  color: #344054;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 800;
}
.drawer {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(16, 24, 40, 0.18);
  display: flex;
  justify-content: flex-end;
  backdrop-filter: blur(2px);
}
.drawer-panel {
  width: min(350px, 92vw);
  height: 100%;
  background: #fff;
  box-shadow: -14px 0 38px rgba(16, 24, 40, 0.12);
  overflow: auto;
}
.drawer-head {
  height: 64px;
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-head h2 {
  margin: 0;
  font-size: 13px;
}
.drawer-profile {
  padding: 27px 18px 19px;
  text-align: center;
}
.drawer-profile > img {
  width: 80px;
  height: 80px;
  margin: 0 auto 10px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e7ebf0;
}
.drawer-profile h3 {
  margin: 0;
  font-size: 15px;
}
.drawer-profile p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 9px;
}
.drawer-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 18px;
}
.drawer-quick-actions button {
  border: 0;
  background: transparent;
  color: #475467;
  font-size: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.drawer-quick-actions button > span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f3f6f9;
  display: grid;
  place-items: center;
  color: var(--aift);
  transition: 0.15s ease;
}
.drawer-quick-actions button:hover > span {
  background: #eaf3ff;
}
.drawer-quick-actions svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.drawer-section-title {
  padding: 10px 15px 7px;
  border-top: 1px solid var(--line);
  color: #98a2b3;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.drawer-actions {
  padding: 0 11px 20px;
}
.drawer-actions button {
  width: 100%;
  min-height: 45px;
  padding: 0 9px;
  border: 0;
  border-bottom: 1px solid #f1f3f5;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #344054;
  text-align: left;
  font-size: 10px;
}
.drawer-actions button:hover {
  background: #f8fafc;
}
.drawer-actions svg {
  width: 17px;
  height: 17px;
  color: #667085;
}
.drawer-actions .danger-text,
.drawer-actions .danger-text svg {
  color: var(--danger);
}
.message-action-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 68px;
  z-index: 140;
  padding: 0 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08);
}
.message-action-bar > button,
.selection-actions > button {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #344054;
  display: grid;
  place-items: center;
}
.message-action-bar button:hover {
  background: #f0f2f5;
}
.message-action-bar > strong {
  font-size: 18px;
  min-width: 28px;
}
.selection-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.selection-actions svg,
.selection-back svg {
  width: 22px;
  height: 22px;
}
.selection-more-menu {
  position: absolute;
  right: 12px;
  top: 58px;
  width: 150px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.selection-more-menu button {
  width: 100%;
  height: 40px;
  border: 0;
  background: #fff;
  text-align: left;
  padding: 0 12px;
  color: #344054;
  font-size: 11px;
}
.selection-more-menu button:hover {
  background: #f3f5f8;
}
.chat-more-menu {
  position: fixed;
  right: 12px;
  top: 60px;
  z-index: 145;
  width: min(280px, calc(100vw - 24px));
  padding: 7px;
  background: #fff;
  border: 1px solid #e1e6ec;
  border-radius: 11px;
  box-shadow: 0 14px 36px rgba(16, 24, 40, 0.2);
}
.chat-more-menu button {
  width: 100%;
  height: 43px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: #fff;
  color: #202b3a;
  text-align: left;
  font-size: 12px;
}
.chat-more-menu button:hover {
  background: #f2f4f7;
}
.chat-more-menu .danger-text {
  color: var(--danger);
}
.message-delete-card {
  width: min(360px, calc(100vw - 32px));
  padding: 12px 0;
  background: #fff;
}
.message-delete-title {
  padding: 12px 20px 18px;
  color: #667085;
  font-size: 13px;
}
.message-delete-card button {
  width: 100%;
  height: 48px;
  padding: 0 20px;
  border: 0;
  background: #fff;
  color: var(--aift);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}
.message-delete-card button:hover {
  background: #f7f9fb;
}
.message-info-content {
  padding: 8px 16px 18px;
}
.message-info-preview {
  margin: 8px 0 14px;
  padding: 12px;
  border-radius: 10px;
  background: #eef5ff;
  color: #344054;
}
.message-info-preview p {
  margin: 0;
  white-space: pre-wrap;
}
.message-info-row {
  min-height: 48px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.message-info-row span {
  color: #667085;
}
.message-info-row strong {
  font-size: 11px;
  text-align: right;
}
.forward-conversation-list {
  max-height: 60vh;
  overflow: auto;
  padding: 6px 10px 14px;
}
.forward-conversation-list > button {
  width: 100%;
  min-height: 58px;
  padding: 7px;
  border: 0;
  border-radius: 9px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}
.forward-conversation-list > button:hover {
  background: #f3f6f9;
}
.forward-conversation-list img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}
.forward-conversation-list span {
  display: grid;
  gap: 3px;
}
.forward-conversation-list small {
  color: #667085;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(16, 24, 40, 0.42);
  display: grid;
  place-items: center;
  padding: 18px;
  backdrop-filter: blur(2px);
}
.modal-card,
.camera-card,
.meeting-coming-card {
  width: min(430px, 100%);
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.24);
  overflow: hidden;
}
.modal-head {
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-head h3 {
  margin: 0;
  font-size: 13px;
}
.modal-close {
  border: 0;
  background: transparent;
  color: #667085;
  font-size: 20px;
}
.modal-text {
  margin: 0;
  padding: 17px;
  color: #475467;
  font-size: 10px;
  line-height: 1.55;
}
.modal-actions {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}
.btn {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #d8dee7;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-size: 9px;
  font-weight: 800;
}
.btn.danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}
.camera-card video {
  width: 100%;
  max-height: 65vh;
  background: #101828;
}
.camera-modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  background: #000;
  color: #fff;
}
.camera-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}
.camera-stage video {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  background: #101216;
}
.camera-top {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 2;
}
.camera-top button,
.camera-controls > button {
  border: 0;
  color: #fff;
  display: grid;
  place-items: center;
}
.camera-top button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(31, 36, 42, 0.72);
  backdrop-filter: blur(10px);
}
.camera-top svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}
.camera-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(24px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 46px 46px 78px 46px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 2;
}
.camera-controls > button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(31, 36, 42, 0.76);
  backdrop-filter: blur(10px);
}
.camera-controls svg {
  width: 23px;
  height: 23px;
  stroke-width: 2;
}
.camera-shutter {
  width: 78px !important;
  height: 78px !important;
  background: transparent !important;
  border: 5px solid #fff !important;
}
.camera-shutter span {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff;
  display: block;
  transition: transform 0.12s ease;
}
.camera-shutter:active span {
  transform: scale(0.9);
}
.camera-enhance.active {
  background: #fff !important;
  color: #111827 !important;
}


.camera-top {
  padding-inline: 16px;
}
.camera-top button,
.camera-controls > button {
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.22);
}
.camera-top button {
  width: 40px;
  height: 40px;
  background: rgba(13, 25, 43, 0.68);
}
.camera-top svg {
  width: 19px;
  height: 19px;
}
.camera-controls {
  grid-template-columns: 40px 62px 40px;
  gap: clamp(20px, 5vw, 26px);
  bottom: max(92px, calc(env(safe-area-inset-bottom) + 70px));
}
.camera-controls > button {
  width: 40px;
  height: 40px;
  background: rgba(13, 25, 43, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.camera-controls svg {
  width: 20px;
  height: 20px;
}
.camera-gallery,
.camera-enhance,
.camera-switch {
  color: #f7fbff !important;
}
.camera-gallery svg,
.camera-switch svg {
  stroke: #d9eaff;
}
.camera-enhance svg {
  stroke: #9bc5ff;
}
.camera-shutter {
  --camera-record-progress: 0deg;
  position: relative;
  width: 62px !important;
  height: 62px !important;
  padding: 5px;
  border: 3px solid rgba(255, 255, 255, 0.92) !important;
  background: rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 5px 24px rgba(0, 0, 0, 0.24) !important;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.camera-shutter::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(#ff3b4f var(--camera-record-progress), rgba(255,255,255,.24) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 0);
  opacity: 0;
  transition: opacity .15s ease;
}
.camera-shutter .camera-shutter-core {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fff;
  display: block;
  transition: transform .14s ease, border-radius .18s ease, background .18s ease;
}
.camera-shutter.pressed .camera-shutter-core {
  transform: scale(.91);
}
.camera-shutter.recording::before {
  opacity: 1;
}
.camera-shutter.recording .camera-shutter-core {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: #ff3b4f;
}
.camera-hold-hint {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 32px);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(13, 25, 43, 0.62);
  color: rgba(255,255,255,.78);
  font-size: 10px;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}
.camera-hold-hint strong {
  color: #9bc5ff;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.camera-modal.is-recording .camera-top,
.camera-modal.is-recording .camera-gallery,
.camera-modal.is-recording .camera-enhance,
.camera-modal.is-recording .camera-switch {
  opacity: .4;
  pointer-events: none;
}
.camera-modal.is-recording .camera-hold-hint strong {
  color: #ff6b78;
}

@media (min-width: 761px) {
  .camera-stage {
    max-width: 520px;
    margin: 0 auto;
  }
  .camera-modal {
    background: #080b10;
  }
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 220;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  padding: 9px 13px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: 0.18s;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.media-viewer {
  position: fixed;
  inset: 0;
  z-index: 170;
  overflow: hidden;
  background: #03070d;
  color: #fff;
}
.media-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: #03070d;
}
.media-viewer-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  touch-action: manipulation;
  user-select: none;
}
.media-viewer-content > img,
.media-viewer-content > video {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  background: #03070d;
}
.media-viewer.recorded-fullscreen .media-viewer-content > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-viewer-toolbar {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  min-height: calc(66px + env(safe-area-inset-top));
  padding: max(12px, env(safe-area-inset-top)) 12px 10px;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) 42px 36px;
  align-items: center;
  gap: 5px;
  background: linear-gradient(180deg, rgba(0,0,0,.72), transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.media-viewer-heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.media-viewer-heading strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}
.media-viewer-heading span {
  margin-top: 2px;
  color: rgba(255,255,255,.72);
  font-size: 11px;
}
.media-viewer-close,
.media-viewer-download,
.media-viewer-more {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 34, .5);
  color: #fff;
}
.media-viewer-close svg,
.media-viewer-download svg {
  width: 21px;
  height: 21px;
}
.media-viewer-more {
  font-size: 24px;
  line-height: 1;
}
.media-viewer-play {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 68px;
  transform: translate(-50%,-50%);
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(8, 14, 22, .62);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(9px);
  transition: opacity .18s ease, transform .16s ease;
}
.media-viewer-play svg {
  width: 32px;
  height: 32px;
}
.media-viewer-play .viewer-play-icon {
  fill: currentColor;
  stroke: none;
  margin-left: 4px;
}
.media-viewer-play .viewer-pause-icon,
.media-viewer-play.is-playing .viewer-play-icon {
  display: none;
}
.media-viewer-play.is-playing .viewer-pause-icon {
  display: block;
}
.media-viewer-controls {
  position: absolute;
  z-index: 5;
  left: 16px;
  right: 16px;
  bottom: max(22px, calc(env(safe-area-inset-bottom) + 12px));
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) 42px;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 18px;
  background: rgba(9, 15, 24, .65);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(10px);
  transition: opacity .18s ease;
}
.media-viewer-controls span {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.media-viewer-controls input {
  width: 100%;
  accent-color: var(--aift);
}
.media-viewer.controls-visible .media-viewer-toolbar,
.media-viewer.controls-visible .media-viewer-play,
.media-viewer.controls-visible .media-viewer-controls {
  opacity: 1;
  pointer-events: auto;
}
.media-viewer.reactions-open .media-viewer-content::after {
  content: "";
  position: absolute;
  z-index: 6;
  inset: 0;
  background: rgba(0,0,0,.36);
  pointer-events: none;
}
.media-viewer-reactions {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 18px));
  transform: translateX(-50%);
  width: min(92vw, 520px);
  min-height: 58px;
  padding: 8px;
  border-radius: 29px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 3px;
  background: rgba(23, 34, 43, .94);
  box-shadow: 0 12px 36px rgba(0,0,0,.34);
  backdrop-filter: blur(14px);
}
.media-viewer-reactions button {
  min-width: 42px;
  height: 42px;
  padding: 0 7px;
  border: 0;
  border-radius: 21px;
  background: transparent;
  color: #fff;
  font-size: 23px;
}
.media-viewer-reactions button:first-child {
  min-width: 66px;
  padding-inline: 13px;
  background: rgba(255,255,255,.1);
  font-size: 12px;
  font-weight: 800;
}
.media-viewer.reactions-open .media-viewer-controls {
  opacity: 0;
  pointer-events: none;
}
.call-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  overflow: hidden;
  background: #071116;
  color: #fff;
}
.call-bg {
  position: absolute;
  inset: 0;
  background-color: #071116;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='%237b8d93' stroke-opacity='.12' stroke-width='1.5'%3E%3Ccircle cx='26' cy='28' r='10'/%3E%3Cpath d='M20 28h12M26 22v12M72 18l9 9-9 9-9-9zM120 20h24v16h-24zM132 36v9M18 84c12-10 23-10 35 0-12 10-23 10-35 0zM78 70h18l6 12-15 10-15-10zM130 72c12 0 20 7 20 16s-8 16-20 16M36 128l13-11 13 11-13 11zM91 120c0-7 6-13 13-13s13 6 13 13-6 13-13 13M138 134h23M149 123v23M18 161h25l6-8 7 8h19'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 180px 180px;
}
.call-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(2, 8, 12, 0.08),
    rgba(2, 8, 12, 0.24)
  );
}
.call-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: 126px minmax(0, 1fr) auto;
  position: relative;
  z-index: 2;
}
.call-top {
  position: relative;
  padding: max(19px, env(safe-area-inset-top)) 18px 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.call-top-action {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: rgba(37, 48, 53, 0.86);
  color: #fff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.16);
}
.call-top-action svg {
  width: 27px;
  height: 27px;
  stroke-width: 2.1;
}
.call-heading {
  position: absolute;
  left: 82px;
  right: 82px;
  top: max(26px, calc(env(safe-area-inset-top) + 7px));
  text-align: center;
}
.call-heading > img {
  display: none;
}
.call-heading h2 {
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.call-heading p {
  margin: 5px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #9da9ad;
  font-size: 12px;
}
.call-heading p svg {
  width: 15px;
  height: 15px;
}
.call-heading > span {
  display: block;
  margin-top: 5px;
  color: #b6c2c7;
  font-size: 10px;
}
.call-info {
  position: absolute;
  right: 18px;
  top: 91px;
  color: #b8c5ca;
  font-size: 9px;
}
.call-info time {
  font-variant-numeric: tabular-nums;
}
.call-info time:empty {
  display: none;
}
.call-video-stage {
  min-height: 0;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: transparent;
}
.call-video-stage > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050a0d;
}
.audio-call .call-video-stage > video {
  opacity: 0;
}
.local-video-wrap {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: clamp(110px, 24vw, 185px);
  aspect-ratio: 3/4;
  border-radius: 17px;
  overflow: hidden;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34);
  z-index: 4;
  touch-action: none;
  user-select: none;
  cursor: grab;
}
.local-video-wrap.dragging {
  cursor: grabbing;
  transition: none !important;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.48);
}
.local-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.local-camera-avatar {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-call.local-camera-off .local-video-wrap video {
  display: none;
}
.video-call.local-camera-off .local-camera-avatar {
  display: block;
}
.audio-call .local-video-wrap {
  display: none;
}
.call-waiting {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 24px 32px;
  background: transparent;
  text-align: center;
}
.call-avatar-pulse {
  position: relative;
  width: min(54vw, 270px);
  height: min(54vw, 270px);
  display: grid;
  place-items: center;
}
.call-avatar-pulse i {
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(130, 158, 166, 0.16);
  border-radius: 50%;
  animation: callPulse 2.4s ease-out infinite;
}
.call-avatar-pulse i:nth-child(2) {
  animation-delay: 1.2s;
}
.call-avatar-pulse img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.32);
}
.call-stage-status {
  margin: 17px 0 0;
  color: #aebbc0;
  font-size: 11px;
}
.call-controls {
  position: relative;
  width: min(560px, calc(100% - 32px));
  margin: 0 auto max(14px, env(safe-area-inset-bottom));
  padding: 27px 24px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 27px 18px;
  background: rgba(15, 23, 27, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 38px;
  box-shadow: 0 -8px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(20px);
}
.call-control {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.call-control-icon {
  width: 76px;
  height: 76px;
  padding: 0 !important;
  border-radius: 50% !important;
  background: #202b30 !important;
  display: grid !important;
  place-items: center;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}
.call-control-icon svg {
  width: 30px;
  height: 30px;
  stroke-width: 2;
}
.call-control b {
  font-size: 13px;
  font-weight: 500;
}
.call-control:active .call-control-icon {
  transform: scale(0.94);
}
.call-control.active .call-control-icon {
  background: #fff !important;
  color: #111b20 !important;
}
.call-control.unavailable {
  opacity: 0.34;
  cursor: not-allowed;
}
.call-control.end .call-control-icon {
  background: #ee003f !important;
  color: #fff;
}
.call-control.end b {
  color: #fff;
}
.call-more-menu {
  position: absolute;
  left: 18px;
  bottom: calc(50% + 2px);
  width: 190px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: #202b30;
  box-shadow: 0 15px 34px rgba(0, 0, 0, 0.34);
  z-index: 8;
}
.call-more-menu button {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #fff;
  text-align: left;
  font-size: 10px;
}
.call-more-menu button:active {
  background: rgba(255, 255, 255, 0.08);
}
.call-modal.compact {
  inset: auto 10px max(10px, env(safe-area-inset-bottom)) auto;
  width: min(330px, calc(100vw - 20px));
  height: 82px;
  border-radius: 18px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.4);
}
.call-modal.compact .call-bg {
  background: #111b20;
}
.call-modal.compact .call-shell {
  display: block;
}
.call-modal.compact .call-top {
  height: 82px;
  padding: 12px;
}
.call-modal.compact .call-top-action {
  width: 48px;
  height: 48px;
}
.call-modal.compact .call-top > .call-top-action:last-of-type,
.call-modal.compact .call-info,
.call-modal.compact .call-video-stage,
.call-modal.compact .call-controls {
  display: none;
}
.call-modal.compact .call-heading {
  left: 72px;
  right: 12px;
  top: 15px;
  text-align: left;
}
.call-modal.compact .call-heading h2 {
  font-size: 14px;
}
.call-modal.compact .call-heading p {
  justify-content: flex-start;
  font-size: 9px;
}
.call-modal.compact .call-heading > span {
  position: absolute;
  right: 0;
  top: 26px;
  margin: 0;
  font-size: 8px;
}
@keyframes callPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.16);
    opacity: 0;
  }
}
@media (max-width: 520px) {
  .call-shell {
    grid-template-rows: 112px minmax(0, 1fr) auto;
  }
  .call-top {
    padding-left: 15px;
    padding-right: 15px;
  }
  .call-top-action {
    width: 52px;
    height: 52px;
  }
  .call-heading {
    left: 72px;
    right: 72px;
  }
  .call-heading h2 {
    font-size: 18px;
  }
  .call-heading p {
    font-size: 10px;
  }
  .call-info {
    top: 82px;
    right: 15px;
  }
  .call-avatar-pulse {
    width: min(54vw, 230px);
    height: min(54vw, 230px);
  }
  .call-controls {
    width: calc(100% - 28px);
    padding: 24px 15px 22px;
    gap: 24px 8px;
    border-radius: 34px;
  }
  .call-control-icon {
    width: 68px;
    height: 68px;
  }
  .call-control-icon svg {
    width: 27px;
    height: 27px;
  }
  .call-control b {
    font-size: 12px;
  }
}
@media (max-height: 700px) and (max-width: 520px) {
  .call-shell {
    grid-template-rows: 96px minmax(0, 1fr) auto;
  }
  .call-top-action {
    width: 46px;
    height: 46px;
  }
  .call-heading {
    top: 19px;
  }
  .call-heading h2 {
    font-size: 16px;
  }
  .call-heading p {
    margin-top: 3px;
  }
  .call-heading > span {
    display: none;
  }
  .call-info {
    top: 69px;
  }
  .call-avatar-pulse {
    width: min(38vw, 180px);
    height: min(38vw, 180px);
  }
  .call-controls {
    padding: 17px 14px 15px;
    gap: 15px 8px;
  }
  .call-control-icon {
    width: 56px;
    height: 56px;
  }
  .call-control b {
    font-size: 10px;
  }
}
.incoming-call {
  position: fixed;
  inset: 0;
  z-index: 185;
  background: rgba(3, 7, 18, 0.82);
  display: grid;
  place-items: center;
}
.incoming-card {
  width: min(330px, 90vw);
  padding: 30px;
  text-align: center;
  border-radius: 20px;
  background: #172033;
  color: #fff;
}
.incoming-card > img {
  width: 82px;
  height: 82px;
  margin: 0 auto 12px;
  border-radius: 50%;
  object-fit: cover;
}
.incoming-card h2 {
  margin: 0;
}
.incoming-card p {
  color: #cbd5e1;
}
.incoming-actions {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 22px;
}
.incoming-actions button {
  min-width: 80px;
  height: 42px;
  border: 0;
  border-radius: 22px;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}
.decline-btn {
  background: #e5484d;
}
.accept-btn {
  background: #12b76a;
}
.meeting-coming-card {
  padding: 24px;
  text-align: center;
}
.meeting-coming-logo img {
  width: 72px;
  margin: auto;
}
.meeting-coming-pill {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--aift);
  font-size: 8px;
  font-weight: 800;
}
.meeting-coming-card h2 {
  margin: 10px 0 6px;
}
.meeting-coming-card p {
  color: #667085;
  font-size: 10px;
  line-height: 1.6;
}
.meeting-coming-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 14px 0;
}
.meeting-coming-grid span {
  padding: 8px;
  border-radius: 8px;
  background: #f7f9fb;
  font-size: 8px;
}

.message-action-bar .selection-back {
  background: transparent !important;
  color: #344054 !important;
  -webkit-tap-highlight-color: transparent;
}
.message-action-bar .selection-back:active {
  background: #eef4fc !important;
}
.message-action-bar .selection-back svg {
  width: 28px !important;
  height: 28px !important;
  fill: currentColor !important;
  stroke: none !important;
}
.message-reaction-bar {
  position: fixed;
  z-index: 151;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 7px 8px;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(16, 24, 40, 0.2);
}
.message-reaction-bar > button,
.message-reaction-more > button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  display: grid;
  place-items: center;
  font-size: 25px;
  line-height: 1;
  transition:
    transform 0.14s ease,
    background 0.14s ease;
}
.message-reaction-bar > button:hover,
.message-reaction-bar > button:active,
.message-reaction-more > button:hover {
  background: #eef4fc;
  transform: scale(1.08);
}
.message-reaction-bar .reaction-more-toggle {
  background: #edf1f6;
  color: #344054;
  font-size: 0;
}
.reaction-more-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.message-reaction-more {
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  display: none;
  gap: 3px;
  padding: 7px;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.18);
}
.message-reaction-bar.expanded .message-reaction-more {
  display: flex;
}
.message-reactions {
  position: absolute;
  right: 7px;
  bottom: -15px;
  z-index: 3;
  min-height: 27px;
  padding: 3px 8px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #f8fafc;
  box-shadow: 0 3px 8px rgba(16, 24, 40, 0.14);
  font-size: 16px;
  line-height: 17px;
  white-space: nowrap;
}
.message-row.other .message-reactions {
  right: auto;
  left: 7px;
}
.message-bubble:has(.message-reactions) {
  margin-bottom: 12px;
}
.composer-camera {
  color: #526174;
}
.voice-recording-status {
  order: 2;
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 12px;
  border-radius: 24px;
  background: #fff;
  color: #667085;
  font-size: 12px;
  overflow: hidden;
}
.voice-hold-view,
.voice-locked-view {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}
.voice-locked-view {
  display: none;
}
.voice-recording-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #e5484d;
  box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.12);
  animation: voiceRecordPulse 1s ease-in-out infinite;
}
.voice-recording-status time {
  font-variant-numeric: tabular-nums;
  color: #344054;
  font-weight: 700;
  white-space: nowrap;
}
.voice-slide-cancel {
  margin-left: auto;
  margin-right: auto;
  color: #7d8998;
  white-space: nowrap;
}
.voice-slide-cancel b {
  margin-right: 7px;
  font-size: 18px;
  font-weight: 400;
  vertical-align: -1px;
}
.voice-lock-hint {
  position: absolute;
  right: 8px;
  bottom: 58px;
  width: 52px;
  height: 112px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 7px 24px rgba(16, 24, 40, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  color: #344054;
  z-index: 8;
  animation: voiceLockRise 0.2s ease-out;
}
.voice-lock-hint svg {
  width: 22px;
  height: 22px;
}
.voice-lock-hint span {
  font-size: 20px;
  line-height: 1;
}
.composer.is-recording .composer-input-wrap,
.composer.is-recording #pickerToggleBtn,
.composer.is-recording .add-attachment,
.composer.is-recording .composer-camera,
.composer.is-recording .send-btn {
  display: none !important;
}
.composer.is-recording .mic-btn {
  display: grid !important;
  background: #fff !important;
  color: #101828 !important;
  box-shadow: 0 5px 18px rgba(16, 24, 40, 0.18);
}
.composer.is-recording .mic-btn.recording {
  transform: scale(1.32);
  animation: voiceMicPulse 1.25s ease-in-out infinite;
}
.composer.voice-is-locked {
  min-height: 116px;
  padding: 10px 12px;
}
.composer.voice-is-locked .mic-btn {
  display: none !important;
}
.composer.voice-is-locked .voice-recording-status {
  height: 96px;
  border-radius: 20px;
  padding: 10px 12px;
}
.composer.voice-is-locked .voice-hold-view {
  display: none;
}
.composer.voice-is-locked .voice-locked-view {
  display: grid;
  grid-template-columns: 40px auto minmax(70px, 1fr) minmax(96px, auto) 44px;
  gap: 10px;
  align-items: center;
}
.voice-locked-view button {
  border: 0;
}
.voice-delete {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff1f3;
  color: #e5485d;
  display: grid;
  place-items: center;
}
.voice-delete svg {
  width: 21px;
  height: 21px;
}
.voice-waveform {
  height: 34px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
}
.voice-waveform i {
  display: block;
  width: 3px;
  height: var(--bar);
  max-height: 29px;
  border-radius: 3px;
  background: #8c98a8;
  animation: voiceWave 850ms ease-in-out infinite alternate;
}
.voice-waveform i:nth-child(3n) {
  animation-delay: -240ms;
}
.voice-waveform i:nth-child(4n) {
  animation-delay: -430ms;
}
.voice-pause {
  height: 42px;
  padding: 0 16px;
  border-radius: 22px;
  background: #eef1f5;
  color: #344054;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
}
.voice-pause svg {
  width: 18px;
  height: 18px;
}
.resume-icon {
  display: none;
}
.voice-is-paused .pause-icon {
  display: none;
}
.voice-is-paused .resume-icon {
  display: block;
}
.voice-is-paused .voice-waveform i {
  animation-play-state: paused;
}
.voice-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--aift);
  color: #fff;
  display: grid;
  place-items: center;
}
.voice-send svg {
  width: 21px;
  height: 21px;
}
@keyframes voiceRecordPulse {
  50% {
    opacity: 0.5;
  }
}
@keyframes voiceMicPulse {
  50% {
    box-shadow:
      0 0 0 13px rgba(22, 113, 232, 0.12),
      0 6px 20px rgba(16, 24, 40, 0.2);
  }
}
@keyframes voiceLockRise {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
}
@keyframes voiceWave {
  to {
    transform: scaleY(0.45);
    opacity: 0.65;
  }
}
.chat-panel[data-chat-theme="dark"] .message-action-bar .selection-back {
  color: #d7deea !important;
}
.chat-panel[data-chat-theme="dark"] .message-action-bar .selection-back:active {
  background: #253044 !important;
}
.chat-panel[data-chat-theme="dark"] .message-reaction-bar,
.chat-panel[data-chat-theme="dark"] .message-reaction-more {
  background: #253044;
  border-color: #344158;
}
.chat-panel[data-chat-theme="dark"] .message-reaction-bar > button:hover,
.chat-panel[data-chat-theme="dark"] .message-reaction-more > button:hover {
  background: #344158;
}
.chat-panel[data-chat-theme="dark"]
  .message-reaction-bar
  .reaction-more-toggle {
  background: #344158;
  color: #eef2f7;
}
.chat-panel[data-chat-theme="dark"] .message-reactions {
  background: #253044;
  border-color: #111827;
  color: #fff;
}
.chat-panel[data-chat-theme="dark"] .voice-recording-status {
  background: #253044;
  color: #a8b3c4;
}
.chat-panel[data-chat-theme="dark"] .voice-recording-status time {
  color: #f8fafc;
}
@media (max-width: 760px) {
  .message-reaction-bar {
    max-width: calc(100vw - 16px);
    gap: 1px;
    padding: 6px;
  }
  .message-reaction-bar > button {
    width: 38px;
    height: 38px;
    font-size: 23px;
  }
  .composer .composer-camera {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
  }
}

.missed-call-name,.missed-call-preview{color:#e5485f!important}.call-preview-icon{font-weight:900}.calls-list-heading{padding:16px 18px 8px;font-size:20px;font-weight:800;color:var(--ink,#101828)}
.call-log-item{display:flex;align-items:center;gap:11px;padding:11px 14px;border-bottom:1px solid #eef1f5}.call-log-item>img{width:52px;height:52px;border-radius:50%;object-fit:cover}.call-log-main{min-width:0;flex:1;border:0;background:none;text-align:left;color:inherit;padding:0}.call-log-main strong,.call-log-main span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.call-log-main strong{font-size:16px}.call-log-main span{margin-top:4px;color:#7b8495;font-size:13px}.call-log-main span b{color:#12b76a;font-size:17px}.call-log-item.missed .call-log-main strong,.call-log-item.missed .call-log-main span b{color:#e5485f}.call-log-action,.call-log-delete{width:38px;height:38px;border:0;border-radius:50%;display:grid;place-items:center;font-size:19px}.call-log-action{background:#edf5ff;color:#1677e8}.call-log-delete{background:transparent;color:#e5485f;font-size:25px}.call-log-delete svg{width:20px;height:20px;stroke-width:1.9}.call-log-delete:hover{background:rgba(229,72,95,.1);color:#d92d4f}
.call-event-row{pointer-events:auto}.call-event-card{width:min(330px,82vw);display:flex;align-items:center;gap:11px;padding:12px;border:0;border-radius:15px;background:#fff;color:#152033;box-shadow:0 1px 4px rgba(16,24,40,.12);text-align:left}.message-row.me .call-event-card{background:#ddebfa}.call-event-icon{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:rgba(22,119,232,.12);color:#1677e8;font-size:20px}.call-event-card.missed{border:1px solid rgba(229,72,95,.2)}.call-event-card.missed .call-event-icon,.call-event-card.missed .call-event-copy strong,.call-event-card.missed .call-event-copy small,.call-event-card.missed time{color:#e5485f}.call-event-card.missed .call-event-icon{background:rgba(229,72,95,.12)}.call-event-copy{min-width:0;flex:1}.call-event-copy strong,.call-event-copy small{display:block}.call-event-copy small{margin-top:3px;color:#7b8495}.call-event-card time{color:#8992a3;font-size:12px;align-self:flex-end}
@media(max-width:760px){.conversation-tabs{overflow-x:auto;scrollbar-width:none}.conversation-tabs button{flex:0 0 auto}.call-log-item{padding-inline:12px}.call-log-item>img{width:48px;height:48px}.call-log-delete{width:32px}.calls-list-heading{font-size:19px}}

/* Full-screen mobile video call */
.call-side-tools {
  display: none;
}
.call-start-menu svg {
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 760px) {
  .video-call.call-modal {
    background: #070b10;
    color: #fff;
  }
  .video-call .call-bg {
    display: none;
  }
  .video-call .call-shell {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    background: #070b10;
  }
  .video-call .call-video-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    background: #070b10;
  }
  .video-call .remote-videos-grid {
    inset: 0;
    border-radius: 0;
  }
  .video-call .remote-video-tile span {
    display: none;
  }
  .video-call .local-video-wrap {
    z-index: 12;
    top: auto;
    right: 18px;
    bottom: 108px;
    left: auto;
    width: 104px;
    height: 144px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  }
  .video-call .local-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
  }
  .video-call:not(.call-connected) .remote-videos-grid {
    display: none;
  }
  .video-call:not(.call-connected) .local-video-wrap {
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .video-call:not(.call-connected) .local-video-wrap video {
    transform: none;
  }
  .video-call .call-waiting {
    z-index: 18;
    inset: 0;
    display: block;
    background: transparent;
    pointer-events: none;
  }
  .video-call .call-avatar-pulse {
    display: none;
  }
  .video-call .call-stage-status {
    display: none;
  }
  .video-call .call-top {
    position: absolute;
    z-index: 30;
    top: max(36px, env(safe-area-inset-top));
    left: 0;
    right: 0;
    height: auto;
    padding: 0 22px;
    border: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
  }
  .video-call .call-heading {
    position: fixed;
    top: max(74px, calc(env(safe-area-inset-top) + 38px));
    left: 50%;
    transform: translateX(-50%);
    display: block;
    margin: 0;
    width: min(72vw, 300px);
    text-align: center;
    color: #fff;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.55);
    pointer-events: none;
  }
  .video-call .call-heading > img,
  .video-call .call-heading p {
    display: none;
  }
  .video-call .call-heading h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
    color: #fff;
    font-weight: 500;
  }
  .video-call .call-heading > span {
    display: block;
    margin-top: 2px;
    color: #fff;
    font-size: 14px;
    opacity: 0.96;
  }
  .video-call .call-top > .call-top-action,
  .video-call .call-info {
    display: none;
  }
  .video-call .call-side-tools {
    position: fixed;
    z-index: 35;
    top: max(112px, calc(env(safe-area-inset-top) + 76px));
    right: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: auto;
  }
  .video-call .call-side-tools button {
    width: 58px;
    height: 58px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(20, 28, 34, 0.9);
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  }
  .video-call .call-side-tools button.active {
    background: #fff;
    color: #101820;
  }
  .video-call .call-side-tools svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .video-call.video-enhanced .local-video-wrap video {
    filter: contrast(1.08) saturate(1.12) brightness(1.04);
  }
  .video-call .call-controls {
    position: fixed;
    z-index: 40;
    left: 32px;
    right: 32px;
    bottom: max(18px, env(safe-area-inset-bottom));
    width: auto;
    height: 76px;
    padding: 9px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    border: 0;
    border-radius: 38px;
    background: rgba(16, 23, 29, 0.94);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(14px);
  }
  .video-call .call-control {
    width: 44px;
    min-width: 0;
    padding: 0;
    display: grid;
    place-items: center;
    background: transparent;
  }
  .video-call .call-control-icon {
    width: 44px;
    height: 44px;
    border: 0;
    background: #202a30;
    color: #fff;
  }
  .video-call .call-control-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.15;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .video-call .call-control b {
    display: none;
  }
  .video-call #addParticipantBtn {
    order: 1;
  }
  .video-call #cameraBtn {
    order: 2;
  }
  .video-call #speakerBtn {
    order: 3;
  }
  .video-call #muteBtn {
    order: 4;
  }
  .video-call #switchCameraBtn {
    order: 5;
  }
  .video-call #endCallBtn {
    order: 6;
  }
  .video-call #speakerBtn.speaker-on .call-control-icon {
    background: #fff !important;
    color: #101820 !important;
  }
  .video-call .call-control.end .call-control-icon {
    background: #f40746 !important;
    color: #fff !important;
  }
  .video-call .call-muted-slash {
    display: none;
  }
  .video-call #muteBtn.active .call-muted-slash {
    display: block;
  }
  .video-call #switchCameraBtn.switching .call-control-icon {
    animation: callSwitchSpin 0.45s ease;
  }
  .video-call .call-more-menu {
    right: auto;
    left: 0;
    bottom: 88px;
    min-width: 190px;
    border-radius: 16px;
    background: #172027;
    color: #fff;
  }
  .video-call .call-more-menu button {
    color: #fff;
  }
}
@keyframes callSwitchSpin {
  to {
    transform: rotate(180deg);
  }
}

.call-audio-identity {
  position: absolute;
  z-index: 14;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: radial-gradient(
    circle at center,
    rgba(43, 57, 69, 0.3),
    rgba(7, 12, 18, 0.78)
  );
}
.call-audio-identity > span {
  position: relative;
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
}
.call-audio-identity i {
  position: absolute;
  inset: -14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  animation: callIdentityPulse 2s ease-out infinite;
}
.call-audio-identity img {
  width: 172px;
  height: 172px;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}
.audio-call .call-audio-identity {
  display: flex;
}
.audio-call .call-waiting {
  display: none !important;
}
@keyframes callIdentityPulse {
  0% {
    transform: scale(0.92);
    opacity: 0.75;
  }
  70%,
  100% {
    transform: scale(1.12);
    opacity: 0;
  }
}
@media (max-width: 760px) {
  .call-audio-identity > span {
    width: 164px;
    height: 164px;
  }
  .call-audio-identity img {
    width: 148px;
    height: 148px;
  }
  .audio-call .call-audio-identity {
    padding-bottom: 52px;
  }
}
@media (max-width: 390px) {
  .composer-input-wrap {
    padding-right: 92px;
  }
  .composer .composer-camera {
    right: 98px;
  }
  .composer .add-attachment {
    right: 62px;
  }
  .composer.has-content .composer-input-wrap {
    padding-right: 54px;
  }
  .message-reaction-bar > button {
    width: 35px;
    height: 35px;
    font-size: 21px;
  }
  .message-reaction-bar > button:nth-of-type(7) {
    display: none;
  }
}

/* AIFT Story Studio */
.story-overlay {
  position: fixed;
  inset: 0;
  z-index: 205;
  background: #070b12;
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: stretch;
  padding: 0;
  backdrop-filter: none;
}
.story-compose-card {
  position: relative;
  width: 100%;
  height: 100dvh;
  max-height: none;
  overflow: hidden;
  background: #070b12;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  grid-template-rows: 68px minmax(0, 1fr) 76px;
}
.story-compose-head {
  grid-column: 1/-1;
  grid-row: 1;
  padding: 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 11, 18, 0.96);
  z-index: 10;
}
.story-compose-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.story-compose-head strong {
  font-size: 14px;
  color: #fff;
}
.story-compose-head span {
  color: #98a2b3;
  font-size: 9px;
}
.story-compose-head button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  display: grid;
  place-items: center;
}
.story-compose-head button:hover {
  background: rgba(255, 255, 255, 0.13);
}
.story-compose-preview {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
  justify-self: center;
  width: min(430px, calc((100dvh - 164px) * 0.5625));
  height: min(calc(100dvh - 164px), 764px);
  aspect-ratio: 9/16;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #101828;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  display: grid;
  place-items: center;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}
.story-compose-preview img,
.story-compose-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #101828;
}
.story-compose-placeholder {
  text-align: center;
  color: #c7d0dc;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 26px;
}
.story-compose-placeholder strong {
  font-size: 12px;
  color: #fff;
}
.story-compose-placeholder small {
  font-size: 9px;
  color: #98a2b3;
  line-height: 1.5;
}
.story-compose-card > textarea {
  grid-column: 2;
  grid-row: 2;
  width: auto;
  min-height: 110px;
  margin: 18px 18px 0;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  outline: none;
  resize: none;
  color: #fff;
  background: #111827;
}
.story-compose-card > textarea:focus {
  border-color: #4c91ed;
  box-shadow: 0 0 0 3px rgba(22, 113, 232, 0.14);
}
.story-compose-controls {
  grid-column: 2;
  display: flex;
  gap: 8px;
  padding: 10px 18px;
  flex-wrap: wrap;
  align-content: flex-start;
  background: #0b1019;
}
.story-compose-card > textarea + .story-compose-controls {
  grid-row: 2;
  margin-top: 146px;
  padding-top: 16px;
}
.story-compose-card
  > textarea
  + .story-compose-controls
  + .story-compose-controls {
  grid-row: 2;
  margin-top: 324px;
}
.story-file-button,
.story-compose-controls select {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  background: #151c28;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  transition: 0.15s ease;
}
.story-file-button {
  cursor: pointer;
  flex: 1 1 92px;
}
.story-file-button:hover,
.story-compose-controls select:hover {
  background: #1d2736;
  border-color: rgba(255, 255, 255, 0.2);
}
.story-file-button svg {
  width: 18px;
  height: 18px;
}
.story-compose-controls select {
  margin-left: 0;
  outline: none;
}
.story-compose-controls input[type="color"] {
  border-color: rgba(255, 255, 255, 0.15) !important;
  background: #151c28 !important;
}
.story-compose-controls input[type="range"] {
  accent-color: var(--aift);
}
#storyMusicStatus {
  position: absolute;
  right: 18px;
  top: 454px;
  width: 324px;
  padding: 9px 11px !important;
  border-radius: 9px;
  background: #151c28;
  color: #cbd5e1 !important;
  font-size: 9px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#storyTagPanel {
  position: absolute;
  right: 18px;
  top: 150px;
  width: 324px;
  max-height: 390px;
  padding: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: #111827;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.36);
  z-index: 25;
}
#storyTagPanel .search-box {
  background: #0b1019;
  border-color: rgba(255, 255, 255, 0.12);
}
#storyTagPanel .search-box input {
  color: #fff;
}
#storyTagPanel .conversation-item:hover {
  background: #1a2432;
}
#storyTagPanel .conversation-name {
  color: #fff;
}
.story-compose-card > .story-compose-controls:has(#storyAudience) {
  grid-column: 2;
  grid-row: 3;
  margin: 0;
  padding: 17px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  align-items: center;
}
.story-compose-card > .story-compose-controls:has(#storyAudience) select {
  width: 100%;
  height: 42px;
}
.story-compose-actions {
  grid-column: 1;
  grid-row: 3;
  padding: 14px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  justify-content: center;
  gap: 10px;
  background: #070b12;
}
.story-compose-actions .btn {
  height: 44px;
  border-color: rgba(255, 255, 255, 0.14);
  background: #151c28;
  color: #fff;
}
.story-publish-btn {
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: var(--aift);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(22, 113, 232, 0.28);
}
.story-publish-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.story-viewer {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: #05070b;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  overscroll-behavior: none;
  touch-action: none;
}
.story-viewer-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  background: rgba(20, 25, 34, 0.7);
  color: #fff;
  display: grid;
  place-items: center;
  z-index: 20;
  backdrop-filter: blur(12px);
}
.story-viewer-shell {
  position: relative;
  width: min(430px, 100vw);
  height: min(100dvh, 764px);
  background: #111827;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
  display: flex;
  flex-direction: column;
  touch-action: none;
}
.story-progress {
  position: absolute;
  top: max(9px, env(safe-area-inset-top));
  left: 9px;
  right: 9px;
  z-index: 12;
  display: flex;
  gap: 4px;
}
.story-progress span {
  height: 3px;
  flex: 1;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
}
.story-progress span i {
  display: block;
  width: 0;
  height: 100%;
  background: #fff;
}
.story-progress span.done i {
  width: 100%;
}
.story-progress span.active i {
  width: 0;
  animation: none;
}
.story-viewer.paused .story-progress span.active i {
  animation-play-state: paused;
}
.story-viewer-head {
  position: absolute;
  top: max(17px, calc(env(safe-area-inset-top) + 10px));
  left: 12px;
  right: 58px;
  z-index: 13;
  display: flex;
  align-items: center;
  gap: 7px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
}
.story-viewer-head img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #fff;
}
.story-viewer-head > div {
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 6px;
}
.story-viewer-head strong {
  font-size: 10px;
}
.story-viewer-head span {
  font-size: 8px;
  color: #e5e7eb;
}
.story-viewer-head #storyViewerTrack {
  flex-basis: 100%;
  margin-top: 0;
  font-size: 8px;
  line-height: 1.1;
}
.story-viewer-content {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  position: relative;
  background: #0f172a;
  user-select: none;
}
.story-viewer-content > img,
.story-viewer-content > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 5;
  width: 28%;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
}
.story-nav svg {
  display: none;
}
.story-nav.prev {
  left: 0;
}
.story-nav.next {
  right: 0;
}
.story-owner-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  min-height: 64px;
  padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
}
.story-owner-footer button {
  min-width: 38px;
  height: 38px;
  border: 0;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.story-owner-footer button svg {
  width: 20px;
  height: 20px;
}
.story-owner-footer #storyLikeBtn.active {
  color: #e13b72;
  background: rgba(225, 59, 114, 0.15);
}
.story-owner-footer #storyLikeBtn.active svg {
  fill: currentColor;
  stroke: currentColor;
}
.story-owner-footer .danger-text {
  color: #ffb4b0 !important;
}
.story-activity-backdrop {
  position: fixed;
  inset: 0;
  z-index: 276;
  display: flex;
  align-items: flex-end;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(4px);
}
.story-activity-sheet {
  width: 100%;
  max-height: min(66dvh, 560px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -14px 38px rgba(16, 24, 40, 0.2);
  overflow: hidden;
  animation: reactionSheetIn 0.2s ease-out;
}
.story-activity-handle {
  width: 38px;
  height: 4px;
  margin: 8px auto 1px;
  border-radius: 999px;
  background: #c5ccd6;
}
.story-activity-head {
  min-height: 54px;
  padding: 4px 12px 5px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.story-activity-head h3 {
  margin: 0;
  font-size: 15px;
}
.story-activity-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
}
.story-activity-head button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f2f4f7;
  color: #526174;
  display: grid;
  place-items: center;
}
.story-activity-head button svg {
  width: 19px;
  height: 19px;
}
.story-viewers-list {
  max-height: calc(66dvh - 68px);
  overflow: auto;
  padding: 2px 10px max(10px, env(safe-area-inset-bottom));
}
.story-viewer-row {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 7px 3px;
  border-bottom: 1px solid #f0f2f5;
  box-sizing: border-box;
  overflow: hidden;
}
.story-viewer-row img {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  object-fit: cover;
}
.story-viewer-row > div {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.story-viewer-row strong {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.story-viewer-row span {
  margin-top: 2px;
  color: #98a2b3;
  font-size: 9px;
}
.story-viewer-row .story-activity-heart {
  margin-left: auto;
  flex: 0 0 22px;
  color: #e13b72;
}
.story-viewer-row .story-activity-message {
  flex: 0 0 auto;
  max-width: 88px;
  margin-left: 4px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #dce3eb;
  border-radius: 15px;
  background: #fff;
  color: #344054;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}
@keyframes storyProgress {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.conversation-item:focus-visible,
.story-card:focus-visible,
.icon-btn:focus-visible,
.composer-icon:focus-visible,
.send-btn:focus-visible {
  outline: 2px solid rgba(22, 113, 232, 0.55);
  outline-offset: 2px;
}
@media (max-width: 1050px) {
  .messages-app {
    grid-template-columns: 340px minmax(0, 1fr);
  }
  .message-bubble {
    max-width: 76%;
  }
  .story-compose-card {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
  #storyMusicStatus,
  #storyTagPanel {
    width: 274px;
  }
}
@media (max-width: 760px) {
  body {
    background: #fff;
  }
  .messages-app {
    display: block;
    position: relative;
  }
  .sidebar {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100dvh;
    z-index: 40;
    border: 0;
  }
  .sidebar.hidden-mobile {
    display: none;
  }
  .chat-panel {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100dvh;
    z-index: 30;
  }
  .sidebar-header {
    padding: 14px 12px 10px;
  }
  .sidebar-title-row {
    margin-bottom: 12px;
  }
  .sidebar-title-row h1 {
    font-size: 22px;
  }
  .stories-section {
    padding-top: 0;
    padding-bottom: 12px;
  }
  .stories-head {
    display: none;
  }
  .stories-strip {
    gap: 12px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .conversation-stories {
    gap: 12px;
  }
  .story-card {
    width: 82px;
    flex: 0 0 82px;
    gap: 7px;
    font-size: 12px;
  }
  .story-avatar {
    width: 76px;
    height: 76px;
    padding: 3px;
  }
  .story-avatar img {
    width: 68px;
    height: 68px;
  }
  .conversation-tabs {
    padding: 8px 10px;
  }
  .conversation-list {
    padding: 0 5px 72px;
  }
  .conversation-item {
    min-height: 66px;
  }
  .conversation-avatar {
    width: 46px;
    height: 46px;
  }
  .chat-header {
    height: 59px;
    min-height: 59px;
    padding: 0 7px;
  }
  .mobile-back {
    display: grid;
  }
  .chat-avatar {
    width: 38px;
    height: 38px;
  }
  .chat-header-actions {
    gap: 0;
  }
  .chat-header-actions .icon-btn {
    width: 34px;
    height: 34px;
  }
  .chat-search-btn {
    display: none;
  }
  .messages-box {
    padding: 11px 8px 14px;
  }
  .message-bubble {
    max-width: 87%;
    font-size: 12px;
  }
  .composer {
    position: relative;
    min-height: 60px;
    padding: 7px 8px max(7px, env(safe-area-inset-bottom));
    gap: 4px;
    align-items: center;
    background: #efeae2;
    border: 0;
    box-shadow: none;
  }
  .composer-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
  }
  .composer #pickerToggleBtn {
    order: 1;
  }
  .composer-input-wrap {
    order: 2;
    border-radius: 24px;
    padding: 2px 104px 2px 14px;
    background: #f0f2f5;
  }
  .composer .add-attachment,
  .composer .composer-camera {
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
  }
  .composer .add-attachment {
    right: 66px;
  }
  .composer .composer-camera {
    right: 104px;
  }
  .composer .attachment-wrap {
    order: 6;
  }
  .composer .mic-btn {
    order: 5;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 50%;
    background: transparent;
    color: #526174;
    box-shadow: none;
  }
  .composer .mic-btn:hover,
  .composer .mic-btn:active {
    background: rgba(22, 113, 232, 0.08);
    color: var(--aift);
  }
  .composer .mic-btn svg {
    width: 25px;
    height: 25px;
    stroke-width: 1.9;
  }
  .composer .send-btn {
    order: 6;
    width: 42px;
    height: 42px;
    display: none;
  }
  .composer.has-content .mic-btn {
    display: none;
  }
  .composer.has-content .send-btn {
    display: grid;
  }
  .composer.has-content .composer-camera {
    display: none;
  }
  .composer.has-content .composer-input-wrap {
    padding-right: 56px;
  }
  .composer.has-content .add-attachment {
    right: 62px;
  }
  .attachment-menu {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 66px;
    width: auto;
  }
  .chat-picker {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: none;
    height: clamp(280px, 42dvh, 390px);
    flex: 0 0 clamp(280px, 42dvh, 390px);
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    z-index: 25;
  }
  .chat-panel.picker-open .messages-box {
    scroll-behavior: auto;
  }
  .drawer-panel {
    width: 100%;
  }
  .jump-bottom {
    right: 11px;
    bottom: 69px;
  }
  .reply-bar,
  .attachment-preview {
    margin: 0;
  }
  .typing-indicator {
    margin-left: 8px;
  }
  .media-viewer-content {
    padding: 48px 10px;
  }
  .emoji-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
  .asset-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .story-compose-card {
    display: block;
    position: relative;
    height: 100dvh;
    overflow: hidden;
  }
  .story-compose-head {
    height: 58px;
    padding: 0 12px;
  }
  .story-compose-head span {
    display: none;
  }
  .story-compose-preview {
    position: absolute;
    inset: 58px 0 74px;
    width: 100%;
    height: auto;
    max-width: none;
    margin: 0;
    border: 0 !important;
    border-radius: 0;
    aspect-ratio: auto;
  }
  .story-compose-card > textarea {
    position: absolute;
    left: 12px;
    right: 72px;
    bottom: 84px;
    width: auto;
    min-height: 42px;
    max-height: 110px;
    margin: 0;
    z-index: 15;
    background: rgba(10, 15, 24, 0.82);
    backdrop-filter: blur(10px);
  }
  .story-compose-controls {
    position: absolute;
    right: 10px;
    top: 72px;
    width: 52px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: transparent;
    z-index: 18;
  }
  .story-compose-card > textarea + .story-compose-controls,
  .story-compose-card
    > textarea
    + .story-compose-controls
    + .story-compose-controls {
    margin: 0;
    padding: 0;
    top: 72px;
  }
  .story-compose-card
    > textarea
    + .story-compose-controls
    + .story-compose-controls {
    top: 340px;
  }
  .story-file-button {
    width: 46px;
    min-width: 46px;
    min-height: 46px;
    flex: 0 0 46px;
    padding: 0;
    border-radius: 50%;
    background: rgba(10, 15, 24, 0.72);
    backdrop-filter: blur(10px);
  }
  .story-file-button span {
    display: none;
  }
  .story-compose-controls select,
  #storyColor,
  #storyFontSize {
    width: 46px;
    min-width: 46px;
  }
  .story-compose-card > .story-compose-controls:has(#storyAudience) {
    position: absolute;
    left: 12px;
    right: 126px;
    top: auto;
    bottom: 14px;
    width: auto;
    padding: 0;
    border: 0;
    z-index: 20;
  }
  .story-compose-card > .story-compose-controls:has(#storyAudience) select {
    width: 100%;
    height: 44px;
    background: rgba(10, 15, 24, 0.82);
  }
  .story-compose-actions {
    position: absolute;
    right: 12px;
    bottom: 14px;
    padding: 0;
    border: 0;
    background: transparent;
    z-index: 21;
  }
  .story-compose-actions .btn {
    display: none;
  }
  .story-publish-btn {
    height: 44px;
    padding: 0 16px;
  }
  .story-compose-card #storyMusicStatus {
    right: 70px;
    left: 12px;
    top: auto;
    bottom: 136px;
    width: auto;
  }
  .story-compose-card #storyTagPanel {
    left: 12px;
    right: 70px;
    top: 76px;
    width: auto;
  }
  .story-viewer-shell {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }
  .story-viewer-close {
    top: max(14px, env(safe-area-inset-top));
    right: 12px;
  }
  .story-viewer-content > img,
  .story-viewer-content > video {
    object-fit: cover;
  }
  .story-owner-footer {
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
  .story-viewer {
    padding: 0;
  }
  .message-row.selected {
    align-self: stretch;
    width: auto;
    margin-left: -8px;
    margin-right: -8px;
    padding-left: 8px;
    padding-right: 8px;
    background: rgba(22, 113, 232, 0.1);
  }
  .message-action-bar {
    left: 0;
    right: 0;
    top: 0;
    height: 59px;
    padding: 0 7px;
    gap: 7px;
    overflow: visible;
  }
  .message-action-bar > button,
  .selection-actions > button {
    width: 37px;
    height: 37px;
  }
  .message-action-bar > strong {
    font-size: 17px;
  }
  .selection-actions {
    gap: 0;
  }
  .selection-more-menu {
    top: 53px;
    right: 7px;
  }
  .chat-more-menu {
    top: 55px;
    right: 7px;
    width: 270px;
  }
}
/* AIFT chat themes: the existing light design is the default. */
.chat-panel[data-chat-theme="dark"] {
  background: #111827;
  color: #f8fafc;
}
.chat-panel[data-chat-theme="dark"] .chat-header {
  background: #172033;
  border-bottom-color: #2b3648;
  color: #f8fafc;
}
.chat-panel[data-chat-theme="dark"] .chat-title h1 {
  color: #f8fafc;
}
.chat-panel[data-chat-theme="dark"] .chat-title p {
  color: #9aa7b8;
}
.chat-panel[data-chat-theme="dark"] .chat-header .icon-btn,
.chat-panel[data-chat-theme="dark"] .mobile-back {
  color: #d7deea;
}
.chat-panel[data-chat-theme="dark"] .active-online-dot {
  border-color: #172033;
}
.chat-panel[data-chat-theme="dark"] .messages-box {
  background-color: #111827;
  background-image:
    linear-gradient(135deg, rgba(55, 115, 220, 0.045) 25%, transparent 25%),
    linear-gradient(225deg, rgba(55, 115, 220, 0.045) 25%, transparent 25%),
    linear-gradient(45deg, rgba(55, 115, 220, 0.045) 25%, transparent 25%),
    linear-gradient(315deg, rgba(55, 115, 220, 0.045) 25%, #111827 25%);
  background-position:
    18px 0,
    18px 0,
    0 0,
    0 0;
  background-size: 36px 36px;
}
.chat-panel[data-chat-theme="dark"] .message-bubble {
  color: #f8fafc;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.chat-panel[data-chat-theme="dark"] .message-bubble.me {
  background: #2457a6;
  border-color: #356bc2;
}
.chat-panel[data-chat-theme="dark"] .message-bubble.other {
  background: #253044;
  border-color: #344158;
}
.chat-panel[data-chat-theme="dark"] .message-meta,
.chat-panel[data-chat-theme="dark"] .message-time {
  color: #a8b3c4;
}
.chat-panel[data-chat-theme="dark"] .status-read {
  color: #78b7ff;
}
.chat-panel[data-chat-theme="dark"] .day-divider {
  background: #253044;
  border-color: #344158;
  color: #c6cfdb;
}
.chat-panel[data-chat-theme="dark"] .message-row.selected {
  background: rgba(74, 144, 245, 0.18);
}
.chat-panel[data-chat-theme="dark"] .composer {
  background: #111827;
  border-top-color: #273449;
}
.chat-panel[data-chat-theme="dark"] .composer-input-wrap,
.chat-panel[data-chat-theme="dark"] .composer-input-wrap:focus-within {
  background: #253044;
  border-color: #344158;
  box-shadow: none;
}
.chat-panel[data-chat-theme="dark"] .composer textarea {
  color: #f8fafc;
}
.chat-panel[data-chat-theme="dark"] .composer textarea::placeholder {
  color: #98a5b7;
}
.chat-panel[data-chat-theme="dark"] .composer-icon {
  color: #b8c2d1;
}
.chat-panel[data-chat-theme="dark"] .composer .mic-btn {
  background: transparent;
  color: #b8c2d1;
}
.chat-panel[data-chat-theme="dark"] .message-action-bar {
  background: #172033;
  border-bottom-color: #2b3648;
  color: #f8fafc;
  box-shadow: none;
}
.chat-panel[data-chat-theme="dark"] .message-action-bar > button,
.chat-panel[data-chat-theme="dark"] .selection-actions > button {
  color: #d7deea;
}
.chat-panel[data-chat-theme="dark"] .message-action-bar button:hover {
  background: rgba(255, 255, 255, 0.08);
}
.chat-panel[data-chat-theme="dark"] .message-action-bar > strong {
  color: #f8fafc;
}
.chat-panel[data-chat-theme="dark"] ~ .selection-more-menu,
.chat-panel[data-chat-theme="dark"] .selection-more-menu,
body:has(.chat-panel[data-chat-theme="dark"]) .chat-more-menu {
  background: #253044;
  border-color: #344158;
  color: #f8fafc;
}
.chat-panel[data-chat-theme="dark"] .selection-more-menu button,
body:has(.chat-panel[data-chat-theme="dark"]) .chat-more-menu button {
  background: #253044;
  color: #f8fafc;
}
.chat-panel[data-chat-theme="dark"] .selection-more-menu button:hover,
body:has(.chat-panel[data-chat-theme="dark"]) .chat-more-menu button:hover {
  background: #303d52;
}
body:has(.chat-panel[data-chat-theme="dark"]) .message-delete-card {
  background: #172033;
  color: #f8fafc;
}
body:has(.chat-panel[data-chat-theme="dark"]) .message-delete-title {
  color: #a8b3c4;
}
body:has(.chat-panel[data-chat-theme="dark"]) .message-delete-card button {
  background: #172033;
  color: #6ca8ff;
}

@media (max-width: 430px) {
  .chat-header-actions .icon-btn:nth-of-type(3) {
    display: none;
  }
  .conversation-tabs button {
    padding: 0 10px;
  }
  .message-bubble {
    max-width: 90%;
  }
  .story-card {
    width: 80px;
    flex: 0 0 80px;
  }
  .story-avatar {
    width: 74px;
    height: 74px;
  }
  .story-avatar img {
    width: 66px;
    height: 66px;
  }
}

/* AIFT Story Studio */
/* AIFT Story Studio — isolated from the Messages workspace. */
#storyComposer {
  background: #05070b !important;
  padding: 0 !important;
  place-items: stretch !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
}
#storyComposer * {
  -webkit-tap-highlight-color: transparent !important;
}
#storyComposer .story-compose-card {
  position: relative !important;
  width: 100% !important;
  height: 100dvh !important;
  max-height: none !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  background: #05070b !important;
  box-shadow: none !important;
  color: #fff !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}
#storyComposer .story-compose-head {
  position: absolute !important;
  inset: 0 0 auto 0 !important;
  height: 64px !important;
  padding: 0 14px !important;
  border: 0 !important;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.55),
    rgba(0, 0, 0, 0.12),
    transparent
  ) !important;
  z-index: 50 !important;
  pointer-events: none !important;
}
#storyComposer .story-compose-head > div {
  display: none !important;
}
#storyComposer .story-compose-head button {
  pointer-events: auto !important;
  width: 42px !important;
  height: 42px !important;
  margin-left: auto !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: rgba(10, 15, 24, 0.46) !important;
  color: #fff !important;
  backdrop-filter: blur(14px) !important;
}
#storyComposer .story-compose-head button svg {
  width: 22px !important;
  height: 22px !important;
}
#storyComposer .story-compose-preview {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  aspect-ratio: auto !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}
#storyComposer .story-compose-preview:before,
#storyComposer .story-compose-preview:after {
  display: none !important;
  content: none !important;
}
#storyComposer .story-trim-panel {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: calc(102px + env(safe-area-inset-bottom));
  z-index: 42;
  padding: 6px 6px 7px;
  border: 0;
  border-radius: 11px;
  background: rgba(9, 13, 18, 0.82);
  color: #fff;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  touch-action: none;
}
#storyComposer .story-trim-panel.hidden {
  display: none !important;
}
#storyComposer.story-uploading .story-compose-card::after {
  content: "Uploading story…";
  position: absolute;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.01em;
  background: rgba(4, 8, 13, 0.52);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: all;
}
#storyComposer.story-uploading .story-trim-panel,
#storyComposer.story-uploading .story-compose-controls {
  pointer-events: none !important;
}
#storyComposer .story-trim-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  margin-top: 5px;
  padding: 3px 8px 3px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
}
#storyComposer .story-trim-audio {
  display: grid;
  width: 23px;
  height: 23px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  place-items: center;
  cursor: pointer;
}
#storyComposer .story-trim-audio svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#storyComposer .story-trim-audio .story-audio-slash {
  display: none;
}
#storyComposer .story-trim-audio.muted .story-audio-waves {
  display: none;
}
#storyComposer .story-trim-audio.muted .story-audio-slash {
  display: block;
}
#storyComposer .story-trim-range {
  position: relative;
  height: 42px;
  overflow: hidden;
  border-radius: 7px;
  background: #20252b;
}
#storyComposer .story-trim-frames {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  overflow: hidden;
}
#storyComposer .story-trim-frames img,
#storyComposer .story-trim-frames i {
  width: 100%;
  height: 42px;
  object-fit: cover;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, #303740, #1b2026);
}
#storyComposer .story-trim-selection {
  position: absolute;
  top: 0;
  bottom: 0;
  border-top: 2px solid #fff;
  border-bottom: 2px solid #fff;
  content: "";
}
#storyComposer .story-trim-selection {
  background: transparent;
  box-shadow:
    -100vw 0 0 100vw rgba(0, 0, 0, 0.52),
    100vw 0 0 100vw rgba(0, 0, 0, 0.52);
}
#storyComposer .story-trim-playhead {
  position: absolute;
  top: 2px;
  bottom: 2px;
  z-index: 3;
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}
#storyComposer .story-trim-range input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 42px;
  margin: 0;
  border: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;
}
#storyComposer .story-trim-range input::-webkit-slider-thumb {
  width: 24px;
  height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: auto;
}
#storyComposer #storyTrimStart::-webkit-slider-thumb {
  box-shadow: inset 4px 0 0 #fff;
}
#storyComposer #storyTrimEnd::-webkit-slider-thumb {
  box-shadow: inset -4px 0 0 #fff;
}
#storyComposer .story-trim-range input::-moz-range-thumb {
  width: 24px;
  height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  pointer-events: auto;
}
#storyComposer #storyTrimStart::-moz-range-thumb {
  box-shadow: inset 4px 0 0 #fff;
}
#storyComposer #storyTrimEnd::-moz-range-thumb {
  box-shadow: inset -4px 0 0 #fff;
}
#storyComposer .story-compose-preview img,
#storyComposer .story-compose-preview video,
#storyComposer [data-story-media] {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  filter: none !important;
  -webkit-filter: none !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-user-drag: none !important;
  user-drag: none !important;
  touch-action: none !important;
  pointer-events: auto !important;
}
#storyComposer #storyPreview [data-story-layer] {
  width: max-content !important;
  min-width: 0 !important;
  max-width: none !important;
  box-sizing: border-box !important;
  white-space: pre !important;
  overflow: visible !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  touch-action: none !important;
  transform-origin: center center !important;
  will-change: left, top, transform !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}
#storyComposer #storyPreview [data-story-layer] * {
  max-width: none !important;
}
#storyComposer > .story-compose-card > textarea {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  width: min(82vw, 460px) !important;
  min-height: 44px !important;
  max-height: 180px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #fff !important;
  text-align: center !important;
  font-size: 25px !important;
  font-weight: 800 !important;
  line-height: 1.18 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 60 !important;
  resize: none !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28) !important;
  outline: 0 !important;
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
}
#storyComposer:not(.story-text-editing) > .story-compose-card > textarea {
  opacity: 0 !important;
  pointer-events: none !important;
}
#storyComposer.story-text-editing > .story-compose-card > textarea {
  opacity: 1 !important;
  pointer-events: auto !important;
}
#storyComposer.story-text-editing #storyPreview [data-story-layer] {
  visibility: hidden !important;
}
#storyComposer.story-text-editing .story-compose-head,
#storyComposer.story-text-editing .story-compose-controls,
#storyComposer.story-text-editing .story-compose-actions,
#storyComposer.story-text-editing #storyTrimPanel,
#storyComposer.story-text-editing #storyMusicStatus,
#storyComposer.story-text-editing #storyTagPanel,
#storyComposer.story-text-editing #storyDeleteZone {
  display: none !important;
}
#storyComposer.story-text-editing > .story-compose-card > textarea:focus {
  outline: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
#storyComposer .story-compose-controls {
  position: absolute !important;
  right: 12px !important;
  top: 78px !important;
  width: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  background: transparent !important;
  z-index: 36 !important;
}
#storyComposer .story-compose-card > textarea + .story-compose-controls {
  top: 78px !important;
}
#storyComposer .story-file-button {
  width: 46px !important;
  min-width: 46px !important;
  max-width: 46px !important;
  height: 46px !important;
  min-height: 46px !important;
  flex: 0 0 46px !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 50% !important;
  background: rgba(8, 12, 20, 0.58) !important;
  color: #fff !important;
  display: grid !important;
  place-items: center !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
  backdrop-filter: blur(14px) !important;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease !important;
}
#storyComposer .story-file-button:hover,
#storyComposer .story-file-button:active {
  background: rgba(8, 12, 20, 0.82) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  transform: scale(0.96) !important;
}
#storyComposer .story-file-button svg {
  width: 21px !important;
  height: 21px !important;
}
#storyComposer .story-file-button span {
  display: none !important;
}
#storyComposer button[onclick*="addStoryTextLayer('caption')"],
#storyComposer button[onclick*='addStoryTextLayer("caption")'] {
  display: none !important;
}
#storyComposer
  .story-compose-card
  > textarea
  + .story-compose-controls
  + .story-compose-controls {
  display: none !important;
}
#storyComposer #storyMusicStatus {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}
#storyComposer #storyTagPanel {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: auto !important;
  bottom: 0 !important;
  transform: none !important;
  width: 100% !important;
  height: min(62dvh, 520px) !important;
  max-height: min(62dvh, 520px) !important;
  padding: 10px 14px max(14px, env(safe-area-inset-bottom)) !important;
  border: 0 !important;
  border-radius: 24px 24px 0 0 !important;
  background: rgba(16, 18, 22, 0.97) !important;
  box-shadow: 0 -18px 54px rgba(0, 0, 0, 0.42) !important;
  z-index: 2147483001 !important;
  backdrop-filter: blur(20px) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  color: #fff !important;
}
#storyComposer #storyTagPanel.hidden {
  display: none !important;
}
#storyComposer.story-tag-searching .story-compose-head,
#storyComposer.story-tag-searching .story-compose-controls,
#storyComposer.story-tag-searching .story-compose-actions,
#storyComposer.story-tag-searching #storyMusicStatus {
  display: none !important;
}
#storyComposer .story-tag-head {
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex: 0 0 42px !important;
}
#storyComposer .story-tag-head strong {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #fff !important;
}
#storyComposer .story-tag-head button {
  width: 40px !important;
  height: 40px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  display: grid !important;
  place-items: center !important;
}
#storyComposer .story-tag-head svg {
  width: 22px !important;
  height: 22px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
}
#storyComposer #storyTagPanel .search-box {
  height: 46px !important;
  flex: 0 0 46px !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 15px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}
#storyComposer #storyTagPanel .search-box input {
  height: 44px !important;
  background: transparent !important;
  color: #fff !important;
  font-size: 16px !important;
}
#storyComposer #storyTagPanel .search-box input::placeholder {
  color: rgba(255, 255, 255, 0.58) !important;
}
#storyComposer #storyTagResults {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  padding: 2px 0 !important;
}
#storyComposer #storyTagResults .conversation-item {
  width: 100% !important;
  min-height: 62px !important;
  margin: 0 !important;
  padding: 8px 4px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  text-align: left !important;
}
#storyComposer #storyTagResults .conversation-avatar {
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}
#storyComposer #storyTagResults .conversation-name {
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}
#storyComposer #storyTagResults .conversation-preview {
  color: rgba(255, 255, 255, 0.62) !important;
  font-size: 12px !important;
}
#storyComposer
  .story-compose-card
  > .story-compose-controls:has(#storyAudience) {
  position: absolute !important;
  left: 14px !important;
  right: 120px !important;
  top: auto !important;
  bottom: max(14px, env(safe-area-inset-bottom)) !important;
  width: auto !important;
  height: 46px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  z-index: 44 !important;
}
#storyComposer
  .story-compose-card
  > .story-compose-controls:has(#storyAudience)
  select {
  width: 100% !important;
  max-width: none !important;
  height: 46px !important;
  padding: 0 15px !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 23px !important;
  background: rgba(8, 12, 20, 0.72) !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  backdrop-filter: blur(16px) !important;
}
#storyComposer .story-compose-actions {
  position: absolute !important;
  right: 14px !important;
  bottom: max(14px, env(safe-area-inset-bottom)) !important;
  left: auto !important;
  width: auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  z-index: 45 !important;
}
#storyComposer .story-compose-actions .btn {
  display: none !important;
}
#storyComposer .story-publish-btn {
  height: 46px !important;
  padding: 0 20px !important;
  border: 0 !important;
  border-radius: 23px !important;
  background: #1671e8 !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  box-shadow: 0 8px 26px rgba(22, 113, 232, 0.36) !important;
}
#storyDeleteZone {
  position: fixed !important;
  left: 50% !important;
  bottom: max(84px, calc(env(safe-area-inset-bottom) + 70px)) !important;
  z-index: 1000002 !important;
  width: 64px !important;
  height: 64px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: translate(-50%, 24px) scale(0.8) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  background: rgba(22, 22, 22, 0.72) !important;
  transition: 0.12s ease !important;
}
#storyDeleteZone.active {
  opacity: 1 !important;
  transform: translate(-50%, 0) scale(1) !important;
}
#storyDeleteZone.hot {
  background: #e32636 !important;
  transform: translate(-50%, 0) scale(1.14) !important;
}
#storyDeleteZone svg {
  width: 30px !important;
  height: 30px !important;
  fill: none !important;
  stroke: #fff !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
/* Instagram-style mobile typography editor: fixed above the keyboard with horizontal option rails. */
#aiftStoryStylePanel {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  top: auto !important;
  bottom: 0 !important;
  transform: none !important;
  width: 100% !important;
  max-width: none !important;
  height: 134px !important;
  max-height: 134px !important;
  overflow: visible !important;
  overscroll-behavior: none !important;
  margin: 0 !important;
  padding: 0 0 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 2147483000 !important;
  touch-action: manipulation !important;
  color: #fff !important;
}
#aiftStoryStylePanel.hidden {
  display: none !important;
}
#aiftStoryStylePanel:not(.hidden) {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
#aiftStoryStylePanel .aift-story-panel-head {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: var(--story-done-top, -44px) !important;
  height: 40px !important;
  padding: 0 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  background: transparent !important;
}
#aiftStoryStylePanel .aift-story-panel-head button {
  border: 0 !important;
  background: transparent !important;
  color: #fff !important;
  font:
    800 17px/40px Arial,
    sans-serif !important;
  padding: 0 2px !important;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.45) !important;
}
#aiftStoryStylePanel .aift-story-fonts {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  height: 64px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 7px 16px !important;
  background: rgba(20, 20, 22, 0.34) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  scroll-snap-type: x proximity !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x !important;
  scrollbar-width: none !important;
}
#aiftStoryStylePanel .aift-story-fonts::-webkit-scrollbar,
#aiftStoryStylePanel .aift-story-options::-webkit-scrollbar {
  display: none !important;
}
#aiftStoryStylePanel .aift-story-font {
  flex: 0 0 auto !important;
  height: 46px !important;
  min-width: 112px !important;
  padding: 0 17px !important;
  border: 1px solid rgba(255, 255, 255, 0.17) !important;
  border-radius: 15px !important;
  background: rgba(20, 20, 22, 0.28) !important;
  color: #fff !important;
  font-size: 16px !important;
  scroll-snap-align: center !important;
  white-space: nowrap !important;
}
#aiftStoryStylePanel .aift-story-font.active {
  background: #fff !important;
  color: #111 !important;
  border-color: #fff !important;
  font-weight: 800 !important;
}
#aiftStoryStylePanel .aift-story-options {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 64px !important;
  height: 70px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 9px 16px !important;
  background: rgba(20, 20, 22, 0.82) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x !important;
  scrollbar-width: none !important;
}
#aiftStoryStylePanel .aift-story-tools,
#aiftStoryStylePanel .aift-story-swatches,
#aiftStoryStylePanel .aift-story-bg {
  display: flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  gap: 10px !important;
  padding: 0 !important;
  overflow: visible !important;
}
#aiftStoryStylePanel .aift-story-tool {
  width: 48px !important;
  height: 48px !important;
  flex: 0 0 48px !important;
  border: 0 !important;
  border-radius: 13px !important;
  background: rgba(255, 255, 255, 0.13) !important;
  color: #fff !important;
  display: grid !important;
  place-items: center !important;
  font-size: 18px !important;
}
#aiftStoryStylePanel .aift-story-tool.active {
  background: rgba(255, 255, 255, 0.28) !important;
  color: #fff !important;
}
#aiftStoryStylePanel .aift-story-tool svg {
  width: 25px !important;
  height: 25px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
#aiftStoryStylePanel .aift-story-swatch {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border: 2px solid #fff !important;
  border-radius: 50% !important;
  padding: 0 !important;
}
#aiftStoryStylePanel .aift-story-bg button {
  height: 40px !important;
  flex: 0 0 auto !important;
  padding: 0 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  font:
    700 11px Arial,
    sans-serif !important;
  white-space: nowrap !important;
}
#aiftStoryStylePanel .aift-story-bg button.active {
  background: #fff !important;
  color: #111 !important;
}
#aiftStoryMusicPanel:not(.hidden) {
  display: block !important;
  pointer-events: auto !important;
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: max(12px, env(safe-area-inset-bottom)) !important;
  transform: translateX(-50%) !important;
  width: min(430px, calc(100vw - 24px)) !important;
  max-height: min(72dvh, 560px) !important;
  padding: 18px !important;
  border-radius: 24px !important;
  background: rgba(17, 19, 24, 0.96) !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55) !important;
  backdrop-filter: blur(22px) !important;
  -webkit-backdrop-filter: blur(22px) !important;
  overflow: auto !important;
  z-index: 2147483644 !important;
  color: #fff !important;
}
#aiftStoryMusicPanel .aift-story-panel-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin-bottom: 15px !important;
}
#aiftStoryMusicPanel .aift-story-panel-head > div {
  display: grid !important;
  gap: 3px !important;
}
#aiftStoryMusicPanel .aift-story-panel-head strong {
  font-size: 18px !important;
}
#aiftStoryMusicPanel .aift-story-panel-head span {
  font-size: 12px !important;
  color: rgba(255, 255, 255, 0.62) !important;
}
#aiftStoryMusicPanel .aift-story-panel-head button {
  border: 0 !important;
  background: transparent !important;
  color: #fff !important;
  font-weight: 800 !important;
}
#aiftStoryMusicPanel .aift-story-music-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
}
#aiftStoryMusicPanel .aift-story-music-actions button {
  height: 78px !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  display: grid !important;
  place-content: center !important;
  gap: 6px !important;
  font-weight: 800 !important;
}
#aiftStoryMusicPanel .aift-story-music-actions svg {
  width: 25px !important;
  height: 25px !important;
  justify-self: center !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
#aiftStoryMusicPanel [data-story-music-record].recording {
  background: #ed4956 !important;
  border-color: #ed4956 !important;
}
#aiftStoryMusicPanel .aift-story-record-status {
  min-height: 18px !important;
  margin: 2px 0 10px !important;
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: 12px !important;
  text-align: center !important;
}
#aiftStoryMusicPanel audio {
  display: block !important;
  width: 100% !important;
  height: 38px !important;
  margin-bottom: 12px !important;
}
#aiftStoryMusicPanel .aift-story-row {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) 54px !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 10px 0 !important;
}
#aiftStoryMusicPanel .aift-story-row label,
#aiftStoryMusicPanel .aift-story-time {
  font-size: 11px !important;
}
#aiftStoryMusicPanel .aift-story-time {
  text-align: right !important;
  color: rgba(255, 255, 255, 0.72) !important;
}
#storyViewer,
#storyViewer * {
  -webkit-tap-highlight-color: transparent !important;
}
#storyViewer {
  background: #05070b !important;
  padding: 0 !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}
#storyViewer .story-viewer-shell {
  background: #0b1019 !important;
  overflow: hidden !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
}
#storyViewer .story-viewer-content {
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}
#storyViewer .story-viewer-content img,
#storyViewer .story-viewer-content video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-user-drag: none !important;
  user-drag: none !important;
  pointer-events: none !important;
}
#storyViewer .story-viewer-content > div {
  width: max-content !important;
  min-width: 0 !important;
  max-width: none !important;
  white-space: pre !important;
  overflow: visible !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  box-sizing: border-box !important;
  transform-origin: center center !important;
}
#storyViewer .story-progress {
  z-index: 30 !important;
  left: 0 !important;
  right: 0 !important;
  top: max(9px, env(safe-area-inset-top)) !important;
  gap: 3px !important;
}
#storyViewer .story-progress span {
  border-radius: 0 !important;
}
#storyViewer .story-viewer-head {
  position: absolute !important;
  z-index: 31 !important;
  left: 14px !important;
  right: 54px !important;
  top: max(22px, calc(env(safe-area-inset-top) + 15px)) !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) !important;
  align-items: center !important;
  column-gap: 9px !important;
  max-width: none !important;
}
#storyViewer .story-viewer-head > img {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 1.5px solid rgba(255, 255, 255, 0.95) !important;
  background: #273244 !important;
}
#storyViewer .story-viewer-head > div {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 7px !important;
  flex-wrap: nowrap !important;
  overflow: hidden !important;
}
#storyViewer .story-viewer-head strong {
  font-size: 14px !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
  color: #fff !important;
  max-width: min(190px, 55vw) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.42) !important;
}
#storyViewer .story-viewer-head span {
  font-size: 12px !important;
  line-height: 1.15 !important;
  color: rgba(255, 255, 255, 0.72) !important;
  white-space: nowrap !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.42) !important;
}
#storyViewer .story-nav {
  z-index: 12 !important;
  background: transparent !important;
  -webkit-tap-highlight-color: transparent !important;
  outline: none !important;
}
#storyViewer .story-nav:focus,
#storyViewer .story-nav:active {
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}
#storyViewer .story-owner-footer {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.88)) !important;
  padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
}
#storyViewer .story-owner-footer button {
  min-height: 42px !important;
}
#storyViewer #storyLikeBtn {
  transition:
    transform 0.16s ease,
    color 0.16s ease,
    background 0.16s ease !important;
}
#storyViewer #storyLikeBtn.active {
  color: #e93b77 !important;
  background: rgba(233, 59, 119, 0.14) !important;
}
#storyViewer #storyLikeBtn.active svg {
  fill: currentColor !important;
  stroke: currentColor !important;
}
#storyViewer.paused .story-progress span.active i {
  animation-play-state: paused !important;
}
#storyViewer.paused .story-progress,
#storyViewer.paused .story-viewer-head,
#storyViewer.paused .story-viewer-close,
#storyViewer.paused .story-owner-footer,
#storyViewer.paused #storyViewerActions,
#storyViewer.paused .story-reply-footer,
#storyViewer.paused #storyViewerTrack,
#storyViewer.paused .story-music {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.08s ease !important;
}
#storyViewer.paused .story-nav {
  background: transparent !important;
}
#storyViewer #storyViewerTrack {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  width: auto !important;
  max-width: 112px !important;
  height: 17px !important;
  min-height: 17px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  z-index: auto !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45) !important;
  flex: 0 1 auto !important;
}
#storyViewer #storyViewerTrack.hidden {
  display: none !important;
}
#storyViewer #storyViewerTrack audio {
  display: none !important;
}
#storyViewer #storyViewerTrack strong {
  display: block !important;
  min-width: 0 !important;
  max-width: 78px !important;
  font-size: 10px !important;
  line-height: 17px !important;
  font-weight: 800 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: clip !important;
}
#storyViewer .story-music-equalizer {
  display: inline-flex !important;
  align-items: flex-end !important;
  gap: 2px !important;
  width: 12px !important;
  height: 10px !important;
  flex: 0 0 12px !important;
}
#storyViewer .story-music-equalizer i {
  display: block !important;
  width: 2px !important;
  height: 100% !important;
  border-radius: 2px !important;
  background: #fff !important;
  animation: aiftStoryMusicBars 0.68s ease-in-out infinite alternate !important;
}
#storyViewer .story-music-equalizer i:nth-child(2) {
  height: 65% !important;
  animation-delay: -0.22s !important;
}
#storyViewer .story-music-equalizer i:nth-child(3) {
  height: 82% !important;
  animation-delay: -0.41s !important;
}
@keyframes aiftStoryMusicBars {
  0% {
    transform: scaleY(0.45);
  }
  100% {
    transform: scaleY(1);
  }
}
body:has(#storyViewer:not(.hidden)) #confirmModal {
  z-index: 2147483640 !important;
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 0 10px max(10px, env(safe-area-inset-bottom)) !important;
  background: rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: blur(2px) !important;
  -webkit-backdrop-filter: blur(2px) !important;
}
body:has(#storyViewer:not(.hidden)) #confirmModal .modal-card {
  width: min(430px, 100%) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 24px !important;
  background: #fff !important;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35) !important;
  overflow: hidden !important;
  animation: none !important;
}
body:has(#storyViewer:not(.hidden)) #confirmModal .modal-head {
  display: block !important;
  padding: 20px 22px 8px !important;
  text-align: center !important;
  border: 0 !important;
}
body:has(#storyViewer:not(.hidden)) #confirmModal .modal-head h3 {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #111 !important;
  margin: 0 !important;
}
body:has(#storyViewer:not(.hidden)) #confirmModal .modal-close {
  display: none !important;
}
body:has(#storyViewer:not(.hidden)) #confirmModal .modal-text {
  padding: 0 24px 18px !important;
  margin: 0 !important;
  text-align: center !important;
  color: #737373 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}
body:has(#storyViewer:not(.hidden)) #confirmModal .modal-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  padding: 0 !important;
  border-top: 1px solid #e9e9e9 !important;
}
body:has(#storyViewer:not(.hidden)) #confirmModal .modal-actions .btn {
  width: 100% !important;
  min-height: 52px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}
body:has(#storyViewer:not(.hidden)) #confirmModal .modal-actions .danger {
  color: #ed4956 !important;
  border-bottom: 1px solid #e9e9e9 !important;
  order: 1 !important;
}
body:has(#storyViewer:not(.hidden)) #confirmModal .modal-actions .ghost {
  color: #111 !important;
  order: 2 !important;
}
#storyViewersModal {
  z-index: 2147483646 !important;
  position: fixed !important;
  inset: 0 !important;
}
#storyViewersModal .modal-card {
  position: relative !important;
  z-index: 1 !important;
  width: min(430px, 94vw) !important;
  max-height: min(76dvh, 680px) !important;
  border-radius: 22px !important;
  overflow: hidden !important;
}
#storyViewersModal .modal-head {
  padding: 18px 18px 12px !important;
}
#storyViewersModal #storyViewersList {
  overflow: auto !important;
  padding: 4px 10px 14px !important;
}
#storyViewersModal .story-viewer-row {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) 28px auto !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 62px !important;
  padding: 8px !important;
  border-radius: 14px !important;
}
#storyViewersModal .story-viewer-row > img {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}
#storyViewersModal .story-activity-heart {
  width: 26px !important;
  height: 26px !important;
  display: grid !important;
  place-items: center !important;
  color: #e93b77 !important;
}
#storyViewersModal .story-activity-message {
  height: 34px !important;
  padding: 0 13px !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 17px !important;
  background: #fff !important;
  color: #172033 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}
@media (min-width: 761px) {
  #storyComposer .story-compose-preview {
    inset: 18px auto 18px 50% !important;
    transform: translateX(-50%) !important;
    width: min(430px, calc((100dvh - 36px) * 0.5625)) !important;
    height: calc(100dvh - 36px) !important;
    border-radius: 20px !important;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.52) !important;
  }
  #storyComposer .story-compose-controls {
    right: calc(50% - 286px) !important;
  }
  #storyComposer
    .story-compose-card
    > .story-compose-controls:has(#storyAudience) {
    left: calc(50% - 205px) !important;
    right: calc(50% - 80px) !important;
  }
  #storyComposer .story-compose-actions {
    right: calc(50% - 205px) !important;
  }
}
@media (max-width: 760px) {
  #storyComposer .story-compose-card {
    display: block !important;
  }
  #storyComposer .story-compose-preview {
    inset: 0 !important;
  }
  #storyComposer .story-compose-head {
    height: 62px !important;
    padding-top: env(safe-area-inset-top) !important;
  }
  #storyComposer .story-compose-controls {
    right: 10px !important;
    top: max(72px, calc(env(safe-area-inset-top) + 64px)) !important;
  }
  #storyComposer.story-text-editing > .story-compose-card > textarea {
    top: 42% !important;
    width: min(88vw, 380px) !important;
  }
  #storyComposer
    .story-compose-card
    > .story-compose-controls:has(#storyAudience) {
    left: 12px !important;
    right: 118px !important;
  }
  #storyComposer .story-compose-actions {
    right: 12px !important;
  }
  #aiftStoryStylePanel {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 134px !important;
    max-height: 134px !important;
  }
  #storyViewer .story-viewer-shell {
    width: 100% !important;
    height: 100dvh !important;
    max-height: none !important;
    border-radius: 0 !important;
  }
  #storyViewer .story-viewer-close {
    top: max(12px, env(safe-area-inset-top)) !important;
  }
  #storyViewer .story-owner-footer {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  #storyViewersModal .story-viewer-row {
    display: flex !important;
  }
}
#storyViewer .story-viewer-head > div {
  overflow: hidden !important;
}
#storyViewer .story-viewer-head #storyViewerTrack {
  align-self: center !important;
}
body:has(#storyViewer:not(.hidden)) #cameraModal,
body:has(#storyViewer:not(.hidden)) #storyViewersModal,
body:has(#storyViewer:not(.hidden)) #confirmModal {
  z-index: 2147483646 !important;
}

/* Story user-to-user gesture stage */
#storyViewer .story-swipe-stage {
  position: absolute;
  inset: 0;
  z-index: 90;
  perspective: 900px;
  perspective-origin: 50% 50%;
  overflow: hidden;
  background: #05070b;
  touch-action: none;
}
#storyViewer .story-swipe-face {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
  pointer-events: none !important;
  border-radius: 0 !important;
}
#storyViewer .story-swipe-stage.settling .story-swipe-face {
  transition: transform 220ms cubic-bezier(0.22, 0.72, 0.2, 1);
}
#storyViewer .story-swipe-source-hidden {
  visibility: hidden !important;
}
#storyViewer.story-reply-open .story-viewer-head,
#storyViewer.story-reply-open .story-progress,
#storyViewer.story-reply-open .story-viewer-close {
  opacity: 0.28 !important;
  visibility: visible !important;
  transition: opacity 0.18s ease;
}
#storyViewer.paused.story-reply-open #storyViewerActions {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
#storyViewer.story-reply-open #storyViewerActions {
  left: 14px !important;
  right: 14px !important;
  width: auto !important;
  min-height: 62px !important;
  padding: 0 !important;
  background: transparent !important;
  z-index: 214 !important;
  align-items: center !important;
}
#storyViewer.story-reply-open #storyViewerActions > button {
  display: none !important;
}
#storyViewer.story-reply-open #storyReplyWrap {
  width: 100% !important;
  flex: 1 1 100% !important;
  gap: 8px !important;
  transform: none !important;
}
#storyViewer.story-reply-open #storyReplyInput {
  height: 58px !important;
  padding: 0 54px 0 20px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.82) !important;
  border-radius: 30px !important;
  background: rgba(0, 0, 0, 0.24) !important;
  color: #fff !important;
  font-size: 18px !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18) !important;
  caret-color: #fff !important;
}
#storyViewer.story-reply-open #storyReplyInput::placeholder {
  color: rgba(255, 255, 255, 0.94) !important;
}
#storyViewer.story-reply-open #storyReplyWrap > button {
  position: absolute !important;
  right: 9px !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #fff !important;
}

@media (max-width: 760px) {
  #aiftStoryMusicPanel:not(.hidden) {
    left: 8px !important;
    right: 8px !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    transform: none !important;
    width: auto !important;
    max-height: min(68dvh, 520px) !important;
    padding: 16px !important;
    border-radius: 22px !important;
    overflow-y: auto !important;
  }
  #aiftStoryMusicPanel .aift-story-music-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
  #aiftStoryMusicPanel .aift-story-music-actions button {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: 88px !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.1) !important;
  }
  #storyViewer .story-viewer-head > div {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 7px !important;
    flex-wrap: nowrap !important;
  }
  #storyViewer .story-viewer-head strong {
    flex: 0 1 auto !important;
    max-width: 42vw !important;
  }
  #storyViewer #storyViewerTime {
    flex: 0 0 auto !important;
  }
  #storyViewer #storyViewerTrack {
    position: relative !important;
    inset: auto !important;
    display: inline-flex !important;
    flex: 0 1 auto !important;
    margin: 0 !important;
    transform: none !important;
    vertical-align: middle !important;
  }
  #storyViewer #storyViewerTrack.hidden {
    display: none !important;
  }
}

/* Instagram-style Story replies */
.story-reply-row {
  margin: 10px 0 4px;
}
.story-reply-bubble {
  max-width: min(84%, 360px) !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
}
.story-reply-bubble.me {
  align-items: flex-end !important;
}
.story-reply-bubble.other {
  align-items: flex-start !important;
}
.story-reply-context {
  border: 0;
  text-align: left;
  color: inherit;
  font: inherit;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 100%;
}
.story-reply-bubble.me .story-reply-context {
  align-items: flex-end;
}
.story-reply-bubble.other .story-reply-context {
  align-items: flex-start;
}
.story-reply-direction {
  padding: 0 4px;
  color: #7d8796;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.3;
}
.story-reply-attachment {
  position: relative;
  width: 128px;
  height: 190px;
  border-radius: 18px;
  overflow: hidden;
  background: #18202c;
  color: #fff;
  isolation: isolate;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.14);
}
.story-reply-attachment > img,
.story-reply-attachment > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-reply-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #344054, #101828);
}
.story-reply-preview-shade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.58));
}
.story-reply-caption {
  position: absolute;
  z-index: 2;
  left: 9px;
  right: 9px;
  bottom: 9px;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-reply-unavailable {
  min-width: 174px;
  padding: 5px 7px 8px;
  border-left: 3px solid #d0d5dd;
  color: #7d8796;
  font-size: 12px;
  line-height: 1.3;
}
.story-reply-bubble.me .story-reply-unavailable {
  text-align: right;
  border-left: 0;
  border-right: 3px solid #d0d5dd;
}
.story-reply-text {
  max-width: 100%;
  padding: 10px 13px !important;
  border-radius: 17px;
  background: #fff;
  color: #101828;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
  font-size: 12px;
  line-height: 1.42;
}
.story-reply-bubble.me .story-reply-text {
  background: var(--aift);
  color: #fff;
  border-bottom-right-radius: 5px;
}
.story-reply-bubble.other .story-reply-text {
  border: 1px solid #e5eaf0;
  border-bottom-left-radius: 5px;
}
.story-reply-bubble .message-meta {
  align-self: flex-end;
  padding: 0 4px;
  color: #98a2b3;
}
.story-reply-bubble.other .message-meta {
  align-self: flex-start;
}
@media (max-width: 760px) {
  .story-reply-row {
    margin: 12px 0 5px;
  }
  .story-reply-bubble {
    max-width: 88% !important;
    gap: 6px !important;
  }
  .story-reply-direction {
    font-size: 12px;
  }
  .story-reply-attachment {
    width: 132px;
    height: 198px;
    border-radius: 19px;
  }
  .story-reply-unavailable {
    min-width: 184px;
    font-size: 13px;
  }
  .story-reply-text {
    font-size: 14px;
    padding: 10px 13px !important;
  }
}

/* Message reaction details and media review */
.message-reactions {
  cursor: pointer;
}
.message-reactions:active {
  transform: scale(0.96);
}
.reaction-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 275;
  display: flex;
  align-items: flex-end;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(4px);
}
.reaction-details-card {
  width: 100%;
  max-height: min(62dvh, 520px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -14px 38px rgba(16, 24, 40, 0.2);
  overflow: hidden;
  animation: reactionSheetIn 0.2s ease-out;
}
.reaction-sheet-handle {
  width: 38px;
  height: 4px;
  margin: 8px auto 1px;
  border-radius: 999px;
  background: #c5ccd6;
}
.reaction-sheet-head {
  min-height: 48px;
  padding: 3px 12px 3px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.reaction-sheet-head h3 {
  margin: 0;
  font-size: 16px;
}
.reaction-sheet-head button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f2f4f7;
  color: #526174;
  display: grid;
  place-items: center;
}
.reaction-sheet-head button svg {
  width: 19px;
  height: 19px;
}
.reaction-summary-tabs {
  display: flex;
  gap: 7px;
  padding: 8px 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.reaction-summary-chip {
  height: 34px;
  min-width: 68px;
  padding: 0 13px;
  border: 0;
  border-radius: 18px;
  background: #f2f4f7;
  color: #344054;
  font-size: 13px;
}
.reaction-summary-chip.active {
  background: #e8f2ff;
  color: var(--aift);
  box-shadow: inset 0 0 0 1px #c7dcf7;
}
.reaction-details-list {
  flex: 1;
  min-height: 82px;
  overflow: auto;
  padding: 2px 0 max(10px, env(safe-area-inset-bottom));
}
.reaction-detail-row {
  width: 100%;
  min-height: 58px;
  padding: 7px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}
.reaction-detail-row:active {
  background: #f5f7fa;
}
.reaction-detail-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #eef2f6;
}
.reaction-detail-emoji {
  margin-left: auto;
  font-size: 23px;
}
.reaction-detail-copy {
  flex: 1;
  min-width: 0;
}
.reaction-detail-copy strong,
.reaction-detail-copy small {
  display: block;
}
.reaction-detail-copy strong {
  font-size: 13px;
}
.reaction-detail-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}
.reaction-remove-btn {
  display: contents;
}
.chat-panel[data-chat-theme="dark"]
  ~ .reaction-sheet-backdrop
  .reaction-details-card,
body:has(.chat-panel[data-chat-theme="dark"]) .reaction-details-card {
  background: #172033;
  color: #f8fafc;
}
.chat-panel[data-chat-theme="dark"]
  ~ .reaction-sheet-backdrop
  .reaction-summary-tabs,
body:has(.chat-panel[data-chat-theme="dark"]) .reaction-summary-tabs {
  border-color: #2b3648;
}
.chat-panel[data-chat-theme="dark"]
  ~ .reaction-sheet-backdrop
  .reaction-summary-chip,
body:has(.chat-panel[data-chat-theme="dark"]) .reaction-summary-chip {
  background: #253044;
  color: #e7edf6;
}
.chat-panel[data-chat-theme="dark"]
  ~ .reaction-sheet-backdrop
  .reaction-detail-row:active,
body:has(.chat-panel[data-chat-theme="dark"]) .reaction-detail-row:active {
  background: #253044;
}
@keyframes reactionSheetIn {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
.media-review-modal {
  position: fixed;
  inset: 0;
  z-index: 270;
  background: #070a0e;
  color: #fff;
}
.media-review-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 64px 14px max(18px, env(safe-area-inset-bottom));
}
.media-review-close {
  position: absolute;
  z-index: 3;
  top: max(14px, env(safe-area-inset-top));
  left: 16px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(20, 25, 31, 0.72);
  color: #fff;
}
.media-review-main {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.media-review-main img,
.media-review-main video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.media-review-thumbs {
  height: 82px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 2px;
}
.media-review-thumb {
  position: relative;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border: 2px solid transparent;
  border-radius: 9px;
  overflow: hidden;
  background: #202630;
}
.media-review-thumb.active {
  border-color: #5da2ff;
}
.media-review-thumb img,
.media-review-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-review-thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
}
.media-review-add {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border: 1px dashed rgba(255, 255, 255, 0.55);
  border-radius: 9px;
  background: transparent;
  color: #fff;
  font-size: 25px;
}
.media-review-compose {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.media-review-compose textarea {
  flex: 1;
  min-width: 0;
  max-height: 86px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  resize: none;
  outline: 0;
  background: #171c22;
  color: #fff;
}
.media-review-compose button {
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--aift);
  color: #fff;
}
.media-review-compose button svg {
  width: 25px;
  height: 25px;
}
@media (max-width: 760px) {
  .messages-box {
    gap: 0;
    padding-top: 8px;
    padding-bottom: 9px;
  }
  .message-row {
    margin: 0 !important;
  }
  .message-row + .message-row {
    margin-top: 7px !important;
  }
  .message-row.me + .message-row.me,
  .message-row.other + .message-row.other {
    margin-top: 2px !important;
  }
  .message-row:has(.message-reactions) {
    margin-bottom: 11px !important;
  }
  .message-row:has(+ .day-divider) {
    margin-bottom: 8px !important;
  }
  .message-bubble {
    padding: 7px 9px 4px;
  }
  .message-bubble:has(.message-reactions) {
    margin-bottom: 0;
  }
  .message-reactions {
    bottom: -11px;
    min-height: 22px;
    padding: 2px 6px;
    border-width: 1.5px;
    font-size: 14px;
    line-height: 16px;
  }
  .media-review-stage {
    padding-left: 8px;
    padding-right: 8px;
  }
  .camera-controls {
    bottom: max(92px, calc(env(safe-area-inset-bottom) + 70px));
    grid-template-columns: 40px 62px 40px;
    gap: clamp(20px, 5vw, 26px);
  }
  .camera-shutter {
    width: 62px !important;
    height: 62px !important;
  }
  .camera-shutter .camera-shutter-core {
    width: 44px;
    height: 44px;
  }
}

.chat-title .typing-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--aift);
  font-weight: 600;
}
.typing-status-dots {
  display: inline-flex;
  gap: 2px;
}
.typing-status-dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  animation: typingStatusDot 1.1s infinite;
}
.typing-status-dots i:nth-child(2) {
  animation-delay: 0.16s;
}
.typing-status-dots i:nth-child(3) {
  animation-delay: 0.32s;
}
@keyframes typingStatusDot {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.message-jump-highlight {
  animation: messageJumpHighlight 1.7s ease-out;
}
.messages-box.locating-message {
  cursor: progress;
}
@keyframes messageJumpHighlight {
  0%,
  32% {
    box-shadow:
      0 0 0 4px rgba(22, 113, 232, 0.32),
      0 8px 24px rgba(22, 113, 232, 0.22);
    transform: scale(1.018);
  }
  100% {
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.07);
    transform: none;
  }
}

/* Calls: explicit call type, live video upgrade, sharing and participants */
.call-start-wrap {
  position: relative;
  display: grid;
  place-items: center;
}
.call-start-menu {
  position: absolute;
  z-index: 90;
  top: calc(100% + 10px);
  right: -42px;
  width: 210px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.2);
}
.call-start-menu button {
  width: 100%;
  height: 52px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: transparent;
  color: var(--text);
  font: 600 15px/1 inherit;
  text-align: left;
}
.call-start-menu button:active,
.call-start-menu button:hover {
  background: var(--surface-soft);
}
.call-start-menu svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}
.remote-videos-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  gap: 3px;
  background: #080d13;
}
.remote-video-tile {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.remote-video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.remote-camera-avatar {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  align-content: center;
  gap: 12px;
  background: radial-gradient(circle at 50% 38%, #27364a, #080d13 68%);
  color: #fff;
}
.remote-camera-avatar img {
  width: clamp(112px, 26vw, 190px);
  height: clamp(112px, 26vw, 190px);
  border: 3px solid rgba(255,255,255,.22);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 16px 44px rgba(0,0,0,.35);
}
.remote-camera-avatar b {
  font-size: 15px;
}
.remote-video-tile.remote-camera-off video {
  visibility: hidden;
}
.remote-video-tile.remote-camera-off .remote-camera-avatar {
  display: grid;
}
.remote-video-tile span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 10px;
  background: rgba(5, 10, 15, 0.58);
  color: #fff;
  font-size: 12px;
}
.remote-videos-grid.group-call {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
}
.call-participant-sheet {
  position: fixed;
  inset: 0;
  z-index: 430;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(5, 10, 18, 0.58);
  backdrop-filter: blur(3px);
}
.call-participant-sheet > section {
  width: min(100%, 520px);
  max-height: 70dvh;
  padding: 8px 14px max(18px, env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: #fff;
  color: #101828;
  box-shadow: 0 -14px 44px rgba(0, 0, 0, 0.25);
}
.call-participant-sheet header {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.call-participant-sheet h2 {
  margin: 0;
  font-size: 19px;
}
.call-participant-sheet header button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f2f4f7;
  color: #475467;
  font-size: 26px;
}
.call-participant-list {
  overflow: auto;
  max-height: calc(70dvh - 80px);
}
.call-participant-list > button {
  width: 100%;
  min-height: 62px;
  padding: 7px 4px;
  border: 0;
  border-bottom: 1px solid #edf0f3;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  color: inherit;
  text-align: left;
}
.call-participant-list img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.call-participant-list span {
  flex: 1;
  font-weight: 700;
}
.call-participant-list b {
  color: var(--aift);
}
@media (max-width: 760px) {
  .chat-header-actions .call-start-wrap + .icon-btn {
    display: grid;
  }
  .call-start-menu {
    right: -34px;
    width: 200px;
  }
  .remote-videos-grid.group-call {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Refined recent-call list */
.calls-list-heading {
  padding: 14px 20px 10px;
  font-size: 18px;
  line-height: 1.25;
}
.call-log-item {
  min-height: 76px;
  gap: 12px;
  padding: 10px 18px;
}
.call-log-item > img {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
}
.call-log-main {
  padding-right: 8px;
}
.call-log-main strong {
  font-size: 15px;
  line-height: 1.25;
}
.call-log-main span {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  font-size: 12.5px;
}
.call-log-main span b {
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1;
}
.call-log-main span i {
  color: #c1c7d0;
  font-style: normal;
}
.call-log-controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.call-log-action,
.call-log-delete {
  width: 34px;
  height: 34px;
  padding: 0;
}
.call-log-action {
  background: #eef6ff;
}
.call-log-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.call-log-delete {
  background: #f7f8fa;
  color: #7f8998;
}
.call-log-delete svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.call-log-action:active,
.call-log-delete:active {
  transform: scale(.94);
}
@media (max-width: 760px) {
  .calls-list-heading {
    padding: 13px 18px 8px;
    font-size: 17px;
  }
  .call-log-item {
    min-height: 72px;
    gap: 11px;
    padding: 9px 16px;
  }
  .call-log-item > img {
    width: 44px;
    height: 44px;
  }
  .call-log-controls {
    gap: 9px;
  }
  .call-log-action,
  .call-log-delete {
    width: 33px;
    height: 33px;
  }
}


/* WhatsApp-style chat/group creation */
.sidebar-header{position:relative}.create-chat-menu{position:absolute;z-index:80;top:62px;right:16px;width:280px;padding:8px;border:1px solid #e5eaf0;border-radius:18px;background:#fff;box-shadow:0 18px 50px rgba(15,23,42,.2)}
.create-chat-menu>button{width:100%;border:0;background:transparent;display:flex;align-items:center;gap:13px;padding:12px;border-radius:13px;color:#172033;text-align:left}.create-chat-menu>button:hover{background:#f5f8fc}.create-chat-menu>button>span:first-child{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#edf5ff;color:var(--aift)}.create-chat-menu svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.create-chat-menu strong,.create-chat-menu small{display:block}.create-chat-menu strong{font-size:15px}.create-chat-menu small{margin-top:3px;color:#7b8495;font-size:12px}
.group-creator-modal{position:fixed;z-index:1000010;inset:0;display:grid;place-items:center;padding:18px;background:rgba(8,15,27,.58);backdrop-filter:blur(5px)}.group-creator-card{width:min(100%,520px);height:min(760px,92dvh);display:flex;flex-direction:column;overflow:hidden;border-radius:26px;background:#fff;color:#172033;box-shadow:0 24px 80px rgba(0,0,0,.3)}.group-creator-card>header{height:70px;flex:0 0 auto;padding:0 16px;display:flex;align-items:center;gap:13px;border-bottom:1px solid #e8edf3}.group-creator-card header h2,.group-creator-card header p{margin:0}.group-creator-card header h2{font-size:19px}.group-creator-card header p{margin-top:2px;color:#7b8495;font-size:12px}.group-creator-card header>div{flex:1}.group-back-btn{width:38px;height:38px;border:0;border-radius:50%;display:grid;place-items:center;background:#f2f5f8;color:#42526a}.group-back-btn svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2}.group-next-text{border:0;background:transparent;color:var(--aift);font-weight:800;font-size:14px}
.group-creator-step{min-height:0;flex:1;overflow:auto}.group-selected-members{display:flex;gap:10px;overflow-x:auto;padding:11px 16px 5px}.group-selected-members:empty{display:none}.group-selected-members button{width:58px;flex:0 0 auto;border:0;background:transparent;padding:0;color:#475467}.group-selected-members button>span{position:relative;display:block}.group-selected-members img{width:46px;height:46px;border-radius:50%;object-fit:cover}.group-selected-members i{position:absolute;right:2px;bottom:2px;width:17px;height:17px;border-radius:50%;display:grid;place-items:center;background:#667085;color:#fff;font:700 13px/1 Arial}.group-selected-members small{display:block;overflow:hidden;margin-top:3px;text-overflow:ellipsis;white-space:nowrap;font-size:10px}
.group-search{height:46px;margin:10px 16px;display:flex;align-items:center;gap:10px;padding:0 14px;border-radius:23px;background:#f1f4f7}.group-search svg{width:20px;height:20px;fill:none;stroke:#667085;stroke-width:2}.group-search input{min-width:0;flex:1;border:0;outline:0;background:transparent;font:inherit}.group-member-results{padding:0 10px 16px}.group-member-option{width:100%;min-height:66px;padding:8px;border:0;border-radius:14px;display:flex;align-items:center;gap:12px;background:transparent;color:inherit;text-align:left}.group-member-option:hover,.group-member-option.selected{background:#f2f7fd}.group-member-option img{width:48px;height:48px;border-radius:50%;object-fit:cover}.group-member-option>span{min-width:0;flex:1}.group-member-option strong,.group-member-option small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.group-member-option small{margin-top:4px;color:#7b8495}.group-member-option>i{width:23px;height:23px;border:2px solid #c9d1dc;border-radius:50%;display:grid;place-items:center;color:#fff;font-style:normal}.group-member-option.selected>i{border-color:var(--aift);background:var(--aift)}
.group-details-row{display:flex;align-items:center;gap:15px;padding:24px 20px 15px}.group-photo-picker{position:relative;width:76px;height:76px;flex:0 0 auto;overflow:hidden;border:0;border-radius:50%;display:grid;place-items:center;background:#e9f3ff;color:var(--aift)}.group-photo-picker svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.8}.group-photo-picker img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.group-details-row>label{position:relative;min-width:0;flex:1;border-bottom:2px solid var(--aift);padding:4px 42px 6px 0}.group-details-row label>span,.group-description-field>span{display:block;color:#667085;font-size:11px;font-weight:700}.group-details-row input{width:100%;border:0;outline:0;padding:6px 0 2px;background:transparent;font:600 17px/1.3 inherit}.group-details-row label>small{position:absolute;right:0;bottom:9px;color:#98a2b3}.group-description-field{display:block;margin:8px 20px 18px;padding:12px;border:1px solid #e3e8ef;border-radius:14px}.group-description-field textarea{width:100%;resize:none;border:0;outline:0;margin-top:7px;background:transparent;font:inherit}.group-description-field span small{font-weight:500}.group-summary{padding:8px 20px 18px}.group-summary>strong{font-size:14px}.group-summary>div{display:flex;gap:9px;overflow-x:auto;margin-top:12px}.group-summary span{width:54px;flex:0 0 auto;text-align:center}.group-summary img{width:44px;height:44px;border-radius:50%;object-fit:cover}.group-summary small{display:block;overflow:hidden;margin-top:3px;text-overflow:ellipsis;white-space:nowrap}.create-group-button{display:block;width:calc(100% - 40px);min-height:50px;margin:8px 20px 20px;border:0;border-radius:25px;background:var(--aift);color:#fff;font-weight:800;font-size:15px}.create-group-button:disabled{opacity:.6}
.group-info-section{border-top:1px solid #e8edf3;padding:10px 0}.group-description-button{width:100%;border:0;background:transparent;padding:13px 20px;color:var(--aift);font:600 14px/1.4 inherit;text-align:left}.group-description-button:disabled{color:#667085}.group-members-head{display:flex;align-items:center;justify-content:space-between;padding:12px 20px 7px;color:#667085}.group-members-head button{border:0;background:transparent;color:var(--aift);font-weight:700}.group-info-members article{min-height:62px;display:flex;align-items:center;gap:11px;padding:7px 20px}.group-info-members img{width:44px;height:44px;border-radius:50%;object-fit:cover}.group-info-members article>span{min-width:0;flex:1}.group-info-members strong,.group-info-members small{display:block}.group-info-members small{margin-top:3px;color:#7b8495}.group-info-members article>b{padding:4px 7px;border-radius:6px;background:#f2f4f7;color:#667085;font-size:10px}.group-info-members article>button{border:0;background:transparent;color:#e5485f;font-weight:700;font-size:11px}
@media(max-width:760px){.create-chat-menu{position:fixed;top:auto;right:14px;bottom:22px;width:min(290px,calc(100vw - 28px));border-radius:20px}.group-creator-modal{padding:0;background:#fff}.group-creator-card{width:100%;height:100dvh;max-height:none;border-radius:0;box-shadow:none}.group-creator-card>header{padding-top:env(safe-area-inset-top);height:calc(64px + env(safe-area-inset-top))}.group-details-row{padding-top:28px}}


/* Group conversation message identity */
.group-message-row{align-items:flex-end;gap:7px}.group-message-avatar{width:28px;height:28px;flex:0 0 auto;border-radius:50%;object-fit:cover;margin-bottom:3px}.group-message-sender{margin:0 0 5px;color:#1671e8;font-size:11px;font-weight:800}.chat-dark .group-message-sender{color:#66b2ff}
@media(max-width:760px){.create-chat-menu{position:absolute;top:62px;right:12px;bottom:auto;width:min(280px,calc(100vw - 24px))}.group-message-avatar{width:26px;height:26px}}

.chat-title-button{padding:0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer;min-width:0}
.chat-title-button:hover h1{color:var(--aift)}
.call-event-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.call-camera-slash{display:none}
#cameraBtn.active .call-camera-slash{display:block;stroke-width:2.25}
#cameraBtn.active .call-control-icon{color:#111b20}

.leave-group-button{width:calc(100% - 30px);min-height:43px;margin:12px 15px 18px;border:1px solid rgba(229,72,95,.28);border-radius:11px;background:#fff;color:#d92d4f;font-weight:800;font-size:10px}
.leave-group-button:hover{background:rgba(229,72,95,.06)}


/* Clean mobile touch feedback without changing intentional selected states */
@media (max-width: 760px) {
  html,
  body,
  body * {
    -webkit-tap-highlight-color: transparent !important;
  }
  button,
  a,
  [role="button"],
  input,
  textarea,
  select,
  label {
    -webkit-tap-highlight-color: transparent !important;
  }
  button:focus:not(:focus-visible),
  a:focus:not(:focus-visible),
  [role="button"]:focus:not(:focus-visible) {
    outline: none !important;
  }
}

/* Holding a story leaves only its media visible */
#storyViewer.paused #storyViewerActions,
#storyViewer.paused.story-reply-open #storyViewerActions {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.08s ease !important;
}
