@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/static/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/static/fonts/instrument.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --black: #000000;
  --surface: #0e0e10;
  --raised: #17171a;
  --raised-2: #202024;
  --line: #2a2a2f;
  --red: #e5182b;
  --red-hi: #ff3346;
  --red-line: rgba(229, 24, 43, 0.38);
  --red-soft: rgba(229, 24, 43, 0.14);
  --text: #f4f4f5;
  --muted: #a3a3ab;
  --faint: #6f6f78;
  --green: #3fcf8e;
  --amber: #f5b14c;
  --r: 4px;
  --r-lg: 6px;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #2e2e34 var(--black); }
body { margin: 0; background: var(--black); color: var(--text); font: 400 16px/1.6 var(--body); min-height: 100vh; caret-color: var(--red-hi); }
::selection { background: var(--red); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2e2e34; border-radius: 2px; border: 2px solid var(--black); }
::-webkit-scrollbar-thumb:hover { background: #45454d; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
code { font-family: ui-monospace, Consolas, monospace; }
:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 2px; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 20px; border-radius: var(--r); border: 1px solid var(--red);
  font: 600 15px/1 var(--body); text-decoration: none; cursor: pointer; color: #fff;
  background: var(--red); transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--red-hi); border-color: var(--red-hi); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--red-line); }
.btn.ghost:hover { background: var(--red-soft); border-color: var(--red); }
.btn.danger { background: transparent; color: var(--red-hi); border-color: var(--red-line); }
.btn.danger:hover { background: var(--red-soft); }
.btn.small { min-height: 34px; padding: 0 14px; font-size: 14px; }
.btn .icon { width: 16px; height: 16px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.icon-btn { width: 36px; height: 36px; border: 1px solid transparent; border-radius: var(--r); background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.icon-btn:hover { background: var(--raised); color: var(--text); border-color: var(--line); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--red-hi); font: 600 14px/1.2 var(--body); cursor: pointer; }
.link-btn .icon { width: 15px; height: 15px; }
.link-btn:hover span { text-decoration: underline; }

/* ---------- site header / footer ---------- */
.wrap { width: min(1160px, 100% - 48px); margin-inline: auto; }
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(0, 0, 0, 0.92); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 21px/1 var(--display); letter-spacing: -0.02em; }
.brand img { width: 28px; height: 28px; }
.site-nav { display: flex; gap: 2px; margin-right: auto; }
.site-nav a { padding: 8px 12px; border-radius: var(--r); text-decoration: none; color: var(--muted); font-weight: 500; transition: color 0.15s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--red); border-radius: 0; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); padding: 2px; }
.lang a { padding: 4px 9px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--muted); border-radius: 2px; }
.lang a:hover { color: var(--text); }
.lang a[aria-current="true"] { background: var(--red); color: #fff; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--raised); }

.site-foot { margin-top: 120px; padding: 36px 0 52px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.site-foot .brand { font-size: 18px; color: var(--text); }
.site-foot .brand img { width: 22px; height: 22px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-left: auto; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--text); }

/* ---------- landing ---------- */
.hero { padding: 88px 0 48px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5.2vw, 4.4rem); font-weight: 800; letter-spacing: -0.03em; }
.hero .lead { margin-top: 20px; max-width: 46ch; font-size: 1.15rem; color: var(--muted); }
.hero .cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero .note { margin-top: 16px; font-size: 14px; color: var(--muted); }

.palette { background: var(--surface); border: 1px solid var(--red-line); border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 30px 60px -30px rgba(229, 24, 43, 0.35); }
.palette-list { padding: 6px; min-height: 252px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.palette-row { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: baseline; padding: 10px 12px; border-radius: var(--r); color: var(--muted); font-size: 14.5px; }
.palette-row b { color: var(--text); font-weight: 600; white-space: nowrap; }
.palette-row.on { background: var(--raised-2); color: var(--text); box-shadow: inset 2px 0 0 var(--red); }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 16px 18px; background: var(--raised); border-top: 1px solid var(--line); font-size: 16px; min-height: 58px; }
.palette-input .plus { width: 24px; height: 24px; border-radius: var(--r); background: var(--raised-2); color: var(--muted); display: grid; place-items: center; font-weight: 700; flex: none; }
.palette-caret { width: 2px; height: 20px; background: var(--red-hi); margin-left: -8px; animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.band { padding: 80px 0 0; }
.band > h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); max-width: 22ch; }
.feature-list { margin-top: 32px; border-top: 1px solid var(--line); }
.feature { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; padding: 26px 4px; border-bottom: 1px solid var(--line); }
.feature h3 { font-size: 1.4rem; }
.feature p { color: var(--muted); max-width: 62ch; }
.tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r); font: 500 13.5px/1.4 ui-monospace, Consolas, monospace; color: var(--text); }

.steps { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.step { counter-increment: step; padding-top: 18px; border-top: 2px solid var(--red); }
.step::before { content: counter(step); display: block; font: 800 2rem/1 var(--display); color: var(--red-hi); margin-bottom: 14px; }
.step h3 { font-size: 1.2rem; margin-bottom: 6px; }
.step p { color: var(--muted); }

.support-band { margin-top: 96px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 36px 40px; background: var(--surface); border: 1px solid var(--red-line); border-radius: var(--r-lg); }
.support-band h2 { font-size: 1.6rem; }
.support-band p { color: var(--muted); margin-top: 8px; max-width: 52ch; }

/* ---------- plain pages ---------- */
.page { padding: 60px 0 0; }
.page > h1 { font-size: clamp(2.2rem, 4.4vw, 3.3rem); }
.page .lead { margin-top: 14px; color: var(--muted); max-width: 56ch; font-size: 1.1rem; }
.cmd-group { margin-top: 52px; }
.cmd-group h2 { font-size: 1.5rem; }
.cmd-group > p { color: var(--muted); margin-top: 6px; max-width: 62ch; }
.cmd-table { margin-top: 16px; border-top: 1px solid var(--line); }
.cmd-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.cmd-row b { font: 600 14.5px/1.5 ui-monospace, Consolas, monospace; }
.cmd-row span { color: var(--muted); }

.donate-grid { margin-top: 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.pay { background: var(--surface); border: 1px solid var(--red-line); border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.pay h2 { font-size: 1.35rem; }
.pay .qr { width: 184px; height: 184px; padding: 4px; border-radius: var(--r); background: #fff; flex: none; }
.pay .qr svg { width: 100%; height: 100%; }
.pay .qr path { shape-rendering: crispEdges; }
.addr { display: flex; gap: 8px; align-items: stretch; width: 100%; }
.addr code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.pay.empty { border-color: var(--line); opacity: 0.7; }
.pay.empty p, .pay > p { color: var(--muted); }

.legal { max-width: 70ch; }
.legal h2 { font-size: 1.25rem; margin: 34px 0 8px; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 20px; margin: 8px 0 0; }

.center-card { max-width: 520px; margin: 96px auto 0; padding: 36px; border: 1px solid var(--red-line); border-radius: var(--r-lg); background: var(--surface); }
.center-card h1 { font-size: 1.7rem; }
.center-card p { color: var(--muted); margin: 12px 0 24px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 400; display: flex; gap: 10px; align-items: center; padding: 12px 18px; border-radius: var(--r); background: var(--raised-2); border: 1px solid var(--line); box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.9); font-weight: 500; animation: toast-in 0.25s var(--ease) both, toast-out 0.3s 4.6s ease forwards; max-width: calc(100vw - 32px); }
.toast.ok .icon { color: var(--green); }
.toast.warn { border-color: var(--red-line); }
.toast.warn .icon { color: var(--red-hi); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes toast-out { to { opacity: 0; visibility: hidden; } }

/* ---------- server list ---------- */
.banner { margin-top: 20px; padding: 12px 16px; border: 1px solid rgba(245, 177, 76, 0.4); color: var(--amber); border-radius: var(--r); font-size: 14.5px; }
.list { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.list-row { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .grow b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row small { color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 2px 14px; }
.list-row .gicon { width: 44px; height: 44px; border-radius: var(--r); background: var(--raised-2); object-fit: cover; display: grid; place-items: center; font-weight: 700; flex: none; }
.status { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: var(--r); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.status.active { color: var(--green); border-color: rgba(63, 207, 142, 0.4); }
.status.pending, .status.posting, .status.ending { color: var(--amber); border-color: rgba(245, 177, 76, 0.4); }
.status.failed { color: var(--red-hi); border-color: var(--red-line); }
.actions { display: flex; gap: 8px; }
.actions form { margin: 0; }

/* ================= dashboard ================= */
.dash { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 14px; }
.side-close { display: none; }
.guild-switch { display: flex; align-items: center; gap: 10px; margin: 0 12px 10px; padding: 8px; border: 1px solid var(--red-line); border-radius: var(--r); text-decoration: none; transition: background 0.15s; }
.guild-switch:hover { background: var(--red-soft); }
.guild-switch img, .guild-switch .ph { width: 34px; height: 34px; border-radius: var(--r); background: var(--raised-2); flex: none; display: grid; place-items: center; font-weight: 700; object-fit: cover; }
.gs-text { flex: 1; min-width: 0; line-height: 1.25; }
.gs-text b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14.5px; }
.gs-text small { color: var(--muted); font-size: 12.5px; }
.guild-switch .icon { width: 16px; height: 16px; color: var(--muted); }
.side-nav { display: flex; flex-direction: column; padding: 4px 8px 24px; }
.side-group { margin: 18px 10px 6px; font: 600 12.5px/1 var(--body); color: var(--faint); }
.side-nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r); text-decoration: none; color: var(--muted); font-size: 14.5px; font-weight: 500; transition: color 0.12s, background 0.12s; }
.side-nav a span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-nav a .icon { width: 17px; height: 17px; }
.side-nav a:hover { color: var(--text); background: var(--raised); }
.side-nav a[aria-current="page"] { color: #fff; background: var(--red-soft); box-shadow: inset 2px 0 0 var(--red); }
.side-nav a[aria-current="page"] .icon { color: var(--red-hi); }
.state { width: 7px; height: 7px; border-radius: 1px; border: 1px solid var(--faint); flex: none; }
.state.on { background: var(--red); border-color: var(--red); }
.side-shade { display: none; }

.dash-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 32px; background: rgba(0, 0, 0, 0.94); border-bottom: 1px solid var(--line); }
.side-open { display: none; }
.topbar-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14.5px; white-space: nowrap; overflow: hidden; }
.topbar-title b { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.topbar-title .icon { width: 14px; height: 14px; }
.me { display: flex; align-items: center; gap: 10px; }
.me span { max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 500; }
.me .icon-btn:hover { color: var(--red-hi); }
.main { padding: 28px 32px 140px; width: 100%; max-width: 1180px; }

.panel { background: var(--surface); border: 1px solid var(--red-line); border-radius: var(--r-lg); }
.panel + .panel, .panel + form, form + .panel { margin-top: 20px; }
.panel-head { font-size: 1.05rem; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.section-head { font-size: 1.35rem; margin: 44px 0 4px; }

/* overview: server */
.server { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 20px 32px; padding: 22px; align-items: center; }
.server-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.server-id img, .server-id .ph { width: 56px; height: 56px; border-radius: var(--r-lg); background: var(--raised-2); flex: none; display: grid; place-items: center; font: 700 22px/1 var(--display); object-fit: cover; }
.server-id div { min-width: 0; }
.server-id h1 { font-size: 1.45rem; overflow-wrap: anywhere; margin-bottom: 6px; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 20px; }
.facts div { min-width: 0; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 2px 0 0; font: 700 1.2rem/1.2 var(--display); font-variant-numeric: tabular-nums; }

/* overview: bot settings */
.settings { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px 32px; padding: 22px; align-items: start; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.field { display: grid; gap: 7px; align-content: start; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.with-btn { display: flex; gap: 8px; align-items: stretch; }
.with-btn .dd { flex: 1; min-width: 0; }
.with-btn .btn { min-height: 42px; }
.field > label, .flabel { font-weight: 600; font-size: 14.5px; }
.field .hint { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.check-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
.check-row input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--red); flex: none; }
.check-row b { display: block; font-weight: 600; font-size: 14.5px; }
.check-row small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.profile-card { position: sticky; top: 84px; background: #111214; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; padding-bottom: 16px; }
.pc-banner { height: 92px; background: linear-gradient(135deg, #ff3346, #8a0a16); background-size: cover; background-position: center; }
.pc-avatar { width: 80px; height: 80px; border-radius: 50%; margin: -40px 0 0 16px; border: 6px solid #111214; background: var(--raised-2); object-fit: cover; position: relative; }
.pc-name { display: flex; align-items: center; gap: 8px; padding: 6px 16px 0; font-size: 1.2rem; }
.pc-name b { font-family: var(--display); font-weight: 700; word-break: break-word; }
.app-tag { background: #5865f2; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 5px; border-radius: 3px; }
.pc-sub { padding: 4px 16px 0; color: var(--muted); font-size: 14px; }
.pc-sub code { background: var(--raised); padding: 1px 7px; border-radius: 3px; color: var(--text); }
.upload { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.check-inline { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; cursor: pointer; }
.check-inline input { accent-color: var(--red); width: 16px; height: 16px; }

/* overview: modules */
.mod-group { margin-top: 22px; }
.mod-group h3 { font: 600 14px/1 var(--body); color: var(--muted); margin: 0 0 10px; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.module { display: flex; align-items: center; gap: 12px; padding: 0 14px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); transition: border-color 0.15s; }
.module:hover { border-color: var(--red-line); }
.module-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 14px 0 14px 14px; text-decoration: none; }
.module-link:focus-visible { outline-offset: -2px; }
.module-icon { width: 38px; height: 38px; border-radius: var(--r); display: grid; place-items: center; background: var(--red-soft); color: var(--red-hi); flex: none; }
.module-icon .icon { width: 19px; height: 19px; }
.module-icon.big { width: 48px; height: 48px; }
.module-icon.big .icon { width: 24px; height: 24px; }
.module-text { min-width: 0; }
.module-text b { display: block; font-weight: 600; }
.module-text small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.module-link:hover b { color: #fff; text-decoration: underline; text-decoration-color: var(--red); }

/* module page */
.mod-form { display: block; }
.mod-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.mod-title { flex: 1; min-width: 0; }
.mod-title h1 { font-size: 1.7rem; }
.mod-title p { color: var(--muted); margin-top: 2px; max-width: 70ch; }
.tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab-btn { border: 0; background: transparent; color: var(--muted); padding: 11px 14px; font: 600 14.5px/1 var(--body); cursor: pointer; white-space: nowrap; box-shadow: inset 0 -2px 0 transparent; transition: color 0.12s, box-shadow 0.12s; }
.tab-btn:hover { color: var(--text); }
.tab-btn.on { color: #fff; box-shadow: inset 0 -2px 0 var(--red); }
.tab { display: none; }
.tab.on { display: block; }
.rows { padding: 6px 0; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 360px); gap: 28px; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.rows > .row:last-child { border-bottom: 0; }
.row.top { align-items: start; }
.row .label { font-weight: 600; display: block; }
.row .hint { display: block; color: var(--muted); font-size: 13.5px; margin-top: 3px; max-width: 52ch; }
.row.wide { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.row.toggle { cursor: pointer; }
.sub-title { font-size: 1.02rem; margin: 26px 22px 4px; }
.sub-title.first { margin-top: 20px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; justify-self: end; }
.label.bad, .tag.bad { color: var(--red-hi); }
.tag.bad { border-color: var(--red-line); font-family: var(--body); }
.label.good, .tag.good { color: var(--green); }
.tag.good { font-family: var(--body); }
.tab .banner, .mod-form > .banner { margin: 0 0 16px; }

/* inputs */
input[type="text"], input[type="number"], textarea, .dd-btn {
  width: 100%; background: var(--raised); color: var(--text); border: 1px solid var(--line); border-radius: var(--r);
  padding: 10px 12px; font: 400 15px/1.4 var(--body); transition: border-color 0.15s, background 0.15s;
}
textarea { min-height: 96px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, textarea:hover, .dd-btn:hover { border-color: #3a3a41; }
input:focus-visible, textarea:focus-visible, .dd-btn:focus-visible { outline: none; border-color: var(--red); background: var(--raised-2); }
input[type="number"] { font-variant-numeric: tabular-nums; }
input[type="color"] { width: 64px; height: 40px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r); background: var(--raised); cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 2px; }

/* custom dropdown */
select.dd-native { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.dd { position: relative; width: 100%; }
.dd-btn { display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; min-height: 42px; }
.dd-btn[disabled] { cursor: not-allowed; opacity: 0.6; }
.dd-btn .dd-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn .dd-label.placeholder { color: var(--muted); }
.dd-btn .chev { width: 16px; height: 16px; color: var(--muted); transition: transform 0.15s; }
.dd.open .dd-btn { border-color: var(--red); background: var(--raised-2); }
.dd.open .chev { transform: rotate(180deg); color: var(--text); }
.dd-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; padding: 4px; border-radius: var(--r); background: #19191c; border: 1px solid var(--red-line); box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.9); max-height: 300px; overflow: auto; animation: menu-in 0.12s ease-out both; }
.dd.up .dd-menu { top: auto; bottom: calc(100% + 4px); }
.dd-menu[hidden] { display: none; }
.dd-menu:focus-visible { outline: none; }
@keyframes menu-in { from { opacity: 0; } }
.dd-search { position: sticky; top: -4px; z-index: 1; margin: -4px -4px 4px; padding: 8px; background: #19191c; border-bottom: 1px solid var(--line); }
.dd-search input { background: var(--black); padding: 8px 10px; font-size: 14px; }
.dd-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 2px; cursor: pointer; font-size: 14.5px; color: var(--text); }
.dd-opt .dd-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-opt.active { background: var(--raised-2); }
.dd-opt[aria-selected="true"] { color: #fff; font-weight: 600; }
.dd-opt .tick { width: 16px; height: 16px; color: var(--red-hi); opacity: 0; }
.dd-opt[aria-selected="true"] .tick { opacity: 1; }
.dd-opt.muted { color: var(--muted); }
.dd-empty { padding: 12px 10px; color: var(--muted); font-size: 14px; }
.dd .dot, .dd-menu .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.dd-group-title { padding: 10px 10px 4px; font-size: 12.5px; font-weight: 600; color: var(--faint); }
.dd.multi .dd-btn { height: auto; min-height: 42px; padding: 6px 38px 6px 8px; position: relative; }
.dd.multi .dd-btn .chev { position: absolute; right: 12px; top: 13px; }
.dd-chips { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; min-width: 0; }
.dd-chips .placeholder { padding: 3px 4px; color: var(--muted); }
.dd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 8px; border-radius: 3px; background: var(--raised-2); border: 1px solid var(--line); font-size: 13.5px; max-width: 100%; }
.dd-chip .x { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 2px; color: var(--muted); }
.dd-chip .x:hover { background: var(--red); color: #fff; }
.dd-chip .x .icon { width: 12px; height: 12px; stroke-width: 2.4; }
.dd-chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.dd-opt .box { width: 16px; height: 16px; border-radius: 2px; border: 1px solid #45454d; display: grid; place-items: center; flex: none; }
.dd-opt .box .icon { width: 12px; height: 12px; stroke-width: 3; color: #fff; opacity: 0; }
.dd-opt[aria-selected="true"] .box { background: var(--red); border-color: var(--red); }
.dd-opt[aria-selected="true"] .box .icon { opacity: 1; }

/* switch */
.switch { position: relative; display: inline-block; width: 42px; height: 22px; justify-self: end; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--raised-2); border: 1px solid #3a3a41; border-radius: 3px; transition: background 0.15s, border-color 0.15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 2px; background: var(--muted); transition: transform 0.15s var(--ease), background 0.15s; }
.switch input:checked + span { background: var(--red); border-color: var(--red); }
.switch input:checked + span::after { transform: translateX(20px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--red-hi); outline-offset: 2px; }
.switch.big { width: 52px; height: 28px; }
.switch.big span::after { width: 18px; height: 18px; top: 4px; left: 4px; }
.switch.big input:checked + span::after { transform: translateX(24px); }

/* unsaved changes bar */
.savebar { position: fixed; left: calc(50% + 128px); bottom: 20px; z-index: 200; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; border-radius: var(--r); background: var(--raised); border: 1px solid var(--red); box-shadow: 0 20px 44px -12px rgba(0, 0, 0, 0.95); max-width: calc(100vw - 32px); }
.savebar .grow { font-size: 14.5px; font-weight: 500; margin-right: 8px; }
html.js .savebar { transform: translate(-50%, 140%); opacity: 0; pointer-events: none; transition: transform 0.25s var(--ease), opacity 0.2s; }
html.js .savebar.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }

/* giveaways form */
.inline-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 14px 22px 22px; border-bottom: 1px solid var(--line); }
.inline-form .full { grid-column: 1 / -1; }
.inline-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.dur { display: grid; grid-template-columns: 1fr 140px; gap: 8px; }
.list-inner { padding: 0 6px 6px; }

/* repeaters */
.repeater { display: grid; gap: 8px; }
.rep-list { display: grid; gap: 8px; }
.rep-item { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r); }
.rep-item.open { border-color: var(--red-line); }
.rep-top { display: flex; align-items: center; gap: 4px; padding: 4px; }
.rep-head { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; background: transparent; color: var(--text); font: 600 15px/1.3 var(--body); text-align: left; padding: 9px 10px; border-radius: 2px; cursor: pointer; }
.rep-head:hover { background: var(--raised-2); }
.rep-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-head .chev { width: 16px; height: 16px; color: var(--muted); transition: transform 0.15s; }
.rep-item.open > .rep-top .rep-head .chev { transform: rotate(180deg); }
.rep-remove:hover { color: var(--red-hi); }
.rep-body { display: none; padding: 6px 14px 16px; gap: 14px; border-top: 1px solid var(--line); }
.rep-item.open > .rep-body { display: grid; }
.rep-field { display: grid; gap: 6px; }
.rep-field .label, .rep-preview .label { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.rep-field input[type="text"], .rep-field input[type="number"], .rep-field textarea, .rep-body .dd-btn { background: var(--surface); }
.rep-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.rep-toggle .label { font-size: 14.5px; color: var(--text); font-weight: 500; }
.rep-add { justify-self: start; }
.rep-preview { display: grid; gap: 6px; }
.rep-body .rep-item { background: var(--surface); }

/* Discord message preview */
.dc { background: #313338; border-radius: var(--r); padding: 14px 16px; font-family: "gg sans", "Noto Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif; font-size: 15.5px; line-height: 1.4; color: #dbdee1; overflow: hidden; }
.dc-msg { display: flex; gap: 14px; }
.dc-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; background: #1e1f22; object-fit: cover; margin-top: 2px; }
.dc-main { min-width: 0; flex: 1; }
.dc-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.3; }
.dc-name { color: #f2f3f5; font-weight: 600; }
.dc-tag { background: #5865f2; color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 5px; border-radius: 3px; line-height: 1.35; }
.dc-time { color: #949ba4; font-size: 12px; margin-left: 4px; }
.dc-content { margin-top: 2px; overflow-wrap: anywhere; }
.dc strong { color: #fff; font-weight: 700; }
.dc em { font-style: italic; }
.dc u { text-decoration: underline; }
.dc s { text-decoration: line-through; }
.dc code { background: #1e1f22; border-radius: 3px; padding: 1px 5px; font-size: 14px; }
.dc pre { background: #2b2d31; border: 1px solid #1e1f22; border-radius: 4px; padding: 8px 10px; margin: 6px 0; overflow: auto; }
.dc pre code { background: none; padding: 0; }
.dc blockquote { margin: 2px 0; padding-left: 10px; border-left: 4px solid #4e5058; }
.dc a { color: #00a8fc; text-decoration: none; }
.dc .mention, .dc .dc-ts { background: rgba(88, 101, 242, 0.3); color: #c9cdfb; border-radius: 3px; padding: 0 3px; font-weight: 500; }
.dc .dc-ts { background: rgba(78, 80, 88, 0.6); color: #dbdee1; }
.dc-embed { display: flex; gap: 16px; margin-top: 6px; max-width: 520px; background: #2b2d31; border-left: 4px solid var(--red); border-radius: 4px; padding: 8px 16px 14px 12px; }
.dc-embed-body { flex: 1; min-width: 0; }
.dc-embed-author { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 14px; font-weight: 600; color: #f2f3f5; }
.dc-mini { width: 24px; height: 24px; border-radius: 50%; background: #5865f2; display: inline-block; }
.dc-embed-title { margin-top: 8px; font-weight: 700; color: #fff; font-size: 16px; }
.dc-embed-desc { margin-top: 8px; font-size: 14.5px; overflow-wrap: anywhere; }
.dc-fields { display: grid; gap: 8px; margin-top: 8px; font-size: 14px; }
.dc-field-name { font-weight: 700; color: #f2f3f5; margin-bottom: 2px; }
.dc-thumb { width: 72px; height: 72px; border-radius: 50%; background: #1e1f22; flex: none; margin-top: 6px; }
.dc-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dc-btn { background: #4e5058; color: #fff; font-size: 14px; font-weight: 500; padding: 7px 16px; border-radius: 3px; }
.dc-btn.primary { background: #5865f2; }
.dc-reacts { display: flex; gap: 6px; margin-top: 8px; }
.dc-react { background: #2b2d31; border: 1px solid #3f4147; border-radius: 6px; padding: 2px 8px; font-size: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .settings { grid-template-columns: minmax(0, 1fr); }
  .profile-card { position: static; max-width: 320px; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 56px; }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .cmd-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .site-nav { display: none; }
  .site-head .wrap { gap: 12px; }
  .head-actions { margin-left: auto; }

  .dash { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; width: min(290px, 86vw); transform: translateX(-100%); transition: transform 0.2s var(--ease); }
  .side.open { transform: none; }
  .side-close, .side-open { display: grid; }
  .side-shade { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, 0.7); }
  .side.open + .side-shade { display: block; }
  .topbar { padding: 0 16px; gap: 10px; }
  .me span { display: none; }
  .main { padding: 22px 16px 140px; }
  .server { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 16px; }
  .row.toggle { grid-template-columns: minmax(0, 1fr) auto; }
  .inline-form { grid-template-columns: minmax(0, 1fr); padding: 14px 16px 18px; }
  .sub-title { margin-left: 16px; }
  .list-row { flex-wrap: wrap; }
  .savebar { left: 50%; }
  .mod-head { flex-wrap: wrap; }
  .dc-embed { max-width: 100%; }
}
@media (max-width: 520px) {
  .wrap { width: calc(100% - 32px); }
  .head-actions .btn.ghost { display: none; }
  .support-band { padding: 26px 20px; }
  .topbar .lang { display: none; }
  .savebar { padding-left: 12px; gap: 8px; }
  .savebar .grow { display: none; }
  .module-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
