:root {
  color-scheme: dark;
  --bg: #0a0c10;
  --bg-2: #0f1318;
  --panel: #141922;
  --panel-2: #10141b;
  --panel-3: #0d1117;
  --line: #2a3340;
  --line-soft: rgba(255, 255, 255, 0.08);
  --text: #f4f7fb;
  --muted: #a7b0bf;
  --muted-2: #788292;
  --orange: #f2a51a;
  --cyan: #44b8de;
  --green: #35b46f;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  --core-nav-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--core-nav-height) + 18px);
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    var(--bg);
  background-size: 96px 96px;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  overflow-x: hidden;
  padding-top: var(--core-nav-height);
}

main,
.navbar,
.navbar-container,
.section,
.site-footer,
.template-preview-panel,
.webhook-storage-portal,
.editor-tools-portal {
  max-width: 100%;
}

body.is-ready .hero-content {
  animation: riseIn 520ms ease-out both;
}

body.is-language-switching main,
body.is-language-switching .site-footer {
  animation: languageFade 360ms ease both;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

a,
button,
input,
textarea,
select,
.button,
.rules-panel,
.template-card,
.webhook-save-card,
.site-tabs a,
.dropdown-link,
.footer-link {
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(10, 12, 16, 0.9);
  backdrop-filter: blur(14px);
}

.brand,
.main-nav,
.site-tabs,
.header-actions,
.language-switcher,
.hero-actions,
.site-footer,
.demo-pills {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  min-width: 120px;
  font-size: 1.06rem;
  font-weight: 900;
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.header-navs {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 15, 22, 0.78);
}

.nav-group > span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-2);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-tabs {
  gap: 4px;
}

.site-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 13px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.site-tabs a:hover,
.site-tabs a.is-active {
  color: #071015;
  background: var(--cyan);
}

.main-nav {
  gap: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.main-nav a {
  position: relative;
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 6px;
}

.main-nav a::after {
  content: none;
}

.main-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.header-actions {
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.language-switcher {
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1117;
}

.language-button {
  min-width: 38px;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.language-button:hover {
  color: var(--text);
}

.language-button.is-active {
  color: #111317;
  background: var(--orange);
}

.language-button.is-pending {
  animation: languageButton 360ms ease both;
}

.header-invite,
.header-server,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.header-invite {
  padding: 0 18px;
  color: #071015;
  background: var(--cyan);
}

.header-server {
  padding: 0 16px;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(16, 20, 27, 0.74);
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  min-height: var(--core-nav-height);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 12, 16, 0.92);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.navbar.is-scrolled {
  background: rgba(8, 10, 14, 0.98);
  border-color: rgba(68, 184, 222, 0.22);
}

.navbar-container {
  width: min(100%, 1380px);
  min-height: var(--core-nav-height);
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 36px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo-section {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.navbar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: contain;
}

.logo {
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 950;
  line-height: 1;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-menu,
.dropdown-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(10px, 1.1vw, 18px);
  min-width: 0;
  flex: 1 1 auto;
}

.nav-item {
  position: relative;
}

.nav-link,
.dropdown-toggle,
.dropdown-link,
.menu-back-btn {
  color: var(--text);
  text-decoration: none;
  font: inherit;
}

.nav-link,
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 2px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 850;
  white-space: nowrap;
  transition: color 170ms ease;
}

.nav-link:hover,
.dropdown-toggle:hover,
.nav-link.is-active,
.dropdown-toggle.is-active,
.nav-item.is-open > .dropdown-toggle {
  color: var(--cyan);
}

.dropdown-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.9em;
  font-size: 0.68rem;
  line-height: 1;
  transition: transform 170ms ease;
}

.nav-item.is-open > .dropdown-toggle .dropdown-arrow,
.nav-item:hover > .dropdown-toggle .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 230px;
  padding: 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(13, 17, 23, 0.985);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 170ms ease, transform 170ms ease, visibility 0s linear 170ms;
}

.dropdown-menu-right {
  left: auto;
  right: 0;
}

.nav-item:hover > .dropdown-menu,
.nav-item:focus-within > .dropdown-menu,
.nav-item.is-open > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}

.dropdown-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.dropdown-link,
.language-menu .language-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  padding: 9px 16px;
  border: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 780;
  transition: color 150ms ease, background 150ms ease;
}

.dropdown-link:hover,
.dropdown-link.is-active,
.language-menu .language-button:hover,
.language-menu .language-button.is-active {
  color: var(--cyan);
  background: rgba(68, 184, 222, 0.12);
}

.dropdown-link-accent {
  color: #061015;
  background: rgba(68, 184, 222, 0.9);
}

.dropdown-link-accent:hover {
  color: #061015;
  background: var(--cyan);
}

.language-selector {
  flex: 0 0 auto;
}

.lang-toggle {
  min-width: 64px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.language-menu {
  min-width: 92px;
}

.menu-back-item {
  display: none;
}

@media (max-width: 1120px) and (min-width: 769px) {
  .navbar-container {
    gap: 16px;
    padding: 0 16px;
  }

  .nav-menu {
    gap: 10px;
  }

  .logo {
    font-size: 1.25rem;
  }

  .nav-link,
  .dropdown-toggle {
    font-size: 0.92rem;
  }
}

@media (max-width: 768px) {
  :root {
    --core-nav-height: 64px;
  }

  body.menu-open {
    overflow: hidden;
  }

  .navbar {
    backdrop-filter: blur(12px);
  }

  .navbar-container {
    min-height: var(--core-nav-height);
    padding: 0 14px;
  }

  .navbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .logo {
    font-size: 1.14rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1001;
    width: min(88vw, 380px);
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: calc(var(--core-nav-height) + 14px) 0 22px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(9, 12, 17, 0.985);
    box-shadow: -20px 0 42px rgba(0, 0, 0, 0.38);
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease;
  }

  .nav-menu.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }

  .nav-menu > li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  }

  .menu-back-item {
    display: block;
    padding: 0 14px 12px;
    border-bottom: 0;
  }

  .menu-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
    cursor: pointer;
  }

  .nav-link,
  .dropdown-toggle {
    width: 100%;
    min-height: 52px;
    justify-content: space-between;
    padding: 0 18px;
    text-align: left;
    white-space: normal;
  }

  .dropdown-menu,
  .dropdown-menu-right {
    position: static;
    min-width: 0;
    padding: 0 0 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    display: none;
    transition: none;
  }

  .dropdown-menu::before {
    content: none;
  }

  .nav-item.is-open > .dropdown-menu {
    display: block;
    animation: navDropdownIn 180ms ease both;
  }

  .dropdown-link,
  .language-menu .language-button {
    min-height: 44px;
    padding: 10px 18px 10px 34px;
    white-space: normal;
  }

  .language-selector {
    padding-bottom: 12px;
  }

  .lang-toggle {
    border: 0;
    border-radius: 0;
    background: transparent;
  }
}

@media (max-width: 480px) {
  :root {
    --core-nav-height: 58px;
  }

  .navbar-container {
    padding: 0 10px;
  }

  .navbar-avatar {
    width: 30px;
    height: 30px;
  }

  .logo {
    font-size: 1rem;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .nav-menu {
    width: min(92vw, 330px);
  }
}

.hero {
  position: relative;
  min-height: 690px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background-image:
    linear-gradient(90deg, rgba(10, 12, 16, 0.98) 0%, rgba(10, 12, 16, 0.86) 48%, rgba(10, 12, 16, 0.35) 100%),
    url("hero-core.webp");
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(10, 12, 16, 0), var(--bg));
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(710px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 112px);
  padding: 72px 0 112px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 680px;
  margin: 0;
  font-size: 6.1rem;
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy {
  width: min(650px, 100%);
  margin: 26px 0 0;
  color: #d5dde8;
  font-size: 1.17rem;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.button {
  min-width: 176px;
  padding: 0 22px;
  border: 1px solid transparent;
}

.button.primary {
  color: #111317;
  background: var(--orange);
}

.button.secondary {
  color: var(--text);
  border-color: var(--line);
  background: rgba(16, 20, 27, 0.74);
}

.button:hover,
.header-invite:hover,
.header-server:hover {
  transform: translateY(-2px);
}

.button.secondary:hover {
  border-color: rgba(68, 184, 222, 0.55);
}

.header-server:hover {
  border-color: rgba(68, 184, 222, 0.55);
}

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 92px 0;
}

.vote-section {
  width: 100%;
  margin: 0;
  padding: 54px 0;
  border-top: 1px solid rgba(242, 165, 26, 0.26);
  border-bottom: 1px solid rgba(68, 184, 222, 0.2);
  background:
    linear-gradient(90deg, rgba(242, 165, 26, 0.12), rgba(68, 184, 222, 0.1)),
    #0d1218;
}

.vote-panel {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.vote-copy {
  width: min(690px, 100%);
}

.vote-copy h2 {
  margin: 0;
  font-size: 2.42rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.vote-copy p:not(.eyebrow) {
  margin: 12px 0 0;
  color: #dce4ef;
  font-size: 1.03rem;
}

.vote-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.vote-button {
  min-width: 196px;
}

.section-heading {
  width: min(760px, 100%);
  margin-bottom: 34px;
}

.section-heading.centered {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading h2,
.safety-panel h2,
.final-card h2 {
  margin: 0;
  font-size: 3.18rem;
  line-height: 1.06;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.safety-panel p,
.final-card p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
}

[data-reveal].is-visible {
  animation: riseIn 520ms ease-out both;
}

.copy-tool-panel[data-reveal] {
  opacity: 1;
  transform: none;
}

.commands-section {
  padding-top: 78px;
}

.command-shell {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(360px, 1.1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-3);
  box-shadow: var(--shadow);
}

.command-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
  padding: 16px;
  border-right: 1px solid var(--line);
  background: #0c1016;
}

.command-button {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 64px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.command-button:hover {
  color: var(--text);
  background: #121820;
}

.command-button.is-active {
  color: var(--text);
  border-color: rgba(68, 184, 222, 0.45);
  background: #151d27;
}

.command-button code,
.command-name {
  overflow: hidden;
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.command-panel {
  min-height: 456px;
  padding: 32px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    var(--panel);
  background-size: 56px 56px;
}

.command-panel.is-swapping {
  animation: commandSwap 320ms ease both;
}

.live-simulation {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(68, 184, 222, 0.24);
  border-radius: 8px;
  background: #0b1017;
}

.sim-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.sim-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #111317;
  background: var(--orange);
  font-weight: 900;
}

.sim-core {
  color: #071015;
  background: var(--cyan);
}

.sim-bubble {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.sim-name {
  display: block;
  margin-bottom: 8px;
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.slash-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 10px;
  border: 1px solid rgba(68, 184, 222, 0.28);
  border-radius: 8px;
  background: #111720;
}

.slash-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: #111317;
  background: var(--cyan);
  font-weight: 900;
}

.sim-bot-row {
  opacity: 0;
  transform: translateY(10px);
}

.command-shell.is-running .sim-bot-row {
  animation: simBotIn 340ms ease forwards;
}

.sim-bot-bubble {
  background: rgba(68, 184, 222, 0.045);
}

.sim-status {
  margin-bottom: 12px;
  color: #dce5ef;
}

.sim-card {
  opacity: 0;
  transform: translateY(8px);
  padding: 14px;
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  background: #151b24;
}

.command-shell.is-running .sim-card {
  animation: simCardIn 360ms ease forwards;
  animation-delay: 170ms;
}

.sim-card-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.sim-card-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sim-card-head small {
  flex: 0 0 auto;
  color: var(--muted-2);
  font-weight: 800;
}

.sim-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.sim-artifact {
  margin-top: 14px;
}

.sim-file,
.sim-tree-row,
.sim-snapshot p,
.sim-created-list div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.sim-file span,
.sim-tree-row span,
.sim-created-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 26px;
  border-radius: 6px;
  color: #111317;
  background: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
}

.sim-file strong,
.sim-file small {
  display: block;
}

.sim-file small {
  color: var(--muted-2);
}

.sim-tree,
.sim-created-list,
.sim-snapshot {
  display: grid;
  gap: 8px;
}

.sim-tree-row p,
.sim-created-list p,
.sim-snapshot p {
  margin: 0;
}

.sim-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.sim-actions.is-empty {
  display: none;
}

.sim-actions span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  color: #111317;
  background: var(--orange);
  font-weight: 900;
}

.sim-actions span + span {
  color: var(--text);
  background: #242b35;
}

.sim-progress {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.sim-progress-line {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  overflow: hidden;
  color: #dce5ef;
}

.sim-progress-line span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted-2);
}

.sim-progress-line p {
  margin: 0;
}

.sim-progress-line i {
  position: absolute;
  left: 28px;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--cyan);
}

.command-shell.is-running .sim-progress-line {
  animation: simProgressLine 520ms ease both;
}

.command-shell.is-running .sim-progress-line i {
  animation: workProgress 720ms ease both;
}

.command-shell.is-running .sim-progress-line:nth-child(1),
.command-shell.is-running .sim-progress-line:nth-child(1) i {
  animation-delay: 520ms;
}

.command-shell.is-running .sim-progress-line:nth-child(2),
.command-shell.is-running .sim-progress-line:nth-child(2) i {
  animation-delay: 780ms;
}

.command-shell.is-running .sim-progress-line:nth-child(3),
.command-shell.is-running .sim-progress-line:nth-child(3) i {
  animation-delay: 1040ms;
}

.command-shell.is-running .sim-artifact > *,
.command-shell.is-running .sim-actions span {
  animation: simArtifactIn 360ms ease both;
  animation-delay: 1320ms;
}

.command-shell.is-running .sim-created-list div,
.command-shell.is-running .sim-tree-row,
.command-shell.is-running .sim-snapshot p {
  animation: simArtifactIn 360ms ease both;
  animation-delay: 1320ms;
}

.command-shell.is-running .sim-created-list div:nth-child(2),
.command-shell.is-running .sim-tree-row:nth-child(2),
.command-shell.is-running .sim-actions span:nth-child(2) {
  animation-delay: 1420ms;
}

.command-shell.is-running .sim-created-list div:nth-child(3),
.command-shell.is-running .sim-tree-row:nth-child(3) {
  animation-delay: 1520ms;
}

.panel-kicker {
  margin: 0 0 10px;
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.command-terminal {
  overflow: hidden;
  border: 1px solid rgba(68, 184, 222, 0.28);
  border-radius: 8px;
  background: #0b1017;
}

.terminal-bar {
  display: flex;
  gap: 7px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.terminal-bar span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--line);
}

.terminal-bar span:first-child {
  background: var(--orange);
}

.terminal-bar span:nth-child(2) {
  background: var(--cyan);
}

.terminal-bar span:nth-child(3) {
  background: var(--green);
}

.terminal-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 12px;
}

.terminal-label {
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.typed-command {
  min-width: 1ch;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.typing-cursor {
  width: 8px;
  height: 20px;
  border-radius: 2px;
  background: var(--cyan);
  opacity: 0.85;
}

.command-shell.is-typing .typing-cursor {
  animation: cursorBlink 680ms steps(2, end) infinite;
}

.command-title {
  margin: 22px 0 0;
  font-size: 2.1rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.command-description,
.command-result {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--muted);
}

.work-animation {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.work-line {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  color: #dce5ef;
  background: rgba(255, 255, 255, 0.03);
}

.work-line i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--cyan);
}

.work-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted-2);
}

.command-shell.is-running .work-line {
  animation: workStep 900ms ease both;
}

.command-shell.is-running .work-line i {
  animation: workProgress 900ms ease both;
}

.command-shell.is-running .work-line:nth-child(2),
.command-shell.is-running .work-line:nth-child(2) i {
  animation-delay: 90ms;
}

.command-shell.is-running .work-line:nth-child(3),
.command-shell.is-running .work-line:nth-child(3) i {
  animation-delay: 180ms;
}

.command-result {
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.benefit-card {
  min-height: 245px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.benefit-card:hover {
  transform: translateY(-4px);
  border-color: rgba(68, 184, 222, 0.38);
  background: #171e28;
}

.benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 28px;
  border-radius: 8px;
  color: #091015;
  background: var(--cyan);
  font-weight: 900;
}

.benefit-card:nth-child(2) .benefit-icon {
  background: var(--orange);
}

.benefit-card:nth-child(3) .benefit-icon {
  background: var(--green);
}

.benefit-card:nth-child(4) .benefit-icon {
  color: var(--text);
  background: #6871e8;
}

.benefit-card h3 {
  margin: 0 0 10px;
  font-size: 1.22rem;
}

.benefit-card p {
  margin: 0;
  color: var(--muted);
}

.templates-section {
  padding-top: 74px;
}

.templates-page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 88px;
  padding-bottom: 36px;
}

.templates-page-hero h1 {
  margin: 0;
  font-size: 4.1rem;
  line-height: 1.02;
  letter-spacing: 0;
}

.tool-page {
  min-height: calc(100vh - 72px);
}

.tool-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 88px;
  padding-bottom: 32px;
}

.tool-hero .section-heading {
  max-width: 820px;
}

.tool-hero h1 {
  margin: 0;
  font-size: 4.7rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.tool-hero p:not(.eyebrow) {
  max-width: 730px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.copy-tool-section {
  padding-top: 8px;
  padding-bottom: 88px;
}

.copy-tool-panel {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(68, 184, 222, 0.08), transparent 32%),
    linear-gradient(315deg, rgba(242, 165, 26, 0.07), transparent 34%),
    #0d1117;
  box-shadow: var(--shadow);
}

.copy-tool-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.copy-tool-toolbar label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.copy-tool-toolbar span,
.copy-tool-heading span {
  color: var(--muted-2);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.copy-tool-toolbar input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(8, 11, 16, 0.9);
  outline: none;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.copy-tool-toolbar input:focus {
  border-color: rgba(68, 184, 222, 0.72);
  background: #0b1017;
  box-shadow: 0 0 0 3px rgba(68, 184, 222, 0.12);
}

.copy-tool-toolbar strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 124px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(16, 20, 27, 0.82);
  white-space: nowrap;
}

.copy-tool-tabs {
  display: flex;
  gap: 8px;
  max-width: 100%;
  padding-bottom: 2px;
  overflow-x: auto;
}

.copy-tool-tabs button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(16, 20, 27, 0.78);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 180ms ease, color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.copy-tool-tabs button:hover {
  transform: translateY(-2px);
  color: var(--text);
  border-color: rgba(68, 184, 222, 0.42);
}

.copy-tool-tabs button.is-active {
  color: #071015;
  border-color: transparent;
  background: var(--cyan);
}

.copy-tool-results,
.copy-tool-recent {
  display: grid;
  gap: 18px;
}

.copy-tool-group {
  display: grid;
  gap: 10px;
}

.copy-tool-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 9px;
  border-bottom: 1px solid var(--line-soft);
}

.copy-tool-heading h2 {
  margin: 0;
  font-size: 1rem;
}

.copy-token-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  gap: 8px;
}

.copy-token {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 54px;
  height: 54px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--text);
  background: #111720;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.copy-token span {
  display: block;
  width: 100%;
  max-width: 48px;
  overflow: hidden;
  font-size: 1.7rem;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.copy-token-image {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
  pointer-events: none;
}

.copy-token.is-hidden {
  display: none;
}

.copy-token:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 165, 26, 0.48);
  background: #171f2a;
}

.copy-token:active {
  transform: translateY(0);
}

.copy-token.is-copied {
  border-color: rgba(53, 180, 111, 0.76);
  background: rgba(53, 180, 111, 0.14);
  box-shadow: inset 0 0 0 1px rgba(53, 180, 111, 0.24);
}

.copy-tool-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 220;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100vw - 44px));
  padding: 12px 14px;
  border: 1px solid rgba(53, 180, 111, 0.48);
  border-radius: 8px;
  color: var(--text);
  background: rgba(11, 16, 22, 0.96);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.copy-toast::before {
  content: "OK";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #071015;
  background: var(--green);
  font-size: 0.72rem;
  font-weight: 950;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.core-input,
.core-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(8, 11, 16, 0.92);
  outline: none;
  transition: border-color 170ms ease, box-shadow 170ms ease, background 170ms ease;
}

.core-input {
  min-height: 46px;
  padding: 0 13px;
}

.core-textarea {
  min-height: 104px;
  padding: 12px 13px;
  resize: vertical;
}

.core-input:focus,
.core-textarea:focus {
  border-color: rgba(68, 184, 222, 0.72);
  background: #0b1017;
  box-shadow: 0 0 0 3px rgba(68, 184, 222, 0.12);
}

.field,
.toggle-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field > span,
.toggle-field span,
.editor-block-heading span,
.command-help-search span,
.command-doc-grid span {
  color: var(--muted-2);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.field small {
  justify-self: end;
  color: var(--muted-2);
  font-size: 0.76rem;
}

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

.webhook-section,
.command-help-section {
  padding-top: 8px;
  padding-bottom: 88px;
}

.webhook-page .tool-hero,
.webhook-page .webhook-section {
  width: min(100% - 36px, 1540px);
}

.webhook-page .tool-hero {
  padding-bottom: 34px;
}

.webhook-page .section-heading {
  width: min(760px, 100%);
}

.webhook-message-builder {
  min-width: 0;
}

.compact-tool-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 32px;
}

.status-page {
  min-height: calc(100vh - 72px);
}

.status-page .tool-hero {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.status-page .tool-hero .section-heading {
  width: min(920px, 100%);
  max-width: 920px;
  margin-inline: auto;
}

.status-page .tool-hero .eyebrow,
.status-page .tool-hero p:not(.eyebrow) {
  display: none;
}

.status-section {
  padding-top: 0;
}

.status-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(280px, 0.84fr);
  gap: 18px;
  margin-bottom: 24px;
}

.status-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 20, 29, 0.94);
  box-shadow: var(--shadow);
}

.status-card h2 {
  margin: 0;
  font-size: 1.42rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.status-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.status-pill {
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid rgba(68, 184, 222, 0.28);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(68, 184, 222, 0.1);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.status-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.status-checks span {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 850;
  text-align: center;
}

.status-note {
  border-left: 3px solid var(--cyan);
}

.status-frame-wrap {
  overflow: hidden;
  min-height: 720px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f141d;
  box-shadow: var(--shadow);
}

.status-frame {
  display: block;
  width: 100%;
  min-height: 720px;
  border: 0;
  background: #ffffff;
}

.discord-tool-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
  gap: 18px;
  padding-top: 0;
}

.discord-tool-panel,
.timestamp-card,
.markdown-tool-card {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.discord-tool-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
}

.timestamp-results,
.markdown-tool-list {
  display: grid;
  gap: 10px;
}

.timestamp-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.timestamp-card div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.timestamp-card strong {
  font-family: "Cascadia Mono", "Consolas", monospace;
}

.timestamp-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.timestamp-card:hover,
.timestamp-card:focus-visible {
  border-color: rgba(68, 184, 222, 0.56);
  background: rgba(68, 184, 222, 0.07);
  outline: none;
}

.timestamp-card button,
.markdown-tool-card button {
  min-height: 36px;
  border: 1px solid rgba(68, 184, 222, 0.34);
  border-radius: 7px;
  color: var(--text);
  background: rgba(68, 184, 222, 0.08);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.markdown-tool-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 0;
}

.markdown-tool-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.markdown-tool-card pre {
  min-height: 74px;
  margin: 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  color: var(--text);
  background: #090d13;
  font-family: "Cascadia Mono", "Consolas", monospace;
  white-space: pre-wrap;
}

.advanced-tool-grid {
  grid-template-columns: minmax(320px, 0.86fr) minmax(420px, 1.14fr);
}

.tool-output-panel {
  min-height: 100%;
}

.tool-output-panel h2 {
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tool-actions.is-bottom {
  align-self: end;
}

.tool-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-weight: 800;
}

.tool-toggle-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tool-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.timestamp-card.is-active {
  border-color: rgba(68, 184, 222, 0.7);
  background: rgba(68, 184, 222, 0.1);
}

.timestamp-card code {
  max-width: 54%;
  overflow: hidden;
  color: var(--text);
  font-family: "Cascadia Mono", "Consolas", monospace;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-timestamp-results {
  max-height: 340px;
  overflow: auto;
  padding-right: 2px;
}

.discord-color-preview,
.discord-markdown-preview {
  min-height: 180px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: #dcdee4;
  background: #313338;
  font-family: "Inter", "Segoe UI", sans-serif;
  line-height: 1.55;
}

.discord-color-preview span {
  border-radius: 3px;
  padding: 1px 2px;
}

.discord-markdown-preview h2,
.discord-markdown-preview h3,
.discord-markdown-preview h4 {
  margin: 0 0 8px;
  color: #f2f3f5;
}

.discord-markdown-preview blockquote {
  margin: 6px 0;
  padding-left: 12px;
  border-left: 4px solid #4e5058;
  color: #dbdee1;
}

.discord-markdown-preview code,
.discord-markdown-preview pre {
  border-radius: 4px;
  background: #1e1f22;
  font-family: "Cascadia Mono", "Consolas", monospace;
}

.discord-markdown-preview code {
  padding: 2px 4px;
}

.discord-markdown-preview pre {
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.discord-markdown-preview a {
  color: #00a8fc;
}

.discord-spoiler {
  border-radius: 3px;
  color: transparent;
  background: #111214;
}

.discord-spoiler:hover {
  color: #dbdee1;
  background: #3f4147;
}

.discord-list-line {
  margin: 2px 0;
}

.markdown-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.markdown-toolbar button {
  min-height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.markdown-toolbar button:hover {
  border-color: rgba(68, 184, 222, 0.55);
  background: rgba(68, 184, 222, 0.09);
  transform: translateY(-1px);
}

.webhook-page .rules-editor {
  grid-template-columns: minmax(260px, 0.68fr) minmax(470px, 1.15fr) minmax(380px, 0.95fr);
}

.webhook-page .rules-panel {
  box-shadow: none;
}

.webhook-workspace {
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(380px, 1.08fr);
  gap: 18px;
  align-items: start;
}

.webhook-editor,
.webhook-preview-panel,
.command-help-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1117;
  box-shadow: var(--shadow);
}

.webhook-editor {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.editor-block {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.editor-block-main {
  background:
    linear-gradient(140deg, rgba(68, 184, 222, 0.1), transparent 38%),
    rgba(255, 255, 255, 0.028);
}

.editor-block-heading,
.embed-editor-head,
.embed-fields-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.editor-block-heading strong {
  color: var(--text);
  font-size: 1.02rem;
}

.embed-editor.is-collapsed > :not(.rules-mini-actions),
.component-block.is-collapsed > :not(.component-block-heading) {
  display: none !important;
}

.component-collapse-btn,
[data-toggle-embed-collapse] {
  min-width: 34px;
  padding-inline: 0;
  font-family: "Cascadia Mono", "Consolas", monospace;
}

.embed-list,
.link-button-list,
.embed-fields {
  display: grid;
  gap: 12px;
}

.embed-editor,
.link-button-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(10, 14, 20, 0.72);
}

.embed-editor-head strong,
.embed-fields-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-mini-action,
.editor-action {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  font-weight: 850;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

.editor-mini-action {
  padding: 0 10px;
  font-size: 0.82rem;
}

.editor-action {
  width: 100%;
  padding: 0 14px;
}

.editor-mini-action:hover,
.editor-action:hover {
  color: var(--cyan);
  border-color: rgba(68, 184, 222, 0.48);
  background: rgba(68, 184, 222, 0.08);
}

.editor-action:disabled,
.editor-mini-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.color-input {
  padding: 5px;
}

.embed-field-editor {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.1fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.toggle-field {
  align-content: center;
  grid-template-columns: auto auto;
  align-items: center;
  min-height: 46px;
}

.toggle-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
}

.webhook-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.webhook-actions .button {
  min-width: 150px;
  cursor: pointer;
}

.webhook-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
}

.webhook-status[data-tone="error"] {
  color: #ff8d7d;
}

.webhook-status[data-tone="success"] {
  color: #76e0a4;
}

.webhook-status[data-tone="progress"] {
  color: var(--cyan);
}

.webhook-preview-panel {
  position: sticky;
  top: calc(var(--core-nav-height) + 18px);
  display: grid;
  gap: 14px;
  padding: 16px;
}

.discord-webhook-preview,
.payload-card,
.discord-command-window,
.command-doc-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #111720;
}

.discord-preview-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #dfe7f2;
}

.discord-preview-top span {
  color: var(--muted-2);
  font-size: 1.25rem;
  font-weight: 900;
}

.discord-message-preview {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  min-height: 290px;
  padding: 18px;
  background: #10151d;
}

.discord-message-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 50%;
  color: #071015;
  background: var(--cyan);
  font-weight: 950;
}

.discord-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discord-message-main {
  min-width: 0;
}

.discord-message-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.discord-message-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-message-head span {
  padding: 1px 4px;
  border-radius: 3px;
  color: #071015;
  background: var(--cyan);
  font-size: 0.62rem;
  font-weight: 950;
}

.discord-message-head time {
  color: var(--muted-2);
  font-size: 0.75rem;
}

.discord-message-content {
  color: #d9e2ee;
  overflow-wrap: anywhere;
}

.discord-message-content p,
.embed-description p,
.embed-field-preview-list p {
  margin: 0 0 6px;
}

.discord-message-content h2,
.embed-description h2 {
  margin: 3px 0 8px;
  font-size: 1.28rem;
  line-height: 1.18;
}

.discord-message-content h3,
.embed-description h3,
.discord-message-content h4,
.embed-description h4 {
  margin: 3px 0 8px;
  font-size: 1.05rem;
  line-height: 1.2;
}

.discord-message-content code,
.embed-description code,
.embed-field-preview-list code,
.help-input-line code,
.command-help-item code,
.command-doc-grid code {
  padding: 2px 5px;
  border-radius: 5px;
  color: #dff6ff;
  background: rgba(0, 0, 0, 0.28);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.discord-message-content a,
.embed-description a,
.discord-embed-preview h3 a {
  color: #7bd3ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.discord-bullet {
  position: relative;
  padding-left: 16px;
}

.discord-bullet::before {
  content: "•";
  position: absolute;
  left: 3px;
  color: var(--muted);
}

.empty-preview {
  color: var(--muted-2);
}

.discord-embed-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.discord-embed-preview {
  position: relative;
  display: grid;
  gap: 8px;
  max-width: 520px;
  min-width: 0;
  padding: 13px 13px 13px 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 4px solid var(--embed-color, var(--cyan));
  border-radius: 8px;
  background: #171d27;
}

.discord-embed-preview h3 {
  margin: 0;
  font-size: 1rem;
}

.embed-author,
.discord-embed-preview footer {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.embed-thumbnail {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}

.embed-thumbnail ~ .embed-description,
.embed-thumbnail ~ .embed-field-preview-list {
  padding-right: 86px;
}

.embed-image {
  width: min(100%, 420px);
  max-height: 260px;
  object-fit: cover;
  border-radius: 8px;
}

.embed-field-preview-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.embed-field-preview-list div:not(.is-inline) {
  grid-column: 1 / -1;
}

.embed-field-preview-list strong {
  display: block;
  margin-bottom: 3px;
  overflow-wrap: anywhere;
}

.discord-link-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.discord-link-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  color: #fff;
  background: #5865f2;
  font-size: 0.88rem;
  font-weight: 850;
}

.discord-link-buttons a::after {
  content: "↗";
  margin-left: 7px;
  font-size: 0.8em;
}

.payload-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.payload-card pre {
  max-height: 360px;
  margin: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  color: #dff6ff;
  background: #080c12;
  font-size: 0.82rem;
}

.webhook-toast {
  pointer-events: none;
}

.command-help-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(460px, 1.18fr);
  overflow: hidden;
}

.command-help-sidebar {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
  border-right: 1px solid var(--line);
  background: #0b1017;
}

.command-help-search label {
  display: grid;
  gap: 8px;
}

.command-help-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.command-help-categories button,
.command-help-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.command-help-categories button {
  min-height: 36px;
  padding: 0 12px;
  font-weight: 850;
}

.command-help-categories button:hover,
.command-help-categories button.is-active,
.command-help-item:hover,
.command-help-item.is-active {
  color: var(--text);
  border-color: rgba(68, 184, 222, 0.42);
  background: rgba(68, 184, 222, 0.1);
}

.command-help-list {
  display: grid;
  gap: 8px;
  max-height: 820px;
  overflow: auto;
  padding-right: 4px;
}

.command-help-item {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 82px;
  padding: 12px;
  text-align: left;
}

.command-help-item code {
  width: fit-content;
  max-width: 100%;
  color: var(--cyan);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-help-item strong,
.command-help-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-help-item span {
  color: var(--muted-2);
  font-size: 0.86rem;
}

.command-help-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.command-help-detail {
  min-width: 0;
  display: grid;
  gap: 16px;
  padding: 16px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    #101620;
  background-size: 56px 56px;
}

.discord-command-titlebar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.discord-command-titlebar span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 18px 0 0 var(--cyan), 36px 0 0 var(--green);
}

.discord-command-titlebar strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-command-titlebar small {
  color: var(--muted-2);
  font-weight: 850;
}

.discord-command-chat {
  display: grid;
  gap: 16px;
  min-height: 420px;
  padding: 18px;
  background: #111720;
}

.discord-help-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.help-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #111317;
  font-weight: 950;
}

.user-avatar {
  background: var(--orange);
}

.bot-avatar {
  background: var(--cyan);
}

.help-author {
  margin-bottom: 7px;
  color: var(--text);
  font-weight: 900;
}

.help-author span {
  display: inline-flex;
  margin-left: 6px;
  padding: 1px 4px;
  border-radius: 3px;
  color: #071015;
  background: var(--cyan);
  font-size: 0.62rem;
}

.help-input-line {
  display: grid;
  grid-template-columns: 28px minmax(0, auto) 8px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(68, 184, 222, 0.32);
  border-radius: 8px;
  background: #0c1119;
}

.help-input-line > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: #071015;
  background: var(--cyan);
  font-weight: 950;
}

.help-input-line code {
  max-width: min(620px, 62vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
}

.help-input-line i {
  width: 2px;
  height: 22px;
  margin-left: 4px;
  background: var(--text);
  animation: cursorBlink 900ms steps(2, start) infinite;
}

.bot-row {
  opacity: 0;
  transform: translateY(10px);
}

.bot-row.is-visible,
.command-help-detail.is-running .bot-row {
  animation: simBotIn 280ms ease forwards;
}

.help-bot-message {
  min-width: 0;
}

.help-components-card {
  max-width: 690px;
  padding: 14px;
  border: 1px solid rgba(68, 184, 222, 0.24);
  border-left: 4px solid var(--cyan);
  border-radius: 8px;
  background: #151c26;
}

.help-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.help-card-header strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.help-card-header small {
  color: var(--muted-2);
  font-weight: 900;
}

.help-components-card > p {
  margin: 10px 0 0;
  color: var(--muted);
}

.help-artifact {
  margin-top: 14px;
}

.help-tree-artifact,
.help-message-artifact,
.help-role-artifact,
.help-stars-artifact {
  display: grid;
  gap: 8px;
}

.help-tree-artifact p,
.help-message-artifact p,
.help-file-artifact,
.help-role-artifact span,
.help-stars-artifact strong {
  display: grid;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.help-tree-artifact p,
.help-file-artifact {
  grid-template-columns: 42px minmax(0, 1fr);
}

.help-tree-artifact span,
.help-file-artifact > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 26px;
  border-radius: 6px;
  color: #071015;
  background: var(--orange);
  font-size: 0.72rem;
  font-weight: 950;
}

.help-file-artifact strong,
.help-file-artifact small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.help-file-artifact small {
  color: var(--muted-2);
}

.help-role-artifact span {
  grid-template-columns: 14px minmax(0, 1fr);
}

.help-role-artifact span::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--role-color, var(--cyan));
}

.help-stars-artifact .stars-main {
  color: var(--orange);
  font-size: 1.4rem;
}

.help-progress {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.help-progress-row {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 32px;
  overflow: hidden;
  opacity: 0.55;
}

.command-help-detail.is-running .help-progress-row {
  animation: simProgressLine 420ms ease forwards;
  animation-delay: calc(var(--step) * 210ms + 220ms);
}

.help-progress-row span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--muted-2);
}

.help-progress-row p {
  margin: 0;
  color: #dce5ef;
}

.help-progress-row i {
  position: absolute;
  left: 28px;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--green);
}

.command-help-detail.is-running .help-progress-row i {
  animation: workProgress 520ms ease both;
  animation-delay: calc(var(--step) * 210ms + 300ms);
}

.command-doc-card {
  padding: 20px;
}

.command-doc-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.command-doc-heading h2,
.command-doc-heading p {
  margin: 0;
}

.command-doc-heading h2 {
  font-size: 1.72rem;
  line-height: 1.1;
}

.command-doc-heading p:not(.eyebrow) {
  color: var(--muted);
}

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

.command-doc-grid section {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.026);
}

.command-doc-grid p {
  margin: 0;
  color: #d9e2ee;
}

.command-doc-grid [data-help-usage],
.command-doc-grid [data-help-params] {
  display: grid;
  gap: 8px;
}

.command-doc-grid code {
  display: block;
  overflow-wrap: anywhere;
  white-space: normal;
}

.legal-hero {
  padding-bottom: 42px;
}

.legal-hero h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 1.02;
}

.legal-hero p:not(.eyebrow) {
  max-width: 780px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.legal-document {
  display: grid;
  gap: 16px;
  padding-top: 0;
}

.legal-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.92);
  box-shadow: var(--shadow);
}

.legal-card h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
}

.legal-card p {
  margin: 0;
  color: #d4dce8;
}

.legal-card p + p {
  margin-top: 12px;
}

.legal-contact a {
  color: var(--cyan);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.rules-editor-section {
  padding-top: 8px;
  padding-bottom: 88px;
}

.rules-editor {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(420px, 1.12fr) minmax(360px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.rules-left-column {
  display: grid;
  gap: 16px;
  align-content: start;
}

.rules-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.92);
  box-shadow: var(--shadow);
}

.rules-settings {
  grid-column: auto;
}

.rules-preview-panel {
  position: sticky;
  top: calc(var(--core-nav-height) + 18px);
  max-height: calc(100vh - var(--core-nav-height) - 36px);
  max-height: calc(100dvh - var(--core-nav-height) - 36px);
  overflow: auto;
  grid-column: auto;
}

.rules-edit-panel {
  min-width: 0;
}

.rules-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.rules-panel-heading span {
  color: var(--muted-2);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rules-panel-heading strong {
  color: var(--text);
  font-size: 0.9rem;
}

.rules-panel-heading button,
.rules-mini-actions button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #111720;
  cursor: pointer;
}

.rules-field {
  display: grid;
  gap: 7px;
}

.rules-field span,
.rules-check span {
  color: var(--muted-2);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rules-field input,
.rules-field textarea,
.rules-field select {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #0b1017;
  outline: none;
  resize: vertical;
}

.rules-field input[type="color"] {
  min-height: 44px;
  padding: 4px;
}

.rules-field textarea {
  line-height: 1.45;
}

.rules-field select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 15px center / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) right 10px center / 6px 6px no-repeat,
    #0b1017;
  cursor: pointer;
}

.rules-field textarea[data-message-raw] {
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 0.82rem;
}

.rules-field input:focus,
.rules-field textarea:focus {
  border-color: rgba(68, 184, 222, 0.72);
  box-shadow: 0 0 0 3px rgba(68, 184, 222, 0.12);
}

.rules-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rules-actions,
.rules-mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rules-storage-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.rules-storage-tabs button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 900;
}

.rules-storage-tabs button:hover,
.rules-storage-tabs button.is-active {
  color: var(--text);
  border-color: rgba(68, 184, 222, 0.36);
  background: rgba(68, 184, 222, 0.1);
}

.webhook-thread-settings,
.embed-time-picker {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

body.is-webhook-storage-open {
  overflow: hidden;
}

body.is-editor-tools-open {
  overflow: hidden;
}

[data-storage-section="saves"] {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
}

[data-storage-section="saves"][hidden] {
  display: none !important;
}

.webhook-storage-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(5, 8, 12, 0.74);
  backdrop-filter: blur(14px);
  cursor: default;
  animation: storageFadeIn 180ms ease both;
}

.webhook-storage-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1080px, calc(100vw - 28px));
  min-width: 0;
  max-height: min(760px, calc(100dvh - 28px));
  overflow: hidden;
  border: 1px solid rgba(68, 184, 222, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(68, 184, 222, 0.08), transparent 30%),
    var(--panel-2);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.55);
  animation: storageDialogIn 220ms ease both;
}

.webhook-storage-dialog.is-expanded {
  width: min(1480px, calc(100vw - 18px));
  height: calc(100dvh - 18px);
  max-height: calc(100dvh - 18px);
}

.webhook-storage-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px clamp(18px, 3vw, 28px);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.025);
}

.webhook-storage-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.webhook-storage-header span {
  color: var(--muted-2);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.webhook-storage-header h2 {
  margin: 2px 0 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.1;
}

.webhook-storage-close {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
}

.webhook-storage-close:hover {
  border-color: rgba(255, 141, 125, 0.5);
  background: rgba(255, 141, 125, 0.08);
}

.webhook-storage-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(360px, 1.22fr);
  grid-template-areas:
    "copy list"
    "create list";
  gap: 16px;
  min-height: 0;
  overflow: auto;
  padding: clamp(16px, 2.6vw, 28px);
}

.webhook-storage-copy {
  grid-area: copy;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px;
  border: 1px solid rgba(242, 165, 26, 0.24);
  border-radius: 8px;
  background: rgba(242, 165, 26, 0.07);
}

.webhook-storage-copy strong {
  color: var(--text);
}

.webhook-storage-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.webhook-storage-create {
  grid-area: create;
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.webhook-storage-actions .button {
  flex: 1 1 165px;
}

.webhook-storage-status {
  min-height: 22px;
  color: #76e0a4;
  font-size: 0.9rem;
  font-weight: 800;
}

.webhook-storage-status[data-tone="error"] {
  color: #ff8d7d;
}

.webhook-save-list-wrap {
  grid-area: list;
  min-height: 0;
}

.webhook-save-list {
  display: grid;
  gap: 10px;
}

.webhook-save-card,
.webhook-save-empty {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.webhook-save-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.webhook-save-card > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.webhook-save-card strong,
.webhook-save-card span,
.webhook-save-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.webhook-save-card strong {
  color: var(--text);
}

.webhook-save-card span,
.webhook-save-card small {
  color: var(--muted);
  font-size: 0.82rem;
}

.webhook-save-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: min(320px, 38vw);
}

.webhook-save-actions button {
  min-height: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
}

.webhook-save-actions button:hover {
  border-color: rgba(68, 184, 222, 0.36);
  background: rgba(68, 184, 222, 0.08);
}

.webhook-save-empty {
  padding: 16px;
  color: var(--muted);
}

.editor-tools-portal {
  position: fixed;
  inset: 0;
  z-index: 5000;
}

.editor-tools-portal[hidden] {
  display: none !important;
}

.editor-tools-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(5, 8, 12, 0.68);
  backdrop-filter: blur(12px);
  cursor: default;
  animation: storageFadeIn 180ms ease both;
}

.editor-tools-drawer {
  position: absolute;
  top: var(--core-nav-height);
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(540px, calc(100vw - 18px));
  border-left: 1px solid rgba(68, 184, 222, 0.24);
  background:
    linear-gradient(135deg, rgba(68, 184, 222, 0.08), transparent 32%),
    var(--panel-2);
  box-shadow: -26px 0 70px rgba(0, 0, 0, 0.42);
  animation: editorToolsIn 220ms ease both;
}

.editor-tools-body {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.editor-tool-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.editor-tool-card h3 {
  margin: 0;
  font-size: 1rem;
}

.markdown-snippet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.markdown-snippet-grid button {
  min-height: 42px;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 850;
  text-align: left;
}

.markdown-snippet-grid button:hover {
  border-color: rgba(68, 184, 222, 0.36);
  background: rgba(68, 184, 222, 0.08);
}

@keyframes storageFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes storageDialogIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes editorToolsIn {
  from {
    opacity: 0;
    transform: translateX(22px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 880px) {
  [data-storage-section="saves"] {
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }

  .webhook-storage-dialog,
  .webhook-storage-dialog.is-expanded {
    width: 100%;
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .webhook-storage-header {
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
  }

  .webhook-storage-header h2 {
    font-size: 1.22rem;
  }

  .webhook-storage-close {
    width: 38px;
    height: 38px;
  }

  .webhook-storage-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "create"
      "list";
  }

  .webhook-save-card {
    grid-template-columns: 1fr;
  }

  .webhook-save-actions {
    width: 100%;
  }

  .editor-tools-drawer {
    top: 0;
    width: 100%;
  }

  .markdown-snippet-grid {
    grid-template-columns: 1fr;
  }

  .compact-tool-hero {
    display: grid;
    align-items: start;
  }

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

  .status-checks {
    grid-template-columns: 1fr;
  }

  .status-frame-wrap,
  .status-frame {
    min-height: 620px;
  }

  .discord-tool-grid,
  .markdown-tool-list {
    grid-template-columns: 1fr;
  }

  .timestamp-card {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .timestamp-card code {
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: left;
    white-space: normal;
  }
}

.rules-file-button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.rules-file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.rules-message-buttons {
  display: grid;
  gap: 8px;
}

.rules-message-buttons button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--text);
  background: #111720;
  cursor: pointer;
  text-align: left;
}

.rules-message-buttons button.is-active {
  border-color: rgba(68, 184, 222, 0.62);
  background: #15202b;
}

.rules-message-buttons strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #071015;
  background: var(--cyan);
}

.rules-message-buttons span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rules-check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rules-check input {
  width: 18px;
  height: 18px;
}

.rules-limit-list {
  display: grid;
  gap: 8px;
}

.rules-limit {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  overflow: hidden;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #111720;
}

.rules-limit span,
.rules-limit strong {
  position: relative;
  z-index: 1;
  font-size: 0.82rem;
}

.rules-limit span {
  color: var(--muted);
}

.rules-limit i {
  position: absolute;
  inset: auto auto 0 0;
  height: 3px;
  background: var(--green);
}

.rules-limit.is-warning i {
  background: var(--orange);
}

.rules-limit.is-danger i {
  background: #ff5d5d;
}

.rules-alert {
  padding: 12px;
  border: 1px solid rgba(242, 165, 26, 0.42);
  border-radius: 8px;
  color: #ffe0a6;
  background: rgba(242, 165, 26, 0.08);
}

.rules-alert.is-error {
  border-color: rgba(255, 93, 93, 0.5);
  color: #ffb6b6;
  background: rgba(255, 93, 93, 0.08);
}

.rules-preview {
  display: grid;
  gap: 14px;
}

.rules-preview-message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #10151d;
}

.rules-preview-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #071015;
  background: var(--cyan);
  font-weight: 950;
}

.rules-preview-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 5px;
}

.rules-preview-meta span {
  color: var(--muted-2);
  font-size: 0.76rem;
}

.rules-preview-content {
  color: #d9e0ea;
}

.rules-preview-embed {
  position: relative;
  display: grid;
  gap: 7px;
  margin-top: 8px;
  padding: 12px;
  border-left: 4px solid var(--cyan);
  border-radius: 8px;
  background: #171d26;
}

.rules-preview-author {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.rules-preview-embed p {
  margin: 0;
  color: #cbd5e1;
}

.rules-preview-embed small {
  color: var(--muted-2);
}

.rules-preview-thumb {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
}

.rules-preview-image {
  max-height: 240px;
  border-radius: 8px;
  object-fit: cover;
}

.message-editor-root {
  display: block;
}

.message-mode-switch,
.embed-list-toolbar,
.components-toolbar,
.component-block-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.components-toolbar {
  align-items: end;
}

.component-add-field {
  flex: 1 1 220px;
}

.component-add-field span {
  font-size: 0.68rem;
}

.message-mode-switch button,
.embed-list-toolbar button,
.components-toolbar button,
.component-block-actions button,
.embed-fields button,
.rules-field select {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #111720;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
}

.message-mode-switch button.is-active,
.embed-tabs button.is-active {
  color: #071015;
  border-color: transparent;
  background: var(--cyan);
}

.rules-field select {
  width: 100%;
  cursor: pointer;
}

.embed-list-toolbar {
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.embed-tabs {
  display: flex;
  flex: 1 1 auto;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
}

.embed-tabs button {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.embed-editor,
.component-block-list,
.embed-fields {
  display: grid;
  gap: 12px;
}

.embed-field-row,
.component-block {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.component-block-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.component-block-heading strong {
  color: var(--text);
}

.component-container-block {
  border-color: color-mix(in srgb, var(--cyan) 26%, var(--line-soft));
  background: rgba(68, 184, 222, 0.035);
}

.container-child-toolbar {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.container-child-toolbar > span {
  color: var(--muted-2);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.container-child-list {
  display: grid;
  gap: 10px;
  padding-left: 12px;
  border-left: 2px solid color-mix(in srgb, var(--cyan) 42%, var(--line-soft));
}

.container-child-list .component-block {
  background: rgba(255, 255, 255, 0.03);
}

.editor-muted {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.rules-preview-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rules-preview-fields span {
  display: grid;
  gap: 3px;
  padding: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.rules-preview-fields span:not(.is-inline) {
  grid-column: 1 / -1;
}

.rules-preview-fields b,
.rules-preview-fields small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.v2-preview {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.v2-text-display,
.v2-container,
.v2-section,
.v2-file {
  overflow-wrap: anywhere;
  border-radius: 8px;
}

.v2-text-display {
  padding: 10px 12px;
  color: #d9e0ea;
  background: rgba(255, 255, 255, 0.035);
}

.v2-container {
  display: grid;
  gap: 9px;
  padding: 12px;
  border-left: 4px solid var(--component-accent, var(--cyan));
  background: #171d26;
}

.v2-container.is-no-accent {
  border-left-width: 0;
}

.v2-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.v2-section img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
}

.v2-section a,
.v2-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  color: #071015;
  background: var(--cyan);
  font-weight: 900;
}

.v2-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.v2-gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.v2-gallery img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.v2-gallery figcaption {
  padding: 7px 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.v2-separator {
  display: grid;
  align-items: center;
  min-height: 12px;
}

.v2-separator.is-large {
  min-height: 24px;
}

.v2-separator i {
  display: block;
  height: 1px;
  background: var(--line-soft);
}

.v2-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.v2-action-row {
  display: grid;
  gap: 8px;
}

.discord-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  max-width: 360px;
  padding: 0 12px;
  border-radius: 4px;
  color: #dbdee1;
  background: #1e1f22;
}

.discord-select span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-select small {
  color: #949ba4;
  white-space: nowrap;
}

.discord-select.is-disabled {
  opacity: 0.55;
}

.v2-file {
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.discord-message-stack {
  display: grid;
  gap: 18px;
  width: 100%;
  min-width: 0;
}

.discord-message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.discord-message-inner {
  min-width: 0;
}

.discord-message-meta {
  min-height: 22px;
  margin-bottom: 3px;
}

.discord-message-meta strong {
  color: #f2f3f5;
  font-weight: 800;
}

.discord-message-content {
  display: grid;
  gap: 2px;
  color: #dbdee1;
  line-height: 1.38;
}

.discord-line,
.discord-message-content li,
.discord-message-content blockquote {
  overflow-wrap: anywhere;
}

.discord-line.is-empty {
  min-height: 0.72em;
}

.discord-heading {
  margin: 7px 0 2px;
  color: #f2f3f5;
  font-weight: 900;
  line-height: 1.12;
}

.discord-heading-1 { font-size: 1.5rem; }
.discord-heading-2 { font-size: 1.28rem; }
.discord-heading-3 { font-size: 1.08rem; }

.discord-subtext {
  color: #949ba4;
  font-size: 0.82rem;
}

.discord-message-content blockquote,
.discord-embed-description blockquote,
.v2-text-display blockquote {
  margin: 5px 0;
  padding-left: 10px;
  border-left: 4px solid #4e5058;
  color: #c8ccd2;
}

.discord-message-content ul,
.discord-embed-description ul,
.v2-text-display ul {
  margin: 4px 0;
  padding-left: 22px;
}

.discord-message-content pre,
.discord-embed-description pre,
.v2-text-display pre {
  max-width: 100%;
  margin: 6px 0;
  overflow: auto;
  padding: 10px;
  border-radius: 6px;
  background: #1e1f22;
}

.discord-message-content code,
.discord-embed-description code,
.v2-text-display code {
  padding: 0.1em 0.28em;
  border-radius: 4px;
  background: #1e1f22;
  font-size: 0.92em;
}

.discord-mention {
  display: inline-flex;
  padding: 0 3px;
  border-radius: 3px;
  color: #dee7ff;
  background: rgba(88, 101, 242, 0.32);
  font-weight: 700;
}

.discord-spoiler {
  border-radius: 3px;
  color: transparent;
  background: #111214;
}

.discord-spoiler:hover {
  color: #dbdee1;
}

.discord-embed {
  width: min(100%, 560px);
  margin-top: 8px;
  border-left: 4px solid var(--embed-color, #5865f2);
  background: #2b2d31;
}

.discord-embed-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  min-width: 0;
}

.discord-embed-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.discord-embed-author,
.discord-embed-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #b5bac1;
  font-size: 0.82rem;
  font-weight: 700;
}

.discord-embed-author a,
.discord-embed-title,
.discord-message-content a,
.discord-embed-description a,
.v2-text-display a {
  color: #00a8fc;
}

.discord-embed-title {
  overflow-wrap: anywhere;
  font-weight: 900;
}

.discord-embed-description {
  display: grid;
  gap: 2px;
  color: #dbdee1;
  line-height: 1.35;
}

.discord-embed .rules-preview-thumb {
  position: static;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  object-fit: cover;
}

.discord-embed .rules-preview-image {
  width: 100%;
  max-height: 360px;
  margin-top: 4px;
  border-radius: 6px;
  object-fit: cover;
}

.discord-embed-author-icon,
.discord-embed-footer-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

.discord-embed-footer-icon {
  width: 18px;
  height: 18px;
}

.discord-media-placeholder {
  display: grid;
  min-height: 44px;
  place-items: center;
  padding: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: #949ba4;
  background: rgba(255, 255, 255, 0.035);
  overflow-wrap: anywhere;
  text-align: center;
}

.discord-media-placeholder.rules-preview-thumb {
  position: static;
  width: 80px;
  height: 80px;
}

.discord-media-placeholder.rules-preview-image {
  width: 100%;
  max-height: none;
}

.discord-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  max-width: 100%;
  padding: 0 14px;
  border-radius: 4px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.discord-button.is-primary { background: #5865f2; }
.discord-button.is-secondary { background: #4e5058; }
.discord-button.is-success { background: #248046; }
.discord-button.is-danger { background: #da373c; }
.discord-button.is-link { background: #4e5058; }
.discord-button.is-disabled { opacity: 0.55; }

.v2-preview {
  max-width: 760px;
}

.v2-text-display {
  display: grid;
  gap: 2px;
  padding: 0;
  background: transparent;
}

.v2-container {
  border-left-color: var(--component-accent, #5865f2);
  background: #2b2d31;
}

.v2-thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  object-fit: cover;
}

.v2-section-copy {
  min-width: 0;
}

.v2-section-accessory {
  max-width: 180px;
}

.v2-gallery-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.v2-file {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.v2-file strong {
  padding: 3px 6px;
  border-radius: 4px;
  color: #11141b;
  background: #dbdee1;
  font-size: 0.72rem;
}

.v2-file span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.is-spoiler {
  filter: brightness(0.45);
}

.discord-empty-message {
  color: #949ba4;
  font-style: italic;
}

.template-rule-editor-shell {
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.template-gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.template-gallery-toolbar span {
  display: block;
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.template-gallery-toolbar strong {
  display: block;
  margin-top: 2px;
  font-size: 1.02rem;
}

.gallery-refresh {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #111720;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.gallery-refresh:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 165, 26, 0.48);
  background: #161d27;
}

.gallery-refresh:disabled {
  cursor: progress;
  opacity: 0.62;
  transform: none;
}

body.is-template-modal-open {
  overflow: hidden;
}

.template-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.template-group {
  display: grid;
  gap: 10px;
}

.template-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 8px;
  border-bottom: 1px solid var(--line);
}

.template-group-heading h2 {
  margin: 0;
  font-size: 1.1rem;
}

.template-group-heading span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #111720;
  font-weight: 900;
}

.template-group-list {
  display: grid;
  gap: 10px;
}

.template-group-empty {
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.template-browser {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.template-browser .template-gallery {
  grid-template-columns: 1fr;
}

.template-preview-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 5000;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  padding: 22px;
  overflow: auto;
}

.template-preview-panel.is-open {
  display: flex;
}

.template-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 9, 0.78);
  backdrop-filter: blur(14px);
}

.template-preview-dialog {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  width: min(1240px, calc(100vw - 32px));
  min-width: 0;
  height: min(880px, calc(100vh - 44px));
  height: min(880px, calc(100dvh - 44px));
  max-height: calc(100vh - 44px);
  max-height: calc(100dvh - 44px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--orange) 28%, var(--line));
  border-radius: 8px;
  background: var(--panel-2);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
  animation: templateModalIn 220ms ease both;
}

.template-preview-panel.is-expanded {
  padding: 9px;
}

.template-preview-panel.is-expanded .template-preview-dialog {
  width: min(1580px, calc(100vw - 18px));
  height: calc(100dvh - 18px);
  max-height: calc(100dvh - 18px);
}

.template-modal-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.template-modal-tabs {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #0d1117;
}

.template-modal-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.template-modal-tab:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.template-modal-tab.is-active {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel);
}

.template-modal-summary-wrap {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

/* Preview-only tab: hide summary, preview fills everything */
.template-modal-body.is-tab-preview .template-modal-summary {
  display: none;
}

.template-modal-body.is-tab-editor .template-modal-summary {
  display: none;
}

.template-modal-body.is-tab-preview .template-modal-summary-wrap,
.template-modal-body.is-tab-editor .template-modal-summary-wrap {
  grid-template-rows: minmax(0, 1fr);
}

[data-template-preview] {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.template-preview-size,
.template-preview-close {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text);
  background: #151b24;
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.template-preview-size {
  margin-left: auto;
  font-size: 1.05rem;
}

.template-modal-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 0.6fr) auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "title command actions"
    "meta  meta    meta";
  gap: 12px 14px;
  align-items: center;
  min-height: 0;
  max-height: 30vh;
  overflow: auto;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--template-accent, var(--orange)) 18%, transparent), transparent 42%),
    #111720;
}

.template-modal-title { grid-area: title; }
.template-modal-meta  { grid-area: meta; }
.template-modal-command { grid-area: command; }
.template-modal-actions { grid-area: actions; }

.template-modal-title {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.template-modal-title small,
.template-modal-command small,
.template-modal-meta small {
  color: var(--muted-2);
  font-size: 0.73rem;
  font-weight: 900;
  text-transform: uppercase;
}

.template-modal-title h2 {
  margin: 2px 0 4px;
  font-size: 1.28rem;
}

.template-modal-title p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.template-modal-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 6px;
}

.template-modal-meta span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.template-modal-meta b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-modal-command {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.template-modal-command-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: stretch;
}

.template-modal-command code {
  overflow-x: auto;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: #dcefff;
  background: #0b0f15;
  white-space: pre;
  word-break: break-all;
  font-size: 0.88rem;
}

.template-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--muted);
  background: #0b0f15;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.template-copy-btn:hover {
  color: var(--text);
  border-color: rgba(68, 184, 222, 0.45);
  background: #0f1520;
}

.template-copy-btn.is-copied {
  color: var(--green);
  border-color: rgba(53, 180, 111, 0.45);
}

.template-modal-actions {
  display: grid;
  gap: 7px;
  min-width: 150px;
}

.template-modal-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  color: #071015;
  background: var(--green);
  font-weight: 900;
}

.template-modal-actions a:last-child {
  color: var(--text);
  background: #202936;
}

.template-modal-preview {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.template-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.template-preview-heading span {
  font-weight: 900;
}

.template-preview-heading strong {
  color: var(--text);
  font-size: 0.86rem;
}

.template-list-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.template-list-item:hover,
.template-list-item.is-active {
  border-color: color-mix(in srgb, var(--template-accent, var(--orange)) 56%, transparent);
  background: #171e28;
}

.template-list-item:hover {
  transform: translateY(-2px);
}

.template-list-button {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) minmax(150px, 0.2fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 92px;
  padding: 16px;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.template-list-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  color: #080a0e;
  background: var(--template-accent, var(--orange));
  font-weight: 950;
}

.template-list-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.template-list-copy small {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-list-copy strong {
  overflow: hidden;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-list-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.template-list-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: var(--muted);
}

.template-list-meta small {
  color: var(--muted-2);
  font-size: 0.73rem;
  font-weight: 900;
  text-transform: uppercase;
}

.template-list-meta b {
  color: var(--text);
  font-size: 0.9rem;
}

.template-list-meta i {
  color: var(--orange);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.template-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.template-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--template-accent, var(--orange)) 52%, transparent);
  background: #171e28;
}

.template-card.is-active {
  border-color: color-mix(in srgb, var(--template-accent, var(--orange)) 68%, transparent);
}

.template-card-select {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.template-card-heading {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 18px 18px 12px;
}

.template-card-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  color: #080a0e;
  background: var(--template-accent, var(--orange));
  font-weight: 950;
}

.template-card-heading small {
  display: block;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-card-heading h3 {
  margin-top: 3px;
}

.template-card-art {
  position: relative;
  display: grid;
  min-height: 166px;
  padding: 22px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--template-accent, var(--orange)) 28%, transparent), transparent 48%),
    linear-gradient(180deg, #151b24, #10141b);
  isolation: isolate;
}

.template-card-art::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.template-card-art strong {
  align-self: end;
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #080a0e;
  background: var(--template-accent, var(--orange));
  font-size: 1.25rem;
  font-weight: 950;
}

.template-card-art span,
.template-card-art i {
  position: absolute;
  right: 30px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.template-card-art span {
  top: 36px;
  width: 42%;
}

.template-card-art i:nth-of-type(1) {
  top: 62px;
  width: 58%;
}

.template-card-art i:nth-of-type(2) {
  top: 88px;
  width: 34%;
}

.template-card-art i:nth-of-type(3) {
  top: 114px;
  width: 48%;
}

.template-card-body {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
}

.template-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 22px;
  color: var(--muted-2);
  font-size: 0.82rem;
}

.template-card-topline span,
.template-card-topline small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-card h3 {
  margin: 0;
  font-size: 1.36rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.template-card p {
  min-height: 0;
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.mini-discord {
  display: grid;
  gap: 9px;
  margin: 0 18px 14px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #0b0f15;
}

.mini-discord-category {
  display: grid;
  gap: 5px;
}

.mini-discord-category > span {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 0.72rem;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.mini-discord-category p,
.mini-discord-channel {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-height: 25px;
  margin: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
}

.mini-discord-channel {
  width: 100%;
  cursor: pointer;
}

.mini-discord-category i,
.mini-discord-channel i {
  color: var(--muted-2);
  font-style: normal;
  text-align: center;
}

.mini-discord-category strong,
.mini-discord-channel strong {
  overflow: hidden;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-discord-empty {
  margin: 0 18px 14px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #0b0f15;
}

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

.template-stats span {
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.83rem;
}

.template-stats strong {
  display: block;
  color: var(--text);
  font-size: 1.12rem;
}

.template-command {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.template-command span {
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.template-command code {
  display: block;
  overflow: hidden;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: #dcefff;
  background: #0b0f15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-card-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.template-card-actions a,
.template-card-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  color: #090b0f;
  background: var(--template-accent, var(--orange));
  font: inherit;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
}

.template-card-actions a:last-child {
  color: var(--text);
  background: #202936;
}

.template-card-actions button {
  color: var(--text);
  background: #17202b;
}

.discord-preview-window {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  min-height: 620px;
  overflow: hidden;
  background: #11141b;
}

.template-modal-preview .discord-preview-window {
  height: 100%;
  min-height: 0;
}

.template-modal-preview .discord-preview-main {
  min-height: 0;
}

.discord-preview-sidebar {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px 10px;
  background: #080a0e;
  text-align: center;
}

.discord-preview-guild {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border-radius: 14px;
  color: #080a0e;
  background: var(--orange);
  font-weight: 950;
}

.discord-preview-sidebar strong,
.discord-preview-sidebar span {
  overflow-wrap: anywhere;
}

.discord-preview-sidebar strong {
  font-size: 0.82rem;
}

.discord-preview-sidebar span {
  color: var(--muted-2);
  font-size: 0.72rem;
}

.discord-preview-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

.discord-preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #111720;
}

.discord-preview-topbar div {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.discord-preview-topbar strong,
.discord-preview-topbar small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-preview-topbar span,
.discord-preview-topbar small {
  color: var(--muted-2);
}

.discord-preview-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px 190px;
  min-height: 0;
  min-height: 566px;
}

.template-modal-preview .discord-preview-content {
  height: 100%;
  min-height: 0;
}

.discord-preview-channel-list {
  overflow: auto;
  min-height: 0;
  padding: 14px 0;
}

.discord-preview-channel-list .mini-discord {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.discord-preview-channel-list .mini-discord-category {
  padding: 4px 14px 10px;
}

.discord-preview-channel-list .mini-discord-category p,
.discord-preview-channel-list .mini-discord-channel {
  min-height: 32px;
  padding: 0 8px;
  border-radius: 6px;
}

.discord-preview-channel-list .mini-discord-category p:hover,
.discord-preview-channel-list .mini-discord-channel:hover,
.discord-preview-channel-list .mini-discord-channel.is-active {
  background: rgba(255, 255, 255, 0.055);
}

.discord-preview-channel-list .mini-discord-channel.is-active {
  color: var(--text);
}

.discord-channel-settings {
  overflow: auto;
  min-height: 0;
  padding: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: #101620;
}

.discord-channel-settings-inner {
  display: grid;
  gap: 10px;
}

.discord-channel-settings h4 {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.discord-channel-settings strong {
  overflow-wrap: anywhere;
}

.discord-channel-settings p {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.discord-channel-settings span,
.discord-channel-settings small {
  color: var(--muted-2);
  font-size: 0.74rem;
}

.discord-channel-settings b {
  overflow-wrap: anywhere;
  font-size: 0.88rem;
}

.channel-settings-empty {
  display: grid;
  min-height: 100%;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.discord-preview-roles {
  overflow: auto;
  min-height: 0;
  padding: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: #0d1117;
}

.roles-preview-list,
.rules-message-preview {
  overflow: auto;
  min-height: 0;
  padding: 18px;
}

.roles-preview-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.roles-preview-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) minmax(90px, auto);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.roles-preview-row i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--muted-2);
}

.roles-preview-row strong,
.roles-preview-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roles-preview-row span {
  color: var(--muted-2);
  font-size: 0.76rem;
}

.rules-message-preview {
  display: grid;
  align-content: start;
  gap: 12px;
}

.rules-message-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rules-message-author span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #071015;
  background: var(--cyan);
  font-weight: 950;
}

.rules-message-body {
  max-width: 760px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #151b24;
}

.rules-message-body p {
  margin: 0 0 8px;
  white-space: pre-wrap;
}

.rules-embed-preview {
  margin-top: 12px;
  padding: 12px;
  border-left: 3px solid var(--orange);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.18);
}

.discord-preview-roles h4 {
  margin: 0 0 12px;
  color: var(--muted-2);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.discord-preview-roles p {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
  color: var(--muted);
}

.discord-preview-roles i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--muted-2);
}

.discord-preview-roles span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-empty {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  text-align: center;
}

.template-card.is-loading {
  min-height: 420px;
  pointer-events: none;
}

.template-list-item.is-loading {
  pointer-events: none;
}

.template-list-item.is-loading .template-list-mark,
.template-list-item.is-loading .template-list-copy strong,
.template-list-item.is-loading .template-list-copy p,
.template-list-item.is-loading .template-list-meta {
  color: transparent;
  background: linear-gradient(90deg, #141b24, #202936, #141b24);
  background-size: 220% 100%;
  animation: skeletonPulse 1100ms linear infinite;
}

.template-list-item.is-loading .template-list-copy strong {
  width: 58%;
  height: 20px;
  border-radius: 8px;
}

.template-list-item.is-loading .template-list-copy p {
  width: 100%;
  height: 34px;
  border-radius: 8px;
}

.template-list-item.is-loading .template-list-meta {
  width: 120px;
  height: 38px;
  border-radius: 8px;
}

.template-card.is-loading .template-card-art,
.template-card.is-loading span,
.template-card.is-loading h3,
.template-card.is-loading p {
  color: transparent;
  background: linear-gradient(90deg, #141b24, #202936, #141b24);
  background-size: 220% 100%;
  animation: skeletonPulse 1100ms linear infinite;
}

.template-card.is-loading .template-card-body span {
  width: 48%;
  height: 16px;
  border-radius: 999px;
}

.template-card.is-loading h3,
.template-card.is-loading p {
  width: 100%;
  height: 24px;
  border-radius: 8px;
}

.template-card.is-loading p {
  height: 72px;
}

.preview-section {
  padding-top: 72px;
}

.server-demo {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 1.18fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f131a;
  box-shadow: var(--shadow);
}

.server-sidebar {
  min-height: 520px;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: #0b0f15;
}

.demo-category {
  margin: 18px 0 8px;
  color: var(--muted-2);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.demo-category:first-child {
  margin-top: 0;
}

.demo-row {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  min-height: 38px;
  margin: 4px 0;
  padding: 0 12px;
  border-radius: 8px;
  color: #c4ccda;
}

.demo-row.active {
  color: var(--text);
  background: #242a34;
}

.demo-row span {
  color: var(--cyan);
  font-weight: 900;
}

.demo-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
}

.demo-content {
  min-height: 520px;
  padding: 32px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    #111720;
  background-size: 54px 54px;
}

.build-console {
  width: min(560px, 100%);
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(12, 16, 23, 0.72);
}

.build-console-title {
  margin-bottom: 12px;
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.build-task {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  overflow: hidden;
  color: #dce5ef;
}

.build-task + .build-task {
  margin-top: 8px;
}

.build-task span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted-2);
}

.build-task p {
  margin: 0;
}

.build-task i {
  position: absolute;
  left: 28px;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--green);
}

.demo-window-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.demo-window-bar span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--line);
}

.demo-window-bar span:first-child {
  background: var(--orange);
}

.demo-window-bar span:nth-child(2) {
  background: var(--cyan);
}

.demo-window-bar span:nth-child(3) {
  background: var(--green);
}

.demo-message {
  width: min(560px, 100%);
  padding: 24px;
  border: 1px solid rgba(68, 184, 222, 0.32);
  border-radius: 8px;
  background: rgba(12, 16, 23, 0.86);
}

.demo-message strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.18rem;
}

.demo-message p {
  margin: 0;
  color: var(--muted);
}

.demo-pills {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.demo-pills span {
  padding: 9px 12px;
  border-radius: 8px;
  color: #111317;
  background: var(--orange);
  font-weight: 900;
}

.demo-pills span:nth-child(2) {
  background: var(--cyan);
}

.demo-pills span:nth-child(3) {
  background: var(--green);
}

.demo-pills span:nth-child(4) {
  color: var(--text);
  background: #6871e8;
}

.server-demo.is-visible .server-sidebar > * {
  opacity: 0;
  transform: translateX(-10px);
  animation: structureItem 460ms ease forwards;
  animation-delay: calc(var(--build-order, 0) * 105ms + 220ms);
}

.server-sidebar > :nth-child(1) { --build-order: 1; }
.server-sidebar > :nth-child(2) { --build-order: 2; }
.server-sidebar > :nth-child(3) { --build-order: 3; }
.server-sidebar > :nth-child(4) { --build-order: 4; }
.server-sidebar > :nth-child(5) { --build-order: 5; }
.server-sidebar > :nth-child(6) { --build-order: 6; }
.server-sidebar > :nth-child(7) { --build-order: 7; }
.server-sidebar > :nth-child(8) { --build-order: 8; }
.server-sidebar > :nth-child(9) { --build-order: 9; }
.server-sidebar > :nth-child(10) { --build-order: 10; }
.server-sidebar > :nth-child(11) { --build-order: 11; }

.server-demo.is-visible .build-task {
  animation: buildTask 640ms ease both;
  animation-delay: calc(var(--task-order, 0) * 360ms + 260ms);
}

.server-demo.is-visible .build-task i {
  animation: buildProgress 760ms ease both;
  animation-delay: calc(var(--task-order, 0) * 360ms + 320ms);
}

.build-task:nth-of-type(2) { --task-order: 1; }
.build-task:nth-of-type(3) { --task-order: 2; }
.build-task:nth-of-type(4) { --task-order: 3; }
.build-task:nth-of-type(5) { --task-order: 4; }

.server-demo.is-visible .demo-message {
  animation: structureItem 500ms ease both;
  animation-delay: 1780ms;
}

.server-demo.is-visible .demo-pills span {
  opacity: 0;
  transform: translateY(8px);
  animation: structureItem 380ms ease forwards;
  animation-delay: calc(var(--pill-order, 0) * 90ms + 2050ms);
}

.demo-pills span:nth-child(1) { --pill-order: 1; }
.demo-pills span:nth-child(2) { --pill-order: 2; }
.demo-pills span:nth-child(3) { --pill-order: 3; }
.demo-pills span:nth-child(4) { --pill-order: 4; }

.safety-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 52px;
  padding: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111720;
}

.safety-list {
  display: grid;
  gap: 12px;
}

.safety-list div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.safety-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 30px;
  border-radius: 8px;
  color: #07130b;
  background: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
}

.safety-list p {
  margin: 2px 0 0;
  color: #dfe7f2;
}

.final-section {
  padding-top: 34px;
}

.final-card {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 58px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111720;
  box-shadow: var(--shadow);
}

.final-card img {
  width: 104px;
  height: 104px;
  object-fit: contain;
}

.final-card p {
  width: min(650px, 100%);
}

.final-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.site-footer {
  display: block;
  padding: 34px clamp(18px, 5vw, 80px) 24px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-2);
  background: #080a0e;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.7fr) minmax(210px, 0.75fr) minmax(260px, 1.05fr);
  gap: 28px;
  align-items: start;
  width: min(1320px, 100%);
  margin: 0 auto;
}

.footer-brand-block,
.footer-column {
  display: grid;
  gap: 10px;
}

.footer-brand-block strong {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 950;
}

.footer-brand-block p,
.footer-disclaimer p {
  margin: 0;
  color: var(--muted);
}

.footer-column h2 {
  margin: 0 0 2px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
}

.site-footer span:first-child {
  color: var(--text);
  font-weight: 900;
}

.footer-link {
  width: fit-content;
  color: #cbd5e1;
  font-weight: 800;
}

.footer-link:hover {
  color: var(--cyan);
}

.footer-bottom {
  width: min(1320px, 100%);
  margin: 26px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-2);
  font-size: 0.9rem;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes navDropdownIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes templateModalIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes commandSwap {
  from {
    opacity: 0.58;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes workStep {
  0% {
    border-color: rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
  }
  48%, 100% {
    border-color: rgba(68, 184, 222, 0.36);
    background: rgba(68, 184, 222, 0.075);
  }
}

@keyframes workProgress {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes cursorBlink {
  0%, 48% {
    opacity: 0.95;
  }
  49%, 100% {
    opacity: 0;
  }
}

@keyframes simBotIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes simCardIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes simProgressLine {
  from {
    opacity: 0.45;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes simArtifactIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes structureItem {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes skeletonPulse {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

@keyframes buildTask {
  from {
    opacity: 0.52;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes buildProgress {
  from {
    width: 0;
  }
  to {
    width: calc(100% - 28px);
  }
}

@keyframes languageFade {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  45% {
    opacity: 0.74;
    transform: translateY(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes languageButton {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
  100% {
    transform: translateY(0);
  }
}

@media (max-width: 1020px) {
  .main-nav {
    gap: 18px;
  }

  .site-tabs a {
    padding: 0 11px;
  }

  .hero h1 {
    font-size: 5.1rem;
  }

  .command-shell,
  .command-help-shell,
  .benefit-grid,
  .template-browser,
  .rules-editor,
  .webhook-page .rules-editor,
  .webhook-workspace,
  .server-demo,
  .safety-panel {
    grid-template-columns: 1fr;
  }

  .rules-edit-panel,
  .rules-preview-panel,
  .rules-settings {
    grid-column: auto;
    grid-row: auto;
  }

  .rules-preview-panel {
    position: static;
    max-height: none;
  }

  .command-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .benefit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .template-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .template-browser .template-gallery {
    grid-template-columns: 1fr;
  }

  .template-preview-panel {
    position: fixed;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .template-preview-dialog {
    height: calc(100vh - 28px);
    height: calc(100dvh - 28px);
  }

  .template-modal-summary {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title   actions"
      "command command"
      "meta    meta";
    align-items: stretch;
    max-height: 42vh;
    overflow: auto;
  }

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

  .server-sidebar {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .command-help-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .webhook-preview-panel {
    position: static;
  }

  .demo-content {
    min-height: 420px;
  }

  .section-heading h2,
  .safety-panel h2,
  .final-card h2 {
    font-size: 2.55rem;
  }

  .tool-hero h1 {
    font-size: 3.85rem;
  }
}

@media (max-width: 700px) {
  .site-header {
    position: static;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 14px;
  }

  .brand {
    min-width: 0;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .header-navs {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .nav-group {
    width: 100%;
  }

  .site-tabs,
  .main-nav {
    max-width: 100%;
    overflow-x: auto;
  }

  .language-switcher {
    max-width: 100%;
    overflow-x: auto;
  }

  .header-server,
  .header-invite {
    flex: 1 1 calc(50% - 6px);
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    font-size: 0.9rem;
  }

  .hero {
    min-height: 650px;
    align-items: flex-end;
    background-position: 62% top;
  }

  .hero-content {
    width: calc(100% - 28px);
    margin: 0 auto;
    padding: 118px 0 56px;
  }

  .hero h1 {
    font-size: 3.25rem;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .vote-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .vote-copy h2 {
    font-size: 2rem;
  }

  .vote-actions {
    width: 100%;
  }

  .button {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .final-actions {
    width: 100%;
  }

  .command-list,
  .benefit-grid,
  .template-gallery {
    grid-template-columns: 1fr;
  }

  .templates-page-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .templates-page-hero h1 {
    font-size: 2.45rem;
  }

  .tool-hero {
    align-items: stretch;
    flex-direction: column;
    padding-top: 54px;
  }

  .tool-hero h1 {
    font-size: 2.75rem;
  }

  .tool-hero p:not(.eyebrow) {
    font-size: 1rem;
  }

  .copy-tool-panel {
    padding: 14px;
  }

  .copy-tool-toolbar {
    grid-template-columns: 1fr;
  }

  .field-grid,
  .embed-field-editor,
  .command-doc-grid,
  .discord-message-preview,
  .discord-help-row {
    grid-template-columns: 1fr;
  }

  .embed-field-editor {
    align-items: stretch;
  }

  .webhook-actions .button {
    width: 100%;
  }

  .discord-command-titlebar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .discord-command-titlebar small {
    grid-column: 2;
  }

  .discord-command-chat {
    min-height: 0;
    padding: 14px;
  }

  .help-input-line {
    width: 100%;
    grid-template-columns: 28px minmax(0, 1fr) 8px;
  }

  .help-input-line code {
    max-width: 100%;
  }

  .embed-field-preview-list {
    grid-template-columns: 1fr;
  }

  .embed-thumbnail {
    position: static;
    width: 92px;
    height: 92px;
  }

  .embed-thumbnail ~ .embed-description,
  .embed-thumbnail ~ .embed-field-preview-list {
    padding-right: 0;
  }

  .payload-card pre {
    max-height: 260px;
  }

  .copy-tool-toolbar strong {
    justify-content: flex-start;
    min-width: 0;
  }

  .copy-token-grid {
    grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  }

  .copy-token {
    min-height: 46px;
    height: 46px;
  }

  .copy-token span {
    max-width: 40px;
    font-size: 1.42rem;
  }

  .copy-token-image {
    width: 28px;
    height: 28px;
  }

  .copy-toast {
    bottom: 14px;
    max-width: calc(100vw - 28px);
  }

  .rules-two {
    grid-template-columns: 1fr;
  }

  .rules-actions .button,
  .rules-file-button {
    width: 100%;
  }

  .template-browser .template-gallery,
  .discord-preview-content,
  .discord-preview-window {
    grid-template-columns: 1fr;
  }

  .template-list-button {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .template-list-meta {
    grid-column: 1 / -1;
    justify-items: start;
  }

  .template-list-mark {
    width: 44px;
    height: 44px;
  }

  .template-preview-panel {
    align-items: stretch;
    justify-content: stretch;
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    overflow: hidden;
  }

  .template-preview-dialog,
  .template-preview-panel.is-expanded .template-preview-dialog {
    width: 100%;
    height: calc(100vh - 16px);
    height: calc(100dvh - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .template-modal-tabs {
    flex-wrap: wrap;
    align-content: start;
    gap: 6px;
    padding: 8px;
  }

  .template-modal-tab {
    flex: 1 1 min(112px, 100%);
    min-width: 0;
    padding: 0 10px;
  }

  .template-preview-size,
  .template-preview-close {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
  }

  .template-preview-size {
    margin-left: 0;
  }

  .template-modal-summary-wrap {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .template-modal-preview {
    min-height: 0;
    overflow: visible;
  }

  [data-template-preview] {
    height: auto;
    min-height: 100%;
    overflow: visible;
  }

  .template-modal-body.is-tab-preview [data-template-preview],
  .template-modal-body.is-tab-editor [data-template-preview] {
    min-height: 100%;
  }

  .template-modal-summary {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "meta"
      "command"
      "actions";
    max-height: none;
    overflow: visible;
    padding: 16px;
  }

  .template-modal-title {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .template-modal-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .template-modal-actions {
    min-width: 0;
  }

  .template-modal-actions a {
    width: 100%;
    min-width: 0;
  }

  .discord-preview-sidebar {
    display: none;
  }

  .discord-preview-content {
    min-height: 0;
  }

  .template-modal-preview .discord-preview-window,
  .template-modal-preview .discord-preview-content {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .discord-preview-topbar {
    min-height: auto;
    padding: 12px;
  }

  .discord-preview-topbar div {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .discord-preview-channel-list,
  .discord-channel-settings,
  .discord-preview-roles,
  .roles-preview-list,
  .rules-message-preview {
    overflow: visible;
  }

  .rules-message-body,
  .discord-embed-preview {
    max-width: 100%;
  }

  .discord-preview-roles {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 0;
  }

  .discord-channel-settings {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 0;
  }

  .template-gallery-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .gallery-refresh {
    width: 100%;
  }

  .template-card {
    min-height: 0;
  }

  .template-card-actions {
    grid-template-columns: 1fr;
  }

  .command-panel {
    min-height: 0;
  }

  .command-title {
    font-size: 1.55rem;
  }

  .section {
    width: min(100% - 28px, 1180px);
    padding: 72px 0;
  }

  .section-heading h2,
  .safety-panel h2,
  .final-card h2 {
    font-size: 2rem;
  }

  .command-panel,
  .server-sidebar,
  .demo-content,
  .safety-panel,
  .final-card {
    padding: 22px;
  }

  .demo-content {
    min-height: 360px;
  }

  .demo-window-bar {
    margin-bottom: 18px;
  }

  .site-footer {
    padding-inline: 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .webhook-save-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* Internal pages keep only the main title in the top block. The home page uses .hero and is intentionally unaffected. */
.tool-page .tool-hero,
.templates-page .templates-page-hero,
.command-help-page .command-help-hero,
.legal-hero {
  justify-content: center;
  text-align: center;
}

.tool-page .tool-hero .section-heading,
.templates-page .templates-page-hero .section-heading,
.command-help-page .command-help-hero .section-heading {
  width: min(920px, 100%);
  max-width: 920px;
  margin-inline: auto;
}

.legal-hero h1 {
  margin-inline: auto;
}

.tool-page .tool-hero .eyebrow,
.tool-page .tool-hero p:not(.eyebrow),
.templates-page .templates-page-hero .eyebrow,
.templates-page .templates-page-hero p:not(.eyebrow),
.command-help-page .command-help-hero .eyebrow,
.command-help-page .command-help-hero p:not(.eyebrow),
.legal-hero .eyebrow,
.legal-hero p:not(.eyebrow),
.tool-page .tool-hero > .button,
.templates-page .templates-page-hero > .button,
.command-help-page .command-help-hero > .button,
.legal-hero .legal-actions {
  display: none;
}
