/* ==========================================================================
   Surafel Chat Pro — list, conversation, composer, overlays, details sheet
   Uses the app tokens (--sf-accent, --cl-*), works in light and dark mode.
   ========================================================================== */
:root, body {
  --sfc-accent: var(--sf-accent, var(--cl-primary-color, #e0245e));
  --sfc-accent-soft: color-mix(in srgb, var(--sfc-accent) 12%, transparent);
  --sfc-accent-softer: color-mix(in srgb, var(--sfc-accent) 7%, transparent);
  --sfc-bg: var(--cl-primary-bg-color, #fff);
  --sfc-bg-2: var(--cl-secondary-bg-color, #f1f5f9);
  --sfc-text: var(--cl-primary-text-color, #0f172a);
  --sfc-muted: var(--cl-secondary-text-color, #64748b);
  --sfc-border: color-mix(in srgb, var(--cl-primary-border-color, #e2e8f0) 85%, transparent);
  --sfc-danger: #e5484d;
  --sfc-danger-soft: color-mix(in srgb, #e5484d 10%, transparent);
  --sfc-online: #22c55e;
  --sfc-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 2px 8px rgba(15, 23, 42, .05);
  --sfc-shadow-lg: 0 18px 50px rgba(15, 23, 42, .18), 0 4px 14px rgba(15, 23, 42, .08);
  --sfc-ease: cubic-bezier(.2, .9, .25, 1);
  --sfc-spring: cubic-bezier(.34, 1.56, .64, 1);
}
body[data-bg="dark"] {
  --sfc-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --sfc-shadow-lg: 0 18px 50px rgba(0, 0, 0, .55), 0 4px 14px rgba(0, 0, 0, .35);
  --sfc-danger: #ff6369;
}
.sfc-ic { width: 22px; height: 22px; flex: 0 0 auto; display: block; }
[hidden].sfc-search, [hidden].sfc-banner, [hidden].sfc-attach, [hidden].sfc-panel,
[hidden].sfc-rec, [hidden].sfc-counter, [hidden].sfc-typing-row, [hidden].sfc-empty,
.sfc-list [hidden], .sfc-conv [hidden], .sfc-sheet [hidden], .sfc-dialog [hidden], .sfc-ctx [hidden] { display: none !important; }

/* ---------- Spinner ---------- */
.sfc-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.2px solid color-mix(in srgb, var(--sfc-accent) 25%, transparent);
  border-top-color: var(--sfc-accent);
  display: inline-block; animation: sfc-spin .7s linear infinite;
}
.sfc-spinner--light { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes sfc-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Messages list
   ========================================================================== */
.sfc-list {
  padding: 8px 0 calc(120px + env(safe-area-inset-bottom, 0px));
}
.sfc-list__search {
  position: relative;
  margin: 4px 16px 12px;
  display: flex;
  align-items: center;
}
.sfc-list__search-icon { position: absolute; left: 14px; color: var(--sfc-muted); pointer-events: none; }
.sfc-list__search-icon .sfc-ic { width: 18px; height: 18px; }
.sfc-list__search input {
  width: 100%; height: 42px; border-radius: 12px; border: 1px solid transparent;
  background: var(--sfc-bg-2); color: var(--sfc-text);
  padding: 0 42px; font: 500 15px/1 Inter, system-ui, sans-serif; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s; -webkit-appearance: none; appearance: none;
}
.sfc-list__search input::-webkit-search-cancel-button { display: none; }
.sfc-list__search input:focus { background: var(--sfc-bg); border-color: var(--sfc-accent); box-shadow: 0 0 0 3px var(--sfc-accent-soft); }
.sfc-list__search-clear {
  position: absolute; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: color-mix(in srgb, var(--sfc-muted) 18%, transparent); color: var(--sfc-text);
  display: grid; place-items: center; cursor: pointer;
}
.sfc-list__search-clear .sfc-ic { width: 14px; height: 14px; }

.sfc-chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 14px; scrollbar-width: none;
}
.sfc-chips::-webkit-scrollbar { display: none; }
.sfc-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--sfc-border); background: var(--sfc-bg); color: var(--sfc-text);
  font: 600 13px/1 Inter, system-ui, sans-serif; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.sfc-chip:active { transform: scale(.95); }
.sfc-chip.is-active { background: var(--sfc-accent); border-color: var(--sfc-accent); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--sfc-accent) 28%, transparent); }
.sfc-chip.is-zero:not(.is-active) { color: var(--sfc-muted); }
.sfc-chip__count {
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center;
  font-size: 11px; font-weight: 700; background: var(--sfc-accent-soft); color: var(--sfc-accent);
}
.sfc-chip.is-active .sfc-chip__count { background: rgba(255,255,255,.24); color: #fff; }

.sfc-list .chat-contacts { display: flex; flex-direction: column; background: var(--sfc-bg); }
.sfc-chat {
  position: relative; animation: sfc-rise .32s var(--sfc-ease) both;
  animation-delay: calc(var(--sfc-i, 0) * 18ms);
}
@keyframes sfc-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sfc-chat .block-link {
  display: block; padding: 12px 16px; border-radius: 0; margin: 0;
  transition: background .15s; color: inherit; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.sfc-chat .block-link:active { background: color-mix(in srgb, var(--sfc-text) 6%, transparent); }
.sfc-chat.is-chat-pinned { background: color-mix(in srgb, var(--sfc-accent) 4%, transparent); }
.sfc-chat.is-chat-pinned .block-link:active { background: color-mix(in srgb, var(--sfc-accent) 9%, transparent); }
.sfc-chat:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 82px;
  right: 0;
  bottom: 0;
  height: 0.5px;
  background: var(--sfc-border);
  opacity: 0.65;
  pointer-events: none;
}
.sfc-chat .contact-data { display: flex; align-items: center; gap: 13px; overflow: visible !important; }
.contacts-list__item.sfc-chat .contact-data__avatar,
.sfc-chat .contact-data__avatar {
  flex: 0 0 48px !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  position: relative !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  overflow: visible !important;
  margin-top: 2px;
}
.sfc-list .sfc-chat.contacts-list__item { padding: 0 !important; border: 0 !important; overflow: visible !important; background: none; }
.sfc-av.user-avatar {
  position: relative !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  overflow: visible !important;
  border-radius: 50%;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}
.sfc-av > .cl-avatar-story-ring {
  width: 48px !important;
  height: 48px !important;
  padding: 2px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box !important;
}
.sfc-av > .cl-avatar-story-ring > .cl-avatar-story-ring__inner {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  display: block !important;
  overflow: visible !important;
}
.contacts-list__item.sfc-chat .contact-data__avatar .cl-avatar-framed,
.sfc-av .cl-avatar-framed,
.sfc-av .cl-avatar-framed__photo,
.sfc-av img:not(.cl-avatar-frame__overlay) {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
}
.contacts-list__item.sfc-chat .contact-data__avatar .cl-avatar-story-ring .cl-avatar-framed,
.sfc-av > .cl-avatar-story-ring .cl-avatar-framed,
.sfc-av > .cl-avatar-story-ring .cl-avatar-framed__photo,
.sfc-av > .cl-avatar-story-ring img:not(.cl-avatar-frame__overlay) {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
}
.sfc-av .cl-avatar-framed__photo { inset: 0; overflow: hidden; }
.sfc-av .cl-avatar-frame__overlay {
  pointer-events: none;
  z-index: 4;
}
/* broken / missing avatar image -> branded silhouette */
.cl-img-wrap-error .cl-avatar-framed__photo,
.sfc-profile__av .cl-img-wrap-error,
#conv-head-avatar .cl-img-wrap-error {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Ccircle cx='12' cy='9' r='4.2'/%3E%3Cpath d='M4 20.5c.8-4 4.1-6.3 8-6.3s7.2 2.3 8 6.3'/%3E%3C/svg%3E") center 62% / 62% no-repeat,
    linear-gradient(135deg, color-mix(in srgb, var(--sfc-accent) 70%, #f5a524), var(--sfc-accent)) !important;
  border-radius: 50%;
}
.sfc-online-dot {
  position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; border-radius: 50%;
  background: var(--sfc-online); border: 2.5px solid var(--sfc-bg); z-index: 3;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--sfc-online) 60%, transparent); animation: sfc-pulse 2.4s infinite;
}
@keyframes sfc-pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.45); } 70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.sfc-chat .contact-data__body { flex: 1 1 auto; min-width: 0; }
.sfc-chat .contact-data__body-topline, .sfc-chat .contact-data__body-midline { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sfc-chat .flex-item-left { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sfc-chat .user-name-holder { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.sfc-chat .user-name-holder__name { font: 600 15.5px/1.3 Inter, system-ui, sans-serif; color: var(--sfc-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }
.sfc-chat .user-name-holder__badge svg { width: 16px; height: 16px; }
.sfc-chat .flex-item-right { font: 450 12.5px/1 Inter, system-ui, sans-serif; color: var(--sfc-muted); white-space: nowrap; }
.sfc-chat .flex-item-right.is-unread { color: var(--sfc-accent); font-weight: 700; }
.sfc-chat .contact-data__body-midline { margin-top: 5px; }
.sfc-chat .last-message { font: 400 14px/1.35 Inter, system-ui, sans-serif; color: var(--sfc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sfc-chat .last-message.unseen-message { color: var(--sfc-text); font-weight: 550; }
.sfc-chat .new-message .badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--sfc-accent); color: #fff; font: 700 11.5px/1 Inter, system-ui, sans-serif;
}
.sfc-chat .new-message .badge.is-muted { background: color-mix(in srgb, var(--sfc-muted) 55%, transparent); }
.sfc-flag, .sfc-pin-mark { display: inline-grid; place-items: center; color: var(--sfc-muted); }
.sfc-flag .sfc-ic, .sfc-pin-mark .sfc-ic { width: 14px; height: 14px; }
.sfc-flag--fav { color: #f5a524; }
.sfc-flag--fav .sfc-ic { fill: currentColor; }
.sfc-pin-mark { transform: rotate(35deg); }
.sfc-chat.is-muted .user-name-holder__name { opacity: .85; }

.sfc-list__more { display: flex; justify-content: center; padding: 14px 16px 6px; }
.sfc-more-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--sfc-border); background: var(--sfc-bg); color: var(--sfc-text);
  font: 650 14px/1 Inter, system-ui, sans-serif; box-shadow: var(--sfc-shadow-sm); cursor: pointer;
  transition: transform .15s, box-shadow .2s, border-color .2s;
}
.sfc-more-btn:active { transform: scale(.97); }
.sfc-more-btn:hover { border-color: var(--sfc-accent); }
.sfc-more-btn .sfc-ic { width: 18px; height: 18px; color: var(--sfc-accent); }
.sfc-more-btn__count { font-size: 12px; font-weight: 600; color: var(--sfc-accent); background: var(--sfc-accent-soft); padding: 4px 9px; border-radius: 999px; }
.sfc-more-btn:disabled { opacity: .6; }

.sfc-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px 28px; color: var(--sfc-muted); }
.sfc-empty__icon { width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; background: var(--sfc-accent-soft); color: var(--sfc-accent); }
.sfc-empty__icon .sfc-ic { width: 30px; height: 30px; }
.sfc-empty p { margin: 0; font-size: 14.5px; line-height: 1.5; max-width: 300px; }
.sfc-empty h4 { margin: 4px 0 0; font: 700 17px/1.3 Inter, system-ui, sans-serif; color: var(--sfc-text); }
.sfc-empty--conv { position: absolute; inset: 0; justify-content: center; pointer-events: none; }
.sfc-empty--conv > * { pointer-events: auto; }
.sfc-hello-btn {
  margin-top: 6px; height: 42px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--sfc-accent); color: #fff; font: 650 14.5px/1 Inter, system-ui, sans-serif;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--sfc-accent) 35%, transparent);
}

/* ==========================================================================
   Conversation header
   ========================================================================== */
.sfc-head-btn,
body.cl-app-conversation .sfc-head-btn,
body.cl-app-chat .sfc-head-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--sfc-text);
  display: inline-grid; place-items: center; cursor: pointer; transition: background .15s;
}
.sfc-head-btn:active, .sfc-head-btn:hover,
body.cl-app-conversation .sfc-head-btn:active, body.cl-app-conversation .sfc-head-btn:hover,
body.cl-app-chat .sfc-head-btn:active, body.cl-app-chat .sfc-head-btn:hover { background: var(--sfc-bg-2); }
.sfc-head-btn .sfc-ic,
body.cl-app-conversation .sfc-head-btn .sfc-ic,
body.cl-app-chat .sfc-head-btn .sfc-ic { width: 21px; height: 21px; }
.conversation-header__status { display: flex !important; align-items: center; gap: 5px; transition: color .2s; }
.conversation-header__status.is-typing { color: var(--sfc-accent) !important; font-weight: 600; }
.conversation-header__status .sfc-typing-dots i { width: 4px; height: 4px; background: currentColor; }
.sfc-head-menu {
  min-width: 240px !important; padding: 6px !important; border-radius: 18px !important; border: 1px solid var(--sfc-border) !important;
  background: var(--sfc-bg) !important; box-shadow: var(--sfc-shadow-lg) !important;
}
.sfc-head-menu .sfc-menu-item {
  display: flex !important; align-items: center; gap: 12px; padding: 11px 12px !important; border-radius: 12px;
  font: 500 15px/1.2 Inter, system-ui, sans-serif !important; color: var(--sfc-text) !important;
}
.sfc-head-menu .sfc-menu-item:active, .sfc-head-menu .sfc-menu-item:hover { background: var(--sfc-bg-2) !important; }
.sfc-head-menu .sfc-menu-item .dropdown-item-icon { display: grid; place-items: center; color: var(--sfc-muted); }
.sfc-head-menu .sfc-menu-item .sfc-ic { width: 19px; height: 19px; }
.sfc-head-menu .sfc-menu-item.is-on .dropdown-item-icon { color: var(--sfc-accent); }
.sfc-head-menu .sfc-menu-item.is-danger, .sfc-head-menu .sfc-menu-item.is-danger .dropdown-item-icon { color: var(--sfc-danger) !important; }
.sfc-head-menu .dropdown-divider { margin: 5px 8px !important; border-color: var(--sfc-border) !important; }

/* ==========================================================================
   Conversation body
   ========================================================================== */
body.cl-app-conversation .sfc-conv { display: flex; flex-direction: column; }
body.cl-app-conversation div.conversation.conversation--modern.sfc-conv { height: var(--sfc-conv-h, calc(100dvh - 113px)) !important; min-height: 0; }
body.cl-app-conversation .sfc-conv .conversation__body { flex: 1 1 auto; min-height: 0; }
body.cl-app-conversation .sfc-conv .conversation__footer { flex: 0 0 auto; }
body.cl-app-conversation div.conversation.sfc-conv div.conversation-messages__flow { padding: 14px 12px 10px; }
body.cl-app-conversation div.conversation.sfc-conv div.conversation-messages div.conversation-messages__item.sfc-msg { margin-bottom: 6px; display: flex; flex-direction: column; }
.sfc-msg.left { align-items: flex-start; }
.sfc-msg.right { align-items: flex-end; }
body.cl-app-conversation .sfc-conv .sfc-msg div.message-data { display: flex !important; flex-direction: row !important; width: 100%; margin-bottom: 0 !important; justify-content: flex-start; }
body.cl-app-conversation .sfc-conv .sfc-msg.right div.message-data { justify-content: flex-end !important; }
body.cl-app-conversation div.conversation.sfc-conv .sfc-msg.right div.message-data div.message-data__body div.message-text:not(.message-text--deleted):not(.message-text--emoji-only) {
  background: linear-gradient(135deg, color-mix(in srgb, var(--sfc-accent) 88%, #fff), var(--sfc-accent)) !important;
  color: #fff !important; border-color: transparent !important;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--sfc-accent) 26%, transparent) !important;
}
body.cl-app-conversation div.conversation.sfc-conv .sfc-msg.left div.message-data div.message-data__body div.message-text:not(.message-text--deleted):not(.message-text--emoji-only) {
  background: var(--sfc-bg) !important; color: var(--sfc-text) !important; border: 1px solid var(--sfc-border) !important; box-shadow: var(--sfc-shadow-sm) !important;
}
body[data-bg="dark"].cl-app-conversation div.conversation.sfc-conv .sfc-msg.left div.message-data div.message-data__body div.message-text:not(.message-text--deleted):not(.message-text--emoji-only) { background: var(--sfc-bg-2) !important; }
.sfc-msg.sfc-in { animation: sfc-msg-in-l .32s var(--sfc-ease) both; }
.sfc-msg.right.sfc-in, .sfc-msg.sfc-out { animation: sfc-msg-in-r .32s var(--sfc-ease) both; }
@keyframes sfc-msg-in-l { from { opacity: 0; transform: translate(-10px, 8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes sfc-msg-in-r { from { opacity: 0; transform: translate(10px, 8px) scale(.97); } to { opacity: 1; transform: none; } }

.sfc-bubble {
  position: relative; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: transform .18s var(--sfc-ease), filter .18s; transform-origin: center;
}
.sfc-msg.right .sfc-bubble { transform-origin: right center; }
.sfc-msg.left .sfc-bubble { transform-origin: left center; }
.sfc-bubble.is-pressing { transform: scale(.965); filter: brightness(.96); }
.sfc-msg.is-ctx-source .sfc-bubble { opacity: 0; }
.sfc-msg.is-pending .sfc-bubble { opacity: .78; }
.sfc-msg.is-failed .message-text { box-shadow: 0 0 0 1.5px var(--sfc-danger) !important; }
body.cl-app-conversation div.conversation.sfc-conv .sfc-msg .message-text {
  font-size: 15px; line-height: 1.45; padding: 9px 14px; border-radius: 20px;
}
body.cl-app-conversation div.conversation.sfc-conv .sfc-msg.left .message-text { border-bottom-left-radius: 6px; }
body.cl-app-conversation div.conversation.sfc-conv .sfc-msg.right .message-text { border-bottom-right-radius: 6px; }
body.cl-app-conversation div.conversation.sfc-conv .sfc-msg.right .message-text a { color: #fff !important; }
body.cl-app-conversation div.conversation.sfc-conv .sfc-msg .message-text--deleted {
  font-style: italic; font-size: 13.5px; background: transparent !important; color: var(--sfc-muted) !important;
  border: 1px dashed var(--sfc-border) !important; box-shadow: none !important;
}
body.cl-app-conversation div.conversation.sfc-conv .sfc-msg .message-text--emoji-only {
  background: transparent !important; border: 0 !important; box-shadow: none !important; font-size: 40px; line-height: 1.15; padding: 2px 4px;
}
.sfc-msg.is-message-pinned .sfc-bubble .message-text { box-shadow: 0 0 0 2px color-mix(in srgb, var(--sfc-accent) 40%, transparent) !important; }
.sfc-msg.is-highlighted-pinned .sfc-bubble { animation: sfc-flash 1.4s ease; }
@keyframes sfc-flash { 0%, 100% { filter: none; } 20%, 60% { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--sfc-accent) 70%, transparent)); transform: scale(1.02); } }

/* quote inside bubble */
.sfc-quote {
  display: flex; flex-direction: column; gap: 2px; margin: 0 0 4px; padding: 7px 11px; border-radius: 12px;
  border-left: 3px solid var(--sfc-accent); background: var(--sfc-accent-softer); cursor: pointer; max-width: 100%;
}
.sfc-msg.right .sfc-quote { background: color-mix(in srgb, var(--sfc-accent) 10%, var(--sfc-bg)); }
.sfc-quote .msg-reply-quote__sender { font: 700 12.5px/1.2 Inter, system-ui, sans-serif; color: var(--sfc-accent); }
.sfc-quote .msg-reply-quote__body { font-size: 13px; color: var(--sfc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* media */
.sfc-media { position: relative; border-radius: 18px; overflow: hidden; background: var(--sfc-bg-2); max-width: min(270px, 72vw); }
.sfc-media img, .sfc-media video { display: block; width: 100%; height: auto; max-height: none; object-fit: contain; border-radius: 18px; }
.sfc-media a.image-wrapper { display: block; box-shadow: none !important; border-radius: 18px; }
.sfc-gif-badge {
  position: absolute; left: 8px; bottom: 8px; padding: 3px 7px; border-radius: 7px;
  background: rgba(0,0,0,.55); color: #fff; font: 800 10.5px/1 Inter, system-ui, sans-serif; letter-spacing: .06em;
  backdrop-filter: blur(6px);
}
.sfc-upload { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.32); border-radius: inherit; }
.sfc-upload__ring { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; animation: sfc-spin .8s linear infinite; }
.sfc-msg.is-voice .sfc-upload { border-radius: 22px; }

/* voice */
.sfc-voice {
  display: flex; align-items: center; gap: 10px; min-width: 220px; max-width: 280px; padding: 8px 14px 8px 8px;
  border-radius: 22px; background: var(--cl-conv-them-bg, var(--sfc-bg-2)); border: 1px solid var(--sfc-border); color: var(--sfc-text);
}
.sfc-msg.right .sfc-voice { background: var(--sfc-accent); border-color: transparent; color: #fff; }
.sfc-voice__play {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--sfc-accent); color: #fff; transition: transform .15s;
}
.sfc-voice__play:active { transform: scale(.92); }
.sfc-voice__play .sfc-ic { width: 18px; height: 18px; fill: currentColor; }
.sfc-msg.right .sfc-voice__play { background: #fff; color: var(--sfc-accent); }
.sfc-voice__track { position: relative; flex: 1 1 auto; height: 28px; }
.sfc-voice__bars { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; }
.sfc-voice__bars i { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: currentColor; opacity: .3; }
.sfc-voice__bars--fill { clip-path: inset(0 100% 0 0); transition: clip-path .12s linear; }
.sfc-voice__bars--fill i { opacity: 1; background: var(--sfc-accent); }
.sfc-msg.right .sfc-voice__bars--fill i { background: #fff; }
.sfc-voice__time { font: 600 12px/1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; opacity: .85; min-width: 30px; text-align: right; }

/* reactions under bubble */
.sfc-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -6px; padding: 0 8px; position: relative; z-index: 2; }
.sfc-reactions:empty { display: none; }
.sfc-react-chip {
  display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 8px; border-radius: 999px; cursor: pointer;
  background: var(--sfc-bg); border: 1px solid var(--sfc-border); box-shadow: var(--sfc-shadow-sm); color: var(--sfc-text);
  animation: sfc-pop .32s var(--sfc-spring) both;
}
.sfc-react-chip.is-mine { border-color: var(--sfc-accent); background: color-mix(in srgb, var(--sfc-accent) 10%, var(--sfc-bg)); }
.sfc-react-chip__e { font-size: 15px; line-height: 1; }
.sfc-react-chip__n { font: 700 12px/1 Inter, system-ui, sans-serif; color: var(--sfc-muted); }
.sfc-react-chip.is-mine .sfc-react-chip__n { color: var(--sfc-accent); }
@keyframes sfc-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }

/* meta line */
.sfc-meta { display: inline-flex !important; align-items: center; gap: 4px; margin-top: 3px; font: 500 11px/1 Inter, system-ui, sans-serif !important; color: var(--sfc-muted); }
.sfc-edited { font-style: italic; opacity: .85; }
.sfc-pinned-mark { color: var(--sfc-accent); display: inline-grid; transform: rotate(35deg); }
.sfc-pinned-mark .sfc-ic { width: 12px; height: 12px; }
.sfc-tick { display: inline-grid; color: var(--sfc-muted); }
.sfc-tick .sfc-ic { width: 15px; height: 15px; }
.sfc-tick.is-seen { color: var(--sfc-accent); }
.sfc-tick.is-failed { color: var(--sfc-danger); }
.sfc-tick.is-pending .sfc-ic { width: 13px; height: 13px; animation: sfc-spin 2.4s linear infinite; }
.sfc-retry {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 5px 10px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--sfc-danger-soft); color: var(--sfc-danger); font: 650 12px/1 Inter, system-ui, sans-serif;
}
.sfc-retry .sfc-ic { width: 14px; height: 14px; }

/* day separator */
.sfc-day { display: flex; justify-content: center; margin: 14px 0 12px; position: sticky; top: 8px; z-index: 3; pointer-events: none; }
.sfc-day span {
  padding: 5px 12px; border-radius: 999px; font: 650 12px/1 Inter, system-ui, sans-serif; color: var(--sfc-muted);
  background: color-mix(in srgb, var(--sfc-bg) 82%, transparent); border: 1px solid var(--sfc-border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--sfc-shadow-sm);
}

/* typing */
.sfc-typing-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 0 14px 10px;
  animation: sfc-typing-pop .28s var(--sfc-spring) both;
}
@keyframes sfc-typing-pop {
  0% { opacity: 0; transform: translateY(8px) scale(0.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.sfc-typing-avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 2px;
}
.sfc-typing-avatar .cl-user-avatar,
.sfc-typing-avatar img {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.sfc-typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 18px 18px 18px 5px;
  background: var(--cl-conv-them-bg, var(--sfc-bg-2));
  border: 1px solid var(--sfc-border);
  box-shadow: var(--sfc-shadow-sm);
}
.sfc-typing-text {
  font-size: 13px;
  color: var(--sfc-muted);
  font-weight: 500;
  white-space: nowrap;
}
.sfc-typing-text strong {
  color: var(--sfc-text);
  font-weight: 600;
}
.sfc-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sfc-typing-dots i {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sfc-accent) 0%, color-mix(in srgb, var(--sfc-accent) 60%, var(--sfc-muted)) 100%);
  animation: sfc-typing-bounce 1.3s infinite ease-in-out;
}
.sfc-typing-dots i:nth-child(2) { animation-delay: .18s; }
.sfc-typing-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes sfc-typing-bounce {
  0%, 60%, 100% { transform: translateY(0) scale(0.85); opacity: .4; }
  30% { transform: translateY(-4px) scale(1.15); opacity: 1; }
}
.sfc-typing-dots--sm i {
  width: 4px;
  height: 4px;
}
.sfc-typing-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.sfc-typing-gradient-text {
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(90deg, var(--sfc-accent) 0%, #38bdf8 50%, var(--sfc-accent) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: sfc-typing-shimmer 2s linear infinite;
}
@keyframes sfc-typing-shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.sfc-history-loader { display: flex; justify-content: center; padding: 8px 0 14px; }

/* jump to latest */
.sfc-jump.conv-jump-bottom {
  position: absolute !important;
  right: 16px !important;
  left: auto !important;
  bottom: 16px !important;
  width: 42px !important;
  height: 42px !important;
  border: 1px solid var(--sfc-border, rgba(0, 0, 0, 0.08)) !important;
  color: var(--sfc-accent, #10b981) !important;
  background: var(--sfc-bg, #ffffff) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16) !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 100 !important;
  animation: sfc-pop .25s var(--sfc-spring) !important;
  -webkit-tap-highlight-color: transparent;
}
.sfc-jump.conv-jump-bottom[hidden],
.conv-jump-bottom[hidden],
#conv-jump-bottom[hidden] {
  display: none !important;
}
.sfc-jump .sfc-ic { width: 22px; height: 22px; stroke-width: 2.2; }
.sfc-jump.has-new::after {
  content: ""; position: absolute; top: 2px; right: 2px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--sfc-accent); border: 2px solid var(--sfc-bg);
}

/* pinned strip */
.sfc-pinned .conv-chat-pinned-strip {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin: 0;
  background: color-mix(in srgb, var(--sfc-bg) 92%, transparent); border-bottom: 1px solid var(--sfc-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.sfc-pinned .conv-chat-pinned-icon { color: var(--sfc-accent); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--sfc-accent-soft); }
.sfc-pinned .conv-chat-pinned-icon .sfc-ic { width: 16px; height: 16px; }
.sfc-pinned .conv-chat-pinned-link { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; }
.sfc-pinned .conv-chat-pinned-link__label { font: 700 12px/1.2 Inter, system-ui, sans-serif; color: var(--sfc-accent); }
.sfc-pinned .conv-chat-pinned-link__text { font-size: 13.5px; color: var(--sfc-text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sfc-pinned .conv-chat-pinned-unpin { width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: var(--sfc-muted); display: grid; place-items: center; }
.sfc-pinned .conv-chat-pinned-unpin .sfc-ic { width: 16px; height: 16px; }

/* ==========================================================================
   In-conversation search
   ========================================================================== */
.sfc-search {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px 8px 12px;
  background: color-mix(in srgb, var(--sfc-bg) 94%, transparent); border-bottom: 1px solid var(--sfc-border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: sfc-slide-down .25s var(--sfc-ease);
  position: relative; z-index: 15;
}
@keyframes sfc-slide-down { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.sfc-search__field { position: relative; flex: 1 1 auto; display: flex; align-items: center; min-width: 0; }
.sfc-search__icon { position: absolute; left: 12px; color: var(--sfc-muted); pointer-events: none; display: grid; }
.sfc-search__icon .sfc-ic { width: 17px; height: 17px; }
.sfc-search__field input {
  width: 100%; height: 40px; border-radius: 12px; border: 1.5px solid transparent; outline: none;
  background: var(--sfc-bg-2); color: var(--sfc-text); padding: 0 34px 0 38px;
  font: 500 15px/1 Inter, system-ui, sans-serif; transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none; appearance: none;
}
.sfc-search__field input::-webkit-search-cancel-button { display: none; }
.sfc-search__field input:focus { border-color: var(--sfc-accent); background: var(--sfc-bg); box-shadow: 0 0 0 4px var(--sfc-accent-soft); }
.sfc-search__clear {
  position: absolute; right: 7px; width: 24px; height: 24px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: color-mix(in srgb, var(--sfc-muted) 22%, transparent); color: var(--sfc-text); cursor: pointer;
}
.sfc-search__clear .sfc-ic { width: 13px; height: 13px; }
.sfc-search__count {
  flex: 0 0 auto; min-width: 0; font: 650 12.5px/1 Inter, system-ui, sans-serif; color: var(--sfc-accent);
  font-variant-numeric: tabular-nums; white-space: nowrap; padding: 0 2px;
}
.sfc-search__count:empty { display: none; }
.sfc-search__count.is-empty { color: var(--sfc-muted); }
.sfc-search__nav {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--sfc-accent-soft); color: var(--sfc-accent); transition: opacity .15s, transform .12s;
}
.sfc-search__nav:active:not(:disabled) { transform: scale(.9); }
.sfc-search__nav:disabled { opacity: .35; cursor: default; background: var(--sfc-bg-2); color: var(--sfc-muted); }
.sfc-search__nav .sfc-ic { width: 18px; height: 18px; }
.sfc-search__done {
  flex: 0 0 auto; border: 0; background: none; color: var(--sfc-accent); font: 700 14.5px/1 Inter, system-ui, sans-serif;
  padding: 8px 4px 8px 6px; cursor: pointer;
}
mark.sfc-hl {
  background: color-mix(in srgb, #facc15 55%, transparent); color: inherit; border-radius: 4px; padding: 0 1px;
  box-shadow: 0 0 0 1px color-mix(in srgb, #facc15 50%, transparent);
}
mark.sfc-hl.is-current { background: #facc15; color: #111; box-shadow: 0 0 0 2px #facc15, 0 2px 10px rgba(250, 204, 21, .55); }
.sfc-msg.right .message-text mark.sfc-hl:not(.is-current) { background: rgba(255,255,255,.35); color: #fff; box-shadow: none; }

/* ==========================================================================
   Composer — Modern Style
   ========================================================================== */
body.cl-app-conversation div.conversation.sfc-conv div.conversation__footer.sfc-footer {
  background: var(--sfc-bg) !important; border-top: 1px solid var(--sfc-border);
  padding: 6px 10px max(10px, env(safe-area-inset-bottom, 10px)) !important;
}
body.cl-app-conversation div.conversation.sfc-conv div.conversation__footer form.sfc-composer { padding: 0 !important; margin: 0; border: 0; }
body.cl-app-conversation div.conversation.sfc-conv div.conversation__footer.sfc-footer { display: flex; flex-direction: column; }
.sfc-footer > .sfc-banner { order: 1; }
.sfc-footer > .sfc-attach { order: 2; }
.sfc-footer > form.sfc-composer { order: 3; }
.sfc-footer > .sfc-panel { order: 4; border-top: 0; }
.sfc-composer__row { display: flex; align-items: flex-end; gap: 8px; }
.sfc-field {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: flex-end; gap: 2px; min-height: 46px;
  padding: 3px 6px 3px 8px; border-radius: 24px; background: var(--sfc-bg-2);
  border: 1px solid color-mix(in srgb, var(--sfc-border) 60%, transparent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.sfc-field:focus-within {
  background: var(--sfc-bg);
  border-color: color-mix(in srgb, var(--sfc-accent) 40%, var(--sfc-border));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05), 0 0 0 3px color-mix(in srgb, var(--sfc-accent) 12%, transparent);
}
.sfc-field textarea,
body.cl-app-conversation .sfc-field textarea,
body textarea.sfc-field-textarea {
  flex: 1 1 auto; min-width: 0; border: 0 !important; outline: none !important; outline-offset: 0 !important;
  background: transparent !important; resize: none;
  color: var(--sfc-text); font: 400 15.5px/1.4 Inter, system-ui, sans-serif;
  padding: 11px 4px 10px 6px; margin: 0;
  max-height: 140px; min-height: 24px; box-shadow: none !important; overflow-y: auto;
  -webkit-tap-highlight-color: transparent !important; -webkit-appearance: none; appearance: none;
}
.sfc-field textarea:focus,
.sfc-field textarea:focus-visible,
.sfc-field textarea:active {
  outline: none !important; border: 0 !important; box-shadow: none !important;
}
.sfc-field textarea::placeholder { color: var(--sfc-muted); opacity: .85; }
.sfc-composer.is-focused .sfc-field {
  background: var(--sfc-bg);
  border-color: color-mix(in srgb, var(--sfc-accent) 45%, var(--sfc-border));
  box-shadow: 0 2px 12px color-mix(in srgb, var(--sfc-accent) 15%, transparent), 0 0 0 3px color-mix(in srgb, var(--sfc-accent) 14%, transparent);
}
.sfc-field__btn {
  flex: 0 0 auto; width: 38px; height: 38px; margin-bottom: 2px; border-radius: 50%; border: 0;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--sfc-muted);
  transition: background .15s, color .15s, transform .15s, width .24s var(--sfc-spring), opacity .2s ease, margin .24s ease;
}
.sfc-field__btn:active { transform: scale(.9); background: color-mix(in srgb, var(--sfc-text) 8%, transparent); }
.sfc-field__btn:hover { color: var(--sfc-accent); }
.sfc-field__btn .sfc-ic { width: 22px; height: 22px; }
.sfc-field__btn--attach .sfc-ic { transition: transform .25s var(--sfc-spring); }
.sfc-field__btn--attach.is-open { color: var(--sfc-accent); background: var(--sfc-accent-soft); }
.sfc-field__btn--attach.is-open .sfc-ic { transform: rotate(45deg); }
.sfc-footer.is-panel-open .sfc-field__btn#conv-emoji-btn { color: var(--sfc-accent); }

/* Graceful tucking of attach & GIF buttons when typing to give max writing room */
.sfc-composer.is-typing .sfc-field__btn--attach,
.sfc-composer.is-typing .sfc-field__btn--gif {
  width: 0;
  min-width: 0;
  max-width: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  overflow: hidden;
}

.sfc-action-btn {
  position: relative; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; border: 0;
  cursor: pointer; overflow: hidden;
  background: var(--sfc-accent); color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--sfc-accent) 40%, transparent);
  transition: transform .2s var(--sfc-spring), box-shadow .2s; margin-bottom: 0;
}
.sfc-action-btn:active { transform: scale(.88); }
.sfc-action-btn.sfc-action-btn--pop {
  animation: sfc-btn-spring-pop .32s var(--sfc-spring) both;
}
@keyframes sfc-btn-spring-pop {
  0% { transform: scale(0.85); }
  50% { transform: scale(1.12); }
  75% { transform: scale(0.96); }
  100% { transform: scale(1); }
}
.sfc-action-btn__mic, .sfc-action-btn__send {
  position: absolute; inset: 0; display: grid; place-items: center;
  transition: transform .26s var(--sfc-spring), opacity .2s;
}
.sfc-action-btn__send { transform: scale(.3) rotate(-60deg); opacity: 0; }
.sfc-action-btn.has-text .sfc-action-btn__mic { transform: scale(.3) rotate(60deg); opacity: 0; }
.sfc-action-btn.has-text .sfc-action-btn__send { transform: none; opacity: 1; }
.sfc-action-btn .sfc-ic { width: 22px; height: 22px; }
.sfc-action-btn.is-send .sfc-ic { width: 22px; height: 22px; }
.sfc-counter { text-align: right; font: 600 11.5px/1 Inter, system-ui, sans-serif; color: var(--sfc-muted); padding: 4px 58px 0 0; }
.sfc-counter.is-low { color: var(--sfc-danger); }

/* Delete and unpin message modal switch */
.sfc-dialog--delete-msg,
.sfc-dialog--unpin-msg { max-width: 360px; }
.sfc-dialog--unpin-msg .conv-delete-modal__switch input:checked + .conv-delete-modal__switch-slider {
  background: var(--sfc-accent);
}
.sfc-dialog .conv-delete-modal__switch-block {
  margin: 16px 0 4px;
  text-align: left;
}
.sfc-dialog .conv-delete-modal__switch {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--sfc-bg-2);
  border: 1px solid var(--sfc-border);
  cursor: pointer;
  user-select: none;
  transition: background .15s, border-color .15s;
}
.sfc-dialog .conv-delete-modal__switch:active {
  background: color-mix(in srgb, var(--sfc-text) 5%, var(--sfc-bg-2));
}
.sfc-dialog .conv-delete-modal__switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.sfc-dialog .conv-delete-modal__switch-slider {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sfc-muted) 35%, transparent);
  transition: background 0.22s ease;
}
.sfc-dialog .conv-delete-modal__switch-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.22s cubic-bezier(.34, 1.56, .64, 1);
}
.sfc-dialog .conv-delete-modal__switch input:checked + .conv-delete-modal__switch-slider {
  background: var(--sfc-danger, #e5484d);
}
.sfc-dialog .conv-delete-modal__switch input:checked + .conv-delete-modal__switch-slider::before {
  transform: translateX(18px);
}
.sfc-dialog .conv-delete-modal__switch-label {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--sfc-text);
  line-height: 1.35;
}
.sfc-dialog .conv-delete-modal__switch-desc {
  margin: 6px 0 0;
  padding: 0 4px;
  color: var(--sfc-muted);
  font-size: 12px;
  line-height: 1.45;
}

/* reply / edit banners */
.sfc-banner {
  display: flex; align-items: center; gap: 10px; margin: 8px 10px 0; padding: 8px 8px 8px 12px; border-radius: 14px;
  background: var(--sfc-accent-softer); border-left: 3px solid var(--sfc-accent); animation: sfc-slide-up .22s var(--sfc-ease);
}
@keyframes sfc-slide-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sfc-banner--edit { border-left-color: #f5a524; background: color-mix(in srgb, #f5a524 10%, transparent); }
.sfc-banner__icon { color: var(--sfc-accent); display: grid; }
.sfc-banner--edit .sfc-banner__icon { color: #f5a524; }
.sfc-banner__icon .sfc-ic { width: 19px; height: 19px; }
.sfc-banner__content { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sfc-banner__label { font: 600 12.5px/1.2 Inter, system-ui, sans-serif; color: var(--sfc-accent); }
.sfc-banner--edit .sfc-banner__label { color: #c98500; }
.sfc-banner__snippet { font-size: 13.5px; color: var(--sfc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sfc-banner__close { width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: var(--sfc-muted); display: grid; place-items: center; cursor: pointer; }
.sfc-banner__close .sfc-ic { width: 17px; height: 17px; }

/* attach sheet */
.sfc-attach {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 14px 12px 6px; animation: sfc-slide-up .25s var(--sfc-ease);
}
.sfc-attach__item {
  display: flex; flex-direction: column; align-items: center; gap: 7px; border: 0; background: none; cursor: pointer; padding: 4px 0;
  font: 600 12.5px/1 Inter, system-ui, sans-serif; color: var(--sfc-text); animation: sfc-pop .34s var(--sfc-spring) both;
}
.sfc-attach__item:nth-child(2) { animation-delay: .04s; }
.sfc-attach__item:nth-child(3) { animation-delay: .08s; }
.sfc-attach__item:nth-child(4) { animation-delay: .12s; }
.sfc-attach__item:active .sfc-attach__ic { transform: scale(.9); }
.sfc-attach__ic {
  width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; color: #fff; transition: transform .15s;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .14);
}
.sfc-attach__ic .sfc-ic { width: 25px; height: 25px; }
.sfc-attach__ic--gallery { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.sfc-attach__ic--camera { background: linear-gradient(135deg, #fb7185, #e11d48); }
.sfc-attach__ic--video { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.sfc-attach__ic--gif { background: linear-gradient(135deg, #fbbf24, #f97316); }

/* emoji + gif panel */
.sfc-panel {
  height: min(340px, 45vh); display: flex; flex-direction: column; border-top: 1px solid var(--sfc-border);
  background: var(--sfc-bg); animation: sfc-slide-up .25s var(--sfc-ease);
}
.sfc-panel__tabs { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; padding: 7px 8px 5px; flex: 0 0 auto; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.sfc-panel__tabs::-webkit-scrollbar { display: none; }
.sfc-panel__tab {
  flex: 0 0 auto; width: auto; min-width: max-content; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 35px; border-radius: 10px; border: 0; cursor: pointer;
  background: transparent; color: var(--sfc-muted); font: 650 12.5px/1 Inter, system-ui, sans-serif; transition: background .15s, color .15s; padding: 0 10px; white-space: nowrap;
}
.sfc-panel__tab .sfc-ic { width: 17px; height: 17px; }
.sfc-panel__tab.is-active { background: var(--sfc-accent-soft); color: var(--sfc-accent); }
.sfc-panel__close,
.sf-ep__close {
  position: sticky; right: 0; margin-left: auto; z-index: 3; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--sfc-bg, #ffffff); color: var(--sfc-muted, #64748b);
  box-shadow: -8px 0 10px -4px var(--sfc-bg, #ffffff);
  transition: background .15s, color .15s;
}
.sfc-panel__close:hover,
.sf-ep__close:hover { background: var(--sfc-accent-soft, rgba(253,173,31,.14)); color: var(--sfc-ink, #0f172a); }
.sfc-panel__close svg,
.sf-ep__close svg { width: 16px; height: 16px; display: block; }
.sfc-panel__body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.sfc-emoji-cats {
  flex: 0 0 44px !important; height: 44px !important; min-height: 44px !important;
  display: flex !important; align-items: center !important; gap: 4px; padding: 0 8px;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; border-bottom: 1px solid var(--sfc-border); box-sizing: border-box;
}
.sfc-emoji-cats::-webkit-scrollbar { display: none; }
.sfc-emoji-cat {
  flex: 0 0 40px !important; width: 40px !important; height: 36px !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  border: 0; background: none; font-size: 21px; line-height: 1; border-radius: 10px; cursor: pointer; opacity: .55; transition: opacity .15s, background .15s;
}
.sfc-emoji-cat.is-active { opacity: 1; background: var(--sfc-bg-2); }
.sfc-emoji-grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); padding: 6px 8px 10px; align-content: start; }
.sfc-emoji { height: 44px; border: 0; background: none; font-size: 27px; line-height: 1; border-radius: 12px; cursor: pointer; transition: transform .12s, background .12s; }
.sfc-emoji:active { transform: scale(1.25); background: var(--sfc-bg-2); }
.sfc-gif-search { position: relative; margin: 0 10px 8px; display: flex; align-items: center; flex: 0 0 auto; }
.sfc-gif-search > span { position: absolute; left: 11px; color: var(--sfc-muted); display: grid; }
.sfc-gif-search .sfc-ic { width: 16px; height: 16px; }
.sfc-gif-search input {
  width: 100%; height: 38px; border-radius: 11px; border: 1.5px solid transparent; outline: none; background: var(--sfc-bg-2);
  color: var(--sfc-text); padding: 0 12px 0 34px; font: 500 14px/1 Inter, system-ui, sans-serif; -webkit-appearance: none; appearance: none;
}
.sfc-gif-search input:focus { border-color: var(--sfc-accent); background: var(--sfc-bg); }
.sfc-gif-grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 128px; gap: 6px; align-content: start; padding: 0 10px 8px; }
.sfc-gif-grid.is-loading, .sfc-sticker-grid.is-loading, .sfc-clips-grid.is-loading { opacity: .72; pointer-events: none; }
.sfc-gif-cell {
  display: block; width: 100%; height: 100%; aspect-ratio: auto !important; margin: 0; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: pointer;
  background: var(--sfc-bg-2, #e8edf2);
  transition: transform .15s, filter .15s;
}
.sfc-gif-cell:active { transform: scale(.96); filter: brightness(.9); }
.sfc-gif-cell img { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--sfc-bg-2, #e8edf2); }
.sfc-gif-state { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 12px; color: var(--sfc-muted); font-size: 14px; text-align: center; }

/* stickers grid */
.sfc-sticker-grid {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-content: start; padding: 0 10px 8px;
}
.sfc-sticker-cell {
  display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1; padding: 6px;
  border: 0; background: transparent; border-radius: 12px; cursor: pointer; transition: transform .15s, background .15s;
}
.sfc-sticker-cell:active { transform: scale(.92); background: var(--sfc-bg-2); }
.sfc-sticker-cell img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* clips grid */
.sfc-clips-grid {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 115px; gap: 8px; align-content: start; padding: 0 10px 8px;
}
.sfc-clip-cell {
  position: relative; display: block; width: 100%; height: 100%; margin: 0; padding: 0; border: 0;
  border-radius: 12px; overflow: hidden; cursor: pointer; background: #0f172a; transition: transform .15s;
}
.sfc-clip-cell:active { transform: scale(.96); }
.sfc-clip-cell img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sfc-clip-cell__badge {
  position: absolute; top: 6px; left: 6px; padding: 2px 6px; border-radius: 6px;
  background: rgba(0, 0, 0, .68); color: #fff; font: 700 10px/1 Inter, sans-serif; letter-spacing: .4px;
  display: inline-flex; align-items: center; gap: 3px; backdrop-filter: blur(4px);
}
.sfc-clip-cell__badge .sfc-ic { width: 11px; height: 11px; }
.sfc-clip-cell__title {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 14px 6px 4px;
  background: linear-gradient(to top, rgba(0,0,0,.8), transparent); color: #fff;
  font: 550 11px/1.2 Inter, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left;
}
.sfc-gif-attrib { text-align: center; font: 700 10px/1 Inter, system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--sfc-muted); padding: 2px 0 6px; opacity: .7; }
.sfc-link-btn { border: 0; background: none; color: var(--sfc-accent); font-weight: 700; cursor: pointer; padding: 0; }

/* voice recorder */
.sfc-rec { display: flex; align-items: center; gap: 8px; animation: sfc-slide-up .22s var(--sfc-ease); }
.sfc-rec__cancel { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--sfc-danger-soft); color: var(--sfc-danger); display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
.sfc-rec__cancel .sfc-ic { width: 20px; height: 20px; }
.sfc-rec__body { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 22px; background: var(--sfc-bg-2); }
.sfc-rec__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sfc-danger); animation: sfc-blink 1s infinite; flex: 0 0 auto; }
@keyframes sfc-blink { 50% { opacity: .25; } }
.sfc-rec__time { font: 700 14px/1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; color: var(--sfc-text); min-width: 36px; }
.sfc-rec__wave { flex: 1 1 auto; min-width: 0; height: 26px; display: flex; align-items: center; gap: 3px; overflow: hidden; }
.sfc-rec__wave i { flex: 1 1 0; min-width: 2px; height: 30%; border-radius: 2px; background: var(--sfc-accent); animation: sfc-wave 1s ease-in-out infinite; }
.sfc-rec__wave i:nth-child(3n) { animation-delay: -.2s; }
.sfc-rec__wave i:nth-child(3n+1) { animation-delay: -.45s; }
.sfc-rec__wave i:nth-child(4n) { animation-delay: -.7s; }
@keyframes sfc-wave { 0%, 100% { height: 22%; opacity: .5; } 50% { height: 95%; opacity: 1; } }

/* ==========================================================================
   Long-press context menu
   ========================================================================== */
body.sfc-ctx-open { overflow: hidden; }
.sfc-ctx { position: fixed; inset: 0; z-index: 10050; }
.sfc-ctx__backdrop {
  position: absolute; inset: 0; background: rgba(15, 18, 28, .38);
  backdrop-filter: blur(10px) saturate(1.1); -webkit-backdrop-filter: blur(10px) saturate(1.1); animation: sfc-fade .2s ease both;
}
@keyframes sfc-fade { from { opacity: 0; } to { opacity: 1; } }
.sfc-ctx__stack { position: absolute; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: calc(100vw - 20px); }
.sfc-ctx.is-mine .sfc-ctx__stack { align-items: flex-end; }
.sfc-ctx__reactions {
  display: flex; align-items: center; gap: 2px; padding: 5px 6px; border-radius: 999px; background: var(--sfc-bg); box-shadow: var(--sfc-shadow-lg);
  animation: sfc-ctx-in .3s var(--sfc-spring) both; transform-origin: bottom left;
}
.sfc-ctx.is-mine .sfc-ctx__reactions { transform-origin: bottom right; }
.sfc-ctx__emoji {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; animation: sfc-pop .34s var(--sfc-spring) both; animation-delay: var(--d, 0ms);
  transition: transform .15s var(--sfc-spring), background .15s;
}
.sfc-ctx__emoji:active { transform: scale(1.35); }
.sfc-ctx__emoji.is-mine { background: var(--sfc-accent-soft); }
.sfc-ctx__emoji--more { background: var(--sfc-bg-2); color: var(--sfc-muted); width: 36px; height: 36px; margin-left: 2px; }
.sfc-ctx__emoji--more .sfc-ic { width: 18px; height: 18px; }
.sfc-ctx__preview { overflow: hidden; pointer-events: none; animation: sfc-ctx-lift .26s var(--sfc-ease) both; max-width: min(84vw, 520px); }
.sfc-ctx__preview .sfc-bubble { transform: none !important; opacity: 1 !important; }
.sfc-ctx__preview .message-text {
  padding: 9px 14px; border-radius: 20px; font-size: 15px; line-height: 1.45; word-break: break-word;
  background: var(--cl-conv-them-bg, var(--sfc-bg)); color: var(--cl-conv-them-text, var(--sfc-text)); border: 1px solid var(--sfc-border);
}
.sfc-ctx__preview.right .message-text { background: var(--cl-conv-me-bg, var(--sfc-accent)); color: var(--cl-conv-me-text, #fff); border-color: transparent; border-bottom-right-radius: 6px; }
.sfc-ctx__preview.left .message-text { border-bottom-left-radius: 6px; }
.sfc-ctx__preview .message-text--emoji-only { background: transparent !important; border: 0 !important; font-size: 40px; }
.sfc-ctx__preview .sfc-voice { background: var(--sfc-bg); }
.sfc-ctx__preview.right .sfc-voice { background: var(--sfc-accent); color: #fff; }
@keyframes sfc-ctx-lift { from { transform: scale(.96); } 60% { transform: scale(1.03); } to { transform: none; } }
.sfc-ctx__menu {
  min-width: 220px; padding: 6px; border-radius: 18px; background: var(--sfc-bg); box-shadow: var(--sfc-shadow-lg);
  animation: sfc-ctx-in .28s var(--sfc-spring) both; animation-delay: .03s; transform-origin: top left;
}
.sfc-ctx.is-mine .sfc-ctx__menu { transform-origin: top right; }
@keyframes sfc-ctx-in { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
.sfc-ctx__item {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; height: 46px; padding: 0 12px;
  border: 0; border-radius: 12px; background: none; color: var(--sfc-text); font: 500 15px/1 Inter, system-ui, sans-serif; cursor: pointer;
  text-align: left; transition: background .12s;
}
.sfc-ctx__item { position: relative; }
.sfc-ctx__item + .sfc-ctx__item::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 1px; background: var(--sfc-border); }
.sfc-ctx__item:active, .sfc-ctx__item:hover { background: var(--sfc-bg-2); }
.sfc-ctx__item .sfc-ic { width: 20px; height: 20px; color: var(--sfc-muted); }
.sfc-ctx__item.is-danger, .sfc-ctx__item.is-danger .sfc-ic { color: var(--sfc-danger); }
.sfc-ctx__more-panel {
  display: flex; flex-direction: column; border-radius: 20px; background: var(--sfc-bg);
  box-shadow: var(--sfc-shadow-lg); animation: sfc-ctx-in .26s var(--sfc-spring) both;
  width: min(336px, calc(100vw - 24px)); overflow: hidden; border: 1px solid var(--sfc-border);
}
.sfc-ctx__more-cats {
  flex: 0 0 44px; height: 44px; display: flex; align-items: center; gap: 3px; padding: 0 8px;
  background: var(--sfc-bg-2); border-bottom: 1px solid var(--sfc-border); overflow-x: auto;
  overflow-y: hidden; scrollbar-width: none; box-sizing: border-box;
}
.sfc-ctx__more-cats::-webkit-scrollbar { display: none; }
.sfc-ctx__cat-btn {
  flex: 0 0 38px; width: 38px; height: 34px; border: 0; background: none; font-size: 20px; line-height: 1;
  border-radius: 9px; cursor: pointer; opacity: .55; transition: opacity .15s, background .15s;
  display: inline-flex; align-items: center; justify-content: center;
}
.sfc-ctx__cat-btn.is-active { opacity: 1; background: var(--sfc-bg); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.sfc-ctx__more-grid {
  flex: 1 1 auto; max-height: 240px; overflow-y: auto; display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px; padding: 8px 6px 10px; align-content: start;
}
.sfc-ctx__more-grid button {
  width: 100%; aspect-ratio: 1; height: 40px; border: 0; background: none; font-size: 24px;
  border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: transform .12s, background .12s;
}
.sfc-ctx__more-grid button:active { background: var(--sfc-bg-2); transform: scale(1.25); }
.sfc-ctx.is-leaving .sfc-ctx__backdrop { animation: sfc-fade .16s ease reverse both; }
.sfc-ctx.is-leaving .sfc-ctx__stack { transition: opacity .14s, transform .14s; opacity: 0; transform: scale(.96); }

/* ==========================================================================
   Dialogs (confirm, password, media preview)
   ========================================================================== */
.sfc-dialog-wrap { position: fixed; inset: 0; z-index: 10060; display: flex; align-items: center; justify-content: center; padding: 20px; }
.sfc-dialog__backdrop { position: absolute; inset: 0; background: rgba(10, 12, 20, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: sfc-fade .2s ease both; }
.sfc-dialog {
  position: relative; width: 100%; max-width: 380px; max-height: calc(100vh - 40px); overflow-y: auto;
  border-radius: 26px; background: var(--sfc-bg); color: var(--sfc-text); box-shadow: var(--sfc-shadow-lg);
  padding: 26px 22px 18px; animation: sfc-dialog-in .34s var(--sfc-spring) both;
}
@keyframes sfc-dialog-in { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
.sfc-dialog-wrap.is-leaving .sfc-dialog__backdrop { animation: sfc-fade .18s ease reverse both; }
.sfc-dialog-wrap.is-leaving .sfc-dialog { transition: opacity .16s, transform .16s; opacity: 0; transform: translateY(10px) scale(.97); }
.sfc-dialog--swap { animation: none; }
.sfc-dialog--swap > * { opacity: 0; transform: translateX(22px); }
.sfc-dialog--swap.is-swapped > * { opacity: 1; transform: none; transition: opacity .28s var(--sfc-ease), transform .32s var(--sfc-ease); }
.sfc-dialog--swap.is-swapped > *:nth-child(2) { transition-delay: .04s; }
.sfc-dialog--swap.is-swapped > *:nth-child(3) { transition-delay: .08s; }
.sfc-dialog__hero {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 22px; display: grid; place-items: center;
  animation: sfc-pop .45s var(--sfc-spring) both .05s;
}
.sfc-dialog__hero .sfc-ic { width: 30px; height: 30px; }
.sfc-dialog__hero--danger { background: var(--sfc-danger-soft); color: var(--sfc-danger); box-shadow: 0 0 0 8px color-mix(in srgb, var(--sfc-danger) 5%, transparent); }
.sfc-dialog__hero--accent,
.sfc-dialog__hero--lock { background: var(--sfc-accent-soft); color: var(--sfc-accent); box-shadow: 0 0 0 8px var(--sfc-accent-softer); }
.sfc-dialog__body { text-align: center; }
.sfc-dialog__body h3 { margin: 0 0 8px; font: 750 19px/1.3 Inter, system-ui, sans-serif; color: var(--sfc-text); letter-spacing: -.01em; }
.sfc-dialog__body p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.55; color: var(--sfc-muted); }
.sfc-dialog__body p strong { color: var(--sfc-text); }
.sfc-dialog__step {
  display: inline-block; margin-bottom: 8px; padding: 4px 10px; border-radius: 999px; background: var(--sfc-bg-2);
  font: 700 11px/1 Inter, system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--sfc-muted);
}
.sfc-dialog__list {
  list-style: none; margin: 14px 0 0; padding: 12px; border-radius: 16px; text-align: left; display: flex; flex-direction: column; gap: 10px;
  background: color-mix(in srgb, var(--sfc-danger) 6%, var(--sfc-bg)); border: 1px solid color-mix(in srgb, var(--sfc-danger) 18%, transparent);
}
.sfc-dialog__list li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.45; color: var(--sfc-text); }
.sfc-dialog__list .sfc-ic { width: 17px; height: 17px; color: var(--sfc-danger); margin-top: 1px; }
.sfc-dialog__actions { display: flex; gap: 10px; margin-top: 20px; }
.sfc-dialog__meta { display: inline-flex !important; align-items: center; gap: 6px; font-size: 13px !important; }
.sfc-dialog__meta .sfc-ic { width: 16px; height: 16px; }
.sfc-dialog--media { padding: 12px 12px 16px; max-width: 420px; }
.sfc-dialog__media { border-radius: 18px; overflow: hidden; background: #000; margin-bottom: 14px; }
.sfc-dialog__media img, .sfc-dialog__media video { display: block; width: 100%; max-height: 52vh; object-fit: contain; }
.sfc-dialog__media--full img, .sfc-dialog__media--full video { max-height: 72vh; }
.sfc-dialog--media .sfc-dialog__body, .sfc-dialog--media .sfc-dialog__actions { padding: 0 8px; }
.sfc-btn {
  position: relative; flex: 1 1 0; height: 48px; border-radius: 14px; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 15px/1 Inter, system-ui, sans-serif; transition: transform .12s, filter .15s, background .15s, opacity .15s;
}
.sfc-btn:active:not(:disabled) { transform: scale(.97); }
.sfc-btn .sfc-ic { width: 18px; height: 18px; }
.sfc-btn--ghost { background: var(--sfc-bg-2); color: var(--sfc-text); }
.sfc-btn--primary { background: var(--sfc-accent); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--sfc-accent) 32%, transparent); }
.sfc-btn--danger { background: var(--sfc-danger); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--sfc-danger) 32%, transparent); }
.sfc-btn .sfc-spinner { display: none; position: absolute; }
.sfc-btn.is-busy { pointer-events: none; }
.sfc-btn.is-busy .sfc-btn__label { opacity: 0; }
.sfc-btn.is-busy .sfc-spinner { display: inline-block; }
.sfc-btn:disabled:not(.is-busy) { opacity: .55; }
.sfc-shake { animation: sfc-shake .42s cubic-bezier(.36, .07, .19, .97) both !important; }
@keyframes sfc-shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }

/* password */
.sfc-pass { margin-top: 16px; text-align: left; }
.sfc-pass__label { display: block; margin-bottom: 7px; font: 650 13px/1 Inter, system-ui, sans-serif; color: var(--sfc-text); }
.sfc-pass__field {
  position: relative; display: flex; align-items: center; height: 50px; border-radius: 14px; background: var(--sfc-bg-2);
  border: 1.5px solid transparent; transition: border-color .2s, box-shadow .2s, background .2s;
}
.sfc-pass__field:focus-within { border-color: var(--sfc-accent); background: var(--sfc-bg); box-shadow: 0 0 0 4px var(--sfc-accent-soft); }
.sfc-pass__field.is-invalid, .sfc-pass__field.is-invalid:focus-within { border-color: var(--sfc-danger); box-shadow: 0 0 0 4px var(--sfc-danger-soft); }
.sfc-pass__icon { position: absolute; left: 14px; color: var(--sfc-muted); display: grid; }
.sfc-pass__icon .sfc-ic { width: 18px; height: 18px; }
.sfc-pass__field input {
  flex: 1 1 auto; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--sfc-text);
  padding: 0 48px 0 42px; font: 500 16px/1 Inter, system-ui, sans-serif; letter-spacing: .02em;
}
.sfc-pass__eye { position: absolute; right: 6px; width: 38px; height: 38px; border-radius: 10px; border: 0; background: none; color: var(--sfc-muted); display: grid; place-items: center; cursor: pointer; }
.sfc-pass__eye .sfc-ic { width: 19px; height: 19px; }
.sfc-pass__error { display: flex; align-items: center; gap: 6px; margin: 8px 2px 0 !important; color: var(--sfc-danger) !important; font: 600 13px/1.4 Inter, system-ui, sans-serif !important; animation: sfc-slide-up .2s var(--sfc-ease); }

/* ==========================================================================
   Details sheet
   ========================================================================== */
body.sfc-sheet-open { overflow: hidden; }
#cl-conv-info-container .cl-conv-info-overlay { z-index: 10020; background: rgba(10, 12, 20, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.cl-conv-info-sheet.sfc-sheet {
  z-index: 10021; top: auto; left: 0; right: 0; bottom: 0; max-width: none; height: 92vh; max-height: 92vh;
  border-radius: 26px 26px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.18); animation: sfc-sheet-up .38s var(--sfc-ease) both;
  background: var(--sfc-bg);
}
@media (min-width: 768px) {
  .cl-conv-info-sheet.sfc-sheet { left: auto; top: 0; height: 100vh; max-height: none; width: 440px; border-radius: 26px 0 0 26px; animation: cl-slide-in-right .3s var(--sfc-ease); }
  .sfc-sheet__grab { display: none; }
}
@keyframes sfc-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
#cl-conv-info-container.is-leaving .cl-conv-info-sheet { transition: transform .22s ease-in; transform: translateY(100%); }
#cl-conv-info-container.is-leaving .cl-conv-info-overlay { transition: opacity .22s; opacity: 0; }
.sfc-sheet__grab { width: 40px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--sfc-muted) 35%, transparent); margin: 8px auto 0; flex: 0 0 auto; }
.sfc-sheet .cl-conv-info-header { border-bottom: 0; height: 50px; }
.sfc-sheet .cl-conv-info-close { width: 36px; height: 36px; justify-content: center; background: var(--sfc-bg-2); color: var(--sfc-text); }
.sfc-sheet .cl-conv-info-close .sfc-ic { width: 18px; height: 18px; fill: none; }
.sfc-sheet .cl-conv-info-body { padding: 4px 16px calc(28px + env(safe-area-inset-bottom, 0px)); gap: 18px; }
.sfc-sheet .cl-conv-info-section { border-top: 0; padding-top: 0; gap: 10px; }
.sfc-sheet .cl-conv-info-section__title { padding-left: 4px; }
.sfc-profile { gap: 6px; }
.sfc-profile__av {
  position: relative !important;
  width: 96px !important;
  height: 96px !important;
  padding: 3px !important;
  border-radius: 50% !important;
  box-sizing: border-box !important;
  background: linear-gradient(135deg, var(--sfc-accent), color-mix(in srgb, var(--sfc-accent) 40%, #f5a524));
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  overflow: visible !important;
  margin-top: 10px;
}
.sfc-profile__av > a {
  width: 90px !important;
  height: 90px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 3px solid var(--sfc-bg) !important;
  border-radius: 50% !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  line-height: 0 !important;
  position: relative;
  overflow: visible !important;
}
.sfc-profile__av .cl-avatar-story-ring {
  width: 84px !important;
  height: 84px !important;
  padding: 3px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box !important;
}
.sfc-profile__av .cl-avatar-story-ring__inner {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  display: block !important;
  overflow: visible !important;
}
.sfc-profile .user-avatar, .sfc-profile .user-avatar img:not(.cl-avatar-frame__overlay), .sfc-profile__av img:not(.cl-avatar-frame__overlay),
.sfc-profile__av .cl-avatar-framed, .sfc-profile__av .cl-avatar-framed__photo {
  width: 84px !important;
  height: 84px !important;
  min-width: 84px !important;
  min-height: 84px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
  position: relative;
  inset: auto;
}
.sfc-profile__av .cl-avatar-story-ring .cl-avatar-framed,
.sfc-profile__av .cl-avatar-story-ring .cl-avatar-framed__photo,
.sfc-profile__av .cl-avatar-story-ring img:not(.cl-avatar-frame__overlay) {
  width: 78px !important;
  height: 78px !important;
  min-width: 78px !important;
  min-height: 78px !important;
}
.sfc-profile__av .cl-avatar-framed__photo { overflow: hidden; border: 0; }
.sfc-profile__av.is-online::after {
  content: ""; position: absolute; right: 4px; bottom: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--sfc-online); border: 3px solid var(--sfc-bg); z-index: 25;
}
.sfc-profile .cl-conv-info-name { font-size: 20px; letter-spacing: -.01em; margin-top: 8px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; }
.sfc-profile .cl-conv-info-name .user-name-holder { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px; }
.sfc-profile .cl-conv-info-name svg { width: 18px; height: 18px; }
.sfc-profile__status.is-online { color: var(--sfc-online); font-weight: 650; }
.sfc-profile .cl-conv-info-stats { margin: 4px 0 6px; }
.sfc-qa { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 8px; width: 100%; margin-top: 6px; }
.sfc-qa__btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px; border-radius: 16px; border: 0; cursor: pointer;
  background: var(--sfc-bg-2); color: var(--sfc-text); transition: transform .12s, background .15s;
}
.sfc-qa__btn:active { transform: scale(.95); }
.sfc-qa__btn.is-on { background: var(--sfc-accent-soft); }
.sfc-qa__ic { color: var(--sfc-accent); display: grid; }
.sfc-qa__ic .sfc-ic { width: 21px; height: 21px; }
.sfc-qa__label { font: 650 12.5px/1 Inter, system-ui, sans-serif; }
.sfc-set-card, .sfc-danger-card { border-radius: 18px; background: var(--sfc-bg-2); overflow: hidden; }
.sfc-set-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0; cursor: pointer; }
.sfc-set-row + .sfc-set-row { border-top: 1px solid var(--sfc-border); }
.sfc-set-row__ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--sfc-bg); color: var(--sfc-accent); flex: 0 0 auto; }
.sfc-set-row__ic .sfc-ic { width: 19px; height: 19px; }
.sfc-set-row__txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sfc-set-row__txt strong { font: 650 15px/1.25 Inter, system-ui, sans-serif; color: var(--sfc-text); }
.sfc-set-row__txt span { font-size: 12.5px; color: var(--sfc-muted); line-height: 1.35; }
.sfc-set-row .cl-switch-toggle { flex: 0 0 auto; width: 48px; height: 28px; }
.sfc-set-row .cl-switch-toggle__slider { border-radius: 28px; background: color-mix(in srgb, var(--sfc-muted) 35%, transparent); }
.sfc-set-row .cl-switch-toggle__slider:before { width: 22px; height: 22px; transition: transform .25s var(--sfc-spring); }
.sfc-set-row .cl-switch-toggle input:checked + .cl-switch-toggle__slider { background: var(--sfc-accent); }
.sfc-set-row .cl-switch-toggle input:disabled + .cl-switch-toggle__slider { opacity: .55; }
.sfc-chips--sheet { padding: 0 0 10px; }
.sfc-chips--sheet .sfc-chip { height: 32px; padding: 0 12px; font-size: 13px; }
.sfc-shared-pane { min-height: 120px; }
.sfc-shared-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 16px; overflow: hidden; }
.sfc-shared-cell { position: relative; aspect-ratio: 1; padding: 0; border: 0; background: var(--sfc-bg-2); cursor: pointer; overflow: hidden; animation: sfc-fade .3s ease both; }
.sfc-shared-cell img, .sfc-shared-cell video { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .25s; }
.sfc-shared-cell:active img, .sfc-shared-cell:active video { transform: scale(1.06); }
.sfc-shared-cell__badge { position: absolute; inset: 0; margin: auto; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.5); color: #fff; backdrop-filter: blur(4px); }
.sfc-shared-cell__badge .sfc-ic { width: 16px; height: 16px; fill: currentColor; }
.sfc-shared-cell__tag { position: absolute; left: 6px; bottom: 6px; padding: 2px 6px; border-radius: 6px; background: rgba(0,0,0,.55); color: #fff; font: 800 9.5px/1.3 Inter, system-ui, sans-serif; letter-spacing: .06em; }
.sfc-shared-list { display: flex; flex-direction: column; gap: 8px; }
.sfc-shared-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 16px; text-align: left; cursor: pointer;
  background: var(--sfc-bg-2); color: var(--sfc-text); animation: sfc-fade .3s ease both;
}
.sfc-shared-row--voice { flex-direction: column; align-items: stretch; gap: 8px; cursor: default; }
.sfc-shared-row--voice .sfc-voice { max-width: none; background: var(--sfc-bg); }
.sfc-shared-row__meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--sfc-muted); }
.sfc-shared-row__meta strong { color: var(--sfc-text); }
.sfc-shared-row__ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--sfc-accent-soft); color: var(--sfc-accent); flex: 0 0 auto; }
.sfc-shared-row__ic .sfc-ic { width: 19px; height: 19px; }
.sfc-shared-row__txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sfc-shared-row__txt strong { font: 650 14px/1.3 Inter, system-ui, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sfc-shared-row__txt span { font-size: 12.5px; color: var(--sfc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sfc-shared-row__date { font-size: 11.5px; color: var(--sfc-muted); white-space: nowrap; }
.sfc-shared-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px; border-radius: 16px; background: var(--sfc-bg-2); color: var(--sfc-muted); font-size: 13.5px; text-align: center; }
.sfc-shared-empty .sfc-ic { width: 28px; height: 28px; opacity: .6; }
.sfc-shared-loading { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 0 0; font-size: 12.5px; color: var(--sfc-muted); }
.sfc-shared-loading .sfc-spinner { width: 14px; height: 14px; }
.sfc-danger-card { background: color-mix(in srgb, var(--sfc-danger) 6%, var(--sfc-bg)); border: 1px solid color-mix(in srgb, var(--sfc-danger) 16%, transparent); }
.sfc-danger-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--sfc-danger); }
.sfc-danger-row + .sfc-danger-row { border-top: 1px solid color-mix(in srgb, var(--sfc-danger) 14%, transparent); }
.sfc-danger-row:active { background: var(--sfc-danger-soft); }
.sfc-danger-row .sfc-ic { width: 20px; height: 20px; }
.sfc-danger-row span { display: flex; flex-direction: column; gap: 2px; }
.sfc-danger-row strong { font: 650 15px/1.25 Inter, system-ui, sans-serif; }
.sfc-danger-row small { font-size: 12.5px; color: var(--sfc-muted); }

@media (prefers-reduced-motion: reduce) {
  .sfc-chat, .sfc-msg, .sfc-react-chip, .sfc-ctx *, .sfc-dialog, .sfc-attach__item, .sfc-online-dot { animation: none !important; }
}

/* ===== Conversation row long-press sheet ===== */
.sfc-chat { transition: transform .18s ease, background-color .18s ease; -webkit-touch-callout: none; user-select: none; }
.sfc-chat.is-pressing { transform: scale(.975); background-color: rgba(0,0,0,.04); }
.sfc-rowsheet { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; }
.sfc-rowsheet__scrim { position: absolute; inset: 0; background: rgba(10,14,22,.42); opacity: 0; transition: opacity .2s ease; pointer-events: auto; }
.sfc-rowsheet__panel { position: absolute; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); border-radius: 22px; background: var(--cl-primary-bg-color, #fff); box-shadow: 0 18px 48px rgba(0,0,0,.25); padding: 6px 0 8px; transform: translateY(110%); transition: transform .26s cubic-bezier(.2,.9,.25,1); pointer-events: auto; max-width: 520px; margin: 0 auto; }
.sfc-rowsheet.is-open .sfc-rowsheet__scrim { opacity: 1; }
.sfc-rowsheet.is-open .sfc-rowsheet__panel { transform: translateY(0); }
.sfc-rowsheet__grab { width: 38px; height: 4px; border-radius: 4px; background: rgba(120,130,150,.35); margin: 4px auto 8px; }
.sfc-rowsheet__head { display: flex; align-items: center; gap: 12px; padding: 4px 18px 12px; border-bottom: 1px solid rgba(120,130,150,.15); }
.sfc-rowsheet__avatar { width: 46px; height: 46px; flex: 0 0 46px; }
.sfc-rowsheet__avatar img, .sfc-rowsheet__avatar .cl-user-avatar { width: 46px !important; height: 46px !important; border-radius: 50%; object-fit: cover; }
.sfc-rowsheet__name { font-weight: 700; font-size: 16px; color: var(--cl-primary-text-color, #14171a); display: flex; align-items: center; gap: 4px; }
.sfc-rowsheet__user { font-size: 13px; color: var(--cl-secondary-text-color, #657786); margin-top: 1px; }
.sfc-rowsheet__group { padding: 6px 0; }
.sfc-rowsheet__group + .sfc-rowsheet__group { border-top: 1px solid rgba(120,130,150,.15); }
.sfc-rowsheet__item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 20px; border: 0; background: transparent; font-size: 15px; font-weight: 500; color: var(--cl-primary-text-color, #14171a); text-align: left; }
.sfc-rowsheet__item:active { background: rgba(120,130,150,.12); }
.sfc-rowsheet__icon { width: 22px; height: 22px; display: inline-flex; color: var(--cl-secondary-text-color, #5b6576); }
.sfc-rowsheet__icon svg { width: 22px; height: 22px; }
.sfc-rowsheet__item.is-danger, .sfc-rowsheet__item.is-danger .sfc-rowsheet__icon { color: #e0245e; }
body[data-bg="dark"] .sfc-rowsheet__panel { background: #161b22; box-shadow: 0 18px 48px rgba(0,0,0,.6); }
body[data-bg="dark"] .sfc-rowsheet__name, body[data-bg="dark"] .sfc-rowsheet__item { color: #e7e9ee; }
body[data-bg="dark"] .sfc-chat.is-pressing { background-color: rgba(255,255,255,.05); }
.sfc-rowsheet__avatar { position: relative !important; width: 46px !important; height: 46px !important; flex: 0 0 46px !important; overflow: visible !important; display: inline-flex !important; align-items: center; justify-content: center; }
.sfc-rowsheet__avatar .cl-avatar-framed, .sfc-rowsheet__avatar .cl-avatar-framed__photo, .sfc-rowsheet__avatar img:not(.cl-avatar-frame__overlay) { width: 46px !important; height: 46px !important; border-radius: 50% !important; object-fit: cover !important; }

/* ===== Conversation Background Designs (10 Prebuilt + Custom Photo) ===== */
.sfc-chips .sfc-chip {
  padding: 0 12px;
}
.sfc-chip--bg {
  margin-left: auto;
  padding: 0 11px !important;
  border-color: color-mix(in srgb, var(--sfc-accent) 32%, var(--sfc-border)) !important;
  color: var(--sfc-accent) !important;
  background: color-mix(in srgb, var(--sfc-accent) 8%, var(--sfc-bg-2)) !important;
}
.sfc-chip--bg .sfc-ic {
  width: 15px;
  height: 15px;
}

/* ==========================================================================
   11 Predesigned Artistic Chat Backgrounds (Canvas Gradients + SVG Artwork)
   ========================================================================== */
body.cl-app-conversation div.conversation.conversation--modern.sfc-conv:not(.sfc-conv-bg--custom) div.conversation__body,
.sfc-conv:not(.sfc-conv-bg--custom) .conversation__body {
  background: var(--sfc-theme-canvas, linear-gradient(160deg, #f8fafc 0%, #eefcf6 52%, #f1f5f9 100%)) !important;
}

body.cl-app-conversation div.conversation.conversation--modern.sfc-conv:not(.sfc-conv-bg--custom) div.conversation__body::before,
.sfc-conv:not(.sfc-conv-bg--custom) .conversation__body::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  background-color: transparent !important;
  background-image: var(--sfc-theme-art, none) !important;
  background-size: var(--sfc-theme-art-size, 200px 200px) !important;
  background-position: center top !important;
  background-repeat: repeat !important;
  opacity: 1 !important;
}

body.cl-app-conversation div.conversation.conversation--modern.sfc-conv.sfc-conv-bg--custom div.conversation__body::before,
.sfc-conv.sfc-conv-bg--custom .conversation__body::before {
  display: none !important;
}

/* 1. Social Doodle (default) */
.sfc-conv,
.sfc-conv.sfc-conv-bg--default,
.sfc-bg-swatch__preview--default {
  --sfc-theme-canvas:
    radial-gradient(circle at 18% 18%, rgba(16, 185, 129, 0.16) 0%, transparent 52%),
    radial-gradient(circle at 82% 82%, rgba(14, 165, 233, 0.14) 0%, transparent 55%),
    linear-gradient(160deg, #f8fafc 0%, #ecfdf5 50%, #f1f5f9 100%);
  --sfc-theme-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160' fill='none'%3E%3Cg stroke='%2310b981' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' opacity='0.38'%3E%3Cpath d='M18 28c0-6.6 6.3-12 14-12s14 5.4 14 12-6.3 12-14 12c-2.2 0-4.3-.4-6.1-1.2L19 42l1.8-5.8C19 33.9 18 31 18 28z'/%3E%3Cpath d='M29 25.5c-1.5-1.8-4.2-1.5-5 .6-.8 2.1 1.2 4.3 5 6.9 3.8-2.6 5.8-4.8 5-6.9-.8-2.1-3.5-2.4-5-.6z' fill='%2310b981' fill-opacity='0.18'/%3E%3Cpath d='M112 24l28-10-10 28-6-11-12-7z' fill='%2310b981' fill-opacity='0.14'/%3E%3Cpath d='M140 14l-18 17'/%3E%3Cpath d='M76 16l2.5 6.5L85 25l-6.5 2.5L76 34l-2.5-6.5L67 25l6.5-2.5L76 16z' fill='%2310b981' fill-opacity='0.2'/%3E%3Cpath d='M34 102l-9 14h8l-3 12 11-15h-8l1-11z' fill='%2310b981' fill-opacity='0.18'/%3E%3Cpath d='M118 116l4 8 9 1.3-6.5 6.3 1.5 9-8-4.2-8 4.2 1.5-9-6.5-6.3 9-1.3 4-8z' fill='%2310b981' fill-opacity='0.15'/%3E%3C/g%3E%3Cg stroke='%230d9488' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round' opacity='0.32'%3E%3Ccircle cx='78' cy='80' r='13' fill='%2314b8a6' fill-opacity='0.1'/%3E%3Cpath d='M73 83c1.5 2.5 4 3.5 5 3.5s3.5-1 5-3.5'/%3E%3Ccircle cx='73.5' cy='76.5' r='1.3' fill='%230d9488'/%3E%3Ccircle cx='82.5' cy='76.5' r='1.3' fill='%230d9488'/%3E%3Cpath d='M122 68v16M134 64v16M122 68l12-4'/%3E%3Ccircle cx='119' cy='84' r='3.2' fill='%230d9488' fill-opacity='0.25'/%3E%3Ccircle cx='131' cy='80' r='3.2' fill='%230d9488' fill-opacity='0.25'/%3E%3Cpath d='M26 68c-2.5-3-7-2.5-8.4 1-1.4 3.5 2 7.2 8.4 11.5 6.4-4.3 9.8-8 8.4-11.5-1.4-3.5-5.9-4-8.4-1z' fill='%2314b8a6' fill-opacity='0.16'/%3E%3Cpath d='M72 132l4-10 6 6 6-6 4 10H72z' fill='%2310b981' fill-opacity='0.18'/%3E%3Ccircle cx='52' cy='54' r='3'/%3E%3Ccircle cx='104' cy='102' r='2.5'/%3E%3C/g%3E%3C/svg%3E");
}
body[data-bg="dark"] .sfc-conv.sfc-conv-bg--default {
  --sfc-theme-canvas:
    radial-gradient(circle at 18% 18%, rgba(16, 185, 129, 0.16) 0%, transparent 52%),
    radial-gradient(circle at 82% 82%, rgba(14, 165, 233, 0.14) 0%, transparent 55%),
    linear-gradient(160deg, #0b141a 0%, #0f1d24 52%, #091015 100%);
}

/* 2. Emerald Leaf (emerald_vibe) */
.sfc-conv.sfc-conv-bg--emerald_vibe,
.sfc-bg-swatch__preview--emerald_vibe {
  --sfc-theme-canvas:
    radial-gradient(circle at 16% 18%, rgba(16, 185, 129, 0.42) 0%, transparent 52%),
    radial-gradient(circle at 84% 82%, rgba(5, 150, 105, 0.36) 0%, transparent 55%),
    linear-gradient(160deg, #d1fae5 0%, #a7f3d0 50%, #ecfdf5 100%);
  --sfc-theme-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160' fill='none'%3E%3Cg stroke='%23047857' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' opacity='0.38'%3E%3Cpath d='M16 44C16 22 38 14 54 16c2 16-6 38-28 38-4 0-7.5-1-10-10z' fill='%2310b981' fill-opacity='0.26'/%3E%3Cpath d='M16 44L48 20M28 35l-4-11M37 28l-3-9M31 39l11-2'/%3E%3Cpath d='M106 26c18-10 38 2 42 18-14 10-36 12-46-4-2-4-1-9 4-14z' fill='%23059669' fill-opacity='0.22'/%3E%3Cpath d='M104 34l38 8M118 37l6-9M129 39l5-7M120 40l-8 7'/%3E%3Cpath d='M64 88c6-20 28-28 44-22-2 18-16 34-36 34-5 0-9-4-8-12z' fill='%2310b981' fill-opacity='0.24'/%3E%3Cpath d='M62 96l38-24M76 87l-2-11M87 80l-2-9M82 88l11 1'/%3E%3Cpath d='M18 118c12-16 34-16 46-4-10 14-30 22-44 14-3-2-4-6-2-10z' fill='%23047857' fill-opacity='0.2'/%3E%3Cpath d='M18 126l40-10'/%3E%3Cpath d='M112 114c10-16 30-18 40-8-6 16-24 26-38 20-3-2-4-7-2-12z' fill='%2310b981' fill-opacity='0.24'/%3E%3Cpath d='M112 124l34-14'/%3E%3Ccircle cx='78' cy='38' r='4' fill='%23ffffff' fill-opacity='0.55'/%3E%3Ccircle cx='34' cy='82' r='3.5' fill='%23ffffff' fill-opacity='0.55'/%3E%3Ccircle cx='132' cy='84' r='4.5' fill='%23ffffff' fill-opacity='0.55'/%3E%3Ccircle cx='84' cy='138' r='3.5' fill='%23ffffff' fill-opacity='0.55'/%3E%3C/g%3E%3C/svg%3E");
}
body[data-bg="dark"] .sfc-conv.sfc-conv-bg--emerald_vibe {
  --sfc-theme-canvas:
    radial-gradient(circle at 16% 18%, rgba(16, 185, 129, 0.32) 0%, transparent 52%),
    radial-gradient(circle at 84% 82%, rgba(5, 150, 105, 0.28) 0%, transparent 55%),
    linear-gradient(165deg, #041f17 0%, #063024 52%, #031710 100%);
}

/* 3. Habesha Tibeb (habesha_tibeb) — Ethiopian Cultural Geometric Weave */
.sfc-conv.sfc-conv-bg--habesha_tibeb,
.sfc-bg-swatch__preview--habesha_tibeb {
  --sfc-theme-canvas:
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.24) 0%, transparent 52%),
    radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.28) 0%, transparent 55%),
    linear-gradient(160deg, #fffbeb 0%, #fef3c7 48%, #ecfdf5 100%);
  --sfc-theme-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160' fill='none'%3E%3Cg opacity='0.44'%3E%3Cpath d='M80 12L106 38L80 64L54 38Z' stroke='%23d97706' stroke-width='2' fill='%23f59e0b' fill-opacity='0.16'/%3E%3Cpath d='M80 22L96 38L80 54L64 38Z' stroke='%23059669' stroke-width='1.8' fill='%2310b981' fill-opacity='0.18'/%3E%3Cpath d='M80 31L87 38L80 45L73 38Z' fill='%23e11d48' fill-opacity='0.5'/%3E%3Cpath d='M28 84L52 108L28 132L4 108Z' stroke='%23059669' stroke-width='2' fill='%2310b981' fill-opacity='0.15'/%3E%3Cpath d='M28 93L43 108L28 123L13 108Z' stroke='%23d97706' stroke-width='1.8' fill='%23f59e0b' fill-opacity='0.18'/%3E%3Cpath d='M28 102L34 108L28 114L22 108Z' fill='%23e11d48' fill-opacity='0.48'/%3E%3Cpath d='M132 84L156 108L132 132L108 108Z' stroke='%23059669' stroke-width='2' fill='%2310b981' fill-opacity='0.15'/%3E%3Cpath d='M132 93L147 108L132 123L117 108Z' stroke='%23d97706' stroke-width='1.8' fill='%23f59e0b' fill-opacity='0.18'/%3E%3Cpath d='M132 102L138 108L132 114L126 108Z' fill='%23e11d48' fill-opacity='0.48'/%3E%3Cpath d='M-16 62l16 10 16-10 16 10 16-10 16 10 16-10 16 10 16-10 16 10 16-10 16 10 16-10' stroke='%23d97706' stroke-width='1.8'/%3E%3Cpath d='M-16 67l16 10 16-10 16 10 16-10 16 10 16-10 16 10 16-10 16 10 16-10 16 10 16-10' stroke='%23059669' stroke-width='1.6'/%3E%3Cpath d='M-16 138l16 10 16-10 16 10 16-10 16 10 16-10 16 10 16-10 16 10 16-10 16 10 16-10' stroke='%23e11d48' stroke-width='1.6' stroke-opacity='0.75'/%3E%3Cpath d='M24 26v24M12 38h24M136 26v24M124 38h24M80 96v24M68 108h24' stroke='%23b45309' stroke-width='2' stroke-linecap='round'/%3E%3C/g%3E%3C/svg%3E");
}
body[data-bg="dark"] .sfc-conv.sfc-conv-bg--habesha_tibeb {
  --sfc-theme-canvas:
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.24) 0%, transparent 52%),
    radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.24) 0%, transparent 55%),
    linear-gradient(160deg, #1c1608 0%, #241c0b 50%, #0a2118 100%);
}

/* 4. Midnight Aurora (midnight_aurora) */
.sfc-conv.sfc-conv-bg--midnight_aurora,
.sfc-bg-swatch__preview--midnight_aurora {
  --sfc-theme-canvas:
    radial-gradient(ellipse at 20% 18%, rgba(45, 212, 191, 0.44) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 78%, rgba(56, 189, 248, 0.38) 0%, transparent 55%),
    linear-gradient(165deg, #050c18 0%, #0b1e36 50%, #042824 100%);
  --sfc-theme-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160' fill='none'%3E%3Cpath d='M-80 40Q-40 58 0 40T80 40T160 40T240 40' stroke='%232dd4bf' stroke-width='3.5' opacity='0.38'/%3E%3Cpath d='M-80 50Q-40 68 0 50T80 50T160 50T240 50' stroke='%2338bdf8' stroke-width='2.2' opacity='0.34'/%3E%3Cpath d='M-80 118Q-40 134 0 118T80 118T160 118T240 118' stroke='%2334d399' stroke-width='3' opacity='0.32'/%3E%3Cpath d='M124 18a13 13 0 1 1-11 20 10 10 0 0 0 11-20z' fill='%23fde047' fill-opacity='0.65'/%3E%3Cg stroke='%237dd3fc' stroke-width='1.2' opacity='0.5'%3E%3Cpath d='M24 82l22-12 20 14 24-18' stroke-dasharray='2 3'/%3E%3Ccircle cx='24' cy='82' r='2.8' fill='%23ffffff'/%3E%3Ccircle cx='46' cy='70' r='2.4' fill='%235eead4'/%3E%3Ccircle cx='66' cy='84' r='2.8' fill='%23ffffff'/%3E%3Ccircle cx='90' cy='66' r='2.4' fill='%2338bdf8'/%3E%3C/g%3E%3Cpath d='M36 16l2.5 6.5L45 25l-6.5 2.5L36 34l-2.5-6.5L27 25l6.5-2.5L36 16z' fill='%235eead4' fill-opacity='0.65'/%3E%3Cpath d='M126 84l2 5.5 5.5 2-5.5 2-2 5.5-2-5.5-5.5-2 5.5-2 2-5.5z' fill='%2338bdf8' fill-opacity='0.65'/%3E%3Cpath d='M54 132l2 5 5 2-5 2-2 5-2-5-5-2 5-2 2-5z' fill='%23ffffff' fill-opacity='0.6'/%3E%3Cpath d='M98 16l-18 12' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' opacity='0.55'/%3E%3Ccircle cx='80' cy='28' r='2' fill='%23ffffff' fill-opacity='0.75'/%3E%3C/svg%3E");
}

/* 5. Royal Gold (royal_gold) */
.sfc-conv.sfc-conv-bg--royal_gold,
.sfc-bg-swatch__preview--royal_gold {
  --sfc-theme-canvas:
    radial-gradient(circle at 80% 18%, rgba(251, 191, 36, 0.38) 0%, transparent 52%),
    radial-gradient(circle at 20% 82%, rgba(217, 119, 6, 0.30) 0%, transparent 55%),
    linear-gradient(160deg, #140e05 0%, #2b1f0b 50%, #100b04 100%);
  --sfc-theme-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160' fill='none'%3E%3Cg stroke='%23fbbf24' stroke-width='1.6' opacity='0.44'%3E%3Cpath d='M80 14l8 18 18-8-8 18 18 8-18 8 8 18-18-8-8 18-8-18-18 8 8-18-18-8 18-8-8-18 18 8 8-18z' fill='%23f59e0b' fill-opacity='0.16'/%3E%3Ccircle cx='80' cy='46' r='10' fill='%23fbbf24' fill-opacity='0.22'/%3E%3Cpath d='M28 96l6 14 14-6-6 14 14 6-14 6 6 14-14-6-6 14-6-14-14 6 6-14-14-6 14-6-6-14 14 6 6-14z' fill='%23f59e0b' fill-opacity='0.15'/%3E%3Ccircle cx='28' cy='122' r='7' fill='%23fde047' fill-opacity='0.22'/%3E%3Cpath d='M132 96l6 14 14-6-6 14 14 6-14 6 6 14-14-6-6 14-6-14-14 6 6-14-14-6 14-6-6-14 14 6 6-14z' fill='%23f59e0b' fill-opacity='0.15'/%3E%3Ccircle cx='132' cy='122' r='7' fill='%23fde047' fill-opacity='0.22'/%3E%3Cpath d='M66 122l4-12 10 7 10-7 4 12H66z' fill='%23fbbf24' fill-opacity='0.28' stroke-linejoin='round'/%3E%3Cpath d='M16 32l12-12 12 12-12 12-12-12zM120 32l12-12 12 12-12 12-12-12z' fill='%23f59e0b' fill-opacity='0.18'/%3E%3Ccircle cx='80' cy='90' r='2.5' fill='%23fde047'/%3E%3Ccircle cx='28' cy='68' r='2.2' fill='%23fde047'/%3E%3Ccircle cx='132' cy='68' r='2.2' fill='%23fde047'/%3E%3C/g%3E%3C/svg%3E");
}

/* 6. Ocean Waves (ocean_breeze) */
.sfc-conv.sfc-conv-bg--ocean_breeze,
.sfc-bg-swatch__preview--ocean_breeze {
  --sfc-theme-canvas:
    radial-gradient(circle at 22% 20%, rgba(14, 165, 233, 0.38) 0%, transparent 55%),
    radial-gradient(circle at 82% 80%, rgba(6, 182, 212, 0.32) 0%, transparent 55%),
    linear-gradient(160deg, #dff2fe 0%, #bae6fd 50%, #cffafe 100%);
  --sfc-theme-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160' fill='none'%3E%3Cg stroke='%230284c7' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' opacity='0.38'%3E%3Cpath d='M-40 36c14-14 26-14 40 0 14-14 26-14 40 0 14-14 26-14 40 0 14-14 26-14 40 0 14-14 26-14 40 0 14-14 26-14 40 0'/%3E%3Cpath d='M-40 44c14-14 26-14 40 0 14-14 26-14 40 0 14-14 26-14 40 0 14-14 26-14 40 0 14-14 26-14 40 0 14-14 26-14 40 0' stroke='%2306b6d4'/%3E%3Cpath d='M-20 96c14-14 26-14 40 0 14-14 26-14 40 0 14-14 26-14 40 0 14-14 26-14 40 0 14-14 26-14 40 0'/%3E%3Cpath d='M-20 104c14-14 26-14 40 0 14-14 26-14 40 0 14-14 26-14 40 0 14-14 26-14 40 0 14-14 26-14 40 0' stroke='%2306b6d4'/%3E%3Cpath d='M36 62c0-8 7-14 15-14s15 6 15 14l-15 8-15-8z' fill='%230ea5e9' fill-opacity='0.22'/%3E%3Cpath d='M51 70L42 54M51 70V50M51 70l9-16'/%3E%3Cpath d='M118 122l4 8 9 1-6.5 6 1.5 9-8-4.5-8 4.5 1.5-9-6.5-6 9-1 4-8z' fill='%230284c7' fill-opacity='0.22'/%3E%3Ccircle cx='116' cy='62' r='6' fill='%23ffffff' fill-opacity='0.5'/%3E%3Ccircle cx='128' cy='52' r='3.5' fill='%23ffffff' fill-opacity='0.55'/%3E%3Ccircle cx='46' cy='132' r='5' fill='%23ffffff' fill-opacity='0.5'/%3E%3Ccircle cx='58' cy='122' r='3' fill='%23ffffff' fill-opacity='0.55'/%3E%3C/g%3E%3C/svg%3E");
}
body[data-bg="dark"] .sfc-conv.sfc-conv-bg--ocean_breeze {
  --sfc-theme-canvas:
    radial-gradient(circle at 22% 20%, rgba(14, 165, 233, 0.32) 0%, transparent 55%),
    radial-gradient(circle at 82% 80%, rgba(6, 182, 212, 0.26) 0%, transparent 55%),
    linear-gradient(160deg, #061826 0%, #0a2940 52%, #05131f 100%);
}

/* 7. Sunset Mirage (sunset_glow) */
.sfc-conv.sfc-conv-bg--sunset_glow,
.sfc-bg-swatch__preview--sunset_glow {
  --sfc-theme-canvas:
    radial-gradient(circle at 25% 20%, rgba(244, 63, 94, 0.36) 0%, transparent 52%),
    radial-gradient(circle at 78% 80%, rgba(251, 146, 60, 0.38) 0%, transparent 55%),
    linear-gradient(160deg, #ffe4e6 0%, #ffedd5 48%, #fef3c7 100%);
  --sfc-theme-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160' fill='none'%3E%3Ccircle cx='80' cy='52' r='22' fill='%23fb7185' fill-opacity='0.28' stroke='%23e11d48' stroke-width='1.6' stroke-opacity='0.35'/%3E%3Ccircle cx='80' cy='52' r='30' stroke='%23f97316' stroke-width='1.4' stroke-dasharray='4 4' opacity='0.4'/%3E%3Cpath d='M0 84L32 60L60 80L96 50L130 78L160 84V92H0Z' fill='%23f43f5e' fill-opacity='0.18'/%3E%3Cpath d='M-30 78L0 84L32 60L60 80L96 50L130 78L160 84L192 60' stroke='%23e11d48' stroke-width='1.8' stroke-linejoin='round' opacity='0.38'/%3E%3Cpath d='M-80 136Q-40 150 0 136T80 136T160 136T240 136' stroke='%23f97316' stroke-width='2.2' opacity='0.42'/%3E%3Cpath d='M-80 146Q-40 160 0 146T80 146T160 146T240 146' stroke='%23e11d48' stroke-width='1.8' opacity='0.34'/%3E%3Cpath d='M24 30c4-4 9-4 12 0 3-4 8-4 12 0M114 24c3-3 7-3 9 0 2-3 6-3 9 0M42 112c4-4 8-4 11 0 3-4 7-4 11 0M106 116c3-3 7-3 10 0 3-3 7-3 10 0' stroke='%23be123c' stroke-width='1.8' stroke-linecap='round' opacity='0.42'/%3E%3C/svg%3E");
}
body[data-bg="dark"] .sfc-conv.sfc-conv-bg--sunset_glow {
  --sfc-theme-canvas:
    radial-gradient(circle at 25% 20%, rgba(244, 63, 94, 0.32) 0%, transparent 55%),
    radial-gradient(circle at 78% 80%, rgba(251, 146, 60, 0.28) 0%, transparent 55%),
    linear-gradient(160deg, #240a12 0%, #2e1508 52%, #19070c 100%);
}

/* 8. Cosmic Nebula (cosmic_purple) */
.sfc-conv.sfc-conv-bg--cosmic_purple,
.sfc-bg-swatch__preview--cosmic_purple {
  --sfc-theme-canvas:
    radial-gradient(circle at 78% 20%, rgba(192, 132, 252, 0.44) 0%, transparent 52%),
    radial-gradient(circle at 22% 80%, rgba(99, 102, 241, 0.40) 0%, transparent 55%),
    linear-gradient(165deg, #0e0622 0%, #231454 50%, #120629 100%);
  --sfc-theme-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160' fill='none'%3E%3Cg opacity='0.52'%3E%3Ccircle cx='46' cy='46' r='14' fill='%23c084fc' fill-opacity='0.35' stroke='%23e9d5ff' stroke-width='1.6'/%3E%3Cellipse cx='46' cy='46' rx='26' ry='8' transform='rotate(-22 46 46)' stroke='%23f472b6' stroke-width='2'/%3E%3Ccircle cx='118' cy='112' r='12' fill='%23818cf8' fill-opacity='0.35' stroke='%23c7d2fe' stroke-width='1.6'/%3E%3Cellipse cx='118' cy='112' rx='22' ry='7' transform='rotate(24 118 112)' stroke='%2338bdf8' stroke-width='1.8'/%3E%3Cpath d='M116 24l3 7 7 3-7 3-3 7-3-7-7-3 7-3 3-7z' fill='%23f472b6'/%3E%3Cpath d='M32 114l2.5 6 6 2.5-6 2.5-2.5 6-2.5-6-6-2.5 6-2.5 2.5-6z' fill='%23fde047'/%3E%3Cpath d='M84 74c8-8 20-4 18 8-2 10-16 12-22 2-5-8 2-20 14-20' stroke='%23e9d5ff' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='88' cy='22' r='2.2' fill='%23ffffff'/%3E%3Ccircle cx='138' cy='66' r='2.5' fill='%23ffffff'/%3E%3Ccircle cx='22' cy='82' r='2' fill='%23ffffff'/%3E%3Ccircle cx='74' cy='136' r='2.5' fill='%23ffffff'/%3E%3C/g%3E%3C/svg%3E");
}

/* 9. Sakura Bloom (rose_quartz) */
.sfc-conv.sfc-conv-bg--rose_quartz,
.sfc-bg-swatch__preview--rose_quartz {
  --sfc-theme-canvas:
    radial-gradient(circle at 20% 22%, rgba(236, 72, 153, 0.34) 0%, transparent 55%),
    radial-gradient(circle at 82% 78%, rgba(244, 114, 182, 0.32) 0%, transparent 55%),
    linear-gradient(160deg, #fce7f3 0%, #ffe4e6 50%, #fdf2f8 100%);
  --sfc-theme-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160' fill='none'%3E%3Cg stroke='%23db2777' stroke-width='1.6' opacity='0.42'%3E%3Cg transform='translate(42,42)'%3E%3Ccircle cx='0' cy='-11' r='8' fill='%23f472b6' fill-opacity='0.32'/%3E%3Ccircle cx='10.5' cy='-3.4' r='8' fill='%23f472b6' fill-opacity='0.32'/%3E%3Ccircle cx='6.5' cy='9' r='8' fill='%23f472b6' fill-opacity='0.32'/%3E%3Ccircle cx='-6.5' cy='9' r='8' fill='%23f472b6' fill-opacity='0.32'/%3E%3Ccircle cx='-10.5' cy='-3.4' r='8' fill='%23f472b6' fill-opacity='0.32'/%3E%3Ccircle cx='0' cy='0' r='4.5' fill='%23fef08a'/%3E%3C/g%3E%3Cg transform='translate(118,108)'%3E%3Ccircle cx='0' cy='-10' r='7.5' fill='%23ec4899' fill-opacity='0.28'/%3E%3Ccircle cx='9.5' cy='-3' r='7.5' fill='%23ec4899' fill-opacity='0.28'/%3E%3Ccircle cx='6' cy='8' r='7.5' fill='%23ec4899' fill-opacity='0.28'/%3E%3Ccircle cx='-6' cy='8' r='7.5' fill='%23ec4899' fill-opacity='0.28'/%3E%3Ccircle cx='-9.5' cy='-3' r='7.5' fill='%23ec4899' fill-opacity='0.28'/%3E%3Ccircle cx='0' cy='0' r='4' fill='%23fef08a'/%3E%3C/g%3E%3Cpath d='M110 28c6-6 16-2 14 7-2 8-12 10-16 4-4-5-2-13 2-11z' fill='%23f472b6' fill-opacity='0.35'/%3E%3Cpath d='M36 116c6-6 16-2 14 7-2 8-12 10-16 4-4-5-2-13 2-11z' fill='%23f472b6' fill-opacity='0.35'/%3E%3Cpath d='M78 76c5-5 12-1 10 5-2 6-9 8-12 3-3-4-1-9 2-8z' fill='%23ec4899' fill-opacity='0.3'/%3E%3Ccircle cx='86' cy='32' r='3' fill='%23ffffff' fill-opacity='0.7' stroke='none'/%3E%3Ccircle cx='24' cy='84' r='3.5' fill='%23ffffff' fill-opacity='0.7' stroke='none'/%3E%3Ccircle cx='78' cy='136' r='3' fill='%23ffffff' fill-opacity='0.7' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
}
body[data-bg="dark"] .sfc-conv.sfc-conv-bg--rose_quartz {
  --sfc-theme-canvas:
    radial-gradient(circle at 20% 22%, rgba(236, 72, 153, 0.30) 0%, transparent 55%),
    radial-gradient(circle at 82% 78%, rgba(244, 114, 182, 0.26) 0%, transparent 55%),
    linear-gradient(160deg, #240819 0%, #300d22 52%, #170510 100%);
}

/* 10. Cyber Neon (cyber_neon) */
.sfc-conv.sfc-conv-bg--cyber_neon,
.sfc-bg-swatch__preview--cyber_neon {
  --sfc-theme-canvas:
    radial-gradient(circle at 18% 20%, rgba(34, 211, 238, 0.38) 0%, transparent 52%),
    radial-gradient(circle at 85% 80%, rgba(232, 121, 249, 0.36) 0%, transparent 52%),
    linear-gradient(165deg, #060814 0%, #101936 48%, #1c092b 100%);
  --sfc-theme-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160' fill='none'%3E%3Cg stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round' opacity='0.48'%3E%3Cpolygon points='44,16 68,30 68,58 44,72 20,58 20,30' stroke='%2322d3ee' fill='%2306b6d4' fill-opacity='0.14'/%3E%3Cpolygon points='116,84 140,98 140,126 116,140 92,126 92,98' stroke='%23e879f9' fill='%23d946ef' fill-opacity='0.14'/%3E%3Cpolygon points='118,20 138,54 98,54' stroke='%23e879f9' fill='%23e879f9' fill-opacity='0.12'/%3E%3Cpolygon points='42,96 62,130 22,130' stroke='%2322d3ee' fill='%2322d3ee' fill-opacity='0.12'/%3E%3Cpath d='M68 44h22l10-10M20 84h36l12 12h24M68 112h24' stroke='%2338bdf8'/%3E%3Ccircle cx='100' cy='34' r='3' fill='%2322d3ee'/%3E%3Ccircle cx='56' cy='84' r='3' fill='%23e879f9'/%3E%3Ccircle cx='80' cy='144' r='3' fill='%2322d3ee'/%3E%3C/g%3E%3C/svg%3E");
}

/* 11. Sahara Dune (warm_sand) */
.sfc-conv.sfc-conv-bg--warm_sand,
.sfc-bg-swatch__preview--warm_sand {
  --sfc-theme-canvas:
    radial-gradient(circle at 25% 20%, rgba(245, 158, 11, 0.32) 0%, transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(217, 119, 6, 0.28) 0%, transparent 55%),
    linear-gradient(160deg, #fef3c7 0%, #fde68a 50%, #fffbeb 100%);
  --sfc-theme-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160' fill='none'%3E%3Cg stroke='%23b45309' stroke-width='1.7' opacity='0.38'%3E%3Cpath d='M-80 34Q-40 50 0 34T80 34T160 34T240 34' fill='%23f59e0b' fill-opacity='0.14'/%3E%3Cpath d='M-80 44Q-40 60 0 44T80 44T160 44T240 44' stroke='%23d97706' stroke-dasharray='6 4'/%3E%3Cpath d='M-80 98Q-40 82 0 98T80 98T160 98T240 98' fill='%23d97706' fill-opacity='0.14'/%3E%3Cpath d='M-80 108Q-40 92 0 108T80 108T160 108T240 108' stroke='%23f59e0b'/%3E%3Cpath d='M-80 146Q-40 160 0 146T80 146T160 146T240 146'/%3E%3Cpath d='M44 56l4 10 10 4-10 4-4 10-4-10-10-4 10-4 4-10z' fill='%23f59e0b' fill-opacity='0.28'/%3E%3Cpath d='M120 48l3 8 8 3-8 3-3 8-3-8-8-3 8-3 3-8z' fill='%23b45309' fill-opacity='0.24'/%3E%3Ccircle cx='84' cy='68' r='3' fill='%23d97706'/%3E%3Ccircle cx='32' cy='124' r='2.5' fill='%23d97706'/%3E%3Ccircle cx='128' cy='126' r='3' fill='%23d97706'/%3E%3C/g%3E%3C/svg%3E");
}
body[data-bg="dark"] .sfc-conv.sfc-conv-bg--warm_sand {
  --sfc-theme-canvas:
    radial-gradient(circle at 25% 20%, rgba(245, 158, 11, 0.26) 0%, transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(217, 119, 6, 0.22) 0%, transparent 55%),
    linear-gradient(160deg, #1f1707 0%, #2b2009 52%, #140f04 100%);
}

.sfc-conv.sfc-conv-bg--custom .conversation__body {
  background-image: linear-gradient(180deg, rgba(10, 15, 24, 0.28) 0%, rgba(10, 15, 24, 0.42) 100%), var(--sfc-custom-bg-image) !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

.sfc-conv.sfc-conv-bg--dark .sfc-day span {
  background: rgba(15, 23, 42, 0.78);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.12);
}
.sfc-conv.sfc-conv-bg--dark .sfc-empty--conv {
  color: #e2e8f0;
}
.sfc-conv.sfc-conv-bg--dark .sfc-empty--conv h4 {
  color: #ffffff;
}

/* Background Picker Grid & Modal */
.sfc-bg-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 4px;
}
.sfc-bg-sec-link {
  border: 0;
  background: none;
  color: var(--sfc-accent);
  font: 650 12.5px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
}
.sfc-bg-sec-link:active {
  background: var(--sfc-accent-soft);
}
.sfc-bg-details-card {
  padding: 12px;
}
.sfc-bg-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 8px;
}
.sfc-bg-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: center;
  color: var(--sfc-text);
}
.sfc-bg-swatch__preview {
  position: relative;
  width: 100%;
  aspect-ratio: 0.78;
  border-radius: 14px;
  border: 2px solid color-mix(in srgb, var(--sfc-text) 12%, transparent);
  background: var(--sfc-theme-canvas, var(--sfc-bg-2));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 6px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  isolation: isolate;
}
.sfc-bg-swatch__preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--sfc-theme-art, none);
  background-size: 92px 92px;
  background-position: center top;
  background-repeat: repeat;
  z-index: 0;
  pointer-events: none;
}
.sfc-bg-swatch--custom .sfc-bg-swatch__preview::before {
  display: none;
}
.sfc-bg-swatch:active .sfc-bg-swatch__preview {
  transform: scale(0.95);
}
.sfc-bg-swatch.is-active .sfc-bg-swatch__preview {
  border-color: var(--sfc-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--sfc-accent) 28%, transparent);
}
.sfc-bg-swatch__bubbles {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  margin-bottom: 4px;
  pointer-events: none;
}
.sfc-bg-swatch__bubbles i {
  display: block;
  height: 6.5px;
  border-radius: 6px;
}
.sfc-bg-swatch__bubbles i.b-in {
  width: 66%;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 3px rgba(0,0,0,0.16);
}
.sfc-bg-swatch__bubbles i.b-out {
  width: 66%;
  align-self: flex-end;
  background: var(--sfc-accent);
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
.sfc-bg-swatch__check {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 3;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--sfc-accent);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.sfc-bg-swatch__check .sfc-ic {
  width: 12px;
  height: 12px;
}
.sfc-bg-swatch__num {
  position: absolute;
  top: 4px;
  right: 5px;
  z-index: 3;
  padding: 2px 4.5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(4px);
  font: 700 9px/1 Inter, system-ui, sans-serif;
  color: #0f172a;
}
.sfc-bg-swatch--custom .sfc-bg-swatch__preview {
  background: linear-gradient(135deg, color-mix(in srgb, var(--sfc-accent) 18%, var(--sfc-bg)), var(--sfc-bg-2));
  border-style: dashed;
  border-color: color-mix(in srgb, var(--sfc-accent) 55%, var(--sfc-border));
  align-items: center;
  justify-content: center;
}
.sfc-bg-swatch__cam {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.16);
  color: var(--sfc-accent);
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
}
.sfc-bg-swatch__cam .sfc-ic {
  width: 16px;
  height: 16px;
}
.sfc-bg-swatch__name {
  font: 600 11px/1.2 Inter, system-ui, sans-serif;
  color: var(--sfc-text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sfc-bg-reset-btn {
  margin-top: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--sfc-border);
  background: var(--sfc-bg);
  color: var(--sfc-muted);
  font: 600 12.5px/1.2 Inter, system-ui, sans-serif;
  cursor: pointer;
}
.sfc-bg-reset-btn:active {
  background: var(--sfc-bg-2);
}
.sfc-bg-modal__panel {
  padding: 6px 16px calc(18px + env(safe-area-inset-bottom, 0px)) !important;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
}
.sfc-bg-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 2px 10px;
}
.sfc-bg-modal__title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sfc-bg-modal__ic {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--sfc-accent-soft);
  color: var(--sfc-accent);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.sfc-bg-modal__ic .sfc-ic {
  width: 20px;
  height: 20px;
}
.sfc-bg-modal__title h3 {
  margin: 0;
  font: 700 16.5px/1.2 Inter, system-ui, sans-serif;
  color: var(--sfc-text);
}
.sfc-bg-modal__title p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--sfc-muted);
}
.sfc-bg-scope-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 13px;
  background: var(--sfc-bg-2);
  margin-bottom: 12px;
}
.sfc-bg-scope-tab {
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  font: 650 13px/1.2 Inter, system-ui, sans-serif;
  background: transparent;
  color: var(--sfc-muted);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sfc-bg-scope-tab.is-active {
  background: var(--sfc-bg);
  color: var(--sfc-accent);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.sfc-bg-scope-subtitle {
  font-size: 12.5px;
  color: var(--sfc-muted);
  margin-bottom: 10px;
  padding: 0 2px;
}
.sfc-bg-modal__body {
  overflow-y: auto;
  padding: 2px 0 4px;
}
