body {
  display: flex;
  width: 100dvw;
  height: 100dvh;
  overflow: hidden;
}
svg {
  flex-shrink: 0;
}

#contextmenu {
  flex-direction: column;
  position: absolute;
  margin: 0px;
  padding: 2px;
  border-color: var(--bg-3);
  border-radius: 0.25rem;
  z-index: 999999;
}
#contextmenu[open] {
  display: flex;
}
#contextmenu button {
  text-align: left;
  border: none;
  border-radius: 0;
}

#usermenu {
  width: 280px;
  margin: 0px;
  z-index: 999999;
}
#usermenu .avatar {
  position: absolute;
  top: 50px;
  left: 10px;
  width: 80px;
  height: 80px;
  border-radius: 5rem;
  border: 5px var(--bg-1) solid;
  background: var(--bg-1);
}
#usermenu .banner {
  width: 300px;
  height: 100px;
  margin: -10px 0px 40px -10px;
  border-radius: 1rem 1rem 0px 0px;
  background: var(--color);
  overflow: hidden;
}
#usermenu .banner img {
  width: 300px;
  height: 100px;
  object-fit: cover;
}
#usermenu .badges {
  position: absolute;
  top: 50px;
  left: 90px;
  display: flex;
}
#usermenu > .name > b {
  font-size: 125%;
}
#usermenu > .name > span {
  font-size: 75%;
}
#usermenu .bio {
  white-space: break-spaces;
  word-break: break-word;
}

@keyframes select-enter {
  from {left:-15px}
  to {left:-10px}
}
@keyframes select-leave {
  from {left:-10px}
  to {left:-15px}
}
#server {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
  background: var(--bg-0);
}
#server-list {
  display: flex;
  gap: 10px;
  flex-direction: column;
  align-items: center;
  width: 70px;
  flex: 1;
  overflow-y: auto;
}
.server-clicky {
  cursor: pointer;
  position: relative;
  width: 50px;
  height: 50px;
  aspect-ratio: 1 / 1;
  padding: 0px;
  margin: 0px;
  border: none;
  border-radius: 2rem;
  color: var(--text-1) !important;
  background-color: var(--bg-1) !important;
  transition: border-radius 250ms;
  outline: none !important;
}
.server-clicky:hover, .server-clicky[selected] {
  border-radius: 1rem;
}
.server-clicky[selected]::before {
  content: "";
  display: block;
  position: absolute;
  top: 25%;
  left: -15px;
  width: 5px;
  height: 25px;
  border-radius: 0px 1rem 1rem 0px;
  background-color: var(--blue-1);
  animation: select-enter forwards 250ms;
}
.server-clicky[selected].leaving::before {
  animation: select-leave forwards 250ms;
}
.server-clicky img {
  width: 50px;
  height: 50px;
  border-radius: 2rem;
  transition: border-radius 250ms;
}
.server-clicky:hover img, .server-clicky[selected] img {
  border-radius: 1rem;
}
.server-clicky .paused-invites {
  position: absolute;
  right: 0px;
  bottom: 0px;
  padding: 3px;
  border-radius: 0.25rem;
  background-color: var(--bg-0);
}
.server-folder {
  display: flex;
  gap: 10px;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  width: 50px;
  height: 50px;
  padding: 2px;
  border: none;
  border-radius: 1rem;
  transition: height 500ms;
  background-color: var(--folder-color);
  overflow-y: clip;
}
.server-folder svg {
  cursor: pointer;
  width: 50px;
  height: 50px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}
#server-list::-webkit-scrollbar {
  display: none;
}
#main, #account {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5vw;
}

#channels-server-header {
  position: relative;
  flex-shrink: 0;
  min-height: 35px;
  background: var(--bg-0);
}
#channels-server-header div::before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(180deg, var(--bg-2) 0%, transparent 35%);
}
#channels-server-header img {
  width: 100%;
}
#channels-server-header .name {
  display: block;
  position: absolute;
  top: 5px;
  left: 5%;
  width: 90%;
  padding: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  z-index: 9999;
}

#channel {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  width: 15vw;
  border-right: 4px var(--bg-2) solid;
  background-color: var(--bg-1);
}
#channel button {
  position: relative;
  display: flex;
  gap: 5px;
  align-items: center;
  flex-shrink: 0;
  border: none;
  text-align: left;
  border-radius: 0.5rem;
}
#channel button .name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}
#channel button .tag {
  display: inline-flex;
  align-items: center;
  font-size: 75%;
  padding: 0px 2px;
  border-radius: 0.25rem;
  background-color: var(--bg-3);
}
#channel button .avatar, #channel button svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  z-index: 2;
}
#channel button .avatar, #channel button .avatar img:not(.decoration) {
  border-radius: 2rem;
}
.channel-nsfw {
  position: absolute;
}
#channel button:hover {
  color: var(--text-1);
  background-color: var(--bg-3);
}
#channel button .nameplate {
  position: absolute;
  inset: 0px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
}

#channel .cat {
  flex-shrink: 0;
  color: var(--text-2);
  font-size: 80%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.avatar {
  position: relative;
}
.decoration {
  position: absolute;
  top: -12.5%;
  left: -12.5%;
}

main {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.emoji {
  width: 1em;
  height: 1em;
  object-fit: contain;
  margin-bottom: -4px;
}
.top {
  display: flex;
  align-items: center;
  height: 4vh;
  padding: 0px 5px;
  background-color: var(--bg-0);
  box-sizing: border-box;
}
#top-name {
  display: flex;
  gap: 5px;
  align-items: center;
  font-size: 110%;
}
#messages {
  display: flex;
  flex-direction: column-reverse;
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  box-sizing: border-box;
}
.message {
  display: flex;
  gap: 10px;
  position: relative;
  padding: 2px 4px;
  border-radius: 0.5rem;
  transition: 250ms;
}
.message:hover {
  backdrop-filter: brightness(1.2);
}
.message:has(.reply-preview) {
  padding-top: 25px;
}
.reply-preview {
  position: absolute;
  top: 0px;
  display: flex;
  gap: 5px;
}
.reply-preview img {
  cursor: pointer;
  border-radius: 2rem;
}
.reply-preview .inner {
  text-overflow: ellipsis;
  width: 30vw;
  overflow: hidden;
}
.reply-preview .inner, .reply-preview .inner * {
  word-break: normal !important;
  white-space: nowrap !important;
}
.message .name {
  cursor: pointer;
  color: var(--rc, var(--text-0));
}
.message .name:hover {
  text-decoration: underline;
}
.message .tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-size: 75%;
  padding: 0px 2px;
  margin-left: 5px;
  border-radius: 0.25rem;
  background-color: var(--blue-1);
}
.message .timestamp {
  margin: 0px 5px;
  font-size: 70%;
  color: var(--text-2);
}
.message > .avatar {
  cursor: pointer;
  width: 40px;
  height: fit-content;
  flex-shrink: 0;
}
.message .avatar img:not(.decoration) {
  border-radius: 2rem;
}
.message > span {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.message .inner {
  word-break: break-word;
  white-space: break-spaces;
}
.message .inner .edited {
  color: var(--text-2);
  font-size: 60%;
}
.message > *:not(:nth-child(1)) .user, .message > *:not(:nth-child(1)) .role, .message > *:not(:nth-child(1)) .channel {
  cursor: pointer;
  color: var(--mcol);
  padding: 0px 2px;
  margin: 0px;
  border-radius: 0.25rem;
  background-color: color-mix(in srgb, var(--mcol, var(--blue-1)) 33%, transparent);
}
.message .inner .role {
  cursor: auto;
}
.message.mention::before, .message.ephemeral::before {
  display: block;
  content: "";
  position: absolute;
  top: 0px;
  left: -10px;
  width: calc(100% + 20px);
  height: 100%;
  opacity: 0.25;
  background-color: var(--blue-1);
  box-sizing: border-box;
  z-index: -10;
}
.message.mention::after, .message.ephemeral::after {
  display: block;
  content: "";
  position: absolute;
  top: 0px;
  left: -10px;
  width: 5px;
  height: 100%;
  background-color: var(--blue-1);
  z-index: -5;
}
.message-attach {
  width: fit-content;
  height: fit-content;
  max-width: min(45vh, 100%);
  max-height: 45vh;
  margin: 2px;
  border-radius: 0.25rem;
  object-fit: contain;
  transition: filter 500ms;
}
audio.message-attach {
  width: 100%;
}
div.message-attach {
  padding: 15px;
  border-radius: 2rem;
  background-color: var(--bg-2);
  transition: background-color 250ms;
}
.message:hover div.message-attach {
  background-color: var(--bg-1);
}
lottie-sticker.message-attach {
  width: 160px;
  height: 160px;
}
.message-attach.spoiler {
  filter: blur(6px) contrast(1.5) saturate(0.5) grayscale(0.5);
}
.reactions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.reactions button {
  display: flex;
  gap: 5px;
  align-items: center;
  color: var(--text-1);
  padding: 4px;
  border: 2px var(--bg-3) solid;
  background-color: var(--bg-1);
}
.reactions button.me {
  border-color: var(--blue-1);
  background-color: var(--blue-1);
}
.reactions button img {
  width: 16px;
  height: 16px;
  margin: 0px;
}
.reactions button:hover {
  color: var(--text-0);
  background-color: var(--bg-3);
}
.reactions button.me:hover {
  filter: brightness(1.1);
  background-color: var(--blue-1);
}
.message .thread {
  width: fit-content;
  padding: 10px;
  margin-top: 10px;
  border-radius: 0.5rem;
  background: var(--bg-2);
  transition: 500ms;
}
.message:hover .thread {
  background: var(--bg-1);
}
.message-rich-embed {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  position: relative;
  width: fit-content;
  max-width: 75%;
  margin: 2px;
  border-radius: 0.5rem;
  padding: 10px;
  white-space: normal;
  background-color: var(--bg-2);
}
.message-rich-embed::before {
  content: "";
  display: inline-block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  border-radius: 1rem 0 0 1rem;
  background-color: var(--embed-color);
}
.message-rich-embed a {
  text-decoration: none;
}
.message-rich-embed a[href]:hover {
  cursor: pointer;
  text-decoration: underline;
}
.message-rich-embed .thumbnail {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 50px;
  height: 50px;
  margin: 0;
}
.message-rich-embed:has(.thumbnail):not(:has(.big)) {
  padding-right: 70px;
  padding-bottom: 20px;
}
.message-rich-embed .sub {
  cursor: auto;
  font-size: 75%;
  color: var(--text-2);
}
.message-rich-embed .etitle {
  font-weight: bold;
}
.message-rich-embed .etitle:not([href]) {
  cursor: auto;
  color: var(--text-1);
}
.message-rich-embed .desc {
  word-break: break-word;
  white-space: break-spaces;
}
.message-rich-embed .fields {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}
.message-rich-embed .fields > div {
  display: flex;
  flex: 1 1 33.33%;
  flex-direction: column;
}
.message-rich-embed .footer {
  display: flex;
  gap: 5px;
  align-items: center;
  color: var(--text-2);
  font-size: 75%;
}
.message-rich-embed .footer .text, .message-rich-embed .sub {
  display: flex;
  gap: 3px;
  align-items: center;
}
.message-rich-embed .footer img, .message-rich-embed .sub img {
  width: 15px;
  height: 15px;
  border-radius: 2rem;
}
.message-rich-embed .footer .dot {
  width: 4px;
  height: 4px;
  border-radius: 2rem;
  background-color: var(--text-2);
}
.message-rich-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  max-height: unset;
}
.server-invite {
  width: fit-content;
  max-width: 50%;
  border-radius: 0.5rem;
  background-color: var(--bg-2);
  overflow: hidden;
}
.server-invite > .banner {
  width: 100%;
  height: 100px;
  object-fit: cover;
}
.server-invite > div {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0px 10px;
}
.server-invite > div > img {
  border-radius: 1rem;
}
.server-invite > div > span {
  display: flex;
  flex-direction: column;
}
.server-invite > button {
  width: calc(100% - 20px);
  margin: 0px 10px 10px;
  border: none;
  font-size: 100%;
  background: color-mix(in oklab, var(--green-2) 75%, var(--bg-0) 25%);
}
.server-invite .traits {
  padding: 10px;
}
.server-invite .traits span {
  display: flex;
  gap: 5px;
  flex-direction: row;
  align-items: center;
  padding: 2px 5px;
  border-radius: 0.5rem;
  background-color: var(--bg-3);
}
.component.c1 {
  display: flex;
  gap: 5px;
}
a:has(.component.c2) {
  text-decoration: none;
}
.component.c2 {
  display: flex;
  gap: 5px;
  padding: 8px;
  border: none;
}
.component.c2:hover {
  color: var(--text-1);
  backdrop-filter: brightness(0.75);
}
.component.c2[disabled] {
  backdrop-filter: opacity(0.5);
}
.component.c2[disabled]:hover {
  color: var(--text-3);
}
.component.c2.style-1 {
  background: var(--blue-1);
}
.component.c2.style-2 {
  background: var(--black-1);
}
.component.c2.style-3 {
  background: var(--green-2);
}
.component.c2.style-4 {
  background: var(--red-2);
}
.component.c2.style-5 {
  background: var(--black-1);
}
.component.c2 img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}
.component.c2[disabled] img {
  opacity: 0.5;
}
.component.c3 {
  width: 50%;
}
.component.c3 .preview {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 8px;
  margin: 2px 0px;
  border: none;
  border-radius: 0.5rem;
  background-color: var(--bg-0);
}
.component.c3 .menu {
  color: var(--text-1);
  margin: 0;
  border: none;
  background-color: var(--bg-2);
}
.component.c3 .menu::backdrop {
  background: none;
  backdrop-filter: none;
}
.component.c3 .opt {
  display: flex;
  gap: 5px;
}
.component.c3 .opt > span {
  display: flex;
  flex-direction: column;
}
.component.c3 .opt > span > span {
  color: var(--text-2);
  font-size: 80%;
}
.component.c17 {
  display: flex;
  flex-direction: column;
  position: relative;
  width: fit-content;
  max-width: 75%;
  margin: 2px;
  border-radius: 0.5rem;
  padding: 10px;
  background: var(--bg-2);
  transition: background-color 250ms;
}
.component.c17::before {
  content: "";
  display: inline-block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  border-radius: 1rem 0 0 1rem;
  background-color: var(--color);
}
.component.c9 {
  display: flex;
  flex-direction: column;
}
.component.c10 {
  word-break: break-word;
  white-space: break-spaces;
}
.component.c14 {
  flex: 1;
  padding: 1px;
  margin: var(--spacing) 0px;
  background-color: var(--divider);
}
.poll {
  display: flex;
  flex-direction: column;
  width: 60%;
  padding: 5px 10px;
  border-radius: 1rem;
  background-color: var(--bg-2);
}
.poll .small {
  font-size: 80%;
  color: var(--text-2);
}
.poll > div > div {
  font-size: 110%;
  margin: 4px 0px;
  padding: 4px;
  border-radius: 0.5rem;
  background-color: var(--bg-3);
}
.message-poll-result {
  gap: 5px;
  flex-direction: row;
  align-items: center;
  width: 40%;
}
.message-poll-result::before {
  content: unset;
}
.message-poll-result .small {
  display: block;
  color: var(--text-2);
  font-size: 75%;
}

.message code {
  word-break: break-word;
  white-space: break-spaces;
  padding: 2px 6px;
  border-radius: 0.25rem;
  background-color: var(--bg-0);
}
.message code.block {
  display: inline-block;
  width: fit-content;
  height: fit-content;
  margin: 2px 0px;
}
blockquote {
  display: inline-block;
  position: relative;
  margin: 0px;
  padding-left: 10px;
}
blockquote::before {
  content: "";
  display: inline-block;
  position: absolute;
  top: -1px;
  left: 0;
  width: 4px;
  height: calc(100% + 2px);
  border-radius: 1rem;
  background-color: var(--text-2);
}
.message.deleted {
  color: var(--red-2);
  text-decoration: line-through;
}
.message.deleted:hover {
  color: var(--red-1);
  text-decoration: none;
}
.message.deleted .message-attach {
  filter: grayscale(1);
}
.message.deleted:hover .message-attach {
  filter: grayscale(0);
}

#slash-bar {
  display: flex;
  max-height: 30dvh;
  border-radius: 0.5rem;
  background-color: var(--bg-2);
}
#slash-bar > div {
  display: flex;
  gap: 5px;
  flex-direction: column;
  padding: 5px;
  overflow: hidden auto;
}
#slash-bar .profiles {
  background-color: var(--bg-0);
  border-radius: 0px 0.5rem 0.5rem 0px;
}
#slash-bar .profiles button {
  width: 32px;
  height: 32px;
  padding: 0px;
  border: none;
}
#slash-bar .profiles img {
  width: 32px;
  height: 32px;
  border-radius: 0.5rem;
}
#slash-bar .cmds {
  flex: 1;
}
#slash-bar .cmds button {
  display: flex;
  flex-direction: column;
  margin: 0px;
  padding: 2px;
  border: none;
  text-align: left;
}
#slash-bar .cmds button:hover {
  color: var(--text-1);
  background-color: var(--bg-1);
}

.input-bar {
  display: flex;
  margin: 5px 10px;
  padding-left: 5px;
  border-radius: 1rem;
  background-color: var(--bg-2);
  box-sizing: border-box;
}
.input-bar textarea {
  flex: 1;
  margin: 0px;
  padding: 8px;
  border: none;
  border-radius: 1rem;
  resize: none;
}
.input-bar button {
  height: 100%;
  border: none;
  border-radius: 1rem;
}

#users {
  display: flex;
  gap: 5px;
  flex-direction: column;
  width: 15vw;
  padding: 6px;
  border-left: 3px var(--bg-2) solid;
  background-color: var(--bg-0);
  box-sizing: border-box;
  overflow: hidden auto;
}
#users summary {
  color: var(--rc);
  font-size: 80%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
#users .user {
  position: relative;
  display: flex;
  gap: 5px;
  align-items: center;
  width: 100%;
  padding: 0px;
  border: none;
  border-radius: 0.5rem;
}
#users .user:hover {
  color: var(--text-1);
  background-color: var(--bg-2);
}
#users .user .avatar {
  z-index: 2;
}
#users .user .avatar img:not(.decoration) {
  border-radius: 2rem;
}
#users .user span {
  color: var(--rc);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  z-index: 2;
}
#users .user .nameplate {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
}