/* Self-contained: no font, icon, or framework downloads are required. */
:root {
  --bg: #fff;
  --surface: #fff;
  --soft: #f7f7f7;
  --hover: #ececec;
  --line: #e2e2e2;
  --text: #0a0a0a;
  --muted: #757575;
  --accent: #111;
  --accent-hover: #333;
  --tint: #ececec;
  --accent-text: #fff;
  --danger: #b43b40;
  --danger-bg: #fff1f1;
  --warning: #89590f;
  --warning-bg: #fff7e8;
  --shadow: 0 10px 40px #0002;
  --radius: 14px;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #0c0c0c;
  --surface: #0c0c0c;
  --soft: #151515;
  --hover: #242424;
  --line: #2c2c2c;
  --text: #f2f2f2;
  --muted: #8e8e8e;
  --accent: #f2f2f2;
  --accent-hover: #d8d8d8;
  --tint: #242424;
  --accent-text: #0c0c0c;
  --danger: #ff9a9e;
  --danger-bg: #3b2328;
  --warning: #f3ca83;
  --warning-bg: #342d22;
  --shadow: 0 10px 40px #000a;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body,
h1,
h2,
h3,
p {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
body {
  font:
    14px/1.55 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
h1 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1px;
}
h2 {
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -0.25px;
}
h3 {
  font-size: 14px;
  line-height: 1.45;
}
p {
  color: var(--muted);
}
small,
.small {
  font-size: 12px;
}
b,
strong {
  font-weight: 650;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
h1:focus {
  outline: none;
}
.icon {
  width: 18px;
  height: 18px;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.muted {
  color: var(--muted);
}
.accent {
  color: var(--accent);
}
.spacer {
  flex: 1;
}
.nowrap {
  white-space: nowrap;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 8px;
}
.skip:focus {
  top: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 39px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.5;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.btn:hover:not(:disabled) {
  background: var(--hover);
  border-color: var(--muted);
}
.btn.primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}
.btn.primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
}
.btn.ghost:hover:not(:disabled) {
  background: var(--hover);
  border-color: transparent;
}
.btn.danger {
  color: var(--danger);
  border-color: var(--danger);
}
.btn.danger:hover {
  background: var(--danger-bg);
}
.btn.icon-only {
  padding: 8px;
  min-width: 38px;
}
.btn.sm {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 12px;
}
.btn .icon {
  width: 16px;
  height: 16px;
}
.text-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.text-link:hover {
  text-decoration: underline;
}
.shell {
  min-height: 100dvh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 242px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 27px 16px 16px;
  z-index: 30;
  overflow: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.6px;
  padding: 0 9px 26px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-text);
}
.brand-mark .icon {
  width: 21px;
  height: 21px;
}
.workspace-select {
  padding: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 24px;
}
.workspace-select label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--muted);
  margin-bottom: 5px;
}
.workspace-select select {
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  width: 100%;
  border: 0;
  color: var(--text);
  padding: 2px 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-title {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  padding: 21px 12px 8px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 2px 0;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
}
.nav-link:hover {
  background: var(--soft);
  color: var(--text);
}
.nav-link.active {
  background: var(--tint);
  color: var(--accent);
  font-weight: 650;
}
.nav-link.module {
  padding-left: 17px;
}
.nav-link.module .icon {
  width: 15px;
  height: 15px;
}
.nav-divider {
  border-top: 1px solid var(--line);
  margin: 18px 8px 8px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
}
.wallet-mini {
  padding: 14px;
  border-radius: 10px;
  background: var(--soft);
  margin-bottom: 12px;
}
.wallet-mini span {
  font-size: 11px;
  color: var(--muted);
}
.wallet-mini strong {
  display: block;
  font-size: 19px;
  letter-spacing: -0.5px;
  margin-top: 3px;
}
.wallet-mini .icon {
  float: right;
  color: var(--accent);
}
.user-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.user-copy {
  flex: 1;
  min-width: 0;
}
.user-copy b {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}
.user-copy small {
  color: var(--muted);
  font-size: 10px;
}
.avatar {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--tint);
  color: var(--accent);
  font-weight: 700;
}
.main {
  margin-left: 242px;
  min-height: 100dvh;
}
.topbar {
  height: 69px;
  padding: 0 38px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
}
.breadcrumb a:hover {
  color: var(--accent);
}
.breadcrumb .current {
  color: var(--text);
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.top-wallet {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.top-wallet .icon {
  color: var(--accent);
  width: 16px;
  height: 16px;
}
.content {
  width: 100%;
  max-width: 1290px;
  margin: 0 auto;
  padding: 35px 38px 120px;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 26px;
}
.page-header p {
  margin-top: 7px;
  font-size: 13px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 9px;
}
.title-icon {
  display: flex;
  align-items: center;
  gap: 15px;
}
.server-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--tint);
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  flex: none;
}
.server-icon.large {
  width: 55px;
  height: 55px;
}

.mobile-menu,
.sidebar-close {
  display: none;
}
.scrim {
  display: none;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat {
  padding: 19px 21px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.stat-label .icon {
  color: var(--muted);
  width: 17px;
  height: 17px;
}
.stat-value {
  display: flex;
  gap: 7px;
  align-items: baseline;
  font-size: 28px;
  letter-spacing: -1px;
  font-weight: 700;
  margin-top: 8px;
}
.stat-value small {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}
.stat p {
  font-size: 11px;
  margin-top: 2px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 16px;
}
.section-heading p {
  font-size: 12px;
  margin-top: 4px;
}
.count-badge {
  font-size: 11px;
  font-weight: 550;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  margin-left: 8px;
  vertical-align: middle;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 19px;
  flex-wrap: wrap;
}
.toolbar .search {
  flex: 1;
  min-width: 180px;
  max-width: 360px;
}
.search {
  position: relative;
}
.search > .icon {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}
.search input {
  padding-left: 37px;
}
.segmented {
  display: flex;
  gap: 3px;
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: 8px;
}
.segmented button {
  border: 0;
  background: transparent;
  border-radius: 5px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
}
.segmented button[aria-pressed='true'] {
  background: var(--surface);
  box-shadow: 0 1px 3px #0001;
  color: var(--text);
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
}
.bot-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
}
.bot-card:hover {
  border-color: var(--accent);
  box-shadow: 0 5px 18px #0000000f;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  margin-bottom: 17px;
}
.bot-card h3 {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.bot-card p {
  font-size: 12px;
  margin-top: 3px;
}
.bot-card .module-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 16px;
  margin-bottom: 20px;
}
.mini-tag {
  font-size: 10px;
  padding: 3px 7px;
  background: var(--soft);
  color: var(--muted);
  border-radius: 5px;
}
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: auto;
  font-size: 11px;
  color: var(--muted);
}
.card-footer strong {
  color: var(--text);
  font-size: 12px;
}
.card-footer .icon {
  color: var(--accent);
  width: 17px;
  height: 17px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  background: var(--tint);
  color: var(--accent);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.5;
  padding: 4px 8px;
  white-space: nowrap;
}
.status::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.status.paused {
  color: var(--warning);
  background: var(--warning-bg);
}
.status.neutral {
  color: var(--muted);
  background: var(--soft);
}
.new-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-style: dashed;
  background: transparent;
  text-align: center;
  gap: 12px;
  min-height: 235px;
}
.new-card .server-icon {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
}
.new-card:hover {
  border-color: var(--accent);
  background: var(--tint);
}
.new-card p {
  font-size: 12px;
  max-width: 180px;
}
.info-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
.info-block {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.info-block > .icon {
  color: var(--accent);
  margin-top: 2px;
}
.info-block p {
  font-size: 12px;
  margin-top: 5px;
}
.info-block .text-link {
  margin-top: 12px;
  font-size: 12px;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.module-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 19px;
}
.module-card:hover {
  border-color: var(--accent);
}
.module-card .module-symbol {
  width: 40px;
  height: 40px;
  background: var(--soft);
  color: var(--accent);
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
}
.module-card p {
  font-size: 12px;
  margin-top: 3px;
}
.module-card > .icon:last-child {
  margin-left: auto;
  color: var(--muted);
  width: 15px;
}
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(250px, 1fr);
  gap: 22px;
}
.two-column > *,
.two-column > .stack > * {
  min-width: 0;
}
.admin-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}
.admin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.admin-row:last-child {
  border-bottom: 0;
}
.admin-copy {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.admin-copy strong,
.admin-copy small {
  display: block;
}
.admin-copy small {
  color: var(--muted);
}
.admin-form {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}
.admin-form label {
  font-size: 12px;
  font-weight: 600;
}
.admin-form .btn {
  justify-self: start;
}
.admin-error {
  color: var(--danger);
  font-size: 12px;
}
.kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.kv:last-child {
  border-bottom: 0;
}
.kv dt {
  color: var(--muted);
}
.kv dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
  min-width: 0;
  font-weight: 550;
}
.kv.large {
  padding-top: 16px;
  font-size: 14px;
}
.kv.large dd {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
dl {
  margin: 10px 0 0;
}
.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 9px;
  background: var(--tint);
  color: var(--accent);
  font-size: 12px;
  margin-bottom: 20px;
}
.notice p {
  color: inherit;
}
.notice > .icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}
.notice.warning {
  background: var(--warning-bg);
  color: var(--warning);
}
.notice.error {
  background: var(--danger-bg);
  color: var(--danger);
}
.notice .btn {
  margin-left: auto;
}
.blank {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  padding: 55px 24px;
  gap: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.blank > .icon {
  width: 30px;
  height: 30px;
  color: var(--muted);
}
.blank p {
  font-size: 13px;
  max-width: 440px;
}
.blank h2 {
  font-size: 18px;
}
.blank .btn {
  margin-top: 6px;
}
.input {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  transition: border-color 0.15s;
}
.input:hover:not(:disabled) {
  border-color: var(--muted);
}
.input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.input::placeholder {
  color: var(--muted);
  opacity: 0.85;
}
.input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--soft);
}
textarea.input {
  resize: vertical;
  min-height: 99px;
}
input[type='checkbox'],
input[type='radio'],
input[type='range'] {
  accent-color: var(--accent);
}
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 225px;
  gap: 25px;
  align-items: start;
}
.settings-help {
  position: sticky;
  top: 24px;
  font-size: 12px;
}
.settings-help h3 {
  font-size: 12px;
  margin-bottom: 6px;
}
.settings-help p {
  margin-bottom: 18px;
  line-height: 1.7;
}
.settings-help code {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 4px;
  color: var(--accent);
  font-size: 11px;
}
.settings-help a {
  display: block;
  color: var(--muted);
  padding: 7px 10px;
  border-left: 2px solid var(--line);
  font-size: 12px;
}
.settings-help a:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.settings-section {
  padding: 0;
  overflow: hidden;
  scroll-margin-top: 24px;
}
.settings-section-header {
  padding: 19px 23px;
  border-bottom: 1px solid var(--line);
}
.settings-section-header p {
  font-size: 12px;
  margin-top: 4px;
}
.field {
  padding: 21px 23px;
  display: grid;
  grid-template-columns: minmax(135px, 0.95fr) minmax(0, 1.2fr);
  gap: 18px;
  border-bottom: 1px solid var(--line);
}
.field:last-child {
  border-bottom: 0;
}
.field-label {
  font-size: 13px;
  font-weight: 600;
  display: block;
}
.field-description {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.65;
}
.field-control {
  min-width: 0;
}
.field-error {
  color: var(--danger);
  font-size: 11px;
  margin-top: 7px;
}
.field-note {
  color: var(--warning);
  font-size: 11px;
  margin-top: 7px;
}
.field.has-error {
  background: var(--danger-bg);
}
.field.has-error .input {
  border-color: var(--danger);
}
.field.dirty .field-label::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 7px;
  vertical-align: middle;
}
.field.vertical {
  grid-template-columns: 1fr;
  gap: 9px;
  padding: 0;
  border: 0;
}
.field.vertical.has-error {
  background: none;
}
.toggle-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
}
.switch {
  position: relative;
  width: 37px;
  height: 22px;
  min-width: 37px;
  border: 0;
  border-radius: 20px;
  background: var(--muted);
  padding: 0;
}
.switch::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}
.switch[aria-checked='true'] {
  background: var(--accent);
}
.switch[aria-checked='true']::after {
  transform: translateX(15px);
  background: var(--accent-text);
}
.toggle-line span {
  font-size: 12px;
  color: var(--muted);
}
.range-control {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 40px;
}
.range-control input {
  width: 100%;
  min-width: 0;
}
.range-control output {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-width: 38px;
  text-align: center;
  font-size: 12px;
  padding: 4px 6px;
  background: var(--surface);
}
.list-input {
  display: flex;
  align-items: center;
  gap: 7px;
}
.list-input .input {
  min-width: 0;
}
.chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.chips:empty {
  display: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--soft);
  border: 1px solid var(--line);
  font-size: 11px;
  border-radius: 6px;
  padding: 3px 5px 3px 8px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.chip button {
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  padding: 2px;
  color: var(--muted);
}
.chip button .icon {
  width: 12px;
  height: 12px;
}
.multi-picker {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.multi-picker .search input {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.multi-options {
  max-height: 150px;
  overflow: auto;
  padding: 5px;
}
.multi-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 5px;
  cursor: pointer;
}
.multi-option:hover {
  background: var(--soft);
}
.multi-option input {
  margin: 0;
  width: 14px;
  height: 14px;
  flex: none;
}
.multi-empty {
  padding: 10px;
  font-size: 11px;
  color: var(--muted);
}
.radio-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.radio-option {
  display: flex;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 11px;
  font-size: 12px;
  cursor: pointer;
}
.radio-option:has(:checked) {
  border-color: var(--accent);
  background: var(--tint);
  color: var(--accent);
}
.radio-option input {
  margin: 0;
}
.save-bar {
  position: fixed;
  bottom: 22px;
  left: calc(242px + 38px);
  right: 38px;
  max-width: 1214px;
  margin: 0 auto;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: var(--shadow);
}
.save-copy {
  flex: 1;
  min-width: 0;
}
.save-copy strong {
  font-size: 13px;
  display: block;
}
.save-copy small {
  font-size: 11px;
  color: var(--muted);
  display: block;
}
.save-indicator {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 3px;
}
.save-bar.has-error {
  border-color: var(--danger);
}
.save-bar.has-error .save-copy small {
  color: var(--danger);
}
.saving .field-control,
.saving .command-list,
.saving .language-panel {
  pointer-events: none;
  opacity: 0.75;
}
.command-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.command {
  padding: 0;
  overflow: hidden;
}
.command-summary {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 20px;
}
.command-summary > .icon {
  color: var(--muted);
}
.command-info {
  flex: 1;
  min-width: 0;
}
.command-info h3 {
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}
.command-info p {
  font-size: 11px;
  margin-top: 3px;
}
.command-info .module-name {
  font-size: 10px;
  color: var(--accent);
  font-family: inherit;
  margin-left: 9px;
  font-weight: 500;
}
.command-editor {
  padding: 21px;
  border-top: 1px solid var(--line);
  background: var(--soft);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 23px;
}
.command.dirty {
  border-color: var(--accent);
}
.command.has-error {
  border-color: var(--danger);
}
.command .command-error {
  padding: 0 20px 12px;
}
.command-explainer {
  grid-column: 1/-1;
  font-size: 11px;
  color: var(--muted);
}
.filter-select {
  min-width: 155px;
  width: auto;
}
.results-count {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}
.language-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 23px;
  margin-bottom: 20px;
}
.language-panel p {
  font-size: 12px;
  margin-top: 3px;
}
.language-panel select {
  width: 160px;
}
.language-edit {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.language-edit label {
  font-size: 12px;
  color: var(--muted);
}
.language-edit select {
  width: 160px;
}
.rtl-input {
  direction: rtl;
  text-align: right;
}
.translated-field .field-description {
  font-size: 11px;
}
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 640px;
  margin-bottom: 31px;
  list-style: none;
  padding: 0;
}
.step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
}
.step:not(:last-child)::after {
  content: '';
  height: 1px;
  background: var(--line);
  flex: 1;
  margin: 0 18px 0 9px;
}
.step-number {
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  flex: none;
}
.step.current {
  color: var(--accent);
  font-weight: 650;
}
.step.current .step-number {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}
.step.complete .step-number {
  color: var(--accent);
  background: var(--tint);
  border-color: var(--tint);
}
.step-number .icon {
  width: 13px;
}
.wizard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 287px;
  gap: 23px;
  align-items: start;
}
.wizard-section {
  padding: 24px;
}
.wizard-section > p {
  font-size: 12px;
  margin-top: 6px;
  margin-bottom: 20px;
}
.wizard-section > .search {
  margin-bottom: 15px;
}
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  background: var(--surface);
}
.choice:hover {
  border-color: var(--muted);
}
.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--tint);
}
.choice:has(input:disabled) {
  cursor: not-allowed;
  background: var(--soft);
}
.choice input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: none;
}
.choice-copy {
  flex: 1;
  min-width: 0;
}
.choice-copy b {
  display: block;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.choice-copy small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 2px;
}
.choice > .icon {
  color: var(--accent);
}
.choice-price {
  text-align: right;
  flex: none;
  font-size: 12px;
  font-weight: 650;
}
.choice-price small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.choice.taken {
  flex-wrap: wrap;
}
.choice.taken .text-link {
  font-size: 11px;
  margin-left: auto;
}
.order-summary {
  position: sticky;
  top: 24px;
  padding: 23px;
}
.order-summary h2 {
  font-size: 15px;
}
.order-summary .summary-server {
  border-bottom: 1px solid var(--line);
  padding: 17px 0;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.order-summary .summary-server .server-icon {
  width: 31px;
  height: 31px;
  font-size: 11px;
  border-radius: 8px;
}
.order-items {
  padding: 12px 0;
}
.order-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  font-size: 12px;
  color: var(--muted);
}
.order-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 12px;
  font-weight: 600;
}
.order-total strong {
  font-size: 22px;
  letter-spacing: -0.7px;
}
.order-total strong small {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}
.order-wallet {
  padding: 12px;
  margin-top: 16px;
  border-radius: 8px;
  background: var(--soft);
  font-size: 11px;
  color: var(--muted);
}
.order-wallet div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.order-wallet div + div {
  margin-top: 6px;
}
.order-wallet b {
  color: var(--text);
}
.wizard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 24px;
}
.wizard-footer .btn.primary {
  margin-left: auto;
}
.wizard-error {
  margin-top: 16px;
  font-size: 12px;
  color: var(--danger);
}
.review-server {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 21px 0;
}
.review-server p {
  font-size: 12px;
}
.review-items {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 20px;
}
.review-items .order-item {
  font-size: 13px;
}
.review-note {
  font-size: 12px;
  margin-top: 20px;
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
}
.review-check {
  display: flex;
  align-items: start;
  gap: 9px;
  font-size: 12px;
  margin-top: 20px;
}
.review-check input {
  margin-top: 3px;
  flex: none;
}
.review-check span {
  color: var(--muted);
}
.dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  background: var(--surface);
  color: var(--text);
  max-width: 440px;
  width: calc(100% - 32px);
  box-shadow: var(--shadow);
}
.dialog::backdrop {
  background: #0007;
  backdrop-filter: blur(3px);
}
.dialog h2 {
  font-size: 20px;
  letter-spacing: -0.5px;
}
.dialog p {
  font-size: 13px;
  margin: 10px 0 23px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--text);
  color: var(--surface);
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 13px;
  max-width: min(480px, calc(100vw - 32px));
  width: max-content;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
body:has(.save-bar:not([hidden])) .toast {
  bottom: 110px;
}
.skeleton {
  height: 150px;
  background: linear-gradient(110deg, var(--soft) 25%, var(--surface) 45%, var(--soft) 65%);
  background-size: 250% 100%;
  border-radius: var(--radius);
  animation: shimmer 1.6s infinite;
}
.skeleton.line {
  height: 35px;
  width: 40%;
  margin-bottom: 25px;
}
.loading-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes shimmer {
  to {
    background-position: -160% 0;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.landing {
  min-height: 100dvh;
  max-width: 1100px;
  margin: 0 auto;
  padding: 25px 36px;
  display: flex;
  flex-direction: column;
}
.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.landing-header .brand {
  padding: 0;
}
.landing-hero {
  padding: 100px 0 65px;
  max-width: 760px;
}
.landing-hero h1 {
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.06;
  letter-spacing: -2.8px;
  max-width: 650px;
}
.landing-hero h1 span {
  color: var(--accent);
}
.landing-hero > p {
  max-width: 510px;
  margin: 23px 0 28px;
  font-size: 16px;
  line-height: 1.75;
}
.landing-hero > .small {
  margin-top: 13px;
  font-size: 11px;
}
.landing-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  border-top: 1px solid var(--line);
  padding: 34px 0;
}
.landing-features .icon {
  color: var(--accent);
  margin-bottom: 13px;
}
.landing-features p {
  font-size: 13px;
  margin-top: 7px;
  line-height: 1.8;
}
.initial-loading {
  min-height: 100dvh;
  display: grid;
  place-items: center;
}
.initial-loading > div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
@media (min-width: 1550px) {
  .save-bar {
    left: calc(242px + (100vw - 242px - 1214px) / 2);
    right: calc((100vw - 242px - 1214px) / 2);
  }
}
@media (max-width: 1200px) {
  .content {
    padding: 29px 26px 120px;
  }
  .topbar {
    padding: 0 26px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .settings-help {
    display: none;
  }
  .wizard-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
  .save-bar {
    left: 268px;
    right: 26px;
  }
  .field {
    grid-template-columns: minmax(130px, 0.9fr) minmax(0, 1.2fr);
  }
  .two-column {
    grid-template-columns: 1fr;
  }
  .two-column > .stack:last-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .two-column > .stack:last-child > .notice {
    grid-column: 1/-1;
  }
}
@media (max-width: 980px) {
  .sidebar {
    width: 214px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .main {
    margin-left: 214px;
  }
  .save-bar {
    left: 240px;
  }
  .wizard-layout {
    grid-template-columns: 1fr;
  }
  .order-summary {
    position: static;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .stat-value {
    font-size: 25px;
  }
  .info-grid {
    grid-template-columns: 1fr;
  }
  .module-grid {
    grid-template-columns: 1fr;
  }
  .field {
    grid-template-columns: 1fr;
    gap: 11px;
  }
  .page-header h1 {
    font-size: 27px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    width: min(292px, 87vw);
    transform: translateX(-105%);
    transition: transform 0.2s;
    padding-top: 22px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }
  .shell.menu-open .sidebar {
    transform: none;
  }
  .shell.menu-open .scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: #0007;
    z-index: 29;
  }
  .sidebar-close {
    display: inline-flex;
    position: absolute;
    right: 14px;
    top: 23px;
  }
  .sidebar .brand {
    padding-bottom: 29px;
  }
  .main {
    margin-left: 0;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .topbar {
    height: 61px;
    padding: 0 17px;
    gap: 11px;
    position: sticky;
    top: 0;
    z-index: 20;
  }
  .topbar .breadcrumb {
    font-size: 11px;
    gap: 7px;
  }
  .topbar .breadcrumb .current {
    max-width: 170px;
  }
  .top-wallet {
    display: none;
  }
  .top-actions {
    gap: 4px;
  }
  .content {
    padding: 26px 20px 130px;
  }
  .page-header {
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 22px;
  }
  .page-header h1 {
    font-size: 27px;
  }
  .page-header p {
    font-size: 12px;
  }
  .stats {
    margin-bottom: 26px;
  }
  .stat {
    padding: 14px;
  }
  .stat-label {
    font-size: 10px;
  }
  .stat-label > .icon {
    display: none;
  }
  .stat-value {
    font-size: 24px;
  }
  .stat-value small {
    font-size: 10px;
  }
  .stat p {
    font-size: 10px;
  }
  .save-bar {
    left: 16px;
    right: 16px;
    bottom: calc(15px + env(safe-area-inset-bottom));
    padding: 12px;
    gap: 9px;
    flex-wrap: wrap;
  }
  .save-copy strong {
    font-size: 12px;
  }
  .save-copy small {
    font-size: 10px;
  }
  .save-bar .btn {
    font-size: 12px;
    min-height: 36px;
    padding: 7px 11px;
  }
  .save-indicator {
    display: none;
  }
  .save-bar.has-error .save-copy {
    flex-basis: 100%;
  }
  .save-bar.has-error .btn:first-of-type {
    margin-left: auto;
  }
  .command-summary {
    gap: 10px;
    padding: 16px;
  }
  .command-summary > .icon {
    display: none;
  }
  .command-info .module-name {
    display: block;
    margin-left: 0;
    margin-top: 3px;
  }
  .command-editor {
    padding: 18px;
    gap: 20px;
  }
  .language-panel {
    padding: 18px;
    align-items: start;
  }
  .language-panel select {
    width: 135px;
  }
  .settings-section-header {
    padding: 17px 19px;
  }
  .field {
    padding: 19px;
  }
  .landing {
    padding: 24px;
  }
  .landing-hero {
    padding: 80px 0 45px;
  }
  .landing-features {
    gap: 20px;
  }
  .two-column > .stack:last-child {
    display: flex;
    align-items: stretch;
  }
  .step:not(:last-child)::after {
    margin: 0 10px;
  }
  .step {
    gap: 7px;
  }
  .wizard-section {
    padding: 20px;
  }
  .settings-section {
    scroll-margin-top: 80px;
  }
}
@media (max-width: 490px) {
  .content {
    padding-left: 16px;
    padding-right: 16px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 7px;
  }
  .stat {
    padding: 12px 10px;
  }
  .stat-value {
    font-size: 21px;
    gap: 4px;
  }
  .stat-value small {
    font-size: 9px;
  }
  .stat p {
    font-size: 9px;
  }
  .stat-label {
    font-size: 9px;
    line-height: 1.4;
  }
  .toolbar {
    gap: 10px;
  }
  .toolbar .search {
    max-width: none;
    flex-basis: 100%;
  }
  .toolbar .results-count {
    margin-left: auto;
  }
  .filter-select {
    flex: 1;
    min-width: 0;
    font-size: 12px;
  }
  .segmented button {
    padding: 6px 10px;
  }
  .info-grid {
    gap: 14px;
  }
  .info-block {
    padding: 18px;
  }
  .new-card {
    min-height: 180px;
  }
  .command-editor {
    grid-template-columns: 1fr;
  }
  .command-summary .btn {
    padding: 6px 8px;
    font-size: 11px;
  }
  .command-summary {
    gap: 8px;
  }
  .language-panel {
    flex-direction: column;
    gap: 14px;
  }
  .language-panel select {
    width: 100%;
  }
  .landing-header .brand {
    font-size: 17px;
  }
  .landing-features {
    grid-template-columns: 1fr;
    padding-bottom: 20px;
  }
  .step {
    font-size: 11px;
  }
  .step-number {
    width: 24px;
    height: 24px;
  }
  .choice {
    padding: 12px;
    gap: 10px;
  }
  .choice .server-icon {
    width: 35px;
    height: 35px;
    font-size: 13px;
  }
  .wizard-footer {
    flex-wrap: wrap;
  }
  .review-check {
    font-size: 11px;
  }
  .breadcrumb > a:first-child {
    display: none;
  }
  .breadcrumb > .icon {
    display: none;
  }
  .topbar .breadcrumb .current {
    max-width: 160px;
  }
  .title-icon {
    gap: 11px;
  }
  .title-icon h1 {
    font-size: 25px;
  }
  .server-icon.large {
    width: 45px;
    height: 45px;
    font-size: 16px;
  }
  .dialog-actions {
    flex-wrap: wrap;
  }
  .settings-section-header h2 {
    font-size: 16px;
  }
}
@media (max-width: 980px) {
  .wizard-main {
    display: contents;
  }
  .wizard-main > .wizard-section {
    grid-row: 1;
  }
  .wizard-main > .wizard-error {
    grid-row: 2;
    margin: 0;
  }
  .wizard-layout > .order-summary {
    grid-row: 3;
  }
  .wizard-main > .wizard-footer {
    grid-row: 4;
    margin: 0;
  }
}
@media (max-width: 490px) {
  .section-heading {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Original monochrome surfaces and active navigation. */
.sidebar {
  background: var(--soft);
}
.nav-link.active {
  background: var(--accent);
  color: var(--accent-text);
}
.server-icon {
  background: var(--accent);
  color: var(--accent-text);
}
.status.ended,
.status.inactive {
  background: var(--soft);
  color: var(--muted);
}

/* Schema v2 module sections and richer controls. */
.module-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 195px;
  gap: 26px;
  align-items: start;
}
.module-section {
  padding: 0;
  scroll-margin-top: 25px;
  min-width: 0;
}
.module-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 23px;
  border-bottom: 1px solid var(--line);
  list-style: none;
}
.module-section-heading p {
  font-size: 12px;
  margin-top: 5px;
  line-height: 1.6;
}
.module-section-heading h2 {
  font-size: 16px;
}
.module-section-heading::-webkit-details-marker {
  display: none;
}
summary.module-section-heading {
  cursor: pointer;
}
.module-section:not([open]) > summary {
  border-bottom: 0;
}
.module-section[open] > summary .icon:last-child {
  transform: rotate(180deg);
}
.module-fields {
  display: grid;
  padding: 23px;
  gap: 25px 23px;
  align-items: start;
}
.module-fields.columns-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.module-fields > .module-field {
  padding: 0;
  border: 0;
  gap: 11px;
  min-width: 0;
}
.module-field.full-width {
  grid-column: 1/-1;
}
.module-fields > .module-field:only-child {
  grid-column: 1/-1;
}
.module-field.has-error {
  background: none;
}
.module-field .field-heading {
  display: flex;
  align-items: start;
  gap: 10px;
  justify-content: space-between;
}
.field-heading .field-label {
  padding-top: 4px;
}
.required-label {
  font-size: 9px;
  font-weight: 500;
  margin-left: 8px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 5px;
  white-space: nowrap;
}
.reset-field {
  font-size: 11px !important;
  min-height: 28px !important;
  padding: 3px 7px !important;
  flex: none;
}
.reset-field:disabled {
  opacity: 0.25;
}
.module-field.inactive-field {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  background: var(--soft);
}
.conditional-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  grid-column: 1/-1;
}
.section-pending {
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-text);
}
.module-rail {
  position: sticky;
  top: 25px;
  font-size: 12px;
}
.module-rail h3 {
  font-size: 12px;
  margin-bottom: 10px;
}
.module-rail > a {
  display: block;
  padding: 8px 10px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.module-rail > a:hover {
  border-color: var(--accent);
  color: var(--text);
}
.module-rail p {
  font-size: 11px;
  line-height: 1.8;
  margin-bottom: 12px;
}
.text-control {
  min-width: 0;
}
.input-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
}
.input-count {
  margin-left: auto;
  white-space: nowrap;
  font-size: 10px;
}
.token-buttons {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.token-buttons > span {
  font-size: 10px;
  margin-right: 3px;
}
.btn.token {
  font-size: 10px;
  min-height: 26px;
  padding: 3px 7px;
  font-family: ui-monospace, monospace;
  background: var(--soft);
}
.number-with-unit {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.number-stepper {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  max-width: 220px;
  background: var(--surface);
}
.number-stepper .input {
  border: 0;
  border-radius: 0;
  width: 90px;
  min-width: 50px;
  text-align: center;
  appearance: textfield;
  padding-left: 5px;
  padding-right: 5px;
}
.number-stepper .input::-webkit-inner-spin-button,
.number-stepper .input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}
.btn.step-button {
  border: 0;
  border-radius: 0;
  width: 42px;
  font-size: 20px;
  font-weight: 400;
  min-height: 40px;
  padding: 4px;
  background: var(--soft);
}
.number-stepper:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.number-stepper .input:focus {
  outline: 0;
}
.input-unit {
  font-size: 12px;
  color: var(--muted);
}
.range-exact {
  max-width: 82px;
  width: 82px;
  flex: none;
  text-align: center;
}
.range-control input[type='range'] {
  min-width: 0;
  flex: 1;
}
.range-labels {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}
.search-select {
  position: relative;
}
.search-select > input {
  padding-right: 34px;
  text-overflow: ellipsis;
}
.search-select > .icon {
  position: absolute;
  right: 12px;
  top: 12px;
  pointer-events: none;
  color: var(--muted);
  width: 15px;
}
.choice-popup {
  position: absolute;
  z-index: 12;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 9px;
  padding: 5px;
  background: var(--surface);
  max-height: 230px;
  overflow: auto;
}
.choice-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  border-radius: 5px;
  padding: 10px;
  font-size: 12px;
  line-height: 1.5;
  background: transparent;
  text-align: left;
  color: var(--text);
}
.choice-option:hover,
.choice-option.highlighted {
  background: var(--hover);
}
.choice-option[aria-selected='true'] {
  font-weight: 650;
  background: var(--soft);
}
.choice-option .icon {
  width: 14px;
  height: 14px;
}
.selection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 6px;
  min-height: 28px;
}
.selection-header .small {
  font-size: 11px;
}
.multi-option:has(input:disabled):not(:has(input:checked)) {
  opacity: 0.45;
  cursor: not-allowed;
}
.multi-option {
  min-height: 34px;
}
.weekday-options {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.weekday {
  position: relative;
  cursor: pointer;
}
.weekday input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.weekday span {
  display: grid;
  place-items: center;
  min-width: 43px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  background: var(--surface);
}
.weekday:has(:checked) span {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}
.weekday:has(:focus-visible) span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.weekday:has(:disabled) {
  opacity: 0.6;
  cursor: not-allowed;
}
.radio-option small {
  display: block;
  font-size: 10px;
  margin-top: 2px;
}
.radio-option {
  min-height: 40px;
}
.message-preview {
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--soft);
  padding: 13px 15px;
}
.preview-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 10px;
}
.preview-label .icon {
  width: 13px;
  height: 13px;
}
.preview-message {
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
.embed-preview .preview-message {
  border-left: 3px solid var(--muted);
  padding: 9px 12px;
  border-radius: 3px;
  background: var(--surface);
}
.module-field .field-error {
  grid-column: 1/-1;
}
.module-field textarea.input {
  min-height: 105px;
}
@media (max-width: 1200px) {
  .module-layout {
    grid-template-columns: 1fr;
  }
  .module-rail {
    position: static;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    grid-row: 1;
  }
  .module-rail > h3,
  .module-rail > p {
    display: none;
  }
  .module-rail > a {
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 6px 10px;
    background: var(--surface);
  }
}
@media (max-width: 760px) {
  .module-section {
    scroll-margin-top: 80px;
  }
  .module-section-heading {
    padding: 18px;
  }
  .module-fields {
    padding: 18px;
    gap: 25px;
  }
  .module-fields.columns-2 {
    grid-template-columns: 1fr;
  }
  .module-section-heading .inline {
    gap: 7px;
  }
  .module-section-heading .mini-tag {
    display: none;
  }
  .module-layout {
    gap: 18px;
  }
  .module-rail {
    gap: 6px;
  }
  .module-rail > a {
    font-size: 11px;
  }
  .module-field .field-heading {
    gap: 7px;
  }
  .number-stepper {
    max-width: 100%;
  }
  .required-label {
    font-size: 9px;
  }
  .weekday-options {
    gap: 5px;
  }
  .weekday span {
    min-width: 35px;
    font-size: 11px;
  }
  .selection-header .btn {
    min-height: 32px;
  }
}

/* Discord images retain initials as a fallback when loading fails. */
.server-icon {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.server-icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.guild-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}
.guild-identity .server-icon {
  width: 22px;
  height: 22px;
  font-size: 10px;
  border-radius: 6px;
}
