:root {
  --bg: #07050c;
  --bg-elevated: #110c18;
  --panel: rgba(22, 14, 34, 0.92);
  --panel-hover: rgba(30, 20, 46, 0.96);
  --border: rgba(167, 139, 204, 0.14);
  --border-strong: rgba(167, 139, 204, 0.28);
  --text: #f8f4ff;
  --muted: #a894c9;
  --muted-2: #7c6899;
  --accent: #a855f7;
  --accent-2: #7c3aed;
  --accent-soft: rgba(168, 85, 247, 0.14);
  --discord: #5865f2;
  --discord-hover: #4752c4;
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.12);
  --error: #f87171;
  --error-bg: rgba(248, 113, 113, 0.12);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 72px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(124, 58, 237, 0.22), transparent 34%),
    radial-gradient(circle at 85% 10%, rgba(168, 85, 247, 0.12), transparent 28%),
    linear-gradient(180deg, #12081d 0%, var(--bg) 42%, #050308 100%);
}

a { color: #d8b4fe; text-decoration: none; }
a:hover { color: #f3e8ff; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 0.12rem 0.38rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: rgba(7, 5, 12, 0.78);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: block;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.brand-text { font-size: 1.05rem; }

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-link {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: white;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.25);
}

.nav-link-accent {
  color: #ddd6fe;
  background: rgba(88, 101, 242, 0.12);
  box-shadow: inset 0 0 0 1px rgba(88, 101, 242, 0.22);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.55rem 0.35rem 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.user-chip:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-strong);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.user-name {
  font-size: 0.88rem;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.5rem;
  align-items: start;
}

.page-main { min-width: 0; }

.page-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1.25rem);
}

.hero-panel {
  text-align: center;
  padding: 3.5rem 1.5rem 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.lead, .muted { color: var(--muted); }
.lead { font-size: 1.05rem; line-height: 1.65; max-width: 42rem; }
.muted { line-height: 1.55; }

.page-title-block { margin-bottom: 1.5rem; }
.page-title-block h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.45rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.78rem 1.2rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #b56bff, #7c3aed);
  color: white;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.28);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(124, 58, 237, 0.34);
}

.btn-sm { padding: 0.55rem 0.95rem; font-size: 0.88rem; border-radius: 10px; }
.btn-block { width: 100%; }

.btn-discord {
  background: linear-gradient(135deg, #6874ff, #5865f2);
  box-shadow: 0 10px 30px rgba(88, 101, 242, 0.28);
}

.feature-card a {
  color: var(--accent);
}

.feature-card a:hover {
  color: var(--accent-2);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--border);
}

.btn-outline {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--border);
}

.btn-lg {
  padding: 0.95rem 1.45rem;
  font-size: 1rem;
  border-radius: 14px;
}

.btn-outline-light {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.header-invite-btn { display: none; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.45rem;
  box-shadow: var(--shadow);
}

.card + .card { margin-top: 1rem; }

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.card-head p { margin: 0.25rem 0 0; }

.bot-stats-card {
  background: linear-gradient(180deg, rgba(30, 18, 48, 0.95), rgba(18, 12, 28, 0.95));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.bot-stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.bot-stats-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.8);
}

.bot-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.bot-stat {
  padding: 0.95rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.bot-stat strong {
  display: block;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.15rem;
}

.bot-stat span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.guild-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.guild-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}

.guild-card:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.45);
  background: var(--panel-hover);
}

.guild-card img,
.guild-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex-shrink: 0;
}

.guild-icon-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.guild-icon-wrap img,
.guild-icon-wrap .guild-placeholder {
  width: 100%;
  height: 100%;
  display: block;
}

.guild-card-add .guild-icon-wrap img,
.guild-card-add .guild-icon-wrap .guild-placeholder {
  filter: grayscale(0.35) brightness(0.5);
}

.guild-icon-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem;
  border-radius: 14px;
  background: rgba(8, 6, 14, 0.78);
  color: #f3e8ff;
  font-size: 0.58rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.guild-card-add:hover .guild-icon-overlay {
  background: rgba(124, 58, 237, 0.88);
}

.guild-card-add:hover {
  border-color: rgba(168, 85, 247, 0.35);
}

.guild-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #9333ea, #6d28d9);
  font-weight: 800;
  font-size: 1.1rem;
}

.guild-card span {
  font-weight: 700;
  line-height: 1.35;
}

/* Your servers page — centered layout */
.guilds-page .guilds-shell {
  max-width: 920px;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.guilds-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.guilds-hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  margin-bottom: 0.55rem;
}

.guilds-hero .lead {
  margin: 0 auto;
  max-width: 34rem;
}

.guilds-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.guilds-grid .guild-card {
  width: min(100%, 280px);
}

.guilds-empty {
  max-width: 520px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.guilds-empty-action {
  margin-top: 1.25rem;
}

.guilds-stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.guilds-stats-live {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}

.guilds-stats-live strong {
  color: var(--text);
  font-weight: 800;
}

.guilds-stats-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.guilds-stats-link:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.empty-state p { margin: 0.35rem 0; }

.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.back-link:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-strong);
}

.guild-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.guild-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.guild-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.25rem;
}

.alert {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  font-weight: 600;
}

.alert.success {
  background: var(--success-bg);
  border-color: rgba(52, 211, 153, 0.28);
  color: #a7f3d0;
}

.alert.error {
  background: var(--error-bg);
  border-color: rgba(248, 113, 113, 0.28);
  color: #fecaca;
}

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

.stat-tile {
  padding: 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-tile strong {
  display: block;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.2rem;
}

.stat-tile span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.settings-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.settings-layout .card-wide { grid-column: 1 / -1; }

.section-note {
  margin: 0 0 1rem;
  font-size: 0.92rem;
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}

.toggle-card {
  position: relative;
  display: block;
  cursor: pointer;
}

.toggle-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-card-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.toggle-card span {
  font-size: 0.9rem;
  font-weight: 600;
}

.toggle-card .switch {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s;
}

.toggle-card .switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  transition: transform 0.15s;
}

.toggle-card input:checked + .toggle-card-inner {
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(168, 85, 247, 0.1);
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.18);
}

.toggle-card input:checked + .toggle-card-inner .switch {
  background: linear-gradient(135deg, #c084fc, #7c3aed);
}

.toggle-card input:checked + .toggle-card-inner .switch::after {
  transform: translateX(18px);
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-field label,
.form-field .field-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: #ddd6fe;
}

.form-field select,
.form-field input[type="number"],
.form-field input[type="text"] {
  width: 100%;
  padding: 0.72rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #c4b5fd 50%),
    linear-gradient(135deg, #c4b5fd 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% + 2px),
    calc(100% - 12px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

.form-field select:focus,
.form-field input:focus {
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.form-field-full { grid-column: 1 / -1; }

.switch-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.switch-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-field .switch {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  position: relative;
  flex-shrink: 0;
}

.switch-field .switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  transition: transform 0.15s;
}

.switch-field input:checked ~ .switch {
  background: linear-gradient(135deg, #c084fc, #7c3aed);
}

.switch-field input:checked ~ .switch::after {
  transform: translateX(18px);
}

.read-only-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.25rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.read-only-grid dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.read-only-grid dd {
  margin: 0.15rem 0 0;
}

.save-bar {
  position: sticky;
  bottom: 1rem;
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(12, 8, 18, 0.92);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow);
}

.save-bar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.legal-page h1 { margin-bottom: 0.35rem; }

.legal-card h2 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
}

.legal-card h2:first-child { margin-top: 0; }

.legal-card ul {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.legal-card li { margin: 0.35rem 0; line-height: 1.6; }
.legal-card p { line-height: 1.7; }

.cookie-table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.cookie-table th,
.cookie-table td {
  padding: 0.75rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

.cookie-table th {
  background: rgba(255, 255, 255, 0.04);
  color: #ddd6fe;
  font-weight: 700;
}

.cookie-table td { color: var(--muted); }
.cookie-table tbody tr:last-child td { border-bottom: none; }
.cookie-table code { font-size: 0.82rem; }

.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  color: var(--muted-2);
  font-size: 0.88rem;
  text-align: center;
}

.site-footer p { margin: 0; }

/* ── Landing page ── */

.landing-page {
  background: #06040b;
}

.landing-page body,
body.landing-page {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 58, 237, 0.35), transparent),
    radial-gradient(circle at 90% 20%, rgba(88, 101, 242, 0.12), transparent 30%),
    radial-gradient(circle at 10% 80%, rgba(168, 85, 247, 0.08), transparent 35%),
    #06040b;
}

.landing-main { overflow: hidden; }

.landing-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.landing-hero {
  position: relative;
  padding: 3.5rem 0 4rem;
}

.landing-hero-glow {
  position: absolute;
  inset: -20% 0 auto;
  height: 500px;
  background: radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.2), transparent 65%);
  pointer-events: none;
}

.landing-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.landing-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem 0.4rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ddd6fe;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.landing-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.8);
}

.landing-hero-copy h1 {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 1.1rem;
}

.text-gradient {
  background: linear-gradient(135deg, #e9d5ff 0%, #c084fc 45%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-subtitle {
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 34rem;
  margin: 0 0 1.75rem;
}

.landing-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.landing-fine-print {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--muted-2);
}

.landing-hero-visual {
  position: relative;
}

.preview-window {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 8, 20, 0.95);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(168, 85, 247, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: perspective(1200px) rotateY(-6deg) rotateX(4deg);
}

.preview-titlebar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.preview-titlebar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.preview-titlebar span:first-child { background: #f87171; }
.preview-titlebar span:nth-child(2) { background: #fbbf24; }
.preview-titlebar span:nth-child(3) { background: #34d399; }

.preview-title {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--muted-2);
  font-weight: 600;
}

.preview-body {
  display: grid;
  grid-template-columns: 130px 1fr;
  min-height: 260px;
}

.preview-sidebar {
  padding: 1rem 0.75rem;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}

.preview-nav-item {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.preview-nav-item.active {
  background: rgba(168, 85, 247, 0.18);
  color: #f3e8ff;
}

.preview-content { padding: 1rem; }

.preview-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.preview-stat {
  padding: 0.65rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-stat strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.1rem;
}

.preview-stat span {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
}

.preview-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0;
  font-size: 0.82rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.preview-switch {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  position: relative;
}

.preview-switch.on {
  background: linear-gradient(135deg, #c084fc, #7c3aed);
}

.preview-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
}

.preview-switch.on::after { transform: translateX(16px); }

.preview-channel {
  margin-top: 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: rgba(88, 101, 242, 0.1);
  border: 1px solid rgba(88, 101, 242, 0.2);
  font-size: 0.72rem;
  color: #c4b5fd;
  font-weight: 600;
}

/* Landing hero — Server Memory editor preview */
.landing-preview-window .landing-preview-titlebar {
  justify-content: center;
}

.landing-preview-window .preview-title {
  margin-left: 0;
  font-size: 0.78rem;
  color: #e9d5ff;
}

.landing-preview-body {
  min-height: 300px;
}

.preview-nav-group-label {
  padding: 0.35rem 0.75rem 0.15rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
}

.landing-preview-content {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem 0.9rem 0.95rem;
}

.landing-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.landing-preview-panel-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.landing-preview-tabs .dash-segment {
  padding: 0.32rem 0.65rem;
  font-size: 0.68rem;
  cursor: default;
}

.landing-preview-note {
  margin: 0;
  font-size: 0.66rem;
  color: var(--muted-2);
  font-weight: 600;
}

.landing-preview-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.landing-preview-section {
  position: relative;
  padding: 0.55rem 0.6rem 0.55rem 1.35rem;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.12);
  background: rgba(255, 255, 255, 0.03);
  opacity: 0.55;
}

.landing-preview-section.is-selected {
  opacity: 1;
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(245, 158, 11, 0.08);
}

.landing-preview-section strong {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  margin-bottom: 0.08rem;
}

.landing-preview-section span:not(.landing-preview-section-drag):not(.landing-preview-section-check) {
  display: block;
  font-size: 0.58rem;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.3;
}

.landing-preview-section-drag {
  position: absolute;
  left: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.22);
  letter-spacing: -0.08em;
}

.landing-preview-section-check {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  font-size: 0.62rem;
  color: #fbbf24;
  font-weight: 700;
}

.landing-preview-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.15rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.landing-preview-accent {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
  flex-shrink: 0;
}

.landing-preview-url {
  font-size: 0.64rem;
  font-weight: 600;
  color: #c4b5fd;
}

/* ── Live guild dashboard (matches landing preview) ── */

.dash-page {
  background:
    radial-gradient(circle at 20% 0%, rgba(124, 58, 237, 0.18), transparent 40%),
    #06040b;
}

.dash-page .site-footer { display: none; }

.dash-shell {
  max-width: 1080px;
  padding-bottom: 4rem;
}

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

.dash-topbar-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.dash-guild-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.dash-stage {
  position: relative;
}

.dash-window {
  transform: none;
  max-width: 100%;
  overflow: visible;
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(168, 85, 247, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.dash-body {
  min-height: 520px;
  grid-template-columns: 172px minmax(0, 1fr);
}

.dash-titlebar {
  justify-content: center;
  padding: 0.85rem 1.15rem;
}

.dash-titlebar .preview-title {
  margin-left: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.dash-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  max-height: min(72vh, 620px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.65rem 0.45rem 0.65rem 0.65rem;
  margin: 0.65rem 0 0.65rem 0.65rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.04);
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.5) rgba(255, 255, 255, 0.04);
}

.dash-sidebar::-webkit-scrollbar {
  width: 7px;
}

.dash-sidebar::-webkit-scrollbar-track {
  margin: 6px 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
}

.dash-sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(192, 132, 252, 0.5), rgba(124, 58, 237, 0.62));
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.dash-sidebar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(216, 180, 254, 0.68), rgba(139, 92, 246, 0.72));
}

.dash-panel-header .dash-category-toggle {
  margin-top: 0.85rem;
  margin-bottom: 0;
}

.dash-section-card .dash-command-scroll {
  max-height: 280px;
}

.dash-subheading {
  margin: 1.15rem 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #a78bfa;
}

.dash-subheading:first-of-type {
  margin-top: 0.35rem;
}

.dash-sidebar .preview-nav-item {
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  padding: 0.5rem 0.75rem;
  border-radius: 9px;
  font-size: 0.78rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.dash-sidebar .preview-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.dash-sidebar .preview-nav-item.active {
  background: rgba(168, 85, 247, 0.2);
  color: #faf5ff;
  box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.14);
}

.dash-content {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  max-height: min(72vh, 620px);
  overflow-y: auto;
  padding: 1.35rem 1.45rem 1.15rem;
  position: relative;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.35) rgba(255, 255, 255, 0.03);
}

.dash-content::-webkit-scrollbar {
  width: 8px;
}

.dash-content::-webkit-scrollbar-track {
  background: transparent;
}

.dash-content::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.28);
  border-radius: 999px;
}

.dash-content::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.42);
}

.dash-panel-header {
  margin-bottom: 1.15rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-panel-header .dash-panel-title {
  margin-bottom: 0.35rem;
  font-size: 1.12rem;
}

.dash-panel-header .dash-panel-note {
  margin-bottom: 0;
}

.dash-section-card {
  padding: 1rem 1.05rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 1rem;
}

.dash-section-card:last-child {
  margin-bottom: 0;
}

.dash-section-card-wide {
  padding: 1.1rem;
}

.dash-section-card-title {
  margin: 0 0 0.25rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #ede9fe;
}

.dash-section-card-desc {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.dash-section-card .dash-subheading:first-child,
.dash-section-card .dash-section-card-title + .dash-fields {
  margin-top: 0;
}

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

.dash-field-grid .dash-field-full,
.dash-field-grid .preview-toggle-row,
.dash-field-grid .dash-panel-note,
.dash-field-grid .dash-memory-cta,
.dash-field-grid .dash-mention-tools {
  grid-column: 1 / -1;
}

.dash-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
}

.dash-toggle-grid .preview-toggle-row {
  margin: 0;
}

.dash-panel {
  display: none;
  flex: 1;
}

.dash-panel.active {
  display: flex;
  flex-direction: column;
}

.dash-panel-title {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ede9fe;
}

.dash-panel-note {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.dash-category-intro {
  margin: 0.35rem 0 1.15rem;
  padding-bottom: 0.15rem;
}

.dash-section-divider {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-command-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

.dash-toggle-list {
  flex: 1;
}

.dash-toggle-row {
  cursor: pointer;
  margin: 0;
}

.dash-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dash-toggle-row .dash-switch {
  flex-shrink: 0;
}

.dash-toggle-input:checked + .dash-switch {
  background: linear-gradient(135deg, #c084fc, #7c3aed);
}

.dash-toggle-input:checked + .dash-switch::after {
  transform: translateX(16px);
}

.dash-fields {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dash-points-note {
  margin-top: -0.35rem;
}

.dash-mod-log-events {
  margin-top: 0.5rem;
}

.dash-mod-log-toggle span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dash-mod-log-toggle-desc {
  display: block;
  color: var(--dash-muted, #94a3b8);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.35;
}

.dash-points-fields.is-disabled,
[data-bump-xp-fields].is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.dash-command-scroll {
  flex: 1;
  overflow-y: auto;
  max-height: 420px;
  padding-right: 0.25rem;
}

.dash-command-group + .dash-command-group {
  margin-top: 1.25rem;
}

.dash-command-group-title {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a78bfa;
}

.dash-command-row-wrap.is-category-off {
  opacity: 0.55;
}

.dash-command-row-wrap.is-category-off .dash-command-label code::after {
  content: ' (category off)';
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 500;
}

.dash-command-label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.dash-command-desc {
  display: block;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 400;
}

.dash-command-row span code {
  font-size: 0.82rem;
  color: #e9d5ff;
  background: transparent;
  padding: 0;
}

.dash-command-row.is-category-off {
  opacity: 0.55;
}

.dash-command-row.is-category-off span code::after {
  content: ' · category off';
  font-size: 0.72rem;
  color: var(--muted);
  font-family: inherit;
}

.dash-level-rewards,
.dash-bump-rewards {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dash-textarea,
.dash-text-input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  resize: vertical;
}

.dash-textarea:focus,
.dash-text-input:focus,
.dash-color-input:focus {
  outline: none;
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.12);
}

.dash-field-row {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.75rem;
}

.dash-color-input {
  width: 100%;
  height: 42px;
  padding: 0.2rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.dash-welcome-builder {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dash-segmented {
  display: inline-flex;
  padding: 0.2rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  width: fit-content;
}

.dash-segment {
  position: relative;
  padding: 0.45rem 0.9rem;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.dash-segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dash-segment.active {
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.28), rgba(124, 58, 237, 0.35));
  color: #f5f3ff;
  box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.18);
}

.dash-welcome-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.dash-welcome-panel {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
}

.dash-welcome-panel.active {
  display: flex;
}

.dash-placeholder-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.dash-role-chip {
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(59, 130, 246, 0.14);
  color: #bfdbfe;
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.dash-role-chip:hover {
  background: rgba(59, 130, 246, 0.24);
}

.dash-role-chip.is-selected {
  border-color: rgba(168, 85, 247, 0.55);
  background: rgba(168, 85, 247, 0.24);
  color: #f3e8ff;
}

.dash-mention-tools {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dash-mention-tools-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #ddd6fe;
}

.dash-placeholder-chip {
  border: 1px solid rgba(168, 85, 247, 0.22);
  background: rgba(124, 58, 237, 0.12);
  color: #ddd6fe;
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  cursor: pointer;
}

.dash-placeholder-chip:hover {
  background: rgba(124, 58, 237, 0.22);
}

.dash-embed-preview {
  position: sticky;
  top: 0;
}

.dash-embed-preview-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #a78bfa;
  margin-bottom: 0.45rem;
}

.dash-discord-preview {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.34);
  padding: 0.85rem;
}

.dash-discord-content {
  margin-bottom: 0.55rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #e9d5ff;
}

.dash-discord-embed {
  display: grid;
  grid-template-columns: 4px 1fr auto;
  gap: 0.65rem;
  align-items: start;
  padding: 0.55rem 0.65rem 0.55rem 0;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.22);
}

.dash-discord-embed-bar {
  width: 4px;
  align-self: stretch;
  border-radius: 4px;
  background: #6b21a8;
}

.dash-discord-embed-body {
  min-width: 0;
}

.dash-discord-embed-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.dash-discord-embed-desc {
  font-size: 0.82rem;
  line-height: 1.45;
  color: #d1d5db;
  white-space: pre-wrap;
}

.dash-discord-embed-footer {
  margin-top: 0.45rem;
  font-size: 0.72rem;
  color: #9ca3af;
}

.dash-discord-embed-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.35), rgba(124, 58, 237, 0.45));
  flex-shrink: 0;
}

.dash-discord-embed-thumb.is-hidden {
  display: none;
}

.dash-reward-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.dash-reward-item {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(168, 85, 247, 0.16);
  background: rgba(0, 0, 0, 0.24);
}

.dash-reward-level {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 4.5rem;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(124, 58, 237, 0.35), rgba(76, 29, 149, 0.45));
  border: 1px solid rgba(196, 181, 253, 0.18);
}

.dash-reward-level span {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ddd6fe;
}

.dash-reward-level strong {
  font-size: 1.35rem;
  line-height: 1;
  color: #fff;
}

.dash-reward-role {
  margin: 0;
}

.dash-empty-card {
  padding: 0.9rem 1rem;
  margin-bottom: 0.85rem;
  border: 1px dashed rgba(168, 85, 247, 0.24);
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
  background: rgba(124, 58, 237, 0.06);
}

.dash-reward-add {
  padding: 0.95rem;
  border-radius: 14px;
  border: 1px dashed rgba(168, 85, 247, 0.28);
  background: rgba(124, 58, 237, 0.08);
}

.dash-reward-add-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ede9fe;
  margin-bottom: 0.65rem;
}

.dash-reward-add-row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.dash-inline-status {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  color: #c4b5fd;
}

.dash-inline-status.is-error {
  color: #fca5a5;
}

.dash-inline-status.is-success {
  color: #86efac;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.btn-ghost:hover {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.35);
}

.dash-save-row .btn.is-saving {
  opacity: 0.7;
  pointer-events: none;
}

@media (max-width: 820px) {
  .dash-welcome-layout {
    grid-template-columns: 1fr;
  }

  .dash-embed-preview {
    position: static;
  }

  .dash-reward-item,
  .dash-reward-add-row,
  .dash-field-row {
    grid-template-columns: 1fr;
  }

  .dash-reward-level {
    min-height: auto;
    padding: 0.55rem;
    flex-direction: row;
    justify-content: center;
    gap: 0.45rem;
  }
}

.dash-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dash-field > span {
  font-size: 0.78rem;
  font-weight: 600;
  color: #ddd6fe;
}

.dash-field select,
.dash-field input[type="number"],
.dash-field input[type="text"] {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
}

.dash-field select:focus,
.dash-field input:focus {
  outline: none;
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.12);
}

.dash-readout {
  display: grid;
  gap: 0.65rem;
}

.dash-readout div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
}

.dash-readout span { color: var(--muted); }
.dash-readout strong { font-size: 0.9rem; }

.dash-save-row-tab {
  margin-top: 1.5rem;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.dash-limit-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.dash-limit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
}

.dash-xp-item-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.dash-xp-item-actions input[data-xp-edit-multiplier] {
  width: 4.5rem;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font: inherit;
}

.dash-xp-multiplier-suffix {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.dash-modal[hidden] {
  display: none !important;
}

.dash-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.dash-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.dash-modal-panel {
  position: relative;
  width: min(640px, 100%);
  max-height: min(80vh, 720px);
  overflow: auto;
  border-radius: 14px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.dash-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-modal-body {
  padding: 1rem 1.25rem 1.25rem;
}

.dash-alt-group-card {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 0.75rem;
}

.dash-alt-group-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.dash-alt-group-meta {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.dash-alt-member-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dash-alt-member {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.dash-alt-member strong {
  display: block;
  font-size: 0.85rem;
}

.dash-alt-member-id {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.dash-alt-group-card:last-child {
  margin-bottom: 0;
}

.dash-mod-panel {
  margin-top: 1rem;
}

.dash-mod-stats {
  margin: 0.75rem 0 1rem;
}

.dash-mod-topmods {
  margin-bottom: 1rem;
}

.dash-mod-lookup-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.dash-mod-lookup-row input {
  flex: 1;
}

.dash-mod-table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
}

.dash-mod-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.dash-mod-table th,
.dash-mod-table td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

.dash-mod-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-mod-reason-row td {
  color: var(--muted);
  font-size: 0.8rem;
  padding-top: 0;
  padding-bottom: 0.75rem;
}

.dash-mod-action {
  font-weight: 700;
  font-size: 0.75rem;
}

.dash-mod-tag {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.65rem;
  text-transform: uppercase;
}

.dash-mod-user-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.dash-mod-user-link:hover {
  color: #c4b5fd;
}

.dash-mod-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.dash-mod-avatar-lg {
  width: 48px;
  height: 48px;
}

.dash-mod-user-header {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.dash-mod-detail-list {
  margin: 0.5rem 0 1rem;
  padding-left: 1.1rem;
}

.dash-mod-detail-list li {
  margin-bottom: 0.65rem;
}

.dash-mod-detail-list span {
  color: var(--muted);
}

.dash-member-search {
  position: relative;
}

.dash-member-search input {
  width: 100%;
}

.dash-member-search-results {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 260px;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid rgba(168, 85, 247, 0.22);
  background: rgba(12, 8, 20, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.dash-member-search-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.dash-member-search-item:hover,
.dash-member-search-item.is-active {
  background: rgba(124, 58, 237, 0.12);
}

.dash-member-search-empty {
  padding: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.dash-mod-actions {
  margin: 1rem 0;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(168, 85, 247, 0.16);
  background: rgba(124, 58, 237, 0.06);
}

.dash-mod-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.dash-mod-action-form {
  display: grid;
  gap: 0.55rem;
}

.dash-mod-action-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.dash-alt-link-form {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-alt-link-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.dash-alt-selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
}

.dash-alt-member {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.dash-alt-member .btn {
  margin-left: auto;
}

.dash-case-edit {
  margin-left: 0.5rem;
}

.dash-cases-table .dash-case-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.dash-cases-table .dash-case-row:hover,
.dash-cases-table .dash-case-row.is-open {
  background: rgba(124, 58, 237, 0.08);
}

.dash-case-expand-cell {
  width: 2rem;
  text-align: center;
  color: var(--muted);
}

.dash-case-chevron {
  display: inline-block;
  transition: transform 0.15s ease;
}

.dash-case-row.is-open .dash-case-chevron {
  transform: rotate(180deg);
}

.dash-case-editor-row td {
  padding: 0 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-case-editor {
  position: relative;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(168, 85, 247, 0.18);
  background: rgba(12, 8, 20, 0.72);
}

.dash-case-editor-status {
  position: absolute;
  top: 0.85rem;
  right: 0.95rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.dash-case-editor-status.is-saving {
  color: #c4b5fd;
}

.dash-case-editor-status.is-saved {
  color: #86efac;
}

.dash-case-editor-status.is-error {
  color: #fca5a5;
}

.dash-case-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 1rem;
}

.dash-case-editor-main textarea {
  min-height: 88px;
  resize: vertical;
}

.dash-case-punishment-block {
  padding: 0.85rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-case-punishment-status {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.dash-case-punishment-options {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.dash-case-punishment-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.dash-case-punishment-option:has(input:checked) {
  border-color: rgba(168, 85, 247, 0.35);
  background: rgba(124, 58, 237, 0.1);
}

.dash-case-editor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.78rem;
}

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

.dash-save-row {
  margin-top: auto;
  padding-top: 1.25rem;
  display: flex;
  justify-content: flex-end;
}

.dash-nav-group + .dash-nav-group {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.dash-nav-label {
  padding: 0 0.75rem 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.34);
}

.dash-panel-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.65rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  z-index: 2;
}

.dash-panel-subnav-link {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
}

.dash-panel-subnav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.dash-autosave-bar {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  background: rgba(10, 7, 18, 0.96);
  border: 1px solid rgba(124, 58, 237, 0.22);
  backdrop-filter: blur(12px);
}

.dash-autosave-label {
  font-size: 0.88rem;
  color: var(--muted);
}

.dash-page .alert {
  max-width: 100%;
  margin-bottom: 1rem;
}

@media (max-width: 720px) {
  .dash-shell {
    max-width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .dash-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    min-height: auto;
  }

  .dash-sidebar {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.65rem 0.75rem 0.65rem 0.75rem;
    padding-inline-end: 2.5rem;
    gap: 0.4rem;
    position: sticky;
    top: 0;
    z-index: 3;
    background: rgba(10, 7, 18, 0.98);
    touch-action: pan-x;
  }

  .dash-sidebar::-webkit-scrollbar {
    display: none;
  }

  .dash-sidebar .preview-nav-item {
    white-space: nowrap;
    width: auto;
    flex: 0 0 auto;
    margin-bottom: 0;
    padding: 0.55rem 0.9rem;
    font-size: 0.76rem;
    scroll-snap-align: start;
  }

  .dash-body,
  .dash-content,
  .dash-window {
    overflow: visible;
  }

  .dash-content {
    min-height: auto;
    padding: 1rem 0.85rem 1.15rem;
  }
}

.preview-float {
  position: absolute;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(18, 12, 28, 0.95);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.preview-float-stats {
  bottom: -1rem;
  left: -1.5rem;
}

.preview-float-stats strong {
  display: block;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.preview-float-stats span {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.landing-stats-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.landing-stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 2rem 1.25rem;
  flex-wrap: wrap;
}

.landing-stat-block {
  text-align: center;
}

.landing-stat-block strong {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.landing-stat-block span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.landing-stat-divider {
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
}

.landing-section {
  padding: 5rem 0;
}

.landing-section-muted {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.landing-section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.landing-eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c084fc;
}

.landing-section-head h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.landing-section-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

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

.feature-card {
  padding: 1.5rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.06);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-icon-mod { background: rgba(248, 113, 113, 0.12); color: #fca5a5; }
.feature-icon-community { background: rgba(96, 165, 250, 0.12); color: #93c5fd; }
.feature-icon-levels { background: rgba(251, 191, 36, 0.12); color: #fcd34d; }
.feature-icon-stats { background: rgba(52, 211, 153, 0.12); color: #6ee7b7; }
.feature-icon-log { background: rgba(167, 139, 250, 0.12); color: #c4b5fd; }
.feature-icon-memory { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
.feature-icon-fun { background: rgba(244, 114, 182, 0.12); color: #f9a8d4; }

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.step-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
}

.step-num {
  width: 44px;
  height: 44px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #c084fc, #7c3aed);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.step-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.landing-cta-band {
  padding: 4rem 0 5rem;
}

.landing-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.5rem 2rem;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(88, 101, 242, 0.15)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(168, 85, 247, 0.25);
  box-shadow: 0 24px 80px rgba(124, 58, 237, 0.15);
}

.landing-cta-inner h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.35rem;
  letter-spacing: -0.03em;
}

.landing-cta-inner p {
  margin: 0;
  color: var(--muted);
}

.site-footer-landing {
  max-width: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.35);
  text-align: left;
  padding: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding: 3rem 1.25rem 2rem;
}

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

.footer-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 280px;
}

.footer-links h4 {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-links a,
.footer-links span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.45rem;
  text-decoration: none;
}

.footer-links a:hover { color: var(--text); }

.footer-bottom {
  padding: 1.25rem 1.25rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.85rem;
}

.site-header-landing {
  background: rgba(6, 4, 11, 0.72);
}

@media (max-width: 960px) {
  .landing-hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .landing-hero-copy { text-align: center; }
  .landing-subtitle { margin-left: auto; margin-right: auto; }
  .landing-cta-row { justify-content: center; }
  .preview-window { transform: none; max-width: 480px; margin: 0 auto; }
  .landing-preview-sections { grid-template-columns: 1fr; }
  .feature-grid,
  .steps-row { grid-template-columns: 1fr; }
  .landing-stat-divider { display: none; }
  .landing-cta-inner { flex-direction: column; text-align: center; }
  .landing-cta-inner .landing-cta-row { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .header-invite-btn { display: inline-flex; }
}

@media (max-width: 640px) {
  .landing-hero { padding-top: 2rem; }
  .preview-body { grid-template-columns: 1fr; }
  .landing-page .preview-sidebar,
  .preview-window:not(.dash-window) .preview-sidebar {
    display: none;
  }
  .footer-grid { grid-template-columns: 1fr; }
  .landing-cta-row .btn-lg { width: 100%; }

  .dash-topbar {
    margin-bottom: 0.75rem;
  }

  .dash-save-row {
    position: sticky;
    bottom: 0;
    margin: 0 -0.85rem -1.15rem;
    padding: 0.85rem;
    background: linear-gradient(180deg, transparent, rgba(10, 7, 18, 0.96) 35%);
  }

  .guilds-page .guilds-shell { padding-top: 1.5rem; }
  .guilds-stats-bar {
    flex-direction: column;
    text-align: center;
  }

  .sm-directory-toolbar {
    padding: 1rem;
  }

  .sm-directory-sort-control {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.4rem;
  }

  .sm-directory-select {
    width: 100%;
  }

  .dash-field-grid,
  .dash-toggle-grid {
    grid-template-columns: 1fr;
  }

  .dash-content,
  .dash-sidebar {
    max-height: none;
  }
}

@media (max-width: 960px) {
  .page-grid { grid-template-columns: 1fr; }
  .page-sidebar { position: static; }
  .header-inner {
    grid-template-columns: 1fr auto;
    row-gap: 0.5rem;
    align-items: center;
    padding-bottom: 0.35rem;
  }
  .main-nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.45rem;
    width: 100%;
    overflow: visible;
    padding-bottom: 0.15rem;
  }
  .main-nav .nav-link {
    flex: 0 1 auto;
    min-width: auto;
    white-space: nowrap;
    text-align: center;
    padding: 0.45rem 0.7rem;
    font-size: 0.84rem;
  }
  .main-nav .nav-link-accent {
    display: none;
  }
  .settings-layout,
  .form-grid,
  .read-only-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .header-inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .main-nav {
    justify-content: flex-start;
    gap: 0.3rem 0.35rem;
  }
  .main-nav .nav-link {
    padding: 0.4rem 0.62rem;
    font-size: 0.8rem;
  }
  .header-actions .btn-sm {
    padding: 0.45rem 0.65rem;
    font-size: 0.78rem;
  }
  .page-shell { padding-top: 1.25rem; }
  .user-name { display: none; }
  .save-bar { flex-direction: column; align-items: stretch; }
  .guild-hero { flex-direction: column; align-items: flex-start; }
}

/* ── Public level leaderboard ── */

.leaderboard-page {
  background:
    radial-gradient(circle at 20% 0%, rgba(124, 58, 237, 0.18), transparent 42%),
    #06040b;
}

.lb-shell {
  max-width: 920px;
  padding-bottom: 3rem;
}

.lb-header {
  margin-bottom: 1.25rem;
}

.lb-guild {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lb-guild-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.lb-guild-icon-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #7c3aed, #4c1d95);
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
}

.lb-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a78bfa;
}

.lb-header h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.lb-meta {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.lb-rewards-key {
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.lb-rewards-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.lb-rewards-note {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.lb-rewards-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.lb-reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.22);
  font-size: 0.78rem;
}

.lb-reward-level {
  font-weight: 700;
  color: #c4b5fd;
}

.lb-reward-role {
  color: #ede9fe;
}

.lb-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.24);
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.lb-table th,
.lb-table td {
  padding: 0.85rem 1rem;
  text-align: left;
}

.lb-table th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.12);
  border-bottom: 1px solid rgba(168, 85, 247, 0.12);
}

.lb-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lb-table tbody tr:last-child {
  border-bottom: none;
}

.lb-table tbody tr:hover {
  background: rgba(124, 58, 237, 0.08);
}

.lb-rank {
  width: 4rem;
  font-weight: 800;
  color: #ddd6fe;
}

.lb-member {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.lb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.lb-level {
  width: 5rem;
  font-weight: 700;
  color: #e9d5ff;
}

.lb-roles {
  min-width: 8rem;
}

.lb-role-chip {
  display: inline-block;
  margin: 0.1rem 0.25rem 0.1rem 0;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: #e9d5ff;
  white-space: nowrap;
}

.lb-role-none {
  color: var(--muted);
}

.lb-xp {
  width: 6rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.lb-messages {
  width: 6.5rem;
  font-variant-numeric: tabular-nums;
  color: #ddd6fe;
  font-weight: 600;
}

.lb-top-1 .lb-rank { color: #fde68a; }
.lb-top-2 .lb-rank { color: #e5e7eb; }
.lb-top-3 .lb-rank { color: #fdba74; }

.lb-empty {
  padding: 2rem 1.25rem;
  text-align: center;
  border: 1px dashed rgba(168, 85, 247, 0.24);
  border-radius: 16px;
  background: rgba(124, 58, 237, 0.06);
}

.lb-empty strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #ede9fe;
}

.lb-empty span {
  color: var(--muted);
}

.lb-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.lb-footer-note {
  margin: 1.25rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.dash-leaderboard-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(168, 85, 247, 0.18);
  background: rgba(124, 58, 237, 0.08);
}

/* ── Public weekly recap ── */

.recap-page {
  background:
    radial-gradient(circle at 18% 0%, rgba(251, 191, 36, 0.16), transparent 42%),
    radial-gradient(circle at 82% 8%, rgba(124, 58, 237, 0.14), transparent 40%),
    #06040b;
}

.recap-shell {
  max-width: 960px;
  padding-bottom: 3rem;
}

.recap-header {
  margin-bottom: 1.25rem;
}

.recap-guild {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.recap-guild-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.recap-guild-icon-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b, #7c3aed);
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
}

.recap-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
}

.recap-header h1 {
  margin: 0;
  font-size: 1.85rem;
}

.recap-meta {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.recap-card-wrap {
  padding: 0.75rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.recap-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.recap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.recap-copy-status {
  margin: 0.5rem 0 0;
  color: #86efac;
  font-size: 0.88rem;
}

.recap-summary {
  margin-top: 1.5rem;
  padding: 1.1rem 1.15rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.recap-summary-title {
  margin: 0 0 0.85rem;
  font-size: 1rem;
}

.recap-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.recap-summary-item {
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.recap-summary-item span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.recap-summary-item strong {
  font-size: 1.05rem;
}

.recap-summary-wide {
  grid-column: 1 / -1;
}

.recap-empty-note {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.recap-footer-note {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

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

/* ── Public Server Memory ── */

.memory-page {
  background:
    radial-gradient(circle at 15% 0%, rgba(245, 158, 11, 0.14), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(124, 58, 237, 0.12), transparent 38%),
    #06040b;
}

.sm-shell {
  max-width: 980px;
  padding-bottom: 3rem;
}

.sm-hero {
  position: relative;
  margin-bottom: 1.5rem;
  padding: 1.35rem 1.4rem;
  border-radius: 20px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(124, 58, 237, 0.06));
  overflow: hidden;
}

.sm-hero-glow {
  position: absolute;
  inset: -40% auto auto 50%;
  width: 320px;
  height: 320px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(251, 191, 36, 0.16), transparent 70%);
  pointer-events: none;
}

.sm-hero-main {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.sm-guild {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sm-guild-icon {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.sm-guild-icon-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b, #7c3aed);
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
}

.sm-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
}

.sm-hero h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
}

.sm-tagline {
  margin: 0.4rem 0 0;
  color: #fde68a;
  font-size: 0.95rem;
  max-width: 36rem;
}

.sm-meta {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.sm-hero-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sm-section {
  margin-bottom: 1.35rem;
}

.sm-section-head {
  margin-bottom: 0.85rem;
}

.sm-section-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.sm-section-head p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.sm-subheading {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  color: #fde68a;
}

.sm-milestone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.sm-milestone-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.sm-milestone-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.sm-milestone-card h3 {
  margin: 0 0 0.2rem;
  font-size: 0.92rem;
}

.sm-milestone-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.sm-stat-grid,
.sm-recap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.sm-overview {
  padding: 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(124, 58, 237, 0.16);
  background:
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.02);
}

.sm-overview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.95rem;
}

.sm-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sm-meta-pill-growth {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.18);
  background: rgba(34, 197, 94, 0.08);
}

.sm-overview-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}

.sm-metric-column {
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.22);
}

.sm-metric-column header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.sm-metric-column h3 {
  margin: 0;
  font-size: 0.88rem;
  color: #e9d5ff;
}

.sm-metric-icon {
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.95rem;
}

.sm-metric-icon-messages { background: rgba(251, 191, 36, 0.12); }
.sm-metric-icon-voice { background: rgba(168, 85, 247, 0.14); }
.sm-metric-icon-active { background: rgba(96, 165, 250, 0.12); }
.sm-metric-icon-joins { background: rgba(52, 211, 153, 0.12); }

.sm-metric-footnote {
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted-2);
}

.sm-metric-rows {
  display: grid;
  gap: 0.35rem;
}

.sm-metric-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.84rem;
}

.sm-metric-row span {
  color: var(--muted);
  min-width: 1.6rem;
}

.sm-metric-row strong {
  color: #fde68a;
  font-size: 0.98rem;
}

.sm-overview-leaders {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}

.sm-leader-panel {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
}

.sm-leader-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem 0;
}

.sm-leader-row + .sm-leader-row {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sm-leader-kind {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.sm-leader-main {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.sm-leader-main strong {
  display: block;
  font-size: 0.88rem;
}

.sm-leader-main span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.sm-trend-wrap {
  padding: 0.95rem 1rem 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
}

.sm-trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.sm-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.74rem;
  color: var(--muted);
}

.sm-legend-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  margin-right: 0.25rem;
  vertical-align: middle;
}

.sm-legend-messages { background: #fbbf24; }
.sm-legend-voice { background: #c084fc; }

.sm-trend-chart {
  position: relative;
  height: 150px;
}

.sm-trend-voice-line {
  position: absolute;
  inset: 0 0 0 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.sm-trend-voice-line polyline {
  fill: none;
  stroke: #c084fc;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  opacity: 0.9;
}

.sm-trend-bars {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 0.28rem;
  height: 100%;
}

.sm-trend-bar-wrap {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.sm-trend-bar {
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.95), rgba(124, 58, 237, 0.72));
  opacity: 0.88;
}

.sm-trend-footnote {
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: right;
}

.sm-stat-card,
.sm-recap-card {
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.22);
}

.sm-stat-card strong,
.sm-recap-card strong {
  display: block;
  font-size: 1.35rem;
  color: #fde68a;
}

.sm-stat-card span,
.sm-recap-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.sm-chart-wrap {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
}

.sm-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  height: 140px;
}

.sm-chart-bar {
  flex: 1;
  min-width: 0;
  position: relative;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #fbbf24, rgba(124, 58, 237, 0.85));
  transition: opacity 0.15s ease;
}

.sm-chart-bar:hover {
  opacity: 0.85;
}

.sm-chart-value {
  position: absolute;
  left: 50%;
  top: -1.35rem;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: var(--muted);
  opacity: 0;
  white-space: nowrap;
}

.sm-chart-bar:hover .sm-chart-value {
  opacity: 1;
}

.sm-chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.45rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.sm-recap {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(124, 58, 237, 0.16);
  background: rgba(124, 58, 237, 0.06);
}

.sm-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.sm-panel {
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}

.sm-panel-starboard {
  border-color: rgba(245, 158, 11, 0.14);
}

.sm-quote-list,
.sm-starboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sm-quote-card {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border-left: 3px solid #f59e0b;
  border-radius: 0 12px 12px 0;
  background: rgba(245, 158, 11, 0.06);
}

.sm-quote-card p {
  margin: 0 0 0.35rem;
  font-style: italic;
}

.sm-quote-card footer {
  color: var(--muted);
  font-size: 0.82rem;
}

.sm-star-card {
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.sm-star-card-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.sm-star-card-head strong {
  display: block;
}

.sm-star-card-head span {
  color: var(--muted);
  font-size: 0.78rem;
}

.sm-star-card p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.sm-star-image {
  display: block;
  max-width: 100%;
  margin-top: 0.65rem;
  border-radius: 10px;
}

.sm-jump-link {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.82rem;
  color: #fbbf24;
}

.sm-mini-list,
.sm-channel-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.sm-mini-row,
.sm-channel-row {
  display: grid;
  grid-template-columns: 2rem 36px 1fr auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.35rem;
  border-radius: 10px;
}

.sm-channel-row {
  grid-template-columns: 2rem 1fr auto;
}

.sm-mini-row:hover,
.sm-channel-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.sm-rank {
  font-weight: 800;
  color: #fde68a;
  text-align: center;
}

.sm-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  max-width: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
}

.sm-name {
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sm-value {
  color: var(--muted);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

.sm-level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}

.sm-level-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.22);
}

.sm-level-card-top {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(245, 158, 11, 0.08);
}

.sm-level-card strong {
  display: block;
}

.sm-level-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.sm-empty {
  padding: 2rem 1.25rem;
  text-align: center;
  border: 1px dashed rgba(245, 158, 11, 0.24);
  border-radius: 16px;
  background: rgba(245, 158, 11, 0.06);
}

.sm-empty strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #fde68a;
}

.sm-empty span {
  color: var(--muted);
}

.sm-footer {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.dash-memory-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  background: rgba(245, 158, 11, 0.08);
}

.dash-memory-moments-editor {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-memory-moments-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: #fde68a;
}

.dash-memory-moments-preview {
  margin-top: 0.85rem;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(245, 158, 11, 0.16);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.02);
}

.dash-memory-moment-card {
  position: relative;
  width: 100%;
  text-align: left;
  cursor: grab;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.dash-memory-moment-card:active {
  cursor: grabbing;
}

.dash-memory-moment-card.is-dragging {
  opacity: 0.55;
  transform: scale(0.98);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  z-index: 2;
}

.dash-memory-moment-card.is-drop-target {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.28);
}

.dash-memory-moment-drag {
  position: absolute;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  letter-spacing: -0.08em;
  line-height: 1;
  color: rgba(253, 230, 138, 0.55);
  user-select: none;
  pointer-events: none;
}

.dash-memory-moment-card .sm-milestone-icon {
  margin-left: 0.85rem;
}

.dash-memory-moment-card:hover {
  border-color: rgba(245, 158, 11, 0.32);
}

.dash-memory-moment-card.is-selected:hover {
  transform: translateY(-1px);
}

.dash-memory-moment-card.is-selected {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.1);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.12);
}

.dash-memory-moment-card:not(.is-selected) {
  opacity: 0.62;
}

.dash-memory-moment-card.is-locked {
  opacity: 0.42;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.015);
}

.dash-memory-moment-card.is-locked:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.08);
}

.dash-memory-moment-card.is-at-limit:not(.is-selected) {
  opacity: 0.48;
  cursor: not-allowed;
}

.dash-memory-moment-lock {
  position: absolute;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.82rem;
  line-height: 1;
  opacity: 0.75;
  pointer-events: none;
}

.dash-memory-moment-lock-reason {
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
  color: rgba(253, 230, 138, 0.72);
}

.dash-memory-moment-check {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.72rem;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.dash-memory-moment-card:not(.is-selected) .dash-memory-moment-check {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: transparent;
}

.dash-memory-moments-count {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.sm-member-milestone-card {
  border-color: rgba(96, 165, 250, 0.18);
  background: rgba(59, 130, 246, 0.06);
}

.sm-member-milestone-card h3 {
  color: #bfdbfe;
}

.sm-member-milestone-baseline {
  border-color: rgba(167, 139, 250, 0.2);
  background: rgba(124, 58, 237, 0.08);
}

.sm-member-milestone-baseline h3 {
  color: #ddd6fe;
}

@media (max-width: 720px) {
  .memory-page .page-shell {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .sm-hero {
    padding: 1rem;
  }

  .sm-hero-main {
    flex-direction: column;
    align-items: stretch;
  }

  .sm-guild-icon,
  .sm-guild-icon-fallback {
    width: 56px;
    height: 56px;
  }

  .sm-mini-row,
  .sm-channel-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.25rem;
  }

  .sm-mini-row .sm-rank,
  .sm-channel-row .sm-rank {
    width: 1.35rem;
    flex-shrink: 0;
  }

  .memory-page .sm-avatar {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
    max-width: 32px;
    flex-shrink: 0;
  }

  .sm-mini-row .sm-name,
  .sm-channel-row .sm-name {
    flex: 1 1 auto;
    min-width: 0;
  }

  .sm-mini-row .sm-value,
  .sm-channel-row .sm-value {
    flex-shrink: 0;
    margin-left: auto;
    text-align: right;
  }

  .sm-level-card {
    flex-wrap: wrap;
  }

  .sm-chart-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sm-chart {
    min-width: 280px;
  }

  .sm-star-image {
    max-width: 100%;
    height: auto;
  }

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

  .sm-overview-metrics,
  .sm-overview-leaders {
    grid-template-columns: 1fr;
  }

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

  .sm-trend-chart {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sm-trend-bars {
    min-width: 280px;
  }
}

.dash-copilot-members {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dash-copilot-member {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.dash-copilot-member-name {
  font-weight: 600;
  color: var(--text-primary, #f4f1fb);
}

.dash-copilot-member-meta {
  color: var(--text-muted, #8b8498);
  font-size: 0.92rem;
}

.sm-directory-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.sm-directory-header {
  text-align: center;
  margin-bottom: 2rem;
}

.sm-directory-lead {
  color: var(--text-muted, #8b8498);
  max-width: 42rem;
  margin: 0.75rem auto 0;
}

.sm-directory-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed rgba(124, 58, 237, 0.25);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.sm-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.sm-directory-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.sm-directory-card:hover {
  border-color: rgba(124, 58, 237, 0.35);
  transform: translateY(-1px);
}

.sm-directory-card-main {
  display: flex;
  flex: 1;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.sm-directory-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sm-directory-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  flex-shrink: 0;
}

.sm-directory-icon-fallback {
  display: grid;
  place-items: center;
  background: rgba(124, 58, 237, 0.18);
  font-weight: 700;
  font-size: 1.25rem;
}

.sm-directory-card-body h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.sm-directory-card-body p {
  margin: 0;
  color: var(--text-muted, #8b8498);
  font-size: 0.92rem;
  line-height: 1.45;
}

.memory-page {
  --sm-accent: #f59e0b;
}

.memory-page .sm-hero,
.memory-page .sm-milestone-card,
.memory-page .sm-meta-pill-growth,
.memory-page .sm-level-card-top {
  border-color: color-mix(in srgb, var(--sm-accent) 28%, transparent);
}

.memory-page .sm-kicker,
.memory-page .sm-subheading,
.dash-memory-preview-shell .sm-kicker {
  color: color-mix(in srgb, var(--sm-accent) 72%, white);
}

.sm-hero-banner {
  background-size: cover;
  background-position: center;
}

.sm-starboard-carousel {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.35rem;
}

.sm-starboard-carousel .sm-star-card {
  min-width: min(100%, 320px);
  scroll-snap-align: start;
  flex: 0 0 min(100%, 320px);
}

.sm-milestone-custom {
  border-color: color-mix(in srgb, var(--sm-accent) 35%, transparent);
  background: color-mix(in srgb, var(--sm-accent) 8%, rgba(255, 255, 255, 0.03));
}

.sm-snapshot-banner {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  background: rgba(59, 130, 246, 0.08);
}

.sm-directory-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1.25rem;
}

.sm-directory-toolbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 760px;
  margin: 0 auto 2rem;
  padding: 1.15rem 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.sm-directory-filter-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
}

.sm-directory-filter-label,
.sm-directory-sort-control > span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.sm-directory-tag-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.sm-directory-tag-filter {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sm-directory-tag-filter:hover {
  border-color: rgba(168, 85, 247, 0.35);
  background: rgba(124, 58, 237, 0.12);
  color: #f3e8ff;
  transform: translateY(-1px);
}

.sm-directory-tag-filter.is-active {
  border-color: rgba(168, 85, 247, 0.5);
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.22), rgba(124, 58, 237, 0.28));
  color: #faf5ff;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.16);
}

.sm-directory-sort-form {
  display: flex;
  justify-content: center;
  width: 100%;
  padding-top: 0.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sm-directory-sort-control {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.sm-directory-select {
  min-width: 11rem;
  padding: 0.58rem 2.1rem 0.58rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-color: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #c4b5fd 50%),
    linear-gradient(135deg, #c4b5fd 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% + 2px),
    calc(100% - 12px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sm-directory-select:hover {
  border-color: rgba(168, 85, 247, 0.28);
}

.sm-directory-select:focus {
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.12);
}

.sm-directory-select option {
  background: #120a1c;
  color: var(--text);
}

.sm-directory-control {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
}

.sm-directory-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.sm-directory-tag {
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
}

.sm-directory-meta {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.dash-memory-editor-panel {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-memory-mode-tabs {
  margin-bottom: 1rem;
}

.dash-memory-full-preview {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(245, 158, 11, 0.16);
  background: rgba(255, 255, 255, 0.02);
  max-height: 70vh;
  overflow: auto;
}

.dash-memory-sections-grid,
.dash-memory-starboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.dash-memory-section-card,
.dash-memory-starboard-card {
  position: relative;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.14);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.95rem 1rem 0.95rem 2rem;
}

.dash-memory-section-card.is-selected,
.dash-memory-starboard-card.is-selected {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.1);
}

.dash-memory-section-card:not(.is-selected),
.dash-memory-starboard-card:not(.is-selected) {
  opacity: 0.62;
}

.dash-memory-section-drag,
.dash-memory-section-lock {
  position: absolute;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
}

.dash-memory-section-check,
.dash-memory-starboard-check {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

.dash-memory-custom-moments-list {
  display: grid;
  gap: 0.85rem;
}

.dash-memory-custom-moment-card {
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.dash-memory-starboard-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.dash-select-multiple {
  min-height: 8rem;
}

.dash-memory-directory-tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dash-memory-directory-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.dash-memory-snapshots-list {
  list-style: none;
  padding: 0;
  margin: 0.85rem 0 0;
  display: grid;
  gap: 0.5rem;
}

.dash-memory-snapshot-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-memory-snapshot-create-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
}

.dash-setup-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.12);
}

.dash-setup-checklist {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.dash-setup-checklist-head {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.dash-setup-checklist-hint {
  color: var(--muted, #9aa3b2);
  font-size: 0.875rem;
}

.dash-setup-checklist-hint.is-complete {
  color: #4ade80;
}

.dash-setup-checklist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.dash-setup-checklist-item {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.15);
}

.dash-setup-checklist-item.is-done {
  border-color: rgba(74, 222, 128, 0.25);
}

.dash-setup-checklist-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  color: inherit;
  text-decoration: none;
}

.dash-setup-checklist-link:hover {
  background: rgba(255, 255, 255, 0.04);
}

.dash-setup-checklist-status {
  width: 1.25rem;
  text-align: center;
  color: var(--muted, #9aa3b2);
}

.dash-setup-checklist-item.is-done .dash-setup-checklist-status {
  color: #4ade80;
}

.dash-setup-checklist-copy {
  display: grid;
  gap: 0.15rem;
}

.dash-setup-checklist-copy span:last-child {
  color: var(--muted, #9aa3b2);
  font-size: 0.875rem;
}

.dash-setup-ref {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.75rem;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.9375rem;
}

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