/* MCP Server List — calm directory UI */
:root {
  --brand: #4d6b8a;
  --brand-hover: #6a8bab;
  --brand-deep: #3a5570;
  --brand-soft: rgba(77, 107, 138, 0.14);
  --brand-ring: rgba(77, 107, 138, 0.28);

  --bg: #16171b;
  --bg-raised: #1c1d22;
  --bg-card: #22242a;
  --bg-chip: #2c2e36;
  --bg-input: #121318;
  --bg-header: #25272e;
  --surface: #2a2c34;

  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);

  --text: #e4e6eb;
  --text-muted: #9aa1ae;
  --text-dim: #6e7584;

  --online: #3d9b6e;
  --online-ring: rgba(61, 155, 110, 0.24);
  --star: #e0b84a;
  --star-empty: #7a7e8a;
  --danger: #d66a6c;

  --radius-sm: 0.35rem;
  --radius-md: 0.45rem;
  --radius-lg: 0.65rem;
  --radius-icon: 0.85rem;
  --nav-h: 3.75rem;
  --container: 76rem;
  --gutter: clamp(0.85rem, 2.8vw, 1.25rem);
  --font: "Outfit", system-ui, sans-serif;
  --font-display: "Outfit", system-ui, sans-serif;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: clamp(15.5px, 0.4vw + 14.75px, 17.5px);
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--brand-hover);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #9eb4c9;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 650;
  line-height: 1.25;
  margin: 0;
}

.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

/* —— Navbar —— */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(23, 24, 29, 0.88);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(23, 24, 29, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
}

.navbar.is-scrolled {
  background: rgba(23, 24, 29, 0.96);
  box-shadow: none;
  border-bottom-color: var(--border-strong);
}

.navbar-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: var(--nav-h);
}

.primary-nav {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 1.25rem;
  min-width: 0;
}

.primary-nav__head {
  display: none;
}

.primary-nav__label,
.primary-nav__brand {
  display: none;
}

.nav-toggle,
.nav-close {
  display: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}

.nav-backdrop {
  display: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  flex-shrink: 0;
}

.brand:hover {
  color: var(--text);
}

.brand-logo {
  display: block;
  height: calc(var(--nav-h) - 0.55rem);
  width: auto;
  max-width: min(16rem, 48vw);
  object-fit: contain;
}

.brand--footer .brand-logo {
  height: 2.85rem;
  max-width: 14rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  margin-left: 0.25rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 0;
  background: transparent;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
  background: transparent;
}

.nav-link.is-active {
  color: var(--text);
  background: transparent;
  box-shadow: inset 0 -2px 0 var(--text);
}

.navbar-search {
  flex: 1;
  max-width: 18rem;
  margin-inline: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}

.navbar-search.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.15rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, filter 0.15s ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.btn--ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--border-strong);
}

.btn--ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn--solid {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: none;
}

.btn--solid:hover {
  color: #fff;
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

.btn--outline {
  color: var(--text-muted);
  background: transparent;
  border-color: var(--border-strong);
}

.btn--outline:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

.btn--sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

.btn--login {
  box-sizing: border-box;
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
  height: 2.35rem;
  min-height: 2.35rem;
  padding: 0 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-sm);
}

.btn--login:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.78);
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  cursor: pointer;
  border-radius: 0.35rem;
}

.icon-btn svg {
  display: block;
}

.icon-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* —— Search —— */
.searchbox {
  display: flex;
  width: 100%;
  position: relative;
}

.searchbox input[type="search"] {
  width: 100%;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.searchbox input[type="search"]::placeholder {
  color: var(--text-dim);
}

.searchbox input[type="search"]::-webkit-search-cancel-button,
.searchbox input[type="search"]::-webkit-search-decoration,
.search-page .searchbox--hero input[type="search"]::-webkit-search-cancel-button,
.search-page .searchbox--hero input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
  width: 0;
  height: 0;
}

.searchbox button[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  color: var(--text);
  background: var(--bg-chip);
  transition: background 0.15s ease, color 0.15s ease;
}

.searchbox button[type="submit"]:hover {
  background: #353842;
  color: #fff;
}

.searchbox--hero {
  max-width: 34rem;
}

.searchbox--hero input {
  height: 3.1rem;
  padding: 0 1.15rem;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-right: 0;
  font-size: 1rem;
}

.searchbox--hero input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

.searchbox--hero button[type="submit"] {
  height: 3.1rem;
  padding: 0 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--bg-chip);
  border: 1px solid var(--border-strong);
  border-left: 0;
  color: var(--text);
}

.searchbox button[type="submit"]:hover,
.searchbox--hero button[type="submit"]:hover {
  background: #353842;
  color: #fff;
}

.searchbox--nav input {
  height: 2.2rem;
  padding: 0 2.4rem 0 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  background: transparent;
  border-color: var(--border-strong);
}

.searchbox--nav input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

.searchbox--nav button {
  position: absolute;
  right: 0.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.85rem;
  height: 1.7rem;
  border-radius: var(--radius-sm);
  padding: 0;
  justify-content: center;
  background: transparent;
  color: var(--text-muted);
}

.searchbox--nav button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.searchbox.is-shake {
  animation: shake 0.35s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* —— Dropdown —— */
.dropdown {
  position: relative;
}

.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.dropdown-trigger:hover,
.dropdown.is-open > .dropdown-trigger {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  min-width: 10.5rem;
  padding: 0.3rem;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.14s ease, transform 0.14s var(--ease), visibility 0.14s;
  z-index: 50;
}

.dropdown-menu--right {
  left: auto;
  right: 0;
}

.dropdown.is-open > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.dropdown-item {
  display: block;
  padding: 0.45rem 0.65rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-radius: 0.3rem;
}

.dropdown-item:hover,
.dropdown-item.is-active {
  color: var(--text);
  background: var(--brand-soft);
}

/* Language switcher */
.lang-switcher__btn {
  gap: 0.4rem;
  height: 2.65rem;
  padding: 0 0.85rem;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lang-switcher.is-open > .lang-switcher__btn,
.lang-switcher__btn:hover {
  border-color: rgba(77, 107, 138, 0.45);
  background: var(--brand-soft);
  color: var(--text);
}

.lang-switcher__icon {
  flex-shrink: 0;
  opacity: 0.9;
}

.lang-switcher__code {
  min-width: 1.4rem;
}

.lang-switcher__caret {
  opacity: 0.65;
  transition: transform 0.15s ease;
}

.lang-switcher.is-open .lang-switcher__caret {
  transform: rotate(180deg);
}

.lang-menu {
  width: min(36rem, calc(100vw - 1.5rem));
  padding: 0.55rem;
  max-height: min(70vh, 28rem);
  overflow: auto;
}

.lang-menu__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.15rem;
}

.lang-menu__item {
  padding: 0.55rem 0.7rem;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-menu__item.is-active {
  color: #fff;
  background: rgba(77, 107, 138, 0.28);
  box-shadow: inset 0 0 0 1px rgba(77, 107, 138, 0.35);
}

@media (max-width: 720px) {
  .lang-menu__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* —— Hero —— */
.welcome {
  position: relative;
  z-index: 4;
  min-height: clamp(24rem, 42vw, 30rem);
  height: auto;
  padding: 2.5rem 0 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.welcome-hero {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #1a1b20 0%, #16171b 55%, var(--bg) 100%);
}

.welcome-hero__grid {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 75% 60% at 50% 40%, black 20%, transparent 72%);
  animation: none;
}

.welcome-hero__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 50% 30%, rgba(77, 107, 138, 0.12), transparent 65%),
    linear-gradient(to bottom, transparent 45%, rgba(22, 23, 27, 0.7) 78%, var(--bg) 100%);
}

@keyframes gridDrift {
  from { transform: translateY(0); }
  to { transform: translateY(44px); }
}

.welcome-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  animation: fadeUp 0.55s var(--ease) both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.welcome-eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.welcome-title {
  font-size: clamp(1.55rem, 3.5vw, 2.1rem);
  font-weight: 650;
  text-transform: none;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: none;
  margin-bottom: 0.25rem;
}

.welcome-accent {
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  color: #fff;
  padding: 0.08em 0.36em 0.12em 0.3em;
  margin-inline: 0.08em;
  background: var(--bg-chip);
  border: 1px solid var(--border-strong);
  border-radius: 0.28em;
  box-shadow: none;
  vertical-align: middle;
}

.welcome-accent .discord-icon {
  width: 0.85em;
  height: 0.85em;
  flex-shrink: 0;
  color: #fff;
}

.welcome-cta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  align-self: flex-end;
  width: min(100%, 34rem);
  justify-content: flex-end;
  margin-top: 0.2rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
}

/* —— Home desc —— */
.home-desc {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}

.home-desc p {
  margin: 0;
  max-width: 44rem;
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.home-desc strong {
  color: var(--text);
  font-weight: 600;
}

.brand-inline {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

/* —— Tags —— */
.home-tags {
  padding: 1.75rem 0 0.35rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.6rem;
  background: var(--bg-chip);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.tag:hover {
  color: #fff;
  background: var(--brand-soft);
  border-color: var(--brand-ring);
}

.tag .name {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tag .count {
  font-size: 0.75rem;
  opacity: 0.6;
  font-weight: 500;
}

.tags--featured {
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
}


/* —— Tag page —— */
.tag-page {
  padding: 1.25rem 0 3.5rem;
}

.tag-page__inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tag-hero {
  display: flex;
  align-items: flex-start;
  gap: 1rem 1.15rem;
  padding: 1.35rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.tag-hero__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 1.35rem;
  font-weight: 650;
  color: var(--text);
  background: var(--bg-chip);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}

.tag-hero__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.tag-hero__title {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.tag-hero__meta {
  margin: 0.45rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.tag-hero__meta strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.tag-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.tag-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.25rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: var(--text);
  border-color: rgba(77, 107, 138, 0.45);
  background: var(--brand-soft);
}

.sort-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.sort-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.sort-tab__short {
  display: none;
}

.sort-tab:hover {
  color: var(--text);
}

.sort-tab.is-active {
  color: #fff;
  background: var(--brand);
  font-weight: 700;
}

.tag-listings {
  padding: 0;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 0.85rem;
  margin-top: 1.75rem;
}

.pagination__pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.pagination__btn,
.pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  height: 2.35rem;
  padding: 0 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.pagination__btn:hover,
.pagination__page:hover {
  color: var(--text);
  border-color: var(--brand);
  background: var(--brand-soft);
}

.pagination__page.is-active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.pagination__btn.is-disabled,
.pagination__btn.is-disabled:hover {
  opacity: 0.45;
  pointer-events: none;
  color: var(--text-dim);
  border-color: var(--border);
  background: transparent;
}

.pagination__ellipsis {
  color: var(--text-dim);
  padding: 0 0.2rem;
}

.related-tags {
  padding: 1.25rem 1.35rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.related-tags__title {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

/* —— Listings —— */
.listings-section {
  padding: 2.35rem 0 1.15rem;
}

.listings-section--alt {
  padding-bottom: 3.25rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.section-head h2 {
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.listings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.85rem, 1.5vw, 1.2rem);
}

.listing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding-top: 0.35rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s var(--ease);
}

.listing-card.is-entering {
  animation: cardIn 0.5s var(--ease) both;
}

.listing-card.is-entering:nth-child(1) { animation-delay: 0.02s; }
.listing-card.is-entering:nth-child(2) { animation-delay: 0.05s; }
.listing-card.is-entering:nth-child(3) { animation-delay: 0.08s; }
.listing-card.is-entering:nth-child(4) { animation-delay: 0.11s; }
.listing-card.is-entering:nth-child(5) { animation-delay: 0.14s; }
.listing-card.is-entering:nth-child(6) { animation-delay: 0.17s; }

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .listing-card.is-entering {
    animation: none;
  }
}

.listing-card:hover {
  transform: translateY(-2px);
  border-color: rgba(77, 107, 138, 0.28);
  box-shadow: var(--shadow);
}

/* Single stepped fill (one paint) — tab + body are the same shape */
.server-banner {
  --banner-radius: 20;
  --tab-radius: 10;
  --tab-h: 1.65rem;
  --tab-w: 11rem;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  margin: 0.55rem 0.5rem 0;
  isolation: isolate;
}

.server-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(
      165deg,
      rgba(0, 0, 0, 0.1) 0%,
      rgba(0, 0, 0, 0.26) 50%,
      rgba(0, 0, 0, 0.4) 100%
    ),
    var(--banner, #3a4260);
  -webkit-mask-image: var(--banner-mask);
  mask-image: var(--banner-mask);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  pointer-events: none;
}

.server-banner::after {
  display: none;
}

.server-tabs {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: flex-end;
  min-height: var(--tab-h);
  margin: 0;
  padding: 0 0.85rem;
  background: transparent;
  box-sizing: border-box;
  width: max-content;
  max-width: 90%;
}

.server-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 5.15rem;
  margin: 0;
  padding: 0.65rem 0.75rem 0.7rem 0.25rem;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.server-header::before,
.server-header::after {
  display: none;
}

.server-tabs:has(.server-rating--empty) {
  visibility: hidden;
  pointer-events: none;
}

.server-icon {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-left: 0;
  width: 4.6rem;
  height: 4.6rem;
  border-radius: var(--radius-icon);
  overflow: hidden;
  background: var(--surface);
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.2);
}

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

.server-info {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  justify-content: center;
  padding-right: 0.15rem;
}

.server-rating {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.85rem;
  line-height: 1;
  min-height: 1.15rem;
  transition: color 0.15s ease;
}

.server-rating--empty {
  visibility: hidden;
  pointer-events: none;
  min-width: 8.5rem;
  min-height: 1.15rem;
  display: inline-block;
}

.server-rating:hover {
  color: #fff;
}

.stars {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.star {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  color: var(--star);
}

.star--empty {
  color: rgba(255, 255, 255, 0.45);
}

.star--half {
  color: var(--star);
}

.review-count {
  display: inline-flex;
  align-items: baseline;
  gap: 0.22rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.review-count b {
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.server-rating:hover .review-count {
  color: rgba(255, 255, 255, 0.88);
}

.server-rating:hover .review-count b {
  color: #fff;
}

.server-misc {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
}

.server-online {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-weight: 600;
  color: #fff;
}

.server-online::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 0 2px var(--online-ring);
}

.server-bumped {
  opacity: 0.85;
}

.server-menu {
  margin-left: auto;
}

.server-menu .dropdown-trigger {
  color: rgba(255, 255, 255, 0.7);
  border: 0;
  padding: 0.15rem 0.35rem;
  font-size: 1.45rem;
  line-height: 1;
}

.server-name {
  font-size: 1.08rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-name a {
  color: #fff;
}

.server-name a:hover {
  color: #c5cbff;
}

.server-body {
  flex: 1;
  padding: 0.9rem 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.server-body .tags .tag {
  background: #353744;
  padding: 0.28rem 0.48rem;
}

.server-body .tags .tag .name {
  font-size: 0.72rem;
}

.server-description {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

.server-description__inner {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  overflow: hidden;
  white-space: pre-line;
  word-break: break-word;
}

.server-description.is-collapsed .server-description__inner {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.server-description.is-expanded .server-description__inner {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

.server-description__toggle {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.1rem 0;
  margin: 0;
  font-family: var(--font);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--brand-hover);
  cursor: pointer;
  line-height: 1.2;
  user-select: none;
}

.server-description__toggle:hover {
  color: #9aa3ff;
  text-decoration: underline;
}

.server-description__toggle:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 2px;
}

.server-description:not(.is-collapsible) .server-description__toggle {
  display: none;
}

.server-join {
  padding: 0.65rem 1rem 1.05rem;
}

.btn-join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: min(100%, 10.5rem);
  height: 2.65rem;
  padding: 0 1.15rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand) 48%, var(--brand-deep) 100%);
  border-radius: 2.65rem;
  transition: transform 70ms ease-out, filter 0.15s ease;
  box-sizing: border-box;
  max-width: 100%;
}

.btn-join:hover {
  color: #fff;
  transform: scale(1.04);
  filter: brightness(1.05);
}

.btn-join--panel {
  display: none;
}

.join-icons {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.join-icon {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 32%;
  border: 2px solid #fff;
  object-fit: cover;
}

.icon-arrow {
  opacity: 0.9;
}

/* —— Server detail page —— */
.page-server .navbar-search {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.page-server .footer {
  padding-bottom: 6rem;
}

.server-page {
  padding-bottom: 7rem;
}

.server-page__hero {
  height: clamp(3.5rem, 7vw, 4.75rem);
  background: var(--hero, linear-gradient(180deg, #1c1e26, #16171b));
  border-bottom: 1px solid var(--border);
}

.server-page__content {
  margin-top: -3.15rem;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.65rem;
}

.breadcrumbs {
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.breadcrumbs::-webkit-scrollbar {
  display: none;
  height: 0;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
  width: max-content;
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-dim);
  line-height: 1.25;
}

.breadcrumbs__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 14rem;
  padding: 0.2rem 0.15rem;
  color: var(--text-dim);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

.breadcrumbs__link:hover,
.breadcrumbs__link:focus-visible {
  color: var(--text-muted);
}

.breadcrumbs__link:focus-visible {
  outline: 2px solid var(--border-strong);
  outline-offset: 2px;
}

.breadcrumbs__home {
  flex-shrink: 0;
  opacity: 0.85;
}

.breadcrumbs__text,
.breadcrumbs__current {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumbs__current {
  display: inline-block;
  max-width: min(22rem, 52vw);
  padding: 0.2rem 0.15rem;
  color: var(--text-muted);
  font-weight: 550;
}

.breadcrumbs__sep {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin: 0 0.05rem;
  color: var(--text-dim);
  opacity: 0.7;
}

.breadcrumbs__sep svg {
  display: block;
}

.server-panel {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0 1.5rem 1.75rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.server-panel__banner {
  position: relative;
  margin: 0 0 0 -1.5rem;
  aspect-ratio: 16 / 8;
  max-height: 17.5rem;
  width: auto;
  max-width: calc(58% + 1.5rem);
  background: linear-gradient(135deg, #3a0a0a, #7a1010);
  overflow: hidden;
}

.server-panel__banner-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.server-panel__banner-fade {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(180deg, transparent 0%, var(--bg-card) 100%);
  pointer-events: none;
  z-index: 1;
}

.server-rank {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.06em;
  user-select: none;
  pointer-events: none;
}

.server-rank__num {
  display: inline-flex;
  align-items: baseline;
  gap: 0.05rem;
  line-height: 0.85;
}

.server-rank__votes {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.25;
  color: var(--text-muted);
}

.server-rank__votes b {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.server-rank--panel {
  align-self: flex-end;
}

.server-rank__hash {
  font-size: clamp(2.85rem, 4.8vw, 4rem);
  color: var(--brand-hover);
  font-weight: 700;
}

.server-rank__value {
  font-size: clamp(4.25rem, 7.5vw, 6.25rem);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.server-panel__head {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin: -7.15rem 0 1.35rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 2;
}

.server-panel__identity {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  min-width: 0;
  flex: 1 1 auto;
  max-width: calc(58% + 1.5rem);
}

.server-panel__cta {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.5rem;
  min-width: 0;
  flex: 0 0 auto;
  padding-top: 0;
}

.server-panel__icon {
  width: 7rem;
  height: 7rem;
  border-radius: var(--radius-icon);
  border: 4px solid var(--bg-card);
  background: var(--bg-raised);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.server-panel__titles {
  min-width: 0;
  padding-bottom: 0.15rem;
}

.server-panel__name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.65rem;
  margin-bottom: 0.45rem;
}

.server-panel__name {
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  letter-spacing: -0.02em;
  color: #fff;
  overflow-wrap: anywhere;
}

.guild-tag {
  --tag-primary: #5865f2;
  --tag-secondary: #7289da;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  height: 1.4rem;
  padding: 0 0.4rem 0 0.22rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--tag-primary) 72%, #111214) 0%,
      color-mix(in srgb, var(--tag-secondary) 55%, #111214) 100%
    );
  border: 1px solid color-mix(in srgb, var(--tag-secondary) 55%, transparent);
  border-radius: 0.3rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  line-height: 1;
  vertical-align: middle;
}

.guild-tag__badge {
  width: 1rem;
  height: 1rem;
  object-fit: contain;
  flex-shrink: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.guild-tag__text {
  transform: translateY(0.5px);
}

.server-panel__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.member-pill {
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
  max-width: 100%;
  overflow: hidden;
  border-radius: 999px;
  font-size: 0.92rem;
  line-height: 1;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.member-pill__online,
.member-pill__members {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.42rem 0.85rem;
  white-space: nowrap;
}

.member-pill__online {
  color: #fff;
  background: var(--brand);
}

.member-pill__members {
  color: var(--brand);
  background: #fff;
  padding-right: 0.95rem;
}

.member-pill strong {
  font-weight: 700;
}

.boost-badge {
  --boost: #ff73fa;
  --boost-deep: #c74deb;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.7rem 0.3rem 0.45rem;
  border-radius: 0.5rem;
  background: #1e1f22;
  border: 1px solid rgba(255, 115, 250, 0.22);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  line-height: 1;
  white-space: nowrap;
}

.boost-badge__gem {
  flex-shrink: 0;
  display: block;
  filter: drop-shadow(0 0 5px rgba(255, 115, 250, 0.55));
}

.boost-badge__text {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  min-width: 0;
}

.boost-badge__level {
  color: #f2f3f5;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.boost-badge__count {
  color: var(--boost);
  font-size: 0.78rem;
  font-weight: 600;
}

.boost-badge--inline {
  padding: 0.32rem 0.7rem 0.32rem 0.45rem;
}

.server-panel__rating-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  width: 100%;
}

.server-rating-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.25rem 0.4rem;
  border-radius: 0.55rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.server-rating-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.server-rating-link .stars {
  color: var(--star);
  gap: 0.22rem;
}

.server-rating-link .star {
  width: 1.7rem;
  height: 1.7rem;
}

.server-rating-link__meta {
  font-size: 1.2rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.server-rating-link__meta b {
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 700;
}

.btn--review {
  gap: 0.4rem;
  padding: 0.6rem 1.15rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.btn--review:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn--review .btn__icon {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--star);
}

.btn--review:hover .btn__icon {
  color: #fff;
}

.server-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: flex-end;
}

#reviews {
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}

.review-compose {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1.15rem;
  padding: 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.review-compose__label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.review-compose__stars {
  display: inline-flex;
  gap: 0.15rem;
}

.review-compose__star {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--star-empty);
  cursor: pointer;
}

.review-compose__star.is-active,
.review-compose__star:hover {
  color: var(--star);
}

.review-compose__input {
  width: 100%;
  min-height: 5.5rem;
  resize: vertical;
  padding: 0.75rem 0.85rem;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.45;
}

.review-compose__input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.btn--review-submit {
  justify-self: start;
  height: 2.5rem;
  padding: 0 1.1rem;
}

.btn--bump,
.btn--vote,
.btn--share {
  height: 2.85rem;
  border-radius: 0.7rem;
  line-height: 1;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 6px 14px rgba(0, 0, 0, 0.18);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    filter 0.15s ease,
    transform 0.15s var(--ease),
    box-shadow 0.15s ease;
}

.btn--bump,
.btn--vote {
  min-width: 8.5rem;
  gap: 0;
  padding: 0 1.15rem;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 0;
}

.btn--share .btn__icon {
  flex-shrink: 0;
  display: block;
  width: 1.125rem;
  height: 1.125rem;
}

.btn--bump .btn-label,
.btn--vote .btn-label {
  display: inline-flex;
  align-items: center;
  transform: translateY(0.5px);
}

.btn--share {
  width: 2.85rem;
  min-width: 2.85rem;
  padding: 0;
  color: var(--text-muted);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}

.btn--share:hover,
.share-dropdown.is-open > .btn--share {
  color: var(--text);
  background: #32343e;
  border-color: rgba(255, 255, 255, 0.18);
}

.share-dropdown {
  position: relative;
}

.share-menu {
  min-width: 11.5rem;
  padding: 0.4rem;
}

.share-menu__item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 0.4rem;
  cursor: pointer;
  text-align: left;
}

.share-menu__item:hover {
  color: var(--text);
  background: var(--brand-soft);
}

.share-menu__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  color: #fff;
  flex-shrink: 0;
}

.share-menu__icon--copy {
  background: linear-gradient(145deg, #5a7a9a, #3a5570);
}

.share-menu__icon--x {
  background: #111214;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.share-menu__icon--fb {
  background: #1877f2;
}

.share-menu__icon--reddit {
  background: #fff;
  color: #ff4500;
}

.btn--bump {
  color: #fff;
  background: linear-gradient(180deg, #42d492 0%, #2bb673 100%);
}

.btn--bump:hover {
  color: #fff;
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn--vote {
  color: #fff;
  background: linear-gradient(180deg, var(--brand-hover) 0%, var(--brand-deep) 100%);
}

.btn--vote:hover {
  color: #fff;
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn--bump:active,
.btn--vote:active,
.btn--share:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.btn--bump.is-done,
.btn--vote.is-done {
  opacity: 0.72;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.server-section {
  margin-top: 1.35rem;
}

.server-section + .server-section {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.server-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.server-section__title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.server-section__head .server-section__title {
  margin-bottom: 0;
}

.server-section__more {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.server-activity__heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--text);
}

.server-activity__heading-icon {
  color: var(--brand-hover);
  flex-shrink: 0;
}

.activity-chart {
  margin-bottom: 1rem;
}

.activity-chart__bars {
  display: flex;
  align-items: flex-end;
  gap: 0.28rem;
  height: 5.5rem;
  padding: 0.15rem 0.1rem 0;
}

.activity-bar {
  flex: 1;
  min-width: 0;
  height: var(--h, 40%);
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--brand-hover) 88%, #fff) 0%,
    var(--brand) 55%,
    var(--brand-deep) 100%
  );
  opacity: 0.72;
  transition: filter 0.15s ease, transform 0.15s var(--ease);
}

.activity-bar:hover {
  filter: brightness(1.12);
  transform: scaleY(1.04);
  transform-origin: bottom;
}

.activity-chart__bars .activity-bar:nth-child(1),
.activity-chart__bars .activity-bar:nth-child(2),
.activity-chart__bars .activity-bar:nth-child(3),
.activity-chart__bars .activity-bar:nth-child(23),
.activity-chart__bars .activity-bar:nth-child(24) {
  opacity: 0.38;
}

.activity-chart__bars .activity-bar:nth-child(12),
.activity-chart__bars .activity-bar:nth-child(13),
.activity-chart__bars .activity-bar:nth-child(14),
.activity-chart__bars .activity-bar:nth-child(15) {
  opacity: 1;
  background: linear-gradient(180deg, #9eb4c9 0%, var(--brand-hover) 45%, var(--brand) 100%);
}

.activity-chart__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.45rem;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.activity-stats {
  display: grid;
  gap: 0.55rem;
}

.activity-stat {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.activity-stat strong {
  color: var(--text);
  font-weight: 700;
}

.activity-stat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.45rem;
  color: var(--brand-hover);
  background: var(--brand-soft);
  flex-shrink: 0;
}

.server-panel .server-description__inner {
  white-space: pre-line;
}

.server-description--full .server-description__inner {
  display: block;
  -webkit-line-clamp: unset;
  max-height: none;
  overflow: visible;
}

.server-description--full .server-description__toggle {
  display: none;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  margin: 0 0 1.15rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.75rem 0.85rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.detail-item dt {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-item dd {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}

.channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text);
  font-weight: 600;
}

.channel-chip__hash {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 1.05em;
  line-height: 1;
}

.channel-chip svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.channel-chip__type {
  padding: 0.15rem 0.4rem;
  border-radius: 0.3rem;
  background: var(--brand-soft);
  color: var(--brand-hover);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.inviter {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.inviter__avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-chip);
  flex-shrink: 0;
}

.inviter__meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.inviter__name {
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.inviter__id {
  color: var(--text-dim);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-ownership__lead {
  margin: -0.35rem 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.server-ownership {
  display: grid;
  gap: 0.55rem;
}

.server-ownership__person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 0;
}

.server-ownership__person .inviter__avatar {
  width: 2.5rem;
  height: 2.5rem;
}

.server-ownership__person .dash-badge {
  margin-left: auto;
  flex-shrink: 0;
}

.dash-badge--owner {
  color: #c5cbff;
  background: var(--brand-soft);
  border-color: rgba(77, 107, 138, 0.4);
}

.dash-settings__hint {
  margin: -0.25rem 0 0.15rem 1.6rem;
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.4;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  width: fit-content;
}

.status-chip--verify {
  color: #9db0ff;
  background: rgba(77, 107, 138, 0.16);
  border: 1px solid rgba(77, 107, 138, 0.28);
}

.status-chip--safe {
  color: #7ddea8;
  background: rgba(43, 182, 115, 0.14);
  border: 1px solid rgba(43, 182, 115, 0.28);
}

.status-chip--nsfw {
  color: #ff9aa0;
  background: rgba(232, 93, 96, 0.14);
  border: 1px solid rgba(232, 93, 96, 0.28);
}

.vanity-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  color: var(--brand-hover);
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
}

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

.vanity-link strong {
  color: var(--text);
  font-weight: 700;
}

.detail-block {
  margin-top: 1rem;
}

.detail-block + .detail-block {
  margin-top: 1.1rem;
}

.detail-block__title {
  margin: 0 0 0.55rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.feature-list,
.role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-chip {
  display: inline-flex;
  padding: 0.28rem 0.55rem;
  border-radius: 0.4rem;
  background: var(--bg-chip);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--role, var(--brand)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--role, var(--brand)) 35%, transparent);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 650;
}

.role-chip__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--role, var(--brand));
  flex-shrink: 0;
}

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

.lang-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.lang-chip {
  display: inline-flex;
  padding: 0.3rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-chip);
  border-radius: 999px;
  border: 1px solid var(--border);
}

.review-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.review-summary__meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.review-summary__meta b {
  color: var(--text);
}

.page-server .star--empty {
  color: rgba(255, 214, 120, 0.5);
}

.page-server .stars {
  filter: none;
}

.stars--sm .star {
  width: 0.85rem;
  height: 0.85rem;
}

.review-list {
  display: grid;
  gap: 0.75rem;
}

.review-card {
  padding: 0.9rem 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.review-card__top {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.review-card__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--bg-chip);
}

.review-card__author {
  font-weight: 700;
  font-size: 0.95rem;
}

.review-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.review-card__body {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
}

.social-link:hover {
  color: var(--text);
  border-color: var(--brand);
  background: var(--brand-soft);
}

.creator-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.65rem;
}

.creator {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.creator img {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
}

.creator__name {
  font-weight: 700;
  font-size: 0.95rem;
}

.creator__role {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.report-link {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s ease;
}

.server-section--report {
  padding-top: 1rem;
}

.report-link svg {
  opacity: 0.85;
}

.report-link:hover {
  color: var(--danger);
}

.related-servers {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem 1.35rem;
  box-shadow: var(--shadow);
}

.related-servers__title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--text);
}

.accent-name {
  color: var(--brand-hover);
}

.related-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.related-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s var(--ease);
}

.related-card:hover {
  color: var(--text);
  background: #2a2c36;
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.related-card img {
  width: 3rem;
  height: 3rem;
  border-radius: calc(var(--radius-icon) * 0.65);
  background: var(--bg-chip);
  flex-shrink: 0;
}

.related-card__name {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
}

.related-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.dot-online {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 0 2px var(--online-ring);
}

.server-join-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(18, 19, 24, 0.96);
  border-top: 1px solid var(--border);
  box-sizing: border-box;
}

.server-join-bar__inner {
  display: block;
  width: 100%;
  max-width: 76rem;
  margin: 0 auto;
}

.server-join-bar__info {
  display: none;
}

.server-join-bar__icon {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: calc(var(--radius-icon) * 0.78);
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
  background: var(--bg-raised);
  object-fit: cover;
  flex-shrink: 0;
}

.server-join-bar__text {
  min-width: 0;
}

.server-join-bar__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.server-join-bar__hint {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* Mobile sticky CTA */
.server-join-bar .btn-join--bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 3rem;
  margin: 0;
  padding: 0 1rem;
  font-size: 1rem;
  border-radius: 999px;
  box-sizing: border-box;
  box-shadow: 0 10px 28px rgba(58, 85, 112, 0.35);
}

.server-join-bar .btn-join--bar .join-icons {
  display: none;
}

.server-join-bar .btn-join--bar:hover {
  transform: none;
}

@media (min-width: 901px) {
  .server-join-bar {
    padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px));
    background: rgba(18, 19, 24, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .server-join-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
  }

  .server-join-bar__info {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex: 0 1 auto;
  }

  .server-join-bar .btn-join--bar {
    flex: 1 1 22rem;
    width: auto;
    max-width: none;
    min-width: min(100%, 16rem);
    height: 3.75rem;
    font-size: 1.28rem;
    padding: 0 2rem;
    border-radius: 3.75rem;
    box-shadow: 0 12px 32px rgba(58, 85, 112, 0.4);
  }

  .server-join-bar .btn-join--bar .join-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
  }

  .server-join-bar .btn-join--bar .join-icon {
    width: 1.85rem;
    height: 1.85rem;
  }

  .server-join-bar .btn-join--bar:hover {
    transform: scale(1.02);
    filter: brightness(1.05);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(0.5rem);
  max-width: min(22rem, calc(100vw - 2rem));
  text-align: center;
  z-index: 120;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  background: #2e3140;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
/* —— Footer —— */
.footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
  background: #121318;
}

.brand--footer {
  margin-bottom: 1.75rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.footer ul li {
  margin-bottom: 0.4rem;
}

.footer a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer a:hover,
.footer a.is-active {
  color: var(--brand-hover);
}

.footer-langs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.85rem;
}

.footer-langs a {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-note {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* —— Responsive —— */
@media (max-width: 1100px) {
  .listings {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .listings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .lang-menu {
    width: min(32rem, calc(100vw - 1.5rem));
  }
}

/* Tablets + iPads (incl. landscape ~1024–1194) share the drawer + stacked server layout */
@media (max-width: 1200px) {
  .navbar {
    --nav-h: 3.5rem;
    /* Keep drawer/backdrop above page content; blur lives on ::before so it
       does not become a containing block for position:fixed descendants. */
    z-index: 300;
    overflow: visible;
  }

  body.nav-open .navbar {
    z-index: 400;
  }

  .navbar .container {
    width: min(100% - (var(--gutter) * 2), var(--container));
  }

  .navbar-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
  }

  /* Drawer lives inside .navbar-inner — raise that layer above the dim overlay */
  body.nav-open .navbar-inner {
    z-index: 420;
  }

  body.nav-open .navbar::before {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .brand {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
  }

  .brand-logo {
    height: 100%;
    max-height: var(--nav-h);
    max-width: min(12rem, 52vw);
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    position: relative;
    z-index: 430;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }

  .nav-toggle:hover,
  .nav-toggle:focus-visible {
    background: var(--brand-soft);
    border-color: rgba(77, 107, 138, 0.45);
    outline: none;
  }

  body.nav-open .nav-toggle {
    /* Drawer already has a close control — hide hamburger so Xs don’t stack */
    visibility: hidden;
    pointer-events: none;
  }

  .nav-toggle__box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
    width: 1.2rem;
  }

  .nav-toggle__bar {
    display: block;
    height: 2px;
    width: 100%;
    border-radius: 2px;
    background: currentColor;
  }

  .primary-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 420;
    width: min(22.5rem, 92vw);
    height: 100%;
    height: 100dvh;
    max-height: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0 0 calc(1.35rem + env(safe-area-inset-bottom, 0px));
    background:
      linear-gradient(180deg, #1e1f28 0%, #17181f 48%, #14151b 100%);
    border-left: 1px solid var(--border-strong);
    box-shadow: -20px 0 56px rgba(0, 0, 0, 0.55);
    transform: translateX(105%);
    transition: transform 0.3s var(--ease);
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
    pointer-events: none;
  }

  body.nav-open .primary-nav {
    transform: none;
    visibility: visible;
    pointer-events: auto;
  }

  .primary-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem 0.85rem 1.15rem;
    padding-top: calc(0.85rem + env(safe-area-inset-top, 0px));
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: #1e1f28;
    z-index: 2;
  }

  .primary-nav__brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
  }

  .primary-nav__logo {
    height: 2.15rem;
    width: auto;
    max-width: 10.5rem;
    object-fit: contain;
  }

  .primary-nav__title {
    display: none;
  }

  .primary-nav__label {
    display: block;
    margin: 1.05rem 1.15rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
  }

  .nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.55rem;
    height: 2.55rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }

  .nav-close:hover,
  .nav-close:focus-visible {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    outline: none;
  }

  .primary-nav .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    margin: 0;
    padding: 0 0.85rem;
  }

  .primary-nav .nav-link {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.7rem 0.9rem;
    font-size: 1rem;
    font-weight: 550;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
  }

  .primary-nav .nav-link.is-active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-strong);
    box-shadow: none;
  }

  .primary-nav .navbar-search {
    display: block;
    flex: none;
    max-width: none;
    width: auto;
    margin: 0.85rem 0.85rem 0.35rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .primary-nav .searchbox--nav input {
    height: 3rem;
    padding: 0 3rem 0 1rem;
    font-size: 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: 0.75rem;
  }

  .primary-nav .searchbox--nav input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
  }

  .primary-nav .searchbox--nav button {
    right: 0.35rem;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.55rem;
  }

  .primary-nav .navbar-right {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    margin: auto 0 0;
    padding: 0.35rem 0.85rem 0;
  }

  .primary-nav .navbar-right::before {
    content: "";
    display: block;
    height: 1px;
    margin: 0.55rem 0.3rem 0.85rem;
    background: var(--border);
  }

  .primary-nav .navbar-right > .primary-nav__label {
    margin: 0 0.3rem 0.4rem;
  }

  .primary-nav .lang-switcher {
    width: 100%;
  }

  .primary-nav .lang-switcher__btn {
    width: 100%;
    height: 3rem;
    justify-content: flex-start;
    padding: 0 0.95rem;
    gap: 0.55rem;
    font-size: 0.95rem;
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
  }

  .primary-nav .lang-switcher.is-open > .lang-switcher__btn,
  .primary-nav .lang-switcher__btn:hover,
  .primary-nav .lang-switcher__btn:focus-visible {
    color: var(--text);
    background: var(--brand-soft);
    border-color: rgba(77, 107, 138, 0.4);
    outline: none;
  }

  .primary-nav .lang-switcher__code,
  .primary-nav .lang-switcher__caret {
    display: inline;
  }

  .primary-nav .lang-switcher__code {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .primary-nav .lang-switcher__caret {
    margin-left: auto;
  }

  .primary-nav .lang-menu {
    position: static;
    left: auto;
    right: auto;
    width: 100%;
    margin-top: 0.5rem;
    max-height: min(40vh, 16rem);
    padding: 0.45rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    box-shadow: none;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .primary-nav .lang-switcher.is-open > .lang-menu {
    display: block;
  }

  .primary-nav .lang-menu__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.2rem;
  }

  .primary-nav .lang-menu__item {
    padding: 0.7rem 0.65rem;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
  }

  .primary-nav .btn--login {
    width: 100%;
    height: 2.85rem;
    font-size: 0.95rem;
    padding: 0 1rem;
    border-radius: var(--radius-sm);
    margin-top: 0.15rem;
  }

  .primary-nav .user-menu {
    width: 100%;
  }

  .primary-nav .user-chip {
    width: 100%;
    height: 3rem;
    justify-content: flex-start;
    padding: 0 0.95rem 0 0.35rem;
    border-radius: var(--radius-md);
  }

  .primary-nav .user-chip__caret {
    margin-left: auto;
  }

  .primary-nav .user-menu .dropdown-menu {
    position: static;
    left: auto;
    right: auto;
    width: 100%;
    min-width: 0;
    margin-top: 0.5rem;
    padding: 0.35rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    box-shadow: none;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
  }

  .primary-nav .user-menu.is-open > .dropdown-menu {
    display: block;
  }

  .primary-nav .user-menu .dropdown-item {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    padding: 0.65rem 0.75rem;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 410;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(6, 7, 10, 0.72);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s;
  }

  body.nav-open .nav-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.nav-open {
    overflow: hidden;
    touch-action: none;
  }

  .welcome {
    height: auto;
    min-height: 22rem;
    padding: 2.5rem 0 1.85rem;
  }

  .welcome-brand {
    font-size: clamp(1.55rem, 8vw, 2.75rem);
    gap: 0.45rem 0.6rem;
  }

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

  .welcome-title {
    font-size: clamp(1.55rem, 5.5vw, 2rem);
    padding-inline: 0.25rem;
  }

  .welcome-cta {
    align-self: center;
    justify-content: center;
    width: 100%;
  }

  .searchbox--hero {
    max-width: 100%;
  }

  .searchbox--hero input {
    height: 3.1rem;
    font-size: 1rem;
  }

  .searchbox--hero button[type="submit"] {
    height: 3.1rem;
    padding: 0 1.1rem;
  }

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

  .searchbox--hero button[type="submit"] span {
    display: none;
  }

  .server-panel {
    padding: 0 0.95rem 1.25rem;
  }

  .server-panel__banner {
    margin: 0 -0.95rem;
    max-width: none;
    width: calc(100% + 1.9rem);
    aspect-ratio: 16 / 8;
    max-height: min(13.5rem, 28vw);
    border-radius: 0;
  }

  .server-panel__banner-img {
    object-position: center center;
  }

  .server-rank--panel {
    align-self: flex-start;
  }

  .server-rank__hash {
    font-size: 1.8rem;
  }

  .server-rank__value {
    font-size: 2.85rem;
  }

  .server-rank__votes {
    font-size: 0.76rem;
  }

  .server-panel__head {
    flex-direction: column;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.9rem;
    margin-top: -4rem;
    padding-bottom: 1rem;
  }

  .server-panel__identity {
    align-items: center;
    max-width: none;
    gap: 0.75rem;
    width: 100%;
    flex: none;
  }

  .server-panel__cta {
    position: static;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    gap: 0.55rem;
  }

  .server-panel__titles {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 0.45rem;
  }

  .server-panel__icon {
    width: 5.15rem;
    height: 5.15rem;
    border-width: 3px;
  }

  .server-panel__name {
    font-size: clamp(1.25rem, 4.2vw, 1.45rem);
    line-height: 1.15;
  }

  .server-panel__name-row {
    gap: 0.4rem 0.5rem;
    margin-bottom: 0.4rem;
  }

  .server-panel__stats {
    gap: 0.4rem;
  }

  .member-pill {
    font-size: 0.8rem;
  }

  .member-pill__online,
  .member-pill__members {
    padding: 0.38rem 0.72rem;
  }

  .member-pill__members {
    padding-right: 0.85rem;
  }

  .boost-badge {
    padding: 0.32rem 0.55rem 0.32rem 0.35rem;
  }

  .boost-badge__count {
    font-size: 0.72rem;
  }

  .server-panel__rating-row,
  .server-panel__actions {
    justify-content: flex-start;
    width: 100%;
  }

  .server-rating-link {
    gap: 0.45rem;
    padding: 0.15rem 0;
  }

  .server-rating-link .star {
    width: 1.25rem;
    height: 1.25rem;
  }

  .server-rating-link__meta {
    font-size: 0.95rem;
  }

  .server-rating-link__meta b {
    font-size: 1.02rem;
  }

  .server-panel__actions {
    gap: 0.45rem;
  }

  .btn--bump,
  .btn--vote {
    flex: 1 1 0;
    min-width: 0;
    height: 2.7rem;
    padding: 0 0.7rem;
    font-size: 0.94rem;
  }

  .btn--share {
    width: 2.7rem;
    min-width: 2.7rem;
    height: 2.7rem;
  }

  .share-menu {
    right: 0;
    left: auto;
    min-width: 11rem;
    max-width: min(16rem, calc(100vw - 2rem));
  }

  .btn--bump:hover,
  .btn--vote:hover {
    transform: none;
  }

  .activity-chart__bars {
    gap: 0.16rem;
    height: 4.25rem;
  }

  .activity-stat {
    font-size: 0.9rem;
    align-items: flex-start;
  }

  .server-section__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }

  .review-compose {
    padding: 0.85rem;
  }

  .detail-item {
    padding: 0.7rem 0.75rem;
  }

  .inviter__id {
    max-width: 12rem;
  }

  .related-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-servers,
  .related-tags {
    padding: 1.05rem 1rem 1.15rem;
  }

  .related-servers__title {
    font-size: 1.1rem;
  }

  .breadcrumbs__item {
    font-size: 0.78rem;
  }

  .breadcrumbs__link {
    max-width: 9.5rem;
  }

  .breadcrumbs__current {
    max-width: min(16rem, 48vw);
  }

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

  .server-page {
    padding-bottom: 6.5rem;
  }

  .server-page__hero {
    height: clamp(3.75rem, 12vw, 5rem);
  }

  .page-server .footer,
  .page-bot .footer {
    padding-bottom: 5.5rem;
  }

  .server-page__content {
    margin-top: -2.5rem;
    gap: 1.15rem;
  }








  .toast {
    bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
  }

  .feature-chip {
    font-size: 0.68rem;
  }

  .tag-hero {
    padding: 1.1rem 1.05rem;
  }

  .tag-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .sort-tabs {
    width: 100%;
  }

  .sort-tab {
    flex: 1;
    text-align: center;
    padding: 0.45rem 0.4rem;
    font-size: 0.8rem;
  }

  .sort-tab__full {
    display: none;
  }

  .sort-tab__short {
    display: inline;
  }

  .home-desc {
    padding: 1.35rem 0;
  }

  .listings-section {
    padding: 1.85rem 0 1rem;
  }

  .listings-section--alt {
    padding-bottom: 2.5rem;
  }

  .server-banner {
    --tab-w: min(11rem, 72%);
    margin: 0.45rem 0.4rem 0;
  }

  .server-icon {
    width: 4.1rem;
    height: 4.1rem;
  }

  .server-header {
    min-height: 4.65rem;
    padding: 0.55rem 0.65rem 0.6rem 0.2rem;
  }
}

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

  .search-hero {
    padding: 1.15rem 1.05rem;
  }

  .search-hero__form {
    max-width: none;
  }

  .search-hero__meta {
    overflow-wrap: anywhere;
  }

  .lang-menu__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .navbar {
    --nav-h: 3.4rem;
  }

  .brand-logo {
    max-width: min(11rem, 55vw);
  }

  .primary-nav {
    width: min(100%, 22.5rem);
  }

  .server-panel {
    padding: 0 0.85rem 1.15rem;
  }

  .server-panel__banner {
    margin: 0 -0.85rem;
    width: calc(100% + 1.7rem);
    max-height: 9.5rem;
  }

  .server-panel__head {
    margin-top: -3.5rem;
    gap: 0.85rem;
  }

  .server-panel__icon {
    width: 4.75rem;
    height: 4.75rem;
  }

  .server-rank__hash {
    font-size: 1.65rem;
  }

  .server-rank__value {
    font-size: 2.55rem;
  }

  .server-rank__votes {
    font-size: 0.72rem;
  }

  .member-pill {
    font-size: 0.78rem;
  }

  .member-pill__online,
  .member-pill__members {
    padding: 0.36rem 0.7rem;
  }

  .btn--bump,
  .btn--vote {
    height: 2.65rem;
    font-size: 0.92rem;
  }

  .btn--share {
    width: 2.65rem;
    min-width: 2.65rem;
    height: 2.65rem;
  }

  .welcome {
    min-height: 20rem;
    padding: 2.25rem 0 1.65rem;
  }


  .toast {
    bottom: calc(5.1rem + env(safe-area-inset-bottom, 0px));
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .related-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  .brand-logo {
    max-width: min(9.5rem, 58vw);
  }

  .boost-badge__count {
    display: none;
  }

  .server-rank__hash {
    font-size: 1.4rem;
  }

  .server-rank__value {
    font-size: 2.15rem;
  }

  .server-rank__votes {
    font-size: 0.65rem;
  }

  .server-panel__icon {
    width: 4.25rem;
    height: 4.25rem;
  }

  .server-panel__banner {
    max-height: 8.25rem;
  }

  .server-panel__head {
    margin-top: -3.1rem;
  }

  .btn--bump,
  .btn--vote {
    height: 2.5rem;
    font-size: 0.86rem;
    padding: 0 0.55rem;
  }

  .btn--share {
    width: 2.5rem;
    min-width: 2.5rem;
    height: 2.5rem;
  }


  .guild-tag {
    height: 1.25rem;
    font-size: 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* —— Dashboard —— */
.page-dashboard .navbar-search {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 2.35rem;
  padding: 0 0.55rem 0 0.3rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-family: var(--font);
  font-weight: 550;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.user-chip:hover,
.dropdown.is-open > .user-chip {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.22);
}

.user-chip__avatar {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-chip__caret {
  flex-shrink: 0;
  opacity: 0.55;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.dropdown.is-open > .user-chip .user-chip__caret {
  transform: rotate(180deg);
  opacity: 0.9;
}

.user-menu__panel {
  min-width: 11.5rem;
}

button.dropdown-item {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
}

.dropdown-item--danger {
  color: var(--danger);
}

.dropdown-item--danger:hover {
  color: #fff;
  background: rgba(232, 93, 96, 0.18);
}

.dropdown-item--admin {
  font-weight: 600;
  color: #5eead4;
}

.dropdown-item--admin:hover {
  color: #fff;
  background: rgba(45, 212, 191, 0.16);
}

.dashboard {
  padding-bottom: 4rem;
}

.dashboard-hero {
  position: relative;
  padding: 1.75rem 0 2rem;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 70% 90% at 12% -20%, rgba(77, 107, 138, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 70% at 90% 0%, rgba(58, 85, 112, 0.12), transparent 50%),
    linear-gradient(180deg, #1a1b22 0%, var(--bg) 100%);
  overflow: hidden;
}

.dashboard-hero__inner {
  display: grid;
  gap: 1.35rem;
  position: relative;
  z-index: 1;
}

.dashboard-hero__copy {
  max-width: 38rem;
}

.dashboard-hero__eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-hover);
}

.dashboard-hero__title {
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  letter-spacing: -0.04em;
  color: #fff;
}

.dashboard-hero__lead {
  margin: 0.55rem 0 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 34rem;
}

.dashboard-hero__user {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  width: fit-content;
  max-width: 100%;
  background: rgba(38, 40, 48, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
}

.dashboard-hero__avatar {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  object-fit: cover;
}

.dashboard-hero__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.dashboard-hero__meta {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-top: 0.15rem;
}

.dashboard-shell {
  padding-top: 1.5rem;
}

.dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.35rem;
  margin-bottom: 1.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
}

.dashboard-tab {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.05rem;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.dashboard-tab svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.dashboard-tab:hover {
  color: var(--text);
}

.dashboard-tab.is-active {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 8px 20px rgba(58, 85, 112, 0.28);
}

.dashboard-tab.is-active svg {
  opacity: 1;
}

.dashboard-panel[hidden] {
  display: none;
}

.dashboard-panel.is-active {
  animation: dashIn 0.28s var(--ease) both;
}

@keyframes dashIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dashboard-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.dashboard-panel__title {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.dashboard-panel__desc {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.dashboard-add {
  gap: 0.4rem;
  flex-shrink: 0;
}

.dash-list {
  display: grid;
  gap: 0.75rem;
}

.dash-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s var(--ease);
}

.dash-card:hover {
  border-color: rgba(77, 107, 138, 0.28);
  transform: translateY(-1px);
}

.dash-card__icon {
  width: 4rem;
  height: 4rem;
  border-radius: calc(var(--radius-icon) * 0.72);
  object-fit: cover;
  background: var(--bg-raised);
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.dash-card__icon--bot {
  border-radius: calc(var(--radius-icon) * 0.72);
}

.dash-card__body {
  min-width: 0;
}

.dash-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.4rem;
  color: var(--text-dim);
  font-size: 0.84rem;
  margin-bottom: 0.3rem;
}

.dash-card__online {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
}

.dash-card__sep {
  opacity: 0.5;
}

.dash-card__voted {
  color: var(--brand-hover);
  font-weight: 600;
}

.dash-card__name {
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.dash-card__name a {
  color: #fff;
}

.dash-card__name a:hover {
  color: #c5cbff;
}

.dash-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.dash-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: var(--bg-chip);
  border: 1px solid var(--border);
}

.dash-badge--public {
  color: #7dffa8;
  background: rgba(43, 182, 115, 0.14);
  border-color: rgba(43, 182, 115, 0.35);
}

.dash-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.dashboard-footnote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.9rem;
}

.dashboard-footnote p {
  margin: 0;
}

.dash-review {
  padding: 1.1rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.dash-review__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.dash-review__server {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
}

.dash-review__server img {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.55rem;
  object-fit: cover;
}

.dash-review__server:hover {
  color: #fff;
}

.dash-review .stars {
  display: inline-flex;
  gap: 0.12rem;
  color: var(--star);
}

.dash-review .star {
  width: 1.05rem;
  height: 1.05rem;
}

.dash-review .star--empty {
  color: var(--star-empty);
}

.dash-review__text {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.dash-review__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.dash-settings {
  display: grid;
  gap: 1.25rem;
  max-width: 34rem;
}

.dash-settings__group {
  display: grid;
  gap: 0.85rem;
  padding: 1.15rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.dash-settings__label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.dash-field {
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.dash-field input,
.dash-field select {
  width: 100%;
  height: 2.75rem;
  padding: 0 0.85rem;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
}

.dash-field input:focus,
.dash-field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.dash-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
}

.dash-check input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--brand);
}

.dash-settings__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.dash-stat-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.dash-stat-pill strong {
  color: var(--text);
  font-size: 1.05rem;
}

.dash-review__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.dash-settings__profile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 0.35rem;
}

.dash-settings__avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  object-fit: cover;
}

.dash-settings__profile-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.dash-settings__profile-id {
  margin-top: 0.2rem;
  color: var(--text-dim);
  font-size: 0.82rem;
}

.dash-field__hint {
  font-weight: 500;
  color: var(--text-dim);
}

.dash-field textarea {
  width: 100%;
  min-height: 5rem;
  resize: vertical;
  padding: 0.7rem 0.85rem;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.45;
}

.dash-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.dash-settings__note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.dash-settings__group--danger {
  border-color: rgba(232, 93, 96, 0.28);
}

.dash-btn--danger {
  color: var(--danger);
  border-color: rgba(232, 93, 96, 0.35);
}

.dash-btn--danger:hover {
  color: #fff;
  background: rgba(232, 93, 96, 0.85);
  border-color: transparent;
}

@media (max-width: 900px) {
  .dashboard-tabs {
    width: 100%;
    border-radius: var(--radius-lg);
  }

  .dashboard-tab {
    flex: 1 1 calc(50% - 0.4rem);
    justify-content: center;
    padding: 0.7rem 0.65rem;
    font-size: 0.84rem;
  }

  .dashboard-panel__head {
    flex-direction: column;
  }

  .dashboard-add {
    width: 100%;
    justify-content: center;
  }

  .dash-card {
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
  }

  .dash-card__actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .dash-card__actions .btn {
    flex: 1 1 0;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .dashboard-tab span {
    font-size: 0.8rem;
  }

  .dashboard-hero__user {
    width: 100%;
  }

  .user-chip__name {
    max-width: 7rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dash-review__foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .dashboard-tabs {
    gap: 0.3rem;
    padding: 0.3rem;
  }

  .dashboard-tab {
    flex: 1 1 calc(50% - 0.3rem);
    padding: 0.58rem 0.4rem;
    font-size: 0.76rem;
    gap: 0.32rem;
  }

  .dashboard-tab svg {
    width: 1rem;
    height: 1rem;
  }
}

/* —— Add server —— */
.page-add-server .navbar-search,
.page-edit-server .navbar-search,
.page-edit-bot .navbar-search,
.page-add-bot .navbar-search {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.add-server {
  padding: 1.5rem 0 4rem;
  min-height: calc(100vh - 12rem);
  background:
    radial-gradient(ellipse 55% 40% at 50% -5%, rgba(77, 107, 138, 0.14), transparent 60%),
    var(--bg);
}

.add-server__shell {
  max-width: 40rem;
}

.add-server__shell--wide,
.page-add-server:has([data-add-step="continue"]:not([hidden])) .add-server__shell {
  max-width: 44rem;
}

.add-server__crumbs {
  margin-bottom: 1.5rem;
}

.add-server__panel {
  padding: 2.25rem 1.75rem 0;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: visible;
  animation: add-server-in 0.45s ease both;
}

@keyframes add-server-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.add-server__header {
  text-align: center;
  margin-bottom: 2rem;
}

.add-server__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-hover);
}

.add-server__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.15;
}

.add-server__lead {
  margin: 0.75rem auto 0;
  max-width: 28rem;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.5;
}

.add-server__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.add-server__picker-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.server-picker {
  position: relative;
  flex: 1;
  min-width: 0;
}

.server-picker__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.9rem 1.15rem;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-dim);
  background: #16171c;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.server-picker__trigger:hover,
.server-picker.is-open .server-picker__trigger {
  border-color: rgba(77, 107, 138, 0.55);
  background: #1a1b22;
}

.server-picker__trigger.has-selection {
  color: var(--text);
}

.server-picker__placeholder.is-filled {
  color: var(--text);
  font-weight: 600;
}

.server-picker__caret {
  flex-shrink: 0;
  color: var(--brand);
  transition: transform 0.2s ease;
}

.server-picker.is-open .server-picker__caret {
  transform: rotate(180deg);
}

.server-picker__list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: #1c1d24;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  max-height: 16rem;
  overflow: auto;
}

.server-picker__option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.12s ease;
}

.server-picker__option:hover,
.server-picker__option:focus-visible {
  background: rgba(77, 107, 138, 0.12);
  outline: none;
}

.server-picker__option.is-selected {
  background: var(--brand-soft);
}

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

.server-picker__option.is-disabled:hover {
  background: transparent;
}

.server-picker__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-chip);
}

.server-picker__icon--bot,
.add-server__selected-icon--bot {
  border-radius: calc(var(--radius-icon) * 0.72);
}

.server-picker__meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.server-picker__name {
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.server-picker__sub {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.server-picker__refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  color: var(--text-muted);
  background: var(--bg-chip);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.server-picker__refresh:hover {
  color: var(--text);
  border-color: rgba(77, 107, 138, 0.45);
  background: var(--brand-soft);
}

.server-picker__refresh.is-spinning svg {
  animation: server-picker-spin 0.7s linear;
}

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

.add-server__hint {
  margin: 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.add-server__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.25rem -1.75rem 0;
  padding: 1.15rem 1.75rem;
  background: rgba(0, 0, 0, 0.22);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.add-server__continue:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.add-server__continue:disabled:hover {
  background: var(--brand);
  border-color: var(--brand);
}

.add-server__selected {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1.35rem;
  background: #16171c;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.add-server__selected .dash-badge,
.add-server__selected .btn,
.add-server__selected-actions {
  margin-left: auto;
  flex-shrink: 0;
}

.add-server__selected-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.page-edit-server .add-server__panel,
.page-edit-bot .add-server__panel {
  padding-bottom: 0;
}

.add-server__group--danger {
  border-color: rgba(232, 93, 96, 0.28);
}

.add-server__group--danger .add-server__group-title {
  color: #f0a0a2;
}

.manager-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.manager-list__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: #16171c;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 0;
}

.manager-list__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-chip);
  flex-shrink: 0;
}

.manager-list__meta {
  min-width: 0;
  flex: 1;
}

.manager-list__name {
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.manager-list__sub {
  margin-top: 0.12rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manager-list__item .dash-badge {
  flex-shrink: 0;
}

.manager-invite {
  display: grid;
  gap: 0.55rem;
}

.manager-invite__row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.manager-invite__row input {
  flex: 1;
  min-width: 0;
  height: 2.75rem;
  padding: 0 0.85rem;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
}

.manager-invite__row input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.manager-invite__row .btn {
  flex-shrink: 0;
}

.add-server__selected-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-chip);
}

.add-server__selected-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
}

.add-server__selected-id {
  margin-top: 0.2rem;
  font-size: 0.82rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.add-server__details {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.add-server__group {
  display: grid;
  gap: 0.85rem;
  padding: 0 0 1.5rem;
  margin-bottom: 1.35rem;
  border-bottom: 1px solid var(--border);
}

.add-server__group:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.add-server__group-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.add-server__group-note {
  margin: -0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.add-server__charcount {
  margin: -0.35rem 0 0;
  text-align: right;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.add-server__socials {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .add-server__socials {
    grid-template-columns: 1fr 1fr;
  }
}

.dash-check--block {
  align-items: flex-start;
  gap: 0.65rem;
  line-height: 1.45;
}

.dash-check--block input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.add-server__nsfw-label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--text);
  font-weight: 700;
}

.tag-editor {
  display: grid;
  gap: 0.55rem;
}

.tag-editor__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  min-height: 0;
}

.tag-editor__list:empty {
  display: none;
}

.tag-editor__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.35rem 0.28rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #c5cbff;
  background: var(--brand-soft);
  border: 1px solid rgba(77, 107, 138, 0.4);
  border-radius: 999px;
}

.tag-editor__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  color: inherit;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.tag-editor__remove:hover {
  background: rgba(255, 255, 255, 0.1);
}

.tag-editor__row {
  display: flex;
  gap: 0.5rem;
}

.tag-editor__input {
  flex: 1;
  min-width: 0;
  height: 2.75rem;
  padding: 0 0.85rem;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
}

.tag-editor__input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.tag-editor__input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.add-server__guidelines {
  margin: 0 0 0.25rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.add-server__guidelines a {
  color: var(--brand-hover);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.add-server__guidelines a:hover {
  color: #fff;
}

.guidelines-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: grid;
  gap: 0.55rem;
}

.guidelines-list strong {
  color: var(--text);
}

@media (max-width: 520px) {
  .add-server__panel {
    padding: 1.75rem 1.15rem 0;
  }

  .add-server__actions {
    margin-left: -1.15rem;
    margin-right: -1.15rem;
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .manager-list__item {
    flex-wrap: wrap;
  }

  .manager-invite__row {
    flex-direction: column;
  }

  .add-server__cancel,
  .add-server__continue,
  .add-server__actions .btn {
    flex: 1 1 8rem;
    justify-content: center;
  }

  .add-server__selected {
    flex-wrap: wrap;
  }

  .add-server__selected .dash-badge,
  .add-server__selected .btn,
  .add-server__selected-actions {
    margin-left: 0;
  }

  .add-server__selected-actions {
    width: 100%;
  }

  .add-server__selected-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

/* —— Bots listing —— */
.welcome--bots .welcome-hero__glow {
  background:
    radial-gradient(ellipse 55% 50% at 70% 20%, rgba(77, 107, 138, 0.35), transparent 60%),
    radial-gradient(ellipse 40% 45% at 15% 80%, rgba(34, 197, 94, 0.12), transparent 55%);
}

.bots-sort {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.bots-sort__btn {
  padding: 0.4rem 0.75rem;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.bots-sort__btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}

.bots-sort__btn.is-active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.bot-listings {
  display: grid;
  gap: 0.85rem;
}

.bot-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem 1.15rem;
  align-items: start;
  padding: 1.15rem 1.2rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.bot-card.is-entering {
  animation: add-server-in 0.4s ease both;
}

.bot-card.is-entering:nth-child(1) { animation-delay: 0.02s; }
.bot-card.is-entering:nth-child(2) { animation-delay: 0.05s; }
.bot-card.is-entering:nth-child(3) { animation-delay: 0.08s; }
.bot-card.is-entering:nth-child(4) { animation-delay: 0.11s; }
.bot-card.is-entering:nth-child(5) { animation-delay: 0.14s; }
.bot-card.is-entering:nth-child(6) { animation-delay: 0.17s; }

@media (prefers-reduced-motion: reduce) {
  .bot-card.is-entering {
    animation: none;
  }
}

.bot-card:hover {
  border-color: rgba(77, 107, 138, 0.35);
}

.bot-card__icon {
  display: block;
  flex-shrink: 0;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--bg-chip);
}

.bot-card__icon img {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
}

.bot-card__body {
  min-width: 0;
  display: grid;
  gap: 0.55rem;
}

.bot-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
}

.bot-card__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bot-card__name a {
  color: #fff;
}

.bot-card__name a:hover {
  color: var(--brand-hover);
}

.bot-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.bot-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.bot-stat svg {
  opacity: 0.8;
}

.bot-stat--votes {
  color: #9aa3ff;
}

.bot-card .tags {
  margin: 0;
}

.bot-card__desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 46rem;
}

.bot-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-self: center;
  min-width: 6.5rem;
}

.bot-card__actions .btn {
  justify-content: center;
  width: 100%;
}

@media (max-width: 720px) {
  .section-head:has(.bots-sort) {
    flex-direction: column;
    align-items: flex-start;
  }

  .bot-card {
    grid-template-columns: auto 1fr;
  }

  .bot-card__actions {
    grid-column: 1 / -1;
    flex-direction: row;
    min-width: 0;
  }

  .bot-card__actions .btn {
    flex: 1;
  }
}

@media (max-width: 400px) {
  .bot-card__icon img {
    width: 3.5rem;
    height: 3.5rem;
  }

  .bot-card__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .bot-card__stats {
    width: 100%;
  }

  .bot-invite-bar__inner {
    flex-wrap: wrap;
  }

  .bot-invite-bar__actions {
    width: 100%;
  }

  .bot-invite-bar__actions .btn {
    flex: 1;
    justify-content: center;
  }
}

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

/* —— All servers page —— */
.page-servers .navbar-search {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.servers-page {
  padding: 1.5rem 0 4rem;
}

.servers-page__crumbs {
  margin-bottom: 1.25rem;
}

.servers-hero {
  margin-bottom: 1.5rem;
}

.servers-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  color: #fff;
}

.servers-hero__lead {
  margin: 0.55rem 0 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 36rem;
}

.servers-page__tags {
  margin: 0 0 1.25rem;
  padding: 0;
}

.servers-toolbar {
  margin-bottom: 1.25rem;
}

.infinite-scroll {
  margin-top: 1.5rem;
  min-height: 3rem;
}

.infinite-scroll__sentinel {
  height: 1px;
  width: 100%;
  pointer-events: none;
}

.infinite-scroll__status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1rem;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 600;
}

.infinite-scroll__status[hidden] {
  display: none;
}

.infinite-scroll__status.is-end {
  color: var(--text-muted);
}

.infinite-scroll__spinner {
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: infinite-spin 0.7s linear infinite;
}

.infinite-scroll__status:not(.is-loading) .infinite-scroll__spinner {
  display: none;
}

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

.page-servers .listing-card {
  content-visibility: auto;
  contain-intrinsic-size: 280px;
}

/* —— Bot detail page —— */
.page-bot .navbar-search {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.bot-page {
  position: relative;
  padding: 1.5rem 0 6.5rem;
  overflow: hidden;
}

.bot-page__glow {
  position: absolute;
  inset: 0 0 auto;
  height: 22rem;
  background:
    radial-gradient(ellipse 60% 80% at 20% 0%, rgba(77, 107, 138, 0.28), transparent 60%),
    radial-gradient(ellipse 40% 60% at 90% 10%, rgba(88, 101, 242, 0.16), transparent 55%);
  pointer-events: none;
}

.bot-page__content {
  position: relative;
  z-index: 1;
}

.bot-panel {
  margin-top: 1rem;
  padding: 1.5rem 1.5rem 1.75rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.bot-panel__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem 1.5rem;
  align-items: start;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.bot-panel__avatar {
  width: 7rem;
  height: 7rem;
  border-radius: 1.25rem;
  object-fit: cover;
  background: var(--bg-chip);
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.bot-panel__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-hover);
}

.bot-panel__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
  color: #fff;
}

.bot-panel__lead {
  margin: 0.45rem 0 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 36rem;
  line-height: 1.45;
}

.bot-panel__rating {
  margin-top: 0.75rem;
}

.bot-panel__tags {
  margin: 0.85rem 0 0;
}

.bot-panel__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.1rem;
}

.bot-panel__stat {
  display: grid;
  gap: 0.15rem;
}

.bot-panel__stat--link {
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

.bot-panel__stat--link:hover .bot-panel__stat-value {
  color: var(--brand-hover);
}

.bot-panel__stat--link:hover .bot-panel__stat-label {
  color: var(--text);
}

.bot-panel__stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.bot-panel__stat-label {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.bot-panel__cta {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-self: start;
  min-width: 12rem;
}

.bot-panel__rating-row {
  width: 100%;
  justify-content: flex-start;
  margin-bottom: 0.15rem;
}

.bot-panel__cta .btn {
  justify-content: center;
}

.btn--lg {
  padding: 0.75rem 1.2rem;
  font-size: 0.98rem;
}

.bot-panel__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16.5rem;
  gap: 1.75rem;
  align-items: start;
}

.bot-section + .bot-section {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.bot-section__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
}

.bot-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}

.bot-section__head .bot-section__title {
  margin: 0;
}

.bot-card__rating {
  width: fit-content;
}

.bot-card__rating.server-rating {
  color: var(--text);
  font-size: 0.85rem;
}

.bot-card__rating .stars {
  filter: none;
  color: var(--star);
}

.bot-card__rating .star {
  width: 1.05rem;
  height: 1.05rem;
}

.bot-card__rating .star--empty {
  color: var(--star-empty);
}

.bot-card__rating .review-count {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-shadow: none;
}

.bot-card__rating .review-count b {
  color: var(--text);
  font-size: 0.88rem;
}

.bot-card__rating:hover {
  color: #fff;
}

.bot-card__rating:hover .review-count {
  color: var(--text-muted);
}

.bot-section__body {
  display: grid;
  gap: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.bot-section__body p {
  margin: 0;
}

.bot-feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.bot-feature-list li {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem 0.95rem;
  background: #16171c;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.bot-feature-list strong {
  color: #fff;
  font-size: 0.95rem;
}

.bot-feature-list span {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.bot-command-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.bot-command-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 0.85rem;
  padding: 0.65rem 0.85rem;
  background: #16171c;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.bot-command-list code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  font-weight: 600;
  color: #c5cbff;
  background: var(--brand-soft);
  border: 1px solid rgba(77, 107, 138, 0.3);
  border-radius: 0.35rem;
  padding: 0.15rem 0.45rem;
}

.bot-command-list span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.bot-reviews {
  display: grid;
  gap: 0.75rem;
}

.page-bot .star--empty {
  color: var(--star-empty);
}

.page-bot .stars {
  filter: none;
}

.page-bot .review-compose {
  margin-bottom: 1.25rem;
}

.page-bot .review-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.page-bot .server-section__more {
  display: inline-block;
  margin-top: 1rem;
}

.bot-review {
  padding: 0.95rem 1rem;
  background: #16171c;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.bot-review__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.bot-review__head img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
}

.bot-review__author {
  font-weight: 700;
  color: var(--text);
}

.bot-review__meta {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.bot-review__text {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.45;
}

.bot-aside-card {
  padding: 1rem 1.05rem;
  background: #16171c;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.bot-aside-card + .bot-aside-card {
  margin-top: 0.75rem;
}

.bot-aside-card__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #fff;
}

.bot-aside-dl {
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.bot-aside-dl div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.bot-aside-dl dt {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.bot-aside-dl dd {
  margin: 0;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: right;
}

.bot-aside-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.bot-aside-links a {
  color: var(--brand-hover);
  font-weight: 600;
  font-size: 0.9rem;
}

.bot-aside-links a:hover {
  color: #fff;
}

.bot-aside-card--warn {
  border-color: rgba(232, 93, 96, 0.28);
}

.bot-aside-card__note {
  margin: 0 0 0.75rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.4;
}

.related-bots {
  margin-top: 2rem;
}

.bot-invite-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 0.75rem 0 calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: rgba(23, 24, 29, 0.92);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.bot-invite-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.bot-invite-bar__copy {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.bot-invite-bar__copy img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  flex-shrink: 0;
}

.bot-invite-bar__name {
  font-weight: 700;
  color: #fff;
}

.bot-invite-bar__meta {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.bot-invite-bar__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

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

  .bot-panel__cta {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
  }

  .bot-panel__cta .btn {
    flex: 1 1 8rem;
  }

  .bot-panel__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .bot-panel {
    padding: 1.15rem;
  }

  .bot-panel__avatar {
    width: 5rem;
    height: 5rem;
  }

  .bot-invite-bar__meta {
    display: none;
  }
}

/* Keep navbar search visible on search so layout matches other pages */

/* —— Search results —— */
.search-page {
  padding: 1.25rem 0 3.5rem;
}

.search-page__inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.search-hero {
  display: grid;
  gap: 1.15rem;
  padding: 1.35rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.search-hero__eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
}

.search-hero__title {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.15rem);
  letter-spacing: -0.03em;
  color: #fff;
}

.search-hero__meta {
  margin: 0.45rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.search-hero__meta strong {
  color: #fff;
}

.search-hero__query {
  color: var(--text);
  font-weight: 600;
}

.search-hero__form {
  max-width: none;
}

.search-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.search-tabs {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.search-tab {
  appearance: none;
  border: 0;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.search-tab:hover {
  color: var(--text);
}

.search-tab.is-active {
  color: #fff;
  background: var(--brand);
}

.search-sort .sort-tab {
  font-size: 0.85rem;
}

.search-results {
  min-height: 12rem;
}

.search-empty {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

.search-empty__icon {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--bg-raised);
  color: var(--text-dim);
}

.search-empty__title {
  margin: 0;
  font-size: 1.15rem;
  color: #fff;
}

.search-empty__text {
  margin: 0;
  max-width: 24rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.search-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.35rem;
}

.search-prompt {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.search-prompt p {
  margin: 0;
  font-size: 1rem;
}

@media (max-width: 640px) {
  .search-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-tabs {
    width: 100%;
    justify-content: center;
  }

  .search-tab {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.65rem;
  }

  /* Do not stretch sort chips on the live search page — keep horizontal scroll */
  .search-page .search-sort,
  .page-search .search-sort {
    width: 100%;
    justify-content: flex-start;
  }

  .search-page .search-sort .sort-tab,
  .page-search .search-sort .sort-tab {
    flex: 0 0 auto;
    text-align: center;
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
  }

  .search-hero button span {
    display: none;
  }

  .search-empty__actions .btn {
    flex: 1 1 calc(50% - 0.25rem);
    justify-content: center;
  }
}

/* —— Admin dashboard —— */
.page-admin .navbar-search {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.admin {
  padding-bottom: 4rem;
}

.admin-hero {
  position: relative;
  padding: 1.5rem 0 1.75rem;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 120% at 8% -30%, rgba(77, 107, 138, 0.32), transparent 58%),
    radial-gradient(ellipse 55% 80% at 95% 0%, rgba(43, 182, 115, 0.1), transparent 52%),
    linear-gradient(180deg, #1c1d26 0%, var(--bg) 100%);
  overflow: hidden;
}

.admin-hero__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 28%, rgba(77, 107, 138, 0.14), transparent 38%),
    radial-gradient(circle at 18% 72%, rgba(58, 85, 112, 0.1), transparent 42%);
  pointer-events: none;
}

.admin-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.15rem;
}

.admin-hero__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 1.5rem;
}

.admin-hero__copy {
  max-width: 40rem;
}

.admin-hero__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.admin-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem 0.28rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6ee7a8;
  background: rgba(43, 182, 115, 0.14);
  border: 1px solid rgba(43, 182, 115, 0.35);
  border-radius: 999px;
}

.admin-live__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 0 2px var(--online-ring);
  animation: adminPulse 2s ease infinite;
}

@keyframes adminPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.92); }
}

.admin-pill {
  display: inline-flex;
  padding: 0.28rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(38, 40, 48, 0.72);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.admin-pill--muted {
  color: var(--text-dim);
}

.admin-hero__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-hover);
}

.admin-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  letter-spacing: -0.04em;
  color: #fff;
}

.admin-hero__lead {
  margin: 0.55rem 0 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 34rem;
  line-height: 1.5;
}

.admin-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.admin-period {
  display: inline-flex;
  padding: 0.22rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.admin-period__btn {
  appearance: none;
  border: 0;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.admin-period__btn:hover {
  color: var(--text);
}

.admin-period__btn.is-active {
  color: #fff;
  background: var(--brand);
}

.admin-shell {
  padding-top: 1.35rem;
}

.admin-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.35rem;
}

.admin-kpi {
  position: relative;
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.05rem 0.85rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s var(--ease);
}

.admin-kpi:hover {
  border-color: rgba(77, 107, 138, 0.32);
  transform: translateY(-1px);
}

.admin-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), transparent);
  opacity: 0.55;
}

.admin-kpi__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.admin-kpi__label {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.admin-kpi__icon {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand-hover);
  flex-shrink: 0;
}

.admin-kpi__value {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.admin-kpi__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.admin-kpi__delta {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-kpi__delta--up {
  color: #6ee7a8;
}

.admin-kpi__delta--down {
  color: var(--danger);
}

.admin-kpi__spark {
  flex: 1;
  min-width: 0;
  max-width: 5.5rem;
  height: 1.75rem;
  opacity: 0.85;
}

.admin-kpi__spark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.admin-tabs {
  margin-bottom: 1.35rem;
}

.dashboard-tab .admin-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  margin-left: 0.15rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: var(--danger);
  border-radius: 999px;
  line-height: 1;
}

.dashboard-tab .admin-tab-badge:empty,
.dashboard-tab .admin-tab-badge[hidden] {
  display: none;
}

.admin-chart {
  position: relative;
  width: 100%;
  min-height: 12rem;
}

.admin-chart-tooltip {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  padding: 0.45rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: rgba(18, 19, 24, 0.94);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  white-space: nowrap;
  transform: translate(-50%, -110%);
}

.admin-chart-tooltip__row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-chart-tooltip__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 2px;
}

.admin-empty {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  padding: 2.5rem 1.25rem;
  text-align: center;
}

.admin-empty__icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: rgba(43, 182, 115, 0.12);
  color: var(--online);
}

.admin-empty__title {
  margin: 0;
  font-weight: 700;
  color: #fff;
}

.admin-empty__text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.admin-listings {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.admin-listing {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.admin-listing__icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.55rem;
  object-fit: cover;
  background: var(--bg-chip);
}

.admin-listing__name {
  font-weight: 650;
  color: #fff;
  font-size: 0.92rem;
}

.admin-listing__meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.1rem;
}

.admin-listing__type {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-hover);
}

.admin-listing__type--bot {
  background: rgba(43, 182, 115, 0.14);
  color: #6ee7a8;
}

.admin-split--tables {
  margin-top: 0.85rem;
}

.admin-kpi[data-admin-goto] {
  cursor: pointer;
}

.admin-kpi[data-admin-goto]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

#admin-refresh.is-loading svg {
  animation: infinite-spin 0.7s linear infinite;
}

@media (max-width: 900px) {
  .admin-tabs {
    width: 100%;
    border-radius: var(--radius-lg);
  }

  .admin-tabs .dashboard-tab {
    flex: 1 1 calc(50% - 0.4rem);
    justify-content: center;
  }
}

.admin-panel[hidden] {
  display: none;
}

.admin-panel.is-active {
  animation: dashIn 0.28s var(--ease) both;
}

.admin-grid {
  display: grid;
  gap: 0.85rem;
}

.admin-grid--charts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-grid--analytics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-grid--system {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.85rem;
}

.admin-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.admin-chart-card {
  padding: 1.15rem 1.2rem 1.2rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.admin-chart-card--wide {
  grid-column: span 2;
}

.admin-chart-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 1rem;
}

.admin-chart-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.admin-chart-card__desc {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.admin-chart-card__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.admin-mini-stat__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 0.15rem;
}

.admin-mini-stat__value {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.admin-mini-stat__value--ok {
  color: #6ee7a8;
}

.admin-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}

.admin-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
}

.admin-legend__swatch {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
}

.admin-legend__swatch--brand {
  background: var(--brand);
}

.admin-legend__swatch--cyan {
  background: #38bdf8;
}

.admin-legend__swatch--green {
  background: var(--online);
}

.admin-chart--area {
  min-height: 14rem;
}

.admin-chart--area-sm {
  min-height: 9rem;
}

.admin-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.admin-chart .admin-grid-line {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
}

.admin-chart .admin-axis-label {
  fill: var(--text-dim);
  font-size: 10px;
  font-family: var(--font);
  font-weight: 600;
}

.admin-chart .admin-area-fill {
  opacity: 0;
  animation: adminAreaIn 0.8s var(--ease) forwards;
}

.admin-chart .admin-area-line {
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: adminLineDraw 1.1s var(--ease) forwards;
}

.admin-chart .admin-area-line--secondary {
  stroke-width: 2;
  opacity: 0.85;
}

@keyframes adminAreaIn {
  to { opacity: 1; }
}

@keyframes adminLineDraw {
  to { stroke-dashoffset: 0; }
}

.admin-donut-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
}

.admin-chart--donut {
  width: 9.5rem;
  min-height: 9.5rem;
  margin: 0 auto;
}

.admin-chart--donut-sm {
  width: 7.5rem;
  min-height: 7.5rem;
}

.admin-donut-legend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.admin-donut-legend--compact {
  margin-top: 0.75rem;
}

.admin-donut-legend li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.admin-donut-legend__left {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.admin-donut-legend__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  flex-shrink: 0;
}

.admin-donut-legend__pct {
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.admin-chart--bars .admin-bar-group {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.45rem;
  height: 10rem;
  padding-top: 0.25rem;
}

.admin-chart--bars .admin-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  height: 100%;
  justify-content: flex-end;
}

.admin-chart--bars .admin-bar-stack {
  display: flex;
  align-items: flex-end;
  gap: 0.18rem;
  width: 100%;
  height: 100%;
}

.admin-chart--bars .admin-bar {
  flex: 1;
  min-width: 0;
  border-radius: 999px 999px 2px 2px;
  transform-origin: bottom;
  transform: scaleY(0);
  animation: adminBarUp 0.55s var(--ease) forwards;
}

.admin-chart--bars .admin-bar--servers {
  background: linear-gradient(180deg, var(--brand-hover), var(--brand-deep));
}

.admin-chart--bars .admin-bar--bots {
  background: linear-gradient(180deg, #4ade80, #16a34a);
  opacity: 0.9;
}

@keyframes adminBarUp {
  to { transform: scaleY(1); }
}

.admin-chart--bars .admin-bar-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.admin-heatmap-wrap {
  display: grid;
  gap: 0.55rem;
}

.admin-heatmap {
  display: grid;
  grid-template-columns: 2.2rem repeat(24, minmax(0, 1fr));
  gap: 2px;
  font-size: 0.68rem;
}

.admin-heatmap__day {
  display: flex;
  align-items: center;
  color: var(--text-dim);
  font-weight: 600;
  padding-right: 0.35rem;
}

.admin-heatmap__cell {
  aspect-ratio: 1;
  min-height: 0.85rem;
  border-radius: 2px;
  background: var(--bg-chip);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.admin-heatmap__cell:hover {
  transform: scale(1.15);
  filter: brightness(1.15);
  z-index: 1;
}

.admin-heatmap__hours {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 2px;
  margin-bottom: 0.15rem;
}

.admin-heatmap__hour {
  text-align: center;
  color: var(--text-dim);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.admin-heatmap-scale {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 600;
}

.admin-heatmap-scale__bar {
  width: 5rem;
  height: 0.35rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bg-chip), var(--brand));
}

.admin-hbars {
  display: grid;
  gap: 0.65rem;
}

.admin-hbar {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  gap: 0.65rem;
  align-items: center;
}

.admin-hbar__label {
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-hbar__track {
  height: 0.55rem;
  background: var(--bg-chip);
  border-radius: 999px;
  overflow: hidden;
}

.admin-hbar__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-deep), var(--brand-hover));
  transform-origin: left;
  transform: scaleX(0);
  animation: adminHbarIn 0.65s var(--ease) forwards;
}

@keyframes adminHbarIn {
  to { transform: scaleX(1); }
}

.admin-hbar__value {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.admin-hbars--geo .admin-hbar {
  grid-template-columns: 2.5rem 1fr auto;
}

.admin-feed {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
  max-height: 18rem;
  overflow: auto;
}

.admin-feed__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: start;
  padding: 0.65rem 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.admin-feed__icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand-hover);
  flex-shrink: 0;
}

.admin-feed__icon--warn {
  background: rgba(232, 93, 96, 0.14);
  color: var(--danger);
}

.admin-feed__icon--ok {
  background: rgba(43, 182, 115, 0.14);
  color: var(--online);
}

.admin-feed__text {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.admin-feed__text strong {
  color: #fff;
  font-weight: 650;
}

.admin-feed__time {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}

.admin-table-card {
  margin-top: 0.85rem;
}

.admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
  padding: 0.7rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.admin-table__server {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-weight: 650;
}

.admin-table__server img {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  object-fit: cover;
}

.admin-table__trend {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-table__trend--up {
  color: #6ee7a8;
}

.admin-table__trend--down {
  color: var(--danger);
}

.admin-table__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.admin-funnel {
  display: grid;
  gap: 0.55rem;
}

.admin-funnel__step {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.admin-funnel__step::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w, 100%);
  background: linear-gradient(90deg, var(--brand-soft), transparent);
  pointer-events: none;
}

.admin-funnel__label {
  position: relative;
  font-weight: 650;
  color: #fff;
}

.admin-funnel__meta {
  position: relative;
  text-align: right;
}

.admin-funnel__count {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.admin-funnel__pct {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
}

.admin-rating-bars {
  display: grid;
  gap: 0.55rem;
}

.admin-rating-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  gap: 0.65rem;
  align-items: center;
}

.admin-rating-row__stars {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--star);
}

.admin-rating-row__track {
  height: 0.5rem;
  background: var(--bg-chip);
  border-radius: 999px;
  overflow: hidden;
}

.admin-rating-row__fill {
  height: 100%;
  background: linear-gradient(90deg, #d4a017, var(--star));
  border-radius: inherit;
  transform-origin: left;
  transform: scaleX(0);
  animation: adminHbarIn 0.6s var(--ease) forwards;
}

.admin-rating-row__count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.admin-mod-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.admin-mod-stat {
  padding: 0.95rem 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.admin-mod-stat--warn {
  border-color: rgba(232, 93, 96, 0.28);
}

.admin-mod-stat__label {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text-dim);
}

.admin-mod-stat__value {
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.admin-mod-stat--warn .admin-mod-stat__value {
  color: var(--danger);
}

.admin-mod-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.admin-mod-filter {
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.35rem;
  border: 1px solid var(--border-strong);
  padding: 0 0.85rem;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.admin-mod-filter:hover {
  color: var(--text);
}

.admin-mod-filter.is-active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.admin-table--mod .status-chip {
  font-size: 0.72rem;
}

.admin-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.admin-health {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.admin-health--ok {
  border-color: rgba(43, 182, 115, 0.28);
}

.admin-health--warn {
  border-color: rgba(246, 195, 68, 0.28);
}

.admin-health__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.admin-health__name {
  font-weight: 700;
  color: #fff;
  font-size: 0.92rem;
}

.admin-health__badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}

.admin-health__badge--ok {
  color: #6ee7a8;
  background: rgba(43, 182, 115, 0.14);
}

.admin-health__badge--warn {
  color: #fcd34d;
  background: rgba(246, 195, 68, 0.12);
}

.admin-health__metric {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.admin-health__sub {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.admin-log {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  max-height: 14rem;
  overflow: auto;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.78rem;
}

.admin-log__entry {
  display: grid;
  grid-template-columns: 4.5rem 4rem 1fr;
  gap: 0.65rem;
  padding: 0.45rem 0.55rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.admin-log__time {
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.admin-log__level {
  font-weight: 700;
  text-transform: uppercase;
}

.admin-log__level--info {
  color: #38bdf8;
}

.admin-log__level--warn {
  color: #fcd34d;
}

.admin-log__level--ok {
  color: #6ee7a8;
}

@media (max-width: 1100px) {
  .admin-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-mod-stats,
  .admin-health-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .admin-grid--charts,
  .admin-grid--analytics,
  .admin-grid--system {
    grid-template-columns: 1fr;
  }

  .admin-chart-card--wide {
    grid-column: span 1;
  }

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

  .admin-hero__row {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-hero__actions {
    justify-content: flex-start;
  }

  .admin-donut-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .admin-donut-legend li {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .admin-kpis,
  .admin-mod-stats,
  .admin-health-grid {
    grid-template-columns: 1fr;
  }

  .admin-heatmap {
    grid-template-columns: 1.8rem repeat(12, minmax(0, 1fr));
  }

  .admin-heatmap__hours {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .admin-heatmap__hour:nth-child(even) {
    visibility: hidden;
  }

  .admin-hbar {
    grid-template-columns: 4.5rem 1fr auto;
  }

  .admin-table th:nth-child(3),
  .admin-table td:nth-child(3),
  .admin-table th:nth-child(6),
  .admin-table td:nth-child(6) {
    display: none;
  }
}

@media (max-width: 480px) {
  .admin-period__btn {
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
  }

  .admin-chart-card {
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-live__dot,
  .admin-chart .admin-area-fill,
  .admin-chart .admin-area-line,
  .admin-chart--bars .admin-bar,
  .admin-hbar__fill,
  .admin-rating-row__fill {
    animation: none;
    opacity: 1;
    transform: none;
    stroke-dashoffset: 0;
  }
}

/* Login */
.welcome--login {
  height: clamp(14rem, 28vw, 18rem);
}

.login-section {
  padding: clamp(1.75rem, 4vw, 2.5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
}

.login-page__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  justify-content: center;
}

.login-aside {
  order: 1;
  max-width: 22rem;
}

.login-aside__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.login-aside__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.login-aside__list li {
  position: relative;
  padding-left: 1rem;
}

.login-aside__list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--text-dim);
}

.login-card {
  order: 2;
  width: 100%;
  max-width: 22rem;
  margin-inline: auto;
  padding: 1.5rem 1.35rem 1.25rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.login-card__title {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.15;
}

.login-card__lead {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.login-card__note {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.login-card__back {
  margin: 1rem 0 0;
  font-size: 0.88rem;
  text-align: center;
}

.login-card__back a {
  color: var(--text-muted);
}

.login-card__back a:hover {
  color: var(--brand-hover);
}

.login-card__legal {
  margin: 1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
  text-align: center;
}

.login-card__legal a {
  color: var(--text-muted);
}

.login-card__legal a:hover {
  color: var(--brand-hover);
}

.btn--discord {
  width: 100%;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  background: #5865f2;
  border-color: #5865f2;
  color: #fff;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.btn--discord:hover:not(:disabled),
.btn--discord:focus-visible:not(:disabled) {
  background: #4752c4;
  border-color: #4752c4;
  color: #fff;
}

.btn--discord:disabled {
  opacity: 0.88;
  cursor: wait;
}

.btn--discord .btn__spinner {
  display: none;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: loginSpin 0.65s linear infinite;
}

.btn--discord.is-loading .btn__icon,
.btn--discord.is-loading .btn__label {
  opacity: 0;
}

.btn--discord.is-loading .btn__spinner {
  display: block;
  position: absolute;
}

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

.btn--lg {
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
}

@media (max-width: 900px) {
  .login-page__grid {
    grid-template-columns: 1fr;
    max-width: 22rem;
    margin-inline: auto;
  }

  .login-card {
    order: 1;
  }

  .login-aside {
    display: none;
  }
}

@media (max-width: 560px) {
  .login-section {
    padding-top: 1.25rem;
  }

  .login-card {
    padding: 1.25rem 1.1rem 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn--discord {
    transition: none;
  }

  .btn--discord .btn__spinner {
    animation: none;
    border-top-color: transparent;
    border-right-color: #fff;
  }
}

/* Legal pages */
.legal-page .legal-doc__body {
  display: grid;
  gap: 1.25rem;
}

.legal-doc__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
}

.legal-doc__nav a {
  color: var(--accent);
}

/* Report page tweaks */
.page-report .add-server__panel {
  max-width: 42rem;
}

/* 404 */
.error-page {
  min-height: calc(100vh - var(--nav-h, 64px) - 120px);
  display: flex;
  align-items: center;
  padding: 2.5rem 0 3rem;
}

.error-page__inner {
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
}

.error-page__code {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(4rem, 16vw, 6.5rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-page__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.error-page__lead {
  margin: 0 auto 1.5rem;
  max-width: 32rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.error-page__search {
  max-width: 28rem;
  margin: 0 auto;
}
