/* Mareno: a cool grey plate, ink text, and one verified green. */
:root {
  --plate: #e4e8ed;
  --plate-deep: #d3d9e1;
  --paper: #fafbfc;
  --ink: #1a2230;
  --muted: #566074;
  --line: #cbd2dc;
  --verified: #0b7a58;
  --verified-bg: #dcf2e9;
  --marigold: #f0b429;
  --marigold-bg: #fdf1d0;
  --danger: #b92f25;
  --danger-bg: #fbe3e0;
  --focus: #2457f5;
  --field: #ffffff;
  --btn-hover: #2b364b;
  --btn2-hover: #ffffff;
  --dots: rgba(26, 34, 48, .11);
  --warn-line: #c58f0a;
  --name-edge: rgba(0, 0, 0, .45);
  color-scheme: light;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI Variable Display", system-ui, sans-serif;
  --body: "Instrument Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --wrap: 1100px;
}

/* Dark theme: follows the visitor's system unless they chose one with the toggle (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --plate: #0d1118;
    --plate-deep: #161d28;
    --paper: #161c27;
    --ink: #e9edf5;
    --muted: #9ba7bd;
    --line: #2b3546;
    --verified: #3ddc9b;
    --verified-bg: #11372a;
    --marigold: #f0b429;
    --marigold-bg: #3a2e10;
    --danger: #ff8379;
    --danger-bg: #3e1b18;
    --focus: #8aaaff;
    --field: #0f141d;
    --btn-hover: #ffffff;
    --btn2-hover: #1d2635;
    --dots: rgba(233, 237, 245, .07);
    --warn-line: #b8860b;
    --name-edge: rgba(255, 255, 255, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --plate: #0d1118;
  --plate-deep: #161d28;
  --paper: #161c27;
  --ink: #e9edf5;
  --muted: #9ba7bd;
  --line: #2b3546;
  --verified: #3ddc9b;
  --verified-bg: #11372a;
  --marigold: #f0b429;
  --marigold-bg: #3a2e10;
  --danger: #ff8379;
  --danger-bg: #3e1b18;
  --focus: #8aaaff;
  --field: #0f141d;
  --btn-hover: #ffffff;
  --btn2-hover: #1d2635;
  --dots: rgba(233, 237, 245, .07);
  --warn-line: #b8860b;
  --name-edge: rgba(255, 255, 255, .5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--plate);
  color: var(--ink);
  font: 400 1rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
code { font: 500 .88em ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--plate); padding: .12em .4em; border-radius: 5px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -.015em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.02; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 650; }
p { margin: 0; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 58ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 .95rem/1 var(--body); padding: .8rem 1.15rem; border-radius: 9px;
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .15s, border-color .15s, transform .08s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover:not([disabled]) { background: var(--btn-hover); }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover:not([disabled]) { background: var(--btn2-hover); box-shadow: 3px 3px 0 var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--plate-deep); }
.btn-danger { background: var(--paper); color: var(--danger); border-color: var(--danger); }
.btn-danger:hover:not([disabled]) { background: var(--danger-bg); }
.btn-sm { padding: .5rem .8rem; font-size: .88rem; }
.btn-lg { padding: 1rem 1.4rem; font-size: 1.02rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }

/* ---------- top bar ---------- */
.topbar { background: var(--paper); border-bottom: 1.5px solid var(--ink); position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font: 700 1.2rem var(--display); text-decoration: none; letter-spacing: -.02em; }
.nav { display: flex; gap: .25rem; margin-right: auto; }
.nav a { text-decoration: none; padding: .45rem .75rem; border-radius: 8px; font-weight: 500; }
.nav a:hover { background: var(--plate); }
.account { display: flex; align-items: center; gap: .6rem; }
.account form { margin: 0; }
.avatar { border-radius: 50%; }
.account-name { font-weight: 600; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; padding: .15em .2em; }

/* ---------- hero ---------- */
.hero {
  padding: clamp(40px, 8vw, 96px) 0 clamp(48px, 8vw, 88px);
  background-image: radial-gradient(circle at center, var(--dots) 3.2px, transparent 3.7px);
  background-size: 30px 30px;
  background-position: 15px 15px;
  border-bottom: 1.5px solid var(--ink);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero-copy h1 { max-width: 14ch; }
.hero-copy .lead { margin-top: 1.4rem; }
.hero-note { margin-top: 1.4rem; color: var(--muted); font-size: .95rem; }

/* ID card: the one memorable thing */
.idcard {
  margin: 0; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 18px;
  padding: 1.25rem 1.25rem 1.1rem; box-shadow: 8px 8px 0 var(--ink); position: relative;
  transform: rotate(-1.2deg); max-width: 400px; justify-self: center; width: 100%;
}
.idcard::before { /* lanyard slot */
  content: ""; position: absolute; top: -9px; left: 50%; width: 54px; height: 12px; margin-left: -27px;
  background: var(--plate); border: 1.5px solid var(--ink); border-radius: 8px;
}
.idcard-top { display: flex; justify-content: space-between; align-items: center; padding-top: .35rem; margin-bottom: 1.1rem; }
.idcard-title { font: 650 .95rem var(--display); }
.stamp {
  font: 700 .85rem var(--display); color: var(--verified); border: 2px solid var(--verified);
  border-radius: 6px; padding: .2rem .55rem; transform: rotate(6deg); background: var(--verified-bg);
  animation: stamp .5s .35s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes stamp { from { opacity: 0; transform: rotate(6deg) scale(1.9); } to { opacity: 1; transform: rotate(6deg) scale(1); } }
.idcard-row { display: flex; align-items: center; gap: .8rem; }
.idcard-row strong { display: block; line-height: 1.2; }
.idcard-row .muted { font-size: .85rem; }
.idcard-avatar { width: 44px; height: 44px; display: grid; place-items: center; font: 700 1.15rem var(--display); color: #fff; flex: none; }
.idcard-avatar.discord { border-radius: 50%; background: #5a67d8; }
.idcard-avatar.roblox { border-radius: 8px; background: var(--ink); }
.idcard-link { margin: .35rem 0 .35rem 21px; height: 22px; border-left: 2px dashed var(--line); }
.idcard-roles { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.1rem 0 .9rem; }
.idcard figcaption { border-top: 1.5px dashed var(--line); padding-top: .8rem; font-size: .92rem; color: var(--muted); }
.idcard figcaption strong { color: var(--ink); }
.chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .84rem; font-weight: 600; background: var(--plate); border-radius: 999px; padding: .25rem .65rem; }
.chip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* ---------- landing sections ---------- */
.band { background: var(--paper); border-bottom: 1.5px solid var(--ink); padding: clamp(40px, 6vw, 72px) 0; }
.band h2 { margin-bottom: 1.6rem; }
.section { padding: clamp(40px, 6vw, 72px) 0; }
.section h2 { margin-bottom: 1.6rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 3.2rem; position: relative; border-top: 1.5px solid var(--ink); }
.steps li::before {
  content: counter(step); position: absolute; top: -1.5px; left: 0; width: 2.4rem; height: 2.4rem;
  display: grid; place-items: center; background: var(--ink); color: var(--paper); font: 700 1.1rem var(--display); border-radius: 0 0 10px 0;
}
.steps h3 { margin-bottom: .4rem; }
.steps p { color: var(--muted); max-width: 36ch; }
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 3rem; margin: 0; }
.features > div { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.features dt { font: 650 1.05rem var(--display); margin-bottom: .25rem; }
.features dd { margin: 0; color: var(--muted); max-width: 50ch; }
.cta { text-align: left; }
.cta .lead { margin-bottom: 0; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1.5px solid var(--ink); border-radius: 12px; background: var(--paper); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { background: var(--plate); font-weight: 650; border-bottom: 1.5px solid var(--ink); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .actions { text-align: right; white-space: nowrap; }
.band .muted { margin-top: 1rem; }

/* ---------- app pages ---------- */
.page { padding: clamp(28px, 5vw, 56px) 0 80px; }
.page-narrow { max-width: 680px; }
.page-title { font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -.025em; }
.page .lead { margin-top: .6rem; }
.back { display: inline-block; margin-bottom: 1rem; color: var(--muted); font-size: .95rem; }
.empty { margin-top: 2rem; padding: 2rem; border: 1.5px dashed var(--line); border-radius: 14px; background: var(--paper); }
.empty h2 { font-size: 1.3rem; margin-bottom: .4rem; }
.empty-inline { margin: 1rem 0; color: var(--muted); }
.refresh { margin-top: 1.5rem; }

.banner { margin: 1.4rem 0 0; padding: .85rem 1.1rem; border-radius: 10px; border: 1.5px solid; font-weight: 500; }
.banner-warn { background: var(--marigold-bg); border-color: var(--warn-line); }
.banner-error { background: var(--danger-bg); border-color: var(--danger); }
.banner-ok { background: var(--verified-bg); border-color: var(--verified); }

.server-list { list-style: none; margin: 2rem 0 0; padding: 0; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--paper); overflow: hidden; }
.server-row { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.server-row:last-child { border-bottom: 0; }
.server-name { font: 650 1.05rem var(--display); margin-right: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-icon { border-radius: 12px; flex: none; }
.server-icon-fallback { width: 44px; height: 44px; display: grid; place-items: center; background: var(--ink); color: var(--paper); font: 700 1.2rem var(--display); }
.server-icon-lg { width: 64px; height: 64px; border-radius: 16px; }
.server-icon-lg.server-icon-fallback { font-size: 1.7rem; }

.guild-head { display: flex; align-items: center; gap: 1rem; }
.guild-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 2.5rem; margin-top: 2rem; align-items: start; }
.side { position: sticky; top: 86px; display: flex; flex-direction: column; gap: .15rem; }
.side a { text-decoration: none; padding: .5rem .75rem; border-radius: 8px; font-weight: 550; }
.side a:hover { background: var(--plate-deep); }
.guild-main { display: grid; gap: 1.5rem; min-width: 0; }
.panel { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 14px; padding: 1.5rem; scroll-margin-top: 90px; }
.panel h2 { font-size: 1.35rem; margin-bottom: .35rem; }
.panel h3 { font-size: 1.02rem; }
.panel > .hint:first-of-type { margin-bottom: 1rem; }
.page-narrow .panel { margin-top: 2rem; }

/* ---------- forms ---------- */
.field { margin-top: 1.15rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; }
input[type="text"], input[type="number"], select {
  width: 100%; font: inherit; color: inherit; background: var(--field); padding: .65rem .8rem;
  border: 1.5px solid var(--ink); border-radius: 8px; min-height: 44px;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
input::placeholder { color: #8a93a4; }
.hint { color: var(--muted); font-size: .9rem; margin-top: .35rem; max-width: 62ch; }
.field-switch { display: flex; align-items: center; gap: .75rem; }
.field-switch label { margin: 0; }
.switch { appearance: none; width: 44px; height: 26px; border-radius: 999px; background: var(--plate-deep); border: 1.5px solid var(--ink); position: relative; cursor: pointer; flex: none; transition: background-color .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); transition: transform .15s; }
.switch:checked { background: var(--verified); }
.switch:checked::after { transform: translateX(18px); background: #fff; }
.vars { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.var-btn { font: 500 .82rem ui-monospace, Menlo, Consolas, monospace; background: var(--plate); border: 1px solid var(--line); border-radius: 6px; padding: .25rem .5rem; cursor: pointer; color: var(--ink); }
.var-btn:hover { border-color: var(--ink); }
.preview { margin-top: .8rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.grid .field[hidden] { display: none; }
.bind-form { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1.5px dashed var(--line); }
.bind-form .btn { margin-top: 1.1rem; }
.bind-form [hidden] { display: none !important; }

.savebar {
  position: sticky; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 12px; padding: .75rem 1rem; box-shadow: 4px 4px 0 var(--ink); z-index: 10; margin-top: 1.5rem;
}
.savebar.dirty { background: var(--marigold-bg); }

.role-pill { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; }
.role-pill i { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.role-gone { color: var(--danger); font-weight: 600; }
.tool { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.1rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.tool:first-of-type { border-top: 0; margin-top: .5rem; }
.tool-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.tool-actions select { width: 220px; }
.progress-wrap { display: flex; align-items: center; gap: .8rem; margin-top: .4rem; }
progress { flex: 1; height: 12px; accent-color: var(--verified); }

/* verify page */
.id-result { display: flex; align-items: center; gap: 1rem; padding: 1rem; border: 1.5px solid var(--verified); background: var(--verified-bg); border-radius: 12px; }
.id-result img, .id-result .ph { width: 64px; height: 64px; border-radius: 12px; background: var(--paper); flex: none; }
.id-result strong { font: 700 1.2rem var(--display); display: block; }
.code-box { display: flex; gap: .6rem; align-items: stretch; margin: 1rem 0; }
.code-box code { flex: 1; font-size: 1.05rem; padding: .85rem 1rem; background: var(--plate); border: 1.5px dashed var(--ink); border-radius: 10px; user-select: all; line-height: 1.5; }
.how { margin: 1rem 0 0; padding-left: 1.2rem; }
.how li { margin-bottom: .4rem; }
.row-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.2rem; }
.status-line { margin-top: .9rem; min-height: 1.4em; }

/* toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: .5rem; z-index: 60; max-width: min(92vw, 380px); }
.toast { background: var(--ink); color: var(--paper); padding: .8rem 1rem; border-radius: 10px; font-weight: 500; box-shadow: 0 6px 20px rgba(26, 34, 48, .3); }
.toast.err { background: var(--danger); }

.footer { border-top: 1.5px solid var(--ink); padding: 1.5rem 0; color: var(--muted); font-size: .9rem; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .steps, .features { grid-template-columns: 1fr; }
  .guild-layout { grid-template-columns: 1fr; gap: 1.2rem; }
  .side { position: static; flex-direction: row; flex-wrap: wrap; }
  .nav { display: none; }
  .topbar-inner { justify-content: space-between; }
  .account-name { display: none; }
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .server-row { flex-wrap: wrap; }
  .server-row .btn { width: 100%; }
  .savebar { flex-direction: column; align-items: stretch; }
  .tool-actions select { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- premium + admin ---------- */
.tag { display: inline-block; font-size: .8rem; font-weight: 650; padding: .15rem .55rem; border-radius: 6px; background: var(--plate); border: 1px solid var(--line); }
.tag-ok { background: var(--verified-bg); border-color: var(--verified); color: var(--verified); }
.tag-bad { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.premium-state { font-weight: 600; margin: .4rem 0 .2rem; }
.features-one { grid-template-columns: 1fr; margin-top: .6rem; }
.price { font: 700 1.5rem var(--display); margin-top: 1.2rem; }
.price .muted { font: 400 .95rem var(--body); }
.server-list-flat { margin-top: 1rem; }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin: 1.6rem 0 1.2rem; border-bottom: 1.5px solid var(--ink); }
.tab { font: 600 .95rem var(--body); background: transparent; border: 1.5px solid transparent; border-bottom: 0; border-radius: 9px 9px 0 0; padding: .6rem 1rem; cursor: pointer; color: var(--ink); margin-bottom: -1.5px; }
.tab:hover { background: var(--plate-deep); }
.tab[aria-selected="true"] { background: var(--paper); border-color: var(--ink); }
.stack { display: grid; gap: 1.5rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-top: 1rem; }
.stat { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 12px; padding: 1rem 1.1rem; }
.stat strong { display: block; font: 700 2rem var(--display); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .92rem; }
.inline-form { display: flex; gap: .6rem; margin: 1rem 0; }
.inline-form input { flex: 1; }
.cell-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.sub { margin: 1.6rem 0 .8rem; }
.codes { background: var(--plate); border: 1.5px dashed var(--ink); border-radius: 10px; padding: .8rem 1rem; margin: .6rem 0; user-select: all; overflow-x: auto; }
.panel .table-wrap { margin-top: 1rem; }
@media (max-width: 520px) { .inline-form { flex-direction: column; } }
.progress-wrap[hidden], .tool [hidden] { display: none !important; }

/* ---- badges: glowing icon tiles with a hover card ---- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.badge-ico { --s: 38px; display: inline-grid; place-items: center; flex: none; width: var(--s); height: var(--s); border-radius: 11px; color: var(--badge);
  background: radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--badge) 22%, #151b2b), #10151f 70%);
  border: 1.5px solid color-mix(in srgb, var(--badge) 60%, transparent);
  box-shadow: 0 0 14px -3px color-mix(in srgb, var(--badge) 70%, transparent), inset 0 0 10px -4px color-mix(in srgb, var(--badge) 60%, transparent); }
.badge-ico svg { width: 58%; height: 58%; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--badge) 70%, transparent)); }
.badge-ico-sm { --s: 30px; border-radius: 9px; }
.badge-ico-lg { --s: 46px; border-radius: 13px; }
.badge-row { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; padding: 0; margin: .85rem 0 0; }
.badge-tile { position: relative; border-radius: 12px; cursor: default; }
.badge-tile .badge-ico { transition: transform .15s, box-shadow .15s; }
.badge-tile:hover .badge-ico, .badge-tile:focus-visible .badge-ico { transform: translateY(-2px);
  box-shadow: 0 0 22px -2px color-mix(in srgb, var(--badge) 90%, transparent), inset 0 0 12px -3px color-mix(in srgb, var(--badge) 70%, transparent); }
.badge-tile:focus-visible { outline: 2px solid var(--badge); outline-offset: 3px; }
.badge-pop { --shift: 0px; position: absolute; z-index: 30; top: calc(100% + 12px); left: 50%; width: min(290px, calc(100vw - 24px));
  transform: translateX(calc(-50% + var(--shift))) translateY(-4px); padding: 1rem 1.1rem; border-radius: 14px; color: #e8ecf5; text-align: left;
  background: linear-gradient(180deg, color-mix(in srgb, var(--badge) 12%, #141a2a), #0f1420);
  border: 1.5px solid color-mix(in srgb, var(--badge) 45%, #2a3350);
  box-shadow: 0 18px 40px -12px rgba(8, 12, 24, .7), 0 0 30px -10px color-mix(in srgb, var(--badge) 60%, transparent);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s, transform .15s, visibility .15s; }
.badge-tile:hover .badge-pop, .badge-tile:focus .badge-pop, .badge-tile:focus-within .badge-pop { opacity: 1; visibility: visible; transform: translateX(calc(-50% + var(--shift))) translateY(0); }
.badge-pop-head { display: flex; align-items: center; gap: .8rem; }
.badge-pop-head strong { display: block; font: 700 1.05rem var(--display); color: #fff; }
.badge-pop-head div span { display: block; color: #98a3bd; font-size: .85rem; margin-top: .1rem; }
.badge-pop p { margin: .85rem 0 0; padding-top: .8rem; border-top: 1px solid #263049; color: #d3d9e8; font-size: .95rem; line-height: 1.45; }
.badge-pop-foot { display: flex; justify-content: space-between; margin-top: .9rem; font-size: .78rem; color: #8590ab; }
.badge-pop-foot > span { letter-spacing: .08em; text-transform: uppercase; }
.badge-pop-foot time { color: color-mix(in srgb, var(--badge) 80%, #fff); font-weight: 600; }
.badge-meanings { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: .8rem; }
.badge-meanings li { display: flex; gap: .85rem; align-items: center; }
.badge-meanings strong { font-weight: 650; }
.badge-meanings p { margin: .05rem 0 0; color: var(--muted); max-width: 60ch; }
.badge-help { margin-top: .75rem; }
.badge-help summary { cursor: pointer; font-weight: 600; }
.search-form { display: flex; gap: .6rem; margin-top: 1.5rem; flex-wrap: wrap; }
.search-form input { flex: 1 1 18rem; }
.server-card { margin-top: 1.75rem; }
.server-card h3 { margin-top: 1.25rem; }
@media (prefers-reduced-motion: reduce) { .badge-tile .badge-ico, .badge-pop { transition: none; } }
.badge-cell { display: inline-flex; align-items: center; gap: .6rem; }

/* ---- gradient names ---- */
.name-grad { --g1: #ff5fd7; --g2: #c77dff; --g3: #ff9ee6; font-weight: 700;
  background-image: linear-gradient(90deg, var(--g1), var(--g2), var(--g3));
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 .6px var(--name-edge, rgba(0, 0, 0, .45))) drop-shadow(0 0 7px color-mix(in srgb, var(--g2) 42%, transparent)); }
.name-grad.shine { background-image: linear-gradient(105deg, transparent 36%, rgba(255, 255, 255, .95) 50%, transparent 64%), linear-gradient(90deg, var(--g1), var(--g2), var(--g3));
  background-size: 260% 100%, 100% 100%; background-repeat: no-repeat; animation: name-shine 3.4s linear infinite; }
@keyframes name-shine { from { background-position: 170% 0, 0 0; } to { background-position: -70% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .name-grad.shine { animation: none; } }
.name-preview { margin: 1.2rem 0 .4rem; padding: 1rem 1.2rem; border-radius: 12px; background: var(--plate); font: 700 1.6rem var(--display); }
.badge-inline { list-style: none; display: flex; gap: .3rem; padding: 0; margin: 0; }
.badge-ico-xs { --s: 24px; border-radius: 7px; border-width: 1.2px; box-shadow: 0 0 8px -2px color-mix(in srgb, var(--badge) 70%, transparent); }
.badge-tile .badge-pop-right { top: calc(100% + 10px); }
.field .label { display: block; font-weight: 600; margin-bottom: .35rem; }
.swatches { display: flex; flex-wrap: wrap; gap: .45rem; }
.swatch { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .7rem .3rem .4rem; border-radius: 999px; font: 600 .88rem var(--body); cursor: pointer;
  color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); }
.swatch:hover { border-color: var(--ink); }
.swatch[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.swatch-dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(128, 128, 128, .6); }
.swatch-none .swatch-dot { background: repeating-linear-gradient(45deg, transparent 0 3px, var(--line) 3px 5px); }

/* ---- theme toggle ---- */
.theme-toggle { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; cursor: pointer; color: var(--ink);
  background: transparent; border: 1.5px solid var(--line); }
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

.server-owner { display: flex; align-items: center; gap: .5rem; margin: .25rem 0 0; flex-wrap: wrap; }
.server-owner .owner-name { font-weight: 600; }
