:root {
  --bg: #07070c;
  --bg2: #0b0b12;
  --surface: rgba(14, 14, 22, 0.66);
  --surface2: rgba(10, 10, 16, 0.82);
  --text: #f4f6ff;
  --muted: rgba(244, 246, 255, 0.72);
  --muted2: rgba(244, 246, 255, 0.56);

  --a-rgb: 140, 92, 255; /* violet */
  --b-rgb: 0, 216, 255; /* cyan */
  --ring: 0 0 0 4px rgba(var(--a-rgb), 0.16);
  --border: rgba(var(--a-rgb), 0.22);
  --border2: rgba(var(--a-rgb), 0.32);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.46);
  --shadowSoft: 0 18px 44px rgba(0, 0, 0, 0.28);

  --emoji-font: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", "Segoe UI Symbol";
}

html[data-mode="light"] {
  --bg: #e9edf6;
  --bg2: #f7f8fc;
  --surface: rgba(255, 255, 255, 0.62);
  --surface2: rgba(255, 255, 255, 0.82);
  --text: #0b0b12;
  --muted: rgba(11, 11, 18, 0.72);
  --muted2: rgba(11, 11, 18, 0.56);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.14);
  --shadowSoft: 0 18px 44px rgba(0, 0, 0, 0.12);
}

html[data-mode="light"] .muted,
html[data-mode="light"] .card-sub,
html[data-mode="light"] .side-sub,
html[data-mode="light"] .panel-sub,
html[data-mode="light"] .item-sub,
html[data-mode="light"] .msg-time,
html[data-mode="light"] .msg-edited,
html[data-mode="light"] .me-user {
  color: var(--muted);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

html[data-mode="light"] {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 22%, rgba(var(--a-rgb), 0.12), transparent 40%),
    radial-gradient(circle at 78% 18%, rgba(var(--b-rgb), 0.08), transparent 42%),
    radial-gradient(circle at 70% 78%, rgba(var(--a-rgb), 0.06), transparent 46%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 55%, var(--bg) 100%);
  overflow-x: hidden;
}

.msg-bubble,
.msg-name,
.msg-reply,
.typing,
.input,
.emoji-item,
.react-chip {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, var(--emoji-font);
  font-variant-emoji: emoji;
}

.app-body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

html[data-mode="light"] #bg {
  opacity: 0.28;
  filter: saturate(0.9) contrast(0.95);
}

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

.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 0 22px;
}

.wrap {
  width: min(980px, calc(100% - 28px));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.boost {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.boost:hover {
  transform: translateY(-1px);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadowSoft);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.top::before {
  content: "";
  position: absolute;
  inset: -80px;
  background:
    radial-gradient(circle at 20% 20%, rgba(var(--a-rgb), 0.18), transparent 56%),
    radial-gradient(circle at 80% 60%, rgba(var(--b-rgb), 0.12), transparent 56%);
  opacity: 0.85;
  pointer-events: none;
}

.top > * {
  position: relative;
  z-index: 1;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.logo {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 950;
  letter-spacing: -0.05em;
  background: rgba(var(--a-rgb), 0.14);
  border: 1px solid rgba(var(--a-rgb), 0.24);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  display: block;
  object-fit: cover;
  background: rgba(var(--a-rgb), 0.14);
  border: 1px solid rgba(var(--a-rgb), 0.24);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.brand-title {
  font-weight: 950;
  letter-spacing: -0.03em;
  text-transform: lowercase;
}

.brand-sub {
  display: block;
  margin-top: 1px;
  color: rgba(244, 246, 255, 0.6);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.top-actions {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(244, 246, 255, 0.9);
  font-weight: 900;
  border: 1px solid transparent;
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

.btn-icon {
  gap: 10px;
  padding: 0 14px;
}

.ico {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(var(--a-rgb), 0.14);
}

.btn-ghost {
  border-color: rgba(var(--a-rgb), 0.16);
}

.btn-ghost:hover {
  border-color: rgba(var(--a-rgb), 0.3);
  background: rgba(var(--a-rgb), 0.06);
  box-shadow: 0 0 30px rgba(var(--a-rgb), 0.14);
}

.btn-primary {
  color: #0b0b12;
  background: linear-gradient(140deg, rgba(var(--b-rgb), 1), rgba(var(--a-rgb), 1));
  border-color: rgba(var(--b-rgb), 0.42);
  box-shadow: 0 16px 38px rgba(var(--a-rgb), 0.14);
}

.btn-primary:hover {
  box-shadow: 0 0 34px rgba(var(--b-rgb), 0.16);
}

.card {
  border-radius: 28px;
  padding: 32px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -90px;
  background:
    radial-gradient(circle at 15% 20%, rgba(var(--a-rgb), 0.18), transparent 52%),
    radial-gradient(circle at 78% 35%, rgba(var(--b-rgb), 0.12), transparent 55%),
    radial-gradient(circle at 60% 85%, rgba(var(--a-rgb), 0.08), transparent 55%);
  opacity: 0.85;
  pointer-events: none;
}

.card > * {
  position: relative;
  z-index: 1;
}

.pill-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(var(--a-rgb), 0.22);
  background: rgba(var(--a-rgb), 0.08);
  color: rgba(244, 246, 255, 0.8);
  letter-spacing: 0.14em;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 950;
}

.spark {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(var(--b-rgb), 1);
  box-shadow: 0 0 0 0 rgba(var(--b-rgb), 0.34);
  animation: pulse 1.7s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--b-rgb), 0.34);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(var(--b-rgb), 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(var(--b-rgb), 0);
  }
}

.h1 {
  margin: 18px 0 0;
  font-size: clamp(2.2rem, 5.2vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.accent {
  background: linear-gradient(140deg, rgba(var(--b-rgb), 1), rgba(var(--a-rgb), 1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 68ch;
}

.cta-row {
  margin-top: 18px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.feature-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.feature {
  border-radius: 22px;
  padding: 16px;
  border: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.feature-ico {
  width: 44px;
  height: 44px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(var(--a-rgb), 0.1);
  border: 1px solid rgba(var(--a-rgb), 0.2);
}

.feature-title {
  font-weight: 950;
  letter-spacing: -0.02em;
}

.feature-copy {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.foot {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  color: var(--muted2);
  font-size: 12px;
  padding: 10px 6px;
}

.foot-links {
  display: inline-flex;
  gap: 10px;
}

.foot-links a {
  color: var(--muted2);
  text-decoration: none;
  font-weight: 850;
}

.foot-links a:hover {
  text-decoration: underline;
}

.auth-shell {
  padding: 28px;
}

.auth-head {
  text-align: center;
}

.auth-stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--a-rgb), 0.18);
  background: rgba(0, 0, 0, 0.18);
}

.step {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(244, 246, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(var(--a-rgb), 0.12);
}

.step.is-on {
  background: rgba(var(--b-rgb), 1);
  box-shadow: 0 0 22px rgba(var(--b-rgb), 0.24);
}

.step.is-done {
  background: rgba(var(--a-rgb), 0.9);
  box-shadow: 0 0 22px rgba(var(--a-rgb), 0.18);
}

.auth-title {
  margin: 18px 0 0;
  letter-spacing: -0.05em;
  font-size: clamp(1.8rem, 3.6vw, 2.4rem);
  line-height: 1.12;
}

.auth-sub {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.alert {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(var(--a-rgb), 0.18);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(244, 246, 255, 0.86);
}

.alert[data-kind="ok"] {
  border-color: rgba(var(--b-rgb), 0.28);
  background: rgba(var(--b-rgb), 0.08);
}

.alert[data-kind="error"] {
  border-color: rgba(255, 80, 105, 0.28);
  background: rgba(255, 80, 105, 0.08);
}

.form {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.row {
  display: grid;
  gap: 8px;
}

.label {
  font-weight: 900;
  letter-spacing: -0.02em;
  color: rgba(244, 246, 255, 0.86);
}

.hint {
  color: rgba(244, 246, 255, 0.56);
  font-size: 12px;
  line-height: 1.5;
}

.input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(var(--a-rgb), 0.16);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(244, 246, 255, 0.92);
  outline: none;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.input::placeholder {
  color: rgba(244, 246, 255, 0.38);
}

.input:focus {
  border-color: rgba(var(--b-rgb), 0.42);
  box-shadow: var(--ring);
  background: rgba(0, 0, 0, 0.26);
}

.actions {
  margin-top: 6px;
  display: grid;
  gap: 12px;
}

.actions.split {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-actions {
  display: grid;
  gap: 10px;
}

.switch,
.meta {
  color: rgba(244, 246, 255, 0.68);
  font-size: 13px;
  text-align: center;
}

.link {
  color: rgba(var(--b-rgb), 1);
  text-decoration: none;
  font-weight: 900;
}

.link:hover {
  text-decoration: underline;
}

.link-btn {
  background: transparent;
  border: none;
  padding: 0;
  color: rgba(var(--b-rgb), 1);
  font-weight: 900;
  cursor: pointer;
  font-size: inherit;
}

.link-btn:hover {
  text-decoration: underline;
}

.w-full {
  width: 100%;
}

.verify-ico {
  width: 64px;
  height: 64px;
  border-radius: 24px;
  margin: 4px auto 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--a-rgb), 0.22);
  background: rgba(var(--a-rgb), 0.12);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}

.verify-ico-inner {
  width: 42px;
  height: 42px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(var(--b-rgb), 0.26);
}

.verify-copy {
  margin-top: 12px;
  text-align: center;
  color: rgba(244, 246, 255, 0.76);
  line-height: 1.6;
}

.otp {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.otp-box {
  min-height: 52px;
  text-align: center;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0.06em;
  border-radius: 16px;
  border: 1px solid rgba(var(--a-rgb), 0.18);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(244, 246, 255, 0.92);
  outline: none;
}

.otp-box:focus {
  border-color: rgba(var(--b-rgb), 0.42);
  box-shadow: var(--ring);
}

@media (max-width: 980px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .auth-shell {
    padding: 22px;
  }
  .otp {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* =========================
   APP (Discord-like UI)
   ========================= */

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  height: 100vh;
  height: 100dvh;
}

.app-grid {
  grid-template-columns: 76px 280px 1fr 340px;
  height: 100vh;
  height: 100dvh;
}

.rail {
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.rail-brand {
  display: grid;
  place-items: center;
  height: 56px;
  text-decoration: none;
}

.rail-logo-img {
  width: 54px;
  height: 54px;
  border-radius: 20px;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(var(--a-rgb), 0.22);
  background: rgba(var(--a-rgb), 0.14);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

.rail-pill,
.rail-server {
  height: 54px;
  border-radius: 20px;
  border: 1px solid rgba(var(--a-rgb), 0.16);
  background: rgba(0, 0, 0, 0.16);
  color: rgba(244, 246, 255, 0.9);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  position: relative;
}

.rail-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(var(--a-rgb), 0.22);
  background: rgba(255, 59, 48, 0.92);
  color: rgba(10, 10, 16, 0.92);
  font-weight: 950;
  font-size: 11px;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 22px rgba(255, 59, 48, 0.18);
}

.rail-pill:hover,
.rail-server:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--b-rgb), 0.28);
  box-shadow: 0 0 30px rgba(var(--b-rgb), 0.1);
}

.rail-server.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.rail-server.is-disabled:hover {
  transform: none;
  border-color: rgba(var(--a-rgb), 0.16);
  box-shadow: none;
}

.rail-pill.is-on {
  border-color: rgba(var(--b-rgb), 0.42);
  box-shadow: 0 0 34px rgba(var(--b-rgb), 0.14);
}

.rail-ico {
  display: inline-grid;
  width: 100%;
  height: 100%;
  place-items: center;
  font-size: 18px;
}

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

.rail-sep {
  height: 1px;
  margin: 6px 8px;
  background: rgba(var(--a-rgb), 0.18);
}

.rail-server-badge {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 950;
}

.rail-server-img {
  width: 54px;
  height: 54px;
  border-radius: 20px;
  object-fit: cover;
}

.side {
  border-right: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(14px);
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.side-top {
  padding: 14px 14px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.side-title {
  min-width: 0;
}

.side-name {
  font-weight: 950;
  letter-spacing: -0.03em;
}

.side-sub {
  margin-top: 4px;
  color: rgba(244, 246, 255, 0.6);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(var(--a-rgb), 0.16);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(244, 246, 255, 0.9);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--b-rgb), 0.32);
  box-shadow: 0 0 30px rgba(var(--b-rgb), 0.1);
}

.side-search {
  padding: 0 14px 10px;
}

.input-sm {
  min-height: 40px;
  border-radius: 14px;
  padding: 0 12px;
}

.side-nav {
  padding: 0 14px 12px;
  display: grid;
  gap: 8px;
}

.nav-item {
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(var(--a-rgb), 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(244, 246, 255, 0.88);
  cursor: pointer;
  font-weight: 950;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 0 12px;
}

.nav-item.is-on {
  border-color: rgba(var(--b-rgb), 0.34);
  box-shadow: 0 0 28px rgba(var(--b-rgb), 0.12);
}

.nav-ico {
  width: 28px;
  height: 28px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(0, 0, 0, 0.16);
}

.panel {
  padding: 0 14px 14px;
  overflow: auto;
  min-height: 0;
}

.panel-head {
  padding: 6px 2px 12px;
}

.panel-title {
  font-weight: 950;
}

.panel-sub {
  margin-top: 6px;
  color: rgba(244, 246, 255, 0.64);
  font-size: 13px;
  line-height: 1.5;
}

.friend-add {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.friend-add-main {
  margin: 10px 0 14px;
}

.list-head {
  margin: 14px 0 8px;
  color: rgba(244, 246, 255, 0.62);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 950;
}

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

.item {
  border-radius: 18px;
  border: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.item.item-click,
.panel .item {
  cursor: pointer;
}

.item:hover {
  border-color: rgba(var(--b-rgb), 0.26);
  box-shadow: 0 0 24px rgba(var(--b-rgb), 0.08);
}

.item.is-active {
  border-color: rgba(var(--b-rgb), 0.42);
  box-shadow: 0 0 28px rgba(var(--b-rgb), 0.14);
}

.item-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.item-title {
  font-weight: 950;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-sub {
  color: rgba(244, 246, 255, 0.6);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* DMs: click the row, no extra buttons */
#dmList .item-actions {
  display: none;
}

.dm-row {
  border-radius: 16px;
  border: 1px solid rgba(var(--a-rgb), 0.12);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  position: relative;
}

.dm-row:hover {
  border-color: rgba(var(--b-rgb), 0.26);
  box-shadow: 0 0 24px rgba(var(--b-rgb), 0.08);
  transform: translateY(-1px);
}

.dm-row.is-active {
  border-color: rgba(var(--b-rgb), 0.42);
  box-shadow: 0 0 28px rgba(var(--b-rgb), 0.14);
}

.dm-row.is-unread {
  border-color: rgba(255, 59, 48, 0.26);
  box-shadow: 0 0 22px rgba(255, 59, 48, 0.08);
}

.dm-row.is-unread .dm-title {
  color: rgba(244, 246, 255, 0.98);
}

.dm-row.is-unread .dm-sub {
  color: rgba(244, 246, 255, 0.88);
  font-weight: 850;
}

.dm-row.is-unread .dm-time {
  color: rgba(255, 90, 82, 0.95);
  font-weight: 950;
}

.dm-ava {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(var(--a-rgb), 0.2);
  background: rgba(var(--a-rgb), 0.12);
  display: grid;
  place-items: center;
  font-weight: 950;
  background-repeat: no-repeat;
  position: relative;
}

.dm-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dm-title {
  font-weight: 950;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-sub {
  color: rgba(244, 246, 255, 0.6);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-sub.is-typing {
  color: rgba(0, 224, 255, 0.9);
  font-style: italic;
}

.dm-time {
  color: rgba(244, 246, 255, 0.52);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.dm-close {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 22px;
  height: 22px;
  border-radius: 10px;
  border: 1px solid rgba(var(--a-rgb), 0.16);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(244, 246, 255, 0.72);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 140ms ease, transform 140ms ease;
  cursor: pointer;
}

.dm-row:hover .dm-close {
  opacity: 1;
  transform: scale(1);
}

.dm-close:hover {
  border-color: rgba(255, 59, 48, 0.28);
  color: rgba(255, 90, 82, 0.95);
}

.mini-btn {
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--a-rgb), 0.16);
  background: rgba(0, 0, 0, 0.16);
  color: rgba(244, 246, 255, 0.9);
  cursor: pointer;
  font-weight: 950;
}

.mini-btn.icon {
  width: 44px;
  padding: 0;
  display: grid;
  place-items: center;
}

.mini-btn.icon .ico-svg {
  width: 18px;
  height: 18px;
}

.mini-btn.primary {
  border-color: rgba(var(--b-rgb), 0.34);
  background: rgba(var(--b-rgb), 0.12);
}

.side-foot {
  padding: 12px 14px;
  border-top: 1px solid rgba(var(--a-rgb), 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.me-btn {
  border: none;
  background: transparent;
  padding: 0;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.me-btn:hover .me-ava,
.me-btn:hover .me-name {
  filter: brightness(1.06);
}

.me-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.icon-btn.mini {
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

.me {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.me-ava {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  border: 1px solid rgba(var(--a-rgb), 0.2);
  background: rgba(var(--a-rgb), 0.12);
  display: grid;
  place-items: center;
  font-weight: 950;
  background-repeat: no-repeat;
  position: relative;
}

.me-name {
  font-weight: 950;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.me-user {
  margin-top: 3px;
  color: rgba(244, 246, 255, 0.6);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
}

.main-top {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(14px);
}

.main-title {
  font-weight: 950;
  letter-spacing: -0.03em;
}

.main-sub {
  margin-top: 4px;
  color: rgba(244, 246, 255, 0.62);
  font-size: 13px;
}

.main-body {
  padding: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.friends-top {
  margin-bottom: 0;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(var(--a-rgb), 0.16);
  background: rgba(0, 0, 0, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.friends-tabs {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pilltab {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(244, 246, 255, 0.86);
  cursor: pointer;
  font-weight: 950;
}

.pilltab.is-on {
  border-color: rgba(var(--b-rgb), 0.34);
  box-shadow: 0 0 24px rgba(var(--b-rgb), 0.12);
}

.pilltab.primary {
  color: #0b0b12;
  border-color: rgba(var(--b-rgb), 0.42);
  background: linear-gradient(140deg, rgba(var(--b-rgb), 1), rgba(var(--a-rgb), 1));
}

.friends-search {
  min-width: 220px;
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.friends-search .input {
  width: min(420px, 100%);
}

.friends-main {
  border-radius: 22px;
  border: 1px solid rgba(var(--a-rgb), 0.16);
  background: rgba(0, 0, 0, 0.12);
  padding: 12px;
  min-height: 0;
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
}

.friends-main-head {
  color: rgba(244, 246, 255, 0.7);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 950;
  padding: 4px 6px 10px;
}

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

.friend-row {
  border-radius: 18px;
  border: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 10px;
  align-items: center;
}

.friend-ava {
  width: 46px;
  height: 46px;
  border-radius: 18px;
  border: 1px solid rgba(var(--a-rgb), 0.2);
  background: rgba(var(--a-rgb), 0.12);
  display: grid;
  place-items: center;
  font-weight: 950;
  background-repeat: no-repeat;
  position: relative;
}

.status-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(10, 10, 16, 0.9);
  background: rgba(244, 246, 255, 0.3);
  display: grid;
  place-items: center;
}

.status-dot.online {
  background: rgba(var(--b-rgb), 0.95);
}
.status-dot.idle {
  background: rgba(var(--a-rgb), 0.95);
}
.status-dot.dnd {
  background: rgba(255, 110, 245, 0.95);
}
.status-dot.offline {
  background: rgba(244, 246, 255, 0.28);
}

.status-dot.idle::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  box-shadow: 3px 0 0 2px rgba(10, 10, 16, 0.92);
}

.status-dot.dnd::before {
  content: "";
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: rgba(10, 10, 16, 0.92);
}

.status-dot.offline::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  border: 2px solid rgba(10, 10, 16, 0.72);
}

.friend-meta {
  min-width: 0;
}

.friend-name {
  font-weight: 950;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-sub {
  margin-top: 4px;
  color: rgba(244, 246, 255, 0.6);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.right {
  border-left: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(14px);
  min-width: 0;
  height: 100vh;
  height: 100dvh;
}

.right-wrap {
  padding: 14px;
  display: grid;
  gap: 12px;
  height: 100%;
  grid-template-rows: auto auto 1fr;
  overflow: hidden;
}

.right-title {
  font-weight: 950;
  letter-spacing: -0.03em;
}

.right-sub {
  margin-top: -6px;
  color: rgba(244, 246, 255, 0.62);
  font-size: 13px;
}

.right-card {
  border-radius: 22px;
  border: 1px solid rgba(var(--a-rgb), 0.18);
  background: rgba(10, 10, 16, 0.66);
  box-shadow: var(--shadowSoft);
  overflow: auto;
  min-height: 0;
  height: 100%;
}

.banner {
  height: 88px;
  background: radial-gradient(circle at 20% 20%, rgba(var(--b-rgb), 0.22), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(var(--a-rgb), 0.22), transparent 55%),
    rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(var(--a-rgb), 0.14);
  background-size: cover;
  background-position: center;
}

.right-user {
  padding: 12px;
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
}

.right-ava {
  width: 54px;
  height: 54px;
  border-radius: 20px;
  border: 1px solid rgba(var(--a-rgb), 0.2);
  background: rgba(var(--a-rgb), 0.12);
  display: grid;
  place-items: center;
  font-weight: 950;
  background-repeat: no-repeat;
  position: relative;
}

.right-name {
  font-weight: 950;
  letter-spacing: -0.03em;
}

.right-userline {
  margin-top: 4px;
  color: rgba(244, 246, 255, 0.62);
  font-size: 13px;
}

.right-meta {
  padding: 0 12px 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kv {
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.k {
  color: rgba(244, 246, 255, 0.62);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 950;
}

.v {
  margin-top: 8px;
  font-weight: 950;
}

.badges {
  padding: 0 12px 12px;
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  width: 28px;
  height: 28px;
  border-radius: 12px;
  border: 1px solid rgba(var(--b-rgb), 0.28);
  background: rgba(var(--b-rgb), 0.08);
  display: inline-grid;
  place-items: center;
  box-shadow: 0 0 18px rgba(var(--b-rgb), 0.12);
  position: relative;
}

.tip {
  position: fixed;
  z-index: 9999;
  max-width: min(320px, calc(100vw - 24px));
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(var(--a-rgb), 0.22);
  background: rgba(10, 10, 16, 0.92);
  box-shadow: var(--shadowSoft);
  color: rgba(244, 246, 255, 0.92);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: -0.01em;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: center;
  pointer-events: none;
}

.badge.mini {
  width: 20px;
  height: 20px;
  border-radius: 10px;
}

.badge svg {
  width: 16px;
  height: 16px;
  fill: rgba(244, 246, 255, 0.92);
}

.badge.mini svg {
  width: 12px;
  height: 12px;
}

.server-head {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
}

.server-ava-img {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  border: 1px solid rgba(var(--a-rgb), 0.2);
  background: rgba(var(--a-rgb), 0.12);
  object-fit: cover;
  display: block;
}

.server-name {
  font-weight: 950;
  letter-spacing: -0.02em;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.server-badges {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.server-sub {
  margin-top: 4px;
  color: rgba(244, 246, 255, 0.62);
  font-size: 12px;
}

.menu-item.emoji {
  display: grid;
  place-items: center;
  font-size: 18px;
}

.gif-item {
  width: 100%;
  text-align: left;
}

.right-bio {
  padding: 0 12px 14px;
  color: rgba(244, 246, 255, 0.78);
  line-height: 1.6;
  white-space: pre-wrap;
}

.about {
  margin: 0 12px 14px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.about .k {
  margin-bottom: 8px;
}

.about-text {
  color: rgba(244, 246, 255, 0.78);
  line-height: 1.6;
  white-space: pre-wrap;
}

.right-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  min-height: 0;
  scrollbar-gutter: stable;
  align-content: start;
}

.right-list .friend-row {
  padding: 8px;
  border-radius: 16px;
}

.right-list .friend-ava {
  width: 40px;
  height: 40px;
  border-radius: 16px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 12px;
  margin-top: 8px;
  min-height: 0;
}

.account-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 14px;
  align-items: start;
}

.account-form {
  display: grid;
  gap: 14px;
}

.account-preview {
  position: sticky;
  top: 0;
}

.preview-title {
  color: rgba(244, 246, 255, 0.62);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 950;
  margin: 2px 0 10px;
}

.preview-card {
  max-height: min(52vh, 520px);
}

.settings-nav {
  border-radius: 18px;
  border: 1px solid rgba(var(--a-rgb), 0.16);
  background: rgba(0, 0, 0, 0.14);
  padding: 10px;
  display: grid;
  gap: 8px;
  align-content: start;
  max-height: 100%;
  overflow: auto;
  scrollbar-gutter: stable;
}

.snav {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(var(--a-rgb), 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(244, 246, 255, 0.88);
  cursor: pointer;
  font-weight: 950;
  padding: 0 12px;
  text-align: left;
}

.snav-ico {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(var(--a-rgb), 0.14);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  flex: 0 0 auto;
}

.snav .ico-svg {
  width: 16px;
  height: 16px;
}

.snav-sep {
  height: 1px;
  width: 100%;
  background: rgba(var(--a-rgb), 0.12);
  margin: 6px 0;
  border-radius: 999px;
}

.snav.is-on {
  border-color: rgba(var(--b-rgb), 0.34);
  box-shadow: 0 0 24px rgba(var(--b-rgb), 0.12);
}

.settings-body {
  min-width: 0;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.settings-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.settings-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(var(--a-rgb), 0.14);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-pane {
  display: grid;
  gap: 14px;
}

.reveal {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.menu {
  position: fixed;
  z-index: 12;
  width: 220px;
  border-radius: 18px;
  border: 1px solid rgba(var(--a-rgb), 0.2);
  background: rgba(10, 10, 16, 0.92);
  box-shadow: var(--shadowSoft);
  backdrop-filter: blur(14px);
  padding: 8px;
}

.menu.emoji-menu {
  width: min(420px, calc(100% - 24px));
  max-height: min(520px, calc(100vh - 80px));
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  overflow: hidden;
}

.emoji-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.emoji-search {
  width: 100%;
}

.emoji-grid {
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  padding: 2px;
}

.emoji-item {
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 246, 255, 0.95);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
}

.emoji-item:hover {
  border-color: rgba(var(--b-rgb), 0.34);
  background: rgba(var(--b-rgb), 0.10);
}

.emoji-head {
  grid-column: 1 / -1;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 246, 255, 0.62);
  font-weight: 950;
  margin: 6px 2px 2px;
}

html[data-mode="light"] .menu {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(11, 11, 18, 0.14);
}

html[data-mode="light"] .emoji-item {
  color: rgba(11, 11, 18, 0.92);
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(11, 11, 18, 0.12);
}

html[data-mode="light"] .emoji-head {
  color: rgba(11, 11, 18, 0.56);
}

.image-card {
  width: min(920px, 100%);
  max-height: min(82vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.image-wrap {
  margin-top: 12px;
  border-radius: 18px;
  border: 1px solid rgba(var(--a-rgb), 0.16);
  background: rgba(0, 0, 0, 0.22);
  overflow: auto;
  min-height: 0;
  flex: 1;
  display: grid;
  place-items: center;
}

.image-view {
  max-width: 100%;
  max-height: 100%;
  border-radius: 14px;
}

.menu-item {
  width: 100%;
  min-height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(var(--a-rgb), 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(244, 246, 255, 0.9);
  cursor: pointer;
  font-weight: 950;
  text-align: left;
  padding: 0 12px;
}

.menu-item:hover {
  border-color: rgba(var(--b-rgb), 0.3);
  background: rgba(var(--b-rgb), 0.08);
}

.menu-item:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.menu-item.danger {
  border-color: rgba(255, 70, 70, 0.22);
  color: rgba(255, 140, 140, 0.95);
}

.menu-item.danger:hover {
  border-color: rgba(255, 70, 70, 0.38);
  background: rgba(255, 70, 70, 0.12);
}

.menu-sep {
  height: 1px;
  margin: 8px 6px;
  background: rgba(var(--a-rgb), 0.16);
  border-radius: 999px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 720px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}

.link-btn {
  border: 0;
  background: transparent;
  color: rgba(var(--b-rgb), 0.92);
  font-weight: 950;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.mini-card {
  border-radius: 18px;
  border: 1px solid rgba(var(--a-rgb), 0.16);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  padding: 14px 14px 10px;
  margin: 10px 0;
}

/* Ban page */
.ban-shell {
  padding: 18px;
}

.ban-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 14px;
  border-radius: 22px;
  border: 1px solid rgba(var(--a-rgb), 0.16);
  background: linear-gradient(135deg, rgba(130, 110, 255, 0.14), rgba(80, 220, 255, 0.10));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.25);
}

.ban-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 90, 82, 0.18);
  background: rgba(255, 90, 82, 0.10);
}

.ban-icon svg {
  width: 22px;
  height: 22px;
  fill: rgba(255, 170, 166, 0.95);
}

.ban-title {
  font-weight: 990;
  letter-spacing: -0.03em;
  font-size: 24px;
}

.ban-sub {
  margin-top: 2px;
  color: rgba(244, 246, 255, 0.68);
  font-weight: 800;
}

.ban-pill {
  justify-self: end;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 90, 82, 0.22);
  background: rgba(255, 90, 82, 0.10);
  color: rgba(255, 170, 166, 0.95);
  font-weight: 1000;
  letter-spacing: 0.16em;
  font-size: 11px;
  text-transform: uppercase;
  white-space: nowrap;
}

.ban-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 12px;
  margin-top: 12px;
}

.ban-card {
  margin: 0;
}

.ban-kv + .ban-kv {
  margin-top: 10px;
}

.ban-kv .k {
  color: rgba(244, 246, 255, 0.62);
  font-weight: 950;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ban-kv .v {
  margin-top: 6px;
  font-weight: 950;
  color: rgba(244, 246, 255, 0.92);
  line-height: 1.4;
  word-break: break-word;
}

.ban-k {
  color: rgba(244, 246, 255, 0.62);
  font-weight: 950;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ban-staff {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

.ban-ava {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(var(--a-rgb), 0.18);
  background: rgba(0, 0, 0, 0.22);
  display: grid;
  place-items: center;
  font-weight: 1000;
}

.ban-staff-top {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.ban-staff-name {
  font-weight: 1000;
  letter-spacing: -0.02em;
  font-size: 16px;
}

.ban-staff-user {
  margin-top: 2px;
  color: rgba(244, 246, 255, 0.62);
  font-weight: 900;
}

@media (max-width: 860px) {
  .ban-grid {
    grid-template-columns: 1fr;
  }
  .ban-hero {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .ban-pill {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

.day-divider {
  position: relative;
  display: grid;
  place-items: center;
  margin: 14px 0;
}

.day-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(var(--a-rgb), 0.14);
}

.day-divider span {
  position: relative;
  z-index: 1;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(var(--a-rgb), 0.18);
  background: rgba(10, 10, 16, 0.78);
  color: rgba(244, 246, 255, 0.72);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.h2 {
  margin: 14px 0 0;
  letter-spacing: -0.04em;
  font-size: 22px;
}

.chat {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  min-height: 0;
  flex: 1;
  border-radius: 28px;
  border: 1px solid rgba(var(--a-rgb), 0.18);
  background: rgba(10, 10, 16, 0.6);
  box-shadow: var(--shadowSoft);
  overflow: hidden;
  position: relative;
}

.chat-head {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(0, 0, 0, 0.14);
}

.chat-peer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.peer-ava {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  border: 1px solid rgba(var(--a-rgb), 0.2);
  background: rgba(var(--a-rgb), 0.12);
  display: grid;
  place-items: center;
  font-weight: 950;
}

.peer-name {
  font-weight: 950;
  letter-spacing: -0.02em;
}

.peer-sub {
  margin-top: 3px;
  color: rgba(244, 246, 255, 0.6);
  font-size: 12px;
}

.chat-log {
  padding: 14px;
  overflow: auto;
  overscroll-behavior: contain;
  display: grid;
  gap: 10px;
  min-height: 0;
}

/* Message rows (Discord-like) */
.msgrow {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: start;
}

.msgrow.me .msg-name {
  color: rgba(var(--b-rgb), 0.95);
}

.msg-ava {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(var(--a-rgb), 0.2);
  background: rgba(var(--a-rgb), 0.12);
  display: grid;
  place-items: center;
  font-weight: 950;
  background-repeat: no-repeat;
  position: relative;
}

.msg-content {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.msg-head {
  display: inline-flex;
  gap: 10px;
  align-items: baseline;
}

.msg-name {
  border: none;
  background: transparent;
  padding: 0;
  color: rgba(244, 246, 255, 0.92);
  font-weight: 950;
  cursor: pointer;
  text-align: left;
}

.msg-name:hover {
  text-decoration: underline;
}

.msg-time {
  color: rgba(244, 246, 255, 0.56);
  font-size: 12px;
  font-weight: 800;
}

.msg-bubble {
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(255, 255, 255, 0.03);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
}

.msg-bubble.has-att {
  padding: 10px;
}

.msg-text {
  padding: 2px 2px 8px;
}

.msg-file {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(0, 0, 0, 0.16);
}

.msg-file-ico {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  border: 1px solid rgba(var(--a-rgb), 0.18);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
}

.msg-file-name {
  font-weight: 950;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.msg-file-sub {
  margin-top: 2px;
  color: rgba(244, 246, 255, 0.62);
  font-size: 12px;
  font-weight: 800;
}

.msg-imgbtn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: block;
}

.msgrow.me .msg-bubble {
  border-color: rgba(var(--b-rgb), 0.28);
  background: rgba(var(--b-rgb), 0.12);
}

.msg-img {
  max-width: min(420px, 100%);
  width: auto;
  border-radius: 14px;
  display: block;
  max-height: 360px;
  object-fit: cover;
  border: 1px solid rgba(var(--a-rgb), 0.14);
}

.msg-imgbtn:hover .msg-img {
  border-color: rgba(var(--b-rgb), 0.34);
  box-shadow: 0 0 24px rgba(var(--b-rgb), 0.10);
}

.msg-media {
  display: block;
  width: min(560px, 100%);
  border-radius: 14px;
  height: auto;
  max-height: 360px;
  border: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(0, 0, 0, 0.35);
}

html[data-mode="light"] .msg-media {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(11, 11, 18, 0.14);
}

.msg-video {
  object-fit: contain;
}

.msg-audio {
  height: 46px;
  max-height: 46px;
}

.msg-actions {
  margin-left: auto;
  display: inline-flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(-1px);
  transition: opacity 160ms ease;
}

.msgrow:hover .msg-actions {
  opacity: 1;
}

.msg-link {
  color: inherit;
  text-decoration: underline;
}

.chat-send {
  padding: 12px 14px;
  border-top: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(0, 0, 0, 0.14);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "top top"
    "input send";
  gap: 10px;
  align-items: end;
}

html[data-mode="light"] .chat-send {
  background: rgba(255, 255, 255, 0.78);
  border-top-color: rgba(11, 11, 18, 0.14);
}

.chat-notice {
  margin: 12px 14px 0;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(var(--a-rgb), 0.16);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(244, 246, 255, 0.8);
  font-weight: 900;
  display: flex;
  gap: 10px;
  align-items: center;
}

html[data-mode="light"] .chat-notice {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(11, 11, 18, 0.14);
  color: rgba(11, 11, 18, 0.82);
}

.typing {
  margin: 8px 14px 0;
  color: rgba(244, 246, 255, 0.62);
  font-size: 12px;
  font-weight: 900;
}

.new-msg {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 94px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(var(--b-rgb), 0.28);
  background: rgba(0, 0, 0, 0.4);
  color: rgba(244, 246, 255, 0.92);
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

.new-msg:hover {
  border-color: rgba(255, 59, 48, 0.32);
  box-shadow: 0 16px 48px rgba(255, 59, 48, 0.12);
}

.chat-notice::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(var(--a-rgb), 0.85);
  box-shadow: 0 0 18px rgba(var(--a-rgb), 0.18);
}

.chat-send.is-disabled {
  opacity: 0.7;
}

.chat-send.is-disabled .input {
  opacity: 0.8;
}
.composer-top {
  grid-area: top;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.chat-tools {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.attach-preview {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 16px;
  border: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(255, 255, 255, 0.03);
  max-width: min(520px, 100%);
  flex: 0 1 auto;
}

.attach-thumb {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(var(--a-rgb), 0.18);
  background: rgba(0, 0, 0, 0.25);
  background-size: cover;
  background-position: center;
  flex: 0 0 auto;
}

.attach-meta {
  min-width: 0;
}

.attach-name {
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attach-sub {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(244, 246, 255, 0.62);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#chatInput {
  grid-area: input;
}

.chat-send button[type="submit"] {
  grid-area: send;
  min-width: 112px;
}

@media (max-width: 560px) {
  .chat-send {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "top"
      "input"
      "send";
  }
  .composer-top {
    align-items: flex-start;
    flex-direction: column;
  }
  .chat-send button[type="submit"] {
    width: 100%;
  }
  .attach-preview {
    justify-self: start;
    width: 100%;
  }
}

.textarea {
  padding: 10px 14px;
  min-height: 46px;
  resize: vertical;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  width: min(560px, 100%);
  border-radius: 26px;
  border: 1px solid rgba(var(--a-rgb), 0.22);
  background: rgba(10, 10, 16, 0.88);
  box-shadow: var(--shadow);
  padding: 18px;
}

/* Settings modal: Discord-like sizing + internal scrolling */
#settingsModal .modal-card {
  width: min(920px, 100%);
  max-height: min(78vh, 780px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#settingsModal .form {
  flex: 1;
  min-height: 0;
}

#settingsModal .settings-grid {
  height: 100%;
  min-height: 0;
  align-items: start;
}

#settingsModal .settings-body {
  height: 100%;
  overflow: hidden;
}

.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal-title {
  font-weight: 950;
  letter-spacing: -0.03em;
  font-size: 18px;
}

.modal-sub {
  margin-top: 4px;
  color: rgba(244, 246, 255, 0.6);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.profile-card {
  max-width: 520px;
}

.profile-popout {
  padding: 0;
  overflow: hidden;
}

.pop-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(var(--a-rgb), 0.22);
}

.pop-banner {
  height: 110px;
}

.profile-popout .banner {
  border-radius: 26px 26px 18px 18px;
}

.pop-hero {
  padding: 0 14px 10px;
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: end;
  margin-top: -34px;
}

.pop-ava {
  width: 76px;
  height: 76px;
  border-radius: 26px;
  border: 3px solid rgba(10, 10, 16, 0.88);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
}

.pop-name {
  font-weight: 950;
  letter-spacing: -0.03em;
  font-size: 18px;
}

.pop-user {
  margin-top: 4px;
  color: rgba(244, 246, 255, 0.62);
  font-size: 13px;
}

.pop-badges {
  padding: 0 14px 10px;
}

.pop-grid {
  padding: 0 14px 10px;
}

.pop-kv {
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.pop-about {
  margin: 0 12px 10px;
}

.pop-actions {
  padding: 0 12px 12px;
  display: grid;
  gap: 8px;
}

.pop-action {
  width: 100%;
  min-height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(244, 246, 255, 0.92);
  cursor: pointer;
  font-weight: 950;
  text-align: left;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: center;
}

.pop-action:hover {
  border-color: rgba(var(--b-rgb), 0.34);
  box-shadow: 0 0 24px rgba(var(--b-rgb), 0.12);
}

.pop-action-ico .ico-svg {
  width: 18px;
  height: 18px;
  fill: rgba(244, 246, 255, 0.9);
}

.profile-hero {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 22px;
  border: 1px solid rgba(var(--a-rgb), 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.profile-ava {
  width: 62px;
  height: 62px;
  border-radius: 22px;
  border: 1px solid rgba(var(--a-rgb), 0.2);
  background: rgba(var(--a-rgb), 0.12);
  display: grid;
  place-items: center;
  font-weight: 950;
  background-repeat: no-repeat;
  position: relative;
}

.profile-name {
  font-weight: 950;
  letter-spacing: -0.03em;
  font-size: 18px;
}

.profile-user {
  margin-top: 4px;
  color: rgba(244, 246, 255, 0.62);
  font-size: 13px;
}

.profile-bio {
  margin-top: 12px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(0, 0, 0, 0.14);
  color: rgba(244, 246, 255, 0.78);
  line-height: 1.6;
  min-height: 44px;
  white-space: pre-wrap;
}

.profile-meta {
  margin-top: 12px;
  padding: 0 2px;
}

.input.file {
  padding: 10px 14px;
  min-height: 46px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 11;
  max-width: min(420px, calc(100% - 36px));
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(var(--a-rgb), 0.18);
  background: rgba(10, 10, 16, 0.88);
  color: rgba(244, 246, 255, 0.9);
  box-shadow: var(--shadowSoft);
  backdrop-filter: blur(14px);
}

.toast[data-kind="ok"] {
  border-color: rgba(var(--b-rgb), 0.28);
  background: rgba(var(--b-rgb), 0.08);
}

.toast[data-kind="error"] {
  border-color: rgba(255, 80, 105, 0.28);
  background: rgba(255, 80, 105, 0.08);
}

@media (max-width: 980px) {
  .app-grid {
    grid-template-columns: 76px 1fr;
  }
  .side,
  .right {
    display: none;
  }
  .main-body {
    padding: 14px;
  }
}

@media (max-width: 780px) {
  .account-grid {
    grid-template-columns: 1fr;
  }
  .account-preview {
    position: relative;
  }
  .preview-card {
    max-height: none;
  }
}

@media (max-width: 1100px) {
  .app-grid {
    grid-template-columns: 76px 280px 1fr;
  }
  .right {
    display: none;
  }
}

html[data-mode="light"] .rail,
html[data-mode="light"] .side,
html[data-mode="light"] .right,
html[data-mode="light"] .main-top,
html[data-mode="light"] .friends-top,
html[data-mode="light"] .chat-head,
html[data-mode="light"] .chat-send {
  background: rgba(255, 255, 255, 0.72);
}

html[data-mode="light"] .nav-ico,
html[data-mode="light"] .icon-btn,
html[data-mode="light"] .input,
html[data-mode="light"] .mini-btn {
  background: rgba(255, 255, 255, 0.9);
  color: rgba(11, 11, 18, 0.92);
}

html[data-mode="light"] .nav-item,
html[data-mode="light"] .pilltab,
html[data-mode="light"] .btn,
html[data-mode="light"] .item,
html[data-mode="light"] .friend-row,
html[data-mode="light"] .right-card,
html[data-mode="light"] .chat {
  color: rgba(11, 11, 18, 0.92);
}

html[data-mode="light"] .item-sub,
html[data-mode="light"] .friend-sub,
html[data-mode="light"] .right-sub,
html[data-mode="light"] .panel-sub,
html[data-mode="light"] .main-sub {
  color: rgba(11, 11, 18, 0.62);
}

html[data-mode="light"] .right-bio,
html[data-mode="light"] .msg-meta {
  color: rgba(11, 11, 18, 0.68);
}

html[data-mode="light"] .msg-bubble {
  background: rgba(255, 255, 255, 0.72);
}

html[data-mode="light"] .badge svg {
  fill: rgba(11, 11, 18, 0.92);
}

html[data-mode="light"] .modal-card {
  background: rgba(255, 255, 255, 0.92);
  color: rgba(11, 11, 18, 0.92);
}

html[data-mode="light"] .modal-sub,
html[data-mode="light"] .hint,
html[data-mode="light"] .label {
  color: rgba(11, 11, 18, 0.66);
}

/* Me popout-style placement (Discord-like) */
#profileModal.modal {
  place-items: end start;
  padding: 0 0 92px 92px;
  pointer-events: none;
}

#profileModal .modal-backdrop {
  display: none;
}

#profileModal .modal-card {
  width: 340px;
  pointer-events: auto;
}

/* freq system bot message */
.msg-ava.bot {
  border-color: rgba(255, 59, 48, 0.28);
  box-shadow: 0 0 18px rgba(255, 59, 48, 0.08);
}

.msgrow.system .msg-name {
  cursor: default;
  text-decoration: none !important;
}

.bot-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 59, 48, 0.28);
  background: rgba(255, 59, 48, 0.14);
  color: rgba(255, 90, 82, 0.95);
  font-weight: 950;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.msg-bubble.system {
  border-color: rgba(255, 59, 48, 0.2);
  background: rgba(255, 59, 48, 0.06);
  color: rgba(244, 246, 255, 0.86);
}

/* Landing: Discord-ish split hero */
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-kpis {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.kpi {
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(255, 255, 255, 0.03);
  min-width: 120px;
}

.kpi-title {
  font-weight: 950;
  letter-spacing: -0.02em;
}

.kpi-sub {
  margin-top: 3px;
  color: rgba(244, 246, 255, 0.66);
  font-size: 13px;
  font-weight: 850;
}

.hero-visual {
  min-width: 0;
}

.mock {
  border-radius: 20px;
  border: 1px solid rgba(var(--a-rgb), 0.16);
  background: rgba(0, 0, 0, 0.22);
  overflow: hidden;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

.mock-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(0, 0, 0, 0.18);
}

.mock-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(244, 246, 255, 0.16);
  border: 1px solid rgba(var(--a-rgb), 0.18);
}

.mock-dot:nth-child(1) {
  background: rgba(255, 90, 82, 0.85);
  border-color: rgba(255, 90, 82, 0.24);
}
.mock-dot:nth-child(2) {
  background: rgba(255, 214, 102, 0.85);
  border-color: rgba(255, 214, 102, 0.18);
}
.mock-dot:nth-child(3) {
  background: rgba(95, 231, 148, 0.85);
  border-color: rgba(95, 231, 148, 0.18);
}

.mock-title {
  margin-left: 6px;
  font-weight: 950;
  letter-spacing: -0.02em;
  color: rgba(244, 246, 255, 0.9);
  font-size: 13px;
}

.mock-body {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.mock-msg {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 8px;
  align-items: start;
}

.mock-msg.me {
  grid-template-columns: 1fr;
  justify-items: end;
}

.mock-ava {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  border: 1px solid rgba(var(--a-rgb), 0.18);
  background: rgba(var(--a-rgb), 0.12);
  background-size: cover;
  background-position: center;
}

.mock-bubble {
  padding: 8px 10px;
  border-radius: 16px;
  border: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(244, 246, 255, 0.9);
  font-weight: 850;
  font-size: 13px;
  max-width: 320px;
}

.mock-msg.me .mock-bubble {
  border-color: rgba(var(--b-rgb), 0.22);
  box-shadow: 0 0 22px rgba(var(--b-rgb), 0.08);
}

.mock-input {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(0, 0, 0, 0.16);
  color: rgba(244, 246, 255, 0.52);
  font-weight: 850;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

/* Landing v2 (Discord-like layout, Razeord style) */
.landing .stage {
  place-items: start center;
  padding: 22px 0 22px;
}

.landing .wrap {
  width: min(1200px, calc(100% - 34px));
  gap: 18px;
}

.top-nav {
  padding: 14px 18px;
  border-radius: 26px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 10px;
}

.nav-links a {
  text-decoration: none;
  color: rgba(244, 246, 255, 0.84);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: -0.01em;
  padding: 10px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.nav-links a:hover {
  border-color: rgba(var(--a-rgb), 0.18);
  background: rgba(var(--a-rgb), 0.06);
}

.btn-pill {
  border-radius: 999px;
}

.btn-solid {
  color: #0b0b12;
  background: rgba(244, 246, 255, 0.95);
  border-color: rgba(244, 246, 255, 0.28);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

html[data-mode="light"] .btn-solid {
  background: rgba(11, 11, 18, 0.92);
  color: rgba(244, 246, 255, 0.92);
  border-color: rgba(11, 11, 18, 0.22);
}

.btn-ghost2 {
  border-color: rgba(244, 246, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

html[data-mode="light"] .btn-ghost2 {
  border-color: rgba(11, 11, 18, 0.18);
  background: rgba(11, 11, 18, 0.06);
  color: rgba(11, 11, 18, 0.84);
}

.landing-hero {
  position: relative;
  border-radius: 38px;
  padding: 54px 44px;
  background:
    radial-gradient(circle at 22% 20%, rgba(var(--a-rgb), 0.28), transparent 54%),
    radial-gradient(circle at 84% 35%, rgba(var(--b-rgb), 0.18), transparent 55%),
    linear-gradient(180deg, rgba(16, 17, 34, 0.72), rgba(10, 10, 18, 0.78));
  border: 1px solid rgba(var(--a-rgb), 0.22);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.landing-hero::after {
  content: "";
  position: absolute;
  inset: -180px;
  background:
    radial-gradient(circle at 35% 35%, rgba(var(--b-rgb), 0.12), transparent 55%),
    radial-gradient(circle at 70% 55%, rgba(var(--a-rgb), 0.14), transparent 55%);
  filter: blur(6px);
  opacity: 0.8;
  pointer-events: none;
}

.landing-hero > * {
  position: relative;
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 80%, rgba(0, 0, 0, 0.35), transparent 60%),
    radial-gradient(circle at 80% 15%, rgba(0, 0, 0, 0.25), transparent 55%);
  opacity: 0.65;
  pointer-events: none;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.pill-soft {
  border-color: rgba(244, 246, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(244, 246, 255, 0.78);
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 12px;
}

.landing-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 26px;
}

.landing-hero-copy {
  min-width: 0;
}

.landing-h1 {
  margin: 0;
  font-weight: 1000;
  letter-spacing: -0.06em;
  line-height: 0.95;
  font-size: clamp(42px, 5.5vw, 72px);
  text-transform: uppercase;
}

.landing-lead {
  margin: 16px 0 0;
  max-width: 52ch;
  color: rgba(244, 246, 255, 0.78);
  font-weight: 850;
  line-height: 1.6;
  font-size: 16px;
}

.landing-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.landing-fine {
  margin: 14px 0 0;
  color: rgba(244, 246, 255, 0.66);
  font-weight: 850;
}

.landing-link {
  color: rgba(var(--b-rgb), 0.95);
  text-decoration: none;
  font-weight: 950;
}

.landing-link:hover {
  text-decoration: underline;
}

.acct-switch {
  margin-top: 14px;
  padding: 12px 12px;
}

.acct-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.acct-btn {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(var(--a-rgb), 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  text-align: left;
}

.acct-btn:hover {
  border-color: rgba(var(--b-rgb), 0.32);
  background: rgba(var(--b-rgb), 0.08);
}

.acct-ava {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 1000;
  background: radial-gradient(circle at 35% 25%, rgba(var(--b-rgb), 0.55), rgba(var(--a-rgb), 0.12));
  border: 1px solid rgba(var(--a-rgb), 0.18);
}

.acct-meta {
  display: grid;
  gap: 2px;
}

.acct-name {
  font-weight: 1000;
  letter-spacing: -0.01em;
}

.acct-sub {
  color: var(--muted2);
  font-weight: 850;
  font-size: 12px;
}

.spotify-box {
  margin-top: 10px;
}

.spotify-box .spotify-link {
  margin-top: 10px;
}

.spotify-box .spotify-note {
  margin-top: 8px;
}

.conn-ico {
  display: inline-flex;
  vertical-align: middle;
  margin-right: 8px;
  opacity: 0.95;
}

.conn-ico .ico-svg {
  width: 18px;
  height: 18px;
}

.conn-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.conn-mini {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(var(--a-rgb), 0.16);
}

.conn-mini svg {
  width: 16px;
  height: 16px;
  display: block;
}

.landing-hero-art {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
}

.art-float {
  position: absolute;
  border-radius: 999px;
  filter: blur(0.2px);
  opacity: 0.9;
  animation: floaty 8s ease-in-out infinite;
}

.art-a {
  width: 160px;
  height: 160px;
  left: 8%;
  top: 8%;
  background: radial-gradient(circle at 30% 30%, rgba(var(--b-rgb), 0.75), rgba(var(--b-rgb), 0.08) 62%, transparent 65%);
}

.art-b {
  width: 220px;
  height: 220px;
  right: 10%;
  top: 18%;
  animation-duration: 10s;
  background: radial-gradient(circle at 35% 35%, rgba(var(--a-rgb), 0.72), rgba(var(--a-rgb), 0.08) 64%, transparent 67%);
}

.art-c {
  width: 130px;
  height: 130px;
  right: 24%;
  bottom: 8%;
  animation-duration: 11s;
  background: radial-gradient(circle at 35% 35%, rgba(244, 246, 255, 0.35), rgba(244, 246, 255, 0.06) 64%, transparent 67%);
}

@keyframes floaty {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -12px, 0);
  }
}

.device {
  border-radius: 26px;
  border: 1px solid rgba(244, 246, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
  overflow: hidden;
}

.device-monitor {
  width: min(520px, 100%);
  transform: rotate(-2deg);
}

.device-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(244, 246, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
}

.device-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(244, 246, 255, 0.16);
}

.device-dot:nth-child(1) {
  background: rgba(255, 90, 82, 0.85);
}
.device-dot:nth-child(2) {
  background: rgba(255, 214, 102, 0.85);
}
.device-dot:nth-child(3) {
  background: rgba(95, 231, 148, 0.85);
}

.device-label {
  margin-left: 6px;
  font-weight: 980;
  letter-spacing: -0.02em;
  font-size: 13px;
  color: rgba(244, 246, 255, 0.86);
}

.device-body {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.ui-row {
  display: flex;
  gap: 8px;
}

.ui-pill {
  height: 12px;
  width: 64px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(244, 246, 255, 0.10);
}

.ui-pill-wide {
  width: 140px;
}

.ui-chat {
  display: grid;
  gap: 10px;
}

.ui-msg {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
}

.ui-msg.ui-me {
  grid-template-columns: 1fr;
  justify-items: end;
}

.ui-ava {
  width: 24px;
  height: 24px;
  border-radius: 10px;
  background: rgba(var(--a-rgb), 0.14);
  border: 1px solid rgba(var(--a-rgb), 0.18);
  background-size: cover;
  background-position: center;
}

.ui-bub {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(244, 246, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 246, 255, 0.9);
  font-weight: 850;
  font-size: 13px;
  max-width: 340px;
}

.ui-msg.ui-me .ui-bub {
  border-color: rgba(var(--b-rgb), 0.20);
  box-shadow: 0 0 30px rgba(var(--b-rgb), 0.10);
}

.ui-input {
  height: 36px;
  border-radius: 18px;
  border: 1px solid rgba(244, 246, 255, 0.10);
  background: rgba(0, 0, 0, 0.16);
}

.device-phone {
  position: absolute;
  width: 160px;
  height: 320px;
  right: 4%;
  bottom: -8%;
  border-radius: 34px;
  transform: rotate(6deg);
  background: rgba(0, 0, 0, 0.26);
}

.phone-screen {
  height: 100%;
  border-radius: 34px;
  padding: 14px;
  background:
    radial-gradient(circle at 20% 20%, rgba(var(--b-rgb), 0.14), transparent 60%),
    radial-gradient(circle at 70% 60%, rgba(var(--a-rgb), 0.16), transparent 62%),
    rgba(0, 0, 0, 0.12);
}

.phone-top {
  height: 10px;
  width: 72px;
  margin: 6px auto 12px;
  border-radius: 999px;
  background: rgba(244, 246, 255, 0.12);
}

.phone-cards {
  display: grid;
  gap: 10px;
}

.phone-card {
  height: 58px;
  border-radius: 18px;
  border: 1px solid rgba(244, 246, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
}

.landing-sections {
  display: grid;
  gap: 14px;
}

.lp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: center;
  padding: 26px 26px;
  border-radius: 30px;
  background: var(--surface2);
  border: 1px solid rgba(var(--a-rgb), 0.18);
  box-shadow: var(--shadowSoft);
  backdrop-filter: blur(16px);
  overflow: hidden;
  position: relative;
}

.lp-row::before {
  content: "";
  position: absolute;
  inset: -120px;
  background:
    radial-gradient(circle at 20% 20%, rgba(var(--a-rgb), 0.14), transparent 55%),
    radial-gradient(circle at 80% 55%, rgba(var(--b-rgb), 0.10), transparent 55%);
  opacity: 0.8;
  pointer-events: none;
}

.lp-row > * {
  position: relative;
  z-index: 1;
}

.lp-row-rev {
  grid-template-columns: 1fr 1fr;
}

.lp-row-rev .lp-text {
  order: 2;
}

.lp-row-rev .lp-illus {
  order: 1;
}

.lp-h2 {
  margin: 0;
  font-weight: 1000;
  letter-spacing: -0.05em;
  line-height: 1.05;
  font-size: clamp(24px, 3.2vw, 38px);
}

.lp-p {
  margin: 10px 0 0;
  color: rgba(244, 246, 255, 0.72);
  font-weight: 850;
  line-height: 1.7;
}

.lp-illus {
  min-height: 220px;
  position: relative;
  display: grid;
  place-items: center;
}

.illus-card {
  position: absolute;
  border-radius: 24px;
  border: 1px solid rgba(244, 246, 255, 0.12);
  background: rgba(0, 0, 0, 0.20);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
}

.illus-card-lg {
  width: 320px;
  height: 190px;
  transform: rotate(-2deg);
}
.illus-card-md {
  width: 260px;
  height: 160px;
  transform: rotate(6deg);
  top: 22px;
  left: 40px;
  background: rgba(255, 255, 255, 0.04);
}
.illus-card-sm {
  width: 200px;
  height: 120px;
  transform: rotate(-10deg);
  top: 78px;
  right: 32px;
  background: rgba(255, 255, 255, 0.03);
}

.illus-chat {
  width: min(380px, 100%);
  height: 210px;
  border-radius: 26px;
  border: 1px solid rgba(244, 246, 255, 0.12);
  background: rgba(0, 0, 0, 0.20);
  position: relative;
  overflow: hidden;
}

.illus-line {
  position: absolute;
  left: 18px;
  right: 18px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(244, 246, 255, 0.10);
  top: 28px;
}

.illus-line-2 {
  top: 72px;
  width: 74%;
}
.illus-line-3 {
  top: 116px;
  width: 62%;
}

.illus-badge {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 82px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(140deg, rgba(var(--b-rgb), 1), rgba(var(--a-rgb), 1));
  opacity: 0.9;
}

.illus-shield {
  width: 240px;
  height: 240px;
  border-radius: 999px;
  border: 1px solid rgba(244, 246, 255, 0.10);
  background: rgba(0, 0, 0, 0.16);
  display: grid;
  place-items: center;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
}

.illus-svg {
  width: 140px;
  height: 140px;
  filter: drop-shadow(0 10px 30px rgba(0, 216, 255, 0.10));
}

.landing-final {
  border-radius: 34px;
  padding: 30px 26px;
  background: var(--surface);
  border: 1px solid rgba(var(--a-rgb), 0.18);
  box-shadow: var(--shadowSoft);
  backdrop-filter: blur(16px);
}

.landing-final-inner {
  display: grid;
  justify-items: start;
  gap: 6px;
}

@media (max-width: 980px) {
  .nav-links {
    display: none;
  }
  .landing-hero {
    padding: 40px 22px;
  }
  .landing-hero-grid {
    grid-template-columns: 1fr;
  }
  .landing-hero-art {
    min-height: 340px;
  }
  .device-phone {
    right: 2%;
  }
  .lp-row {
    grid-template-columns: 1fr;
  }
  .lp-row-rev .lp-text,
  .lp-row-rev .lp-illus {
    order: initial;
  }
}

/* Full profile modal */
.full-profile {
  width: min(980px, calc(100vw - 24px));
  max-height: min(720px, calc(100vh - 24px));
  overflow: hidden;
}

.full-body {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 14px;
  padding: 14px;
  min-height: 0;
}

.full-left {
  border-radius: 22px;
  border: 1px solid rgba(var(--a-rgb), 0.14);
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
  min-height: 0;
}

.full-hero {
  padding: 12px;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
}

.full-ava {
  width: 64px;
  height: 64px;
  border-radius: 22px;
}

.full-name {
  font-weight: 980;
  letter-spacing: -0.03em;
  font-size: 20px;
}

.full-user {
  margin-top: 2px;
  color: rgba(244, 246, 255, 0.62);
  font-size: 13px;
  font-weight: 850;
}

.full-meta {
  padding: 0 12px 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.full-right {
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: 12px;
  overflow: auto;
}

.mini-tabs {
  justify-content: flex-start;
  gap: 8px;
}

@media (max-width: 860px) {
  .full-body {
    grid-template-columns: 1fr;
  }
}

/* -------------------------
   Server Settings modal
-------------------------- */
.server-settings {
  width: min(980px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 40px));
  overflow: hidden;
}

.server-settings-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  padding: 14px;
}

.server-settings-nav {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(140, 110, 255, 0.18);
  border-radius: 18px;
  padding: 10px;
  min-height: 520px;
}

.server-settings-main {
  min-height: 520px;
  overflow: auto;
  padding-right: 6px;
}

.srv-pane.is-hidden {
  display: none;
}

.srv-modpane.is-hidden {
  display: none;
}

.server-settings-two {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 14px;
  align-items: start;
}

.server-settings .card {
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(140, 110, 255, 0.18);
  background: rgba(0, 0, 0, 0.38);
}

.role-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}
.role-row:hover {
  border-color: rgba(140, 110, 255, 0.35);
  background: rgba(140, 110, 255, 0.08);
}
.role-row.is-on {
  border-color: rgba(140, 110, 255, 0.55);
  background: rgba(140, 110, 255, 0.12);
}
.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.role-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}
.role-name {
  font-weight: 900;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.perm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin-top: 10px;
}
.perm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}
.perm-item input {
  width: 18px;
  height: 18px;
}

.invite-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}
.invite-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 800;
  letter-spacing: 0.08em;
}

@media (max-width: 860px) {
  .server-settings-grid {
    grid-template-columns: 1fr;
  }
  .server-settings-two {
    grid-template-columns: 1fr;
  }
  .server-settings-nav {
    min-height: auto;
  }
}

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

.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.chat-search {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  margin: 10px 0 0;
  border-radius: 18px;
  border: 1px solid rgba(140, 110, 255, 0.18);
  background: rgba(0, 0, 0, 0.38);
}

.pin-row {
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}
.pin-row .muted {
  margin-top: 6px;
}

.msg-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-left: 10px;
}

.msgrow:hover .msg-actions {
  opacity: 1;
}

.msg-edited {
  margin-left: 8px;
  color: rgba(244, 246, 255, 0.55);
  font-size: 12px;
  font-weight: 800;
}

.msg-reply {
  margin: 6px 0 8px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(140, 110, 255, 0.08);
  color: rgba(244, 246, 255, 0.78);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}
.msg-reply:hover {
  border-color: rgba(140, 110, 255, 0.38);
}

.msg-reacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.react-chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(244, 246, 255, 0.85);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 900;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
}
.react-chip.is-mine {
  border-color: rgba(80, 200, 255, 0.5);
  background: rgba(80, 200, 255, 0.12);
}

.msgrow.is-hit .msg-bubble {
  outline: 2px solid rgba(80, 200, 255, 0.45);
  box-shadow: 0 0 0 6px rgba(80, 200, 255, 0.12);
}

.inline-emoji {
  width: 22px;
  height: 22px;
  vertical-align: -4px;
  display: inline-block;
  object-fit: contain;
}
