.dj-page {
  --text-light: #f8fafc;
  --text-muted: #94a3b8;
  --accent-bright: #22d3ee;
  --primary: #7c3aed;
  --gradient-mesh: #071426;
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.38);
  --shadow-md: 0 14px 36px rgba(0, 0, 0, 0.28);
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --dj-blurple: #5865f2;
  --dj-green: #3ba55d;
  --dj-danger: #ed4245;
  --dj-panel: rgba(12, 22, 42, 0.94);
  --dj-panel-soft: rgba(18, 31, 55, 0.78);
  --dj-line: rgba(148, 163, 184, 0.16);
  background: #050a14;
  color: var(--text-light);
}

body.dj-page {
  margin: 0;
}

.dj-page h1,
.dj-page h2,
.dj-page h3 {
  color: #f8fafc;
}

.dj-page button,
.dj-page select,
.dj-page textarea,
.dj-page input {
  font: inherit;
}

.dj-page .btn-primary {
  background: linear-gradient(135deg, var(--dj-blurple), var(--primary));
  border: 1px solid rgba(165, 180, 252, 0.4);
  box-shadow: 0 10px 28px rgba(88, 101, 242, 0.28);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  text-decoration: none;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.dj-page .btn-primary:hover:not(:disabled),
.dj-page .btn-primary:focus-visible {
  background: linear-gradient(135deg, #6875f5, #8b5cf6);
  border-color: rgba(165, 180, 252, 0.8);
  box-shadow: 0 12px 32px rgba(88, 101, 242, 0.4);
  transform: translateY(-1px);
}

.dj-page .btn-primary:focus-visible {
  outline: 3px solid rgba(34, 211, 238, 0.55);
  outline-offset: 3px;
}

.dj-page .btn-primary:disabled {
  background: #26334a;
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: none;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.dj-page [hidden] {
  display: none !important;
}

.eyebrow {
  color: var(--accent-bright);
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}

.dj-hero {
  align-items: center;
  background:
    radial-gradient(circle at 12% 15%, rgba(88, 101, 242, 0.25), transparent 32%),
    radial-gradient(circle at 88% 76%, rgba(34, 211, 238, 0.15), transparent 30%),
    var(--gradient-mesh);
  display: grid;
  gap: clamp(3rem, 8vw, 8rem);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  min-height: 72vh;
  overflow: hidden;
  padding: clamp(5rem, 10vw, 9rem) var(--gutter);
}

.dj-hero-copy {
  margin-left: auto;
  max-width: 650px;
}

.dj-hero h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
  margin-bottom: 1.4rem;
}

.dj-hero-copy > p {
  color: #cbd5e1;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0 1.25rem;
}

.hero-actions a {
  align-items: center;
  display: inline-flex;
}

.dj-hero-copy .trust-note {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.dj-preview {
  background: rgba(5, 10, 20, 0.76);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 22px;
  box-shadow:
    var(--shadow-lg),
    0 0 80px rgba(88, 101, 242, 0.17);
  margin-right: auto;
  max-width: 650px;
  min-height: 390px;
  overflow: hidden;
  transform: perspective(1100px) rotateY(-6deg) rotateX(2deg);
}

.preview-top {
  align-items: center;
  border-bottom: 1px solid var(--dj-line);
  display: flex;
  gap: 0.45rem;
  height: 46px;
  padding: 0 1rem;
}

.preview-top span {
  background: var(--text-muted);
  border-radius: 50%;
  height: 8px;
  opacity: 0.5;
  width: 8px;
}

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

.preview-nav {
  background: rgba(88, 101, 242, 0.08);
  border-right: 1px solid var(--dj-line);
}

.preview-content {
  padding: 2.25rem;
}

.preview-heading,
.preview-panel,
.preview-stats i {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.18), rgba(148, 163, 184, 0.07));
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 10px;
}

.preview-heading {
  height: 26px;
  margin-bottom: 2rem;
  width: 55%;
}

.preview-stats {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(3, 1fr);
}

.preview-stats i {
  height: 66px;
}

.preview-panel {
  height: 130px;
  margin-top: 1rem;
}

.dj-section {
  margin: 0 auto;
  max-width: 1200px;
  padding: clamp(5rem, 9vw, 8rem) var(--gutter);
}

.section-heading {
  margin: 0 auto 3rem;
  max-width: 720px;
  text-align: center;
}

.section-heading h2,
.dj-callout h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.section-heading p,
.dj-callout p {
  color: var(--text-muted);
}

.feature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, 1fr);
}

.feature {
  background: var(--dj-panel-soft);
  border: 1px solid var(--dj-line);
  border-radius: 16px;
  padding: 1.6rem;
}

.feature > span {
  color: var(--accent-bright);
  font-size: 0.8rem;
  font-weight: 800;
}

.feature h3 {
  margin: 1.5rem 0 0.6rem;
}

.feature p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

.dj-callout {
  align-items: center;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.18), rgba(14, 165, 233, 0.08));
  border: 1px solid rgba(88, 101, 242, 0.3);
  border-radius: 24px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 6rem;
}

.dj-callout > div {
  max-width: 680px;
}

.dj-callout .btn-primary {
  flex: 0 0 auto;
}

.dj-footer {
  align-items: center;
  background: #050a14;
  border-top: 1px solid var(--dj-line);
  display: flex;
  justify-content: space-between;
  margin-top: 0;
  padding-inline: var(--gutter);
}

.dj-footer nav {
  display: flex;
  gap: 1.25rem;
}

/* Dashboard */
.dashboard-page {
  min-height: 100vh;
}

.dashboard-header {
  align-items: center;
  background: rgba(5, 10, 20, 0.96);
  border-bottom: 1px solid var(--dj-line);
  display: flex;
  height: 72px;
  justify-content: space-between;
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 30;
}

.dashboard-brand,
.account-button {
  align-items: center;
  color: var(--text-light);
  display: flex;
  gap: 0.75rem;
}

.brand-mark,
.account-avatar {
  align-items: center;
  background: linear-gradient(135deg, var(--dj-blurple), var(--primary));
  border-radius: 12px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.dashboard-brand span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.dashboard-brand small {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.dashboard-actions {
  display: flex;
  gap: 0.7rem;
}

.icon-button,
.account-button,
.help-button,
.text-button {
  background: transparent;
  border: 0;
  color: var(--text-light);
  cursor: pointer;
}

.icon-button {
  border: 1px solid var(--dj-line);
  border-radius: 50%;
  font-weight: 800;
  height: 42px;
  width: 42px;
}

.account-button {
  background: var(--dj-panel-soft);
  border: 1px solid var(--dj-line);
  border-radius: 12px;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
}

.account-avatar {
  border-radius: 9px;
  height: 32px;
  width: 32px;
}

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

.dashboard-sidebar {
  background: #07101f;
  border-right: 1px solid var(--dj-line);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.85rem;
}

.guild-picker {
  border-bottom: 1px solid var(--dj-line);
  padding: 0 0.35rem 1.2rem;
}

.guild-picker label,
.settings-card label,
.settings-card legend {
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 700;
}

.guild-picker select,
.settings-card select,
.settings-card textarea,
.settings-card input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.help-dialog input {
  background: #0b1729;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 9px;
  box-sizing: border-box;
  color: var(--text-light);
  margin-top: 0.45rem;
  padding: 0.7rem 0.75rem;
  width: 100%;
}

.help-dialog-actions {
  align-items: center;
  border-top: 1px solid var(--dj-line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.4rem;
  padding-top: 1rem;
}

.help-dialog-actions .btn-secondary,
.help-dialog-actions .btn-primary {
  min-width: 8.5rem;
}

.settings-card input[type="color"] {
  background: #0b1729;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 9px;
  height: 44px;
  margin-top: 0.45rem;
  padding: 0.25rem;
  width: 100%;
}

.dashboard-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 0;
}

.dashboard-nav button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  gap: 0.75rem;
  padding: 0.72rem 0.85rem;
  text-align: left;
}

.dashboard-nav button span {
  color: #cbd5e1;
  font-weight: 800;
  text-align: center;
  width: 18px;
}

.dashboard-nav button:hover,
.dashboard-nav button.active {
  background: rgba(88, 101, 242, 0.13);
  color: #fff;
}

.dashboard-nav button.active {
  box-shadow: inset 3px 0 var(--dj-blurple);
}

.sidebar-support {
  background: rgba(14, 165, 233, 0.07);
  border: 1px solid rgba(14, 165, 233, 0.16);
  border-radius: 12px;
  margin-top: auto;
  padding: 1rem;
}

.sidebar-support p {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.text-button {
  color: var(--accent-bright);
  font-size: 0.78rem;
  padding: 0;
}

.dashboard-main {
  background:
    radial-gradient(circle at top right, rgba(88, 101, 242, 0.08), transparent 30%), #08111f;
  min-width: 0;
  padding: clamp(1.25rem, 4vw, 3rem);
}

.connection-banner,
.notice {
  align-items: center;
  background: rgba(88, 101, 242, 0.1);
  border: 1px solid rgba(88, 101, 242, 0.28);
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  margin: 0 auto 1.5rem;
  max-width: 1200px;
  padding: 1rem 1.2rem;
}

.connection-banner p,
.notice p {
  color: var(--text-muted);
  font-size: 0.86rem;
  margin: 0.2rem 0 0;
}

.connection-banner.connected {
  background: rgba(59, 165, 93, 0.09);
  border-color: rgba(59, 165, 93, 0.28);
}

.dashboard-edit-actions {
  align-items: center;
  background: rgba(8, 17, 31, 0.96);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 12px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.3);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin: 0 auto 1.5rem;
  max-width: 1200px;
  padding: 0.8rem 1rem;
  position: sticky;
  top: 76px;
  z-index: 18;
}

.dashboard-edit-actions > span {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-right: auto;
}

.btn-secondary {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.32);
  color: var(--text-light);
  cursor: pointer;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(34, 211, 238, 0.55);
}

.compact {
  border-radius: 9px;
  font-size: 0.82rem;
  padding: 0.7rem 1rem;
}

.dashboard-panel {
  display: none;
  margin: 0 auto;
  max-width: 1200px;
}

.dashboard-panel.active {
  display: block;
}

.panel-heading,
.card-heading {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
}

.panel-heading {
  gap: 2rem;
  margin-bottom: 1.7rem;
}

.panel-heading h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.65rem;
}

.panel-heading p,
.card-heading p {
  color: var(--text-muted);
  margin: 0;
}

.help-button {
  border: 1px solid var(--dj-line);
  border-radius: 9px;
  color: var(--accent-bright);
  flex: 0 0 auto;
  font-size: 0.8rem;
  padding: 0.65rem 0.8rem;
}

.status-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 1rem;
}

.status-card,
.settings-card {
  background: var(--dj-panel);
  border: 1px solid var(--dj-line);
  border-radius: 14px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
}

.status-card {
  min-height: 96px;
  padding: 1.15rem;
  position: relative;
}

.status-card small {
  color: var(--text-muted);
  display: block;
  font-size: 0.72rem;
  margin-bottom: 0.5rem;
}

.status-card strong {
  display: block;
  font-size: 0.95rem;
}

.status-dot {
  background: var(--dj-green);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(59, 165, 93, 0.5);
  height: 7px;
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 7px;
}

.status-dot.neutral {
  background: #64748b;
  box-shadow: none;
}

.settings-card {
  padding: 1.35rem;
}

.settings-card > * + * {
  margin-top: 1.15rem;
}

.settings-card > .card-heading + * {
  margin-top: 1.25rem;
}

.settings-card > label {
  display: grid;
  gap: 0.5rem;
}

.settings-card h2 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.progress-label,
.save-state {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.progress-track {
  background: rgba(148, 163, 184, 0.1);
  border-radius: 20px;
  height: 7px;
  margin: 1.25rem 0;
  overflow: hidden;
}

.progress-track span {
  background: linear-gradient(90deg, var(--dj-blurple), var(--accent-bright));
  display: block;
  height: 100%;
  width: 0;
}

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

.setup-list li {
  align-items: center;
  border-top: 1px solid var(--dj-line);
  display: flex;
  gap: 0.9rem;
  padding: 0.85rem 0 0.35rem;
}

.setup-list li[data-target-panel] {
  cursor: pointer;
}

.configuration-overview {
  margin-top: 1.25rem;
}

.overview-section-heading {
  align-items: flex-end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.overview-section-heading h2,
.overview-section-heading p {
  margin: 0;
}

.overview-section-heading p,
.overview-section-heading > span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

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

.configuration-card {
  background: var(--dj-panel);
  border: 1px solid var(--dj-line);
  border-radius: 14px;
  color: var(--text-light);
  cursor: pointer;
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  padding: 1.15rem;
  text-align: left;
  transition:
    border-color 0.18s ease,
    transform 0.18s ease;
}

.configuration-card:hover,
.configuration-card:focus-visible {
  border-color: rgba(34, 211, 238, 0.55);
  transform: translateY(-1px);
}

.configuration-card b {
  color: var(--accent-bright);
  font-size: 0.9rem;
}

.configuration-card small {
  color: var(--text-muted);
  line-height: 1.5;
}

.configuration-state {
  border-radius: 999px;
  font-size: 0.66rem;
  justify-self: start;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.45rem;
  text-transform: uppercase;
}

.configuration-state.ready {
  background: rgba(59, 165, 93, 0.12);
  color: #86efac;
}

.configuration-state.optional {
  background: rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
}

.setup-list li[data-target-panel]:hover {
  background: rgba(88, 101, 242, 0.07);
}

.setup-list li.complete {
  opacity: 0.72;
}

.setup-list li.complete > span {
  background: rgba(59, 165, 93, 0.2);
  color: #86efac;
}

.setup-list li > span {
  align-items: center;
  background: rgba(88, 101, 242, 0.14);
  border-radius: 50%;
  color: #a5b4fc;
  display: flex;
  font-size: 0.75rem;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.setup-list small,
.field-help,
.checkbox-setting small,
.capability-grid small,
.group-row small,
.form-grid label > small {
  color: var(--text-muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
}

.notice {
  display: block;
}

.notice.safe {
  background: rgba(59, 165, 93, 0.08);
  border-color: rgba(59, 165, 93, 0.24);
}

.split-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(280px, 0.75fr) minmax(400px, 1.25fr);
}

.group-list {
  display: grid;
  gap: 0.4rem;
  margin-top: 1rem;
}

.group-tools {
  border-bottom: 1px solid var(--dj-line);
  margin-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.group-row {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-light);
  cursor: pointer;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: auto 38px minmax(0, 1fr) auto;
  padding: 0.7rem;
  text-align: left;
}

.group-row.dragging {
  opacity: 0.45;
}

.group-row.drag-over {
  border-color: var(--accent-bright);
}

.group-radio,
.choice-row input,
.radio-choices input {
  accent-color: var(--dj-blurple);
  flex: 0 0 auto;
  height: 1rem;
  width: 1rem;
}

.group-row:has(.group-radio:checked) {
  background: rgba(88, 101, 242, 0.09);
  border-color: rgba(88, 101, 242, 0.24);
}

.field-label {
  color: #cbd5e1;
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.choice-list {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  max-height: 220px;
  overflow: auto;
}

.choice-list > p {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin: 0;
}

.choice-row {
  align-items: center;
  background: rgba(148, 163, 184, 0.045);
  border: 1px solid var(--dj-line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 0.65rem;
  padding: 0.65rem 0.7rem;
}

.choice-row:has(input:checked) {
  background: rgba(88, 101, 242, 0.12);
  border-color: rgba(88, 101, 242, 0.32);
}

.group-row:hover,
.group-row.selected {
  background: rgba(88, 101, 242, 0.09);
  border-color: rgba(88, 101, 242, 0.24);
}

.group-icon {
  align-items: center;
  background: #15233a;
  border-radius: 9px;
  color: #a5b4fc;
  display: flex;
  font-size: 0.68rem;
  font-weight: 800;
  height: 38px;
  justify-content: center;
}

.group-row em {
  color: var(--text-muted);
  font-size: 0.65rem;
  font-style: normal;
}

.permission-editor fieldset {
  border: 0;
  border-top: 1px solid var(--dj-line);
  margin: 1.2rem 0 0;
  padding: 1.1rem 0 0;
}

.editor-tabs {
  border-bottom: 1px solid var(--dj-line);
  display: flex;
  gap: 0.3rem;
  margin-top: 1.25rem;
  overflow-x: auto;
}

.editor-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.75rem 0.8rem;
  white-space: nowrap;
}

.editor-tabs button.active {
  border-bottom-color: var(--dj-blurple);
  color: #fff;
}

.editor-tab-panel {
  display: none;
}

.editor-tab-panel.active {
  display: block;
}

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

.discord-permission-grid .choice-row {
  align-items: flex-start;
}

.discord-permission-grid .danger-choice {
  border-color: rgba(237, 66, 69, 0.28);
}

.danger-zone {
  border-top: 1px solid rgba(237, 66, 69, 0.28);
  margin-top: 1.25rem;
  padding-top: 1rem;
}

.danger-zone p {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.btn-danger {
  background: var(--dj-danger);
  border: 0;
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.permission-editor select[multiple] {
  min-height: 110px;
}

.capability-grid {
  display: grid;
  gap: 0.55rem;
}

.capability-group {
  background: rgba(6, 15, 30, 0.45);
  border: 1px solid var(--dj-line);
  border-radius: 12px;
  overflow: hidden;
}

.capability-group summary {
  cursor: pointer;
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
}

.capability-group summary small {
  color: var(--text-muted);
  font-weight: 400;
}

.capability-group-rows {
  border-top: 1px solid var(--dj-line);
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0.75rem;
}

.role-member-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.role-member-summary span {
  background: rgba(88, 101, 242, 0.14);
  border: 1px solid rgba(88, 101, 242, 0.3);
  border-radius: 999px;
  color: #e0e7ff;
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
}

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

.command-group-card {
  background: var(--dj-panel-soft);
  border: 1px solid var(--dj-line);
  border-radius: 14px;
  padding: 1rem;
}

.command-group-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.command-group-heading h2 {
  margin: 0;
}

.command-group-heading span {
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  color: var(--accent-bright);
  font-size: 0.72rem;
  padding: 0.3rem 0.55rem;
}

.command-group-card > p,
.command-group-card li small {
  color: var(--text-muted);
}

.command-group-card ul {
  display: grid;
  gap: 0.5rem;
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
}

.command-group-card li {
  border-top: 1px solid var(--dj-line);
  display: grid;
  gap: 0.15rem;
  padding-top: 0.5rem;
}

.capability-tools {
  align-items: center;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  margin-bottom: 0.75rem;
}

.capability-tools input {
  background: #0b1729;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 9px;
  color: var(--text-light);
  padding: 0.7rem 0.75rem;
}

.capability-grid label[hidden] {
  display: none;
}

.capability-choice,
.checkbox-setting {
  align-items: flex-start;
  background: rgba(148, 163, 184, 0.045);
  border: 1px solid var(--dj-line);
  border-radius: 9px;
  display: flex;
  gap: 0.65rem;
  padding: 0.75rem;
}

.capability-choice {
  display: grid;
  gap: 0.65rem;
}

.radio-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.radio-choices label {
  align-items: center;
  border: 1px solid var(--dj-line);
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  font-size: 0.72rem;
  gap: 0.35rem;
  padding: 0.4rem 0.5rem;
}

.radio-choices label:has(input:checked) {
  background: rgba(88, 101, 242, 0.14);
  border-color: rgba(88, 101, 242, 0.34);
  color: #fff;
}

.capability-grid label span {
  color: #e2e8f0;
  font-size: 0.84rem;
  font-weight: 650;
}

.capability-grid label select {
  min-width: 105px;
}

.capability-grid input,
.checkbox-setting input {
  accent-color: var(--dj-blurple);
  margin-top: 0.25rem;
}

.form-actions {
  align-items: center;
  border-top: 1px solid var(--dj-line);
  display: flex;
  justify-content: space-between;
  margin-top: 1.2rem;
  padding-top: 1rem;
}

.audit-list {
  display: grid;
  gap: 0.7rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.audit-list li {
  background: rgba(148, 163, 184, 0.045);
  border: 1px solid var(--dj-line);
  border-radius: 9px;
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
}

.audit-list strong {
  color: #e2e8f0;
  text-transform: capitalize;
}

.audit-list small {
  color: var(--text-muted);
}

.settings-stack {
  display: grid;
  gap: 0.75rem;
}

.setting-toggle {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.setting-toggle p,
.settings-card > p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.setting-toggle p {
  margin: 0;
}

.switch {
  align-items: center;
  display: flex;
  gap: 0.6rem;
}

.switch input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.switch span {
  background: #26364f;
  border-radius: 20px;
  cursor: pointer;
  display: block;
  height: 24px;
  position: relative;
  width: 44px;
}

.switch span::after {
  background: #fff;
  border-radius: 50%;
  content: "";
  height: 18px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: transform 0.18s ease;
  width: 18px;
}

.switch input:checked + span {
  background: var(--dj-green);
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.switch em {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-style: normal;
  width: 22px;
}

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

.form-grid label {
  display: grid;
  gap: 0.5rem;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.checkbox-setting {
  align-items: center;
}

.empty-state {
  color: var(--text-muted);
  padding: 4rem 1rem;
  text-align: center;
}

.empty-state strong {
  color: var(--text-light);
}

.help-dialog {
  background: #0b1729;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 16px;
  color: var(--text-light);
  max-width: 580px;
  padding: 0;
  width: calc(100% - 2rem);
}

.help-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
}

.help-dialog form {
  padding: 1.7rem;
  position: relative;
}

.help-dialog h2 {
  margin-bottom: 0.75rem;
}

.help-dialog p,
.help-dialog li {
  color: #cbd5e1;
  font-size: 0.9rem;
}

.help-dialog label {
  color: #cbd5e1;
  display: grid;
  font-size: 0.82rem;
  font-weight: 700;
  gap: 0.45rem;
}

.help-dialog input {
  background: #071426;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 9px;
  color: var(--text-light);
  padding: 0.72rem;
}

.account-dialog-actions {
  align-items: center;
  border-top: 1px solid var(--dj-line);
  display: flex;
  justify-content: flex-end;
  margin-top: 1.25rem;
  padding-top: 1rem;
}

.dialog-close {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.7rem;
  position: absolute;
  right: 1rem;
  top: 0.65rem;
}

.guide-shell {
  margin: 0 auto;
  max-width: 1120px;
  padding: clamp(3rem, 7vw, 6rem) var(--gutter);
}

.guide-hero {
  max-width: 800px;
}

.guide-hero h1 {
  font-size: clamp(2.7rem, 7vw, 5rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.guide-hero > p,
.guide-section > p {
  color: #cbd5e1;
  max-width: 850px;
}

.guide-toc {
  background: rgba(7, 20, 38, 0.88);
  border: 1px solid var(--dj-line);
  border-radius: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 3rem 0;
  padding: 0.8rem;
  position: sticky;
  top: 1rem;
  z-index: 5;
}

.guide-toc a {
  border-radius: 8px;
  color: #cbd5e1;
  padding: 0.55rem 0.75rem;
  text-decoration: none;
}

.guide-toc a:hover,
.guide-toc a:focus-visible {
  background: rgba(88, 101, 242, 0.18);
  color: #fff;
}

.guide-section {
  border-top: 1px solid var(--dj-line);
  padding: 4.5rem 0 1rem;
  scroll-margin-top: 5rem;
}

.guide-section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.035em;
}

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

.guide-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-grid article,
.guide-note,
.guide-section details {
  background: var(--dj-panel-soft);
  border: 1px solid var(--dj-line);
  border-radius: 14px;
  padding: 1.25rem;
}

.guide-grid h3,
.guide-grid p {
  margin: 0;
}

.guide-grid p,
.guide-steps,
.guide-note,
.guide-section details p {
  color: #cbd5e1;
}

.guide-steps {
  display: grid;
  gap: 0.85rem;
  padding-left: 1.4rem;
}

.guide-note {
  border-color: rgba(34, 211, 238, 0.3);
  margin: 1.5rem 0;
}

.guide-page code {
  background: #071426;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 5px;
  color: #c4b5fd;
  padding: 0.12rem 0.35rem;
}

.command-table {
  overflow-x: auto;
}

.command-table table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

.command-table th,
.command-table td {
  border-bottom: 1px solid var(--dj-line);
  padding: 1rem;
  text-align: left;
  vertical-align: top;
}

.guide-section details {
  margin: 0.7rem 0;
}

.guide-section summary {
  cursor: pointer;
  font-weight: 700;
}

.demo-journey {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.18), rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: 16px;
  margin-bottom: 1.25rem;
  padding: 1.5rem;
}

.demo-journey h2,
.demo-journey p {
  margin-top: 0;
}

.demo-journey p {
  color: #cbd5e1;
}

.demo-journey-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0;
}

.demo-journey-actions button {
  background: rgba(7, 20, 38, 0.75);
  border: 1px solid var(--dj-line);
  border-radius: 9px;
  color: #e2e8f0;
  cursor: pointer;
  padding: 0.65rem 0.8rem;
}

.demo-journey-actions button:hover,
.demo-journey-actions button:focus-visible {
  border-color: var(--accent-bright);
}

@media (max-width: 760px) {
  .guide-grid,
  .guide-grid.three {
    grid-template-columns: 1fr;
  }

  .guide-toc {
    position: static;
  }
}

.toast {
  background: #15233a;
  border: 1px solid var(--dj-line);
  border-radius: 10px;
  bottom: 1rem;
  box-shadow: var(--shadow-md);
  color: var(--text-light);
  opacity: 0;
  padding: 0.75rem 1rem;
  pointer-events: none;
  position: fixed;
  right: 1rem;
  transform: translateY(8px);
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 50;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.bootstrap-mode .sidebar-support {
  display: none;
}

.setup-workspace {
  margin: 0 auto;
  max-width: 980px;
}

.setup-stepper {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 1rem;
}

.setup-stepper span {
  border-bottom: 3px solid var(--dj-line);
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 0.65rem 0.2rem;
}

.setup-stepper span.active {
  border-color: var(--dj-blurple);
  color: var(--text-light);
}

.setup-stepper span.complete {
  border-color: #22c55e;
  color: #86efac;
}

.setup-stage {
  display: none;
}

.setup-stage.active {
  display: block;
}

.setup-preset-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.2rem;
}

.setup-preset-grid label {
  align-items: flex-start;
  border: 1px solid var(--dj-line);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
}

.setup-preset-grid label:has(input:checked) {
  background: rgba(88, 101, 242, 0.1);
  border-color: var(--dj-blurple);
}

.setup-preset-grid small,
.setup-preset-grid strong {
  display: block;
}

.setup-preset-grid small {
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.setup-import,
.setup-confirm {
  margin-top: 1.25rem;
}

.setup-actions {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.legal-page {
  margin: 0 auto;
  max-width: 860px;
  padding: clamp(4rem, 8vw, 7rem) var(--gutter);
}

.legal-page > header {
  border-bottom: 1px solid var(--dj-line);
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
}

.legal-page h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: -0.045em;
}

.legal-page h2 {
  font-size: 1.35rem;
  margin: 2.4rem 0 0.75rem;
}

.legal-page p,
.legal-page li {
  color: #cbd5e1;
}

.legal-page .updated {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.legal-page .legal-note {
  background: rgba(14, 165, 233, 0.07);
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 12px;
  padding: 1rem 1.2rem;
}

@media (max-width: 1050px) {
  .feature-grid,
  .status-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .split-layout {
    grid-template-columns: 1fr;
  }
}

.offering-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.offering-list-item {
  background: var(--dj-panel-soft);
  border: 1px solid var(--dj-line);
  border-radius: 0.8rem;
  color: var(--text-light);
  display: flex;
  gap: 0.25rem;
  padding: 0.85rem;
  text-align: left;
}

.offering-select {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: grid;
  flex: 1;
  gap: 0.25rem;
  min-width: 0;
  text-align: left;
}

.offering-order-controls {
  align-items: center;
  display: flex;
  gap: 0.35rem;
}

.offering-order-controls button {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--dj-line);
  border-radius: 7px;
  color: var(--text-light);
  cursor: pointer;
  height: 32px;
  width: 32px;
}

.offering-list-item.active,
.offering-list-item:hover {
  border-color: var(--dj-blurple);
}

.offering-list-item small {
  color: var(--text-muted);
}

.offering-actions {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.offering-update {
  border-top: 1px solid var(--dj-line);
  display: grid;
  gap: 0.75rem;
  padding-top: 1rem;
}

.intake-workspace {
  margin-top: 1rem;
}

.intake-list {
  display: grid;
  gap: 0.75rem;
}

.intake-card {
  background: var(--dj-panel-soft);
  border: 1px solid var(--dj-line);
  border-radius: 10px;
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
}

.intake-card p,
.intake-card small {
  color: var(--text-muted);
  margin: 0;
}

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

@media (max-width: 760px) {
  .dj-hero {
    grid-template-columns: 1fr;
    padding-top: 5rem;
  }

  .dj-preview {
    margin: 0 auto;
    min-height: 300px;
    transform: none;
  }

  .feature-grid,
  .status-grid,
  .form-grid,
  .configuration-grid {
    grid-template-columns: 1fr;
  }

  .overview-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .intake-controls {
    grid-template-columns: 1fr;
  }

  .dj-callout,
  .dj-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.4rem;
  }

  .dashboard-header {
    height: 64px;
  }

  .account-button > span:last-child {
    display: none;
  }

  .dashboard-shell {
    display: block;
  }

  .dashboard-sidebar {
    border-bottom: 1px solid var(--dj-line);
    border-right: 0;
    padding: 0.65rem;
    position: sticky;
    top: 64px;
    z-index: 20;
  }

  .guild-picker {
    padding-bottom: 0.65rem;
  }

  .dashboard-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 0.6rem 0 0;
  }

  .dashboard-nav button {
    flex: 0 0 auto;
    padding: 0.6rem 0.75rem;
  }

  .dashboard-nav button span,
  .sidebar-support {
    display: none;
  }

  .dashboard-nav button.active {
    box-shadow: inset 0 -3px var(--dj-blurple);
  }

  .dashboard-main {
    padding: 1.1rem;
  }

  .connection-banner,
  .dashboard-edit-actions,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-edit-actions {
    align-items: stretch;
    top: 132px;
  }

  .dashboard-edit-actions > span {
    margin-right: 0;
  }

  .capability-grid,
  .capability-group-rows,
  .command-group-grid,
  .discord-permission-grid {
    grid-template-columns: 1fr;
  }

  .capability-tools {
    grid-template-columns: 1fr;
  }

  .setup-preset-grid,
  .setup-stepper {
    grid-template-columns: 1fr;
  }
}

.platform-command-picker {
  margin: 1rem 0;
}

.install-card {
  align-items: center;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.install-card > div {
  max-width: 52rem;
}

.install-card .btn-primary {
  flex: 0 0 auto;
  margin-top: 0;
}

.installed-guild-list {
  display: grid;
  gap: 0.75rem;
}

.installed-guild-row {
  align-items: center;
  background: var(--dj-panel-soft);
  border: 1px solid var(--dj-line);
  border-radius: 10px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.9rem 1rem;
}

.installed-guild-row small {
  color: var(--text-muted);
  display: block;
  margin-top: 0.25rem;
}

.platform-command-picker .choice-list {
  max-height: 24rem;
  overflow-y: auto;
}

.platform-grant-group {
  overflow: hidden;
  border: 1px solid var(--dj-line);
  border-radius: 0.9rem;
  background: var(--dj-panel-soft);
}

.platform-grant-group + .platform-grant-group {
  margin-top: 0.8rem;
}

.platform-grant-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--dj-line);
}

.platform-grant-heading small {
  color: var(--text-muted);
  white-space: nowrap;
}

.platform-grant-commands .capability-row {
  border: 0;
  border-radius: 0;
}

.platform-grant-commands .capability-row + .capability-row {
  border-top: 1px solid var(--dj-line);
}

@media (prefers-reduced-motion: reduce) {
  .dj-page *,
  .dj-page *::before,
  .dj-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 760px) {
  .install-card {
    align-items: stretch;
    flex-direction: column;
  }

  .installed-guild-row {
    align-items: stretch;
    flex-direction: column;
  }
}
