/* Vanilla / Quiet workspace. One visual layer over the base component sheet.
   Modal geometry deliberately uses no transform animations (including normal-motion).
   No CDN fonts, no aurora, no broad backdrop filters, no forced smooth scrolling. */
:root,
[data-theme="dark"] {
  --bg: #151719;
  --bg-solid: #1d2023;
  --bg-elevated: #1b1e21;
  --bg-input: #141618;
  --bg-hover: #ffffff07;
  --border: #ffffff0b;
  --border-strong: #ffffff1c;
  --text: #e9ebed;
  --text-dim: #92999f;
  --accent: #b8c9bb;
  --accent-2: #c4d2c6;
  --accent-gradient: linear-gradient(#bacabd, #a9beaf);
  --danger: #e0a0a3;
  --success: #91b39b;
  --warning: #c6b18d;
  --shadow: 0 20px 70px #0004;
  --glow: transparent;
  --glow-soft: transparent;
  --glass-blur: 0px;
  --sidebar-w: 272px;
  --radius: 14px;
  --radius-sm: 8px;
}
[data-theme="light"] {
  --bg: #fafbf9;
  --bg-solid: #fff;
  --bg-elevated: #f1f3f0;
  --bg-input: #f5f6f4;
  --bg-hover: #17291b08;
  --border: #1b2c1e12;
  --border-strong: #1b2c1e29;
  --text: #242a26;
  --text-dim: #68736b;
  --accent: #516e5a;
  --accent-2: #496451;
  --accent-gradient: linear-gradient(#627f6a, #516e5a);
  --shadow: 0 18px 60px #19362215;
}
* {
  box-sizing: border-box;
}
body {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  letter-spacing: -0.15px;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  letter-spacing: inherit;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent);
}
[hidden] {
  display: none !important;
}
.bg-fx,
.brand-logo-ring,
.heading-dot,
.edition-tag,
.btn-glow::before,
.btn-glow::after,
.modal::before,
.auth-card::before,
.auth-card::after {
  display: none !important;
}
body::before,
body::after {
  display: none !important;
}
h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}
h1,
h2,
h3 {
  color: var(--text);
  background: none;
  -webkit-text-fill-color: currentColor;
}
button,
.btn,
.icon-btn,
.bubble,
.sidebar,
.chat-header,
.composer,
.profile-name,
.brand-logo,
.auth-card {
  animation: none;
  box-shadow: none;
  filter: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
button {
  transition:
    background 0.14s,
    border-color 0.14s,
    color 0.14s;
}
.btn {
  font-size: 13px;
  font-weight: 550;
  min-height: 40px;
  border-radius: 9px;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: var(--bg-solid);
  transform: none;
}
.btn:hover {
  background: var(--bg-hover);
  transform: none;
  filter: none;
  box-shadow: none;
}
.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: #18251c;
}
.btn.primary:hover {
  background: color-mix(in srgb, var(--accent) 87%, white);
}
[data-theme="light"] .btn.primary {
  color: #fff;
}
.btn.ghost {
  background: transparent;
  border-color: var(--border);
}
.btn.danger {
  background: #bb686414;
  color: var(--danger);
  border-color: #bc6c6733;
}
.btn.small {
  min-height: 34px;
  font-size: 12px;
  padding: 8px 12px;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  border: 0;
  transform: none;
}
.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
  transform: none;
  box-shadow: none;
}
.icon-btn.send {
  background: var(--accent);
  color: #18251c;
}
.icon-btn.off,
.call-btn.off {
  color: var(--danger);
  background: #c5666814;
}
.small {
  font-size: 12px;
}
.muted {
  color: var(--text-dim);
}
input,
textarea,
select {
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  border-radius: 8px;
  color: var(--text);
  box-shadow: none;
  font-size: 14px;
  padding: 11px 13px;
  min-width: 0;
}
input::placeholder,
textarea::placeholder {
  color: var(--text-dim);
  opacity: 0.72;
}
textarea {
  resize: vertical;
}
input[type="checkbox"] {
  accent-color: var(--accent);
}
input[type="color"] {
  width: 50px;
  height: 34px;
  padding: 4px;
}
a {
  color: var(--accent);
}
.section-eyebrow {
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-dim);
}
/* Shell */
.main-view {
  display: grid;
  grid-template-columns: 64px var(--sidebar-w) minmax(0, 1fr);
  height: 100dvh;
  gap: 0;
  padding: 0;
  background: var(--bg);
  overflow: hidden;
}
.workspace-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 8px 14px;
  background: var(--bg-input);
  border-right: 1px solid var(--border);
  min-height: 0;
}
.rail-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
}
.rail-brand img {
  width: 30px;
  height: 30px;
}
.server-mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  border-radius: 14px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.server-mark:hover {
  background: var(--bg-hover);
  color: var(--text);
  transform: none;
}
.server-mark.active {
  background: var(--bg-solid);
  border-color: var(--border-strong);
  color: var(--text);
}
.server-mark.active::before {
  content: "";
  position: absolute;
  left: -9px;
  width: 3px;
  height: 17px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.server-mark.rail-add {
  border: 1px dashed var(--border-strong);
  margin-top: 4px;
}
.rail-divider {
  height: 1px;
  width: 24px;
  background: var(--border);
  margin: 2px 0;
}
.rail-spacer {
  flex: 1;
}
#server-rail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  min-height: 0;
  scrollbar-width: none;
}
.sidebar {
  position: relative;
  background: var(--bg-elevated);
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 20px 12px;
}
.sidebar-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.sidebar-header {
  padding: 8px 16px 16px;
  gap: 8px;
  min-height: 58px;
}
.sidebar-header h2 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
  flex: 1;
}
.sidebar-header::after {
  display: none;
}
#btn-menu {
  display: none;
}
.search-box {
  padding: 0 16px 14px;
}
.search-box::before {
  display: none;
}
.search-box input {
  font-size: 12px;
  min-height: 36px;
  padding: 9px 12px;
}
.directory-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin: 0 12px 18px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
}
.directory-button:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.directory-button .svg-icon:last-child {
  margin-left: auto;
}
.list-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  padding: 0 20px;
  margin: 0 0 10px;
}
.list-caption > span {
  font-size: 8px;
  opacity: 0.55;
}
.list-caption .icon-btn {
  width: 26px;
  height: 26px;
}
.conversation-list {
  padding: 0 10px;
  min-height: 0;
  overflow: auto;
  flex: 1;
}
.conv-item {
  padding: 11px 10px;
  margin: 2px 0;
  border: 1px solid transparent;
  border-radius: 9px;
  gap: 11px;
  transform: none;
}
.conv-item:hover {
  background: var(--bg-hover);
  transform: none;
}
.conv-item.active {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-color: var(--border);
}
.conv-item .avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}
.conv-name {
  font-size: 13px;
  font-weight: 550;
}
.conv-time {
  font-size: 9px;
  color: var(--text-dim);
}
.conv-last {
  font-size: 11px;
  margin-top: 5px;
  color: var(--text-dim);
}
.badge {
  font-size: 10px;
  min-width: 17px;
  height: 17px;
  background: var(--accent);
  color: #18251c;
  box-shadow: none;
}
.account-strip {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.account-strip .avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}
#account-avatar {
  cursor: pointer;
}
.account-strip > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.account-strip strong {
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.account-strip small {
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.account-status {
  width: 12px;
  height: 12px;
  min-width: 12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--success);
  margin-left: auto;
  cursor: pointer;
}
.status-dot {
  box-shadow: none !important;
}
.status-dot.dnd,
.presence-swatch.dnd,
.account-status[data-mode="dnd"] {
  background: var(--danger);
}
.status-dot.away,
.presence-swatch.idle,
.account-status[data-mode="idle"] {
  background: var(--warning);
}
.presence-swatch.online {
  background: var(--success);
}
.presence-swatch.invisible,
.account-status[data-mode="invisible"] {
  background: #747a80;
}
.avatar {
  border-radius: 12px;
}
.avatar.placeholder {
  background: #ffffff0b;
  color: var(--text);
  font-size: 11px;
}
.chat-panel {
  background: var(--bg);
  border: 0;
  border-radius: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
/* Home */
.chat-placeholder {
  margin: 0;
  padding: 28px 42px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  text-align: left;
  height: 100%;
  gap: 32px;
  background: var(--bg);
  overflow: auto;
}
.welcome-top,
.welcome-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}
.welcome-live {
  font-size: 10px;
  color: var(--text-dim);
  display: flex;
  gap: 7px;
  align-items: center;
}
.welcome-live i {
  width: 5px;
  height: 5px;
  background: var(--success);
  border-radius: 50%;
}
.welcome-main {
  max-width: 760px;
  width: 100%;
  margin: auto 0;
  padding: 24px 0;
}
.welcome-kicker {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--text-dim);
}
.chat-placeholder h2 {
  font-size: clamp(30px, 3.3vw, 48px);
  font-weight: 550;
  letter-spacing: -1.7px;
  line-height: 1.15;
  margin: 22px 0 18px;
}
.chat-placeholder h2 span {
  color: var(--text-dim);
}
.welcome-main > p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--text-dim);
  max-width: 500px;
  margin: 0;
}
.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 32px;
}
.welcome-actions .btn {
  display: flex;
  align-items: center;
  gap: 18px;
}
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 660px;
}
.welcome-grid > div {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
}
.welcome-index {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--text-dim);
}
.welcome-grid h3 {
  font-size: 14px;
  font-weight: 550;
  margin: 14px 0 8px;
}
.welcome-grid p {
  font-size: 11px;
  line-height: 1.8;
  color: var(--text-dim);
  margin: 0;
}
.welcome-lordicon {
  width: 28px;
  height: 28px;
  display: block;
  filter: grayscale(1) invert(0.8);
  opacity: 0.6;
  margin: 0 0 14px;
}
.welcome-bottom {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.welcome-bottom kbd {
  font-family: inherit;
  letter-spacing: 0;
  font-size: 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 5px 8px;
}
.welcome-bottom kbd span {
  margin-left: 8px;
  color: var(--text-dim);
}
.icon-credit {
  font-size: 8px;
  color: var(--text-dim);
  text-decoration: none;
  margin-left: 8px;
}
.icon-credit:hover {
  text-decoration: underline;
}
.home-recent {
  margin-top: 25px;
  max-width: 660px;
}
.home-recent h3 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
}
.home-recent button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.home-recent .avatar {
  width: 28px;
  height: 28px;
}
.home-recent span {
  font-size: 12px;
}
.home-recent small {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-dim);
}
/* Conversation */
.chat-header {
  min-height: 70px;
  padding: 14px 26px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
}
.peer-meta strong {
  font-size: 14px;
  font-weight: 600;
}
.peer-meta span {
  font-size: 11px;
  color: var(--text-dim);
}
.chat-actions {
  gap: 2px;
}
.peer-avatar-slot {
  cursor: pointer;
}
.peer-avatar-slot .avatar {
  width: 32px;
  height: 32px;
}
.channel-header-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  font:
    20px ui-monospace,
    monospace;
  color: var(--text-dim);
}
.messages-scroll {
  padding: 20px 32px 16px;
  scrollbar-gutter: stable;
  overflow-anchor: auto;
}
.messages {
  gap: 0;
}
.msg-row {
  position: relative;
  display: flex;
  justify-content: flex-start !important;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  margin: 0;
  border-radius: 7px;
  min-height: 0;
}
.msg-row:hover {
  background: var(--bg-hover);
}
.message-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  margin: 3px 0 0;
  cursor: pointer;
}
.msg-row .bubble,
.msg-row.out .bubble,
.msg-row.in .bubble {
  position: relative;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
  max-width: min(820px, calc(100% - 76px));
  animation: none;
  min-width: 0;
}
.msg-row.message-grouped {
  padding: 2px 0 2px 44px;
}
.msg-row.message-grouped .bubble {
  max-width: calc(100% - 32px);
}
.message-author {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--text);
}
.bubble .meta {
  font-size: 9px;
  color: var(--text-dim);
  opacity: 0.7;
  justify-content: flex-start;
  gap: 5px;
  line-height: 1.5;
  margin: 2px 0 0;
}
.bubble .ticks {
  color: var(--text-dim);
}
.bubble .ticks .svg-icon {
  width: 12px;
  height: 12px;
}
.message-more {
  position: absolute;
  top: 0;
  right: -33px;
  width: 27px;
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-solid);
  color: var(--text-dim);
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.12s;
}
.bubble:hover .message-more,
.bubble:focus-within .message-more {
  opacity: 1;
}
.reactions:empty {
  display: none;
}
.reaction-chip {
  font-size: 11px;
  padding: 2px 7px;
  background: var(--bg-elevated);
  box-shadow: none;
}
.reaction-chip.mine {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.date-sep {
  margin: 18px 0 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.date-sep::before,
.date-sep::after {
  content: "";
  height: 1px;
  background: var(--border);
  flex: 1;
}
.date-sep span {
  font-size: 9px;
  letter-spacing: 0.4px;
  color: var(--text-dim);
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  backdrop-filter: none;
}
.message-activity {
  font-size: 11px;
  color: var(--text-dim);
  padding: 10px 0 10px 44px;
  line-height: 1.6;
}
.quoted {
  background: var(--bg-elevated) !important;
  border-left: 2px solid var(--accent);
  font-size: 11px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.msg-image {
  max-height: 320px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.msg-file {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  min-height: 52px;
  font-size: 12px;
}
.typing-indicator {
  padding: 4px 30px;
  min-height: 22px;
  font-size: 10px;
}
.composer {
  margin: 0 24px 22px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg-elevated);
  box-shadow: none;
  flex-shrink: 0;
}
.composer-row {
  gap: 4px;
  align-items: flex-end;
}
.composer-row textarea {
  padding: 10px 8px;
  border: 0;
  background: none;
  font-size: 13px;
  min-height: 38px;
  max-height: 160px;
  box-shadow: none;
  border-radius: 0;
  resize: none;
}
.composer-row .icon-btn {
  flex: 0 0 36px;
  width: 36px;
  height: 38px;
}
.reply-preview {
  font-size: 11px;
  background: var(--bg-input);
  border-radius: 8px;
  border: 0;
  margin-bottom: 8px;
}
.scroll-latest {
  background: var(--bg-solid);
  border: 1px solid var(--border-strong);
  color: var(--text);
  box-shadow: var(--shadow);
}
.drag-over {
  outline: 2px dashed var(--accent);
  outline-offset: -8px;
}
.upload-preview {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: var(--bg-input);
  font-size: 11px;
}
.upload-preview img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
}
.audio-player {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  width: 330px;
  max-width: 100%;
  min-width: 0;
}
.audio-player audio {
  display: none;
}
.audio-play {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--bg-hover);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}
.audio-player.playing .audio-play {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}
.audio-player input[type="range"] {
  flex: 1;
  min-width: 30px;
  width: 70px;
  accent-color: var(--accent);
  padding: 0;
  cursor: pointer;
}
.audio-time {
  font:
    9px ui-monospace,
    monospace;
  color: var(--text-dim);
  white-space: nowrap;
}
.voice-speed {
  background: none;
  border: 0;
  padding: 4px;
  font-size: 10px;
  color: var(--text-dim);
  cursor: pointer;
}
.recording-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px;
  background: var(--bg-input);
}
.recording-wave {
  width: 110px;
  height: 30px;
  max-width: 30%;
}
.recording-bar .audio-player {
  flex: 1;
}
.recording-bar .btn {
  min-height: 32px;
  font-size: 11px;
}
.rec-dot {
  flex-shrink: 0;
}
#recording-timer {
  font:
    11px ui-monospace,
    monospace;
}
[data-compact="on"] .msg-row {
  padding-top: 3px;
  padding-bottom: 3px;
}
[data-compact="on"] .message-avatar {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}
[data-compact="on"] .msg-row.message-grouped {
  padding-left: 40px;
}
/* Workspaces, categories and members */
.server-description {
  font-size: 11px;
  line-height: 1.7;
  color: var(--text-dim);
  margin: 0 20px 16px;
  overflow-wrap: anywhere;
}
#channel-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: auto;
  padding: 0 12px;
  flex: 1;
  min-height: 0;
}
.channel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  color: var(--text-dim);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.channel-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.channel-item.active {
  background: var(--bg-hover);
  border-color: var(--border);
  color: var(--text);
}
.channel-item > span:nth-child(2) {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.channel-hash {
  font:
    18px ui-monospace,
    monospace;
  opacity: 0.65;
}
.channel-category {
  margin: 14px 0 3px;
}
.channel-category summary {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 8px;
  cursor: pointer;
}
.server-member-count {
  padding: 12px 20px;
  font-size: 10px;
  color: var(--text-dim);
}
.member-panel {
  width: 216px;
  overflow: auto;
  background: var(--bg);
  border-left: 1px solid var(--border);
  padding: 24px 12px;
}
.member-panel h3 {
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 10px 18px;
}
.member-panel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 8px;
  background: none;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.member-panel-row:hover {
  background: var(--bg-hover);
}
.member-panel-row .avatar {
  width: 28px;
  height: 28px;
}
.member-panel-row > span:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.member-panel-row strong {
  font-size: 11px;
  font-weight: 550;
}
.member-panel-row small {
  font-size: 10px;
  color: var(--text-dim);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.create-menu {
  display: grid;
  gap: 10px;
}
.create-option {
  position: relative;
  display: block;
  text-align: left;
  padding: 18px 40px 18px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
}
.create-option:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}
.create-option strong {
  display: block;
  font-size: 13px;
  font-weight: 550;
}
.create-option > span {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 7px;
}
.create-option > .svg-icon {
  position: absolute;
  right: 16px;
  top: 24px;
  color: var(--text-dim);
}
.community-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.community-form > p:empty {
  display: none;
}
.community-form .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
.community-form .field-label {
  font-size: 12px;
  color: var(--text-dim);
}
.community-form > .btn {
  align-self: flex-start;
}
.community-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
  margin-bottom: 20px;
}
.community-tabs .btn {
  font-size: 11px;
  padding: 8px 10px;
  min-height: 32px;
}
.community-tabs .active {
  background: var(--bg-hover);
  color: var(--text);
}
.community-settings-body h2 {
  font-size: 22px;
  letter-spacing: -0.6px;
  font-weight: 550;
}
.community-settings-body > .btn {
  margin: 12px 8px 0 0;
}
.role-list-row,
.member-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.role-list-row strong {
  flex: 1;
  min-width: 90px;
  font-size: 12px;
}
.role-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.member-copy {
  flex: 1;
  min-width: 100px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.member-copy strong,
.member-copy small {
  display: block;
  width: 100%;
  font-size: 12px;
}
.member-copy small {
  font-size: 10px;
  color: var(--text-dim);
}
.role-tag {
  font-size: 9px;
  border: 1px solid var(--border-strong);
  padding: 2px 5px;
  border-radius: 4px;
}
.permission-matrix {
  display: flex;
  flex-direction: column;
}
#modal-body .permission-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  margin: 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
#modal-body .permission-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-width: 17px;
  padding: 0;
  margin: 0;
}
#modal-body .permission-row select {
  min-width: 95px;
  width: auto;
  font-size: 11px;
}
.pinned-message {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.pinned-message .audio-player {
  margin-bottom: 10px;
}
/* Modal, settings and drawers: bounded layout, no transform-based positioning. */
.backdrop {
  background: #05060899;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: none;
}
.modal {
  position: fixed;
  inset: 0;
  margin: auto;
  transform: none;
  animation: none;
  width: min(580px, calc(100% - 32px));
  height: fit-content;
  max-height: min(88dvh, 900px);
  overflow: auto;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--bg-solid);
  box-shadow: var(--shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.modal > header,
.drawer > header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.modal > header h3,
.drawer > header h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
#modal-body {
  padding: 24px;
}
#modal-body label {
  font-size: 12px;
}
#modal-body input,
#modal-body select,
#modal-body textarea {
  margin-top: 6px;
}
.modal.is-settings,
.modal.is-server-settings {
  inset: 0;
  margin: 0;
  transform: none !important;
  animation: none !important;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  border: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  padding: 24px max(24px, calc((100vw - 1140px) / 2));
  overflow: hidden;
  background: var(--bg);
  box-shadow: none;
}
.modal.is-settings > header,
.modal.is-server-settings > header {
  padding: 0 0 20px;
  flex-shrink: 0;
}
.modal.is-settings #modal-body,
.modal.is-server-settings #modal-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 28px 0 0;
}
.settings-shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  max-height: none;
  max-width: 1140px;
  gap: 48px;
  margin: 0;
}
.settings-rail {
  width: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0 24px 0 0;
  border-right: 1px solid var(--border);
  gap: 4px;
  overflow: auto;
}
.settings-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  min-height: 42px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  width: 100%;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}
.settings-tab.active {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--border);
}
.settings-tab:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.settings-panels {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 0 24px 64px 0;
  scrollbar-gutter: stable;
}
.settings-panel {
  max-width: 740px;
  animation: none;
  padding: 0 0 24px;
}
.settings-panel h4 {
  font-size: 16px;
  font-weight: 550;
  margin: 30px 0 16px;
  letter-spacing: -0.2px;
}
.settings-panel h4:first-child {
  margin-top: 5px;
}
.settings-panel > input,
.settings-panel > textarea {
  margin-bottom: 10px;
}
.settings-panel > p {
  line-height: 1.8;
}
.settings-panel > .btn {
  margin: 6px 8px 10px 0;
}
#modal-body label.setting-row,
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.setting-label {
  font-size: 12px;
  color: var(--text);
}
.setting-label .small {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  max-width: 380px;
  line-height: 1.6;
}
.setting-row select {
  width: auto;
  max-width: 50%;
  font-size: 12px;
  min-width: 140px;
}
.setting-row .switch {
  position: relative;
  display: block;
  width: 40px;
  height: 23px;
  flex: 0 0 40px;
}
.setting-row .switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 1;
  cursor: pointer;
}
.switch .track {
  pointer-events: none;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  box-shadow: none;
}
.switch .track::after {
  width: 17px;
  height: 17px;
  top: 2px;
  left: 2px;
  background: var(--text-dim);
}
.switch input:checked + .track {
  background: var(--accent);
  box-shadow: none;
}
.switch input:checked + .track::after {
  transform: translateX(16px);
  background: #18251c;
}
.switch:focus-within .track {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.mic-meter {
  display: block;
  width: 100%;
  height: 22px;
  margin: 20px 0;
  accent-color: var(--accent);
}
.settings-section-copy {
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-dim);
}
.settings-loading {
  font-size: 12px;
  color: var(--text-dim);
  padding: 16px 0;
}
.settings-heading-copy {
  font-size: 12px;
  color: var(--text-dim);
  margin: 6px 0 22px;
}
.settings-panel .slider-wrap {
  min-width: 150px;
}
.settings-panel .volume-slider {
  accent-color: var(--accent);
}
.settings-rail-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 20px 12px;
  font-size: 10px;
  line-height: 1.8;
  color: var(--text-dim);
}
.modal.is-server-settings #modal-body {
  overflow: auto;
}
.modal.is-server-settings .community-settings {
  max-width: 900px;
  margin: auto;
}
.drawer {
  width: min(380px, 92vw);
  background: var(--bg-solid);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: none;
}
.drawer .auth-tabs {
  background: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}
.drawer .auth-tab {
  font-size: 12px;
}
.user-row {
  font-size: 12px;
  padding: 12px 8px;
  transform: none;
}
.user-row:hover {
  transform: none;
}
.user-row .meta small {
  font-size: 11px;
}
.drawer input[type="search"] {
  font-size: 13px;
}
.context-menu {
  background: var(--bg-solid);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: var(--shadow);
  animation: none;
  padding: 6px;
}
.context-menu button {
  font-size: 12px;
  padding: 10px 12px;
}
.toast {
  border-radius: 10px;
  background: var(--bg-solid);
  border: 1px solid var(--border-strong);
  box-shadow: 0 6px 26px #0002;
  font-size: 12px;
  padding: 12px 16px;
  animation: none;
}
.toast.success {
  border-color: #91b39b44;
}
.toast.error {
  border-color: #e0a0a344;
}
.toast-host {
  gap: 8px;
  bottom: 24px;
}
.offline-banner {
  background: var(--bg-solid);
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  font-size: 11px;
  box-shadow: none;
}
/* Profiles, presence */
.profile-card {
  padding: 0 !important;
  --profile-color: var(--accent);
}
.profile-banner {
  height: 130px;
  position: relative;
  overflow: hidden;
  background: var(--banner-color, #343d36) !important;
}
.profile-banner::after {
  background: none;
  pointer-events: none;
}
.profile-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-head {
  padding: 0 24px 24px;
}
.profile-avatar-box .avatar {
  border: 5px solid var(--bg-solid);
}
.profile-name {
  font-size: 22px;
  font-weight: 600;
  color: var(--profile-color);
  background: none;
  letter-spacing: -0.5px;
}
.profile-username {
  font-size: 12px;
  color: var(--text-dim);
}
.profile-bio {
  font-size: 13px;
  line-height: 1.8;
}
.profile-custom-status {
  font-size: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  overflow-wrap: anywhere;
}
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.profile-action {
  gap: 8px;
}
.profile-style-preview {
  padding: 24px;
  border-radius: 12px;
  font-size: 23px;
  margin: 16px 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}
[data-name-style="mono"] .profile-name,
[data-name-style="mono"].profile-style-preview {
  font-family: ui-monospace, monospace;
}
[data-name-style="serif"] .profile-name,
[data-name-style="serif"].profile-style-preview {
  font-family: Georgia, serif;
  font-style: italic;
}
.frame-ring {
  outline: 2px solid var(--profile-color, var(--accent));
  outline-offset: 2px;
}
.frame-double {
  outline: 4px double var(--profile-color, var(--accent));
  outline-offset: 2px;
}
.frame-square {
  border-radius: 20% !important;
  outline: 1px solid var(--profile-color, var(--accent));
  outline-offset: 2px;
}
.presence-picker {
  display: grid;
  gap: 6px;
}
.presence-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: none;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.presence-option:hover {
  background: var(--bg-hover);
}
.presence-option > span {
  display: grid;
  gap: 5px;
}
.presence-option strong {
  font-size: 12px;
  font-weight: 550;
}
.presence-option small {
  font-size: 11px;
  color: var(--text-dim);
}
.presence-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
[data-effect="shimmer"] .profile-banner::after,
[data-effect="shimmer"].profile-style-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 35%,
    #ffffff10 50%,
    transparent 65%
  );
  animation: quiet-shimmer 16s ease-in-out infinite;
  pointer-events: none;
}
@keyframes quiet-shimmer {
  0%,
  70% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}
[data-effect="orbit"] .profile-avatar-box::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px dashed var(--profile-color);
  border-radius: 50%;
  animation: quiet-orbit 35s linear infinite;
  pointer-events: none;
}
@keyframes quiet-orbit {
  to {
    transform: rotate(360deg);
  }
}
/* Calls and rooms */
.call-overlay {
  background: #080a0ccc;
  backdrop-filter: none;
  padding: 24px;
}
.call-card {
  position: relative;
  width: min(600px, 100%);
  background: var(--bg-solid);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 56px 24px 24px;
  box-shadow: var(--shadow);
  animation: none;
}
.call-dock-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
}
.call-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text);
  box-shadow: none;
  animation: none;
  transform: none;
}
.call-btn:hover {
  background: var(--bg-hover);
  transform: none;
}
.call-btn.hangup {
  background: #bc62612b;
  border-color: transparent;
  color: #e8a2a1;
}
.call-btn.answer {
  background: var(--accent);
  color: #18251c;
}
.call-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.call-card h2 {
  font-size: 22px;
  font-weight: 550;
  letter-spacing: -0.5px;
}
.call-card #call-state {
  font-size: 12px;
}
.call-card .call-timer {
  font:
    12px ui-monospace,
    monospace;
  color: var(--text-dim);
}
.remote-video {
  border-radius: 12px;
  max-height: 380px;
  object-fit: contain;
}
.local-video {
  border-radius: 9px;
  width: 110px;
}
.call-overlay.docked {
  position: fixed;
  inset: auto 20px 20px auto;
  width: 330px;
  height: auto;
  padding: 0;
  background: none;
  pointer-events: none;
  display: block;
  z-index: 39;
}
.call-overlay.docked .call-card {
  width: 100%;
  padding: 42px 16px 16px;
  pointer-events: auto;
  border-radius: 14px;
}
.call-overlay.docked #call-avatar {
  width: 40px;
  height: 40px;
}
.call-overlay.docked #call-name {
  font-size: 16px;
  margin: 10px 0 6px;
}
.call-overlay.docked #call-state {
  font-size: 11px;
  margin: 4px;
}
.call-overlay.docked .call-timer {
  font-size: 11px;
  margin: 4px;
}
.call-overlay.docked .call-controls {
  gap: 6px;
  margin-top: 14px;
}
.call-overlay.docked .call-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.call-overlay.docked .remote-video {
  max-height: 160px;
}
.call-overlay.docked .local-video {
  width: 65px;
  bottom: 65px;
  right: 20px;
}
.voice-dock {
  position: fixed;
  bottom: 18px;
  left: 80px;
  width: 244px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg-solid);
  padding: 14px;
  box-shadow: var(--shadow);
  z-index: 35;
}
.voice-dock-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.voice-dock-title > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}
.voice-dock-title > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.voice-dock strong {
  font-size: 12px;
  font-weight: 550;
}
.voice-dock small {
  font-size: 10px;
  color: var(--text-dim);
}
.voice-dock-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}
.voice-dock .icon-btn {
  width: 34px;
  height: 34px;
}
.stage-note {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.7;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.stage-badge {
  font-size: 9px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 2px 5px;
  color: var(--text-dim);
}
/* Welcome / install */
.auth-view {
  background: var(--bg);
  padding: 40px 20px;
  overflow: auto;
}
.auth-view::before {
  display: none;
}
.auth-card {
  width: min(440px, 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-solid);
  padding: 36px;
  box-shadow: none;
  animation: none;
}
.brand {
  text-align: left;
  margin-bottom: 26px;
}
.brand-logo-wrap {
  display: block;
  margin-bottom: 22px;
}
.brand-logo {
  width: 34px;
  height: 34px;
  animation: none;
}
.brand h1 {
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.6px;
  margin: 0;
}
.brand .tagline {
  font-size: 12px;
  line-height: 1.8;
  margin: 8px 0 0;
}
.auth-choice {
  display: grid;
  gap: 10px;
  margin: 26px 0;
}
.auth-choice h2 {
  font-size: 22px;
  font-weight: 550;
  letter-spacing: -0.6px;
  margin: 0;
}
.auth-choice p {
  font-size: 12px;
  line-height: 1.8;
  margin: 0 0 10px;
}
.auth-choice .btn {
  width: 100%;
  min-height: 44px;
}
.auth-tabs {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 4px;
  gap: 2px;
  margin: 22px 0;
}
.auth-tab {
  font-size: 11px;
  font-weight: 500;
  background: none;
  min-height: 34px;
  border-radius: 6px;
  box-shadow: none;
}
.auth-tab.active {
  background: var(--bg-solid);
  color: var(--text);
  box-shadow: none;
}
.auth-card:has(.auth-choice:not([hidden])) .auth-tabs {
  background: none;
  border: 0;
  margin-bottom: 0;
}
.auth-form .field-label {
  font-size: 11px;
  color: var(--text-dim);
}
.field-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-input);
  padding: 0 12px;
}
.field-control .field-icon {
  color: var(--text-dim);
  opacity: 0.6;
}
.field-control input {
  border: 0;
  box-shadow: none;
  background: none;
  padding: 12px 10px;
  font-size: 13px;
  min-height: 43px;
}
.auth-form .btn {
  width: 100%;
  margin-top: 8px;
  min-height: 44px;
}
.reset-note {
  line-height: 1.8;
}
.install-nudge {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg-solid);
  box-shadow: var(--shadow);
  z-index: 35;
  max-width: calc(100vw - 24px);
  width: max-content;
}
.install-nudge span {
  font-size: 11px;
  color: var(--text-dim);
}
.install-instructions p {
  font-size: 12px;
  line-height: 1.9;
}
.switcher-search {
  margin: 0 0 14px !important;
}
.switcher-results {
  max-height: 50dvh;
  overflow: auto;
}
.switcher-result {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: none;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.switcher-result.active {
  border-color: var(--border);
  background: var(--bg-hover);
}
.switcher-result strong {
  font-size: 12px;
  font-weight: 550;
}
.switcher-result small {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-dim);
}
@media (min-width: 1280px) {
  .main-view:has(.member-panel:not([hidden])) {
    grid-template-columns: 64px var(--sidebar-w) minmax(0, 1fr) 216px;
  }
}
@media (max-width: 1279px) {
  .member-panel {
    display: none;
  }
}
@media (max-width: 1020px) {
  :root {
    --sidebar-w: 244px;
  }
  .chat-placeholder {
    padding: 28px;
  }
  .welcome-grid {
    gap: 12px;
  }
  .welcome-grid > div {
    padding: 18px;
  }
  .welcome-live {
    display: none;
  }
  .messages-scroll {
    padding: 18px 22px;
  }
  .settings-shell {
    gap: 28px;
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .settings-rail {
    padding-right: 16px;
  }
}
@media (max-width: 760px) {
  .main-view {
    grid-template-columns: 56px minmax(0, 1fr);
    height: var(--app-height, 100dvh);
    padding-top: env(safe-area-inset-top);
  }
  .workspace-rail {
    padding: 14px 6px 12px;
    gap: 10px;
  }
  .rail-brand {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
  }
  .server-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }
  .server-mark.active::before {
    left: -7px;
  }
  .sidebar {
    position: relative;
    width: auto;
    max-width: none;
    border-radius: 0;
    transform: none;
  }
  .workspace-heading {
    padding: 20px 18px 12px;
  }
  .sidebar-header {
    padding: 8px 14px 16px;
  }
  .sidebar-header h2 {
    font-size: 21px;
  }
  .chat-panel {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: var(--app-height, 100dvh);
    background: var(--bg);
    z-index: 10;
    transform: none;
  }
  .chat-panel.open {
    display: flex;
    transform: none !important;
  }
  .chat-header {
    min-height: 64px;
    padding: 10px 10px;
    padding-top: max(10px, env(safe-area-inset-top));
    gap: 8px;
  }
  .chat-actions {
    gap: 0;
  }
  .chat-actions .icon-btn {
    width: 32px;
    height: 36px;
  }
  .peer-meta strong {
    font-size: 13px;
  }
  .peer-meta span {
    font-size: 10px;
  }
  .channel-header-icon {
    width: 28px;
    height: 28px;
  }
  .messages-scroll {
    padding: 14px 16px;
  }
  .message-avatar {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
  .msg-row {
    gap: 10px;
    padding: 10px 0;
  }
  .msg-row .bubble {
    font-size: 13px;
    max-width: calc(100% - 64px);
  }
  .msg-row.message-grouped {
    padding: 2px 0 2px 40px;
  }
  .msg-row.message-grouped .bubble {
    max-width: calc(100% - 24px);
  }
  .message-more {
    opacity: 0.5;
    width: 24px;
    height: 24px;
    right: -29px;
    top: 0;
    background: none;
  }
  .message-activity {
    padding-left: 16px;
  }
  .composer {
    margin: 0 10px max(10px, env(safe-area-inset-bottom));
    padding: 8px;
  }
  .composer-row {
    gap: 1px;
  }
  .composer-row .icon-btn {
    flex-basis: 31px;
    width: 31px;
    height: 36px;
  }
  .composer-row textarea {
    font-size: 14px;
    padding: 8px 4px;
    min-height: 36px;
  }
  .composer-row .icon-btn svg {
    width: 17px;
    height: 17px;
  }
  .typing-indicator {
    padding-left: 20px;
    font-size: 10px;
  }
  .audio-player {
    width: 100%;
    gap: 5px;
    padding: 9px;
  }
  .audio-play {
    width: 30px;
    height: 30px;
  }
  .audio-time {
    font-size: 8px;
  }
  .recording-wave {
    width: 60px;
  }
  .recording-bar {
    gap: 6px;
  }
  .modal {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 28px);
    border-radius: 12px;
  }
  .modal > header {
    padding: 14px 16px;
  }
  .modal > header h3 {
    font-size: 13px;
  }
  #modal-body {
    padding: 18px;
  }
  .modal.is-settings,
  .modal.is-server-settings {
    height: var(--app-height, 100dvh);
    width: 100%;
    padding: 18px 14px max(12px, env(safe-area-inset-bottom));
  }
  .modal.is-settings > header,
  .modal.is-server-settings > header {
    padding: 0 0 14px;
  }
  .modal.is-settings #modal-body,
  .modal.is-server-settings #modal-body {
    padding-top: 16px;
  }
  .settings-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 0;
    height: 100%;
  }
  .settings-rail {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 4px;
    padding: 0 0 10px;
    border: 0;
    flex-shrink: 0;
    width: 100%;
  }
  .settings-tab {
    flex-shrink: 0;
    width: auto;
    min-height: 36px;
    padding: 9px 12px;
    white-space: nowrap;
    font-size: 11px;
  }
  .settings-tab svg,
  .settings-rail-footer {
    display: none;
  }
  .settings-panels {
    padding: 0 2px 48px;
    min-height: 0;
    flex: 1;
  }
  .settings-panel h4 {
    font-size: 16px;
  }
  .setting-row {
    gap: 14px;
  }
  .setting-label .small {
    font-size: 10px;
    max-width: 220px;
  }
  .setting-row select {
    min-width: 125px;
    font-size: 11px;
    max-width: 48%;
    padding: 9px 8px;
  }
  .setting-row .avatar.large {
    width: 60px;
    height: 60px;
  }
  .community-tabs {
    flex-wrap: nowrap;
    overflow: auto;
    gap: 3px;
    padding-bottom: 12px;
  }
  .community-tabs .btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 11px;
  }
  .permission-row {
    gap: 12px;
  }
  .role-list-row .btn {
    padding: 7px 9px;
    font-size: 10px;
  }
  .call-overlay {
    padding: 12px;
  }
  .call-card {
    padding: 48px 16px 18px;
  }
  .call-overlay.docked {
    right: 10px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: min(320px, calc(100vw - 20px));
  }
  .call-overlay.docked .call-card {
    padding: 36px 12px 12px;
  }
  .call-overlay.docked #call-avatar {
    display: none;
  }
  .call-overlay.docked #call-name {
    font-size: 14px;
    margin-top: 5px;
  }
  .call-overlay.docked .remote-video {
    max-height: 120px;
  }
  .voice-dock {
    left: 64px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: calc(100vw - 76px);
    max-width: 300px;
  }
  .install-nudge {
    bottom: max(12px, env(safe-area-inset-bottom));
    gap: 7px;
  }
  .install-nudge span {
    font-size: 10px;
    max-width: 150px;
  }
  .install-nudge .btn {
    font-size: 10px;
    padding: 8px;
  }
  .profile-head {
    padding: 0 18px 18px;
  }
  .profile-actions .btn {
    font-size: 11px;
    padding: 8px 12px;
  }
  .auth-view {
    padding: 22px 14px;
  }
  .auth-card {
    padding: 28px 24px;
    border-radius: 14px;
  }
  .chat-placeholder {
    display: none;
  }
  .drawer {
    max-height: var(--app-height, 100dvh);
  }
}
[data-motion="off"] *,
[data-motion="off"] *::before,
[data-motion="off"] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
[data-high-contrast="true"] {
  --border: #ffffff35;
  --border-strong: #ffffff65;
  --text-dim: #c3c9ce;
}
[data-theme="light"][data-high-contrast="true"] {
  --border: #0005;
  --border-strong: #0008;
  --text-dim: #37443b;
}
/* Avoid inheriting the old component-sheet entrance transforms. */
.msg-row .bubble {
  animation: none !important;
  opacity: 1;
}
.chat-placeholder .welcome-lordicon {
  filter: grayscale(1) invert(0.85);
  opacity: 0.65;
}
.settings-tab.active {
  box-shadow: none;
}
.settings-panel .setting-row:has(> .avatar.large) {
  justify-content: flex-start;
  gap: 14px;
}
.settings-panel .setting-row > .avatar.large {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
}
.settings-panel .setting-row:has(> .avatar.large) .btn:last-of-type {
  margin-left: auto;
}
.profile-style-preview {
  font-weight: 550;
}

.message-author[data-name-style="mono"] {
  font-family: ui-monospace, monospace;
}
.message-author[data-name-style="serif"] {
  font-family: Georgia, serif;
}
