.sx-chat-page,
body.sx-embedded-chat {
  margin: 0;
  background: #090d15;
  color: #edf3fd;
  color-scheme: dark;
  overflow: hidden;
  font: 16px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.sx-embedded-chat > header,
body.sx-embedded-chat > #app-navigation,
body.sx-embedded-chat > .utility-bar,
body.sx-embedded-chat > .floating-navigation,
body.sx-embedded-chat > .appearance-control { display: none !important; }
body.sx-embedded-chat > main { padding: 0; margin: 0; width: auto; max-width: none; }

.sx-chat,
.sx-access {
  --sx-text: #edf3fd;
  --sx-muted: #9cacc4;
  --sx-bg: #090d15;
  --sx-rail: #111a29;
  --sx-line: #27344a;
  --sx-blue: #79b4ff;
  --sx-accent: #356fe0;
  color: var(--sx-text);
  color-scheme: dark;
  font: 16px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sx-chat *, .sx-access * { box-sizing: border-box; }
.sx-chat [hidden], .sx-access [hidden] { display: none !important; }
.sx-chat button, .sx-access button, .sx-chat input, .sx-chat textarea, .sx-chat select, .sx-access input {
  font: inherit;
  color: inherit;
}
.sx-chat button, .sx-access button {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 13px;
  background: #25334b;
  cursor: pointer;
  min-height: 36px;
  max-width: none;
  margin: 0;
}
.sx-chat button:disabled, .sx-access button:disabled { opacity: .48; cursor: default; }
.sx-chat :focus-visible, .sx-access :focus-visible { outline: 2px solid #8cc2ff; outline-offset: 3px; }
.sx-chat h1, .sx-chat h2, .sx-chat h3, .sx-chat p, .sx-access h1, .sx-access p { margin: 0; }
.sx-chat a, .sx-access a { color: #a7ceff; }
.sx-chat input, .sx-chat textarea, .sx-chat select, .sx-access input {
  min-width: 0;
  max-width: none;
  background: #172235;
  border: 1px solid var(--sx-line);
  border-radius: 12px;
  padding: 9px 13px;
}
.sx-chat input::placeholder, .sx-chat textarea::placeholder { color: #a9b5c8; opacity: 1; }

.sx-chat {
  position: fixed;
  z-index: 20;
  top: var(--sx-top, 0px);
  inset-inline: 0;
  height: 100vh;
  height: var(--sx-height, 100dvh);
  container: spoilex-chat / inline-size;
  overflow: hidden;
  background: var(--sx-bg);
}
.sx-frame {
  height: 100%;
  position: relative;
  display: grid;
  grid-template-columns: clamp(270px, 28cqi, 350px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  background: var(--sx-bg);
}
.sx-frame:has(.sx-details:not([hidden])) { grid-template-columns: clamp(270px, 28cqi, 350px) minmax(0, 1fr) clamp(215px, 23cqi, 300px); }
.sx-rail, .sx-thread, .sx-details { min-width: 0; min-height: 0; }
@font-face {
  font-family: Anton;
  src: url("/static/chat-anton.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
.sx-rail {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: var(--sx-rail);
  border-right: 1px solid var(--sx-line);
}
.sx-rail-head, .sx-thread-head, .sx-panel-head { display: flex; align-items: center; gap: 8px; }
.sx-rail-head { min-height: 70px; padding: 8px 14px 8px 20px; }
.sx-rail::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(80%, 420px);
  aspect-ratio: 1;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  background: url("/static/chat-icon-512.png") center / contain no-repeat;
  mask-image: radial-gradient(circle, #000 32%, transparent 70%);
  opacity: .10;
  pointer-events: none;
}
.sx-wordmark {
  font-family: Impact, Anton, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.15;
  color: #fff;
  white-space: nowrap;
}
.sx-wordmark span { color: var(--sx-blue); }
.sx-rail-body { overflow: auto; overscroll-behavior: contain; min-height: 0; }
.sx-rail-nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; padding: 6px 8px; border-top: 1px solid var(--sx-line); }
.sx-chat .sx-rail-nav button { background: transparent; padding: 5px 3px; font-size: 12px; line-height: 1.2; }
.sx-chat .sx-rail-nav [aria-current] { color: #9dc9ff; background: #1b2b45; }
.sx-chat .sx-push-banner, .sx-chat .sx-install-banner { display: block; width: calc(100% - 28px); margin: 0 14px 8px; font-size: 13px; }
.sx-chat .sx-push-banner { background: #1654a5; color: #fff; }
.sx-chat .sx-install-banner { background: #142943; border: 1px solid #41699e; color: #dbecff; }
.sx-rail-results { padding: 8px 14px 16px; }
.sx-rail-results h2 { font-size: 15px; }
.sx-rail-search-status { font-size: 13px; color: var(--sx-muted); }
.sx-rail-matches { display: grid; gap: 5px; margin-top: 6px; }
.sx-chat .sx-rail-matches button { text-align: left; overflow-wrap: anywhere; }
.sx-chat .sx-icon, .sx-chat .sx-send {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  border-radius: 50%;
  padding: 0;
  background: #202c41;
  color: #d3e6ff;
}
.sx-chat .sx-icon:hover { background: #2f4263; }
.sx-icon svg, .sx-send svg, .sx-search svg { width: 20px; height: 20px; }
.sx-search {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 14px;
  padding: 0 12px;
  border: 1px solid var(--sx-line);
  border-radius: 999px;
  background: #182337;
  color: var(--sx-muted);
}
.sx-chat .sx-search input {
  width: 100%;
  margin: 0;
  padding: 9px 0;
  border: 0;
  background: transparent;
  color: var(--sx-text);
}
.sx-filters { display: flex; gap: 8px; padding: 14px 14px 5px; }
.sx-chat .sx-filters button { min-height: 32px; padding: 5px 13px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.sx-chat .sx-filters [aria-pressed=true] { color: #cfebff; background: #254579; }
.sx-people {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  height: 96px;
  overflow: auto hidden;
  padding: 9px 14px;
  scrollbar-width: thin;
}
.sx-chat .sx-people > * {
  flex: 0 0 60px;
  min-width: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  font-size: 11px;
  color: #b7c6db;
}
.sx-people > * > span:not(.sx-avatar) { display: block; max-width: 60px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.sx-people .sx-avatar { width: 58px; height: 58px; }
.sx-avatar-ago {
  position: absolute;
  right: -3px;
  bottom: -1px;
  background: #132d25;
  color: #9cf0bd;
  outline: 2px solid var(--sx-rail);
  border-radius: 999px;
  padding: 1px 5px;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}
.sx-avatar {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: #263f66;
  border: 1px solid #ffffff20;
  color: #e4efff;
  font-size: 14px;
  font-weight: 750;
}
.sx-tone-1 { background: #3f3261; }
.sx-tone-2 { background: #224951; }
.sx-tone-3 { background: #4a354b; }
.sx-tone-4 { background: #3a465e; }
.sx-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.sx-avatar i { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: #65e49e; outline: 3px solid #111a29; }
.sx-avatar.sx-mini { width: 18px; height: 18px; font-size: 8px; }
.sx-avatar.sx-small { width: 31px; height: 31px; font-size: 11px; }
.sx-rooms { padding: 4px 8px 8px; }
.sx-room > .sx-avatar { width: 54px; height: 54px; }
.sx-personal-avatar { background: #0c1930; }
.sx-chat .sx-room {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  background: transparent;
  width: 100%;
  min-height: 69px;
  padding: 9px 10px;
  text-align: left;
}
.sx-chat .sx-room:hover { background: #1b2940; }
.sx-chat .sx-room[aria-current=true] { background: #243653; }
.sx-room-copy, .sx-thread-title > span:last-child { display: grid; min-width: 0; }
.sx-room-copy span, .sx-room-copy strong, .sx-room-copy small, .sx-thread-title strong, .sx-thread-title small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sx-room-copy strong, .sx-thread-title strong { font-size: 15px; font-weight: 660; }
.sx-room-copy small, .sx-thread-title small, .sx-room-meta { font-size: 12px; color: var(--sx-muted); }
.sx-unread .sx-room-copy :is(strong,small) { color: #fff; font-weight: 750; }
.sx-room-meta { display: grid; justify-items: end; gap: 4px; }
.sx-unread-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.45em; min-height: 1.45em; padding: 0 0.3em; border-radius: 1em;
  background: #b82036; color: #fff; font-size: 0.85rem; font-variant-numeric: tabular-nums;
}

.sx-thread {
  background: var(--sx-bg);
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
}
.sx-thread-head {
  flex: 0 0 auto;
  min-height: 63px;
  padding: 7px max(16px, env(safe-area-inset-right)) 7px max(16px, env(safe-area-inset-left));
  background: #101927;
  border-bottom: 1px solid #233149;
}
.sx-thread-title { display: flex; min-width: 0; align-items: center; gap: 10px; margin-right: auto; }
.sx-chat .sx-mobile-back { display: none; }
.sx-messages {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  overflow-anchor: none;
  padding: 14px clamp(13px, 3.2vw, 40px) 12px;
  scrollbar-width: thin;
}
.sx-chat .sx-empty { color: var(--sx-muted); text-align: center; padding: 28px 12px; font-size: 14px; }
.sx-chat .sx-date {
  width: max-content;
  max-width: 100%;
  color: #a7b6cc;
  font-size: 12px;
  margin: 15px auto 18px;
}
.sx-group {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 12px;
  max-width: 100%;
}
.sx-group.sx-own { justify-content: flex-end; }
.sx-group-inner { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: min(78%, 640px); }
.sx-own .sx-group-inner { align-items: flex-end; }
.sx-chat .sx-sender { margin: 0 0 3px 5px; color: #a2b3cd; font-size: 12px; }
.sx-message { position: relative; min-width: 0; max-width: 100%; margin-top: 2px; }
.sx-bubble {
  border-radius: 16px 16px 16px 6px;
  background: #263044;
  padding: 8px 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #f0f5ff;
}
.sx-message:not(:last-child) .sx-bubble { border-bottom-left-radius: 6px; }
.sx-message + .sx-message .sx-bubble { border-top-left-radius: 6px; }
.sx-own .sx-bubble { background: var(--sx-own, #245fc9); color: var(--sx-own-text, #fff); border-radius: 16px 16px 6px 16px; }
.sx-own .sx-message:not(:last-child) .sx-bubble { border-bottom-left-radius: 16px; border-bottom-right-radius: 6px; }
.sx-own .sx-message + .sx-message .sx-bubble { border-top-left-radius: 16px; border-top-right-radius: 6px; }
.sx-bubble > h2, .sx-bubble > h3 { margin: 3px 0; font-size: 1.15em; }
.sx-bubble em, .sx-bubble small { opacity: .85; }
.sx-text-large { font-size: 1.18em; }
.sx-text-larger { font-size: 1.37em; }
.sx-chat .sx-message-menu {
  position: absolute;
  top: 0;
  left: calc(100% + 3px);
  width: 28px;
  height: 28px;
  min-height: 28px;
  background: transparent;
  opacity: 0;
}
.sx-own .sx-message-menu { left: auto; right: calc(100% + 3px); }
.sx-message:hover .sx-message-menu, .sx-message:focus-within .sx-message-menu { opacity: 1; }
.sx-receipts { display: flex; gap: 3px; justify-content: flex-end; margin-top: 4px; }
.sx-photo, .sx-bubble video { display: block; width: min(270px, 100%); aspect-ratio: 4/3; margin-top: 5px; background: #080e19; border-radius: 10px; overflow: hidden; }
.sx-photo img { width: 100%; height: 100%; object-fit: contain; }
.sx-file-link { display: block; margin-top: 4px; font-size: 13px; }

.sx-composer {
  flex: 0 0 auto;
  background: #101927;
  border-top: 1px solid #233149;
  padding: 9px max(13px, env(safe-area-inset-right)) max(9px, env(safe-area-inset-bottom)) max(13px, env(safe-area-inset-left));
}
.sx-compose-row { display: flex; gap: 8px; align-items: end; }
.sx-chat .sx-composer textarea { flex: 1; width: 0; resize: none; margin: 0; line-height: 22px; min-height: 40px; max-height: 128px; }
.sx-chat .sx-send { background: var(--sx-accent); color: #fff; }
.sx-chat .sx-thread-status, .sx-chat .sx-rail-status, .sx-chat .sx-dialog-status { color: #c1d5ef; font-size: 13px; }
.sx-thread-status:not(:empty), .sx-rail-status:not(:empty), .sx-dialog-status:not(:empty) { padding: 5px 8px; }
.sx-files { display: flex; gap: 5px; overflow-x: auto; }
.sx-files:not(:empty) { padding-bottom: 7px; }

.sx-details { background: var(--sx-rail); border-left: 1px solid var(--sx-line); padding: max(14px, env(safe-area-inset-top)) 14px 14px; overflow: auto; }
.sx-panel-head { justify-content: space-between; margin-bottom: 16px; }
.sx-panel-head h2 { font-size: 19px; line-height: 1.2; }
.sx-details h3 { font-size: 15px; }
.sx-details ul { list-style: none; padding: 0; }
.sx-details li { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.sx-chat .sx-subtle { font-size: 13px; }
.sx-dialog {
  width: min(450px, calc(100% - 28px));
  max-height: 85dvh;
  padding: 20px;
  background: #142034;
  border: 1px solid #394a63;
  border-radius: 17px;
  color: var(--sx-text);
}
.sx-dialog::backdrop { background: #070b15aa; }
.sx-dialog form, .sx-access form { display: grid; gap: 9px; margin-bottom: 15px; }
.sx-dialog label, .sx-access label { display: grid; gap: 4px; color: #cad7ea; }
.sx-dialog input, .sx-dialog textarea, .sx-dialog select, .sx-access input { width: 100%; }
.sx-actions { display: grid; gap: 8px; }
.sx-access {
  display: grid;
  gap: 17px;
  width: min(420px, calc(100% - 36px));
  margin: 0 auto;
  padding: 23px;
  border-radius: 22px;
  border: 1px solid var(--sx-line);
  background: #111a29;
}
.sx-chat-page:has(.sx-access) { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; overflow: auto; padding: 15px 0; }
.sx-access button { background: #245fc9; }
.sx-access p:empty { display: none; }

@container spoilex-chat (width < 900px) {
  .sx-frame, .sx-frame:has(.sx-details:not([hidden])) { display: block; }
  .sx-rail, .sx-thread { position: absolute; inset: 0; transition: transform .2s ease, visibility .2s; }
  .sx-rail { border-right: 0; }
  .sx-thread { transform: translateX(100%); visibility: hidden; }
  .sx-room-open .sx-rail { transform: translateX(-22%); visibility: hidden; }
  .sx-room-open .sx-thread { transform: translateX(0); visibility: visible; }
  .sx-chat .sx-mobile-back { display: inline-grid; }
  .sx-details { position: absolute; z-index: 2; inset: env(safe-area-inset-top) 0 0 auto; width: min(340px, 88%); box-shadow: -20px 0 44px #0008; }
  .sx-rail-head { min-height: 62px; }
  .sx-thread-head { min-height: 58px; }
  .sx-room-copy strong { font-size: 16px; }
  .sx-chat .sx-message-menu { opacity: .65; }
}
@media (max-height: 430px) {
  .sx-rail-head, .sx-thread-head { min-height: 45px; }
}
@media (prefers-reduced-motion: reduce) {
  .sx-rail, .sx-thread { transition: none; }
}

.sx-chat [hidden] { display: none !important; }
.sx-chat .sx-bubble { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: pan-y; }
.sx-chat .sx-bubble img { -webkit-user-drag: none; }
.sx-chat .sx-message:has(.sx-context) { z-index: 3; }
.sx-message .sx-quick {
  display: flex; align-items: center; gap: 2px; position: absolute;
  left: calc(100% + 4px); top: 0; opacity: 0;
}
.sx-own .sx-message .sx-quick { left: auto; right: calc(100% + 4px); }
.sx-message:hover .sx-quick, .sx-message:focus-within .sx-quick { opacity: 1; }
.sx-chat .sx-quick button, .sx-chat .sx-reactions button { padding: 3px 6px; min-width: 24px; min-height: 28px; }
.sx-context { position: absolute; inset: 0; pointer-events: none; }
.sx-reaction-tray, .sx-message-actions {
  position: absolute; pointer-events: auto; background: var(--sx-rail); border: 1px solid var(--sx-line);
  border-radius: 15px; padding: 5px; box-shadow: 0 6px 25px #0007;
}
.sx-reaction-tray { display: flex; bottom: calc(100% + 5px); left: 0; width: max-content; }
.sx-chat .sx-reaction-tray button { font-size: 19px; min-width: 30px; padding: 3px; border: 0; background: transparent; }
.sx-own .sx-reaction-tray, .sx-own .sx-message-actions { left: auto; right: 0; }
.sx-message-actions { display: grid; width: max-content; max-width: 210px; top: calc(100% + 5px); }
.sx-chat .sx-message-actions button { padding: 5px 11px; text-align: left; }
.sx-reactions { display: flex; flex-wrap: wrap; gap: 3px; margin: -4px 3px 3px; position: relative; }
.sx-chat .sx-reactions button { border-radius: 15px; background: var(--sx-rail); font-size: 12px; }
.sx-chat .sx-reactions button[aria-pressed=true] { border-color: #7caeff; }
.sx-chat .sx-quote, .sx-quote-draft { border-left: 3px solid #82aaff; padding: 4px 8px; margin-bottom: 4px; }
.sx-chat .sx-quote button, .sx-chat .sx-pins button { text-align: left; white-space: pre-wrap; font-size: 13px; overflow-wrap: anywhere; }
.sx-meta { display: block; opacity: .8; font-size: 12px; }
.sx-pins { display: flex; gap: 6px; padding: 5px 10px; overflow: auto; border-bottom: 1px solid var(--sx-line); }
.sx-chat .sx-pins button { min-width: 120px; max-width: 380px; }
.sx-system { margin: 8px 0; font-size: 12px; opacity: .8; font-style: italic; }
.sx-highlight .sx-bubble, .sx-highlight.sx-system { outline: 2px solid #99b9ff; outline-offset: 3px; }
.sx-chat .sx-photo { display: block; border: 0; padding: 0; background: none; }
.sx-chat .sx-photo img { display: block; max-width: 100%; }
.sx-audio, .sx-queued, .sx-quote-draft, .sx-recording { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sx-audio audio { max-width: 100%; width: 230px; }
.sx-chat .sx-typing, .sx-queued { font-size: 12px; }
.sx-typing:not(:empty), .sx-queued { padding: 4px 5px; }
.sx-queued span { overflow-wrap: anywhere; }
.sx-queued small { opacity: .8; }
.sx-search-results, .sx-gallery, .sx-gallery-item { display: grid; gap: 6px; min-width: 0; }
.sx-gallery-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 9px; }
.sx-gallery-tabs button[aria-pressed=true] { border-color: #7caeff; }
.sx-gallery-item a { overflow-wrap: anywhere; }
.sx-gallery-item video { width: 100%; }
.sx-wave { display: flex; align-items: center; gap: 3px; height: 24px; }
.sx-wave i { display: block; height: 22px; background: #9dc0ff; width: 3px; border-radius: 3px; transform: scaleY(.18); }
.sx-chat .sx-lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; }
.sx-lightbox-view { height: calc(100% - 105px); overflow: auto; touch-action: pan-y; background: #080d16; }
.sx-lightbox-view img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sx-lightbox-view.sx-zoomed { touch-action: pan-x pan-y; }
.sx-lightbox-view.sx-zoomed img { width: 200%; height: 200%; max-width: none; }
.sx-lightbox-buttons { display: flex; justify-content: center; gap: 10px; padding: 6px; }
.sx-chat .sx-check { display: flex; align-items: center; gap: 8px; }
.sx-chat .sx-check input { width: auto; }
.sx-admin-list { list-style: none; padding: 0; display: grid; gap: 6px; }
.sx-admin-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sx-chat .sx-danger { color: #ffadaa; }
.sx-emoji-grid details div { display: flex; flex-wrap: wrap; gap: 4px; }
.sx-chat .sx-emoji-grid button { font-size: 19px; padding: 4px 7px; }
@media (hover: none) {
  .sx-chat .sx-quick button:not([data-action=message]) { display: none; }
  .sx-message .sx-quick { opacity: .8; }
}

.sx-thread[data-theme=biohazard] { --sx-bg: #080e0b; --sx-own: linear-gradient(145deg,#b3f53f,#6bd820); --sx-own-text: #112305; }
.sx-thread[data-theme=biohazard] .sx-messages::before { content: "☣"; position: absolute; inset: 34% 0 auto; text-align: center; color: #b3f50b0d; font-size: 13rem; pointer-events: none; }
.sx-thread[data-theme=crime] { --sx-bg: #0e1326; --sx-own: linear-gradient(145deg,#124097,#6b3216); }
.sx-thread[data-theme=crime] .sx-thread-head { border-bottom: 4px solid; border-image: repeating-linear-gradient(130deg,#d9aa36 0 12px,#211b14 12px 24px) 1; background: linear-gradient(105deg,#13294b,#301524); }
.sx-thread[data-theme=hazmat] { --sx-bg: #222426; --sx-own: linear-gradient(145deg,#4c3b0d,#34300e); }
.sx-thread[data-theme=hazmat] .sx-thread-head { border-color: #dfab27; }
.sx-thread[data-theme=smoke] { --sx-bg: #1b1512; --sx-own: linear-gradient(145deg,#63361c,#74391f); }
.sx-thread[data-theme=hardcore] { --sx-bg: #170f22; --sx-own: linear-gradient(145deg,#3b2355,#7b2336); }
.sx-search-nav { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 4px; }
.sx-gallery-filter { display: grid; gap: 5px; margin-block: 10px; }
.sx-gallery-filter input { width: 100%; }
.sx-theme-options { display: grid; gap: 5px; margin-bottom: 8px; }
.sx-chat .sx-theme-options button { display: flex; align-items: center; gap: 8px; text-align: left; }
.sx-theme-options button::before { content: ""; flex: 0 0 15px; height: 15px; border-radius: 50%; background: var(--sx-swatch, #518dff); }
.sx-theme-options [data-theme=biohazard] { --sx-swatch: #9ae436; }
.sx-theme-options [data-theme=crime] { --sx-swatch: linear-gradient(135deg,#d9aa36,#124097); }
.sx-theme-options [data-theme=hazmat] { --sx-swatch: #dfab27; }
.sx-theme-options [data-theme=smoke] { --sx-swatch: #a96338; }
.sx-theme-options [data-theme=hardcore] { --sx-swatch: #a55399; }
.sx-chat .sx-theme-options [aria-pressed=true] { box-shadow: inset 0 0 0 1px #8cc2ff; }
@container spoilex-chat (width < 600px) {
  .sx-compose-row { gap: 4px; }
  .sx-chat .sx-compose-row :is(.sx-icon,.sx-send) { width: 36px; }
}
@container spoilex-chat (width < 380px) {
  .sx-compose-row { display: grid; grid-template-columns: repeat(4,36px) minmax(0,1fr) 36px 36px; gap: 4px; }
  .sx-chat .sx-composer textarea { grid-column: 1 / -3; grid-row: 2; width: 100%; }
  .sx-compose-row [data-action=quick-emoji] { grid-column: -3; grid-row: 2; }
  .sx-compose-row .sx-send { grid-column: -2; grid-row: 2; }
}
@container spoilex-chat (width < 380px) {
  .sx-thread-head { gap: 4px; padding-inline: 5px; }
  .sx-thread-title { gap: 4px; }
  .sx-thread-title .sx-avatar { width: 30px; height: 30px; }
  .sx-compose-row { gap: 4px; }
  .sx-compose-row .sx-icon, .sx-compose-row .sx-send { width: 36px; }
}
.sx-call { position: absolute; inset: 0; z-index: 4; background: #101927; overflow: auto; text-align: center;
  padding: max(14px,env(safe-area-inset-top)) 14px max(14px,env(safe-area-inset-bottom)); }
.sx-call-heading { display: flex; justify-content: center; align-items: center; gap: 12px; }
.sx-call-active, .sx-call-incoming { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.sx-call [data-action=call-answer] { background: #15592f; }
.sx-call [data-action=call-hangup], .sx-call [data-action=call-decline] { background: #9c2735; }
.sx-call.sx-call-video:not(.sx-call-mini):not([hidden]) { display: flex; flex-direction: column; }
.sx-call-video .sx-call-heading,
.sx-call-video .sx-call-party,
.sx-call-video .sx-call-status { flex: 0 0 auto; margin-block: 0 4px; }
.sx-call-video .sx-call-media { position: relative; flex: 1 1 auto; min-height: 100px; background: #080e19; }
.sx-remote-media { display: flex; height: 100%; gap: 6px; justify-content: center; }
.sx-remote-media video { flex: 1 1 0; min-width: 0; height: 100%; max-height: 100%; object-fit: contain; }
.sx-remote-media video:only-child { object-fit: cover; }
.sx-local-video {
  position: absolute; right: 8px; bottom: 8px; width: clamp(68px,22%,140px);
  max-height: 35%; object-fit: cover; border: 1px solid #879ab1; border-radius: 8px; background: #101927;
}
.sx-call-video .sx-call-active { flex: 0 0 auto; margin-top: 8px; }
.sx-call-video .sx-call-active button { min-height: 44px; }
.sx-call-mini .sx-call-media { height: 64px; min-height: 0; }

.sx-call.sx-call-mini { inset: auto 8px max(76px, env(safe-area-inset-bottom)) auto; width: min(300px, calc(100% - 16px));
  max-height: 50%; border: 1px solid #536682; border-radius: 12px; box-shadow: 0 6px 25px #000a; }
.sx-call.sx-call-mini video { max-height: 64px; }

.sx-own .sx-bubble a { color: inherit; text-decoration: underline; }
.sx-theme-accent { display: none; }
.sx-thread[data-theme=crime] .sx-theme-accent {
  display: block; flex: 0 0 auto; padding: 1px 5px;
  color: #201906; background: #d7ad45; text-align: center;
  font-size: 10px; font-weight: 800; letter-spacing: .12em;
}

.sx-chat { --sx-rail-accent: #8ebdf5; }
.sx-chat[data-theme=biohazard] { --sx-rail-accent: #b3f53f; }
.sx-chat[data-theme=crime] { --sx-rail-accent: #f0bf50; }
.sx-chat[data-theme=hazmat] { --sx-rail-accent: #e4ab37; }
.sx-chat[data-theme=smoke] { --sx-rail-accent: #e79973; }
.sx-chat[data-theme=hardcore] { --sx-rail-accent: #e394d3; }
.sx-rail-head { box-shadow: inset 0 -2px color-mix(in srgb,var(--sx-rail-accent) 60%,transparent); }
.sx-chat .sx-rail .sx-filters [aria-pressed=true],
.sx-chat .sx-rail .sx-install-banner,
.sx-chat .sx-rail .sx-push-banner {
  color: #0e1725;
  background: var(--sx-rail-accent);
}
.sx-chat .sx-panel-back { display: none; }
.sx-panel-head h2 { margin-inline-end: auto; }
.sx-chat .sx-receipts button {
  min-height: 26px;
  padding: 2px 6px;
  background: transparent;
  color: var(--sx-muted);
  font-size: .75rem;
  font-weight: 500;
  text-align: right;
}
.sx-feedback:not(:empty) { padding: 5px 14px; margin: 0; font-size: .85rem; }
.sx-feedback:empty, .sx-sound-status:empty { display: none; }
@container spoilex-chat (width < 900px) {
  .sx-chat .sx-panel-back { display: inline-grid; }
  .sx-chat :is(.sx-panel-back,.sx-mobile-back) { font-size: 24px; font-weight: 700; }
}
