@font-face {
  font-family: "klaxon";
  src: url("/klaxon.otf");
}
@font-face {
  font-family: "Friend Bestie";
  src: url("/Friend_Bestie.otf");
}

* { box-sizing: border-box; margin: 0; padding: 0; }

* {
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}
*::-webkit-scrollbar {
  width: 6px;          /* vertical */
  height: 6px;         /* horizontal */
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background-color: #333;
  border-radius: 3px;
}
*::-webkit-scrollbar-thumb:hover {
  background-color: #777;
}

@font-face {
  font-family: "klaxon";
  src: url("/klaxon.otf");
}
@font-face {
  font-family: "Friend Bestie";
  src: url("/Friend_Bestie.otf");
}

html, body {
  overscroll-behavior: none;
  max-width: 100%;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  background: #111;
  color: #e0e0e0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.loading * {
  cursor: wait !important;
}

button.danger { background: #b91c1c; }
button.danger:hover { background: #991b1b; }

header {
  padding: 8px 12px;
  background: #1a1a1a;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
header .status { font-size: 12px; color: #888; }
header .user { font-weight: 600; display: flex; align-items: center; gap: 6px; }

.brand-div, .brand-cord {
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
  background: transparent !important;
}
.brand-div {
  font-family: klaxon;
  color: #FAA !important;
  margin: 0;
}
.brand-cord {
  font-family: Friend Bestie;
  color: #FFF !important;
  margin: 0;
}

#userWidget {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 10px;
}

#userInfo {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
}

#header-user {
  cursor: pointer;
  border-radius: 4px;
  padding: 2px 4px;
  margin: -2px -4px;
}
#header-user:hover {
  background: rgba(255, 255, 255, 0.06);
}
#header-user .avatar {
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}
#header-user .avatar:hover,
#header-user:hover .avatar {
  box-shadow: 0 0 0 2px #3b82f6;
}
.avatar.avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #333;
  color: #888;
  font-size: 11px;
  font-weight: 600;
  user-select: none;
}

.popup-dismiss .user-menu {
  position: fixed;
  z-index: 4000;
}
.user-menu {
  position: absolute;
  top: calc(100% - 5vh);
  left: 1vw;
  min-width: 180px;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-menu[hidden] {
  display: none;
}
.user-menu a,
.user-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: #e0e0e0;
  font-size: 13px;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}
.user-menu a:hover,
.user-menu button:hover {
  background: #2a2a2a;
}
.user-menu a i,
.user-menu button i {
  width: 16px;
  text-align: center;
  color: #a3a3a3;
  font-size: 12px;
}
.user-menu button#btn-user-logout {
  color: #f87171;
}
.user-menu button#btn-user-logout i {
  color: #f87171;
}
.user-menu button#btn-user-logout:hover {
  background: rgba(185, 28, 28, 0.2);
}

#createServer {
  border-radius: 50%;
  color: #FFF;
  background: #2563eb;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  vertical-align: middle;
  padding: 0;
  height: 25px;
  width: 25px;
  font-size: 16px;
  aspect-ratio: 1;
}
#createServer:hover {
  background: #1d4ed8;
}

#first-visit-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 8, 0.62);
  z-index: 3500;
}
#first-visit-note {
  display: none;
  position: fixed;
  z-index: 3700;
  max-width: min(340px, calc(100vw - 24px));
  padding: 14px 36px 14px 14px;
  background: #1e1e1e;
  border: 1px solid #444;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  color: #e8e8e8;
}
#first-visit-note p {
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 10px;
}
#first-visit-dismiss {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #aaa;
  font-size: 18px;
  line-height: 1;
}
#first-visit-dismiss:hover {
  background: #333;
  color: #fff;
}
#first-visit-chat {
  font-size: 12px;
  padding: 6px 10px;
}
body.first-visit-onboard #first-visit-overlay,
body.first-visit-onboard #first-visit-note {
  display: block;
}
body.first-visit-onboard header {
  position: relative;
  z-index: 3600;
  pointer-events: none;
}
body.first-visit-onboard header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.62);
  pointer-events: none;
  z-index: 1;
}
body.first-visit-onboard #createServer {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  box-shadow: 0 0 0 3px #111, 0 0 0 6px #3b82f6;
  animation: first-visit-pulse 1.6s ease-in-out infinite;
}
@keyframes first-visit-pulse {
  0%, 100% { box-shadow: 0 0 0 3px #111, 0 0 0 6px #3b82f6; }
  50% { box-shadow: 0 0 0 3px #111, 0 0 0 8px #60a5fa; }
}

main {
  flex: 1;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  min-height: 0;
  min-width: 0;
}

aside {
  background: #161616;
  border-right: 1px solid #333;
  padding: 10px;
  overflow-y: auto;
  font-size: 13px;
}
aside h3 {
  font-size: 11px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}
aside .aside-collapse {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 0 0 6px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 11px;
  font-family: inherit;
  font-weight: 600;
  text-transform: uppercase;
  color: #666;
  letter-spacing: 0.05em;
  cursor: pointer;
  text-align: left;
}
aside .aside-collapse:hover {
  color: #aaa;
}
aside .aside-collapse i {
  width: 10px;
  font-size: 9px;
  transition: transform 0.15s ease;
}
aside .aside-collapse[aria-expanded="true"] i {
  transform: rotate(90deg);
}
aside .aside-collapse #offline-count {
  margin-left: auto;
  font-weight: 600;
  color: #777;
}
aside ul { list-style: none; margin-bottom: 16px; }
aside li.user-row.offline {
  opacity: 0.55;
}
aside li {
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
aside li.embed-nav-item,
aside li.embed-nav-empty,
aside li.embed-nav-create {
  padding: 0;
  display: block;
}
aside li.embed-nav-item {
  display: flex;
  align-items: center;
  gap: 0;
}
aside li.mod { color: #7dd3fc; }
aside li.you { font-weight: 600; }

aside li.user-row {
  position: relative;
  padding: 3px 4px 3px 0;
  border-radius: 4px;
}
aside li.user-row .user-list-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}
aside li.user-row .user-guest {
  color: #888;
  font-weight: 400;
  font-size: 11px;
}
.user-list-more {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-left: auto;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
aside li.user-row:hover .user-list-more,
aside li.user-row.menu-open .user-list-more,
aside li.user-row:focus-within .user-list-more,
.user-list-more:focus-visible {
  opacity: 0.75;
  pointer-events: auto;
}
.user-list-more:hover,
.user-list-more:focus-visible {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}
.popup-dismiss {
  position: fixed;
  inset: 0;
  z-index: 3900;
  background: transparent;
}
.popup-dismiss[hidden] {
  display: none;
}
.user-list-menu {
  position: fixed;
  min-width: 188px;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-list-menu[hidden] {
  display: none;
}
.user-list-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: #e0e0e0;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.user-list-menu-item:hover,
.user-list-menu-item:focus-visible {
  background: #2a2a2a;
  outline: none;
}
.user-list-menu-item i {
  width: 16px;
  text-align: center;
  color: #a3a3a3;
  font-size: 12px;
}
.user-list-menu-sep {
  height: 1px;
  margin: 4px 6px;
  background: #444;
  pointer-events: none;
}
.user-list-menu-item[data-action="ignore"],
.user-list-menu-item.danger {
  background: inherit;
  color: #f87171;
}
.user-list-menu-item[data-action="ignore"] i,
.user-list-menu-item.danger i {
  color: #f87171;
}
.user-list-menu-item[data-action="ignore"]:hover,
.user-list-menu-item.danger:hover {
  background: rgba(185, 28, 28, 0.2);
}
aside li.user-row.ignored .user-list-name {
  opacity: 0.55;
}

/* Embed: drawer + touch — keep ⋮ usable without hover */
body.embed .user-list-more {
  opacity: 0.7;
  pointer-events: auto;
}
body.embed aside li.user-row:hover .user-list-more,
body.embed aside li.user-row.menu-open .user-list-more,
body.embed aside li.user-row:focus-within .user-list-more {
  opacity: 1;
}

hr {
  border: none;
  outline: none;
  height: 1px;
  background: #333;
  margin: 3px 0;
}

.avatar {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  object-fit: cover;
  background: #333;
  flex-shrink: 0;
}
.avatar.lg { width: 40px; height: 40px; }
.msg .meta .avatar { width: 25px; height: 25px; }
.js-profile-avatar {
  cursor: pointer;
}
.js-profile-avatar:hover {
  box-shadow: 0 0 0 2px #3b82f6;
}

.profile-card {
  position: fixed;
  z-index: 5000;
  width: 280px;
  max-width: calc(100vw - 16px);
  background: #1b1b1b;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  padding: 12px;
  color: #eee;
  font-size: 13px;
}
.profile-card-badge-online {
  background: #14532d;
  color: #86efac;
}
.profile-card-badge-mod {
  background: #1e1b4b;
  color: #c4b5fd;
}
.profile-card-badge-owner {
  background: #3f2e12;
  color: #fbbf24;
}
.profile-card-badge-admin {
  background: #3b1d2a;
  color: #fb7185;
}
.profile-card-badge-bot {
  background: #12263a;
  color: #7dd3fc;
}
.profile-card[hidden] {
  display: none;
}
.profile-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.profile-card-avatar,
.avatar.profile-card-avatar {
  width: 72px;
  height: 72px;
  font-size: 28px;
}
.profile-card-ident {
  min-width: 0;
  flex: 1;
}
.profile-card-name {
  font-weight: 700;
  font-size: 15px;
  word-break: break-word;
}
.profile-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.profile-card-badge,
.profile-card-badges .user-guest {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #2a2a2a;
  color: #bbb;
}
.profile-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid #2f2f2f;
  padding-top: 8px;
}
.profile-card-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #ddd;
}
.profile-card-label {
  color: #888;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.profile-card-bio {
  margin: 0 0 10px;
  color: #ccc;
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
}
.profile-card-link {
  color: #93c5fd;
  text-decoration: none;
  word-break: break-all;
  text-align: right;
}
.profile-card-link:hover {
  text-decoration: underline;
}
.profile-card-actions {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #2f2f2f;
}
.profile-card-message {
  width: 100%;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.profile-card-message:hover {
  background: #1d4ed8;
}

.flair {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: #333;
  color: #a5b4fc;
  font-weight: 500;
  margin-left: 2px;
}

.highlighted {
  background-color: rgba(255, 255, 45, 0.1);
  padding: 1px;
  border: solid 1px rgba(255, 255, 45, 0.25);
  border-radius: 3px;
}

#chat-area {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

#pin-bar {
  flex-shrink: 0;
  z-index: 2;
  background: var(--surface, #1a1a1a);
  border-bottom: 1px solid var(--border, #333);
  color: var(--text, #ddd);
}
#pin-bar-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
  padding: 9px 14px;
  font: inherit;
  min-width: 0;
}
#pin-bar-toggle,
#pin-bar-toggle:hover,
#pin-bar-toggle:active,
#pin-bar-toggle:focus {
  background: transparent;
  color: inherit;
  border: none;
  box-shadow: none;
  transform: none;
}
#pin-bar-toggle:hover {
  background: rgba(255, 255, 255, 0.04);
}
.pin-bar-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--warning, #f59e0b);
  font-size: 11px;
}
.pin-bar-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pin-bar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #888);
}
#pin-bar-preview {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--text-secondary, #bbb);
}
#pin-bar-count {
  flex-shrink: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  background: #2a2a2a;
  color: #ccc;
}
.pin-bar-caret {
  flex-shrink: 0;
  font-size: 10px;
  color: var(--text-muted, #777);
  transition: transform 0.16s ease;
}
#pin-bar.open .pin-bar-caret { transform: rotate(180deg); }
#pin-bar-toggle[aria-expanded="true"] .pin-bar-caret { transform: rotate(180deg); }

#pin-list {
  max-height: min(42vh, 280px);
  overflow-y: auto;
  border-top: 1px solid var(--border, #333);
  background: var(--surface-2, #161616);
}
.pin-list-head {
  padding: 8px 14px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #777);
}
.pin-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 8px 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-3, #1e1e1e);
}
.pin-item:hover {
  background: #252525;
}
.pin-item-mark {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--warning, #f59e0b);
  font-size: 10px;
  opacity: 0.85;
}
.pin-item-body,
.pin-item-body:hover,
.pin-item-body:active,
.pin-item-body:focus {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  transform: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
  padding: 0;
}
.pin-item-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.pin-item-user {
  font-size: 12px;
  font-weight: 600;
  color: #ddd;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pin-item-time {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-muted, #777);
}
.pin-item-text {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-secondary, #bbb);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pin-item-unpin,
.pin-item-unpin:hover,
.pin-item-unpin:active,
.pin-item-unpin:focus {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  background: transparent;
  border: none;
  box-shadow: none;
  transform: none;
  border-radius: 6px;
  color: var(--text-muted, #888);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  padding: 0;
}
.pin-item-unpin:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}
.msg .meta .pinned-flag {
  color: var(--warning, #f59e0b);
  font-style: normal;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.msg .meta .pinned-flag .fa-thumbtack { font-size: 9px; }

#messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.msg {
  padding: 6px 10px;
  background: #1e1e1e;
  border-radius: 6px;
  position: relative;
  min-width: 0;
  max-width: 100%;
}

.msg .meta {
  font-size: 11px;
  color: #777;
  margin-bottom: 2px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.msg .meta .name { color: #a5b4fc; font-weight: 600; }
.msg .meta .edited { color: #666; font-style: italic; }
.msg.grouped {
  padding-top: 2px;
  padding-bottom: 4px;
  margin-top: -6px;
  border-radius: 0;
}
.msg:not(.msg.grouped):has(+ .msg.grouped) { /* the first message of each consecutive message grouping */ 
  border-radius: 6px 6px 0 0;
}
.msg.grouped:not(:has(+ .msg.grouped)) { /* last message of each consecutive message grouping */
  border-radius: 0 0 6px 6px;
}
.msg.grouped .meta { display: none; }

.msg-reply {
  display: flex;
  gap: 8px;
  margin: 4px 0 6px;
  padding: 6px 10px;
  background: #1a1a1a;
  border-left: 3px solid #333;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  max-width: 100%;
}
.msg-reply:hover { background: #222; }
.msg-reply-meta {
  font-size: 11px;
  color: #93c5fd;
  font-weight: 600;
  margin-bottom: 2px;
}
.msg-reply-text {
  font-size: 12px;
  color: #999;
  white-space: pre-wrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.msg-reply-text img {
  max-height: 250px;
}

.msg .content {
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.45;
  min-width: 0;
  max-width: 100%;
}
.msg .content p { margin: 0 0 0.4em; }
.msg .content p:last-child { margin-bottom: 0; }
.msg .content ul,
.msg .content ol { margin: 0.3em 0 0.3em 1.2em; }
.msg .content code {
  background: #2a2a2a;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.msg .content pre {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.4em 0;
  max-width: 100%;
  min-width: 0;
}
.msg .content pre code {
  background: none;
  padding: 0;
  display: block;
  width: max-content;
  min-width: 100%;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}
.msg .content a { color: #7dd3fc; }
.msg .content .room-hashtag,
.msg-reply .room-hashtag {
  display: inline;
  margin: 0 1px;
  padding: 0 5px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.18);
  color: #93c5fd;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.45;
  vertical-align: baseline;
}
.msg .content .room-hashtag:hover,
.msg-reply .room-hashtag:hover {
  background: rgba(37, 99, 235, 0.32);
}
.msg .content .room-hashtag.current,
.msg-reply .room-hashtag.current {
  cursor: default;
  opacity: 0.85;
}
.msg .content blockquote {
  border-left: 3px solid #444;
  margin: 0.4em 0;
  padding-left: 10px;
  color: #aaa;
}
.msg .content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 4px;
  margin: 4px 0;
}

.msg .actions { margin-top: 4px; font-size: 11px; }
.msg .actions button {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 0 4px;
}
.msg .actions button:hover { color: #aaa; }

#scrollToBottom {
  display: none;
  height: 0;
  width: 100%;
  position: relative;
  user-select: none;
  cursor: pointer;
}
#scrollToBottom:after {
  display: inherit;
  content: "Scroll To Bottom";
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: #FFF;
  padding: 5px;
}

#composer {
  padding: 10px;
  border-top: 1px solid #333;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reply-preview {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: #1a1a1a;
  position: relative;
  border-radius: 6px;
  font-size: 12px;
}
.reply-preview-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.reply-preview-label { color: #93c5fd; }
.reply-preview-text {
  color: #888;
  white-space: pre-wrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: inherit;
}
.reply-preview-text img {
  max-height: 250px;
}
#reply-preview-cancel {
  background: transparent;
  border: none;
  color: #888;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
#reply-preview-cancel:hover { color: #eee; }

.msg.highlight-flash {
  animation: msg-flash 1.2s ease;
}
@keyframes msg-flash {
  0%, 100% { background: transparent; }
  30% { background: rgba(59, 130, 246, 0.18); }
}


#composer .composer-row {
  display: flex;
  gap: 8px;
}
#composer textarea {
  flex: 1;
  background: #222;
  border: 1px solid #444;
  color: #eee;
  padding: 8px 10px;
  border-radius: 4px;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  resize: none;
  overflow-y: hidden;
  min-height: 38px;
  max-height: 160px;
}
#composer textarea:focus { border-color: #555; }
#composer.room-locked textarea,
#composer.room-locked #btn-send,
#composer.room-locked #btn-emoji,
#composer.room-locked #btn-attach,
#composer.room-locked #btn-widget {
  opacity: 0.55;
  cursor: not-allowed;
}
#btn-attach[hidden],
#btn-widget[hidden] {
  display: none !important;
}

.attach-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.attach-preview[hidden] { display: none; }
.attach-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 6px 8px;
  max-width: 220px;
  position: relative;
}
.attach-chip img,
.attach-chip video {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  background: #111;
}
.attach-chip-meta {
  min-width: 0;
  flex: 1;
}
.attach-chip-name {
  display: block;
  font-size: 12px;
  color: #eee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.attach-chip-sub {
  display: block;
  font-size: 11px;
  color: #888;
}
.attach-chip-remove {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 0 4px;
  font-size: 16px;
  line-height: 1;
}
.attach-chip-remove:hover { color: #eee; background: transparent; }
.attach-chip-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: #2563eb;
  transform-origin: left;
  border-radius: 0 0 8px 8px;
}
.attach-chip.error { border-color: #7f1d1d; }

.msg-widget {
  margin-top: 8px;
  max-width: 280px;
  padding: 10px;
  border: 1px solid #333;
  border-radius: 8px;
  background: #161616;
}
.msg-widget:focus {
  outline: none;
}
.msg-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  color: #ddd;
}
.msg-widget-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.msg-widget .msg-widget-tools button {
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid var(--widget-cell-border, #555);
  background: var(--widget-cell-bg, #222);
  color: var(--widget-text, #ddd);
  cursor: pointer;
  font-size: 11px;
  box-shadow: none;
}
.msg-widget .msg-widget-tools button:hover {
  border-color: var(--widget-accent, #777);
  background: var(--widget-cell-bg, #2a2a2a);
  color: var(--widget-text, #fff);
}
.msg-widget .msg-widget-tools button i { pointer-events: none; }
.msg-widget-parked {
  margin: 0;
  font-size: 12px;
  color: var(--widget-muted, #9ca3af);
}
.msg-widget-status {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 4px;
}
.msg-widget-players {
  font-size: 11px;
  color: #777;
  margin-bottom: 8px;
}
.msg-widget-body { min-width: 0; }

.msg-attachments {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 6px 0 8px;
  max-width: min(480px, 100%);
}
.msg-media {
  display: block;
  max-width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  border: 1px solid #2a2a2a;
  text-align: center;
}
.msg-media img,
.msg-media video {
  display: block;
  max-width: 100%;
  max-height: 360px;
  height: auto;
  cursor: zoom-in;
}
.msg-media.msg-yt {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.msg-media.msg-yt-short {
  aspect-ratio: 9 / 16;
  max-width: min(220px, 100%);
  max-height: 360px;
}
.msg-media.msg-yt iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.msg-media audio {
  display: none;
}
.msg-audio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  max-width: min(460px, 100%);
  --audio-progress: 0%;
  --audio-volume: 100%;
}
.msg-audio-play,
.msg-audio-dl {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
}
.msg-audio-play {
  background: #2563eb;
  color: #fff;
}
.msg-audio-play:hover { background: #1d4ed8; }
.msg-audio.playing .msg-audio-play { background: #1d4ed8; }
.msg-audio-dl {
  background: #222;
  color: #93c5fd;
}
.msg-audio-dl:hover { background: #2a2a2a; color: #fff; }
.msg-audio-main {
  min-width: 0;
  flex: 1;
}
.msg-audio-title {
  font-size: 13px;
  font-weight: 600;
  color: #eee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-audio-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.msg-audio-time,
.msg-audio-dur {
  font-size: 11px;
  color: #888;
  font-variant-numeric: tabular-nums;
  min-width: 32px;
}
.msg-audio-dur { text-align: right; }
.msg-audio-seek {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 6px;
  margin: 0;
  border-radius: 99px;
  background: linear-gradient(
    to right,
    #2563eb 0 var(--audio-progress),
    #333 var(--audio-progress) 100%
  );
  outline: none;
  cursor: pointer;
}
.msg-audio-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #eee;
  border: none;
}
.msg-audio-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #eee;
  border: none;
}
.msg-audio-seek::-moz-range-track {
  background: transparent;
}
.msg-audio-volrow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.msg-audio-mute {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  color: #888;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.msg-audio-mute:hover { color: #eee; }
.msg-audio.muted .msg-audio-mute { color: #888; }
.msg-audio-vol {
  -webkit-appearance: none;
  appearance: none;
  width: 84px;
  max-width: 40%;
  height: 5px;
  margin: 0;
  border-radius: 99px;
  background: linear-gradient(
    to right,
    #2563eb 0 var(--audio-volume),
    #333 var(--audio-volume) 100%
  );
  outline: none;
  cursor: pointer;
}
.msg-audio-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #eee;
  border: none;
}
.msg-audio-vol::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #eee;
  border: none;
}
.msg-audio-vol::-moz-range-track {
  background: transparent;
}
.msg-file-expired {
  font-size: 12px;
  color: #888;
  background: #1a1a1a;
  border: 1px dashed #444;
  border-radius: 8px;
  padding: 10px 12px;
}
.msg-file-link {
  font-size: 12px;
  color: #93c5fd;
}
.msg-media.msg-file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  max-width: min(420px, 100%);
}
.msg-file-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #222;
  color: #93c5fd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.msg-file-body {
  min-width: 0;
  flex: 1;
}
.msg-file-name {
  font-size: 13px;
  font-weight: 600;
  color: #eee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-file-meta {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}
.msg-file-download {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}
.msg-file-download:hover {
  background: #1d4ed8;
  color: #fff;
}

.media-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.media-lightbox img,
.media-lightbox video {
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  border-radius: 8px;
}
.media-lightbox-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent !important;
  color: #eee;
  font-size: 28px;
  border: none;
  cursor: pointer;
}
.emoji-tray {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 8px;
  max-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.emoji-tray[hidden] { display: none; }
#emoji-search {
  width: 100%;
  background: #222;
  border: 1px solid #444;
  color: #eee;
  padding: 6px 8px;
  border-radius: 4px;
  outline: none;
  font-size: 13px;
}
#emoji-search:focus { border-color: #555; }
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 4px;
  overflow-y: auto;
  max-height: 160px;
}
.emoji-grid button.emoji-pick {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
}
.emoji-grid button.emoji-pick:hover {
  background: #2a2a2a;
}
.emoji-grid button.emoji-pick img, .emoji {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}
.emoji {
  all: unset;
  border-radius: 0;
  height: 1.35em;
  width: auto;
  max-height: 28px;
  vertical-align: -0.25em;
  display: inline;
  margin: 0 1px;
}
.content.containsOnlyEmojis {
  font-size: 2.25em;
  line-height: 1.15;
}
.content.containsOnlyEmojis p {
  margin: 0;
}
.content.containsOnlyEmojis .emoji {
  height: 2.25em;
  max-height: 52px;
  width: auto;
  vertical-align: middle;
}

button {
  background: #2563eb; /* bootstrap blue <3 */
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
button:hover { background: #1d4ed8; }

#pin-bar button,
#pin-bar button:hover,
#pin-bar button:active,
#pin-bar button:focus {
  background: transparent;
  color: inherit;
  border: none;
  box-shadow: none;
  transform: none;
}
#pin-bar-toggle:hover { background: rgba(255, 255, 255, 0.04); }
#pin-bar .pin-item-unpin:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}
button.secondary { background: #333; }
button.secondary:hover { background: #444; }
#btn-list-rooms {
  position: relative;
}
#btn-list-rooms.has-message-alert::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 2px #333;
  pointer-events: none;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }

#btn-send, #btn-emoji, #btn-attach, #btn-widget {
  font-size: 12pt;
  min-height: 38px;
  background: transparent;
  border: none;
  padding: 5px
}

.reaction-picker {
  background: #2a2a2a;
  border-radius: 4px;
  box-shadow: 2px 2px 5px #000;
  overflow: auto;
  max-width: 500px;
}
.react-pick {
  background: transparent !important;
}
.reaction-chip {
  background: #222;
  box-sizing: border-box;
  padding: 3px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.reaction-chip + .reaction-chip {
  margin-left: 5px;
}
.reaction-chip.mine {
  border: solid 2px #111;
  background: #353535;
}
.tinyEmoji {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: inline;
}
.reaction-picker .tinyEmoji {
  transition: transform 250ms linear;
}
.reaction-picker .tinyEmoji:hover {
  transform: scale(3);
}

/* Auth overlay */
#auth {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
#auth.hidden { display: none; }
#auth-box {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 24px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#auth-box h1 { font-size: 18px; margin-bottom: 4px; }
#auth-box input {
  background: #222;
  border: 1px solid #444;
  color: #eee;
  padding: 8px 10px;
  border-radius: 4px;
  width: 100%;
}
#auth-box .row { display: flex; gap: 8px; }
#auth-box .row button { flex: 1; }
#auth-error { color: #f87171; font-size: 13px; min-height: 18px; }

/* Room bar */
#room-bar {
  background: #1a1a1a;
  border-bottom: 1px solid #333;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
#room-bar input {
  background: #222;
  border: 1px solid #444;
  color: #eee;
  padding: 6px 8px;
  border-radius: 4px;
  width: 140px;
}
#room-info, #start { font-size: 12px; color: #888; margin-left: auto; margin: 8px 12px; flex: 1; }
#room-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 10px 6px 0;
  flex-shrink: 0;
}
#room-tools[hidden] { display: none; }
#room-tools .room-tools-more {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0.75;
}
#room-tools .room-tools-more:hover,
#room-tools .room-tools-more:focus-visible,
#room-tools.menu-open .room-tools-more {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

/* System notices */
.system {
  text-align: center;
  font-size: 12px;
  color: #666;
  padding: 4px 0;
}

/* Date separators between message days */
.date-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 2px;
  color: #888;
  font-size: 12px;
  font-weight: 600;
  user-select: none;
  letter-spacing: 0.02em;
}
.date-separator::before,
.date-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #333;
}
.date-separator span {
  white-space: nowrap;
  padding: 0 2px;
}

/* icons */
.ico {
  user-select: none;
}


/* discord disclaimer  */
#top_banner {
  position: fixed;
  left: 0;
  top: 0;
  padding: 10px;
  color: #000;
  background: #FF7;
  width: 100%;
  display: flex;
}
#discord-warning {
  flex: 1;
}
#about {
  cursor: help;
}

/* Embed mode (iframe) */
body.embed {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
body.embed #auth {
  /* full viewport auth in iframe */
}
body.embed header,
body.embed #room-bar,
body.embed #createServer,
body.embed #btn-list-rooms,
body.embed #btn-leave,
#btn-leave {
  display: none !important;
}

.brand-div, .brand-cord {
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
  background: transparent !important;
}
.brand-div {
  font-family: klaxon;
  color: #FAA !important;
  margin: 0;
}
.brand-cord {
  font-family: Friend Bestie;
  color: #FFF !important;
  margin: 0;
}

#embed-bar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: #1a1a1a;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
  min-height: 40px;
}
body.embed-active #embed-bar {
  display: flex;
}
#embed-bar .embed-bar-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
#embed-bar .embed-room-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin: 0;
  padding: 2px 6px 2px 4px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
}
#embed-bar .embed-room-btn:hover,
#embed-bar .embed-room-btn:focus-visible {
  background: #2a2a2a;
}
#embed-bar .embed-room-btn.has-message-alert::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 2px #1a1a1a;
  pointer-events: none;
}
#embed-bar .embed-room-btn .fa-caret-down {
  flex-shrink: 0;
  font-size: 10px;
  color: #888;
}
#embed-bar .embed-room {
  font-weight: 600;
  font-size: 13px;
  color: #e0e0e0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#embed-bar .status {
  font-size: 11px;
  color: #888;
}
#embed-bar #room-tools {
  margin: 0;
}
#embed-bar .embed-bar-user {
  flex-shrink: 0;
  max-width: 40%;
}
#embed-bar .embed-bar-user .user {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
#btn-embed-sidebar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

body.embed #main {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
}

/* Sidebar drawer */
body.embed #embed-aside {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(280px, 88vw);
  z-index: 40;
  transform: translateX(-105%);
  transition: transform 0.2s ease;
  box-shadow: none;
  background: #161616;
  border-right: 1px solid #333;
}
body.embed.embed-sidebar-open #embed-aside {
  transform: translateX(0);
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.45);
}
body.embed #user-list {
  position: relative;
  z-index: 1;
}
.embed-nav {
  margin: 0 0 14px;
  padding: 0 0 12px;
  border-bottom: 1px solid #2a2a2a;
}
.embed-nav .aside-collapse {
  margin-top: 2px;
}
.embed-nav-more {
  margin-left: auto;
  padding: 1px 7px;
  border: 1px solid #333;
  border-radius: 999px;
  background: #222;
  color: #bbb;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  cursor: pointer;
}
.embed-nav-more:hover {
  background: #2c2c2c;
  color: #fff;
}
#embed-dm-unread {
  margin-left: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
#embed-room-list,
#embed-dm-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
}
.embed-nav-item {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: 6px;
}
.embed-nav-item:hover,
.embed-nav-item:focus-within {
  background: #222;
}
.embed-nav-item.active {
  background: #1e3a5f;
  color: #fff;
}
.embed-nav-btn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  flex: 1;
  width: auto;
  margin: 0;
  padding: 6px 8px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.embed-nav-btn:hover,
.embed-nav-btn:focus-visible {
  background: transparent;
  color: inherit;
}
.embed-nav-item.active .embed-nav-btn {
  background: transparent;
  color: #fff;
}
.embed-nav-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.embed-nav-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.embed-nav-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.embed-nav-flags {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 3px;
}
.embed-nav-meta {
  flex-shrink: 0;
  color: #777;
  font-size: 11px;
}
.embed-nav-presence {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  color: #888;
  font-size: 11px;
  line-height: 1.2;
}
.embed-nav-you {
  flex-shrink: 0;
  font-weight: 600;
  color: #bbb;
}
.embed-nav-and {
  flex-shrink: 0;
}
.embed-nav-cascade {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.embed-nav-cascade .embed-nav-avatar {
  width: 18px;
  height: 18px;
  border: 1px solid #1a1a1a;
  box-shadow: none;
  margin-left: -6px;
}
.embed-nav-cascade .embed-nav-avatar:first-child {
  margin-left: 0;
}
.embed-nav-cascade .embed-nav-avatar.avatar-placeholder {
  font-size: 9px;
}
.embed-nav-cascade .embed-nav-avatar-self {
  box-shadow: 0 0 0 1px #3b82f6;
  z-index: 4;
}
.embed-nav-more-count {
  flex-shrink: 0;
  color: #777;
}
.embed-nav-unread {
  flex-shrink: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.embed-nav-leave {
  flex-shrink: 0;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #888;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
.embed-nav-leave:hover,
.embed-nav-leave:focus-visible,
.embed-nav-leave:active {
  background: transparent;
  border: none;
  box-shadow: none;
  color: #f87171;
}
.embed-nav-empty {
  padding: 4px 8px 8px;
  color: #666;
  font-size: 12px;
}
.embed-nav-create {
  margin-top: 4px;
}
.embed-nav-create-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  border: 1px dashed #3a3a3a;
  border-radius: 6px;
  background: transparent;
  color: #9ca3af;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.embed-nav-create-btn i {
  width: 12px;
  font-size: 11px;
}
.embed-nav-create-btn:hover,
.embed-nav-create-btn:focus-visible {
  background: #222;
  color: #fff;
  border-color: #555;
}
body.embed .embed-nav-create {
  display: none;
}
.embed-aside-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2a2a2a;
  font-size: 13px;
}
#btn-embed-sidebar-close {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
#embed-sidebar-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 35;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}
#embed-sidebar-backdrop[hidden] {
  display: none !important;
}

body.embed #chat-area {
  min-width: 0;
  min-height: 0;
}

/* Tighter auth box in embed */
body.embed #auth-box {
  max-width: 320px;
}
body.embed #auth {
  padding: 16px;
}

/* Example FLair CLasses */


/* Flaming Name */
.flames {
  background-image: url(https://nightscape.xobyte.org/media/flames.gif);
  background-size: 50px 100%;
  background-repeat: repeat-x;
  color: #F00 !important;
  text-shadow: 0 0 3px #F70 !important;
  padding-left: 5px !important;
  padding-right: 5px !important;
  display: inline-flex !important;
  flex: unset !important;
}


/* RGB/Rainbow Name */
@keyframes rgbNameAnim {
  0%   { background-position: 0% 50%; }
  100%  { background-position: 200% 50%; }
}
.rgb {
  font-family: arial, sans-serif; !important;
  background-image: linear-gradient(to left, 
        #ff0000, #ff7f00, #ffff00, #00ff00, 
        #00ffff, #0000ff, #8b00ff, #ff0000,
        #ff0000, #ff7f00, #ffff00, #00ff00, 
        #00ffff, #0000ff, #8b00ff);
  background-size: 1600% 100%;
  color: transparent !important;
  background-clip: text;
  -webkit-background-clip: text;
  background-color: #333;
  animation: rgbNameAnim 10s linear infinite;
}