:root {
  --bg-0: #0c0e12;
  --bg-1: #11141a;
  --surface: #161a21;
  --surface-2: #1c2129;
  --surface-hover: #222833;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.11);
  --text: #eceef2;
  --muted: #8b939e;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --accent-dim: rgba(88, 101, 242, 0.14);
  --accent-soft: rgba(88, 101, 242, 0.08);
  --danger: #f23f43;
  --ok: #23a55a;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
  --topbar-h: 60px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  line-height: 1.55;
}

.bg-grid {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% -10%, black, transparent);
  z-index: 0;
}

.bg-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 15% -5%, rgba(88, 101, 242, 0.1), transparent 55%),
    radial-gradient(ellipse 50% 35% at 85% 0%, rgba(99, 102, 241, 0.06), transparent 50%);
  z-index: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: var(--topbar-h);
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 14, 18, 0.88);
  backdrop-filter: blur(16px) saturate(1.2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-logo,
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
}

.brand-logo {
  object-fit: cover;
  border: 1px solid var(--border-strong);
}

.brand-mark {
  background: linear-gradient(135deg, var(--accent), #4752c4);
}

.brand-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-tag {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
}

.topbar-nav {
  display: none;
  align-items: center;
  gap: 2px;
  justify-self: center;
}

@media (min-width: 720px) {
  .topbar-nav:not(.hidden) {
    display: flex;
  }
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  flex-wrap: wrap;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 72px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.landing {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.landing .panel {
  animation: rise 0.4s ease both;
}

.section-head {
  margin-bottom: 22px;
}

.section-head h2 {
  margin-bottom: 6px;
}

.hero {
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
  }
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-card {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--bg-1);
  border: 1px solid var(--border);
}

.bot-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.bot-avatar,
.bot-preview-fallback {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  flex-shrink: 0;
}

.bot-preview-fallback {
  background: linear-gradient(135deg, var(--accent), #4752c4);
}

.bot-preview strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.hero-stat {
  text-align: center;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}

.hero-stat strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.hero-stat span {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.3;
}

.features,
.setup {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.feature-card {
  padding: 18px 16px;
  border-radius: var(--radius);
  background: var(--bg-1);
  border: 1px solid var(--border);
  transition: border-color 0.15s, background 0.15s;
}

.feature-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  margin-bottom: 12px;
  border-radius: 8px;
  background: var(--accent-soft);
}

.feature-card h3 {
  margin-bottom: 6px;
  font-size: 0.95rem;
  font-weight: 600;
}

.feature-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  display: flex;
  gap: 14px;
  padding: 18px 16px;
  border-radius: var(--radius);
  background: var(--bg-1);
  border: 1px solid var(--border);
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
  background: var(--accent);
}

.step-card h3 {
  margin-bottom: 4px;
  font-size: 0.95rem;
  font-weight: 600;
}

.step-card p {
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: var(--muted);
}

.step-card .btn {
  margin-top: 2px;
}

.site-footer {
  padding: 22px 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--text);
}

.page-header {
  margin-bottom: 24px;
}

.page-header h2 {
  margin-bottom: 6px;
}

.page-header .muted {
  font-size: 0.95rem;
}

.pick-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.pick-empty {
  grid-column: 1 / -1;
  max-width: 480px;
  margin: 0 auto;
}

.pick-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.btn-lg {
  padding: 11px 20px;
  font-size: 0.95rem;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

.btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-discord {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.btn-discord:hover {
  background: var(--accent-hover);
  filter: none;
}

.panel {
  animation: rise 0.35s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero h1,
.hero-copy h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin: 0 0 14px;
}

.accent {
  color: var(--accent);
}

.lede {
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 22px;
  max-width: 52ch;
}

.lede strong {
  color: var(--text);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fineprint {
  margin-top: 16px;
  color: var(--danger);
  font-size: 0.875rem;
  min-height: 1.2em;
}

.hidden {
  display: none !important;
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.025em;
}

h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--muted);
  margin-top: 0;
}

.muted.tiny {
  font-size: 0.8rem;
  margin: 6px 0 0;
}

.tiny {
  font-size: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s,
    transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.btn-primary:hover {
  background: var(--accent-hover);
  filter: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.guild-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.guild-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: border-color 0.15s, background 0.15s;
  box-shadow: var(--shadow-sm);
}

.guild-card:hover {
  border-color: rgba(88, 101, 242, 0.35);
  background: var(--surface-hover);
}

.guild-card:active {
  transform: scale(0.995);
}

.guild-card strong {
  font-weight: 600;
  font-size: 0.95rem;
}

.guild-ico {
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.dash {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.dash-nav {
  position: sticky;
  top: calc(var(--topbar-h) + 12px);
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.nav-back {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  text-align: left;
  margin-bottom: 14px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.nav-back:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.muted-link {
  color: var(--muted);
}

.nav-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--bg-1);
  border: 1px solid var(--border);
}

.nav-head strong {
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-tabs {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tab {
  position: relative;
  padding: 9px 12px 9px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.tab:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.tab.active {
  color: var(--text);
  background: var(--accent-dim);
}

.tab.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.dash-main {
  min-width: 0;
}

.tab-panel.hidden {
  display: none;
}

.card {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.card.prose ul {
  margin: 8px 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.card.prose li {
  margin-bottom: 6px;
}

.card.prose code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--bg-1);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.stat {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--bg-1);
  border: 1px solid var(--border);
}

.stat strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.stat span {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field span {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

input[type='text'],
input[type='number'],
input[type='url'],
textarea,
select {
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-1);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input::placeholder,
textarea::placeholder {
  color: rgba(139, 147, 158, 0.7);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(88, 101, 242, 0.55);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

textarea {
  resize: vertical;
  min-height: 96px;
}

select[multiple] {
  padding: 8px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
}

.toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.notice-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid rgba(88, 101, 242, 0.2);
  font-size: 0.875rem;
}

.toast-stack {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  animation: toast-in 0.2s ease;
  max-width: 300px;
  font-size: 0.875rem;
}

.toast.ok {
  border-color: rgba(35, 165, 90, 0.4);
}

.toast.err {
  border-color: rgba(242, 63, 67, 0.4);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg-1);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.panel-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.panel-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  border: 1px solid var(--border);
}

.invite-row,
.invite-board-row {
  align-items: flex-start;
}

.inv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.panel-row .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.panel-row a {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.panel-row a:hover {
  text-decoration: underline;
}

.panel-row button[data-del-panel] {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(242, 63, 67, 0.35);
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  transition: background 0.15s;
}

.panel-row button[data-del-panel]:hover {
  background: rgba(242, 63, 67, 0.1);
}

.subhead {
  margin: 18px 0 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.dept-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 10px 0 14px;
}

.dept-row {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-1);
  border: 1px solid var(--border);
}

.dept-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.dept-row-head strong {
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-dept-remove {
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.btn-dept-remove:hover {
  color: var(--danger);
  border-color: rgba(242, 63, 67, 0.35);
}

.dept-row .field {
  margin-bottom: 12px;
}

.dept-row select[multiple] {
  min-height: 96px;
}

.dept-summary {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.dept-summary strong {
  color: var(--text);
  font-weight: 500;
}

.field-row.tk-embed-fields {
  align-items: end;
}

label.toggle.tk-inline {
  margin-bottom: 14px;
  white-space: nowrap;
}

@media (max-width: 719px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0 16px;
  }

  .topbar-actions {
    grid-column: 2;
  }

  .shell {
    padding: 20px 16px 56px;
  }

  .hero {
    padding: 28px 20px;
  }

  .features,
  .setup {
    padding: 24px 20px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 10px 14px;
  }

  .hero-stat strong {
    font-size: 1rem;
  }
}

@media (max-width: 860px) {
  .dash {
    grid-template-columns: 1fr;
  }

  .dash-nav {
    position: static;
  }

  .nav-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 4px;
  }

  .tab.active::before {
    top: auto;
    left: 8px;
    right: 8px;
    bottom: 0;
    width: auto;
    height: 2px;
    border-radius: 2px 2px 0 0;
  }

  .embed-builder-grid {
    grid-template-columns: 1fr;
  }

  .embed-page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* New Embed builder */
.embed-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.embed-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.embed-page-title {
  margin: 0 0 4px;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.embed-page-sub {
  margin: 0;
  font-size: 0.95rem;
}

.embed-builder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.embed-builder-col {
  margin-bottom: 0;
}

.embed-section-label {
  margin: 0 0 18px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.embed-field {
  margin-bottom: 16px;
}

.embed-label {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted) !important;
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-picker-row input[type='color'] {
  width: 44px;
  height: 40px;
  padding: 2px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  cursor: pointer;
}

.color-picker-row input[type='text'] {
  flex: 1;
}

input[type='file'] {
  font-family: var(--font);
  font-size: 0.85rem;
  color: var(--muted);
}

input[type='file']::file-selector-button {
  font-family: var(--font);
  font-size: 0.85rem;
  padding: 8px 14px;
  margin-right: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-1);
  color: var(--text);
  cursor: pointer;
}

input[type='file']::file-selector-button:hover {
  background: var(--surface-hover);
}

.btn-send-embed {
  width: 100%;
  margin-top: 8px;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  background: #14b8a6;
  color: #042f2e;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-send-embed:hover {
  background: #2dd4bf;
}

.btn-send-embed:active {
  transform: scale(0.99);
}

/* Custom Commands */
.cc-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cc-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cc-page-title {
  margin: 0 0 4px;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cc-page-sub {
  margin: 0;
  font-size: 0.95rem;
  max-width: 52ch;
}

.btn-cc-new {
  flex-shrink: 0;
  width: auto;
  padding: 10px 18px;
  font-size: 0.9rem;
}

.cc-empty-box {
  padding: 48px 24px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-strong);
  background: rgba(0, 0, 0, 0.12);
  text-align: center;
}

.cc-empty-text {
  margin: 0;
  font-size: 0.95rem;
}

.cc-empty-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: #14b8a6;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.cc-empty-link:hover {
  color: #2dd4bf;
  text-decoration: underline;
}

.cc-command-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cc-command-list.hidden,
.cc-editor.hidden {
  display: none;
}

.cc-empty-box.hidden {
  display: none;
}

.cc-cmd-meta {
  margin-bottom: 0;
}

.cc-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cc-row-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cc-row-actions button {
  font-size: 0.85rem;
}

/* Tebex Post release */
.tx-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tx-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.tx-page-title {
  margin: 0 0 6px;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tx-page-sub {
  margin: 0;
  font-size: 0.95rem;
  max-width: 62ch;
  line-height: 1.5;
}

.tx-settings-details {
  margin-bottom: 0;
}

.tx-settings-summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}

.tx-settings-summary::-webkit-details-marker {
  display: none;
}

.tx-settings-body {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.tx-release-grid {
  align-items: stretch;
}

.tx-frameworks {
  margin-bottom: 16px;
}

.tx-framework-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 8px;
}

.tx-fw {
  margin: 0;
}

.tx-generated.hidden {
  display: none;
}

.tx-generated textarea[readonly] {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.45;
}

.btn-sm {
  margin-top: 6px;
  padding: 6px 12px;
  font-size: 0.82rem;
}

/* DM Broadcast */
.dm-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dm-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dm-page-title {
  margin: 0 0 6px;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dm-page-sub {
  margin: 0;
  font-size: 0.95rem;
  max-width: 58ch;
  line-height: 1.5;
}

.dm-broadcast-grid {
  align-items: stretch;
}

.dm-progress-status {
  margin: 0 0 14px;
  font-size: 0.95rem;
}

.dm-progress-track {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 18px;
}

.dm-progress-bar {
  height: 100%;
  background: #14b8a6;
  border-radius: 999px;
  transition: width 0.35s ease;
  min-width: 0;
}

.dm-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.dm-stat {
  padding: 14px 12px;
  border-radius: var(--radius);
  background: var(--bg-1);
  border: 1px solid var(--border);
  text-align: center;
}

.dm-stat strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.dm-stat span {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* Giveaways */
.gw-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gw-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.gw-page-title {
  margin: 0 0 4px;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gw-page-sub {
  margin: 0;
  font-size: 0.95rem;
  max-width: 58ch;
}

.gw-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--bg-1);
  border: 1px solid var(--border);
}

.gw-subnav-btn {
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.gw-subnav-btn:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.gw-subnav-btn.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.gw-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gw-view.hidden {
  display: none;
}

.gw-create-hint {
  align-self: stretch;
}

.gw-hint-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.gw-hint-list li + li {
  margin-top: 10px;
}

@media (max-width: 720px) {
  .gw-page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* Support tickets */
.tk-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tk-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.tk-page-title {
  margin: 0 0 4px;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tk-page-sub {
  margin: 0;
  font-size: 0.95rem;
  max-width: 58ch;
}

.tk-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--bg-1);
  border: 1px solid var(--border);
}

.tk-subnav-btn {
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tk-subnav-btn:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.tk-subnav-btn.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.tk-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tk-view.hidden {
  display: none;
}

.tk-panels-list-card {
  margin-bottom: 0;
}

.tk-panels-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.tk-panels-list-head .embed-section-label {
  margin-bottom: 4px;
}

.tk-panels-empty {
  margin: 12px 0 0;
  padding: 20px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  background: rgba(0, 0, 0, 0.1);
}

.tk-builder-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tk-builder-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tk-builder-title {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 600;
}

.tk-edit-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(88, 101, 242, 0.12);
  border: 1px solid rgba(88, 101, 242, 0.25);
  font-size: 0.9rem;
  color: var(--text);
}

.tk-edit-banner.hidden {
  display: none;
}

.tk-embed-fields-block,
.tk-depts-block {
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.tk-depts-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.tk-raw-toggle {
  margin: 0;
  flex-shrink: 0;
}

.tk-post-btn {
  margin-top: 4px;
}

.tk-dept-card {
  background: rgba(0, 0, 0, 0.15);
}

.tk-dept-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

@media (max-width: 720px) {
  .tk-dept-grid {
    grid-template-columns: 1fr;
  }

  .tk-page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
