:root {
  color-scheme: dark;
  --bg: #111214;
  --rail: #15161a;
  --panel: #1f2026;
  --panel-2: #262831;
  --panel-3: #30323c;
  --chat: #191b20;
  --text: #f4f5fb;
  --muted: #a9adbb;
  --soft: #7d8292;
  --brand: #5865f2;
  --brand-2: #22c7a9;
  --danger: #ed5f73;
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.is-hidden {
  display: none !important;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 430px);
  align-items: center;
  gap: 44px;
  padding: clamp(24px, 6vw, 72px);
  background:
    radial-gradient(circle at 22% 12%, rgba(88, 101, 242, 0.34), transparent 28%),
    radial-gradient(circle at 86% 78%, rgba(34, 199, 169, 0.22), transparent 24%),
    var(--bg);
}

.auth-brand {
  max-width: 660px;
}

.auth-logo {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--brand), #8a5cf6 55%, var(--brand-2));
  font-size: 38px;
  font-weight: 900;
  box-shadow: 0 20px 50px rgba(88, 101, 242, 0.35);
}

.auth-brand p {
  margin: 24px 0 8px;
  color: #bfc6ff;
  font-weight: 900;
}

.auth-brand h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 0.95;
  max-width: 12ch;
}

.auth-brand span {
  color: var(--muted);
  font-size: 18px;
}

.auth-card {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(31, 32, 38, 0.94);
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin: 0 0 4px;
}

.auth-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 750;
}

.auth-card input {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
}

.auth-submit {
  height: 44px;
  border-radius: 8px;
  font-weight: 850;
}

.link-button {
  height: 36px;
  background: transparent;
  color: #bfc6ff;
  font-weight: 750;
}

.auth-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}

.admin-dashboard {
  min-height: 100vh;
  padding: 24px;
  background: var(--bg);
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto 16px;
}

.admin-topbar p {
  margin: 0 0 4px;
  color: #bfc6ff;
  font-weight: 900;
}

.admin-topbar h1 {
  margin: 0;
}

.admin-actions {
  display: flex;
  gap: 8px;
}

.admin-actions button,
.admin-row button {
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--panel-2);
  font-weight: 800;
}

.admin-actions button:first-child {
  background: var(--brand);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 1440px;
  margin: 0 auto 12px;
}

.admin-stats article,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.admin-stats article {
  padding: 16px;
}

.admin-stats strong {
  display: block;
  font-size: 30px;
}

.admin-stats span,
.admin-meta {
  color: var(--muted);
  font-size: 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 1440px;
  margin: 0 auto;
}

.admin-panel {
  padding: 14px;
  min-height: 280px;
}

.admin-wide {
  grid-column: 1 / -1;
}

.admin-list,
.admin-message-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.admin-row,
.admin-message-card {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.admin-row header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.admin-row strong {
  display: block;
}

.admin-row code {
  color: var(--muted);
  font-size: 11px;
}

.admin-row .danger {
  background: rgba(237, 95, 115, 0.16);
  color: #ffb6c0;
}

.admin-row .soft {
  color: var(--muted);
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.admin-message-card p {
  margin: 5px 0 0;
  color: #dce0ea;
  line-height: 1.45;
  white-space: pre-wrap;
}

svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.app-shell {
  display: grid;
  grid-template-columns: 72px 272px minmax(0, 1fr) 260px;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
}

.server-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  background: var(--rail);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.home-pill,
.server-button,
.rail-action {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--panel-2);
  position: relative;
  transition: 160ms ease;
}

.home-pill span,
.server-button span {
  font-weight: 850;
}

.home-pill {
  background: linear-gradient(135deg, var(--brand), #8a5cf6 55%, var(--brand-2));
  box-shadow: 0 12px 30px rgba(88, 101, 242, 0.28);
}

.server-button:hover,
.server-button.active,
.rail-action:hover {
  border-radius: 14px;
  background: var(--brand);
}

.server-button.active::before {
  content: "";
  position: absolute;
  left: -12px;
  width: 4px;
  height: 34px;
  border-radius: 0 4px 4px 0;
  background: #fff;
}

.rail-separator {
  width: 32px;
  height: 2px;
  background: var(--panel-3);
  border-radius: 99px;
}

.server-list {
  display: grid;
  gap: 10px;
}

.rail-action {
  margin-top: auto;
  color: var(--brand-2);
  font-size: 30px;
  background: var(--panel);
}

.channel-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: var(--panel);
  border-right: 1px solid var(--line);
}

.server-header {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.server-header h1 {
  margin: 1px 0 0;
  max-width: 165px;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.icon-button:hover {
  background: var(--panel-2);
  color: var(--text);
}

.ai-button {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.9), rgba(34, 199, 169, 0.8));
  color: #fff;
  font-weight: 850;
}

.ai-button:hover {
  filter: brightness(1.08);
}

.quick-card {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.18), rgba(34, 199, 169, 0.12));
}

.quick-card small,
.user-card small,
.voice-channel small,
.member-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.voice-orb {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(34, 199, 169, 0.18);
}

.voice-orb span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 0 8px rgba(34, 199, 169, 0.11);
}

.compact-button {
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  background: rgba(34, 199, 169, 0.18);
  color: #bcfff3;
  font-weight: 750;
}

.channel-section {
  padding: 6px 10px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.section-title button {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
}

.section-title button:hover {
  background: var(--panel-2);
  color: var(--text);
}

.channel-list {
  display: grid;
  gap: 3px;
}

.channel-button,
.voice-channel {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.channel-button span {
  color: var(--soft);
  font-size: 20px;
  font-weight: 500;
}

.channel-button:hover,
.channel-button.active,
.voice-channel:hover,
.voice-channel.active {
  background: var(--panel-2);
  color: var(--text);
}

.unread-dot {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(237, 95, 115, 0.12);
}

.speaker-icon {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-left: 0;
  border-radius: 4px 9px 9px 4px;
}

.voice-channel small {
  margin-left: auto;
}

.voice-channel.active {
  outline: 1px solid rgba(34, 199, 169, 0.35);
}

.user-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--panel-3);
  color: #fff;
  font-weight: 850;
}

.user-avatar {
  background: linear-gradient(135deg, #22c7a9, #5865f2);
}

.user-actions {
  display: flex;
  gap: 4px;
}

.user-actions button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.user-actions button:hover {
  background: var(--panel-2);
  color: var(--text);
}

.user-actions button.active {
  background: rgba(34, 199, 169, 0.18);
  color: var(--brand-2);
}

.chat-panel {
  display: grid;
  grid-template-rows: 74px auto minmax(0, 1fr) auto;
  min-width: 0;
  background: var(--chat);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.channel-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 18px;
}

.channel-heading span {
  color: var(--soft);
  font-size: 28px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box {
  width: min(280px, 36vw);
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--muted);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.hero-strip {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 18px 0;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 82% 12%, rgba(34, 199, 169, 0.26), transparent 28%),
    linear-gradient(135deg, rgba(88, 101, 242, 0.34), rgba(25, 27, 32, 0.6));
}

.hero-strip p {
  margin: 0 0 4px;
  color: #bfc6ff;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.hero-strip h2 {
  margin: 0 0 5px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.05;
}

.hero-strip span {
  color: var(--muted);
}

.signal-art {
  display: flex;
  align-items: end;
  gap: 9px;
  min-width: 120px;
}

.signal-art i {
  width: 18px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #fff, var(--brand-2));
}

.signal-art i:nth-child(1) { height: 42px; opacity: .55; }
.signal-art i:nth-child(2) { height: 74px; opacity: .75; }
.signal-art i:nth-child(3) { height: 56px; opacity: .65; }
.signal-art i:nth-child(4) { height: 92px; opacity: .9; }

.messages {
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
}

.message:hover .message-body {
  background: rgba(255, 255, 255, 0.025);
}

.message-body {
  padding: 6px 8px;
  border-radius: 6px;
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.message-meta strong {
  color: #fff;
}

.message-meta time {
  color: var(--soft);
  font-size: 12px;
}

.message p {
  margin: 0;
  color: #dce0ea;
  line-height: 1.5;
}

.attachment {
  display: inline-flex;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  color: #dfe3ff;
  text-decoration: none;
}

.attachment.image img {
  display: block;
  max-width: min(320px, 100%);
  max-height: 220px;
  object-fit: cover;
}

.attachment.audio {
  display: block;
  width: min(360px, 100%);
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.attachment.audio audio {
  width: 100%;
}

.attachment.file {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 750;
}

body.compact .message {
  padding: 3px 0;
}

body.compact .message-body {
  padding: 3px 6px;
}

.message mark {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(255, 210, 87, 0.3);
  color: #fff0bd;
}

.composer {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px 40px;
  align-items: center;
  gap: 8px;
  margin: 0 18px 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.composer button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--panel-3);
  color: var(--muted);
  font-size: 24px;
}

.composer button[type="submit"] {
  background: var(--brand);
  color: #fff;
}

.composer button.recording {
  background: var(--danger);
  color: #fff;
  animation: pulseRecord 900ms infinite alternate;
}

@keyframes pulseRecord {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.composer input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.member-panel {
  min-width: 0;
  background: var(--panel);
  border-left: 1px solid var(--line);
}

.ai-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  position: fixed;
  right: 18px;
  top: 86px;
  bottom: 18px;
  width: min(380px, calc(100vw - 36px));
  z-index: 5;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(31, 32, 38, 0.98);
  box-shadow: var(--shadow);
  transform: translateX(calc(100% + 32px));
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}

.ai-panel.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.ai-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.ai-panel header span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.ai-suggestions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.ai-suggestions button {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.ai-suggestions button:hover {
  background: rgba(88, 101, 242, 0.25);
  color: var(--text);
}

.ai-chat {
  display: grid;
  align-content: end;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.ai-bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 10px;
  color: #eef1ff;
  line-height: 1.45;
  white-space: pre-wrap;
}

.ai-bubble.bot {
  justify-self: start;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.ai-bubble.user {
  justify-self: end;
  background: var(--brand);
}

.ai-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.ai-composer input {
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 0 11px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
}

.ai-composer button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
}

.member-panel header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 20px 16px 12px;
}

.member-panel header span {
  color: var(--muted);
  font-size: 12px;
}

.member-list {
  display: grid;
  gap: 6px;
  padding: 0 10px 16px;
}

.user-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  padding: 0 10px 10px;
}

.user-search input {
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  padding: 0 10px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
}

.user-search button {
  height: 36px;
  padding: 0 10px;
  border-radius: 7px;
  background: var(--brand);
  font-weight: 800;
}

.search-results,
.dm-list {
  display: grid;
  gap: 5px;
  padding: 0 10px 10px;
}

.search-result,
.dm-button {
  width: 100%;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.search-result:hover,
.dm-button:hover,
.dm-button.active {
  background: var(--panel-2);
  color: var(--text);
}

.dm-button .unread-dot {
  justify-self: end;
  grid-column: 2;
  margin-top: -16px;
}

.notification-toast {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 10;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: 180ms ease;
}

.notification-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.search-result small {
  color: var(--soft);
}

.avatar.mini {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.empty-note {
  margin: 4px 8px;
  color: var(--soft);
  font-size: 12px;
}

.dm-title {
  padding-top: 2px;
}

.member-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.member-card:hover {
  background: var(--panel-2);
}

.member-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  border: 2px solid var(--panel);
  border-radius: 50%;
  background: var(--brand-2);
  position: absolute;
  right: 0;
  bottom: 0;
}

.member-avatar {
  position: relative;
}

.modal {
  width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.62);
}

.modal h2 {
  margin: 0 0 18px;
}

.modal label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.modal input {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
}

.toggle-line {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
  margin-top: 12px;
}

.toggle-line input {
  width: 18px;
  height: 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.modal-actions button {
  height: 38px;
  padding: 0 14px;
  border-radius: 7px;
  font-weight: 800;
}

.ghost {
  background: var(--panel-2);
}

.primary {
  background: var(--brand);
}

@media (max-width: 860px) {
  .auth-screen {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .auth-brand h1 {
    max-width: 15ch;
  }

  .admin-stats,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-wide {
    grid-column: auto;
  }
}

body.light {
  color-scheme: light;
  --bg: #f1f2f6;
  --rail: #e7e9f0;
  --panel: #ffffff;
  --panel-2: #eef0f6;
  --panel-3: #e0e4ef;
  --chat: #f8f9fc;
  --text: #1d2330;
  --muted: #5d6474;
  --soft: #7c8496;
  --line: rgba(21, 28, 42, 0.1);
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 72px 250px minmax(0, 1fr);
  }

  .member-panel {
    display: none;
  }

  .member-panel.open {
    display: block;
    position: fixed;
    inset: 74px 0 0 auto;
    width: min(280px, 82vw);
    z-index: 3;
    box-shadow: var(--shadow);
  }

  .ai-panel {
    right: 12px;
    top: 80px;
    bottom: 12px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .server-rail {
    width: 64px;
  }

  .channel-panel {
    display: none;
  }

  .chat-panel {
    grid-column: 2;
  }

  .chat-header {
    padding: 0 12px;
  }

  .search-box {
    width: 44px;
    padding: 0 11px;
  }

  .search-box input {
    display: none;
  }

  .hero-strip {
    margin: 12px 12px 0;
    padding: 14px;
  }

  .signal-art {
    display: none;
  }

  .messages {
    padding: 12px;
  }

  .composer {
    margin: 0 12px 12px;
  }
}
