/* Appearance is driven by these variables and persisted per account. */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/dm-sans-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../assets/fonts/manrope-latin.woff2") format("woff2");
}
:root {
  --accent: #1d9bf0;
  --font-size: 15px;
  --bg: #08090b;
  --surface: #08090b;
  --elevated: #15171c;
  --hover: #ffffff08;
  --ink: #e9edf1;
  --muted: #7b8491;
  --line: #25292f;
  --chat-bg: #303238;
  --channel-bg: #27292f;
  --rail-bg: #1c1d22;
  --member-bg: #292b30;
  --input: #3b3d44;
  --shadow: 0 18px 80px #0008;
  color-scheme: dark;
  color: var(--ink);
  background: var(--bg);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: var(--font-size);
  font-synthesis: none;
}
:root[data-theme="light"] {
  --bg: #fff;
  --surface: #fff;
  --elevated: #f5f7f9;
  --hover: #00000005;
  --ink: #111820;
  --muted: #68727e;
  --line: #e8ebee;
  --chat-bg: #fff;
  --channel-bg: #f1f2f5;
  --rail-bg: #e3e5e9;
  --member-bg: #f3f4f7;
  --input: #ebedf1;
  --shadow: 0 18px 80px #1f293733;
  color-scheme: light;
}
:root[data-theme="dim"] {
  --bg: #14202c;
  --surface: #14202c;
  --elevated: #1d2d3d;
  --hover: #ffffff06;
  --ink: #e7edf4;
  --muted: #899cac;
  --line: #2d3c4b;
  --chat-bg: #1c2b3a;
  --channel-bg: #162432;
  --rail-bg: #101b26;
  --member-bg: #182735;
  --input: #2b3b4b;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a,
input,
textarea,
select {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
}
input,
textarea,
select {
  accent-color: var(--accent);
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1,
h2,
h3,
.brand {
  font-family: Manrope, system-ui, sans-serif;
}
h1,
h2 {
  letter-spacing: -0.6px;
}
svg {
  vertical-align: middle;
  flex-shrink: 0;
}
button svg {
  pointer-events: none;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.8rem;
  line-height: 1.65;
}
.tiny {
  font-size: 0.68rem;
}
.eyebrow {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent);
}
.app-shell {
  display: grid;
  grid-template-columns: 68px 225px minmax(0, 600px) minmax(260px, 320px);
  max-width: 1300px;
  margin: auto;
  min-height: 100dvh;
}
.server-rail {
  height: 100dvh;
  position: sticky;
  top: 0;
  background: var(--rail-bg);
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 16px 8px;
  gap: 10px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.rail-home,
.rail-server,
.rail-button {
  height: 46px;
  width: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--channel-bg);
  font-weight: 700;
  transition:
    border-radius 0.15s,
    background 0.15s;
  color: var(--accent);
}
.rail-home {
  background: var(--accent);
  color: white;
  font-size: 29px;
  border-radius: 15px;
  font-family: Manrope, sans-serif;
  letter-spacing: -3px;
  padding-right: 4px;
}
.rail-server {
  background: color-mix(in srgb, var(--space-color) 28%, var(--channel-bg));
  color: var(--ink);
  font-size: 14px;
  position: relative;
}
.rail-server:hover,
.rail-server.active,
.rail-button:hover {
  border-radius: 15px;
  background: var(--space-color, var(--accent));
  color: white;
}
.rail-server.active:before {
  content: "";
  position: absolute;
  left: -10px;
  top: 10px;
  width: 4px;
  height: 26px;
  background: var(--ink);
  border-radius: 3px;
}
.rail-divider {
  width: 28px;
  height: 2px;
  background: var(--line);
  flex-shrink: 0;
}
#rail-servers {
  display: grid;
  gap: 10px;
}
.rail-bottom {
  margin-top: auto;
  padding-top: 16px;
}
.sidebar {
  height: 100dvh;
  position: sticky;
  top: 0;
  padding: 22px 18px 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
}
.brand {
  font-size: 33px;
  font-weight: 800;
  letter-spacing: -1.7px;
  display: inline-block;
  padding: 0 10px;
}
.brand > span {
  color: var(--accent);
}
.sidebar-caption {
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 1.8px;
  margin: 11px 10px 19px;
}
.sidebar nav {
  display: grid;
  gap: 3px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 11px;
  border-radius: 28px;
  position: relative;
  white-space: nowrap;
}
.nav-item > svg,
.nav-item > span:first-child svg {
  width: 24px;
  height: 24px;
}
.nav-item.active {
  font-weight: 700;
}
.nav-item.active > span:first-child {
  color: var(--accent);
}
.nav-item:hover {
  background: var(--hover);
}
.badge {
  background: var(--accent);
  color: white;
  border-radius: 20px;
  font-size: 10px;
  line-height: 1;
  min-width: 18px;
  padding: 4px;
  text-align: center;
  margin-left: auto;
}
.sidebar-spacer {
  flex: 1;
  min-height: 25px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 30px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.87rem;
  line-height: 1.4;
  transition:
    filter 0.15s,
    background 0.15s;
  white-space: nowrap;
}
.button:hover {
  filter: brightness(0.92);
}
.button.primary {
  background: var(--accent);
  color: #fff;
}
.button.contrast {
  background: var(--ink);
  color: var(--bg);
}
.button.secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.button.danger {
  background: #bf3445;
  color: #fff;
}
.wide {
  width: 100%;
}
.compose-shortcut {
  padding: 14px;
  margin-top: 20px;
}
.account {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.account-person,
.person-link {
  display: flex;
  gap: 11px;
  align-items: center;
  min-width: 0;
  flex: 1;
}
.account-person > span:last-child,
.person-link > span:last-child {
  min-width: 0;
}
.account-person strong,
.account-person small,
.person-link strong,
.person-link small {
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.account-person strong {
  font-size: 0.82rem;
}
.account-person small,
.person-link small {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}
.person-link strong {
  font-size: 0.9rem;
}
.avatar {
  height: 40px;
  width: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--avatar-color) 22%, var(--elevated));
  color: var(--avatar-color);
  font-weight: 700;
  font-size: 13px;
  overflow: hidden;
}
.avatar img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.avatar.large {
  width: 130px;
  height: 130px;
  border: 5px solid var(--bg);
  font-size: 36px;
}
.account .avatar {
  height: 35px;
  width: 35px;
}
main {
  min-width: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
main:focus {
  outline: none;
}
.page-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  gap: 10px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 3;
}
.page-header h1 {
  font-size: 1.27rem;
  line-height: 1.3;
}
.header-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.header-title small {
  font-size: 0.75rem;
}
.header-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.back-button {
  display: none !important;
}
.rightbar {
  padding: 14px 24px;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: auto;
  scrollbar-width: thin;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 30px;
  background: var(--elevated);
  padding: 12px 16px;
  border: 1px solid transparent;
  min-width: 0;
}
.search-box:focus-within {
  border-color: var(--accent);
}
.search-box > svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.search-box input {
  border: 0;
  outline: none;
  min-width: 0;
  width: 100%;
  background: none;
  font-size: 0.9rem;
}
.discovery-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px;
  margin-top: 20px;
}
.discovery-card h2 {
  font-size: 1.2rem;
  font-weight: 800;
}
.person-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 0;
  min-width: 0;
}
.person-row > .person-link {
  min-width: 0;
}
.follow-button {
  padding: 7px 12px;
  font-size: 0.76rem;
}
.text-link,
.text-button {
  color: var(--accent);
  background: none;
  font-size: 0.82rem;
  padding: 5px 0;
  text-align: left;
}
.text-link {
  display: block;
  margin-top: 8px;
}
.text-button:hover,
.text-link:hover {
  text-decoration: underline;
}
.discovery-servers h2 {
  font-size: 1.4rem;
  margin: 14px 0;
}
.discovery-servers p {
  font-size: 0.84rem;
  line-height: 1.8;
  margin-bottom: 20px;
}
.right-footer {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
  padding: 20px 9px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.6;
}
.tabs {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  min-height: 52px;
  gap: 0;
}
.tabs > a,
.tabs > span {
  flex: 1;
  position: relative;
  text-align: center;
  padding: 17px 12px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
}
.tabs > a:hover {
  background: var(--hover);
}
.tabs .active {
  color: var(--ink);
  font-weight: 700;
}
.tabs .active:after {
  content: "";
  height: 4px;
  width: 52px;
  background: var(--accent);
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 4px;
}
.composer {
  padding: 18px 17px 12px;
  border-bottom: 1px solid var(--line);
}
.composer-top {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}
.composer textarea,
.reply-composer textarea {
  width: 100%;
  resize: vertical;
  max-height: 350px;
  min-height: 74px;
  background: none;
  border: 0;
  outline: none;
  font-size: 1.2rem;
  line-height: 1.6;
  padding: 6px 0;
  color: var(--ink);
}
.composer textarea::placeholder {
  color: var(--muted);
}
.composer-bottom {
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid var(--line);
  margin: 8px 0 0 52px;
  padding-top: 10px;
}
.composer-bottom .small {
  font-size: 0.7rem;
}
.composer-bottom #post-count {
  margin-left: auto;
  white-space: nowrap;
}
.composer-bottom .button {
  padding: 8px 17px;
}
.upload-button {
  color: var(--accent) !important;
  cursor: pointer;
}
.upload-button input {
  width: 0;
  height: 0;
  opacity: 0;
  position: absolute;
}
.icon-button {
  height: 34px;
  min-width: 34px;
  padding: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  flex-shrink: 0;
}
.icon-button:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}
.icon-button svg {
  width: 18px;
  height: 18px;
}
.icon-button.bordered {
  border: 1px solid var(--line);
  color: var(--ink);
}
.guest-welcome {
  padding: 30px 24px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(
    ellipse at top right,
    color-mix(in srgb, var(--accent) 13%, transparent),
    transparent 70%
  );
}
.guest-welcome h2 {
  font-size: 2rem;
  line-height: 1.25;
  font-weight: 800;
  margin: 16px 0;
}
.guest-welcome p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 20px;
}
.post {
  padding: 14px 17px 7px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.post:hover {
  background: var(--hover);
}
.post-layout {
  display: flex;
  gap: 12px;
}
.post-main {
  min-width: 0;
  flex: 1;
}
.post-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 25px;
  font-size: 0.86rem;
}
.post-heading > a {
  min-width: 0;
  overflow-wrap: anywhere;
}
.post-heading .muted {
  font-size: 0.82rem;
}
.post-heading .icon-button {
  height: 25px;
  width: 25px;
  min-width: 25px;
}
.post-content {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.65;
  padding: 3px 0 13px;
}
.post-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0 -7px;
  max-width: 440px;
}
.post-action {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 8px 7px;
  border-radius: 30px;
  min-height: 35px;
}
.post-action svg {
  width: 18px;
  height: 18px;
}
.post-action:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}
.post-action.liked {
  color: #f04b8c;
}
.liked svg {
  fill: currentColor;
}
.reposted {
  color: #20bf83;
}
.saved {
  color: var(--accent);
}
.post-community {
  color: var(--muted);
  font-size: 0.75rem;
  margin: 0 0 8px 52px;
  display: flex;
  gap: 7px;
  align-items: center;
}
.post-community svg {
  height: 14px;
  width: 14px;
}
.post-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 8px;
}
.post-images.images-1 {
  grid-template-columns: 1fr;
}
.post-images img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.post-images.images-1 img {
  height: auto;
  max-height: 480px;
  object-fit: contain;
}
.image-previews {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-left: 52px;
}
.image-previews > div {
  position: relative;
}
.image-previews img {
  height: 90px;
  width: 100px;
  object-fit: cover;
  border-radius: 10px;
}
.image-previews button {
  position: absolute;
  top: 3px;
  right: 3px;
  color: white;
  background: #0009;
  width: 25px;
  height: 25px;
  min-width: 25px;
}
.load-more {
  margin: 25px auto;
  display: flex;
}
.page-padding {
  padding: 22px;
}
.section-title {
  font-size: 1.3rem;
  margin: 20px 0 12px;
}
.people-grid {
  display: grid;
  grid-template-columns: 1fr;
}
.profile-banner {
  height: 190px;
  background: linear-gradient(
    125deg,
    color-mix(in srgb, var(--profile-color) 70%, #10162a),
    color-mix(in srgb, var(--profile-color) 20%, var(--bg))
  );
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.profile-banner > span {
  font:
    800 80px Manrope,
    sans-serif;
  opacity: 0.15;
  margin-right: 20px;
  letter-spacing: -5px;
}
.profile-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-body {
  padding: 0 18px 20px;
}
.profile-body > .avatar {
  margin-top: -68px;
  position: relative;
}
.profile-action {
  float: right;
  display: flex;
  gap: 9px;
  padding-top: 16px;
  align-items: center;
}
.profile-body h2 {
  font-size: 1.4rem;
  margin-top: 9px;
}
.profile-body > p.muted {
  font-size: 0.9rem;
  margin-top: 3px;
}
.profile-bio {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
  margin-top: 15px;
}
.profile-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 14px;
}
.profile-meta a {
  color: var(--accent);
}
.profile-stats {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 0.85rem;
  flex-wrap: wrap;
  margin-top: 15px;
}
.profile-stats strong {
  color: var(--ink);
}
.reply-composer {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.reply-composer textarea {
  font-size: 1rem;
  min-height: 65px;
}
.reply-composer .composer-bottom {
  justify-content: space-between;
}
.comment {
  padding: 18px;
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.comment > div {
  min-width: 0;
  flex: 1;
}
.comment .message-text {
  font-size: 0.95rem;
  margin: 8px 0;
}
.comment .text-button {
  font-size: 0.75rem;
}
.reply-reference {
  display: block;
  font-size: 0.78rem;
  color: var(--accent);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100%;
  background: none;
  text-align: left;
  padding: 3px 0;
}
.reply-reference svg {
  height: 14px;
  width: 14px;
}
.notification-row {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.notification-row p {
  font-size: 0.9rem;
  line-height: 1.6;
}
.notification-row small {
  font-size: 0.75rem;
}
.notification-row.unread {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
.unread-dot {
  height: 7px;
  width: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin: 9px 0 0 auto;
}
.empty-state {
  text-align: center;
  padding: 55px 25px;
  grid-column: 1/-1;
}
.empty-state > span {
  color: var(--accent);
  display: block;
  margin-bottom: 16px;
}
.empty-state > span svg {
  width: 36px;
  height: 36px;
}
.empty-state h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 10px;
}
.empty-state p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.92rem;
  max-width: 370px;
  margin: 0 auto 22px;
}
.empty-state .button + .button {
  margin: 8px;
}
.loading {
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}
.loading i {
  width: 19px;
  height: 19px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.space-intro {
  padding: 8px 0 27px;
}
.space-intro h2 {
  font-size: 1.8rem;
  margin: 12px 0;
}
.space-intro p {
  font-size: 0.92rem;
  line-height: 1.8;
}
.space-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.space-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  min-width: 0;
}
.space-cover {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  background: linear-gradient(
    135deg,
    var(--space-color),
    color-mix(in srgb, var(--space-color) 25%, var(--elevated))
  );
  height: 106px;
  color: white;
}
.space-cover > span {
  font-size: 28px;
  font-family: Manrope, sans-serif;
  font-weight: 800;
}
.space-cover > svg {
  height: 42px;
  width: 42px;
  opacity: 0.35;
}
.space-card-body {
  padding: 18px;
}
.space-card h2 {
  font-size: 1.12rem;
  overflow-wrap: anywhere;
}
.space-card p {
  font-size: 0.8rem;
  line-height: 1.8;
  margin: 10px 0 18px;
  min-height: 42px;
  overflow-wrap: anywhere;
}
.space-card-bottom {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.space-card-bottom .button {
  font-size: 0.75rem;
  padding: 7px 13px;
}
.community-hero {
  padding: 30px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(
    150deg,
    color-mix(in srgb, var(--space-color) 24%, var(--bg)),
    var(--bg)
  );
}
.community-symbol {
  width: 55px;
  height: 55px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--space-color);
  color: white;
}
.community-symbol svg {
  height: 30px;
  width: 30px;
}
.community-hero h2 {
  font-size: 1.8rem;
  margin: 17px 0 10px;
}
.community-hero p {
  color: var(--muted);
  line-height: 1.7;
  white-space: pre-wrap;
}
.community-hero > div {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.community-hero > div > span {
  font-size: 0.82rem;
  color: var(--muted);
}
.community-hero .button {
  font-size: 0.78rem;
}
.invite-landing {
  max-width: 410px;
  margin: 60px auto;
  padding: 28px;
  text-align: center;
}
.invite-symbol {
  background: var(--space-color);
  border-radius: 22px;
  padding: 20px;
  width: 85px;
  height: 85px;
  margin: 0 auto 25px;
  font-size: 30px;
  font-weight: 700;
  color: white;
}
.invite-landing h2 {
  font-size: 1.9rem;
  margin: 16px 0;
}
.invite-landing .muted {
  line-height: 1.7;
  margin-bottom: 15px;
}
.invite-landing > span {
  color: var(--muted);
  font-size: 0.85rem;
}
.invite-landing > .button {
  margin-top: 25px;
}
/* Server workspace: rail, channels, conversation, member roster. */
.server-mode .app-shell {
  max-width: none;
  grid-template-columns: 68px minmax(0, 1fr);
}
.server-mode .sidebar,
.server-mode .rightbar {
  display: none;
}
.server-mode main {
  border: 0;
}
.server-workspace {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr) 220px;
  height: 100dvh;
  overflow: hidden;
  background: var(--chat-bg);
}
.channel-sidebar {
  background: var(--channel-bg);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.server-heading {
  height: 57px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 10px;
  border-bottom: 1px solid #0002;
  flex-shrink: 0;
  box-shadow: 0 1px 3px #0001;
}
.server-heading h1 {
  font-size: 0.94rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.server-heading .icon-button {
  height: 29px;
  min-width: 29px;
  padding: 5px;
}
.server-banner {
  height: 112px;
  padding: 16px 18px;
  background: linear-gradient(
    130deg,
    color-mix(in srgb, var(--space-color) 75%, var(--channel-bg)),
    var(--channel-bg)
  );
  overflow: hidden;
  flex-shrink: 0;
}
.server-banner > span {
  font-size: 23px;
  color: #fff;
  font-family: Manrope, sans-serif;
  font-weight: 800;
}
.server-banner p {
  font-size: 0.74rem;
  color: #ffffffb3;
  line-height: 1.5;
  margin-top: 5px;
  overflow: hidden;
  max-height: 35px;
}
.channel-list {
  overflow-y: auto;
  flex: 1;
  padding: 16px 8px;
  scrollbar-width: thin;
}
.channel-category {
  font-size: 0.7rem;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 5px 3px;
}
.channel-category .icon-button {
  height: 23px;
  min-width: 23px;
  padding: 3px;
}
.channel-row {
  display: flex;
  align-items: center;
  border-radius: 5px;
  color: var(--muted);
  margin: 2px 0;
  min-width: 0;
}
.channel-row > a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  min-width: 0;
  flex: 1;
  font-size: 0.91rem;
  font-weight: 500;
}
.channel-row > a > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.channel-row > a > svg {
  height: 20px;
  width: 20px;
  color: var(--muted);
}
.channel-row > a > svg:last-child:not(:first-child) {
  height: 12px;
  width: 12px;
  margin-left: auto;
}
.channel-row.active {
  background: #ffffff12;
  color: var(--ink);
}
:root[data-theme="light"] .channel-row.active {
  background: #0000000c;
}
.channel-row:hover {
  background: var(--hover);
  color: var(--ink);
}
.channel-edit {
  height: 25px !important;
  min-width: 25px !important;
  padding: 5px;
  opacity: 0;
}
.channel-row:hover .channel-edit,
.channel-row.active .channel-edit,
.channel-edit:focus-visible {
  opacity: 1;
}
.new-channel {
  margin: 15px 10px;
  font-size: 0.8rem;
  color: var(--muted);
}
.server-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 9px;
  background: #0002;
  min-height: 61px;
}
.server-user .avatar {
  height: 32px;
  width: 32px;
  font-size: 11px;
}
.server-user > span:not(.avatar) {
  flex: 1;
  min-width: 0;
}
.server-user strong {
  display: block;
  font-size: 0.78rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.server-user small {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  margin-top: 2px;
}
.server-chat-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.member-sidebar {
  padding: 22px 15px;
  background: var(--member-bg);
  overflow-y: auto;
  scrollbar-width: thin;
}
.member-sidebar h3 {
  font-family: inherit;
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.6px;
  margin: 0 0 24px;
}
.member-sidebar h4 {
  font-size: 0.66rem;
  letter-spacing: 0.4px;
  color: var(--muted);
  margin: 24px 0 10px;
}
.member-person {
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: 5px;
  padding: 6px 0;
}
.member-person > span {
  font-size: 0.83rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.member-person .avatar {
  height: 32px;
  width: 32px;
  font-size: 11px;
}
.member-person small {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  margin-top: 2px;
}
.member-person:hover {
  background: var(--hover);
}
.chat-pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  background: var(--chat-bg);
}
.chat-header {
  height: 57px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #0002;
  box-shadow: 0 1px 3px #0001;
  padding: 0 18px;
  flex-shrink: 0;
  gap: 10px;
}
.chat-title {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.chat-title > svg {
  color: var(--muted);
  height: 24px;
  width: 24px;
}
.chat-title > div {
  min-width: 0;
}
.chat-title h2 {
  font-family: inherit;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-title .small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
  font-size: 0.73rem;
}
.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.live-state {
  font-size: 0.63rem;
  color: var(--muted);
  white-space: nowrap;
}
.live-state.connected {
  color: #50bf91;
}
.live-state.connected:before {
  content: "";
  display: inline-block;
  height: 5px;
  width: 5px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 5px;
}
.chat-scroll {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 20px 0;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}
.chat-beginning {
  padding: 16px 24px 26px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.channel-hash {
  height: 65px;
  width: 65px;
  border-radius: 50%;
  background: var(--input);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.channel-hash svg {
  height: 38px;
  width: 38px;
}
.chat-beginning h2 {
  font-size: 1.55rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.chat-beginning p {
  font-size: 0.88rem;
  margin-top: 8px;
  line-height: 1.7;
}
.chat-message {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 10px 24px;
  min-width: 0;
  scroll-margin: 20px;
}
.chat-message:hover {
  background: #0000000c;
}
.chat-message.pinned {
  background: #dba33c0b;
  border-left: 2px solid #d7aa48;
  padding-left: 22px;
}
.chat-message .avatar {
  height: 38px;
  width: 38px;
}
.chat-message-body {
  min-width: 0;
  flex: 1;
}
.message-heading {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.92rem;
}
.message-heading time {
  color: var(--muted);
  font-size: 0.66rem;
}
.message-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
  font-size: 0.95rem;
  margin-top: 4px;
}
.message-tools {
  position: absolute;
  right: 15px;
  top: -18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: none;
  background: var(--channel-bg);
  box-shadow: 0 2px 7px #0002;
}
.chat-message:hover .message-tools,
.chat-message:focus-within .message-tools {
  display: flex;
}
.message-tools .icon-button {
  border-radius: 4px;
  width: 30px;
  min-width: 30px;
  height: 30px;
  font-size: 20px;
}
.pin-label {
  color: #d7aa48;
  font-size: 0.63rem;
  display: flex;
  gap: 4px;
  align-items: center;
}
.pin-label svg {
  height: 12px;
  width: 12px;
}
.chat-empty {
  font-size: 0.85rem;
  text-align: center;
  padding: 28px;
}
.reactions {
  display: flex;
  gap: 5px;
  margin-top: 7px;
  flex-wrap: wrap;
}
.reaction {
  background: var(--channel-bg);
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 3px 7px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.reaction.mine {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.chat-compose-area {
  padding: 0 22px 16px;
  flex-shrink: 0;
}
.chat-compose-area form {
  background: var(--input);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  flex-wrap: wrap;
}
.chat-compose-area textarea {
  flex: 1;
  width: 0;
  min-width: 50px;
  background: none;
  border: 0;
  outline: none;
  resize: vertical;
  line-height: 1.6;
  padding: 3px 0;
  max-height: 180px;
  font-size: 0.94rem;
}
.chat-compose-area .button {
  padding: 7px 10px;
  border-radius: 7px;
}
.chat-compose-area .button svg {
  width: 18px;
  height: 18px;
}
.chat-compose-area > .tiny {
  display: block;
  margin-top: 7px;
  opacity: 0.75;
}
.chat-compose-area .form-error {
  width: 100%;
}
.older-messages {
  display: block;
  text-align: center;
  margin: 0 auto 10px;
  font-size: 0.78rem;
}
.locked-channel {
  text-align: center;
  padding: 18px;
  font-size: 0.8rem;
}
#message-reply,
#chat-filter {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  background: var(--channel-bg);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}
#message-reply button {
  margin-left: auto;
}
.voice-room {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 25px 20px;
  background: radial-gradient(
    ellipse at top,
    color-mix(in srgb, var(--accent) 20%, var(--chat-bg)),
    var(--chat-bg)
  );
  border-bottom: 1px solid var(--line);
}
.voice-room > span {
  height: 48px;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--input);
  margin-bottom: 12px;
}
.voice-room h2 {
  font-size: 1.3rem;
}
.voice-room p {
  font-size: 0.8rem;
  line-height: 1.8;
  margin: 10px 0;
}
.voice-room .button {
  font-size: 0.8rem;
  padding: 9px 16px;
}
#voice-status {
  position: fixed;
  bottom: 18px;
  left: 84px;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--channel-bg);
  border: 1px solid #32a87c55;
  box-shadow: var(--shadow);
  padding: 11px 15px;
  border-radius: 12px;
  font-size: 0.8rem;
  max-width: calc(100% - 100px);
  flex-wrap: wrap;
}
.voice-connected {
  color: #49bb8d;
  font-size: 0.75rem;
}
.voice-connected svg {
  height: 16px;
  width: 16px;
}
.muted-mic {
  color: #ed5c6a !important;
  background: #ed5c6a15 !important;
}
.messages-mode .app-shell {
  max-width: 1400px;
  grid-template-columns: 68px 225px minmax(0, 1fr);
}
.messages-mode .rightbar {
  display: none;
}
.dm-workspace {
  display: grid;
  grid-template-columns: 275px minmax(0, 1fr);
  height: calc(100dvh - 64px);
}
.conversation-list {
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.conversation-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 15px;
  border-bottom: 1px solid var(--line);
}
.conversation-row:hover,
.conversation-row.active {
  background: var(--elevated);
}
.conversation-row > span:not(.avatar) {
  min-width: 0;
  flex: 1;
}
.conversation-row strong {
  font-size: 0.86rem;
}
.conversation-row small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 5px;
}
.dm-chat {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.dm-chat .chat-pane {
  background: var(--bg);
}
.dm-chat .chat-message:hover {
  background: var(--hover);
}
.dm-chat .chat-beginning h2 {
  font-size: 1.35rem;
}
.dm-back {
  display: none;
}
.settings-page {
  padding: 0 23px 40px;
}
.settings-section {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.settings-section h2 {
  font-size: 1.3rem;
  margin-bottom: 13px;
}
.settings-section > p {
  font-size: 0.86rem;
  line-height: 1.8;
  margin-bottom: 20px;
}
.settings-section fieldset {
  padding: 0;
  border: 0;
  margin: 24px 0;
}
.settings-section legend {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 13px;
}
.theme-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.theme-option {
  position: relative;
  text-align: center;
  margin: 0 !important;
  cursor: pointer;
}
.theme-option input {
  position: absolute;
  top: 7px;
  left: 7px;
}
.theme-sample {
  height: 65px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: #0a0b0d;
  padding: 13px 14px 9px 32px;
  display: block;
}
.theme-sample i {
  display: block;
  height: 4px;
  background: #5b6472;
  margin: 5px 0;
  border-radius: 5px;
}
.theme-light .theme-sample {
  background: #fff;
}
.theme-dim .theme-sample {
  background: #14202c;
}
.theme-system .theme-sample {
  background: linear-gradient(90deg, #fff 50%, #08090b 50%);
}
.theme-option:has(input:checked) .theme-sample {
  border-color: var(--accent);
}
.theme-option strong {
  font-size: 0.75rem;
  display: block;
  margin-top: 9px;
}
.settings-preview {
  border: 1px solid var(--line);
  border-radius: 13px;
  display: flex;
  gap: 12px;
  padding: 20px;
  margin-top: 24px;
  font-size: 0.9rem;
}
.settings-preview p {
  line-height: 1.7;
  margin: 6px 0 9px;
}
.preview-link {
  color: var(--accent);
  font-size: 0.82rem;
}
.settings-save {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  flex-wrap: wrap;
}
.success-text {
  color: #36b687;
  font-size: 0.85rem;
  margin-top: 14px;
}
.settings-section .person-row {
  gap: 12px;
}
.settings-section .person-row > span:not(.avatar) {
  flex: 1;
  min-width: 0;
}
.settings-section .person-row small {
  display: block;
}
.modal {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  width: min(540px, calc(100% - 28px));
  padding: 35px;
  border-radius: 20px;
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal::backdrop {
  background: #0009;
  backdrop-filter: blur(5px);
}
.modal h2 {
  font-size: 1.65rem;
  line-height: 1.4;
  margin-bottom: 15px;
  padding-right: 14px;
}
.modal > .muted,
.modal .muted.small {
  font-size: 0.83rem;
  line-height: 1.8;
}
.modal .close-modal {
  position: absolute;
  top: 11px;
  right: 11px;
}
.modal-mark {
  font-size: 45px;
  color: var(--accent);
  margin-bottom: 15px;
}
.modal .eyebrow {
  margin-bottom: 12px;
}
form label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  margin-top: 18px;
}
form label small {
  font-size: 0.72rem;
  color: var(--muted);
  display: block;
  line-height: 1.65;
  margin-top: 5px;
  font-weight: 400;
}
:where(
  form
    input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(
      [type="file"]
    )
),
:where(
  form textarea:not(#post-content):not(#message-content):not(#comment-content)
),
:where(form select) {
  display: block;
  width: 100%;
  background: var(--elevated);
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 8px;
  margin-top: 8px;
  resize: vertical;
  font-size: 0.9rem;
}
form input:focus,
form textarea:focus,
form select:focus {
  outline-color: var(--accent);
}
form input[type="color"] {
  display: block;
  width: 100%;
  height: 42px;
  background: var(--elevated);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 8px;
  padding: 5px;
}
form input[type="file"] {
  display: block;
  max-width: 100%;
  margin-top: 8px;
  font-size: 0.7rem;
  white-space: normal;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 17px;
}
.check-label {
  display: flex !important;
  gap: 10px;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 400;
  margin: 20px 0;
  line-height: 1.6;
}
.check-label input {
  height: 16px;
  width: 16px;
  flex-shrink: 0;
}
.modal form > .wide {
  margin-top: 25px;
}
.modal form > .button:not(.wide) {
  margin-top: 20px;
}
.auth-switch {
  margin-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}
.auth-switch .text-button {
  font-weight: 700;
  margin-left: 5px;
}
.form-error {
  color: #ed6a79;
  font-size: 0.8rem;
  margin: 10px 0;
  line-height: 1.7;
}
.form-error:empty {
  display: none;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 25px;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: var(--accent);
  color: #fff;
  max-width: calc(100% - 30px);
  padding: 14px 22px;
  border-radius: 9px;
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}
.server-management h3 {
  font-size: 1rem;
  margin: 28px 0 15px;
}
.manage-member {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.manage-member > .avatar {
  height: 32px;
  width: 32px;
  font-size: 11px;
}
.manage-member > div:nth-child(2) {
  flex: 1;
  min-width: 100px;
}
.manage-member strong {
  font-size: 0.82rem;
}
.manage-member small {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 3px;
}
.manage-member-actions {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-wrap: wrap;
}
.manage-member-actions form {
  display: flex;
  align-items: center;
  gap: 4px;
}
.manage-member-actions select {
  padding: 5px;
  margin: 0;
  font-size: 0.7rem;
}
.manage-member-actions .text-button {
  font-size: 0.68rem;
}
.invite-list > div {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
}
.invite-list a {
  color: var(--accent);
  overflow-wrap: anywhere;
}
.invite-list small {
  color: var(--muted);
}
.danger-zone {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.emoji-picker {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 25px 0;
  flex-wrap: wrap;
}
.emoji-picker button {
  font-size: 26px;
  background: var(--elevated);
  border-radius: 10px;
  padding: 10px;
}
.about-page p {
  line-height: 1.9;
  color: var(--muted);
  margin: 20px 0;
}
.about-page h2 {
  margin-top: 25px;
  font-size: 2rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -70px;
  left: 15px;
  z-index: 100;
  background: var(--accent);
  color: white;
  padding: 12px;
}
.skip-link:focus {
  top: 12px;
}
:root[data-density="compact"] .post {
  padding-top: 9px;
  padding-bottom: 3px;
}
:root[data-density="compact"] .chat-message {
  padding-top: 5px;
  padding-bottom: 5px;
}
:root[data-density="compact"] .avatar:not(.large) {
  width: 32px;
  height: 32px;
}
:root[data-motion="reduced"] * {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@media (min-width: 1500px) {
  .app-shell {
    grid-template-columns: 68px 245px minmax(0, 640px) 340px;
    max-width: 1390px;
  }
  .sidebar {
    padding-right: 24px;
    padding-left: 22px;
  }
  .nav-item {
    font-size: 1.06rem;
    padding: 13px 11px;
  }
  .server-workspace {
    grid-template-columns: 245px minmax(0, 1fr) 240px;
  }
}
@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: 62px 190px minmax(0, 1fr);
    max-width: 980px;
  }
  .rightbar {
    display: none;
  }
  .sidebar {
    padding: 22px 12px;
  }
  .nav-item {
    font-size: 0.9rem;
    gap: 11px;
  }
  .server-mode .app-shell {
    grid-template-columns: 62px minmax(0, 1fr);
  }
  .server-workspace {
    grid-template-columns: 215px minmax(0, 1fr) 180px;
  }
  .messages-mode .app-shell {
    grid-template-columns: 62px 190px minmax(0, 1fr);
  }
  .dm-workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .chat-title .small {
    max-width: 220px;
  }
  .live-state {
    display: none;
  }
}
@media (max-width: 950px) {
  .server-workspace {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .member-sidebar {
    display: none;
  }
  .messages-mode .sidebar {
    width: 75px;
    padding: 20px 8px;
  }
  .messages-mode .sidebar-caption,
  .messages-mode .nav-item > span:last-child,
  .messages-mode .compose-shortcut,
  .messages-mode .account-person > span:last-child {
    display: none;
  }
  .messages-mode .brand {
    font-size: 20px;
    padding: 0 3px;
  }
  .messages-mode .nav-item {
    justify-content: center;
  }
  .messages-mode .account {
    flex-direction: column;
  }
  .messages-mode .app-shell {
    grid-template-columns: 62px 75px minmax(0, 1fr);
  }
  .messages-mode .badge {
    position: absolute;
    right: 0;
    top: 4px;
  }
  .dm-workspace {
    grid-template-columns: 230px minmax(0, 1fr);
  }
}
@media (max-width: 720px) {
  .app-shell {
    display: block;
    max-width: 600px;
  }
  .server-rail {
    display: none;
  }
  .sidebar {
    position: relative;
    height: 62px;
    width: 100%;
    padding: 0 17px;
    display: flex;
    flex-direction: row;
    align-items: center;
    border-bottom: 1px solid var(--line);
    overflow: visible;
    gap: 12px;
  }
  .brand {
    font-size: 29px;
    padding: 0;
  }
  .sidebar-caption,
  .sidebar-spacer,
  .compose-shortcut {
    display: none;
  }
  .sidebar nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: flex-start;
    padding: 6px 6px calc(7px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(10px);
  }
  .nav-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 7px 12px;
    min-width: 67px;
    flex-shrink: 0;
    border-radius: 10px;
    font-size: 9px;
  }
  .nav-item span:first-child svg {
    width: 23px;
    height: 23px;
  }
  .nav-item .badge {
    position: absolute;
    top: 0;
    right: 7px;
    min-width: 14px;
    padding: 3px;
    font-size: 8px;
  }
  .account {
    margin-left: auto;
  }
  .account-person > span:last-child {
    display: none;
  }
  .account .avatar {
    width: 29px;
    height: 29px;
    font-size: 10px;
  }
  .account .button {
    font-size: 0.73rem;
    padding: 9px 14px;
  }
  .account .icon-button {
    min-width: 27px;
    width: 27px;
    height: 27px;
    padding: 4px;
  }
  main {
    border: 0;
    padding-bottom: 90px;
  }
  .page-header {
    height: 57px;
    padding: 0 15px;
  }
  .page-header h1 {
    font-size: 1.17rem;
  }
  .page-header .button {
    font-size: 0.72rem;
    padding: 8px 13px;
  }
  .page-header .text-button {
    font-size: 0.69rem;
  }
  .guest-welcome {
    padding: 25px 20px;
  }
  .guest-welcome h2 {
    font-size: 1.8rem;
  }
  .post {
    padding: 13px 14px 7px;
  }
  .post-layout {
    gap: 10px;
  }
  .post-heading {
    font-size: 0.85rem;
    align-items: flex-start;
  }
  .post-heading .muted {
    font-size: 0.75rem;
  }
  .post-content {
    font-size: 0.95rem;
  }
  .post-action {
    gap: 5px;
    padding: 8px 4px;
  }
  .post-actions {
    gap: 5px;
  }
  .post-images img {
    height: 160px;
  }
  .composer {
    padding: 16px 14px 10px;
  }
  .composer textarea {
    font-size: 1.08rem;
  }
  .composer-bottom {
    margin-left: 0;
  }
  .composer-bottom > .muted.small {
    display: none;
  }
  .composer-bottom #post-count {
    display: block;
    font-size: 0.65rem;
  }
  .image-previews {
    padding-left: 0;
  }
  .composer-bottom .button {
    font-size: 0.8rem;
  }
  .profile-banner {
    height: 145px;
  }
  .avatar.large {
    width: 93px;
    height: 93px;
    font-size: 26px;
    border-width: 4px;
  }
  .profile-body > .avatar {
    margin-top: -48px;
  }
  .profile-action {
    gap: 5px;
    padding-top: 12px;
  }
  .profile-action .button {
    font-size: 0.72rem;
    padding: 8px 12px;
  }
  .profile-body {
    padding: 0 15px 20px;
  }
  .profile-stats {
    gap: 13px;
    font-size: 0.76rem;
  }
  .profile-bio {
    font-size: 0.9rem;
  }
  .profile-meta {
    font-size: 0.76rem;
  }
  .space-grid {
    grid-template-columns: 1fr;
  }
  .page-padding {
    padding: 20px 17px;
  }
  .space-intro h2 {
    font-size: 1.65rem;
  }
  .space-intro p {
    font-size: 0.85rem;
  }
  .settings-page {
    padding: 0 18px 30px;
  }
  .theme-picker {
    gap: 7px;
  }
  .theme-sample {
    height: 58px;
    padding: 13px 8px 8px 25px;
  }
  .theme-option strong {
    font-size: 0.65rem;
  }
  .settings-save .button {
    font-size: 0.74rem;
    padding: 10px 12px;
  }
  .modal {
    padding: 30px 23px;
  }
  .modal h2 {
    font-size: 1.45rem;
  }
  .form-grid {
    gap: 0 12px;
  }
  .toast {
    bottom: 88px;
  }
  .server-mode .app-shell {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    height: 100dvh;
  }
  .server-mode .server-rail {
    display: flex;
    padding: 12px 5px;
    gap: 9px;
    width: 52px;
  }
  .server-mode .rail-home,
  .server-mode .rail-server,
  .server-mode .rail-button {
    width: 39px;
    height: 39px;
    font-size: 12px;
  }
  .server-mode .rail-home {
    font-size: 26px;
  }
  .server-mode .rail-server.active:before {
    left: -6px;
  }
  .server-mode main {
    padding: 0;
    height: 100dvh;
  }
  .server-workspace {
    display: flex;
    position: relative;
    height: 100dvh;
  }
  .channel-sidebar {
    width: 155px;
    flex-shrink: 0;
  }
  .server-banner {
    height: 95px;
    padding: 15px 10px;
  }
  .server-banner p {
    font-size: 0.66rem;
  }
  .server-heading {
    padding: 0 4px;
    height: 54px;
  }
  .server-heading h1 {
    font-size: 0.75rem;
  }
  .server-heading > .icon-button:first-child {
    display: none;
  }
  .server-heading .icon-button {
    height: 25px;
    min-width: 25px;
  }
  .channel-list {
    padding: 10px 4px;
  }
  .channel-category {
    font-size: 0.58rem;
    padding-left: 7px;
  }
  .channel-row > a {
    padding: 8px 5px;
    font-size: 0.76rem;
    gap: 5px;
  }
  .channel-row > a > svg {
    height: 15px;
    width: 15px;
  }
  .channel-edit {
    opacity: 1;
    min-width: 20px !important;
    width: 20px;
    height: 20px !important;
    padding: 3px;
  }
  .channel-edit svg {
    width: 12px;
    height: 12px;
  }
  .server-chat-column {
    flex: 1;
  }
  .server-user {
    padding: 10px 6px;
    gap: 5px;
  }
  .server-user > .avatar {
    width: 25px;
    height: 25px;
    font-size: 9px;
  }
  .server-user strong {
    font-size: 0.63rem;
  }
  .server-user small {
    font-size: 0.58rem;
  }
  .server-user > .icon-button {
    width: 23px;
    min-width: 23px;
    padding: 3px;
  }
  .chat-header {
    height: 54px;
    padding: 0 10px;
    gap: 4px;
  }
  .chat-title {
    gap: 5px;
  }
  .chat-title > svg {
    height: 17px;
    width: 17px;
  }
  .chat-title h2 {
    font-size: 0.84rem;
  }
  .chat-title .small {
    display: none;
  }
  .chat-header-actions {
    gap: 0;
  }
  .chat-header-actions .icon-button {
    height: 25px;
    min-width: 25px;
    padding: 4px;
  }
  .chat-header-actions svg {
    height: 15px;
    width: 15px;
  }
  .chat-beginning {
    padding: 12px 12px 20px;
  }
  .chat-beginning h2 {
    font-size: 1.12rem;
  }
  .chat-beginning p {
    font-size: 0.76rem;
  }
  .channel-hash {
    height: 45px;
    width: 45px;
    margin-bottom: 12px;
  }
  .channel-hash svg {
    height: 27px;
    width: 27px;
  }
  .chat-message {
    padding: 11px 10px;
    gap: 8px;
  }
  .chat-message.pinned {
    padding-left: 8px;
  }
  .chat-message > .avatar,
  .chat-message > a > .avatar {
    height: 26px;
    width: 26px;
    font-size: 10px;
  }
  .message-heading {
    gap: 5px;
    font-size: 0.76rem;
  }
  .message-heading time {
    font-size: 0.57rem;
  }
  .message-text {
    font-size: 0.83rem;
  }
  .message-tools {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: none;
    border: 0;
    background: none;
    margin-right: -4px;
  }
  .message-tools .icon-button {
    height: 22px;
    min-width: 22px;
    width: 22px;
    padding: 4px;
    font-size: 16px;
  }
  .message-tools svg {
    height: 13px;
    width: 13px;
  }
  .chat-compose-area {
    padding: 0 9px 12px;
  }
  .chat-compose-area form {
    gap: 3px;
    padding: 7px;
  }
  .chat-compose-area textarea {
    font-size: 0.78rem;
  }
  .chat-compose-area .button {
    padding: 6px;
  }
  .chat-compose-area .icon-button {
    height: 25px;
    min-width: 25px;
    font-size: 17px;
    padding: 3px;
  }
  .chat-compose-area > .tiny {
    font-size: 0.56rem;
  }
  .chat-scroll {
    padding: 12px 0;
  }
  .voice-room {
    padding: 15px 10px;
  }
  .voice-room > span {
    display: none;
  }
  .voice-room h2 {
    font-size: 0.94rem;
  }
  .voice-room p {
    font-size: 0.65rem;
    line-height: 1.5;
    margin: 8px 0;
  }
  .voice-room .button {
    font-size: 0.67rem;
    padding: 8px 10px;
  }
  .voice-room .button svg {
    height: 15px;
    width: 15px;
  }
  #voice-status {
    left: 10px;
    bottom: 82px;
    max-width: calc(100% - 20px);
    font-size: 0.68rem;
    padding: 9px 12px;
    gap: 8px;
  }
  .server-mode #voice-status {
    bottom: 8px;
    left: 60px;
    max-width: calc(100% - 70px);
  }
  .server-mode:has(#voice-status:not([hidden])) .chat-compose-area {
    padding-bottom: 72px;
  }
  .messages-mode .app-shell {
    display: block;
  }
  .messages-mode .sidebar {
    width: 100%;
    padding: 0 17px;
    height: 62px;
  }
  .messages-mode .brand {
    font-size: 29px;
    padding: 0;
  }
  .messages-mode .sidebar .nav-item > span:last-child {
    display: block;
  }
  .messages-mode .sidebar .nav-item {
    justify-content: flex-start;
  }
  .messages-mode .account {
    flex-direction: row;
  }
  .messages-mode main {
    padding-bottom: 0;
  }
  .dm-workspace {
    display: block;
    height: calc(100dvh - 62px - 57px - 74px);
  }
  .dm-workspace > .dm-chat {
    display: none;
  }
  .dm-workspace.has-conversation > .conversation-list {
    display: none;
  }
  .dm-workspace.has-conversation > .dm-chat {
    display: flex;
    height: 100%;
  }
  .dm-back {
    display: block;
    padding: 10px 15px;
    font-size: 0.75rem;
    border-bottom: 1px solid var(--line);
  }
  .dm-chat .chat-message {
    padding: 12px 15px;
  }
  .dm-chat .chat-message > .avatar,
  .dm-chat .chat-message > a > .avatar {
    height: 34px;
    width: 34px;
    font-size: 12px;
  }
  .dm-chat .message-text {
    font-size: 0.95rem;
  }
  .dm-chat .message-heading {
    font-size: 0.88rem;
  }
  .dm-chat .chat-compose-area textarea {
    font-size: 0.9rem;
  }
  .conversation-list {
    height: 100%;
    border: 0;
  }
  .comment {
    padding: 16px 13px;
    gap: 9px;
  }
  .comment .avatar {
    height: 32px;
    width: 32px;
    font-size: 11px;
  }
  .comment .post-heading .muted {
    font-size: 0.7rem;
  }
  .reply-composer {
    padding: 18px 14px;
  }
  .reply-composer .composer-bottom {
    margin-left: 0;
  }
  .reply-composer .composer-bottom .small {
    font-size: 0.65rem;
  }
  .notification-row {
    padding: 18px 15px;
  }
  .community-hero {
    padding: 25px 20px;
  }
  .community-hero h2 {
    font-size: 1.6rem;
  }
  .community-hero p {
    font-size: 0.88rem;
  }
  .community-hero > div {
    gap: 10px;
  }
  .community-hero .text-button {
    font-size: 0.75rem;
  }
}
@media (max-width: 390px) {
  .server-mode .app-shell {
    grid-template-columns: 46px minmax(0, 1fr);
  }
  .server-mode .server-rail {
    width: 46px;
    padding-left: 3px;
    padding-right: 3px;
  }
  .server-mode .rail-server,
  .server-mode .rail-button,
  .server-mode .rail-home {
    height: 35px;
    width: 35px;
  }
  .channel-sidebar {
    width: 133px;
  }
  .channel-row > a {
    font-size: 0.69rem;
  }
  .server-heading h1 {
    font-size: 0.68rem;
  }
  .channel-edit {
    display: none;
  }
  .chat-message > a {
    display: none;
  }
  .chat-message {
    gap: 4px;
  }
  .message-heading time {
    font-size: 0.54rem;
  }
  .chat-message .message-text {
    font-size: 0.8rem;
  }
  .chat-title h2 {
    font-size: 0.75rem;
  }
  .server-user > .avatar {
    display: none;
  }
  .chat-compose-area > .tiny {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.search-box input:not([type="checkbox"]):not([type="radio"]) {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 0.9rem;
}
.composer .upload-button {
  margin: 0;
}
.message-tools .icon-button {
  flex-shrink: 0;
}

.member-person {
  position: relative;
}
.member-person.online:after {
  content: "";
  position: absolute;
  left: 23px;
  top: 29px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--member-bg);
  border-radius: 50%;
  background: #35bf88;
}

.post-owner-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.typing-indicator {
  height: 20px;
  color: var(--muted);
  font-size: 0.7rem;
  padding: 2px 3px;
}
.message-seen {
  font-size: 0.65rem;
  color: var(--accent);
  display: block;
  margin-top: 4px;
}
.mobile-menu-button,
.mobile-channels-button,
.channel-backdrop {
  display: none;
}
@media (max-width: 720px) {
  .mobile-menu-button {
    display: inline-flex;
    margin-left: -7px;
  }
  .sidebar > .brand {
    font-size: 26px;
  }
  .mobile-menu-open .sidebar nav {
    top: 62px;
    bottom: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 20px 10px;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--line);
    border-top: 0;
  }
  .mobile-menu-open .nav-item {
    font-size: 11px;
    padding: 16px 8px;
  }
  .mobile-channels-button {
    display: inline-flex !important;
  }
  .server-workspace > .channel-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 235px;
    z-index: 7;
    transform: translateX(-110%);
    transition: transform 0.18s;
  }
  .server-workspace.channels-open > .channel-sidebar {
    transform: translateX(0);
    box-shadow: var(--shadow);
  }
  .server-workspace.channels-open > .channel-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 6;
    background: #0008;
  }
  .server-chat-column {
    width: 100%;
  }
  .server-workspace .channel-row > a {
    font-size: 0.88rem;
    padding: 10px;
  }
  .server-workspace .channel-category {
    font-size: 0.7rem;
    padding-top: 12px;
  }
  .server-workspace .channel-edit {
    display: flex;
    height: 27px !important;
    min-width: 27px !important;
  }
  .server-workspace .server-heading h1 {
    font-size: 0.9rem;
  }
  .server-workspace .server-banner {
    height: 115px;
    padding: 18px 15px;
  }
  .server-workspace .server-banner p {
    font-size: 0.78rem;
    max-height: 42px;
  }
  .chat-title > svg {
    display: none;
  }
  .chat-header {
    padding: 0 8px;
  }
  .chat-title h2 {
    font-size: 0.95rem;
  }
  .chat-header-actions .icon-button {
    min-width: 30px;
    width: 30px;
    height: 30px;
    padding: 6px;
  }
  .chat-beginning h2 {
    font-size: 1.3rem;
  }
  .chat-beginning {
    padding: 15px 17px 22px;
  }
  .chat-message {
    padding: 12px 14px;
    gap: 9px;
  }
  .chat-message > a {
    display: block;
  }
  .message-heading {
    font-size: 0.85rem;
  }
  .message-text,
  .chat-message .message-text {
    font-size: 0.91rem;
  }
  .chat-message.pinned {
    padding-left: 12px;
  }
  .chat-compose-area textarea {
    font-size: 0.9rem;
  }
  .chat-compose-area .button {
    padding: 7px;
  }
  .chat-compose-area > .tiny {
    display: block;
    font-size: 0.6rem;
  }
  .server-mode #voice-status {
    bottom: 8px;
    left: 60px;
    max-width: calc(100% - 70px);
  }
}

.avatar {
  color: color-mix(in srgb, var(--avatar-color) 70%, var(--ink));
}
/* Shared interactions for root posts and replies. */
.post-parent {
  margin: 0 0 9px 52px;
  font-size: 0.75rem;
}
.reply-post {
  position: relative;
}
.thread-context .post {
  background: var(--hover);
}
.thread-context .post:after {
  content: "";
  position: absolute;
  left: 36px;
  top: 64px;
  bottom: 0;
  border-left: 2px solid var(--line);
}
.thread-context .post {
  position: relative;
}
.composer-count {
  margin-left: auto;
  white-space: nowrap;
}
.composer-bottom {
  gap: 5px;
}
.composer-bottom .upload-button {
  margin: 0;
}
.gif-tool {
  font-size: 0.6rem !important;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.post-images > a {
  position: relative;
}
.gif-badge {
  position: absolute;
  left: 9px;
  bottom: 9px;
  background: #000a;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  padding: 3px 6px;
}
.post-action.view-action svg {
  width: 17px;
}
.post-actions {
  gap: 4px;
}
.post-action {
  gap: 5px;
}
.image-previews > div > small {
  position: absolute;
  left: 5px;
  bottom: 5px;
  background: #0008;
  color: white;
  font-size: 9px;
  padding: 2px 4px;
  border-radius: 3px;
}
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 22px 0;
}
.analytics-grid > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 15px;
}
.analytics-grid strong {
  display: block;
  color: var(--accent);
  font-size: 1.8rem;
}
.analytics-grid span {
  display: block;
  font-size: 0.77rem;
  color: var(--muted);
  margin-top: 8px;
}
.picker-tabs {
  display: flex;
  gap: 7px;
  margin: 20px 0;
}
.picker-tabs button {
  padding: 10px 16px;
  border-radius: 20px;
  background: var(--elevated);
  font-size: 0.85rem;
}
.picker-tabs button.active {
  background: var(--accent);
  color: white;
}
.expression-search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  background: var(--elevated);
  font-size: 0.88rem;
}
.expression-results {
  margin-top: 16px;
  max-height: 47dvh;
  overflow: auto;
  min-height: 140px;
}
.expression-results h3 {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 17px 0 12px;
}
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}
.emoji-grid button {
  background: none;
  border-radius: 8px;
  min-height: 40px;
  font-size: 25px;
  padding: 4px;
}
.emoji-grid button:hover,
.custom-emoji-grid button:hover {
  background: var(--elevated);
}
.custom-emoji-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.custom-emoji-grid button {
  background: none;
  padding: 9px;
  border-radius: 8px;
  min-width: 0;
}
.custom-emoji-grid img {
  height: 42px;
  width: 42px;
  object-fit: contain;
}
.custom-emoji-grid small {
  font-size: 0.68rem;
  display: block;
  text-overflow: ellipsis;
  overflow: hidden;
  margin-top: 7px;
  white-space: nowrap;
}
.gif-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.gif-grid button {
  background: var(--elevated);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  padding: 0;
}
.gif-grid img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.gif-grid span {
  display: block;
  text-align: left;
  padding: 8px;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.gif-upload {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 18px;
}
.gif-upload summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.83rem;
}
.inline-custom-emoji {
  height: 1.7em;
  width: 1.7em;
  object-fit: contain;
  vertical-align: middle;
  margin: 0 2px;
}
.reaction-custom-emoji {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.emoji-admin-list {
  margin-top: 20px;
}
.emoji-admin-list > div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.emoji-admin-list img {
  height: 35px;
  width: 35px;
  object-fit: contain;
}
.emoji-admin-list form {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
}
.emoji-admin-list form input {
  margin: 0;
  padding: 7px;
}
.chat-gifs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.chat-gifs img {
  width: auto;
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 10px;
}
.chat-attachment-previews {
  width: 100%;
  padding-left: 0;
}
.chat-attachment-previews:empty {
  display: none;
}
.chat-compose-area form > .gif-tool {
  min-width: 30px;
}
.chat-compose-area .expression-search {
  font-size: 0.8rem;
}
@media (max-width: 720px) {
  .post-actions {
    gap: 0;
    margin: 0 -4px;
  }
  .post-action {
    font-size: 0.68rem;
    padding: 8px 4px;
    gap: 3px;
  }
  .post-action svg {
    width: 16px;
    height: 16px;
  }
  .post-parent {
    margin-left: 44px;
  }
  .composer-bottom .icon-button {
    width: 30px;
    min-width: 30px;
    padding: 5px;
  }
  .composer-bottom .button {
    padding: 8px 14px;
  }
  .composer-count {
    font-size: 0.6rem !important;
  }
  .emoji-grid {
    grid-template-columns: repeat(7, 1fr);
  }
  .emoji-grid button {
    font-size: 23px;
  }
  .picker-tabs button {
    padding: 9px 13px;
    font-size: 0.78rem;
  }
  .custom-emoji-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .chat-compose-area .gif-tool {
    min-width: 25px;
  }
  .chat-compose-area .chat-attachment-previews img {
    height: 70px;
    width: 75px;
  }
  .analytics-grid > div {
    padding: 15px 12px;
  }
  .analytics-grid strong {
    font-size: 1.5rem;
  }
}
