:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --rail: #0f1117;
  --surface: #141821;
  --surface-2: #191e29;
  --surface-3: #202634;
  --border: #242a38;
  --border-strong: #333b4d;
  --text: #e8ebf2;
  --text-2: #aab2c2;
  --text-3: #737d90;
  --accent: #5b6cff;
  --accent-hover: #4a5aeb;
  --accent-soft: rgba(91, 108, 255, .13);
  --green: #3ba55d;
  --green-soft: rgba(59, 165, 93, .13);
  --red: #ed4245;
  --red-soft: rgba(237, 66, 69, .12);
  --yellow: #faa61a;
  --yellow-soft: rgba(250, 166, 26, .12);
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 8px 28px rgba(0, 0, 0, .35);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
code {
  font-family: var(--mono);
  font-size: .86em;
  color: #c3c9ff;
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 1px 5px;
}
::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #465066; }

.hidden { display: none !important; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }

.app {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 12px 12px;
  background: var(--rail);
  border-right: 1px solid var(--border);
  overflow: hidden;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  min-height: 32px;
}
.brand img { width: 28px; height: 28px; object-fit: contain; }
.brand-name { font-weight: 700; letter-spacing: .14em; font-size: 13px; }
.brand-tag {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 5px;
}

.rail-section { display: flex; flex-direction: column; gap: 8px; min-height: 0; flex: 1; }
.rail-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 8px;
}
.guild-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; padding-bottom: 8px; }

.guild-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: none;
  text-align: left;
  transition: background .12s, border-color .12s;
}
.guild-item:hover { background: var(--surface-2); }
.guild-item.active { background: var(--accent-soft); border-color: rgba(91, 108, 255, .35); }
.guild-item .guild-icon { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; }
.guild-item .guild-text { min-width: 0; }
.guild-item .guild-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.guild-item .guild-id { font-size: 11px; color: var(--text-3); }
.guild-icon {
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--text-2);
  font-weight: 700;
  overflow: hidden;
}
.guild-icon img { width: 100%; height: 100%; object-fit: cover; }

.rail-empty { padding: 18px 10px; font-size: 12px; color: var(--text-3); line-height: 1.6; }

.rail-footer {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rail-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  background: none;
  border: 0;
  width: 100%;
  text-align: left;
}
.rail-link:hover { background: var(--surface-2); color: var(--text); }
.rail-link svg { width: 17px; height: 17px; opacity: .75; }
.rail-link.danger { color: #ff8b8d; }
.rail-link.danger:hover { background: var(--red-soft); }

.user {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.user img { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); }
.user-text { min-width: 0; flex: 1; }
.user-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-sub { font-size: 10px; color: var(--text-3); }



.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 0 28px;
  background: rgba(11, 13, 18, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.crumb { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.crumb b { color: var(--text); font-weight: 600; }
.crumb .sep { opacity: .5; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-2);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.mobile-only { display: none; }

.page { width: 100%; max-width: 1060px; margin: 0 auto; padding: 26px 28px 60px; }



.guild-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.guild-avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  font-size: 20px;
  font-weight: 700;
  overflow: hidden;
}
.guild-avatar img { width: 100%; height: 100%; object-fit: cover; }
.guild-title { min-width: 0; }
.guild-title h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.guild-title p { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.guild-stats { margin-left: auto; display: flex; gap: 8px; }
.stat-box {
  min-width: 74px;
  padding: 8px 12px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat-box b { display: block; font-size: 17px; font-weight: 700; line-height: 1.2; }
.stat-box span { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.stat-box.green b { color: var(--green); }
.stat-box.red b { color: var(--red); }


.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
  overflow-x: auto;
}
.tab {
  position: relative;
  padding: 10px 14px 12px;
  border: 0;
  background: none;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.tab:hover { color: var(--text-2); }
.tab.active { color: var(--text); }
.tab.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}


.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}
.card-head > div { min-width: 0; }
.card-head h2 { font-size: 14px; font-weight: 600; }
.card-head p { font-size: 12px; color: var(--text-3); margin-top: 1px; overflow-wrap: anywhere; }
.card-head .spacer { margin-left: auto; }
.card-body { padding: 18px; }
.card-body.tight { padding: 10px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 > .card { margin-bottom: 0; }


.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
.label .count { font-weight: 400; color: var(--text-3); font-size: 11px; }
.label .count.over { color: var(--red); }

.input, .select, .textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 11px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.input::placeholder, .textarea::placeholder { color: #5b6476; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
.input-sm { padding: 7px 10px; font-size: 12px; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.field-hint { font-size: 11px; color: var(--text-3); }

.color-row { display: flex; align-items: center; gap: 8px; }
.color-input {
  width: 40px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
}
.color-input::-webkit-color-swatch-wrapper { padding: 2px; }
.color-input::-webkit-color-swatch { border: 0; border-radius: 5px; }
.swatches { display: flex; gap: 5px; flex-wrap: wrap; }
.swatch {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, .14);
  padding: 0;
}
.swatch:hover { transform: scale(1.08); }


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .12s, color .12s, border-color .12s, opacity .12s;
}
.btn:hover { background: var(--surface-3); color: var(--text); border-color: var(--border-strong); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-danger { background: var(--red-soft); border-color: rgba(237, 66, 69, .35); color: #ff8b8d; }
.btn-danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 14px; }

.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch-track {
  position: absolute;
  inset: 0;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: 99px;
  transition: background .15s, border-color .15s;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #8b95a8;
  transition: transform .15s, background .15s;
}
.switch input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px var(--accent-soft); }


.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--text-2);
}
.badge-green { background: var(--green-soft); color: #57d07a; }
.badge-red { background: var(--red-soft); color: #ff8b8d; }
.badge-yellow { background: var(--yellow-soft); color: #ffc45c; }
.badge-accent { background: var(--accent-soft); color: #a8b1ff; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }


.overview-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; align-items: start; }
.metric { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.metric b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.metric span { font-size: 12px; color: var(--text-3); }
.progress {
  height: 7px;
  border-radius: 99px;
  background: var(--surface-3);
  overflow: hidden;
  margin: 14px 0 10px;
}
.progress > i { display: block; height: 100%; border-radius: 99px; background: var(--green); transition: width .3s; }
.split-line { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); }

.quick-list { display: flex; flex-direction: column; gap: 2px; }
.quick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: none;
  text-align: left;
  width: 100%;
}
.quick-item:hover { background: var(--surface-2); border-color: var(--border); }
.quick-item .qi-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: #a8b1ff;
  flex-shrink: 0;
}
.quick-item .qi-icon svg { width: 16px; height: 16px; }
.quick-item strong { display: block; font-size: 13px; font-weight: 600; }
.quick-item small { display: block; font-size: 11px; color: var(--text-3); }


.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .input { flex: 1; min-width: 170px; max-width: 300px; }
.toolbar .select { width: auto; min-width: 130px; }
.toolbar .spacer { margin-left: auto; }

.command-list { display: flex; flex-direction: column; gap: 2px; max-height: 520px; overflow-y: auto; padding-right: 2px; }
.command-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: var(--radius);
  border: 1px solid transparent;
}
.command-row:hover { background: var(--surface-2); }
.command-row .cmd-main { min-width: 0; flex: 1; }
.command-row .cmd-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #c3c9ff;
}
.command-row .cmd-cat {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface-3);
  border-radius: 4px;
  padding: 1px 5px;
}
.command-row .cmd-desc {
  margin-top: 1px;
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.command-row.off .cmd-name { color: var(--text-3); text-decoration: line-through; }
.command-row.off .cmd-desc { opacity: .55; }

.save-bar {
  position: sticky;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.save-bar .save-text { font-size: 12px; color: var(--text-3); flex: 1; }
.save-bar .save-text b { color: var(--yellow); font-weight: 600; }
.save-bar .save-text.saved b { color: var(--green); }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 260px;
  padding: 32px;
  text-align: center;
  color: var(--text-3);
}
.empty-state .es-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.empty-state .es-icon svg { width: 22px; height: 22px; }
.empty-state h3 { font-size: 15px; font-weight: 600; color: var(--text); }
.empty-state p { font-size: 13px; max-width: 340px; line-height: 1.6; }

.embed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
.preview-card { position: sticky; top: 80px; }
.preview-stage { padding: 16px; background: var(--bg); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

.discord-message { display: flex; gap: 12px; }
.discord-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 16px;
}
.discord-avatar img { width: 100%; height: 100%; object-fit: cover; }
.discord-body { min-width: 0; flex: 1; }
.discord-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.discord-meta strong { font-size: 14px; color: #f2f3f5; }
.discord-meta .bot-tag {
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: #5865f2;
  border-radius: 3px;
  padding: 1px 4px;
}
.discord-meta time { font-size: 11px; color: #949ba4; }
.discord-content { font-size: 14px; color: #dbdee1; white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 6px; }
.discord-content:empty { display: none; }

.discord-embed {
  max-width: 520px;
  background: #2b2d31;
  border-left: 4px solid #5865f2;
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 13px;
  color: #dbdee1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
}
.discord-embed .embed-main { min-width: 0; }
.embed-author { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: #f2f3f5; margin-bottom: 6px; }
.embed-author img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.embed-title { font-size: 15px; font-weight: 600; color: #00a8fc; margin-bottom: 5px; overflow-wrap: anywhere; }
.embed-desc { line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.embed-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.embed-field strong { display: block; font-size: 12px; color: #f2f3f5; margin-bottom: 2px; }
.embed-field span { font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.embed-thumb { width: 72px; height: 72px; border-radius: 4px; object-fit: cover; }
.embed-image { grid-column: 1 / -1; max-width: 100%; border-radius: 4px; margin-top: 4px; }
.embed-footer { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-size: 11px; color: #949ba4; margin-top: 6px; }
.embed-footer img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }

.field-editor { display: flex; flex-direction: column; gap: 8px; }
.field-item {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.field-item .input { border-color: transparent; background: var(--surface); }
.inline-check { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-3); white-space: nowrap; }
.inline-check input { accent-color: var(--accent); }

.embed-actions { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.embed-actions .muted { flex: 1; font-size: 11px; }


.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 380px;
  padding: 12px 15px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 13px;
  animation: toast-in .18s ease;
}
.toast.error { border-color: rgba(237, 66, 69, .5); }
.toast .toast-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.toast.error .toast-dot { background: var(--red); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }


.signin {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}
.signin-card {
  width: 100%;
  max-width: 420px;
  padding: 38px 34px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.signin-card img { width: 56px; height: 56px; object-fit: contain; margin: 0 auto 18px; }
.signin-card h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px; }
.signin-card p { color: var(--text-3); font-size: 13px; line-height: 1.6; margin-bottom: 24px; }
.btn-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: var(--radius);
  background: #5865f2;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.btn-discord:hover { background: #4752c4; }
.signin-foot { margin-top: 16px; font-size: 11px; color: var(--text-3); }


.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 22px;
  height: 64px;
  padding: 0 32px;
  background: rgba(11, 13, 18, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-head .brand { padding: 0; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 13px; color: var(--text-2); }
.site-nav a:hover { color: var(--text); }

.hero { max-width: 880px; margin: 0 auto; padding: 92px 28px 56px; text-align: center; }
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-2);
}
.hero .eyebrow .dot { color: var(--green); }
.hero h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.08; font-weight: 800; letter-spacing: -.035em; margin-bottom: 18px; }
.hero h1 span { color: #8f9bff; }
.hero p { max-width: 600px; margin: 0 auto 28px; font-size: 16px; line-height: 1.65; color: var(--text-2); }
.hero-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 12px; color: var(--text-3); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 28px 64px;
}
.feature {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.feature .f-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: #a8b1ff;
}
.feature .f-icon svg { width: 18px; height: 18px; }
.feature h3 { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.feature p { font-size: 13px; line-height: 1.6; color: var(--text-3); }

.band {
  max-width: 1040px;
  margin: 0 auto 64px;
  padding: 30px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.band h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 5px; }
.band p { font-size: 13px; color: var(--text-3); }
.band .btn { margin-left: auto; flex-shrink: 0; }

.site-foot {
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px 28px 36px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-3);
}
.site-foot .brand { padding: 0; }
.site-foot .brand-name { font-size: 12px; }
.site-foot .push { margin-left: auto; display: flex; gap: 18px; }
.site-foot a:hover { color: var(--text); }


.site-nav a.active { color: var(--text); }

.donate-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 28px 92px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(700px 340px at 50% -12%, rgba(91, 108, 255, .22), transparent 70%),
    radial-gradient(460px 280px at 14% 40%, rgba(143, 155, 255, .09), transparent 70%),
    var(--bg);
}
.donate-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(600px 320px at 50% 0%, #000, transparent 75%);
  pointer-events: none;
}
.donate-hero-inner { position: relative; max-width: 760px; margin: 0 auto; }
.donate-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  margin-bottom: 22px;
  border: 1px solid rgba(91, 108, 255, .35);
  border-radius: 99px;
  background: var(--accent-soft);
  color: #c3c9ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.donate-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(59, 165, 93, .15); }
.donate-hero h1 { font-size: clamp(38px, 5.5vw, 60px); line-height: 1.06; font-weight: 800; letter-spacing: -.04em; margin-bottom: 18px; }
.donate-hero h1 span { color: #8f9bff; }
.donate-hero p { max-width: 600px; margin: 0 auto; font-size: 16px; line-height: 1.7; color: var(--text-2); }
.donate-trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 26px; margin-top: 26px; }
.donate-trust span { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); }
.donate-trust svg { width: 15px; height: 15px; color: var(--green); }

.donate-wrap { position: relative; z-index: 1; max-width: 1020px; margin: -34px auto 0; padding: 0 28px 70px; }
.donate-grid { display: grid; grid-template-columns: 330px 1fr; gap: 18px; align-items: start; }

.donate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.donate-card-head { padding: 20px 22px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, rgba(91, 108, 255, .07), transparent); }
.donate-card-head h2 { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.donate-card-head p { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.donate-card-body { padding: 22px; }

.donate-aside { padding: 22px; }
.donate-aside-head { display: flex; gap: 12px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.donate-aside-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: #a8b1ff; flex-shrink: 0; }
.donate-aside-icon svg { width: 19px; height: 19px; }
.donate-aside-head h3 { font-size: 15px; font-weight: 700; }
.donate-aside-head p { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.donate-benefits { list-style: none; display: flex; flex-direction: column; gap: 16px; margin: 20px 0; }
.donate-benefits li { display: flex; gap: 11px; align-items: flex-start; }
.donate-benefits .b-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); color: #a8b1ff; flex-shrink: 0; }
.donate-benefits .b-icon svg { width: 15px; height: 15px; }
.donate-benefits strong { display: block; font-size: 13px; font-weight: 600; }
.donate-benefits small { display: block; font-size: 12px; color: var(--text-3); line-height: 1.5; margin-top: 2px; }
.donate-quote { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); font-size: 12px; line-height: 1.6; color: var(--text-2); }

.donate-user { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); font-size: 12.5px; color: var(--text-2); }
.donate-user img, .donate-user .avatar-fallback { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; background: var(--accent-soft); object-fit: cover; }
.donate-user .avatar-fallback { display: grid; place-items: center; color: #c3c9ff; font-weight: 700; }
.donate-user strong { color: var(--text); font-weight: 600; }

.amount-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 10px; }
.amount-btn {
  height: 54px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.amount-btn:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.amount-btn.selected { border-color: var(--accent); background: var(--accent-soft); color: #c3c9ff; box-shadow: inset 0 0 0 1px var(--accent); }

.custom-wrap { padding: 14px; margin-top: 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: rgba(255, 255, 255, .015); }
.money-input { position: relative; max-width: 190px; }
.money-input span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-weight: 600; }
.money-input input { padding-left: 26px; }

.donate-auth { margin-top: 18px; }
.donate-auth .btn-discord { display: inline-flex; align-items: center; gap: 9px; }
.donate-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 18px; margin-top: 22px; border-top: 1px solid var(--border); }
.btn-checkout { display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 22px; font-size: 14px; font-weight: 700; }
.btn-checkout svg { width: 15px; height: 15px; }
.donate-error { padding: 10px 12px; margin-top: 14px; border: 1px solid rgba(237, 66, 69, .3); border-radius: var(--radius); background: var(--red-soft); color: #ff8b8d; font-size: 12.5px; }

.donate-status { margin-bottom: 18px; border-left: 3px solid var(--green); }
.donate-status h2 { font-size: 15px; font-weight: 700; }
.donate-status p { font-size: 13px; line-height: 1.6; color: var(--text-2); margin-top: 4px; }
.donate-empty { display: flex; align-items: center; gap: 12px; padding: 8px 0; color: var(--text-3); font-size: 13px; }
.donate-empty-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); flex-shrink: 0; }
.donate-empty-icon svg { width: 18px; height: 18px; }

@media (max-width: 860px) {
  .donate-grid { grid-template-columns: 1fr; }
  .donate-aside { order: 2; }
  .donate-hero { padding: 64px 20px 76px; }
}


.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card {
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.stat-card .label { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); margin-bottom: 5px; }
.stat-card .value { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.stat-card .value.green { color: var(--green); }
.stat-card .value.red { color: var(--red); }

.table { display: flex; flex-direction: column; }
.table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 92px;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-top: 1px solid var(--border);
}
.table-row:first-child { border-top: 0; }
.table-row:hover { background: var(--surface-2); }
.table-row .name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-row .meta { font-size: 11px; color: var(--text-3); margin-top: 1px; }

.feedback-item { padding: 14px 0; border-top: 1px solid var(--border); }
.feedback-item:first-of-type { border-top: 0; padding-top: 4px; }
.feedback-item .fb-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.feedback-item .fb-head strong { font-size: 12px; }
.feedback-item .fb-head small { margin-left: auto; font-size: 11px; color: var(--text-3); }
.feedback-item p { font-size: 13px; line-height: 1.55; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }


.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 44px; color: var(--text-3); font-size: 13px; }
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


@media (max-width: 980px) {
  .embed-layout { grid-template-columns: 1fr; }
  .preview-card { position: static; }
  .overview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .rail {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform .18s ease;
    box-shadow: var(--shadow);
  }
  .app.rail-open .rail { transform: translateX(0); }
  .app.rail-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(0, 0, 0, .55);
  }
  .mobile-only { display: grid; }
  .topbar { padding: 0 18px; }
  .page { padding: 20px 18px 48px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .site-nav { gap: 14px; }
  .site-nav a:not(.btn) { display: none; }
  .band { flex-direction: column; align-items: flex-start; }
  .band .btn { margin-left: 0; }
}

@media (max-width: 560px) {
  .guild-stats { display: none; }
  .guild-head { gap: 12px; }
  .guild-avatar { width: 46px; height: 46px; border-radius: 12px; }
  .guild-title h1 { font-size: 18px; }
  .field-row { grid-template-columns: 1fr; }
  .field-item { grid-template-columns: 1fr auto; }
  .field-item .input:nth-child(2) { grid-column: 1 / -1; }
  .stat-grid { grid-template-columns: 1fr; }
  .table-row { grid-template-columns: minmax(0, 1fr) auto; }
  .table-row .badge { display: none; }
  .hero { padding-top: 64px; }
  .site-head { padding: 0 18px; }
  .site-foot { flex-wrap: wrap; }
  .site-foot .push { margin-left: 0; width: 100%; }
}
