:root {
  --discord: #5865f2;
  --discord-dark: #3440cf;
  --discord-soft: #eef0ff;
  --ink: #1f2333;
  --muted: #6b7488;
  --line: rgba(88, 101, 242, 0.16);
  --card: rgba(255, 255, 255, 0.82);
  --shadow: 0 24px 80px rgba(55, 65, 110, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 10%, rgba(88, 101, 242, 0.18), transparent 28rem),
    radial-gradient(circle at 84% 72%, rgba(35, 165, 90, 0.11), transparent 26rem),
    linear-gradient(135deg, #f6f8ff 0%, #e9edff 48%, #fbfcff 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  width: 22px;
  height: 22px;
}

svg path,
svg circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.discord-glyph path,
.discord-login svg path,
.discord-chip svg path {
  fill: currentColor;
  stroke: none;
}

.app-shell {
  min-height: 100vh;
  padding: 18px;
}

.app-surface {
  min-height: calc(100vh - 36px);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 34px;
  padding: 18px clamp(16px, 4vw, 54px) 54px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.92)),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    linear-gradient(var(--line) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
  box-shadow: var(--shadow);
  overflow: visible;
  animation: page-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.992);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.topbar {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 18px;
  z-index: 8;
}

.brand-link,
.profile-button,
.topnav,
.icon-control {
  border: 1px solid rgba(88, 101, 242, 0.14);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 30px rgba(53, 63, 120, 0.08);
  backdrop-filter: blur(10px);
}

.brand-link {
  justify-self: start;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 0 10px;
  border-radius: 16px;
  font-weight: 900;
}

.brand-link img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.topnav {
  width: fit-content;
  justify-self: center;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
}

.topnav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 12px;
  color: #4e5871;
  font-weight: 800;
}

.topnav a:hover,
.topnav a[aria-current="page"] {
  color: var(--discord-dark);
  background: var(--discord-soft);
}

.top-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.language-picker,
.profile-menu {
  position: relative;
}

.icon-control {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--discord);
}

.language-menu,
.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 238px;
  max-height: 316px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(88, 101, 242, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 50px rgba(28, 35, 80, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 180ms ease, transform 180ms ease;
}

.language-picker[data-open="true"] .language-menu,
.language-picker:hover .language-menu,
.language-picker:focus-within .language-menu,
.profile-menu[data-open="true"] .profile-dropdown,
.profile-menu:focus-within .profile-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.language-option,
.profile-dropdown a,
.profile-dropdown button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 12px;
  padding: 0 12px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  font-weight: 800;
}

.language-option small {
  color: var(--muted);
  font-weight: 700;
}

.language-option:hover,
.language-option[aria-selected="true"],
.profile-dropdown a:hover,
.profile-dropdown button:hover {
  background: var(--discord-soft);
  color: var(--discord-dark);
}

.profile-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  padding: 5px 12px 5px 6px;
  color: var(--ink);
  font-weight: 900;
}

.profile-button img {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  object-fit: cover;
}

.view {
  display: none;
}

body.view-home .view-home,
body.view-search .view-home,
body.view-dev .view-dev,
body.view-connect .view-connect,
body.view-help .view-help,
body.view-settings .view-settings,
body.view-server .view-server,
body.view-status .view-status {
  display: flex;
}

body.host-dev .topnav,
body.host-search .topnav {
  display: none;
}

.view-home {
  min-height: calc(100vh - 190px);
  align-items: center;
  justify-content: center;
}

.hero-content {
  width: min(980px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: center;
}

.brand-mark {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(88, 101, 242, 0.16), inset 0 -2px 0 rgba(88, 101, 242, 0.08);
}

.brand-mark img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

h1 {
  max-width: 920px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  text-align: center;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 0.98;
  letter-spacing: 0;
  color: #171a28;
}

.discord-chip {
  width: clamp(52px, 9vw, 84px);
  height: clamp(52px, 9vw, 84px);
  display: inline-grid;
  place-items: center;
  color: var(--discord);
  transform: translateY(3px);
}

.discord-chip svg {
  width: 100%;
  height: 100%;
}

.search-card {
  width: min(680px, 100%);
  height: 66px;
  display: grid;
  grid-template-columns: 1fr 46px 46px;
  align-items: center;
  gap: 4px;
  padding: 0 12px 0 24px;
  border: 1px solid rgba(32, 35, 49, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 18px 0 -10px rgba(32, 35, 49, 0.18),
    0 18px 36px rgba(72, 82, 140, 0.16),
    inset 0 2px 3px rgba(255, 255, 255, 0.9),
    inset 0 -3px 5px rgba(32, 35, 49, 0.08);
  transform: perspective(900px) rotateX(2deg);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.search-card:focus-within {
  transform: perspective(900px) rotateX(0deg) translateY(-2px);
  box-shadow:
    0 20px 0 -11px rgba(32, 35, 49, 0.14),
    0 24px 48px rgba(72, 82, 140, 0.2),
    inset 0 2px 3px rgba(255, 255, 255, 0.9);
}

.search-card input,
.select-row input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #222636;
  font-size: 20px;
  font-weight: 800;
}

.search-card input::placeholder,
.select-row input::placeholder {
  color: #aeb5c2;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #2d3040;
  background: transparent;
}

.icon-button:hover {
  color: var(--discord);
  background: var(--discord-soft);
}

.discord-login {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 16px;
  padding: 0 20px;
  color: #fff;
  background: linear-gradient(180deg, #6571ff, var(--discord));
  box-shadow: 0 16px 32px rgba(88, 101, 242, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.discord-login:hover {
  background: linear-gradient(180deg, #707bff, var(--discord-dark));
  transform: translateY(-1px);
}

.discord-login svg {
  width: 24px;
  height: 24px;
}

body.logged-in [data-login] {
  display: none;
}

.server-section {
  display: block;
  width: min(1120px, 100%);
  margin: -26px auto 0;
  padding-bottom: 14px;
}

body.view-dev .server-section,
body.view-connect .server-section,
body.view-help .server-section,
body.view-settings .server-section,
body.view-status .server-section,
body.view-server .server-section {
  display: none;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 38px);
}

.section-heading p {
  max-width: 380px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.server-card {
  min-height: 170px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid rgba(88, 101, 242, 0.14);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 14px 34px rgba(53, 63, 120, 0.08);
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.server-card:not(.empty) {
  cursor: pointer;
}

.server-card:not(.empty):hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(53, 63, 120, 0.14);
}

.server-card.golden-server,
.server-hero-card:has(.gold-badge) {
  border-color: rgba(240, 178, 50, 0.48);
  box-shadow: 0 18px 48px rgba(240, 178, 50, 0.14), 0 14px 34px rgba(53, 63, 120, 0.08);
}

.gold-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  color: #8a5d00;
  background: #fff3c4;
  font-size: 12px;
  font-weight: 950;
}

.server-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.server-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: var(--server-color, var(--discord));
  font-size: 21px;
  font-weight: 950;
  overflow: hidden;
}

.server-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.server-card h3 {
  margin: 0;
  font-size: 19px;
}

.server-card p {
  margin: 16px 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.server-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #4e5871;
  font-size: 13px;
  font-weight: 850;
}

.server-actions,
.manage-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.join-button,
.soft-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(88, 101, 242, 0.16);
  border-radius: 12px;
  padding: 0 13px;
  font-weight: 900;
}

.join-button {
  color: #fff;
  background: #23a55a;
  box-shadow: 0 10px 22px rgba(35, 165, 90, 0.2);
}

.soft-button {
  color: var(--discord-dark);
  background: var(--discord-soft);
}

.soft-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.server-card.empty {
  color: transparent;
  background:
    linear-gradient(90deg, transparent, rgba(180, 188, 210, 0.28), transparent),
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72));
  background-size: 220% 100%, 100% 100%;
  animation: shimmer 1.9s ease-in-out infinite;
}

@keyframes shimmer {
  from {
    background-position: 120% 0, 0 0;
  }

  to {
    background-position: -120% 0, 0 0;
  }
}

.view-dev,
.view-connect,
.view-help,
.view-settings,
.view-server,
.view-status {
  min-height: calc(100vh - 142px);
  align-items: center;
  justify-content: center;
  text-align: center;
}

.view-dev,
.route-panel,
.settings-layout {
  animation: page-in 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.view-dev {
  flex-direction: column;
  gap: 26px;
}

.view-dev p,
.route-panel p {
  max-width: 690px;
  margin: 0;
  color: #64708a;
  font-size: clamp(18px, 3vw, 24px);
  line-height: 1.45;
  font-weight: 650;
}

.dev-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(88, 101, 242, 0.18);
  border-radius: 999px;
  color: var(--discord-dark);
  background: rgba(238, 240, 255, 0.82);
  font-size: 14px;
  font-weight: 900;
}

.dev-grid,
.docs-grid {
  width: min(860px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.dev-grid div,
.docs-grid article,
.guild-card,
.settings-card,
.settings-sidebar {
  border: 1px solid rgba(88, 101, 242, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(53, 63, 120, 0.08);
}

.dev-grid div,
.docs-grid article {
  min-height: 122px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 18px;
}

.dev-grid strong,
.docs-grid h2 {
  margin: 0;
  font-size: 17px;
}

.dev-grid span,
.docs-grid p {
  margin: 0;
  color: #66718a;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 650;
}

.route-panel {
  width: min(920px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.route-panel h1 {
  font-size: clamp(38px, 7vw, 72px);
}

.select-row {
  width: min(720px, 100%);
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 22px;
  border: 1px solid rgba(88, 101, 242, 0.15);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 36px rgba(53, 63, 120, 0.1);
}

.guild-list {
  width: min(720px, 100%);
  display: grid;
  gap: 10px;
}

body.view-connect .guild-list {
  width: min(980px, 100%);
}

.guild-card {
  min-height: 74px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  text-align: left;
}

.guild-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--discord);
  font-weight: 900;
  overflow: hidden;
}

.guild-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guild-card strong,
.guild-card span {
  display: block;
}

.guild-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.manage-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(88, 101, 242, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(53, 63, 120, 0.08);
  text-align: left;
}

.manage-card-head {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 14px;
}

.manage-card strong,
.manage-card span {
  display: block;
}

.manage-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.manage-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.manage-stats span {
  min-height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(88, 101, 242, 0.12);
  border-radius: 8px;
  padding: 10px;
  background: rgba(238, 240, 255, 0.58);
}

.manage-stats strong {
  color: var(--ink);
  font-size: 18px;
}

.manage-stats small {
  color: var(--muted);
  font-weight: 800;
}

.docs-panel {
  text-align: left;
}

.docs-panel h1 {
  align-self: center;
}

.docs-panel .dev-kicker {
  align-self: center;
}

.docs-grid {
  grid-template-columns: repeat(2, 1fr);
}

.settings-layout {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 14px;
  text-align: left;
}

.settings-sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
}

.settings-sidebar button {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  color: #505a72;
  background: transparent;
  font-weight: 850;
  text-align: left;
}

.settings-sidebar button:hover,
.settings-sidebar button[aria-current="page"] {
  color: var(--discord-dark);
  background: var(--discord-soft);
}

.server-page {
  text-align: left;
}

.server-hero-card {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 20px;
  padding: 26px;
  border: 1px solid rgba(88, 101, 242, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(53, 63, 120, 0.08);
}

.server-hero-card .server-icon {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  font-size: 34px;
}

.server-hero-card h1 {
  justify-content: flex-start;
  text-align: left;
  font-size: clamp(34px, 6vw, 64px);
}

.server-hero-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  font-weight: 700;
}

.server-edit {
  width: 100%;
  min-height: 130px;
  margin-top: 18px;
  resize: vertical;
  border: 1px solid rgba(88, 101, 242, 0.16);
  border-radius: 14px;
  padding: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  font: inherit;
  font-weight: 700;
  outline: 0;
}

.server-edit:focus {
  border-color: rgba(88, 101, 242, 0.48);
  box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.1);
}

.tag-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(88, 101, 242, 0.16);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--discord-dark);
  background: var(--discord-soft);
  font-weight: 850;
}

.tag-pill button {
  border: 0;
  color: inherit;
  background: transparent;
  font-weight: 950;
}

.publish-panel {
  width: 100%;
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(88, 101, 242, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.publish-panel input[type="text"],
.publish-panel textarea {
  width: 100%;
  border: 1px solid rgba(88, 101, 242, 0.16);
  border-radius: 14px;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-weight: 750;
  outline: 0;
}

.color-row,
.review-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.star-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  color: #9aa3b8;
  background: rgba(255, 255, 255, 0.78);
  font-size: 20px;
}

.star-button[data-active="true"],
.rating-stars {
  color: #f0b232;
}

.similar-list {
  width: min(920px, 100%);
  display: grid;
  gap: 10px;
}

.similar-card {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(88, 101, 242, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(53, 63, 120, 0.08);
}

.status-grid {
  width: min(780px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.status-card {
  min-height: 132px;
  padding: 18px;
  border: 1px solid rgba(88, 101, 242, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(53, 63, 120, 0.08);
}

.status-dot {
  width: 11px;
  height: 11px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 8px;
  background: #23a55a;
}

.status-dot.quiet {
  background: #f0b232;
}

.status-dot.offline {
  background: #ed4245;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 24px;
  color: var(--ink);
  background:
    linear-gradient(rgba(248, 250, 255, 0.92), rgba(248, 250, 255, 0.96)),
    linear-gradient(90deg, rgba(88, 101, 242, 0.1) 1px, transparent 1px),
    linear-gradient(rgba(88, 101, 242, 0.1) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.auth-screen[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.auth-screen p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.loader-orbit {
  width: 84px;
  height: 84px;
  position: relative;
  border-radius: 50%;
  border: 8px solid rgba(88, 101, 242, 0.14);
  border-top-color: var(--discord);
  animation: spin 1s linear infinite;
}

.loader-orbit span {
  width: 16px;
  height: 16px;
  position: absolute;
  top: -1px;
  left: 50%;
  border-radius: 50%;
  background: var(--discord);
  transform: translateX(-50%);
  animation: drop 1.35s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes drop {
  0%, 100% {
    transform: translate(-50%, -22px) scale(0.7);
  }
  45% {
    transform: translate(-50%, 34px) scale(1);
  }
}

.settings-card {
  min-height: 390px;
  padding: 28px;
}

.settings-card h1 {
  justify-content: flex-start;
  text-align: left;
  font-size: clamp(30px, 5vw, 50px);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(88, 101, 242, 0.12);
}

.setting-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.toggle {
  width: 54px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 4px;
  background: #dfe3f4;
}

.toggle::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.14);
  transition: transform 160ms ease;
}

.toggle[aria-pressed="true"] {
  background: var(--discord);
}

.toggle[aria-pressed="true"]::before {
  transform: translateX(22px);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 22, 40, 0.36);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.modal-backdrop[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: min(430px, 100%);
  position: relative;
  padding: 36px 34px 32px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 20, 48, 0.24);
  text-align: center;
  transform: translateY(14px) scale(0.96);
  transition: transform 220ms ease;
}

.modal-backdrop[data-open="true"] .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #6b7285;
  background: var(--discord-soft);
}

.modal-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(180deg, #6874ff, var(--discord));
  box-shadow: 0 14px 30px rgba(88, 101, 242, 0.24);
}

.modal h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.modal p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.55;
}

.modal-login {
  width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

  .topnav {
    display: none;
  }

  .server-grid,
  .dev-grid,
  .docs-grid,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 0;
  }

  .app-surface {
    min-height: 100vh;
    border-radius: 0;
    padding: 14px 14px 42px;
  }

  .brand-link span,
  .profile-button span {
    display: none;
  }

  .discord-login {
    min-height: 46px;
    padding: 0 14px;
  }

  .top-actions {
    gap: 8px;
  }

  .view-home {
    min-height: calc(100vh - 150px);
  }

  h1 {
    font-size: clamp(38px, 13vw, 62px);
  }

  .search-card {
    height: 60px;
    grid-template-columns: 1fr 42px 42px;
    padding-left: 20px;
  }

  .search-card input,
  .select-row input {
    font-size: 18px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .select-row {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .guild-card {
    grid-template-columns: 42px 1fr;
  }

  .guild-card .discord-login {
    grid-column: 1 / -1;
  }

  .manage-card-head,
  .manage-stats {
    grid-template-columns: 1fr;
  }

  .manage-actions {
    justify-content: stretch;
  }

  .manage-actions > * {
    flex: 1 1 auto;
  }
}
