.drawer {
  width: 284px;
  flex: none;
  border-left: 1px solid var(--line);
  background: #201e21;
  display: flex;
  flex-direction: column;
  min-width: 0;
  z-index: 4;
}
.drawer[hidden],
.scrim[hidden] {
  display: none;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  height: 66px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.drawer-head h2 {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.drawer-body {
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.drawer-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.drawer-info {
  font-size: 12px;
  color: var(--muted);
  margin: 17px 15px 8px;
}
.member {
  width: 100%;
  padding: 8px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}
.member .avatar {
  width: 35px;
  height: 35px;
}
.member > span {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}
.member .dot {
  margin-right: 3px;
}
.drawer[hidden] + * {
  display: none;
}
.mini-call {
  padding: 10px 12px;
  background: #22252a;
  border-top: 1px solid #91b4a720;
}
.mini-call-head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mini-call-head > button:first-child {
  min-width: 0;
  flex: 1;
  text-align: left;
}
.mini-call-head strong {
  color: var(--brick-ice);
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}
.mini-call-head small {
  display: block;
  color: #c4bcbf;
  font-size: 11px;
  margin: 4px 0;
}
.mini-tools {
  display: flex;
  gap: 5px;
  margin-top: 7px;
}
.mini-tools button {
  flex: 1;
  background: #ffffff08;
  width: auto;
  height: 28px;
  color: #d4cacf;
}
.mini-tools button.selected {
  color: var(--brick-bright);
  background: #4b363e;
}
.mini-call .hangup,
.active-hang {
  color: #ff9fa7;
}
.muted-control {
  color: #edabb0;
}
.mobile-call {
  display: none;
}
.scrim {
  position: fixed;
  z-index: 9;
  inset: 0;
  border-radius: 0;
  background: #05050aac;
}
dialog {
  color: var(--ink);
  background: #282529;
  border: 1px solid #494246;
  border-radius: 16px;
  width: min(450px, calc(100% - 28px));
  max-height: min(82dvh, 750px);
  padding: 0;
  box-shadow: 0 18px 70px #0008;
  overflow: auto;
}
dialog::backdrop {
  background: #08070dbb;
}
dialog[open] {
  animation: dialog-in 160ms var(--ease);
}
@keyframes dialog-in {
  from {
    opacity: 0.4;
    transform: translateY(5px) scale(0.985);
  }
}
.dlg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 21px 12px;
}
.dlg-head h2 {
  font-size: 20px;
  letter-spacing: -0.025em;
}
.dlg-body {
  padding: 2px 22px 22px;
}
.dlg-body p {
  color: var(--soft);
  line-height: 1.7;
}
.field {
  display: grid;
  gap: 7px;
  margin: 14px 0;
}
.field span,
.setting-label {
  font-size: 12px;
  color: #d6ced1;
  font-weight: 650;
}
.field input,
.field select,
.searchfield,
.copy-field {
  width: 100%;
  color: var(--ink);
  border: 1px solid #4f464b;
  border-radius: 7px;
  background: #201e21;
  min-height: 39px;
  padding: 8px 10px;
}
.field small,
.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.dlg-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 17px;
}
.searchwrap {
  position: relative;
  display: flex;
  align-items: center;
}
.searchwrap > .icon {
  position: absolute;
  left: 11px;
  color: var(--muted);
}
.searchfield {
  padding-left: 37px;
}
.resultlist {
  margin-top: 10px;
  display: grid;
  gap: 3px;
  max-height: 48dvh;
  overflow: auto;
}
.result {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  text-align: left;
  padding: 10px;
}
.result .icon {
  color: var(--accent);
}
.result small {
  margin-left: auto;
  color: var(--muted);
}
.form-error {
  color: #ffabb5;
  font-size: 12px;
  line-height: 1.6;
}
.setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.setting-row input[type='range'] {
  width: 52%;
  accent-color: var(--brick-base);
}
.setting-row input[type='checkbox'] {
  accent-color: var(--brick-base);
  width: 18px;
  height: 18px;
}
.setting-tabs {
  display: flex;
  gap: 3px;
  background: #201c1f;
  padding: 3px;
  border-radius: 8px;
  margin: 4px 0 15px;
}
.setting-tabs button {
  flex: 1;
  padding: 7px;
  color: var(--soft);
  font-size: 12px;
}
.setting-tabs button.on {
  background: #453a3e;
  color: white;
}
.self-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
}
.self-preview .avatar {
  width: 50px;
  height: 50px;
}
.self-preview strong {
  font-size: 16px;
}
.self-preview small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.copy-field {
  margin: 14px 0 0;
  user-select: all;
}
.invite-context {
  display: flex;
  align-items: center;
  gap: 13px;
}
.invite-icon {
  background: #493138;
  color: var(--brick-bright);
  padding: 12px;
  border-radius: 12px;
}
.invite-context strong {
  font-size: 16px;
}
.invite-context p {
  font-size: 12px;
}
.guide-list {
  margin: 0;
  padding-left: 19px;
  line-height: 1.85;
  color: var(--soft);
}
.guide-list li + li {
  margin-top: 9px;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  transform: translate(-50%, 8px);
  border-radius: 10px;
  background: #3a3237;
  border: 1px solid #554b50;
  box-shadow: 0 6px 22px #0006;
  color: white;
  max-width: min(480px, 90vw);
  padding: 10px 15px;
  font-size: 13px;
  line-height: 1.55;
  pointer-events: none;
  z-index: 120;
  opacity: 0;
  transition:
    opacity 0.15s,
    transform 0.18s var(--ease);
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.badge-unread {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.disconnected {
  color: #e1b17e;
  font-size: 12px;
}
@media (min-width: 1550px) {
  .sidebar {
    width: 245px;
  }
  .hero {
    min-height: 285px;
  }
  .home {
    padding-top: 32px;
  }
  .section {
    margin-top: 32px;
  }
}
@media (max-width: 1180px) {
  .rail {
    width: 60px;
  }
  .server-logo:before {
    left: -8px;
  }
  .sidebar {
    width: 199px;
  }
  .home {
    padding: 22px;
  }
  .topbar {
    padding: 0 20px;
  }
  .hero {
    min-height: 214px;
  }
  .drawer {
    position: fixed;
    right: 0;
    top: 66px;
    bottom: 0;
    box-shadow: -12px 0 30px #0005;
    width: min(355px, 93vw);
  }
  .drawer-head {
    height: 49px;
  }
}
@media (max-width: 940px) {
  .sidebar {
    width: 186px;
  }
  .rail {
    width: 54px;
    padding-inline: 4px;
  }
  .rail-round,
  .server-logo {
    width: 39px;
    height: 39px;
  }
  .server-logo:before {
    left: -7px;
  }
  .home {
    padding: 18px;
  }
  .hero-copy {
    padding: 25px;
  }
  .textrow .topic {
    margin-left: auto;
    max-width: 47%;
  }
  .textrow > .icon {
    margin-left: 0;
  }
  .textrow {
    gap: 9px;
  }
  .topbar {
    gap: 7px;
  }
  .sidebar .navitem {
    padding-left: 9px;
  }
}
@media (max-width: 760px) {
  .rail,
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    transition: transform 0.18s var(--ease);
    transform: translateX(-110vw);
    visibility: hidden;
  }
  .rail {
    left: 0;
    width: 57px;
  }
  .sidebar {
    left: 57px;
    width: 215px;
  }
  .nav-open .sidebar,
  .nav-open .rail {
    transform: translateX(0);
    visibility: visible;
  }
  .mobile-menu {
    display: inline-grid;
  }
  .topbar {
    padding: 0 12px;
    gap: 7px;
    min-height: 55px;
  }
  .top-location {
    font-size: 14px;
  }
  .top-location > .icon {
    display: none;
  }
  .topbar .toolbar-sep {
    display: none;
  }
  .search-trigger {
    border: 0;
    background: transparent;
    width: 32px;
    justify-content: center;
  }
  .search-trigger span,
  .search-trigger kbd {
    display: none;
  }
  .home {
    padding: 15px 15px 24px;
  }
  .hero {
    border-radius: 12px;
    min-height: 204px;
    background-position: 57% center;
  }
  .hero-copy {
    padding: 24px;
  }
  .hero h1 {
    font-size: 34px;
  }
  .hero p {
    max-width: 22em;
    font-size: 13px;
  }
  .section {
    margin-top: 24px;
  }
  .section-head h2 {
    font-size: 18px;
  }
  .drawer {
    top: 55px;
    max-width: 100vw;
  }
  .mobile-call {
    display: inline-flex;
    color: var(--green);
    align-items: center;
    gap: 4px;
  }
  .nav-open .mobile-call {
    display: none;
  }
  .topbar .iconbtn {
    width: 32px;
  }
  .community {
    height: 66px;
  }
}
@media (max-width: 530px) {
  .hero:before {
    background: linear-gradient(90deg, #170e2bd9 2%, #20142c98 48%, #150e1f1a);
  }
  .hero {
    min-height: 204px;
  }
  .hero-copy {
    padding: 20px;
    max-width: 78%;
  }
  .hero h1 {
    font-size: 31px;
  }
  .hero p {
    line-height: 1.55;
    max-width: 16em;
  }
  .hero-actions {
    gap: 9px;
    margin-top: 16px;
  }
  .hero-status {
    font-size: 10px;
  }
  .white-btn {
    font-size: 12px;
    padding: 7px 10px;
    min-height: 34px;
  }
  .section {
    margin-top: 20px;
  }
  .textrow {
    min-height: 56px;
    display: grid;
    grid-template-columns: 32px 1fr 14px;
    grid-template-rows: 1fr 1fr;
    gap: 1px 9px;
    padding: 9px 12px;
  }
  .textrow .hashtag-box {
    grid-row: 1/3;
  }
  .textrow strong {
    grid-column: 2;
    grid-row: 1;
  }
  .textrow .topic {
    grid-row: 2;
    grid-column: 2;
    max-width: 100%;
    margin: 0;
  }
  .textrow > .icon {
    grid-row: 1/3;
    grid-column: 3;
  }
  .drawer {
    top: 0;
    width: min(390px, 100vw);
    z-index: 15;
  }
  .drawer-head {
    height: 55px;
  }
  .top-location {
    gap: 5px;
  }
  .head-action {
    font-size: 12px;
  }
  .topbar .disconnected {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
html[data-motion='off'] *,
html[data-motion='off'] *:before,
html[data-motion='off'] *:after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
