:root {
  color-scheme: dark;
  --nw-bg: #070913;
  --nw-bg-soft: #0b0f1d;
  --nw-sidebar: rgba(8, 11, 22, .94);
  --nw-panel: rgba(17, 22, 39, .88);
  --nw-panel-strong: #121829;
  --nw-elevated: #191f32;
  --nw-line: rgba(151, 168, 222, .14);
  --nw-line-strong: rgba(148, 163, 230, .28);
  --nw-text: #f6f7ff;
  --nw-muted: #949db7;
  --nw-subtle: #6c7591;
  --nw-primary: #7b77ff;
  --nw-primary-bright: #9a8cff;
  --nw-cyan: #58d9ff;
  --nw-mint: #59efc2;
  --nw-warning: #ffca68;
  --nw-danger: #ff6f85;
  --nw-discord: #5865f2;
  --nw-shadow: 0 28px 80px rgba(0, 0, 0, .34);
  --nw-radius: 22px;
  --nw-radius-sm: 14px;
  --nw-sidebar-width: 276px;
}

* { box-sizing: border-box; }

html { background: var(--nw-bg); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 72% -10%, rgba(109, 85, 255, .17), transparent 32rem),
    radial-gradient(circle at 24% 28%, rgba(48, 180, 255, .07), transparent 30rem),
    linear-gradient(180deg, #090b16 0%, var(--nw-bg) 55%, #050711 100%);
  color: var(--nw-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

.legal-shell { width: min(760px, calc(100% - 32px)); margin: 12vh auto; }
.legal-shell .panel-card { padding: clamp(24px, 5vw, 48px); }
.legal-shell h1 { margin-bottom: 18px; }
.legal-shell p { color: var(--nw-muted); line-height: 1.75; }

button, input, textarea, select { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(88, 217, 255, .35);
  outline-offset: 2px;
}

a { color: inherit; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .12;
  pointer-events: none;
}
.ambient-one { top: -18rem; right: -12rem; background: #8c69ff; }
.ambient-two { bottom: -22rem; left: 12%; background: #28bfff; }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1030;
  display: flex;
  width: var(--nw-sidebar-width);
  flex-direction: column;
  padding: 22px 18px;
  border-right: 1px solid var(--nw-line);
  background: var(--nw-sidebar);
  box-shadow: 20px 0 60px rgba(0, 0, 0, .12);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.brand-block, .brand, .guild-card, .status-line, .user-chip, .panel-heading, .section-heading,
.topbar, .topbar-actions, .studio-toolbar, .studio-toolbar-actions, .json-toolbar, .preview-footer,
.editor-actions, .policy-header, .policy-row { display: flex; align-items: center; }

.brand-block { justify-content: space-between; margin-bottom: 22px; }
.brand { gap: 12px; color: var(--nw-text); text-decoration: none; }
.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid rgba(135, 120, 255, .55);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(123, 119, 255, .32), rgba(38, 208, 244, .12));
  box-shadow: inset 0 0 18px rgba(137, 112, 255, .12), 0 10px 28px rgba(60, 39, 178, .22);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -.04em;
}
.brand strong { display: block; font-size: 16px; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 1px; color: var(--nw-muted); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }

.guild-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px 10px;
  padding: 11px;
  border: 1px solid var(--nw-line);
  border-radius: 17px;
  background: rgba(255, 255, 255, .025);
}
.guild-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  grid-row: 1 / span 2;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(145deg, #655df0, #29b8d5);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  background-position: center;
  background-size: cover;
}
.guild-card .form-select {
  min-height: 30px;
  padding: 2px 30px 2px 4px;
  border: 0;
  background-color: transparent;
  box-shadow: none;
  color: var(--nw-text);
  font-size: 13px;
  font-weight: 750;
}
.access-badge { grid-column: 2; color: var(--nw-muted); font-size: 11px; }

.nav-stack { display: grid; gap: 4px; margin: 24px 0; overflow-y: auto; scrollbar-width: thin; }
.nav-item-button {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--nw-muted);
  text-align: left;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.nav-item-button:hover { transform: translateX(2px); background: rgba(255, 255, 255, .035); color: #fff; }
.nav-item-button.active {
  border-color: rgba(123, 119, 255, .24);
  background: linear-gradient(90deg, rgba(123, 119, 255, .18), rgba(82, 212, 255, .035));
  color: #fff;
  box-shadow: inset 3px 0 0 var(--nw-primary-bright);
}
.nav-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; color: var(--nw-primary-bright); font-size: 15px; }
.nav-item-button small { color: var(--nw-subtle); font-size: 10px; }

.sidebar-footer { display: grid; gap: 11px; margin-top: auto; padding: 14px 5px 0; border-top: 1px solid var(--nw-line); }
.sidebar-footer a { color: var(--nw-muted); font-size: 12px; text-decoration: none; }
.status-line { gap: 8px; color: var(--nw-muted); font-size: 11px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--nw-warning); box-shadow: 0 0 0 4px rgba(255, 202, 104, .08); }
.status-dot.online { background: var(--nw-mint); box-shadow: 0 0 0 4px rgba(89, 239, 194, .08), 0 0 12px rgba(89, 239, 194, .45); }

.main-stage { min-height: 100vh; margin-left: var(--nw-sidebar-width); padding: 0 38px 56px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 1010;
  min-height: 84px;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(151, 168, 222, .08);
  background: linear-gradient(180deg, rgba(7, 9, 19, .96), rgba(7, 9, 19, .82));
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.topbar-title h1 { margin: 2px 0 0; font-size: clamp(22px, 3vw, 30px); font-weight: 770; letter-spacing: -.045em; }
.topbar-title > span { color: var(--nw-primary-bright); font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.topbar-actions { gap: 10px; }
.save-state { display: inline-flex; align-items: center; gap: 7px; color: var(--nw-muted); font-size: 12px; }
.save-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--nw-mint); box-shadow: 0 0 10px var(--nw-mint); }
.user-chip { gap: 9px; min-width: 154px; padding: 6px 9px; border: 1px solid var(--nw-line); border-radius: 14px; background: rgba(255, 255, 255, .025); }
.user-chip > img, .user-chip > #userInitials { width: 32px; height: 32px; border-radius: 10px; object-fit: cover; }
.user-chip > #userInitials { display: grid; place-items: center; background: rgba(123, 119, 255, .18); color: var(--nw-primary-bright); font-size: 11px; font-weight: 800; }
.user-chip strong, .user-chip small { display: block; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip strong { font-size: 12px; }
.user-chip small { color: var(--nw-muted); font-size: 10px; }

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--nw-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
  color: var(--nw-muted);
  transition: .18s ease;
}
.icon-button:hover { border-color: var(--nw-line-strong); background: rgba(255, 255, 255, .06); color: #fff; }
.danger-hover:hover { color: var(--nw-danger); }

.app-view { max-width: 1680px; margin: 0 auto; padding-top: 30px; }
.app-view[hidden] { display: none !important; }
.alert-region { position: fixed; z-index: 1080; top: 94px; right: 30px; width: min(440px, calc(100vw - 28px)); }
.alert-region .alert { border-color: var(--nw-line); border-radius: 14px; box-shadow: var(--nw-shadow); }

.hero-panel {
  display: flex;
  min-height: 238px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  padding: clamp(27px, 4vw, 46px);
  overflow: hidden;
  border: 1px solid rgba(137, 125, 255, .21);
  border-radius: 28px;
  background:
    radial-gradient(circle at 85% 18%, rgba(101, 216, 255, .18), transparent 17rem),
    radial-gradient(circle at 30% -25%, rgba(130, 98, 255, .27), transparent 24rem),
    linear-gradient(125deg, rgba(21, 26, 48, .96), rgba(12, 16, 30, .94));
  box-shadow: var(--nw-shadow), inset 0 1px 0 rgba(255, 255, 255, .035);
}
.hero-panel h2 { max-width: 720px; margin: 7px 0 10px; font-size: clamp(30px, 5vw, 58px); font-weight: 820; line-height: .98; letter-spacing: -.065em; }
.hero-panel p { max-width: 640px; margin: 0; color: var(--nw-muted); font-size: 15px; line-height: 1.7; }
.kicker { color: var(--nw-cyan); font-size: 10px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }

.btn { border-radius: 12px; font-weight: 700; }
.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--nw-primary), #6558ee);
  box-shadow: 0 12px 28px rgba(86, 69, 226, .24);
}
.btn-primary:hover, .btn-primary:focus { border-color: transparent; background: linear-gradient(135deg, #9287ff, #7167f5); transform: translateY(-1px); }
.btn-soft { border: 1px solid var(--nw-line); background: rgba(255, 255, 255, .045); color: var(--nw-text); }
.btn-soft:hover { border-color: var(--nw-line-strong); background: rgba(255, 255, 255, .08); color: #fff; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 20px 0; }
.metric-card, .panel-card {
  border: 1px solid var(--nw-line);
  background: linear-gradient(145deg, rgba(19, 24, 43, .9), rgba(12, 16, 30, .9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .024);
}
.metric-card { min-height: 126px; padding: 20px; border-radius: 18px; }
.metric-card span { color: var(--nw-muted); font-size: 11px; font-weight: 720; letter-spacing: .08em; text-transform: uppercase; }
.metric-card strong { display: block; margin: 12px 0 4px; font-size: 31px; letter-spacing: -.05em; }
.metric-card small { color: var(--nw-subtle); }
.metric-card .metric-icon { float: right; color: var(--nw-primary-bright); font-size: 20px; }

.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.content-grid.two-one { grid-template-columns: minmax(0, 1.65fr) minmax(300px, .8fr); }
.panel-card { padding: 20px; border-radius: var(--nw-radius); }
.panel-card.compact { padding: 14px; border-radius: 17px; }
.panel-card.narrow { max-width: 760px; }
.panel-heading { min-height: 34px; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.panel-heading h3 { margin: 0; font-size: 16px; font-weight: 750; letter-spacing: -.02em; }
.panel-heading small { color: var(--nw-subtle); font-size: 11px; font-weight: 600; }

.timeline-list { display: grid; }
.timeline-item { display: grid; grid-template-columns: 13px 1fr auto; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--nw-line); }
.timeline-item:last-child { border: 0; }
.timeline-item i { width: 9px; height: 9px; margin-top: 5px; border: 2px solid var(--nw-primary-bright); border-radius: 50%; box-shadow: 0 0 0 4px rgba(123, 119, 255, .07); }
.timeline-item strong { display: block; font-size: 13px; }
.timeline-item span, .timeline-item time { color: var(--nw-muted); font-size: 11px; }

.section-heading { justify-content: space-between; gap: 24px; margin: 8px 0 24px; }
.section-heading h2 { margin: 5px 0 4px; font-size: clamp(30px, 4vw, 45px); font-weight: 810; letter-spacing: -.055em; }
.section-heading p { margin: 0; color: var(--nw-muted); }

.studio-toolbar { display: grid; grid-template-columns: auto minmax(180px, 1fr) minmax(210px, 1fr) auto; gap: 12px; margin-bottom: 18px; }
.studio-toolbar > label, .form-grid > label, .editor-card > label { margin: 0; }
label > span { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 7px; color: #b8c0d8; font-size: 10px; font-weight: 780; letter-spacing: .07em; text-transform: uppercase; }
label > span small { color: var(--nw-subtle); font-weight: 600; }
.studio-toolbar-actions { align-self: end; gap: 8px; }

.segmented { display: inline-flex; align-self: end; padding: 4px; border: 1px solid var(--nw-line); border-radius: 13px; background: rgba(3, 5, 12, .42); }
.segmented button { padding: 7px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--nw-muted); font-size: 12px; font-weight: 720; }
.segmented button.active { background: rgba(123, 119, 255, .19); color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .16); }

.studio-layout { display: grid; grid-template-columns: minmax(540px, 1.15fr) minmax(400px, .85fr); gap: 18px; align-items: start; }
.studio-editor { display: grid; gap: 14px; min-width: 0; }
.editor-card { padding: 18px; }
.editor-card .panel-heading { margin-bottom: 18px; }
.editor-card .panel-heading > div:first-child { display: flex; align-items: center; gap: 10px; }
.step-number { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(123, 119, 255, .24); border-radius: 9px; background: rgba(123, 119, 255, .09); color: var(--nw-primary-bright); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }
.editor-actions { gap: 6px; }
.editor-actions .icon-button { width: 33px; height: 33px; }

.form-grid { display: grid; gap: 12px; margin-bottom: 12px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-control, .form-select {
  min-height: 42px;
  border-color: rgba(128, 144, 194, .16);
  border-radius: 11px;
  background-color: rgba(4, 7, 16, .56);
  color: var(--nw-text);
  box-shadow: none;
}
.form-control::placeholder { color: #626c87; }
.form-control:focus, .form-select:focus { border-color: rgba(123, 119, 255, .6); background-color: rgba(6, 9, 19, .7); color: #fff; box-shadow: 0 0 0 3px rgba(123, 119, 255, .11); }
.rich-input { min-height: 126px; resize: vertical; line-height: 1.55; }
.input-action { display: grid; grid-template-columns: 1fr 42px; }
.input-action .form-control { border-radius: 11px 0 0 11px; }
.input-action button { border: 1px solid rgba(128, 144, 194, .16); border-left: 0; border-radius: 0 11px 11px 0; background: rgba(123, 119, 255, .1); color: var(--nw-primary-bright); }
.compact-options { margin: 14px 0 0; }
.switch-row { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 7px 10px; border: 1px solid var(--nw-line); border-radius: 11px; background: rgba(255, 255, 255, .02); }
.switch-row span { margin: 0; color: var(--nw-muted); font-size: 11px; letter-spacing: 0; text-transform: none; }
.switch-row input { accent-color: var(--nw-primary); }
.section-note { margin: -5px 0 15px; color: var(--nw-muted); font-size: 12px; line-height: 1.6; }

.sortable-stack { display: grid; gap: 12px; }
.sortable-ghost { opacity: .35; }
.embed-editor-block, .component-editor-block {
  overflow: hidden;
  border: 1px solid var(--nw-line);
  border-radius: 16px;
  background: rgba(4, 7, 15, .32);
}
.block-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 9px 12px; border-bottom: 1px solid var(--nw-line); background: rgba(255, 255, 255, .02); }
.block-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.drag-handle { cursor: grab; color: var(--nw-subtle); user-select: none; }
.block-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.block-title small { color: var(--nw-subtle); }
.block-actions { display: flex; gap: 4px; }
.block-actions button { width: 29px; height: 29px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--nw-muted); }
.block-actions button:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.block-body { display: grid; gap: 12px; padding: 14px; }
.subsection { padding: 12px; border: 1px solid var(--nw-line); border-radius: 13px; background: rgba(255, 255, 255, .018); }
.subsection-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.subsection-heading strong { font-size: 11px; }
.field-row, .component-row { display: grid; gap: 9px; padding: 10px 0; border-top: 1px solid var(--nw-line); }
.field-row:first-child, .component-row:first-child { border-top: 0; }
.field-row { grid-template-columns: minmax(120px, .7fr) minmax(180px, 1.3fr) auto; }
.field-row textarea { min-height: 72px; }
.mini-button { min-height: 34px; padding: 5px 9px; border: 1px solid var(--nw-line); border-radius: 9px; background: rgba(255, 255, 255, .03); color: var(--nw-muted); font-size: 11px; }
.mini-button:hover { color: #fff; }
.mini-button.danger { color: var(--nw-danger); }
.v2-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.v2-editor-heading > div { display: flex; align-items: center; gap: 9px; }
.v2-json-summary { border: 1px solid var(--nw-line); border-radius: 11px; background: rgba(3, 6, 14, .5); }
.v2-json-summary summary { padding: 9px 11px; cursor: pointer; color: var(--nw-muted); font-size: 11px; }
.v2-json-summary pre { max-height: 260px; margin: 0; overflow: auto; padding: 0 11px 11px; color: #b8c4e4; font-size: 10px; line-height: 1.55; white-space: pre-wrap; }

.studio-preview-column { position: sticky; top: 102px; min-width: 0; }
.preview-tabs { margin: 0 0 9px; }
.discord-canvas, .json-panel {
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--nw-line);
  border-radius: 20px;
  background: #313338;
  box-shadow: var(--nw-shadow);
}
.discord-canvas { padding: 24px 18px; }
.discord-message { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; color: #dbdee1; font-family: gg sans, Inter, system-ui, sans-serif; }
.discord-avatar { display: grid; width: 42px; height: 42px; place-items: center; overflow: hidden; border-radius: 50%; background: linear-gradient(145deg, #5865f2, #30a9c9); background-position: center; background-size: cover; color: #fff; font-size: 10px; font-weight: 900; }
.discord-message-body { min-width: 0; }
.discord-meta { display: flex; align-items: baseline; gap: 6px; min-height: 22px; }
.discord-meta strong { color: #f2f3f5; font-size: 15px; }
.discord-meta time { color: #949ba4; font-size: 10px; }
.bot-tag { padding: 1px 4px; border-radius: 3px; background: #5865f2; color: #fff; font-size: 8px; font-weight: 800; }
.preview-content { margin: 2px 0 6px; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 14px; line-height: 1.38; }
.discord-embed { position: relative; display: grid; max-width: 540px; margin: 5px 0; overflow: hidden; border-radius: 4px; background: #2b2d31; }
.discord-embed::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--embed-color, #5865f2); content: ""; }
.discord-embed-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 11px 12px 11px 16px; }
.discord-embed-author { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: #f2f3f5; font-size: 12px; font-weight: 650; }
.discord-embed-author img, .discord-footer img { width: 21px; height: 21px; border-radius: 50%; object-fit: cover; }
.discord-embed-title { margin-bottom: 6px; color: #f2f3f5; font-size: 14px; font-weight: 720; }
.discord-embed-description { color: #dbdee1; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; white-space: pre-wrap; }
.discord-thumbnail { grid-column: 2; grid-row: 1 / span 4; width: 76px; max-height: 76px; border-radius: 4px; object-fit: cover; }
.discord-fields { display: grid; grid-template-columns: repeat(12, 1fr); gap: 9px 11px; margin-top: 10px; }
.discord-field { grid-column: span 12; min-width: 0; }
.discord-field.inline { grid-column: span 4; }
.discord-field strong, .discord-field span { display: block; overflow-wrap: anywhere; font-size: 11px; }
.discord-field span { margin-top: 2px; color: #dbdee1; white-space: pre-wrap; }
.discord-banner { display: block; grid-column: 1 / -1; width: 100%; max-height: 280px; margin-top: 11px; border-radius: 4px; object-fit: cover; }
.discord-footer { display: flex; grid-column: 1 / -1; align-items: center; gap: 6px; margin-top: 9px; color: #b5bac1; font-size: 10px; }
.discord-components { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.discord-component { min-height: 30px; padding: 5px 11px; border: 0; border-radius: 3px; background: #4e5058; color: #fff; font-size: 12px; font-weight: 650; }
.discord-component.primary { background: #5865f2; }
.discord-component.success { background: #248046; }
.discord-component.danger { background: #da373c; }
.discord-component.link { background: #4e5058; }
.discord-select { width: min(100%, 400px); justify-content: space-between; text-align: left; }
.discord-v2-container { display: grid; max-width: 560px; gap: 9px; margin: 6px 0; padding: 12px; border: 1px solid #3f4147; border-left: 4px solid var(--container-color, #5865f2); border-radius: 8px; background: #2b2d31; }
.discord-v2-section { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; max-width: 560px; margin: 6px 0; }
.discord-v2-section-copy { display: grid; gap: 7px; min-width: 0; }
.discord-v2-text { overflow-wrap: anywhere; white-space: pre-wrap; color: #dbdee1; font-size: 14px; line-height: 1.42; }
.discord-v2-accessory { align-self: center; }
.discord-v2-thumbnail { width: 84px; height: 84px; border-radius: 8px; object-fit: cover; }
.discord-v2-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 560px; gap: 4px; overflow: hidden; border-radius: 8px; }
.discord-v2-gallery img { width: 100%; min-height: 140px; max-height: 280px; object-fit: cover; }
.discord-v2-gallery > :only-child { grid-column: 1 / -1; }
.discord-v2-media-placeholder { display: grid; min-width: 120px; min-height: 80px; place-items: center; padding: 12px; border: 1px dashed #555861; border-radius: 8px; color: #949ba4; font-size: 11px; }
.discord-v2-file { display: flex; max-width: 420px; align-items: center; gap: 10px; margin: 6px 0; padding: 10px 12px; border: 1px solid #3f4147; border-radius: 8px; background: #2b2d31; color: #00a8fc; font-size: 12px; }
.discord-v2-file > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 7px; background: #1e1f22; }
.discord-v2-separator { max-width: 560px; margin: 8px 0; border-top: 1px solid #3f4147; }
.discord-v2-separator.spacing-2 { margin-block: 16px; }
.discord-v2-separator.no-divider { border-top-color: transparent; }
.discord-v2-unknown { max-width: 560px; padding: 8px 10px; border: 1px dashed #555861; border-radius: 6px; color: #949ba4; font-size: 11px; }
.is-spoiler { filter: blur(10px); }

.json-panel { background: #0b0e17; }
.json-toolbar { min-height: 48px; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--nw-line); }
.json-toolbar > span { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.json-toolbar i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--nw-mint); }
.json-toolbar i.invalid { background: var(--nw-danger); }
.json-toolbar label { display: flex; align-items: center; gap: 7px; margin-left: auto; color: var(--nw-muted); font-size: 10px; text-transform: uppercase; }
.json-toolbar .form-select { width: auto; min-height: 30px; padding-top: 3px; padding-bottom: 3px; }
#jsonEditor { width: 100%; min-height: 472px; padding: 16px; border: 0; outline: 0; resize: vertical; background: transparent; color: #cdd6f4; font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; font-size: 12px; line-height: 1.6; tab-size: 2; }
.CodeMirror { min-height: 472px; background: transparent; color: #cdd6f4; font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; font-size: 12px; line-height: 1.6; }
.CodeMirror-gutters { border-color: var(--nw-line); background: rgba(255, 255, 255, .015); }
.CodeMirror-linenumber { color: #555f78; }
.CodeMirror-cursor { border-color: #fff; }
.cm-s-default .cm-property { color: #7dd3fc; }
.cm-s-default .cm-string { color: #86efac; }
.cm-s-default .cm-number, .cm-s-default .cm-atom { color: #c4b5fd; }
.validation-list { padding: 0 14px 12px; color: var(--nw-danger); font-size: 11px; }
.preview-footer { justify-content: space-between; padding: 10px 3px; color: var(--nw-subtle); font-size: 10px; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.data-card { min-height: 145px; padding: 17px; border: 1px solid var(--nw-line); border-radius: 17px; background: var(--nw-panel); transition: transform .18s ease, border-color .18s ease; }
.data-card:hover { transform: translateY(-2px); border-color: var(--nw-line-strong); }
.data-card h3 { margin: 9px 0 6px; font-size: 15px; }
.data-card p { color: var(--nw-muted); font-size: 12px; line-height: 1.55; }
.data-card code { color: var(--nw-cyan); font-size: 10px; }
.data-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; color: var(--nw-subtle); font-size: 10px; }

.asset-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.asset-card { overflow: hidden; border: 1px solid var(--nw-line); border-radius: 16px; background: var(--nw-panel); }
.asset-card figure { display: grid; min-height: 132px; margin: 0; place-items: center; overflow: hidden; background: linear-gradient(145deg, #11182b, #090d18); }
.asset-card img { width: 100%; height: 150px; object-fit: cover; }
.asset-card .asset-meta { padding: 11px; }
.asset-card strong, .asset-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-card strong { font-size: 11px; }
.asset-card small { margin-top: 4px; color: var(--nw-subtle); font-size: 9px; }
.filter-row { display: flex; gap: 7px; margin-bottom: 14px; overflow-x: auto; padding-bottom: 4px; }
.filter-chip { flex: 0 0 auto; padding: 6px 11px; border: 1px solid var(--nw-line); border-radius: 999px; background: transparent; color: var(--nw-muted); font-size: 11px; }
.filter-chip.active { border-color: rgba(123, 119, 255, .4); background: rgba(123, 119, 255, .13); color: #fff; }

.table { --bs-table-bg: transparent; --bs-table-color: var(--nw-text); --bs-table-border-color: var(--nw-line); }
.table > :not(caption) > * > * { padding: .8rem .65rem; }
.permission-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.permission-pill { padding: 3px 6px; border-radius: 999px; background: rgba(89, 239, 194, .08); color: var(--nw-mint); font-size: 9px; }
.permission-pill.off { background: rgba(255, 111, 133, .07); color: var(--nw-danger); }
.role-row { display: flex; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--nw-line); }
.role-row i { width: 9px; height: 9px; border-radius: 50%; background: var(--role-color); }
.role-row span { color: var(--nw-muted); font-size: 10px; }

.policy-header, .policy-row { display: grid; grid-template-columns: minmax(240px, 1fr) 170px 190px; gap: 12px; }
.policy-header { padding: 0 12px 10px; color: var(--nw-subtle); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.policy-row { min-height: 68px; padding: 10px 12px; border-top: 1px solid var(--nw-line); }
.policy-info strong, .policy-info small { display: block; }
.policy-info strong { font-size: 13px; }
.policy-info small { margin-top: 3px; color: var(--nw-muted); font-size: 10px; }
.yes-no { display: inline-flex; width: fit-content; padding: 3px; border: 1px solid var(--nw-line); border-radius: 10px; }
.yes-no button { min-width: 57px; padding: 6px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--nw-subtle); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.yes-no button.active.yes { background: rgba(89, 239, 194, .13); color: var(--nw-mint); }
.yes-no button.active.no { background: rgba(255, 111, 133, .11); color: var(--nw-danger); }
.yes-no.disabled { opacity: .55; pointer-events: none; }

.glass-modal, .glass-toast { border: 1px solid var(--nw-line-strong); background: rgba(14, 18, 32, .96); box-shadow: var(--nw-shadow); backdrop-filter: blur(24px); }
.modal-header, .modal-footer { border-color: var(--nw-line); }
.code-input { min-height: 330px; font-family: "Cascadia Code", Consolas, monospace; font-size: 12px; line-height: 1.55; }
.toast-body { display: grid; gap: 3px; }
.toast-body strong { color: var(--nw-primary-bright); font-size: 11px; text-transform: uppercase; }
.toast-body span { font-size: 12px; }

.skeleton-grid:empty::before, .skeleton-lines:empty::before {
  display: block;
  width: 100%;
  min-height: 110px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(255,255,255,.025), rgba(255,255,255,.07), rgba(255,255,255,.025));
  background-size: 220% 100%;
  animation: skeleton 1.5s linear infinite;
  content: "";
}
@keyframes skeleton { to { background-position: -220% 0; } }

.empty-state { padding: 35px 18px; border: 1px dashed var(--nw-line-strong); border-radius: 16px; color: var(--nw-muted); text-align: center; }
.legend-dot { color: var(--nw-muted); font-size: 10px; }

@media (max-width: 1280px) {
  .asset-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .studio-layout { grid-template-columns: minmax(480px, 1fr) minmax(340px, .78fr); }
  .studio-toolbar { grid-template-columns: auto 1fr 1fr; }
  .studio-toolbar-actions { grid-column: 2 / -1; justify-content: flex-end; }
}

@media (max-width: 1099.98px) {
  :root { --nw-sidebar-width: 254px; }
  .main-stage { padding-right: 24px; padding-left: 24px; }
  .studio-layout { grid-template-columns: 1fr; }
  .studio-preview-column { position: static; }
  .discord-canvas, .json-panel { min-height: 420px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .asset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-105%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
  .sidebar.open { transform: none; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 1020; display: none; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); }
  .sidebar-backdrop.open { display: block; }
  .main-stage { margin-left: 0; }
  .topbar { min-height: 74px; }
}

@media (max-width: 767.98px) {
  .main-stage { padding: 0 14px 40px; }
  .topbar-actions .save-state, .user-chip span:last-child { display: none; }
  .user-chip { min-width: auto; padding: 5px; }
  .hero-panel { min-height: 300px; align-items: flex-start; flex-direction: column; }
  .hero-panel .btn { width: 100%; }
  .content-grid, .content-grid.two-one { grid-template-columns: 1fr; }
  .studio-toolbar { grid-template-columns: 1fr; }
  .studio-toolbar > *, .studio-toolbar-actions { grid-column: auto; }
  .studio-toolbar-actions { justify-content: stretch; }
  .studio-toolbar-actions .btn { flex: 1; }
  .form-grid.two, .form-grid.three { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading > .btn { width: 100%; }
  .card-grid, .asset-grid { grid-template-columns: 1fr 1fr; }
  .policy-header { display: none; }
  .policy-row { grid-template-columns: 1fr 1fr; }
  .policy-info { grid-column: 1 / -1; }
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 479.98px) {
  .topbar-title > span { display: none; }
  .topbar-actions { gap: 5px; }
  .metric-grid, .card-grid, .asset-grid { grid-template-columns: 1fr; }
  .discord-canvas { padding: 16px 10px; }
  .discord-message { grid-template-columns: 34px minmax(0, 1fr); gap: 8px; }
  .discord-avatar { width: 34px; height: 34px; }
  .discord-field.inline { grid-column: span 6; }
  .policy-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
