/* SoNet visual language. All adjustable tokens are mapped in customization.js. */
:root {
  --bg: #f2f3f5;
  --surface: #ffffff;
  --elevated: #e9ebef;
  --ink: #24272e;
  --muted: #676d78;
  --line: #d9dde3;
  --accent: #b76e50;
  --secondary: #4d8d87;
  --hover: #71827609;
  --chat-bg: var(--surface);
  --channel-bg: var(--surface);
  --member-bg: var(--surface);
  --rail-bg: var(--surface);
  --input: #f1f2f5;
  --shadow: 0 20px 65px #2f473015;
  --font-family: "Manrope", system-ui, sans-serif;
  --heading-family: "Manrope", system-ui, sans-serif;
  --panel-radius: 20px;
  --border-width: 1px;
  --content-width: 720px;
  --sidebar-width: 210px;
  --reading-height: 1.65;
  --heading-scale: 1;
  --letter-spacing: 0px;
  --panel-shadow: 0 5px 25px #30483904;
  color-scheme: light;
  font-family: var(--font-family);
  background: var(--bg);
  color: var(--ink);
}
:root[data-theme="light"] {
  --bg: #f2f3f5;
  --surface: #ffffff;
  --elevated: #e9ebef;
  --ink: #24272e;
  --muted: #676d78;
  --line: #d9dde3;
  --hover: #71827609;
  --input: #f1f2f5;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #17191e;
  --surface: #202329;
  --elevated: #292d35;
  --ink: #eceef2;
  --muted: #a3a9b5;
  --line: #373d48;
  --hover: #b1c9b508;
  --input: #292d35;
  --shadow: 0 20px 65px #0004;
  --panel-shadow: 0 5px 25px #0001;
  color-scheme: dark;
}
:root[data-theme="dim"] {
  --bg: #192920;
  --surface: #22362a;
  --elevated: #2b4234;
  --ink: #e9ede2;
  --muted: #abbba4;
  --line: #3c5040;
  --hover: #d3e4b708;
  --input: #304837;
  --shadow: 0 20px 65px #0004;
  --panel-shadow: 0 5px 25px #0001;
  color-scheme: dark;
}
body {
  font-family: var(--font-family);
  letter-spacing: var(--letter-spacing);
  background: var(--bg);
  min-height: 100dvh;
}
h1,
h2,
h3,
h4,
.brand {
  font-family: var(--heading-family);
}
h1 {
  font-size: calc(1.4rem * var(--heading-scale));
}
p,
.post-content,
.message-text {
  line-height: var(--reading-height);
}
:root[data-pattern="dots"] body {
  background-image: radial-gradient(var(--line) 0.7px, transparent 0.7px);
  background-size: 23px 23px;
}
:root[data-pattern="lines"] body {
  background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 60px 60px;
}
:root[data-pattern="glow"] body {
  background-image:
    radial-gradient(
      ellipse at 12% 5%,
      color-mix(in srgb, var(--secondary) 13%, transparent),
      transparent 42%
    ),
    radial-gradient(
      ellipse at 90% 60%,
      color-mix(in srgb, var(--accent) 9%, transparent),
      transparent 42%
    );
}
.app-shell {
  max-width: 1530px;
  padding: 0 20px 20px;
  display: grid;
  grid-template-columns:
    var(--sidebar-width) minmax(0, var(--content-width))
    minmax(230px, 280px);
  grid-template-rows: 76px 1fr;
  gap: 18px;
  align-items: start;
  justify-content: center;
  margin: auto;
}
.server-rail {
  grid-column: 1/-1;
  grid-row: 1;
  position: sticky;
  top: 0;
  z-index: 15;
  height: 76px;
  max-width: 100%;
  padding: 10px 4px;
  display: flex;
  flex-direction: row;
  gap: 12px;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  overflow: visible;
}
.rail-home {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  border-radius: 0;
  background: none !important;
  color: var(--ink) !important;
  width: 168px;
  height: 48px;
  padding: 0;
  font-size: 1.45rem;
  letter-spacing: -1px;
  font-weight: 800;
  flex-shrink: 0;
}
.rail-home > img {
  width: 39px;
  height: 39px;
  border-radius: 12px;
}
.rail-home > span {
  line-height: 1.25;
}
.rail-home small {
  display: block;
  font-family: var(--font-family);
  font-size: 8px;
  letter-spacing: 1.3px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 4px;
}
.workspace-label {
  font-size: 8px;
  letter-spacing: 1.3px;
  color: var(--muted);
  white-space: nowrap;
  margin-right: 5px;
}
.rail-divider {
  display: none;
}
#rail-servers {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}
.rail-server,
.rail-button {
  border: var(--border-width) solid var(--line);
  border-radius: 12px;
  width: 40px;
  height: 40px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  box-shadow: var(--panel-shadow);
}
.rail-server {
  background: color-mix(in srgb, var(--space-color) 10%, var(--surface));
  color: var(--ink);
  border-bottom: 3px solid var(--space-color);
}
.rail-server.active:before {
  display: none;
}
.rail-server.active,
.rail-server:hover {
  border-radius: 12px;
  color: var(--ink);
  outline: 1px solid var(--space-color);
  background: color-mix(in srgb, var(--space-color) 15%, var(--surface));
}
.rail-button:hover {
  border-radius: 12px;
  background: var(--elevated);
  color: var(--accent);
}
.rail-bottom {
  margin: 0 0 0 auto;
  padding: 0;
}
.sidebar {
  grid-row: 2;
  grid-column: 1;
  position: sticky;
  top: 94px;
  height: calc(100dvh - 114px);
  border: var(--border-width) solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--surface);
  padding: 22px 12px 15px;
  box-shadow: var(--panel-shadow);
}
.sidebar > .brand {
  display: none;
}
.sidebar-caption {
  font-size: 8px;
  letter-spacing: 1.2px;
  margin: 0 11px 19px;
}
.sidebar nav {
  gap: 5px;
}
.nav-item {
  border-radius: 10px;
  font-size: 0.87rem;
  padding: 12px 11px;
  gap: 11px;
  font-weight: 500;
  white-space: normal;
  min-width: 0;
}
.nav-item > span:last-of-type {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-item span:first-child svg {
  width: 19px;
  height: 19px;
}
.nav-item.active {
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--accent);
  font-weight: 700;
}
.nav-item:hover {
  background: var(--elevated);
}
.button {
  border-radius: 10px;
  padding: 11px 17px;
  font-size: 0.8rem;
  letter-spacing: 0.1px;
}
.button.primary {
  box-shadow: 0 4px 15px color-mix(in srgb, var(--accent) 12%, transparent);
}
.button.contrast {
  background: var(--elevated);
  color: var(--ink);
  border: 1px solid var(--line);
}
.compose-shortcut {
  margin: 23px 6px 0;
  padding: 13px 7px;
  font-size: 0.77rem;
  white-space: normal;
}
.compose-shortcut svg {
  height: 16px;
  width: 16px;
}
.account {
  padding: 13px 4px 0;
  border-top: 1px solid var(--line);
}
.account-person strong {
  font-size: 0.72rem;
}
.account-person small {
  font-size: 0.64rem;
}
.account .avatar {
  width: 31px;
  height: 31px;
  border-radius: 11px;
}
.avatar {
  border-radius: 14px;
  font-family: var(--heading-family);
  font-size: 12px;
}
.avatar.large {
  border-radius: 28px;
}
.account .icon-button {
  min-width: 26px;
  width: 26px;
  height: 26px;
  padding: 4px;
}
.badge {
  background: var(--secondary);
  font-size: 9px;
}
.sidebar-spacer {
  min-height: 18px;
}
main {
  grid-row: 2;
  grid-column: 2;
  border: 0;
  min-width: 0;
  background: none;
}
.page-header {
  top: 94px;
  height: 65px;
  border: var(--border-width) solid var(--line);
  border-radius: var(--panel-radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  padding: 0 21px;
  box-shadow: var(--panel-shadow);
  margin-bottom: 14px;
}
.page-header h1 {
  font-size: calc(1.23rem * var(--heading-scale));
  letter-spacing: -0.4px;
}
.page-header .button {
  padding: 9px 14px;
  font-size: 0.73rem;
}
.tabs {
  border: var(--border-width) solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--surface);
  min-height: 47px;
  margin: 0 0 14px;
  overflow: hidden;
}
.tabs > a,
.tabs > span {
  padding: 14px;
  font-size: 0.8rem;
}
.tabs .active {
  color: var(--accent);
}
.tabs .active:after {
  height: 2px;
  bottom: 0;
  width: 34px;
}
.composer,
.reply-composer {
  background: var(--surface);
  border: var(--border-width) solid var(--line);
  border-radius: var(--panel-radius);
  padding: 21px;
  margin: 0 0 14px;
  box-shadow: var(--panel-shadow);
}
.composer textarea,
.reply-composer textarea {
  font-size: 1.05rem;
  min-height: 68px;
  line-height: var(--reading-height);
}
.composer-bottom {
  margin-left: 0;
  padding-top: 13px;
}
.composer-count {
  font-size: 0.68rem !important;
}
.composer-bottom .button {
  padding: 9px 16px;
}
.guest-welcome {
  border: var(--border-width) solid var(--line);
  border-radius: var(--panel-radius);
  padding: 31px;
  margin-bottom: 14px;
  background:
    radial-gradient(
      circle at 95% 8%,
      color-mix(in srgb, var(--secondary) 16%, transparent),
      transparent 55%
    ),
    var(--surface);
  position: relative;
  overflow: hidden;
}
.guest-welcome:after {
  content: "✳";
  position: absolute;
  font-family: Georgia, serif;
  font-size: 150px;
  right: 20px;
  top: 35px;
  color: color-mix(in srgb, var(--secondary) 24%, transparent);
  pointer-events: none;
}
.guest-welcome h2 {
  position: relative;
  z-index: 1;
  font-size: calc(2.1rem * var(--heading-scale));
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -1.2px;
  max-width: 480px;
}
.guest-welcome p {
  max-width: 420px;
  position: relative;
  z-index: 1;
  font-size: 0.84rem;
}
.guest-welcome .button {
  position: relative;
  z-index: 1;
}
.guest-welcome .eyebrow {
  font-size: 0.6rem;
  letter-spacing: 1.5px;
}
.post {
  background: var(--surface);
  border: var(--border-width) solid var(--line);
  border-radius: var(--panel-radius);
  padding: 21px 22px 9px;
  margin-bottom: 13px;
  box-shadow: var(--panel-shadow);
}
.post:hover {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.post-layout {
  gap: 13px;
}
.post-heading {
  font-size: 0.81rem;
  gap: 9px;
}
.post-heading .muted {
  font-size: 0.73rem;
}
.post-content {
  font-size: 0.94rem;
  padding-top: 7px;
  line-height: var(--reading-height);
}
.post-actions {
  border-top: 1px solid var(--line);
  padding-top: 5px;
  margin-top: 4px;
  max-width: none;
}
.post-action {
  font-size: 0.7rem;
  color: var(--muted);
  border-radius: 8px;
  padding: 8px;
}
.post-action svg {
  height: 17px;
  width: 17px;
}
.post-action.saved {
  color: var(--secondary);
}
.post-community {
  font-size: 0.67rem;
  color: var(--secondary);
  margin-left: 53px;
}
.post-parent {
  font-size: 0.69rem;
  margin-left: 53px;
}
.post-owner-actions .icon-button {
  border-radius: 7px;
}
.post-images {
  border-radius: calc(var(--panel-radius) * 0.65);
  margin: 10px 0 12px;
}
.profile-card {
  background: var(--surface);
  border: var(--border-width) solid var(--line);
  border-radius: var(--panel-radius);
  overflow: hidden;
  margin-bottom: 14px;
}
.profile-banner {
  height: 170px;
  background: radial-gradient(
    ellipse at 80% 30%,
    color-mix(in srgb, var(--profile-color) 40%, var(--surface)),
    var(--elevated)
  );
}
.profile-banner > span {
  font-size: 64px;
  font-family: var(--heading-family);
  opacity: 0.13;
}
.profile-body {
  padding: 0 23px 23px;
}
.profile-body h2 {
  font-size: calc(1.55rem * var(--heading-scale));
}
.profile-body > .avatar {
  width: 110px;
  height: 110px;
  margin-top: -56px;
  border-radius: 25px;
  border-width: 5px;
}
.profile-card .tabs {
  margin: 0;
  border: 0;
  border-top: var(--border-width) solid var(--line);
  border-radius: 0;
}
.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}
.profile-badge {
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 7px;
  color: var(--secondary);
  background: color-mix(in srgb, var(--secondary) 9%, var(--surface));
}
.profile-badge.badge-outline {
  border: 1px solid var(--secondary);
  background: none;
}
.profile-badge.badge-minimal {
  background: none;
  padding: 3px 0;
}
.profile-connections {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
  font-size: 0.7rem;
  color: var(--muted);
}
.profile-connections a,
.profile-connections > span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.thread-context .post {
  background: var(--surface);
  margin-left: 12px;
  margin-right: 12px;
  opacity: 0.88;
}
.thread-context .post:after {
  left: -10px;
  border-color: var(--secondary);
  top: 25px;
  bottom: -20px;
}
.reply-post {
  border-left: 3px solid color-mix(in srgb, var(--secondary) 60%, var(--line));
}
.reply-composer {
  margin: 14px 0;
}
.reply-composer .composer-bottom {
  margin-left: 0;
}
.notification-row {
  background: var(--surface);
  border: var(--border-width) solid var(--line);
  border-radius: var(--panel-radius);
  margin-bottom: 10px;
}
.notification-row.unread {
  background: color-mix(in srgb, var(--secondary) 5%, var(--surface));
  border-left: 3px solid var(--secondary);
}
.empty-state {
  background: var(--surface);
  border: var(--border-width) dashed var(--line);
  border-radius: var(--panel-radius);
  padding: 40px 25px;
}
.empty-state h2 {
  font-size: calc(1.45rem * var(--heading-scale));
  font-weight: 650;
}
.empty-state p {
  font-size: 0.84rem;
}
.section-title {
  font-size: calc(1.2rem * var(--heading-scale));
}
.page-padding {
  background: var(--surface);
  border: var(--border-width) solid var(--line);
  border-radius: var(--panel-radius);
  margin-bottom: 14px;
}
.rightbar {
  grid-row: 2;
  grid-column: 3;
  top: 94px;
  height: calc(100dvh - 114px);
  padding: 0;
  overflow: visible;
}
.search-box {
  border: var(--border-width) solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  padding: 14px;
}
.discovery-card {
  border: var(--border-width) solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--surface);
  padding: 21px 17px;
  margin-top: 17px;
  box-shadow: var(--panel-shadow);
}
.discovery-card h2 {
  font-size: calc(1rem * var(--heading-scale));
  font-weight: 700;
}
.discovery-card .person-row {
  padding: 15px 0 4px;
  gap: 6px;
}
.discovery-card .avatar {
  width: 32px;
  height: 32px;
  font-size: 10px;
  border-radius: 11px;
}
.discovery-card .person-link {
  gap: 9px;
}
.discovery-card .person-link strong {
  font-size: 0.72rem;
}
.discovery-card .person-link small {
  font-size: 0.64rem;
}
.follow-button {
  border-radius: 7px;
  font-size: 0.65rem;
  padding: 6px 9px;
}
.discovery-servers {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--secondary) 8%, var(--surface)),
    var(--surface)
  );
}
.discovery-servers h2 {
  font-size: calc(1.55rem * var(--heading-scale));
  line-height: 1.35;
  margin: 19px 0 13px;
}
.discovery-servers .eyebrow {
  font-size: 0.56rem;
  line-height: 1.8;
  letter-spacing: 1.2px;
}
.discovery-servers p {
  font-size: 0.76rem;
}
.discovery-servers .button {
  font-size: 0.72rem;
  padding: 10px 12px;
}
.right-footer {
  font-size: 0.65rem;
  line-height: 1.8;
  padding: 17px 5px;
}
.space-card {
  background: var(--surface);
  border: var(--border-width) solid var(--line);
  border-radius: var(--panel-radius);
}
.space-cover {
  background: radial-gradient(
    circle at 80% 20%,
    color-mix(in srgb, var(--space-color) 30%, var(--surface)),
    var(--elevated)
  );
  color: var(--space-color);
  height: 110px;
}
.space-cover > svg {
  opacity: 0.4;
}
.space-card-body {
  padding: 20px;
}
.space-card h2 {
  font-size: calc(1.12rem * var(--heading-scale));
}
.community-hero {
  border: var(--border-width) solid var(--line);
  border-radius: var(--panel-radius);
  background: radial-gradient(
    ellipse at top right,
    color-mix(in srgb, var(--space-color) 12%, var(--surface)),
    var(--surface)
  );
  padding: 30px;
  margin-bottom: 14px;
}
.community-symbol {
  border-radius: 14px;
}
.community-hero h2 {
  font-size: calc(1.7rem * var(--heading-scale));
}
.modal {
  border-radius: var(--panel-radius);
  border: var(--border-width) solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.modal h2 {
  font-size: calc(1.5rem * var(--heading-scale));
}
.modal-mark {
  color: var(--secondary);
}
.toast {
  background: var(--ink);
  color: var(--bg);
  border-radius: 12px;
  font-size: 0.78rem;
  padding: 14px 20px;
}
.form-error {
  color: #c06666;
}
.success-text {
  color: var(--secondary);
}
/* Spaces use the same SoNet panels and typography as the rest of the product. */
.server-mode .app-shell {
  max-width: none;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 76px 1fr;
  gap: 18px;
  padding: 0 20px 20px;
}
.server-mode .server-rail {
  grid-column: 1;
  grid-row: 1;
}
.server-mode main {
  grid-column: 1;
  grid-row: 2;
  border: 0;
}
.server-workspace {
  background: none;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr) 218px;
  gap: 15px;
  height: calc(100dvh - 114px);
  overflow: hidden;
}
.channel-sidebar,
.server-chat-column,
.member-sidebar {
  border: var(--border-width) solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--panel-shadow);
}
.server-heading {
  height: 63px;
  border-bottom: var(--border-width) solid var(--line);
  box-shadow: none;
  padding: 0 13px;
}
.server-heading h1 {
  font-size: calc(0.85rem * var(--heading-scale));
  font-weight: 750;
}
.server-banner {
  height: auto;
  min-height: 111px;
  border-bottom: var(--border-width) solid var(--line);
  background: radial-gradient(
    circle at 90% 20%,
    color-mix(in srgb, var(--space-color) 15%, var(--surface)),
    var(--surface)
  );
  padding: 18px;
  color: var(--ink);
}
.server-banner > span {
  color: var(--space-color);
  font-size: 23px;
  font-weight: 700;
}
.server-banner p {
  color: var(--muted);
  font-size: 0.73rem;
  max-height: 42px;
}
.channel-list {
  padding: 14px 10px;
}
.channel-category {
  font-size: 0.61rem;
  letter-spacing: 1px;
  padding: 13px 7px 5px;
  font-weight: 650;
}
.channel-row {
  border-radius: 9px;
  margin: 4px 0;
}
.channel-row > a {
  font-size: 0.82rem;
  padding: 10px 8px;
  gap: 9px;
}
.channel-row > a > svg {
  height: 17px;
  width: 17px;
}
.channel-row.active {
  background: color-mix(in srgb, var(--secondary) 10%, var(--surface));
  color: var(--secondary);
  border-left: 3px solid var(--secondary);
}
:root[data-theme="light"] .channel-row.active {
  background: color-mix(in srgb, var(--secondary) 10%, var(--surface));
}
.channel-row .channel-edit {
  color: var(--muted);
}
.new-channel {
  color: var(--secondary);
  font-size: 0.73rem;
}
.server-user {
  border-top: 1px solid var(--line);
  background: var(--elevated);
  padding: 12px;
}
.server-user > .avatar {
  border-radius: 10px;
}
.member-sidebar {
  overflow-y: auto;
  padding: 24px 16px;
}
.member-sidebar h3 {
  font-size: 0.61rem;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
  margin-bottom: 15px;
}
.member-sidebar h4 {
  font-size: 0.58rem;
  letter-spacing: 0.7px;
  margin-top: 24px;
  font-weight: 600;
}
.member-person {
  gap: 9px;
  padding: 8px 0;
}
.member-person .avatar {
  border-radius: 11px;
  width: 31px;
  height: 31px;
}
.member-person > span {
  font-size: 0.76rem;
}
.member-person small {
  font-size: 0.62rem;
}
.member-person.online:after {
  border-color: var(--surface);
  background: var(--secondary);
  top: 30px;
}
.chat-pane {
  background: var(--surface);
}
.chat-header {
  height: 63px;
  border-bottom: var(--border-width) solid var(--line);
  box-shadow: none;
  padding: 0 22px;
}
.chat-title h2 {
  font-family: var(--heading-family);
  font-size: calc(0.97rem * var(--heading-scale));
  font-weight: 700;
}
.chat-title > svg {
  color: var(--secondary);
  height: 22px;
  width: 22px;
}
.chat-title .small {
  font-size: 0.66rem;
  margin-top: 2px;
}
.chat-header-actions {
  gap: 6px;
}
.live-state {
  font-size: 0.58rem;
}
.live-state.connected {
  color: var(--secondary);
}
.chat-scroll {
  padding: 16px 0;
  scrollbar-color: var(--line) transparent;
}
.chat-beginning {
  padding: 21px 25px 23px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 18px;
  background: radial-gradient(
    ellipse at top right,
    color-mix(in srgb, var(--secondary) 7%, transparent),
    transparent 65%
  );
}
.channel-hash {
  border-radius: 15px;
  width: 48px;
  height: 48px;
  background: var(--elevated);
  color: var(--secondary);
  margin-bottom: 15px;
}
.channel-hash svg {
  height: 27px;
  width: 27px;
}
.chat-beginning h2 {
  font-size: calc(1.4rem * var(--heading-scale));
  font-weight: 650;
  letter-spacing: -0.4px;
}
.chat-beginning p {
  font-size: 0.8rem;
}
.chat-message {
  padding: 9px 22px;
  gap: 12px;
  background: none;
}
.chat-message:hover {
  background: none;
}
.chat-message .avatar {
  height: 33px;
  width: 33px;
  font-size: 10px;
  border-radius: 11px;
}
.chat-message-body {
  background: color-mix(in srgb, var(--elevated) 38%, var(--surface));
  border: var(--border-width) solid var(--line);
  padding: 11px 14px;
  border-radius: 0 14px 14px 14px;
}
.message-heading {
  font-size: 0.78rem;
}
.message-heading time {
  font-size: 0.6rem;
}
.message-text {
  font-size: 0.89rem;
  line-height: var(--reading-height);
}
.chat-message.pinned {
  background: none;
  border: 0;
  padding-left: 22px;
}
.chat-message.pinned .chat-message-body {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
}
.message-tools {
  border-radius: 8px;
  background: var(--surface);
  top: -16px;
  right: 27px;
  box-shadow: var(--panel-shadow);
}
.message-tools .icon-button {
  border-radius: 6px;
}
.pin-label {
  color: var(--accent);
}
.reaction {
  border-radius: 7px;
  background: var(--surface);
}
.reaction.mine {
  background: color-mix(in srgb, var(--secondary) 10%, var(--surface));
  border-color: var(--secondary);
}
.chat-compose-area {
  padding: 0 22px 16px;
}
.chat-compose-area form {
  background: var(--surface);
  border: var(--border-width) solid var(--line);
  border-radius: 13px;
  padding: 12px 13px;
  box-shadow: 0 4px 15px #00000003;
}
.chat-compose-area textarea {
  font-size: 0.86rem;
}
.chat-compose-area .button {
  border-radius: 9px;
  background: var(--secondary);
}
.chat-compose-area .tiny {
  font-size: 0.6rem;
}
.chat-compose-area .icon-button {
  color: var(--secondary);
}
.typing-indicator {
  font-size: 0.65rem;
  color: var(--secondary);
  height: 22px;
}
.chat-compose-area .image-previews {
  border-radius: 10px;
}
.chat-gifs img {
  border-radius: 12px;
}
.voice-room {
  background: radial-gradient(
    ellipse at center,
    color-mix(in srgb, var(--secondary) 11%, var(--surface)),
    var(--surface)
  );
  border-bottom: 1px solid var(--line);
  padding: 23px;
}
.voice-room .button {
  background: var(--secondary);
}
.voice-room > span {
  border-radius: 14px;
  color: var(--secondary);
  background: var(--elevated);
}
.voice-room h2 {
  font-size: calc(1.25rem * var(--heading-scale));
}
.voice-room p {
  font-size: 0.76rem;
}
.voice-connected {
  color: var(--secondary);
}
#voice-status {
  background: var(--surface);
  border: var(--border-width) solid var(--line);
  border-radius: 14px;
  left: 30px;
  bottom: 22px;
  font-size: 0.73rem;
  box-shadow: var(--shadow);
}
.messages-mode .app-shell {
  max-width: 1480px;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  grid-template-rows: 76px 1fr;
  gap: 18px;
}
.messages-mode .server-rail {
  grid-column: 1/-1;
}
.messages-mode main {
  grid-column: 2;
  grid-row: 2;
}
.messages-mode .sidebar {
  width: auto;
}
.dm-workspace {
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 14px;
  height: calc(100dvh - 193px);
}
.conversation-list {
  background: var(--surface);
  border: var(--border-width) solid var(--line);
  border-radius: var(--panel-radius);
  overflow: auto;
}
.conversation-row {
  padding: 18px 14px;
  gap: 10px;
}
.conversation-row.active {
  background: color-mix(in srgb, var(--secondary) 7%, var(--surface));
  border-left: 3px solid var(--secondary);
}
.conversation-row strong {
  font-size: 0.76rem;
}
.conversation-row small {
  font-size: 0.67rem;
}
.conversation-row .avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}
.dm-chat {
  border: var(--border-width) solid var(--line);
  border-radius: var(--panel-radius);
  overflow: hidden;
  background: var(--surface);
}
.dm-chat .chat-pane {
  background: var(--surface);
}
.dm-chat .chat-message:hover {
  background: none;
}
.dm-chat .chat-beginning h2 {
  font-size: calc(1.3rem * var(--heading-scale));
}
/* Studio: personalization and account connections are first-class parts of SoNet. */
.settings-page {
  padding: 0 0 35px;
}
.settings-intro {
  background: var(--surface);
  border: var(--border-width) solid var(--line);
  border-radius: var(--panel-radius);
  padding: 28px;
}
.settings-intro h2 {
  font-size: calc(1.8rem * var(--heading-scale));
  line-height: 1.4;
  margin: 13px 0;
}
.settings-intro p {
  font-size: 0.81rem;
  line-height: var(--reading-height);
  max-width: 500px;
}
.settings-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  padding: 12px 0;
}
.settings-tabs button {
  font-size: 0.75rem;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--surface);
  border: var(--border-width) solid var(--line);
  color: var(--muted);
}
.settings-tabs button.active {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
  text-decoration: none;
}
.settings-section {
  background: var(--surface);
  padding: 25px;
  border: var(--border-width) solid var(--line);
  border-radius: var(--panel-radius);
  margin: 0 0 14px;
}
.settings-section h2 {
  font-size: calc(1.23rem * var(--heading-scale));
  font-weight: 700;
}
.settings-section h3 {
  font-size: calc(0.94rem * var(--heading-scale));
  margin-top: 24px;
}
.settings-section > .muted {
  font-size: 0.78rem;
  line-height: var(--reading-height);
}
.settings-section-heading {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.settings-section-heading > div {
  display: flex;
  gap: 15px;
  align-items: center;
}
.settings-section-heading .text-button {
  font-size: 0.7rem;
}
.theme-import {
  margin: 0 !important;
  font-weight: 400;
  cursor: pointer;
}
.design-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}
.preset {
  background: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  font-size: 0.72rem;
  display: block;
  color: var(--ink);
}
.preset i {
  display: block;
  height: 42px;
  border-radius: 7px;
  margin-bottom: 9px;
  background: linear-gradient(
    120deg,
    #faf7ee 55%,
    #b76e50 55% 70%,
    #4d8d87 70%
  );
}
.preset-nocturne i {
  background: linear-gradient(
    120deg,
    #192a2c 55%,
    #d5a17b 55% 70%,
    #92b7b0 70%
  );
}
.preset-forest i {
  background: linear-gradient(
    120deg,
    #223c2b 55%,
    #88b58f 55% 70%,
    #d4ab79 70%
  );
}
.preset-rose i {
  background: linear-gradient(
    120deg,
    #f7ede9 55%,
    #a66b82 55% 70%,
    #778ba6 70%
  );
}
.range-control {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 11px;
}
.range-control input {
  min-width: 0;
  flex: 1;
  width: 0;
  accent-color: var(--accent);
}
.range-control output {
  font-size: 0.74rem;
  min-width: 34px;
  text-align: right;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
}
.settings-preview {
  border-radius: calc(var(--panel-radius) * 0.6);
  background: var(--bg);
  padding: 20px;
}
.settings-preview .avatar {
  border-radius: 12px;
}
.settings-save {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  align-items: center;
  position: sticky;
  bottom: 16px;
  z-index: 2;
  box-shadow: var(--panel-shadow);
}
.settings-save .small {
  font-size: 0.7rem;
}
.success-text {
  padding: 0 14px;
}
.badge-catalog {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 25px;
}
.badge-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0;
  font-size: 0.8rem;
  min-width: 0;
  cursor: pointer;
}
.badge-choice > input {
  margin-top: 3px;
}
.badge-icon {
  font-size: 22px;
  line-height: 1.3;
  color: var(--secondary);
}
.badge-choice strong {
  font-size: 0.76rem;
}
.badge-choice small {
  font-size: 0.66rem;
  line-height: 1.65;
  margin-top: 5px;
}
.badge-choice em {
  font: normal 0.6rem var(--font-family);
  color: var(--secondary);
  display: block;
  margin-top: 8px;
}
.badge-choice.locked {
  opacity: 0.5;
  cursor: default;
}
.badge-choice:has(input:checked) {
  border-color: var(--secondary);
  background: color-mix(in srgb, var(--secondary) 5%, var(--surface));
}
.connections-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}
.connection-card {
  border: var(--border-width) solid var(--line);
  border-radius: 13px;
  padding: 18px;
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--bg);
}
.provider-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  width: 42px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--secondary);
  font: 700 22px var(--heading-family);
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.connection-info {
  min-width: 130px;
  flex: 1;
}
.connection-info h3 {
  font-size: 0.94rem;
  margin: 0;
}
.connection-info p {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.connection-status {
  font-size: 0.63rem;
  color: var(--muted);
  display: block;
  margin-top: 8px;
}
.connection-status.is-linked {
  color: var(--secondary);
}
.connection-controls {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--line);
  padding-top: 5px;
}
.connection-controls .check-label {
  font-size: 0.72rem;
  margin: 12px 0;
}
.connection-controls .text-button {
  font-size: 0.71rem;
}
.connection-card > .button {
  font-size: 0.7rem;
  padding: 9px 12px;
}
.connection-result {
  padding: 13px;
  border: 1px solid currentColor;
  border-radius: 10px;
  font-size: 0.8rem;
}
.password-section form > .button {
  margin-top: 20px;
}
:root[data-shadows="false"] {
  --panel-shadow: none;
  --shadow: none;
}
:root[data-effects="none"] * {
  transition: none !important;
  animation: none !important;
}
:root[data-effects="soft"] .post,
:root[data-effects="expressive"] .post {
  transition:
    border-color 0.18s,
    box-shadow 0.18s,
    transform 0.18s;
}
:root[data-effects="expressive"] .post:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px color-mix(in srgb, var(--secondary) 8%, transparent);
}
:root[data-avatars="false"] .avatar {
  display: none !important;
}
:root[data-media="false"] .post-images,
:root[data-media="false"] .chat-gifs {
  display: none !important;
}
:root[data-motion="reduced"] * {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: minmax(160px, 190px) minmax(0, var(--content-width));
    max-width: 1000px;
  }
  .rightbar {
    display: none;
  }
  .messages-mode .app-shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .server-workspace {
    grid-template-columns: 210px minmax(0, 1fr) 180px;
    gap: 12px;
  }
  .member-sidebar {
    padding: 22px 12px;
  }
  .dm-workspace {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .workspace-label {
    display: none;
  }
}
@media (max-width: 950px) {
  .server-workspace {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .member-sidebar {
    display: none;
  }
  .messages-mode .sidebar {
    width: auto;
    padding: 22px 10px;
  }
  .messages-mode .sidebar-caption,
  .messages-mode .sidebar .nav-item > span:last-of-type {
    display: block;
  }
  .messages-mode .nav-item {
    justify-content: flex-start;
  }
  .messages-mode .account {
    flex-direction: row;
  }
  .messages-mode .compose-shortcut {
    display: flex;
  }
  .messages-mode .badge {
    position: static;
  }
  .messages-mode .app-shell {
    grid-template-columns: 175px minmax(0, 1fr);
  }
  .dm-workspace {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .chat-title .small {
    max-width: 230px;
  }
  .nav-item {
    font-size: 0.79rem;
  }
}
@media (max-width: 720px) {
  .app-shell {
    display: flex;
    flex-direction: column;
    max-width: 600px;
    padding: 0 11px 88px;
    gap: 0;
  }
  .server-rail {
    display: flex;
    width: 100%;
    height: 64px;
    padding: 8px 0;
    position: sticky;
    top: 0;
    flex-direction: row;
    gap: 9px;
    align-self: stretch;
  }
  .rail-home {
    width: 113px;
    height: 40px;
    gap: 7px;
    font-size: 1.16rem;
  }
  .rail-home img {
    height: 31px;
    width: 31px;
    border-radius: 10px;
  }
  .rail-home small {
    font-size: 6px;
    letter-spacing: 0.4px;
    margin-top: 3px;
  }
  .rail-button,
  .rail-server {
    height: 32px;
    width: 32px;
    min-width: 32px;
    border-radius: 9px;
    font-size: 9px;
  }
  .rail-home:hover {
    border-radius: 0;
  }
  .rail-server.active,
  .rail-server:hover,
  .rail-button:hover {
    border-radius: 9px;
  }
  .rail-bottom {
    margin-left: auto;
  }
  .rail-bottom .rail-button {
    height: 30px;
    width: 30px;
    min-width: 30px;
  }
  .rail-button svg {
    width: 16px;
    height: 16px;
  }
  .sidebar,
  .messages-mode .sidebar {
    width: 100%;
    height: 47px;
    position: sticky;
    top: 64px;
    z-index: 8;
    border: 0;
    border-radius: 0;
    padding: 0 2px;
    background: var(--bg);
    flex-direction: row;
    overflow: visible;
    display: flex;
    align-items: center;
  }
  .sidebar > .brand,
  .messages-mode .sidebar > .brand {
    display: none;
  }
  .sidebar-caption,
  .messages-mode .sidebar-caption {
    display: block;
    font-size: 7px;
    margin: 0;
    color: var(--muted);
    letter-spacing: 1.2px;
  }
  .mobile-menu-button {
    display: flex;
    margin-left: 0;
    color: var(--secondary);
  }
  .sidebar-spacer {
    display: none;
  }
  .sidebar .account {
    border: 0;
    padding: 0;
    margin-left: auto;
  }
  .sidebar .account .button {
    font-size: 0.67rem;
    padding: 8px 13px;
  }
  .sidebar .account .avatar {
    height: 27px;
    width: 27px;
    border-radius: 9px;
  }
  .sidebar .account-person > span:last-child {
    display: none;
  }
  .sidebar .compose-shortcut {
    display: none;
  }
  .sidebar nav {
    border: var(--border-width) solid var(--line);
    left: 8px;
    right: 8px;
    bottom: 7px;
    border-radius: 15px;
    padding: 6px 4px calc(7px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: var(--shadow);
    gap: 0;
    justify-content: flex-start;
  }
  .nav-item,
  .messages-mode .nav-item {
    flex-direction: column;
    gap: 5px;
    min-width: 65px;
    padding: 9px 9px;
    justify-content: center;
    font-size: 8px !important;
    border-radius: 10px;
    white-space: nowrap;
  }
  .nav-item > span:last-of-type,
  .messages-mode .sidebar .nav-item > span:last-of-type {
    display: block;
    max-width: 67px;
  }
  .nav-item span:first-child svg {
    height: 20px;
    width: 20px;
  }
  .nav-item.active {
    background: color-mix(in srgb, var(--secondary) 10%, var(--surface));
    color: var(--secondary);
  }
  .nav-item.active > span:first-child {
    color: var(--secondary);
  }
  .mobile-menu-open .sidebar nav {
    top: 47px;
    bottom: auto;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 16px 8px;
    border-radius: 0 0 16px 16px;
  }
  .mobile-menu-open .nav-item {
    padding: 17px 10px;
    font-size: 10px !important;
  }
  .sidebar .badge {
    position: absolute;
    right: 9px;
    top: 3px;
    min-width: 13px;
    padding: 3px;
    font-size: 8px;
  }
  main,
  .messages-mode main {
    width: 100%;
    padding: 0;
    background: none;
  }
  .page-header {
    top: 111px;
    height: 58px;
    margin-bottom: 12px;
    border-radius: calc(var(--panel-radius) * 0.7);
    padding: 0 16px;
  }
  .page-header h1 {
    font-size: calc(1.12rem * var(--heading-scale));
  }
  .page-header .button {
    font-size: 0.66rem;
    padding: 8px 11px;
  }
  .page-header .text-button {
    font-size: 0.65rem;
  }
  .tabs {
    border-radius: calc(var(--panel-radius) * 0.7);
    min-height: 44px;
    margin-bottom: 12px;
  }
  .tabs a,
  .tabs > span {
    font-size: 0.75rem;
    padding: 13px 8px;
  }
  .guest-welcome {
    padding: 25px 22px;
    border-radius: var(--panel-radius);
  }
  .guest-welcome h2 {
    font-size: calc(1.8rem * var(--heading-scale));
    max-width: 280px;
    line-height: 1.35;
  }
  .guest-welcome .eyebrow {
    font-size: 0.48rem;
    letter-spacing: 1px;
  }
  .guest-welcome p {
    font-size: 0.78rem;
    max-width: 240px;
  }
  .guest-welcome:after {
    font-size: 110px;
    right: -5px;
    top: 55px;
  }
  .guest-welcome .button {
    font-size: 0.74rem;
  }
  .post {
    padding: 16px 15px 7px;
    margin-bottom: 11px;
    border-radius: calc(var(--panel-radius) * 0.8);
  }
  .post .avatar {
    width: 33px;
    height: 33px;
    font-size: 10px;
    border-radius: 11px;
  }
  .post-layout {
    gap: 9px;
  }
  .post-heading {
    font-size: 0.76rem;
    line-height: 1.5;
    align-items: flex-start;
  }
  .post-heading .muted {
    font-size: 0.65rem;
  }
  .post-content {
    font-size: 0.9rem;
    padding-top: 5px;
  }
  .post-actions {
    gap: 0;
  }
  .post-action {
    font-size: 0.62rem;
    gap: 3px;
    padding: 8px 3px;
  }
  .post-action svg {
    height: 15px;
    width: 15px;
  }
  .post-community,
  .post-parent {
    margin-left: 42px;
    font-size: 0.61rem;
  }
  .post-owner-actions .icon-button {
    height: 23px;
    width: 23px;
    min-width: 23px;
    padding: 4px;
  }
  .composer,
  .reply-composer {
    padding: 16px 15px 12px;
    margin-bottom: 12px;
    border-radius: calc(var(--panel-radius) * 0.8);
  }
  .composer textarea,
  .reply-composer textarea {
    font-size: 1rem;
    min-height: 65px;
  }
  .composer .avatar {
    width: 33px;
    height: 33px;
    border-radius: 11px;
  }
  .composer-bottom .button {
    padding: 8px 13px;
    font-size: 0.76rem;
  }
  .composer-count {
    font-size: 0.58rem !important;
  }
  .profile-banner {
    height: 140px;
  }
  .profile-body {
    padding: 0 17px 20px;
  }
  .profile-body > .avatar {
    width: 88px;
    height: 88px;
    margin-top: -45px;
    border-radius: 22px;
  }
  .profile-body h2 {
    font-size: calc(1.36rem * var(--heading-scale));
  }
  .profile-action {
    padding-top: 12px;
  }
  .profile-action .button {
    padding: 7px 11px;
    font-size: 0.68rem;
  }
  .profile-badge {
    font-size: 0.62rem;
    padding: 4px 7px;
  }
  .profile-connections {
    font-size: 0.62rem;
  }
  .space-grid {
    gap: 13px;
  }
  .space-card {
    border-radius: var(--panel-radius);
  }
  .space-cover {
    height: 95px;
  }
  .space-card-body {
    padding: 18px;
  }
  .space-card h2 {
    font-size: calc(1.1rem * var(--heading-scale));
  }
  .community-hero {
    padding: 25px 21px;
  }
  .community-hero h2 {
    font-size: calc(1.55rem * var(--heading-scale));
  }
  .page-padding {
    padding: 21px 18px;
  }
  .empty-state {
    padding: 35px 20px;
  }
  .empty-state h2 {
    font-size: calc(1.35rem * var(--heading-scale));
  }
  .empty-state p {
    font-size: 0.8rem;
  }
  .thread-context .post {
    margin-left: 8px;
    margin-right: 0;
  }
  .modal {
    padding: 29px 22px;
    border-radius: var(--panel-radius);
  }
  .modal h2 {
    font-size: calc(1.35rem * var(--heading-scale));
  }
  .toast {
    bottom: 92px;
    font-size: 0.74rem;
  }
  .settings-intro {
    padding: 24px 20px;
  }
  .settings-intro h2 {
    font-size: calc(1.6rem * var(--heading-scale));
  }
  .settings-intro p {
    font-size: 0.76rem;
  }
  .settings-tabs {
    gap: 6px;
    padding: 12px 0;
  }
  .settings-tabs button {
    font-size: 0.66rem;
    padding: 9px 11px;
  }
  .settings-section {
    padding: 22px 17px;
  }
  .settings-section-heading h2 {
    font-size: calc(1.12rem * var(--heading-scale));
  }
  .settings-section-heading > div {
    gap: 18px;
  }
  .settings-section-heading .text-button {
    font-size: 0.65rem;
  }
  .design-presets {
    gap: 7px;
  }
  .preset {
    padding: 6px;
    font-size: 0.62rem;
  }
  .preset i {
    height: 32px;
  }
  .settings-page .form-grid {
    gap: 0 12px;
  }
  .settings-page form label {
    font-size: 0.76rem;
  }
  .settings-page
    form
    input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(
      [type="range"]
    ),
  .settings-page form select {
    font-size: 0.8rem;
    padding: 10px;
  }
  .range-control {
    gap: 6px;
  }
  .range-control output {
    font-size: 0.67rem;
    min-width: 28px;
  }
  .settings-save {
    bottom: 89px;
    padding: 12px 13px;
    gap: 9px;
    border-radius: 12px;
  }
  .settings-save .small {
    font-size: 0.59rem;
    max-width: 150px;
  }
  .settings-save .button {
    font-size: 0.69rem;
    padding: 9px 13px;
  }
  .badge-catalog {
    grid-template-columns: 1fr;
  }
  .badge-choice {
    padding: 14px;
    gap: 12px;
  }
  .connection-card {
    padding: 15px;
    gap: 11px;
  }
  .connection-card > .button {
    margin-left: 53px;
  }
  .connection-controls {
    gap: 10px;
  }
  .connection-controls .check-label {
    font-size: 0.66rem;
  }
  .connection-info h3 {
    font-size: 0.86rem;
  }
  .connection-info p {
    font-size: 0.68rem;
  }
  .messages-mode .app-shell {
    display: flex;
    max-width: 600px;
    padding-bottom: 0;
  }
  .dm-workspace {
    display: block;
    height: calc(100dvh - 256px);
  }
  .dm-workspace > .conversation-list {
    border-radius: var(--panel-radius);
    height: 100%;
  }
  .dm-workspace .dm-chat {
    height: 100%;
    border-radius: var(--panel-radius);
  }
  .dm-chat .chat-message {
    padding: 10px 12px;
  }
  .dm-chat .chat-message .avatar {
    height: 29px;
    width: 29px;
  }
  .dm-chat .message-text {
    font-size: 0.86rem;
  }
  .dm-chat .message-heading {
    font-size: 0.75rem;
  }
  .dm-back {
    padding: 9px 15px;
    font-size: 0.68rem;
    background: var(--elevated);
  }
  .conversation-row {
    padding: 17px 15px;
  }
  .conversation-row strong {
    font-size: 0.8rem;
  }
  .server-mode .app-shell {
    display: flex;
    padding: 0 9px 10px;
    gap: 0;
    height: 100dvh;
  }
  .server-mode .server-rail {
    display: flex;
    position: relative;
    height: 64px;
    flex-shrink: 0;
    width: 100%;
    padding: 8px 0;
    flex-direction: row;
    gap: 9px;
  }
  .server-mode .rail-home {
    width: 113px;
    height: 40px;
    font-size: 1.16rem;
    border-radius: 0;
  }
  .server-mode .rail-server,
  .server-mode .rail-button {
    width: 32px;
    min-width: 32px;
    height: 32px;
    font-size: 9px;
    border-radius: 9px;
  }
  .server-mode main {
    height: calc(100dvh - 74px);
    flex: 1;
    min-height: 0;
    padding: 0;
  }
  .server-workspace {
    height: 100%;
    display: flex;
    position: relative;
    gap: 0;
    width: 100%;
  }
  .server-chat-column {
    width: 100%;
    border-radius: calc(var(--panel-radius) * 0.75);
  }
  .server-workspace > .channel-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 235px;
    border-radius: calc(var(--panel-radius) * 0.75);
    transform: translateX(-110%);
    z-index: 7;
  }
  .server-workspace.channels-open > .channel-sidebar {
    transform: translateX(0);
    box-shadow: var(--shadow);
  }
  .server-workspace.channels-open > .channel-backdrop {
    border-radius: calc(var(--panel-radius) * 0.75);
    display: block;
    position: absolute;
    inset: 0;
    z-index: 6;
    background: #0008;
  }
  .server-heading {
    height: 57px;
  }
  .server-heading h1 {
    font-size: 0.88rem;
  }
  .server-workspace .server-banner {
    height: auto;
    min-height: 110px;
    padding: 18px 15px;
  }
  .server-workspace .server-banner p {
    font-size: 0.73rem;
    max-height: 45px;
  }
  .channel-list {
    padding: 13px 10px;
  }
  .server-workspace .channel-category {
    font-size: 0.63rem;
    padding: 13px 7px 5px;
  }
  .server-workspace .channel-row > a {
    font-size: 0.8rem;
    padding: 10px 8px;
  }
  .server-workspace .server-user {
    padding: 13px 10px;
  }
  .server-user > .avatar {
    display: inline-flex !important;
    height: 28px;
    width: 28px;
    font-size: 9px;
  }
  .server-user strong {
    font-size: 0.71rem;
  }
  .server-user small {
    font-size: 0.61rem;
  }
  .chat-header {
    height: 57px;
    padding: 0 10px;
    gap: 5px;
  }
  .chat-title h2 {
    font-size: calc(0.9rem * var(--heading-scale));
  }
  .chat-title .small {
    display: none;
  }
  .chat-header-actions {
    gap: 0;
  }
  .chat-header-actions .icon-button {
    height: 29px;
    min-width: 29px;
    width: 29px;
    padding: 6px;
  }
  .chat-header-actions svg {
    height: 15px;
    width: 15px;
  }
  .chat-beginning {
    padding: 20px 17px;
    margin-bottom: 13px;
  }
  .channel-hash {
    height: 42px;
    width: 42px;
    border-radius: 12px;
    margin-bottom: 13px;
  }
  .channel-hash svg {
    height: 24px;
    width: 24px;
  }
  .chat-beginning h2 {
    font-size: calc(1.25rem * var(--heading-scale));
  }
  .chat-beginning p {
    font-size: 0.74rem;
  }
  .chat-message {
    padding: 8px 11px;
    gap: 8px;
  }
  .chat-message > a {
    display: block;
  }
  .chat-message .avatar {
    height: 27px;
    width: 27px;
    font-size: 9px;
    border-radius: 9px;
  }
  .chat-message-body {
    padding: 9px 11px;
    border-radius: 0 12px 12px 12px;
  }
  .message-heading {
    font-size: 0.74rem;
    gap: 5px;
  }
  .message-heading time {
    font-size: 0.53rem;
  }
  .message-text,
  .chat-message .message-text {
    font-size: 0.84rem;
  }
  .chat-message.pinned {
    padding-left: 11px;
  }
  .message-tools {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 1px;
    box-shadow: none;
    border: 0;
    background: none;
    margin-right: -3px;
  }
  .message-tools .icon-button {
    width: 23px;
    min-width: 23px;
    height: 23px;
    font-size: 16px;
    padding: 4px;
  }
  .message-tools svg {
    width: 13px;
    height: 13px;
  }
  .chat-compose-area {
    padding: 0 11px 12px;
  }
  .chat-compose-area form {
    padding: 9px;
    gap: 4px;
    border-radius: 11px;
  }
  .chat-compose-area textarea {
    font-size: 0.82rem;
    line-height: var(--reading-height);
  }
  .chat-compose-area .button {
    padding: 7px;
    border-radius: 7px;
  }
  .chat-compose-area .icon-button {
    width: 24px;
    min-width: 24px;
    height: 27px;
    padding: 3px;
  }
  .chat-compose-area > .tiny {
    font-size: 0.55rem;
  }
  .typing-indicator {
    height: 20px;
    font-size: 0.59rem;
  }
  .chat-compose-area .gif-tool {
    min-width: 24px;
    font-size: 0.56rem !important;
  }
  .voice-room {
    padding: 18px 13px;
  }
  .voice-room h2 {
    font-size: calc(1.05rem * var(--heading-scale));
  }
  .voice-room p {
    font-size: 0.7rem;
  }
  .voice-room .button {
    font-size: 0.72rem;
    padding: 9px 13px;
  }
  .server-mode #voice-status {
    left: 16px;
    right: 16px;
    bottom: 17px;
    max-width: none;
    padding: 10px 12px;
    font-size: 0.63rem;
    border-radius: 12px;
  }
  .server-mode:has(#voice-status:not([hidden])) .chat-compose-area {
    padding-bottom: 95px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

:root[data-motion="reduced"] .post:hover {
  transform: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .post:hover {
    transform: none !important;
  }
}

/* Controls and surfaces: neutral default, personal themes remain optional. */
:root {
  --bg: #f2f3f5;
  --surface: #ffffff;
  --elevated: #e9ebef;
  --ink: #24272e;
  --muted: #676d78;
  --line: #d9dde3;
  --input: #f1f2f5;
  --panel-radius: 8px;
  --shadow: none;
}
.app-icon {
  width: var(--icon-size, 21px);
  height: var(--icon-size, 21px);
  stroke-width: var(--icon-weight, 1.8);
  flex-shrink: 0;
}
[data-icon-style="duotone"] .app-icon {
  fill: color-mix(in srgb, currentColor 13%, transparent);
}
[data-icon-style="solid"] .app-icon {
  fill: color-mix(in srgb, currentColor 30%, transparent);
  stroke-linejoin: miter;
}
[data-icon-motion="true"][data-motion="normal"] button:hover > .app-icon,
[data-icon-motion="true"][data-motion="normal"] a:hover > .app-icon {
  transform: translateY(-2px) rotate(-5deg);
  transition: transform 0.16s ease;
}
.channel-list {
  gap: var(--channel-gap, 0px);
}
.channel-row,
.channel-row > a {
  border-radius: var(--channel-radius, 0px) !important;
}
.channel-row {
  margin: var(--channel-gap, 0px) 0;
  border-bottom: 1px solid var(--line);
}
.server-workspace {
  gap: 0;
  border-radius: var(--panel-radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.channel-sidebar,
.member-sidebar,
.server-chat-column {
  border-radius: 0 !important;
}
.settings-modal {
  width: min(1040px, 96vw);
  max-width: 1040px;
  padding: 32px;
  height: min(850px, 94dvh);
  overflow: auto;
}
.settings-modal .settings-page {
  padding: 0;
  max-width: none;
}
.settings-modal .settings-intro {
  padding-top: 0;
}
.settings-modal .settings-tabs {
  position: sticky;
  top: -32px;
  z-index: 3;
  background: var(--surface);
  padding: 15px 0;
}
.design-presets {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.preset-terminal {
  background: #18231e;
  color: #94edb2;
}
.preset-editorial {
  background: #fff;
  color: #a03732;
  font-family: Georgia, serif;
}
.preset-studio {
  background: #e6eefb;
  color: #3468cb;
}
.preset-contrast {
  background: #111;
  color: #ffed00;
}
.settings-intro .eyebrow {
  display: none;
}
.call-modal {
  width: min(1100px, 96vw);
  max-width: 1100px;
}
.call-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 12px;
}
.call-person {
  padding: 12px;
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
}
.call-person figure {
  margin: 8px 0;
}
.call-person video {
  width: 100%;
  max-height: 60dvh;
  background: #17191c;
  object-fit: contain;
}
.call-person figcaption {
  font-size: 0.8em;
  color: var(--muted);
}
.call-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.call-member {
  display: block;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
#voice-status {
  flex-wrap: wrap;
}
@media (min-width: 1050px) {
  [data-nav-position="right"] .app-shell {
    direction: rtl;
  }
  [data-nav-position="right"] .app-shell > * {
    direction: ltr;
  }
}
@media (max-width: 600px) {
  .settings-modal {
    padding: 20px 12px;
  }
  .settings-modal .settings-tabs {
    top: -20px;
  }
  .design-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  .app-icon {
    transition: none !important;
    transform: none !important;
  }
}

.navigation-choice {
  display: flex;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}
.navigation-choice > span {
  flex: 1;
}
.navigation-choice label {
  margin: 0;
  max-width: 130px;
}
.navigation-choice label select {
  margin: 0;
}

/* Compact, functional defaults. Decorative textures are opt-in settings. */
.guest-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 21px;
  background: var(--surface);
}
.guest-welcome::after {
  content: none;
}
.guest-welcome h2 {
  font-size: 1.05rem;
  letter-spacing: 0;
  margin: 0 0 5px;
}
.guest-welcome p {
  margin: 0;
  font-size: 0.85rem;
}
.guest-welcome .button {
  flex-shrink: 0;
}
.discovery-card {
  background: var(--surface);
}
.discovery-card h2 {
  font-size: 1rem;
}
.sidebar-caption,
.workspace-label {
  letter-spacing: 0.05em;
}
.modal-mark {
  background: none;
  padding: 0;
  height: auto;
}
.button.primary {
  box-shadow: none;
}
@media (max-width: 600px) {
  .guest-welcome {
    align-items: flex-start;
    flex-direction: column;
    padding: 15px;
  }
  .guest-welcome .button {
    width: auto;
  }
}

#call-content {
  text-align: left;
  margin-top: 12px;
}
#call-content .call-grid {
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
}
.call-person {
  min-width: 0;
}
.call-person:has(.expanded) {
  grid-column: 1/-1;
}
.call-person figure.expanded video {
  max-height: 75dvh;
  min-height: 35dvh;
}
.call-person figure:fullscreen {
  background: #111;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 16px;
}
.call-person figure:fullscreen video {
  max-height: 90dvh;
  height: 90dvh;
  width: 100%;
  object-fit: contain;
}
.call-person figcaption {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.participant-volume {
  font-size: 0.8rem;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.participant-volume input {
  width: 100%;
  min-width: 40px;
}
.game-presence {
  max-width: 340px;
  font-size: 0.8rem;
}
.voice-room > span {
  display: none;
}
.voice-room h2 {
  font-size: 1.2rem;
}
.inline-custom-emoji,
.unicode-emoji {
  width: var(--emoji-size, 32px);
  height: var(--emoji-size, 32px);
  font-size: var(--emoji-size, 32px);
  vertical-align: middle;
  object-fit: contain;
  line-height: 1;
}
.unicode-emoji {
  display: inline-block;
  width: auto;
}
.person-name.name-bold {
  font-weight: 800;
}
.person-name.name-italic {
  font-style: italic;
}
.person-name.name-mono {
  font-family: monospace;
}
.server-private-badges {
  display: flex;
  gap: 4px;
}
.server-private-badges svg {
  width: 18px;
  height: 18px;
}
.server-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}
.server-management details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.server-management summary {
  cursor: pointer;
  font-weight: 600;
}
.server-management details > form {
  margin-top: 12px;
}
.message-files > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  margin-top: 6px;
}
.message-files button {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-wrap: anywhere;
  text-align: left;
}
.file-preview {
  width: 100%;
  height: 70dvh;
  border: 0;
}
.file-image-preview {
  max-width: 100%;
  max-height: 70dvh;
  object-fit: contain;
}
.file-text-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 70dvh;
  overflow: auto;
  font-family: monospace;
}
#chat-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1/-1;
  font-size: 0.8rem;
}
.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.feedback-shortcut {
  margin: 10px 0;
  padding: 8px;
  text-align: left;
  font-size: 0.85rem;
}
.feedback-list article {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.feedback-list p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.voice-room {
  padding: 18px;
}
.voice-room:has(#call-content:not([hidden])) > p {
  display: none;
}
