:root {
  color-scheme: dark;
  --bg: #1b1d27;
  --panel: #15171f;
  --rail: #101117;
  --hover: #262936;
  --border: #2b2e3c;
  --text: #eeeff7;
  --muted: #989fb5;
  --accent: #9a96ff;
  --button: #7974ed;
  --green: #67d7b5;
  --danger: #ff8b9a;
  --radius: 12px;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 0;
  color: inherit;
  background: var(--hover);
  border-radius: 8px;
  padding: 10px 13px;
  font-weight: 550;
  transition:
    background 0.15s,
    color 0.15s;
}
button:hover {
  background: color-mix(in srgb, var(--hover) 75%, white);
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input,
textarea,
select {
  color: var(--text);
  background: var(--rail);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  outline: none;
  width: 100%;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
}
input[type="checkbox"] {
  width: auto;
  accent-color: var(--button);
}
textarea {
  resize: vertical;
  min-height: 50px;
}
label {
  display: grid;
  gap: 8px;
  font-weight: 550;
  font-size: 13px;
}
a {
  color: var(--accent);
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h2 {
  font-size: 25px;
  letter-spacing: -0.7px;
}
h3 {
  font-size: 16px;
}
p {
  line-height: 1.65;
}
small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.icon {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-button {
  padding: 9px;
  background: transparent;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.primary {
  background: var(--button);
  color: #fff;
  padding: 12px 18px;
}
.primary:hover {
  background: #8b85ff;
}
.wide {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.link {
  background: transparent !important;
  color: var(--accent);
  padding: 3px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.8px;
  color: var(--accent);
}
[hidden] {
  display: none !important;
}
.avatar {
  width: 39px;
  height: 39px;
  flex-shrink: 0;
  background: #474165;
  color: #e1dafa;
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  border-radius: 14px;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar.mint {
  background: #24554a;
  color: #b2eedc;
}
.badge {
  border: 1px solid var(--border);
  font-size: 8px;
  letter-spacing: 1px;
  padding: 4px 6px;
  border-radius: 5px;
  color: var(--muted);
}
.pill {
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--hover);
  font-size: 11px;
  color: var(--muted);
}
.error {
  color: var(--danger);
  min-height: 18px;
  font-size: 13px;
}
.empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  max-width: 530px;
  padding: 40px 16px;
}
.empty .empty-symbol {
  font-size: 34px;
  color: var(--accent);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--hover);
  margin-bottom: 23px;
}
.empty p {
  color: var(--muted);
}
/* Connexion */
.auth-page {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  max-width: 1240px;
  padding: 70px 55px;
  gap: 100px;
  margin: auto;
}
.auth-story {
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.7px;
  margin-bottom: 75px;
}
.brand:first-letter {
  color: var(--accent);
}
.auth-story h1 {
  font-size: clamp(40px, 4.8vw, 65px);
  letter-spacing: -2.8px;
  line-height: 1.1;
  margin: 20px 0;
}
.auth-story h1 span {
  color: var(--green);
}
.auth-story > p {
  color: var(--muted);
  max-width: 350px;
  font-size: 16px;
}
.auth-preview {
  margin: 30px 0;
  border: 1px solid #383946;
  border-radius: 16px;
  padding: 22px;
  background: linear-gradient(145deg, #292a3e, #1c202b);
  box-shadow: 0 24px 65px #08091344;
  transform: rotate(-2deg);
}
.preview-bubble {
  display: flex;
  gap: 13px;
  margin-bottom: 20px;
}
.preview-bubble strong {
  font-size: 13px;
}
.preview-bubble small {
  font-weight: 400;
  margin-left: 10px;
  font-size: 10px;
}
.preview-bubble p {
  margin: 6px 0 0;
  font-size: 13px;
}
.preview-voice {
  border-top: 1px solid #ffffff12;
  padding-top: 15px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--green);
  font-size: 12px;
}
.avatars {
  margin-left: auto;
  letter-spacing: 4px;
}
.auth-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 38px;
  border-radius: 20px;
  box-shadow: 0 20px 80px #0002;
}
.auth-card > p {
  color: var(--muted);
  font-size: 13px;
}
.auth-card form {
  display: grid;
  gap: 19px;
  margin-top: 28px;
}
.auth-card h2 {
  margin-bottom: 10px;
}
.auth-card > small {
  display: block;
  text-align: center;
  font-size: 11px;
}
.auth-switch {
  text-align: center;
  margin-top: 25px;
}
.server-access-form {
  margin-top: 22px !important;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.server-access-head {
  display: grid;
  gap: 6px;
}
.server-access-head strong {
  font-size: 16px;
}
.server-access-head small,
.server-access-note {
  color: var(--muted);
  line-height: 1.45;
}
.server-access-note {
  margin-top: -7px;
}
.password-field {
  display: flex;
  position: relative;
}
.password-field input {
  padding-right: 48px;
}
.password-field button {
  position: absolute;
  right: 5px;
  top: 5px;
  background: transparent;
}
.wordmark {
  display: none;
}
/* Structure */
#app {
  height: 100dvh;
  display: grid;
  grid-template-columns: 72px 248px minmax(0, 1fr);
  overflow: hidden;
}
.rail {
  background: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 10px 12px;
  gap: 12px;
  border-right: 1px solid #ffffff04;
}
.rail button {
  width: 46px;
  height: 46px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--panel);
  color: var(--muted);
  position: relative;
}
.rail button.active {
  background: var(--button);
  color: white;
  border-radius: 15px;
}
.rail button.active:before {
  content: "";
  position: absolute;
  left: -12px;
  height: 26px;
  width: 3px;
  border-radius: 4px;
  background: white;
}
.rail-logo {
  font-size: 31px;
  color: var(--accent);
  margin-bottom: 12px;
}
.rail-divider {
  width: 27px;
  height: 1px;
  background: var(--border);
}
.rail-grow {
  flex: 1;
}
.server-icon {
  font-size: 12px;
  font-weight: 800;
}
.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
}
.sidebar > header {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar > header strong {
  font-size: 17px;
}
.sidebar-scroll {
  overflow: auto;
  flex: 1;
  padding: 19px 12px;
}
.search-button {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  font-size: 11px;
  color: var(--muted);
  padding: 10px;
  background: var(--rail);
  margin-bottom: 24px;
}
.search-button .icon {
  width: 15px;
  height: 15px;
}
.nav-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 25px 8px 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  margin-bottom: 3px;
  text-align: left;
  font-size: 13px;
  min-width: 0;
}
.nav-item > span:not(.avatar) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-item .hash {
  font-size: 21px;
  width: 17px;
  opacity: 0.7;
}
.nav-item.active {
  background: #8580ed23;
  color: #c7c4ff;
}
.nav-item .avatar {
  width: 35px;
  height: 35px;
  border-radius: 12px;
  font-size: 12px;
}
.nav-item .dm-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.nav-item .dm-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}
.nav-item .unread {
  background: var(--button);
  color: white;
  margin-left: auto;
  border-radius: 10px;
  min-width: 19px;
  text-align: center;
  font-size: 10px;
}
.self-card {
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: var(--rail);
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 15px 12px;
  text-align: left;
}
.self-card > span:nth-child(2) {
  flex: 1;
  display: grid;
  gap: 3px;
  min-width: 0;
}
.self-card strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.self-card small {
  font-size: 10px;
}
.self-card .icon {
  width: 17px;
  color: var(--muted);
}
#voice-panel {
  background: #20443b55;
  padding: 14px;
  color: var(--green);
  font-size: 12px;
}
.voice-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.voice-actions button {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 8px;
}
#main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 76px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 26px;
}
.view-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
  flex: 1;
}
.view-heading > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.view-heading strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}
.view-heading small {
  font-size: 11px;
}
.view-heading > #view-symbol {
  font-size: 27px;
  color: var(--muted);
}
.connection {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.connection.online:before {
  content: "●";
  color: var(--green);
  font-size: 9px;
  margin-right: 6px;
}
#workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  position: relative;
}
#conversation {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 24px 13px;
  position: relative;
}
#message-list {
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  margin: 0 -24px;
  padding: 26px 24px 15px;
  scrollbar-gutter: stable;
}
.message {
  display: flex;
  gap: 14px;
  padding: 9px 12px;
  margin: 0 -12px;
  border-radius: 8px;
  position: relative;
  content-visibility: auto;
  contain-intrinsic-size: auto 72px;
}
.message:hover {
  background: #ffffff03;
}
.message-body {
  flex: 1;
  min-width: 0;
}
.message-heading {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin: 0 0 5px;
}
.message-heading button {
  background: transparent;
  padding: 0;
  font-size: 13px;
  font-weight: 650;
}
.message-heading time {
  color: var(--muted);
  font-size: 10px;
}
.message-content {
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message.system {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  padding: 8px 0;
  margin: 8px 0;
  opacity: 0.8;
}
.message-actions {
  display: none;
  position: absolute;
  right: 8px;
  top: -14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
  padding: 2px;
}
.message:hover .message-actions,
.message:focus-within .message-actions {
  display: flex;
}
.message-actions button {
  padding: 5px 8px;
  background: transparent;
  font-size: 11px;
}
.day-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  font-size: 10px;
  color: var(--muted);
}
.day-divider:before,
.day-divider:after {
  content: "";
  height: 1px;
  background: var(--border);
  flex: 1;
}
.message.grouped {
  padding-top: 3px;
}
.message.grouped > .avatar {
  visibility: hidden;
  height: 0;
}
.message.grouped .message-heading {
  display: none;
}
.reply-quote {
  border-left: 2px solid var(--accent);
  padding-left: 10px;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.attachment {
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: 380px;
  margin-top: 10px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
}
.attachment small {
  display: block;
}
.attachment-image {
  display: block;
  max-width: min(100%, 400px);
  max-height: 300px;
  border-radius: 10px;
  margin-top: 10px;
  object-fit: contain;
}
.custom-emoji {
  width: 24px;
  height: 24px;
  object-fit: contain;
  vertical-align: middle;
}
.reaction-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.reaction-chips:empty {
  display: none;
}
.reaction-chips button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  font-size: 12px;
  background: var(--panel);
}
.reaction-chips button.selected {
  border-color: var(--accent);
  background: #7974ed22;
}
.reaction-chips .custom-emoji {
  width: 18px;
  height: 18px;
}
.members {
  width: 228px;
  flex-shrink: 0;
  background: var(--panel);
  padding: 25px 16px;
  border-left: 1px solid var(--border);
  overflow: auto;
}
.members h3 {
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.person {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 8px;
  padding: 9px 5px;
  width: 100%;
  background: transparent;
  text-align: left;
}
.person div {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.person strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.person small {
  font-size: 10px;
}
.online-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  margin-left: auto;
}
.profile-banner {
  height: 85px;
  border-radius: 12px;
  background: linear-gradient(125deg, #65609c, #314556);
  margin-bottom: -25px;
}
.profile-card > .avatar {
  width: 60px;
  height: 60px;
  border: 5px solid var(--panel);
  margin: 0 0 12px 8px;
  border-radius: 21px;
}
.profile-card h2 {
  font-size: 19px;
  margin-bottom: 7px;
}
.profile-card p {
  color: var(--muted);
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.profile-card .primary {
  width: 100%;
  font-size: 12px;
}
.profile-divider {
  border-top: 1px solid var(--border);
  margin: 20px 0;
}
#composer {
  background: var(--hover);
  border: 1px solid #ffffff05;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
}
#message-input {
  resize: none;
  max-height: 140px;
  min-height: 30px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 8px 3px;
  font-size: 14px;
  line-height: 1.45;
}
#composer label {
  cursor: pointer;
}
#composer .send-button {
  width: 37px;
  height: 37px;
  flex-shrink: 0;
  padding: 9px;
  background: var(--button);
  border-radius: 9px;
}
.composer-hint {
  font-size: 9px;
  margin: 7px 12px 0;
  color: var(--muted);
}
#typing {
  height: 24px;
  font-size: 10px;
  color: var(--muted);
  padding: 5px 11px;
}
#reply-preview,
#attachment-preview {
  padding: 10px;
  background: var(--panel);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
#reply-preview button,
#attachment-preview button {
  margin-left: auto;
  padding: 3px 8px;
}
.floating-pill {
  position: absolute;
  bottom: 115px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--button);
  font-size: 12px;
  box-shadow: 0 6px 25px #0005;
}
.welcome-card {
  margin: 25px 0 10px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(120deg, #8580ed12, transparent);
}
.welcome-card h2 {
  font-size: 26px;
  margin-bottom: 8px;
}
.welcome-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.welcome-card .eyebrow {
  display: block;
  margin-bottom: 16px;
}
#page {
  flex: 1;
  min-width: 0;
  overflow: auto;
  padding: 35px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.page-heading p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 0;
}
.page-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}
.feature-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 24px;
  text-align: left;
}
.feature-card .feature-icon {
  font-size: 30px;
  margin-bottom: 28px;
  display: block;
}
.feature-card h3 {
  font-size: 18px;
}
.feature-card p {
  font-size: 12px;
  color: var(--muted);
}
.file-row,
.friend-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-bottom: 1px solid var(--border);
}
.file-row > div,
.friend-row > div {
  flex: 1;
  min-width: 0;
}
.file-row strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.friend-row strong {
  display: block;
}
.section-note {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  color: var(--muted);
  font-size: 12px;
  margin: 25px 0;
}
/* Fenêtres et préférences */
dialog {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  width: min(480px, calc(100% - 24px));
  max-height: calc(100dvh - 30px);
  box-shadow: 0 40px 160px #0009;
}
dialog::backdrop {
  background: #080910ac;
  backdrop-filter: blur(5px);
}
dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 25px;
  gap: 16px;
}
dialog header h2 {
  margin: 5px 0 0;
}
dialog form {
  display: grid;
  gap: 20px;
}
dialog header button {
  margin: -5px -8px 0 0;
}
.settings-dialog {
  width: min(760px, calc(100% - 24px));
}
#settings-tabs {
  display: flex;
  gap: 5px;
  overflow: auto;
  border-bottom: 1px solid var(--border);
  padding-bottom: 15px;
  margin-bottom: 26px;
}
#settings-tabs button {
  white-space: nowrap;
  font-size: 12px;
  background: transparent;
  color: var(--muted);
}
#settings-tabs button.active {
  color: var(--accent);
  background: var(--hover);
}
#settings-content {
  min-height: 290px;
}
#settings-content > p {
  color: var(--muted);
  font-size: 13px;
}
.setting-section {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.setting-section:last-child {
  border: 0;
}
.setting-section h3 {
  margin-bottom: 7px;
}
.setting-section p {
  color: var(--muted);
  font-size: 12px;
}
.setting-row {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  align-items: center;
  margin: 20px 0;
}
.setting-row label {
  display: block;
}
.setting-row select {
  width: 170px;
}
.setting-row small {
  display: block;
  font-weight: 400;
  margin-top: 5px;
}
.danger {
  color: var(--danger);
}
.plus-hero {
  background: linear-gradient(120deg, #5e4f8844, #21524844);
  padding: 23px;
  border-radius: 13px;
  border: 1px solid #8d80b344;
  margin-bottom: 24px;
}
.plus-hero h3 {
  font-size: 21px;
}
.plus-hero p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.emoji-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.emoji-item {
  text-align: center;
}
.emoji-item img {
  width: 35px;
  height: 35px;
  object-fit: contain;
}
.emoji-item small {
  display: block;
}
#emoji-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
#emoji-grid button {
  font-size: 24px;
  background: transparent;
  padding: 8px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--hover);
  color: var(--text);
  z-index: 20;
  box-shadow: 0 10px 40px #0005;
  font-size: 13px;
  width: max-content;
  max-width: calc(100% - 30px);
}
.mobile-only,
.mobile-nav {
  display: none;
}
body.compact .message {
  padding-top: 4px;
  padding-bottom: 4px;
}
body.compact .message-content {
  font-size: 13px;
}
body.light {
  color-scheme: light;
  --bg: #fafaff;
  --panel: #f0f0f7;
  --rail: #e8e8f0;
  --hover: #e3e3ef;
  --border: #d7d7e5;
  --text: #242638;
  --muted: #666b82;
  --accent: #5a50c9;
  --green: #207e68;
}
body.light .auth-preview {
  background: #eeeefa;
}
body.reduce-motion * {
  scroll-behavior: auto !important;
}
body.reduce-motion *,
body.reduce-motion *:before {
  animation: none !important;
  transition: none !important;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 6px;
}
@media (min-width: 1500px) {
  #app {
    grid-template-columns: 76px 270px minmax(0, 1fr);
  }
  .members {
    width: 260px;
  }
  #conversation {
    padding-inline: 34px;
  }
  #message-list {
    margin-inline: -34px;
    padding-inline: 34px;
  }
}
@media (max-width: 1120px) {
  .members {
    display: none;
  }
  .members.open {
    display: block;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 4;
    box-shadow: -15px 0 45px #0003;
  }
  .view-heading small {
    display: none;
  }
  .topbar {
    padding: 0 20px;
  }
  .auth-page {
    gap: 45px;
    padding: 40px;
  }
  .auth-card {
    padding: 28px;
  }
}
@media (max-width: 760px) {
  .auth-page {
    display: block;
    padding: 28px 20px;
    min-height: 100dvh;
  }
  .auth-story {
    display: none;
  }
  .auth-card {
    max-width: 430px;
    margin: 8vh auto;
    background: transparent;
    border: 0;
    padding: 10px;
    box-shadow: none;
  }
  .wordmark {
    display: block;
    color: var(--accent);
    font-size: 23px;
    font-weight: 750;
    margin-bottom: 38px;
  }
  #app {
    display: flex;
    flex-direction: column;
    height: 100dvh;
  }
  .rail {
    display: none;
  }
  .sidebar {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    bottom: calc(60px + env(safe-area-inset-bottom));
    width: min(300px, 85vw);
    z-index: 9;
    box-shadow: 20px 0 70px #0005;
  }
  .sidebar.open {
    display: flex;
  }
  .drawer-shade {
    position: fixed;
    inset: 0;
    z-index: 8;
    background: #08091099;
    border-radius: 0;
  }
  .mobile-only {
    display: grid;
  }
  .mobile-nav {
    display: flex;
    flex-shrink: 0;
    justify-content: space-around;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: var(--rail);
    border-top: 1px solid var(--border);
    min-height: 60px;
    z-index: 10;
  }
  .mobile-nav button {
    background: transparent;
    color: var(--muted);
    padding: 10px 16px;
  }
  .mobile-nav button.active {
    background: #8580ed23;
    color: var(--accent);
  }
  #main {
    flex: 1;
    min-height: 0;
  }
  .topbar {
    height: 62px;
    gap: 8px;
    padding: 0 10px;
  }
  .view-heading {
    gap: 8px;
  }
  .view-heading strong {
    font-size: 14px;
  }
  .view-heading > #view-symbol {
    font-size: 22px;
  }
  .connection {
    font-size: 0;
  }
  .connection.online:before {
    font-size: 8px;
  }
  .topbar > .icon-button {
    padding: 8px;
  }
  #conversation {
    padding: 0 12px 9px;
  }
  #message-list {
    margin: 0 -12px;
    padding: 15px 12px;
  }
  .message {
    gap: 10px;
    margin: 0;
    padding: 10px 0;
  }
  .message .avatar {
    width: 33px;
    height: 33px;
    border-radius: 12px;
  }
  .message-content {
    font-size: 14px;
  }
  .message-actions {
    position: static;
    display: flex !important;
    align-self: start;
    background: transparent;
    border: 0;
    padding: 0;
  }
  .message-actions button {
    font-size: 0;
    padding: 3px;
  }
  .message-actions button:first-child {
    font-size: 15px;
  }
  .message-actions button:not(:first-child) {
    display: none;
  }
  .composer-hint {
    display: none;
  }
  #composer {
    padding: 5px;
    gap: 2px;
  }
  #composer .icon-button {
    padding: 8px;
  }
  #message-input {
    font-size: 16px;
    padding: 7px 3px;
  }
  .welcome-card {
    padding: 20px;
    margin-top: 8px;
  }
  .welcome-card h2 {
    font-size: 22px;
  }
  .members.open {
    width: 260px;
  }
  #page {
    padding: 24px 17px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h2 {
    font-size: 23px;
  }
  .page-cards {
    grid-template-columns: 1fr;
  }
  .feature-card {
    padding: 20px;
  }
  .feature-card .feature-icon {
    margin-bottom: 15px;
  }
  dialog {
    padding: 20px;
  }
  .settings-dialog {
    max-height: calc(100dvh - 24px);
  }
  #settings-tabs {
    margin-inline: -5px;
    gap: 0;
  }
  #settings-tabs button {
    padding: 9px;
  }
  .setting-row {
    gap: 12px;
  }
  .setting-row select {
    width: 130px;
  }
  .setting-row input {
    font-size: 16px;
  }
  #toast {
    bottom: 85px;
  }
  .empty {
    padding: 25px 5px;
  }
  input {
    font-size: 16px;
  }
  .file-row {
    gap: 10px;
    padding: 15px 0;
  }
  .friend-row {
    flex-wrap: wrap;
    padding: 15px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
