:root {
  --bg: #141413;
  --bg-soft: #1b1b19;
  --panel: #20201d;
  --panel-strong: #2b2a26;
  --text: #faf9f5;
  --muted: #b8aa9a;
  --line: rgba(var(--text-rgb), 0.1);
  --accent: #d97757;
  --accent-strong: #d97757;
  --accent-warm: #ffcc61;
  --bg-rgb: 20, 20, 19;
  --bg-soft-rgb: 27, 27, 25;
  --panel-rgb: 32, 32, 29;
  --panel-strong-rgb: 43, 42, 38;
  --text-rgb: 250, 249, 245;
  --muted-rgb: 184, 170, 154;
  --accent-rgb: 217, 119, 87;
  --accent-strong-rgb: 217, 119, 87;
  --accent-warm-rgb: 255, 204, 97;
  --theme-button-text: #141413;
  --jewel: #d97757;
  --jewel-strong: #d4a27f;
  --jewel-blue: #d4a27f;
  --jewel-violet: #b0aea5;
  --danger: #ff7e7e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% -12%, rgba(var(--accent-rgb), 0.08), transparent 28%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 52%, rgba(var(--bg-rgb), 0.82) 100%);
}

body.modal-open {
  overflow: hidden;
}

html[data-theme="live"] {
  --bg: #0b0f14;
  --bg-soft: #111821;
  --panel: #161f2a;
  --panel-strong: #1d2835;
  --text: #f5f8fc;
  --muted: #a8b3c1;
  --line: rgba(255, 255, 255, 0.11);
  --accent: #35d0a5;
  --accent-strong: #73e2c7;
  --accent-warm: #f2b25d;
  --bg-rgb: 11, 15, 20;
  --bg-soft-rgb: 17, 24, 33;
  --panel-rgb: 22, 31, 42;
  --panel-strong-rgb: 29, 40, 53;
  --text-rgb: 245, 248, 252;
  --muted-rgb: 168, 179, 193;
  --accent-rgb: 53, 208, 165;
  --accent-strong-rgb: 115, 226, 199;
  --accent-warm-rgb: 242, 178, 93;
  --theme-button-text: #07100d;
  --jewel: #35d0a5;
  --jewel-strong: #73e2c7;
  --jewel-blue: #35d0a5;
  --jewel-violet: #f2b25d;
  background: #0b0f14;
}

html[data-theme="live"] body {
  background:
    linear-gradient(135deg, rgba(53, 208, 165, 0.16), transparent 26%),
    linear-gradient(310deg, rgba(242, 178, 93, 0.13), transparent 28%),
    linear-gradient(180deg, #101721 0%, var(--bg) 52%, #080b10 100%);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

main {
  flex: 1 0 auto;
  width: 100%;
  padding: 0 24px 56px;
}

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

[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

.topbar,
.hero,
.metric-strip,
.section,
.flash-stack,
.footer,
.auth-shell,
.editor-shell {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.topbar {
  width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  background: linear-gradient(180deg, rgba(var(--bg-rgb), 0.96), rgba(var(--bg-rgb), 0.78) 72%, rgba(var(--bg-rgb), 0));
}

html[data-theme="live"] .topbar {
  background: linear-gradient(180deg, rgba(11, 15, 20, 0.96), rgba(11, 15, 20, 0.78) 72%, rgba(11, 15, 20, 0));
}

.brand,
.site-nav,
.hero-actions,
.bot-actions,
.dashboard-title-row,
.bot-card-head {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 850;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  filter: none;
  transform: translateY(1px);
}

.site-nav {
  gap: 18px;
  color: var(--muted);
  font-weight: 700;
}

.site-nav a,
.nav-button,
.dashboard-title-row .button,
.bot-actions .button {
  white-space: nowrap;
}

.site-nav a:hover,
.nav-user {
  color: var(--text);
}

.nav-user {
  display: inline-block;
  max-width: 18ch;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.nav-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-weight: 850;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  border-color: transparent;
  background: #d97757;
  color: var(--theme-button-text);
}

html[data-theme="live"] .button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  color: var(--theme-button-text);
}

.button.add-balance-button {
  min-width: 156px;
  border-color: rgba(var(--muted-rgb), 0.45);
  background:
    linear-gradient(135deg, rgba(var(--muted-rgb), 0.98), rgba(var(--accent-rgb), 0.95));
  box-shadow: 0 14px 34px rgba(var(--muted-rgb), 0.2);
}

html[data-theme="live"] .button.add-balance-button {
  border-color: rgba(242, 178, 93, 0.45);
  background:
    linear-gradient(135deg, rgba(242, 178, 93, 0.98), rgba(53, 208, 165, 0.95));
  box-shadow: 0 14px 34px rgba(242, 178, 93, 0.2);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.055);
}

.button.danger {
  border-color: rgba(255, 126, 126, 0.45);
  background: rgba(255, 126, 126, 0.1);
}

.hero {
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.86fr);
  align-items: center;
  gap: 48px;
  padding: 42px 0 28px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.panel-header span,
.status-grid span,
.command-card span,
.plan-label {
  margin: 0;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 850;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  max-width: 11ch;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.6rem, 3vw, 3rem);
  line-height: 1.05;
}

h3 {
  margin-bottom: 10px;
}

.hero-lede,
.section-heading p,
.capability-card p,
.plan-card p,
.footer span,
.command-card p,
.bot-card p,
.empty-state p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-lede {
  max-width: 64ch;
  font-size: 1.06rem;
}

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

.landing-hero {
  position: relative;
  isolation: isolate;
  min-height: min(740px, calc(100vh - 84px));
  grid-template-columns: 1fr;
  align-items: center;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(var(--text-rgb), 0.1);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: 0 22px 72px rgba(0, 0, 0, 0.28);
}

.landing-hero::after {
  display: none;
}

.landing-hero-scene {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: grid;
  place-items: center;
  padding: 42px;
  background:
    radial-gradient(circle at 18% 18%, rgba(var(--accent-rgb), 0.08), transparent 30%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
}

.landing-hero-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(var(--text-rgb), 0.02) 18% 18.5%, transparent 18.5% 48%, rgba(var(--accent-rgb), 0.028) 48% 48.5%, transparent 48.5%),
    linear-gradient(180deg, rgba(var(--text-rgb), 0.018), transparent 42%);
}

.landing-hero-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(var(--bg-rgb), 0.26), rgba(var(--bg-rgb), 0.82)),
    linear-gradient(90deg, rgba(var(--bg-rgb), 0.78), rgba(var(--bg-rgb), 0.18) 34%, rgba(var(--bg-rgb), 0.2) 66%, rgba(var(--bg-rgb), 0.78));
}

.landing-ambient-window {
  position: relative;
  z-index: 1;
  width: min(1040px, 94vw);
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(var(--text-rgb), 0.08), rgba(var(--text-rgb), 0.025)),
    rgba(var(--bg-rgb), 0.88);
  box-shadow: 0 36px 120px rgba(0, 0, 0, 0.46);
  opacity: 0.44;
  transform: perspective(1200px) rotateX(3deg) rotateY(-5deg) translateY(18px) scale(1.04);
}

.landing-ambient-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(var(--muted-rgb), 0.13);
  background: rgba(255, 255, 255, 0.04);
}

.landing-ambient-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(var(--muted-rgb), 0.42);
}

.landing-ambient-layout {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 260px;
  gap: 16px;
  min-height: 472px;
  padding: 16px;
}

.landing-ambient-rail,
.landing-ambient-board,
.landing-ambient-preview {
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.landing-ambient-rail {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 14px;
  padding-top: 22px;
}

.landing-ambient-rail span {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(var(--text-rgb), 0.08);
}

.landing-ambient-rail .is-active {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.78), rgba(var(--accent-rgb), 0.66));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.landing-ambient-board {
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(var(--text-rgb), 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--text-rgb), 0.026) 1px, transparent 1px);
  background-size: 36px 36px;
}

.ambient-node {
  position: absolute;
  width: 160px;
  height: 58px;
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(var(--text-rgb), 0.16), rgba(var(--text-rgb), 0.08)) 16px 16px / 92px 8px no-repeat,
    linear-gradient(90deg, rgba(var(--muted-rgb), 0.12), rgba(var(--muted-rgb), 0.05)) 16px 34px / 122px 7px no-repeat,
    rgba(var(--bg-rgb), 0.94);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

.ambient-node-one {
  top: 74px;
  left: 66px;
  border-color: rgba(var(--muted-rgb), 0.28);
}

.ambient-node-two {
  top: 166px;
  left: 284px;
  border-color: rgba(var(--accent-rgb), 0.28);
}

.ambient-node-three {
  top: 274px;
  left: 128px;
  border-color: rgba(var(--accent-rgb), 0.28);
}

.ambient-node-four {
  right: 54px;
  bottom: 72px;
  border-color: rgba(var(--muted-rgb), 0.32);
}

.ambient-link {
  position: absolute;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0), rgba(var(--accent-rgb), 0.42), rgba(var(--accent-rgb), 0));
  transform-origin: left center;
}

.ambient-link-one {
  top: 136px;
  left: 212px;
  width: 132px;
  transform: rotate(22deg);
}

.ambient-link-two {
  top: 232px;
  left: 300px;
  width: 170px;
  transform: rotate(137deg);
}

.ambient-link-three {
  right: 170px;
  bottom: 128px;
  width: 128px;
  transform: rotate(18deg);
}

.landing-ambient-preview {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

.ambient-preview-card,
.ambient-preview-row {
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.ambient-preview-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.ambient-preview-card span,
.ambient-preview-row span {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: rgba(var(--text-rgb), 0.13);
}

.ambient-preview-card span:first-child {
  width: 54%;
  background: rgba(var(--accent-rgb), 0.2);
}

.ambient-preview-card span:nth-child(2) {
  width: 88%;
}

.ambient-preview-card span:nth-child(3) {
  width: 68%;
}

.ambient-preview-row {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.ambient-preview-row span:first-child {
  width: 76%;
}

.ambient-preview-row span:nth-child(2) {
  width: 48%;
  background: rgba(var(--muted-rgb), 0.16);
}

.landing-product-shell {
  width: min(980px, 92vw);
  min-height: 500px;
  overflow: hidden;
  border: 1px solid rgba(var(--muted-rgb), 0.18);
  border-radius: 14px;
  background: rgba(var(--bg-rgb), 0.86);
  box-shadow: 0 36px 120px rgba(0, 0, 0, 0.5);
  opacity: 0.44;
  transform: perspective(1200px) rotateX(2deg) rotateY(-4deg) translateY(12px) scale(1.02);
}

.landing-product-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(var(--muted-rgb), 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.landing-product-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(var(--muted-rgb), 0.45);
}

.landing-product-top i {
  display: block;
  width: 178px;
  height: 10px;
  margin-left: 10px;
  border-radius: 999px;
  background: rgba(var(--text-rgb), 0.16);
}

.landing-proof-grid {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr) 230px;
  gap: 16px;
  min-height: 452px;
  padding: 18px;
}

.landing-proof-column {
  display: grid;
  align-content: stretch;
  gap: 14px;
}

.landing-proof-column-right {
  align-content: center;
}

.landing-proof-card,
.landing-metric,
.landing-discord-preview {
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
}

.landing-proof-card {
  display: grid;
  gap: 10px;
  align-content: end;
  min-height: 184px;
  padding: 18px;
}

.landing-proof-card-primary {
  background:
    linear-gradient(160deg, rgba(var(--accent-rgb), 0.18), rgba(var(--muted-rgb), 0.09)),
    rgba(255, 255, 255, 0.055);
}

.landing-proof-card span,
.landing-metric span,
.landing-discord-top span {
  display: block;
  width: 94px;
  height: 10px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.18);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-proof-card strong,
.landing-metric strong {
  display: block;
  width: 78%;
  height: 20px;
  border-radius: 999px;
  background: rgba(var(--text-rgb), 0.18);
  font-size: 1.18rem;
}

.landing-proof-card p,
.landing-discord-message p {
  display: block;
  width: 100%;
  height: 50px;
  margin: 0;
  border-radius: 8px;
  background:
    linear-gradient(rgba(var(--muted-rgb), 0.16), rgba(var(--muted-rgb), 0.16)) left top / 92% 10px no-repeat,
    linear-gradient(rgba(var(--muted-rgb), 0.12), rgba(var(--muted-rgb), 0.12)) left 20px / 72% 10px no-repeat,
    linear-gradient(rgba(var(--muted-rgb), 0.1), rgba(var(--muted-rgb), 0.1)) left 40px / 54% 10px no-repeat;
  color: var(--muted);
  font-size: 0;
  line-height: 1.5;
}

.landing-status-list {
  display: grid;
  gap: 10px;
}

.landing-status-list span {
  position: relative;
  min-height: 42px;
  padding: 11px 12px 11px 34px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-weight: 800;
}

.landing-status-list span::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--jewel);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.18);
  transform: translateY(-50%);
}

.landing-discord-preview {
  align-self: center;
  min-height: 338px;
  overflow: hidden;
  background: rgba(var(--bg-rgb), 0.92);
}

.landing-discord-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(var(--muted-rgb), 0.14);
  background: rgba(255, 255, 255, 0.045);
}

.landing-discord-top strong {
  display: block;
  width: 108px;
  height: 10px;
  border-radius: 999px;
  background: rgba(var(--text-rgb), 0.16);
  color: rgba(var(--text-rgb), 0.72);
  font-size: 0.86rem;
}

.landing-discord-message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  margin: 18px;
  padding: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.11), rgba(255, 255, 255, 0.04));
}

.landing-discord-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--jewel-blue));
  box-shadow: 0 14px 34px rgba(var(--accent-rgb), 0.18);
}

.landing-discord-message strong {
  display: block;
  width: 126px;
  height: 12px;
  margin-bottom: 6px;
  border-radius: 999px;
  background: rgba(var(--text-rgb), 0.18);
}

.landing-discord-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 18px 18px;
}

.landing-discord-actions span {
  flex: 1 1 72px;
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.08);
  color: rgba(var(--text-rgb), 0.88);
  font-weight: 850;
}

.landing-metric {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.landing-metric strong {
  color: var(--text);
}

.landing-hero-content {
  position: relative;
  z-index: 1;
  width: min(840px, calc(100% - 48px));
  margin: 0 auto;
  padding: 44px 0;
  text-align: center;
}

.landing-hero-content h1 {
  max-width: none;
  margin: 0 auto 10px;
  color: #faf9f5;
  font-size: clamp(3rem, 6.7vw, 6.25rem);
  letter-spacing: 0;
  text-shadow: 0 16px 48px rgba(0, 0, 0, 0.42);
}

.landing-hero-content h2 {
  max-width: 760px;
  margin: 0 auto 16px;
  font-size: clamp(1.35rem, 2.25vw, 2.5rem);
  line-height: 1.08;
  color: #f0eee6;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
}

.landing-hero-content .hero-lede {
  max-width: 760px;
  margin-inline: auto;
  color: rgba(var(--text-rgb), 0.74);
  font-size: clamp(0.98rem, 1.35vw, 1.14rem);
}

.landing-hero-content .hero-actions {
  justify-content: center;
}

.landing-trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.landing-trust-row span {
  padding: 8px 11px;
  border: 1px solid rgba(var(--text-rgb), 0.12);
  border-radius: 999px;
  background: rgba(var(--bg-rgb), 0.56);
  color: var(--muted);
  font-weight: 800;
}

.landing-strip {
  width: min(1160px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px auto 0;
}

.landing-strip div {
  display: grid;
  gap: 7px;
  padding: 16px;
  border: 1px solid rgba(var(--text-rgb), 0.09);
  border-radius: 8px;
  background: rgba(var(--text-rgb), 0.035);
}

.landing-strip strong {
  color: #d97757;
  font-size: 1.02rem;
  line-height: 1.2;
}

.landing-strip span {
  color: var(--muted);
}

.landing-editorial-hero {
  position: relative;
  isolation: isolate;
  width: min(1280px, 100%);
  min-height: min(760px, calc(100vh - 84px));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(var(--text-rgb), 0.1);
  border-radius: 14px;
  background:
    radial-gradient(circle at 16% 18%, rgba(var(--accent-rgb), 0.12), transparent 31%),
    linear-gradient(140deg, rgba(var(--text-rgb), 0.035), transparent 31%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  box-shadow: 0 22px 72px rgba(0, 0, 0, 0.28);
}

.landing-editorial-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(17, 17, 16, 0.08), rgba(17, 17, 16, 0.78) 78%),
    linear-gradient(180deg, rgba(17, 17, 16, 0), rgba(17, 17, 16, 0.3));
  pointer-events: none;
}

.landing-editorial-copy {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  justify-items: start;
  width: min(620px, 56%);
  min-height: inherit;
  padding: clamp(46px, 7vw, 92px) clamp(28px, 5vw, 68px);
}

.landing-editorial-copy h1 {
  max-width: 10ch;
  margin-bottom: 14px;
  color: var(--text);
  font-size: clamp(3.9rem, 7.4vw, 6.55rem);
  line-height: 0.93;
}

.landing-editorial-copy h1 span {
  display: block;
}

.landing-editorial-copy h2 {
  max-width: 640px;
  margin-bottom: 16px;
  color: #f0eee6;
  font-size: clamp(1.42rem, 2.1vw, 2.08rem);
}

.landing-editorial-copy .hero-lede {
  max-width: 610px;
  color: rgba(var(--text-rgb), 0.72);
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.landing-editorial-copy .hero-actions {
  margin-top: 30px;
}

.landing-editorial-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.landing-editorial-proof span {
  padding: 8px 11px;
  border: 1px solid rgba(var(--text-rgb), 0.1);
  border-radius: 999px;
  background: rgba(var(--text-rgb), 0.035);
  color: var(--muted);
  font-weight: 850;
}

.landing-editorial-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.landing-flow-artifact {
  position: absolute;
  top: 100px;
  right: -120px;
  width: min(760px, 60vw);
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(var(--text-rgb), 0.11);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(var(--text-rgb), 0.055), rgba(var(--text-rgb), 0.018)),
    rgba(var(--bg-rgb), 0.9);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.44);
  opacity: 0.58;
  transform: perspective(1200px) rotateX(2deg) rotateY(-7deg);
}

.landing-flow-artifact-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(var(--text-rgb), 0.08);
  background: rgba(var(--text-rgb), 0.035);
}

.landing-flow-artifact-top span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(var(--muted-rgb), 0.35);
}

.landing-flow-artifact-top i {
  margin-left: 10px;
  color: rgba(var(--text-rgb), 0.48);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 850;
}

.landing-flow-artifact-body {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 260px;
  gap: 14px;
  min-height: 472px;
  padding: 14px;
}

.landing-flow-artifact-rail,
.landing-flow-artifact-canvas,
.landing-discord-artifact {
  border: 1px solid rgba(var(--text-rgb), 0.08);
  border-radius: 8px;
  background: rgba(var(--text-rgb), 0.028);
}

.landing-flow-artifact-rail {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 13px;
  padding-top: 20px;
}

.landing-flow-artifact-rail span {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(var(--text-rgb), 0.07);
}

.landing-flow-artifact-rail .is-active {
  background: var(--accent);
}

.landing-flow-artifact-canvas {
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(var(--text-rgb), 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--text-rgb), 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
}

.landing-flow-node {
  position: absolute;
  display: grid;
  gap: 4px;
  width: 168px;
  min-height: 66px;
  padding: 13px;
  border: 1px solid rgba(var(--text-rgb), 0.12);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--text-rgb), 0.065), rgba(var(--text-rgb), 0.024)),
    var(--bg-soft);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
}

.landing-flow-node span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.landing-flow-node strong {
  color: var(--text);
  font-size: 0.95rem;
}

.node-command {
  top: 70px;
  left: 46px;
  border-color: rgba(var(--accent-rgb), 0.38);
}

.node-panel {
  top: 164px;
  left: 250px;
  border-color: rgba(var(--accent-warm-rgb), 0.34);
}

.node-ai {
  top: 278px;
  left: 90px;
  border-color: rgba(var(--muted-rgb), 0.28);
}

.node-reply {
  right: 38px;
  bottom: 54px;
  border-color: rgba(var(--accent-rgb), 0.28);
}

.landing-flow-wire {
  position: absolute;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0), rgba(var(--accent-rgb), 0.42), rgba(var(--accent-warm-rgb), 0));
  transform-origin: left center;
}

.wire-one {
  top: 140px;
  left: 194px;
  width: 130px;
  transform: rotate(20deg);
}

.wire-two {
  top: 240px;
  left: 260px;
  width: 158px;
  transform: rotate(137deg);
}

.wire-three {
  right: 158px;
  bottom: 112px;
  width: 112px;
  transform: rotate(18deg);
}

.landing-discord-artifact {
  display: grid;
  grid-template-rows: auto auto 1fr;
  overflow: hidden;
  background: rgba(var(--bg-rgb), 0.82);
}

.landing-discord-artifact-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid rgba(var(--text-rgb), 0.08);
}

.landing-discord-artifact-head strong {
  color: var(--text);
}

.landing-discord-artifact-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.landing-discord-message-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  margin: 14px;
  padding: 13px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.075);
}

.landing-discord-message-card > span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
}

.landing-discord-message-card strong {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
}

.landing-discord-message-card p {
  margin: 4px 0 9px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.landing-discord-message-card i {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  background: #5865f2;
  color: white;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
}

.landing-runtime-lines {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 0 14px 14px;
}

.landing-runtime-lines span {
  height: 38px;
  border: 1px solid rgba(var(--text-rgb), 0.08);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(var(--text-rgb), 0.13), rgba(var(--text-rgb), 0.06)) 12px 12px / 62% 7px no-repeat,
    linear-gradient(90deg, rgba(var(--muted-rgb), 0.12), rgba(var(--muted-rgb), 0.05)) 12px 24px / 42% 6px no-repeat,
    rgba(var(--text-rgb), 0.03);
}

.landing-product-hero,
.landing-outcomes {
  width: min(1220px, 100%);
  margin-inline: auto;
}

.landing-product-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(520px, 1.1fr);
  gap: clamp(32px, 5vw, 68px);
  align-items: center;
  min-height: min(760px, calc(100vh - 84px));
  padding: clamp(46px, 6vw, 82px) clamp(26px, 5vw, 62px);
  overflow: hidden;
  border: 1px solid rgba(var(--text-rgb), 0.09);
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 18%, rgba(var(--accent-rgb), 0.14), transparent 28%),
    radial-gradient(circle at 86% 14%, rgba(var(--accent-warm-rgb), 0.08), transparent 26%),
    linear-gradient(145deg, rgba(var(--text-rgb), 0.04), transparent 36%),
    #121211;
  box-shadow: 0 26px 82px rgba(0, 0, 0, 0.31);
}

.landing-product-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 36%;
  background: linear-gradient(180deg, rgba(var(--bg-rgb), 0), rgba(var(--bg-rgb), 0.78));
  pointer-events: none;
}

.landing-title-hero {
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: min(660px, calc(100vh - 84px));
  padding: clamp(70px, 9vw, 118px) clamp(24px, 5vw, 64px);
  background: #121211;
  box-shadow: none;
}

html[data-theme="live"] .landing-title-hero {
  border-color: rgba(148, 163, 184, 0.16);
  background: #0b1017;
  box-shadow: var(--shadow);
}

.landing-title-hero::after {
  display: none;
}

.landing-title-hero .landing-product-copy {
  position: relative;
  z-index: 1;
  justify-items: center;
  max-width: 820px;
  text-align: center;
}

.landing-title-hero .landing-product-copy h1 {
  max-width: 900px;
  font-size: clamp(3rem, 5.4vw, 5.7rem);
  line-height: 0.95;
}

.landing-title-hero .landing-product-copy h2 {
  max-width: 720px;
}

.landing-title-hero .landing-product-copy .hero-lede {
  max-width: 660px;
}

.landing-title-hero .landing-product-copy .hero-actions {
  justify-content: center;
}

.landing-product-copy {
  display: grid;
  justify-items: start;
  min-width: 0;
  max-width: 590px;
}

.landing-product-copy h1 {
  max-width: 8.4ch;
  margin-bottom: 16px;
  color: var(--text);
  font-size: clamp(3.3rem, 5.4vw, 5.45rem);
  line-height: 0.94;
}

.landing-product-copy h2 {
  max-width: 580px;
  margin-bottom: 16px;
  color: #f0eee6;
  font-size: clamp(1.42rem, 2.2vw, 2.2rem);
  line-height: 1.08;
}

.landing-product-copy .hero-lede {
  max-width: 600px;
  color: rgba(var(--text-rgb), 0.72);
  font-size: clamp(1.02rem, 1.3vw, 1.14rem);
}

.landing-product-copy .hero-actions {
  margin-top: 32px;
}

.landing-launch-path {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(560px, 100%);
  margin-top: 46px;
  overflow: hidden;
  border: 1px solid rgba(var(--text-rgb), 0.08);
  border-radius: 10px;
  background: rgba(var(--text-rgb), 0.08);
}

.landing-launch-path article {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 16px;
  background: rgba(var(--text-rgb), 0.035);
}

.landing-launch-path span {
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.landing-launch-path strong {
  color: #f4f1e9;
  font-size: 0.95rem;
  line-height: 1.28;
}

.landing-product-stage {
  position: relative;
  min-width: 0;
}

.landing-product-stage::before {
  content: "";
  position: absolute;
  inset: 8% 10% auto;
  height: 68%;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.12);
  filter: blur(58px);
  opacity: 0.76;
  pointer-events: none;
}

.landing-editor-shot {
  position: relative;
  z-index: 1;
  width: min(700px, 100%);
  margin-left: auto;
  overflow: hidden;
  border: 1px solid rgba(var(--text-rgb), 0.12);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(var(--text-rgb), 0.06), rgba(var(--text-rgb), 0.022)),
    rgba(var(--panel-rgb), 0.96);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.landing-editor-shot-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(var(--text-rgb), 0.08);
  background: rgba(var(--text-rgb), 0.035);
}

.landing-editor-shot-toolbar div {
  min-width: 0;
  margin-right: auto;
}

.landing-editor-shot-toolbar .eyebrow {
  margin-bottom: 4px;
  font-size: 0.66rem;
}

.landing-editor-shot-toolbar strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-editor-shot-toolbar > span {
  display: inline-grid;
  place-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(var(--text-rgb), 0.1);
  border-radius: 8px;
  color: rgba(var(--text-rgb), 0.78);
  background: rgba(var(--text-rgb), 0.045);
  font-size: 0.75rem;
  font-weight: 850;
  white-space: nowrap;
}

.landing-editor-shot-toolbar > span:last-child {
  border-color: transparent;
  background: var(--accent);
  color: var(--theme-button-text);
}

.landing-editor-shot-body {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 176px;
  gap: 10px;
  min-height: 360px;
  padding: 12px;
}

.landing-editor-shot-sidebar,
.landing-editor-shot-canvas,
.landing-editor-shot-inspector,
.landing-editor-shot-preview {
  border: 1px solid rgba(var(--text-rgb), 0.08);
  border-radius: 9px;
  background: rgba(var(--text-rgb), 0.026);
}

.landing-editor-shot-sidebar {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px 9px;
}

.landing-editor-shot-sidebar span {
  color: rgba(var(--text-rgb), 0.48);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-editor-shot-sidebar strong,
.landing-editor-shot-sidebar i {
  display: grid;
  align-items: center;
  min-height: 30px;
  padding: 0 9px;
  overflow: hidden;
  border: 1px solid rgba(var(--text-rgb), 0.08);
  border-radius: 7px;
  color: rgba(var(--text-rgb), 0.82);
  background: rgba(var(--text-rgb), 0.04);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-editor-shot-sidebar strong,
.landing-editor-shot-sidebar i:nth-of-type(2) {
  border-color: rgba(var(--accent-rgb), 0.36);
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent-strong);
}

.landing-editor-shot-canvas {
  position: relative;
  min-height: 336px;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(var(--text-rgb), 0.034) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--text-rgb), 0.034) 1px, transparent 1px);
  background-size: 34px 34px;
}

.landing-editor-node {
  position: absolute;
  display: grid;
  gap: 4px;
  width: 138px;
  min-height: 58px;
  padding: 11px;
  border: 1px solid rgba(var(--text-rgb), 0.12);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--text-rgb), 0.07), rgba(var(--text-rgb), 0.025)),
    var(--bg-soft);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
}

.landing-editor-node span,
.landing-editor-shot-inspector .eyebrow {
  color: rgba(var(--text-rgb), 0.5);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-editor-node strong {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.2;
}

.editor-node-command {
  top: 34px;
  left: 28px;
  border-color: rgba(var(--accent-rgb), 0.36);
}

.editor-node-panel {
  top: 100px;
  right: 28px;
  border-color: rgba(var(--accent-warm-rgb), 0.34);
}

.editor-node-ai {
  left: 50px;
  bottom: 54px;
  border-color: rgba(var(--accent-rgb), 0.32);
}

.editor-node-reply {
  right: 42px;
  bottom: 28px;
  border-color: rgba(var(--muted-rgb), 0.28);
}

.landing-editor-wire {
  position: absolute;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0), rgba(var(--accent-rgb), 0.46), rgba(var(--accent-warm-rgb), 0));
  transform-origin: left center;
}

.editor-wire-one {
  top: 92px;
  left: 154px;
  width: 128px;
  transform: rotate(18deg);
}

.editor-wire-two {
  top: 186px;
  left: 190px;
  width: 116px;
  transform: rotate(136deg);
}

.editor-wire-three {
  right: 118px;
  bottom: 82px;
  width: 86px;
  transform: rotate(15deg);
}

.landing-editor-shot-inspector {
  display: grid;
  align-content: start;
  gap: 11px;
  padding: 12px;
}

.landing-editor-shot-inspector strong {
  color: var(--text);
  font-size: 0.98rem;
}

.landing-editor-shot-inspector label {
  gap: 6px;
  color: rgba(var(--text-rgb), 0.56);
  font-size: 0.68rem;
}

.landing-editor-shot-inspector label span {
  display: block;
  min-height: 32px;
  padding: 8px 9px;
  overflow: hidden;
  border: 1px solid rgba(var(--text-rgb), 0.08);
  border-radius: 7px;
  background: rgba(var(--bg-soft-rgb), 0.82);
  color: rgba(var(--text-rgb), 0.86);
  font-size: 0.72rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-editor-shot-preview {
  display: grid;
  gap: 12px;
  margin: 0 12px 12px;
  padding: 12px;
  background: rgba(12, 12, 11, 0.44);
}

.landing-editor-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}

.landing-editor-preview-head span {
  color: rgba(var(--text-rgb), 0.48);
  font-size: 0.76rem;
  font-weight: 850;
}

.landing-editor-discord-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  padding: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.075);
}

.landing-editor-discord-card > span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
}

.landing-editor-discord-card div {
  min-width: 0;
}

.landing-editor-discord-card strong {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
}

.landing-editor-discord-card p {
  margin: 4px 0 9px;
  color: rgba(var(--text-rgb), 0.64);
  font-size: 0.82rem;
  line-height: 1.34;
}

.landing-editor-discord-card i {
  display: inline-grid;
  place-items: center;
  min-height: 27px;
  padding: 0 10px;
  border-radius: 6px;
  background: #5865f2;
  color: #fff;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 850;
}

.landing-studio-panel {
  position: relative;
  z-index: 1;
  width: min(660px, 100%);
  margin-left: auto;
  overflow: hidden;
  border: 1px solid rgba(var(--text-rgb), 0.13);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(var(--text-rgb), 0.07), rgba(var(--text-rgb), 0.025)),
    rgba(22, 22, 20, 0.96);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
  animation: landingStudioDrift 8s ease-in-out infinite;
}

.landing-studio-topbar,
.landing-studio-status {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(var(--text-rgb), 0.08);
  background: rgba(var(--text-rgb), 0.035);
}

.landing-studio-topbar {
  gap: 8px;
}

.landing-studio-topbar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(var(--muted-rgb), 0.32);
}

.landing-studio-topbar strong {
  margin-left: 10px;
  color: rgba(var(--text-rgb), 0.54);
  font-size: 0.82rem;
}

.landing-studio-body {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  min-height: 460px;
  padding: 14px;
}

.landing-studio-sidebar,
.landing-studio-canvas,
.landing-studio-preview {
  border: 1px solid rgba(var(--text-rgb), 0.08);
  border-radius: 9px;
  background: rgba(var(--text-rgb), 0.026);
}

.landing-studio-sidebar {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px 10px;
}

.landing-studio-sidebar span {
  color: rgba(var(--text-rgb), 0.46);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-studio-sidebar i {
  display: grid;
  place-items: center start;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(var(--text-rgb), 0.07);
  border-radius: 7px;
  color: rgba(var(--text-rgb), 0.72);
  background: rgba(var(--text-rgb), 0.035);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 850;
}

.landing-studio-sidebar i:nth-child(3) {
  border-color: rgba(var(--accent-rgb), 0.34);
  color: var(--accent-strong);
  background: rgba(var(--accent-rgb), 0.11);
}

.landing-studio-canvas {
  position: relative;
  min-width: 0;
  min-height: 292px;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(var(--text-rgb), 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--text-rgb), 0.032) 1px, transparent 1px);
  background-size: 34px 34px;
}

.landing-studio-preview {
  grid-column: 2;
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-width: 0;
  min-height: 140px;
  overflow: hidden;
  background: rgba(12, 12, 11, 0.42);
}

.studio-node {
  position: absolute;
  display: grid;
  gap: 4px;
  width: 154px;
  min-height: 62px;
  padding: 12px;
  border: 1px solid rgba(var(--text-rgb), 0.12);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--text-rgb), 0.07), rgba(var(--text-rgb), 0.025)),
    var(--bg-soft);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.25);
}

.studio-node span {
  color: rgba(var(--text-rgb), 0.5);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.studio-node strong {
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.22;
}

.studio-node-command {
  top: 34px;
  left: 38px;
  border-color: rgba(var(--accent-rgb), 0.36);
}

.studio-node-panel {
  top: 96px;
  right: 40px;
  border-color: rgba(var(--accent-warm-rgb), 0.32);
}

.studio-node-ai {
  left: 84px;
  bottom: 38px;
  border-color: rgba(var(--accent-rgb), 0.34);
  animation: landingNodePulse 3.4s ease-in-out infinite;
}

.studio-node-reply {
  right: 62px;
  bottom: 28px;
  border-color: rgba(var(--muted-rgb), 0.28);
}

.studio-wire {
  position: absolute;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0), rgba(var(--accent-rgb), 0.45), rgba(var(--accent-warm-rgb), 0));
  transform-origin: left center;
}

.studio-wire-one {
  top: 94px;
  left: 172px;
  width: 184px;
  transform: rotate(13deg);
}

.studio-wire-two {
  right: 152px;
  top: 164px;
  width: 142px;
  transform: rotate(146deg);
}

.studio-wire-three {
  left: 226px;
  bottom: 76px;
  width: 112px;
  transform: rotate(5deg);
}

.landing-studio-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(var(--text-rgb), 0.08);
}

.landing-studio-preview-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.landing-studio-preview-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(var(--text-rgb), 0.46);
  font-size: 0.76rem;
  font-weight: 850;
}

.landing-studio-message {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  margin: 12px 14px;
  padding: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.075);
}

.landing-studio-message > span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
}

.landing-studio-message div {
  min-width: 0;
}

.landing-studio-message strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
}

.landing-studio-message p {
  margin: 4px 0 9px;
  color: rgba(var(--text-rgb), 0.64);
  font-size: 0.82rem;
  line-height: 1.34;
  overflow-wrap: anywhere;
}

.landing-studio-message i {
  display: inline-grid;
  place-items: center;
  min-height: 27px;
  padding: 0 10px;
  border-radius: 6px;
  background: #5865f2;
  color: #fff;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 850;
}

.landing-studio-log {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 0 14px 14px;
}

.landing-studio-log span {
  height: 12px;
  border-radius: 999px;
  background: rgba(var(--text-rgb), 0.08);
}

.landing-studio-log span:nth-child(2) {
  width: 74%;
}

.landing-studio-log span:nth-child(3) {
  width: 48%;
}

.landing-studio-status {
  justify-content: space-between;
  border-top: 1px solid rgba(var(--text-rgb), 0.08);
  border-bottom: 0;
  color: rgba(var(--text-rgb), 0.58);
  font-size: 0.82rem;
}

.landing-studio-status strong {
  color: var(--accent-strong);
}

.landing-outcomes {
  padding-top: 64px;
}

.landing-section-intro {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 820px;
  margin: 0 auto 26px;
  text-align: center;
}

.landing-section-intro h2 {
  max-width: 820px;
  margin-bottom: 0;
  font-size: clamp(1.75rem, 3.1vw, 3rem);
}

.landing-outcome-row {
  width: min(1160px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0 auto;
}

.landing-outcome-row article {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 158px;
  padding: 17px;
  border: 1px solid rgba(var(--text-rgb), 0.09);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--text-rgb), 0.045), rgba(var(--text-rgb), 0.018)),
    var(--panel);
}

.landing-outcome-row span {
  color: rgba(var(--accent-warm-rgb), 0.78);
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.landing-outcome-row strong {
  color: var(--accent);
  font-size: 1.02rem;
  line-height: 1.2;
}

.landing-outcome-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.landing-feature-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 260px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
    var(--panel);
}

.landing-feature-card > span {
  color: var(--accent-warm);
  font-weight: 900;
  font-size: 2rem;
}

.landing-feature-card p,
.landing-marketplace-copy p,
.landing-template-stack p {
  color: var(--muted);
  line-height: 1.6;
}

.landing-marketplace-band {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: 26px;
  align-items: center;
  padding-top: 72px;
}

.landing-marketplace-copy {
  display: grid;
  justify-items: start;
  gap: 12px;
}

.landing-template-stack {
  display: grid;
  gap: 12px;
}

.landing-template-stack article {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  transform: translateX(calc(var(--offset, 0) * 1px));
}

.landing-template-stack article:nth-child(1) {
  --offset: -18;
}

.landing-template-stack article:nth-child(2) {
  --offset: 18;
}

.landing-template-stack article:nth-child(3) {
  --offset: -4;
}

.landing-faq {
  scroll-margin-top: 96px;
}

.landing-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.landing-faq-item {
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    var(--panel);
  overflow: hidden;
}

.landing-faq-item summary {
  position: relative;
  min-height: 68px;
  padding: 18px 46px 18px 18px;
  cursor: pointer;
  color: var(--text);
  font-weight: 900;
  line-height: 1.25;
  list-style: none;
}

.landing-faq-item summary::-webkit-details-marker {
  display: none;
}

.landing-faq-item summary::after {
  content: "+";
  position: absolute;
  top: 16px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 8px;
  color: var(--accent-strong);
  background: rgba(var(--accent-rgb), 0.08);
}

.landing-faq-item[open] summary::after {
  content: "-";
}

.landing-faq-item p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--muted);
  line-height: 1.62;
}

.landing-plan-card {
  position: relative;
  overflow: hidden;
  --plan-accent: var(--accent);
  --plan-accent-strong: var(--accent-strong);
  --plan-glow: rgba(var(--accent-rgb), 0.16);
  border-color: color-mix(in srgb, var(--plan-accent) 34%, rgba(255, 255, 255, 0.12));
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--plan-accent) 14%, transparent), rgba(255, 255, 255, 0.035) 48%, color-mix(in srgb, var(--plan-accent-strong) 8%, transparent)),
    var(--panel);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.landing-plan-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 28%, color-mix(in srgb, var(--plan-accent) 18%, transparent));
  transition: opacity 200ms ease;
}

.landing-plan-card:hover {
  transform: translateY(-6px);
}

.landing-plan-card:hover::before {
  opacity: 1;
}

.plan-free {
  --plan-accent: #8f8a7e;
  --plan-accent-strong: #d8d0c2;
  animation: planFloat 7s ease-in-out infinite;
}

.plan-standard {
  --plan-accent: #b08d6f;
  --plan-accent-strong: #f1d8bf;
  box-shadow: 0 18px 54px rgba(176, 141, 111, 0.12);
  animation: planFloat 6.2s ease-in-out infinite;
  animation-delay: -1.1s;
}

.plan-pro {
  --plan-accent: #d97757;
  --plan-accent-strong: #f1b39c;
  border-color: rgba(var(--accent-rgb), 0.68);
  box-shadow: 0 24px 72px rgba(var(--accent-rgb), 0.18);
  animation: planPulse 4.8s ease-in-out infinite;
}

.plan-builder {
  --plan-accent: #8f7bb8;
  --plan-accent-strong: #ddcff4;
  box-shadow: 0 22px 66px rgba(143, 123, 184, 0.16);
  animation: planFloat 6.8s ease-in-out infinite;
  animation-delay: -2.8s;
}

.plan-agency {
  --plan-accent: #bf6f7d;
  --plan-accent-strong: #f0bcc5;
  box-shadow: 0 24px 74px rgba(191, 111, 125, 0.17);
  animation: planFloat 7.3s ease-in-out infinite;
  animation-delay: -3.4s;
}

.plan-enterprise {
  --plan-accent: #ffcc61;
  --plan-accent-strong: #fff2b7;
  border-color: rgba(255, 204, 97, 0.86);
  background:
    radial-gradient(circle at 82% -8%, rgba(255, 241, 177, 0.28), transparent 36%),
    linear-gradient(160deg, rgba(255, 204, 97, 0.24), rgba(var(--accent-rgb), 0.12) 46%, rgba(255, 255, 255, 0.055)),
    var(--panel);
  box-shadow: 0 30px 100px rgba(255, 194, 76, 0.28), 0 0 34px rgba(255, 234, 169, 0.12);
  animation: enterpriseGlow 4.2s ease-in-out infinite;
  animation-delay: -2.2s;
}

.plan-enterprise .price-line,
.plan-enterprise .plan-deal strong {
  color: #fff0ad;
}

.plan-deal {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px 13px;
  border: 1px solid color-mix(in srgb, var(--plan-accent) 52%, rgba(255, 255, 255, 0.16));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--plan-accent) 18%, transparent), rgba(255, 255, 255, 0.055)),
    rgba(255, 255, 255, 0.035);
  box-shadow: 0 16px 40px color-mix(in srgb, var(--plan-accent) 16%, transparent);
}

.plan-deal span,
.bonus-strip span,
.renewal-line {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.plan-deal strong {
  color: var(--plan-accent-strong);
  font-size: 1.34rem;
  line-height: 1.1;
}

.renewal-line {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}

.bonus-strip {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--plan-accent) 38%, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--plan-accent) 13%, transparent), rgba(255, 255, 255, 0.045)),
    rgba(4, 8, 13, 0.26);
}

.bonus-strip strong {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.25;
}

.plan-cta {
  justify-self: start;
  align-self: flex-start;
  margin-top: auto;
}

.pricing-grid .plan-card > .button {
  justify-self: start;
  align-self: flex-start;
  margin-top: auto;
}

.pricing-grid .plan-card > .status-pill {
  align-self: flex-start;
  margin-top: auto;
}

.pricing-grid .plan-card .button.plan-cta,
.pricing-grid .plan-card > .button {
  min-height: 46px;
  height: 46px;
  line-height: 1;
  white-space: nowrap;
}

.pricing-grid .plan-card:not(.plan-enterprise) .button.plan-cta,
.pricing-grid .plan-card:not(.plan-enterprise) > .button {
  width: 132px;
}

.pricing-grid .plan-card > div > p {
  line-height: 1.38;
}

.pricing-fine-print {
  max-width: 880px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: center;
}

.best-seller-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  padding: 7px 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.2), rgba(var(--muted-rgb), 0.16)),
    rgba(var(--bg-rgb), 0.72);
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@keyframes planFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

@keyframes planPulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 24px 72px rgba(var(--accent-rgb), 0.18);
  }

  50% {
    transform: translateY(-5px);
    box-shadow: 0 30px 94px rgba(var(--accent-rgb), 0.28);
  }
}

@keyframes enterpriseGlow {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 30px 100px rgba(255, 194, 76, 0.28), 0 0 34px rgba(255, 234, 169, 0.12);
  }

  50% {
    transform: translateY(-6px);
    box-shadow: 0 38px 124px rgba(255, 194, 76, 0.42), 0 0 48px rgba(255, 236, 178, 0.2), 0 0 34px rgba(var(--accent-rgb), 0.14);
  }
}

.landing-plan-card:hover {
  animation-play-state: paused;
  transform: translateY(-8px) scale(1.01);
}

.ops-panel,
.auth-card,
.dashboard-create,
.bot-card,
.empty-state,
.checkout-panel,
.order-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    var(--panel);
  box-shadow: var(--shadow);
}

.ops-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.panel-header {
  min-height: 150px;
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(var(--accent-rgb), 0.18), transparent 48%),
    linear-gradient(320deg, rgba(var(--muted-rgb), 0.16), transparent 42%),
    var(--bg-soft);
}

.panel-header strong {
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  line-height: 1.05;
}

.status-grid,
.auth-grid,
.dashboard-summary,
.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.status-grid div,
.command-card,
.capability-card,
.plan-card,
.dashboard-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.status-grid div {
  display: grid;
  gap: 7px;
  padding: 16px;
}

.status-grid strong {
  font-size: 1.2rem;
}

.command-card {
  padding: 18px;
}

.command-card p {
  margin: 8px 0 0;
}

.metric-strip,
.capability-grid,
.pricing-grid,
.bot-manage-grid,
.create-grid {
  display: grid;
  gap: 18px;
}

.metric-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: -6px;
}

.metric-strip div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.metric-strip strong,
.dashboard-summary strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.9rem;
  color: var(--accent-warm);
}

.metric-strip span,
.dashboard-summary span {
  color: var(--muted);
  line-height: 1.45;
}

.section,
.auth-shell {
  padding: 66px 0 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

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

.capability-card {
  display: grid;
  align-content: start;
  min-height: 280px;
  padding: 24px;
}

.capability-card > span {
  color: var(--accent-warm);
  font-size: 2.3rem;
  font-weight: 900;
}

.capability-card small {
  color: var(--muted);
  margin: 5px 0 28px;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--panel);
}

.plan-card.featured {
  border-color: rgba(var(--accent-rgb), 0.5);
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.12), rgba(255, 255, 255, 0.04)),
    var(--panel);
}

.plan-card h3 {
  margin: 14px 0 12px;
  font-size: 1.8rem;
}

.price-line {
  display: block;
  color: var(--accent-warm);
  font-size: 1.25rem;
}

.plan-card ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.plan-card li {
  color: var(--muted);
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.plan-card li::before {
  content: "✓";
  display: grid;
  place-items: center;
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--plan-accent, var(--accent)) 18%, rgba(255, 255, 255, 0.04));
  border: 1px solid color-mix(in srgb, var(--plan-accent, var(--accent)) 50%, transparent);
  color: var(--plan-accent-strong, var(--accent-strong));
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.plan-card li.is-missing {
  color: color-mix(in srgb, #ff8795 74%, var(--muted));
}

.plan-card li.is-missing::before {
  content: "×";
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.44);
  color: #ff9aa6;
}

.plan-card li.is-limited::before {
  content: "-";
  background: rgba(242, 178, 93, 0.12);
  border-color: rgba(242, 178, 93, 0.48);
  color: var(--accent-warm);
}

.compact-form,
.auth-form,
.bot-form,
.create-grid,
.checkout-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--text);
}

.secret-token-input {
  -webkit-text-security: disc;
  text-security: disc;
}

textarea {
  padding-top: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(var(--accent-rgb), 0.32);
  outline-offset: 1px;
}

.auth-shell h1,
.dashboard-section h1 {
  max-width: 100%;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  overflow-wrap: anywhere;
}

.auth-flow-shell {
  width: min(760px, 100%);
  margin-inline: auto;
}

.auth-flow-intro {
  max-width: 720px;
  margin-bottom: 24px;
}

.auth-flow-intro-centered {
  margin-inline: auto;
  text-align: center;
}

.auth-flow-intro p {
  color: var(--muted);
}

.auth-flow-layout {
  display: grid;
  grid-template-columns: minmax(0, 560px);
  align-items: start;
  justify-content: center;
  gap: 16px;
}

.verify-flow-layout {
  grid-template-columns: minmax(0, 520px);
}

.auth-side-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.08), rgba(255, 255, 255, 0.03)),
    var(--panel);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.22);
}

.auth-step-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: auth-step;
}

.auth-step-list li {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  min-height: 58px;
  padding: 11px;
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  counter-increment: auth-step;
}

.auth-step-list li::before {
  content: counter(auth-step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 900;
}

.auth-step-list li.is-active {
  border-color: rgba(var(--accent-rgb), 0.46);
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--text);
}

.auth-step-list li.is-complete::before {
  content: "✓";
  border-color: rgba(var(--accent-rgb), 0.46);
  background: rgba(var(--accent-rgb), 0.14);
}

.auth-step-list strong,
.auth-step-list span {
  grid-column: 2;
}

.auth-step-list strong {
  color: var(--text);
}

.auth-step-list span {
  font-size: 0.92rem;
  line-height: 1.35;
}

.auth-referral-note {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid rgba(var(--accent-warm-rgb), 0.26);
  border-radius: 8px;
  background: rgba(var(--accent-warm-rgb), 0.1);
}

.auth-referral-note span {
  color: var(--accent-warm);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.auth-flow-card {
  display: grid;
  align-content: start;
  gap: 18px;
  width: 100%;
  padding: 22px;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

.auth-mode-switch button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.auth-mode-switch button.is-active {
  background: rgba(var(--accent-rgb), 0.13);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.24);
}

.auth-panel {
  display: grid;
  gap: 14px;
}

.auth-panel[hidden] {
  display: none;
}

.auth-panel h2 {
  margin-bottom: 0;
}

.auth-social {
  display: grid;
  gap: 10px;
}

.auth-google-button {
  width: 100%;
  gap: 10px;
  background: rgba(var(--text-rgb), 0.05);
}

.auth-google-button span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-size: 0.86rem;
  font-weight: 950;
}

.auth-divider {
  min-height: 1px;
  background: var(--line);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 72px;
}

.password-field button {
  position: absolute;
  top: 50%;
  right: 7px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-weight: 850;
  transform: translateY(-50%);
  cursor: pointer;
}

.password-field button:hover,
.password-field button:focus-visible {
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.36);
}

.auth-field-hint {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.verify-card {
  min-height: 0;
}

.verify-form {
  gap: 18px;
}

.otp-input {
  min-height: 62px;
  text-align: center;
  font-size: clamp(1.8rem, 5vw, 2.45rem);
  font-weight: 900;
  letter-spacing: 0.22em;
}

.auth-code-note {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid rgba(var(--muted-rgb), 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.auth-code-note strong {
  color: var(--text);
}

.auth-helper {
  margin: 12px 0 0;
  color: var(--muted);
}

.auth-helper a {
  color: var(--accent);
  text-decoration: none;
}

.auth-helper a:hover,
.auth-helper a:focus-visible {
  color: var(--accent-strong);
  text-decoration: underline;
}

.auth-consent {
  line-height: 1.55;
}

.public-info-page {
  max-width: 980px;
  margin-inline: auto;
}

.public-info-stack {
  display: grid;
  gap: 14px;
}

.public-info-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    var(--panel);
  box-shadow: var(--shadow);
}

.public-info-card h2 {
  margin: 0 0 12px;
}

.public-info-card h2 span,
.legal-clause-item h3 span {
  color: var(--accent-warm);
}

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

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

.public-info-notice {
  padding: 14px 16px;
  border: 1px solid rgba(var(--muted-rgb), 0.38);
  border-radius: 8px;
  background: rgba(var(--muted-rgb), 0.09);
  color: var(--text) !important;
  font-weight: 750;
}

.guide-interactive-section {
  padding-top: 72px;
}

.guide-workbench {
  display: grid;
  gap: 14px;
}

.guide-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-tab {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-weight: 850;
  cursor: pointer;
}

.guide-tab.is-active,
.guide-tab:hover,
.guide-tab:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.38);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--text);
  outline: none;
}

.guide-playbook {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.022)),
    var(--panel);
  box-shadow: var(--shadow);
}

.guide-playbook[hidden] {
  display: none;
}

.guide-playbook-head h3 {
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.guide-playbook-head p {
  color: var(--muted);
  line-height: 1.6;
}

.guide-flow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 16px;
  align-items: stretch;
}

.guide-flow-canvas {
  min-width: 0;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    rgba(255, 255, 255, 0.025);
  background-size: 36px 36px;
}

.guide-flow-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 250px);
  gap: 34px;
  align-items: center;
  min-height: 170px;
  width: max-content;
  min-width: 100%;
}

.guide-flow-node.flow-node {
  position: relative;
  inset: auto;
  width: 100%;
  min-height: 104px;
  padding-right: 42px;
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text);
  text-align: left;
}

.guide-flow-node.flow-node::after {
  content: "";
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.72), rgba(var(--accent-rgb), 0.5));
  transform: translateY(-50%);
  pointer-events: none;
}

.guide-flow-node.flow-node:last-child::after {
  display: none;
}

.guide-flow-node.flow-node:hover,
.guide-flow-node.flow-node:focus-visible,
.guide-flow-node.flow-node.is-selected {
  border-color: rgba(var(--accent-rgb), 0.75);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.16), 0 18px 44px rgba(0, 0, 0, 0.28);
  outline: none;
}

.guide-flow-node .node-port {
  pointer-events: none;
}

.guide-inspector {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.46);
}

.guide-inspector h3 {
  margin: 0;
}

.guide-inspector > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.guide-output-grid {
  display: grid;
  gap: 10px;
}

.guide-output-grid > div {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.guide-output-grid strong {
  color: var(--accent-warm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
}

.guide-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.guide-pill-list span {
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.guide-course-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.36fr);
  gap: 18px;
  align-items: stretch;
}

.guide-course-hero-copy {
  display: grid;
  align-content: center;
  justify-items: start;
  min-width: 0;
}

.guide-course-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.guide-course-progress-card {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.12), rgba(var(--muted-rgb), 0.08)),
    rgba(255, 255, 255, 0.045);
  box-shadow: var(--shadow);
}

.guide-course-progress-card strong {
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1;
}

.guide-course-progress-card span,
.guide-course-card p,
.guide-course-meta,
.guide-module-list span {
  color: var(--muted);
}

.guide-course-grid-section {
  padding-top: 28px;
}

.guide-course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.guide-course-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
    var(--panel);
}

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

.guide-course-card h3 {
  margin-bottom: 0;
  font-size: 1.34rem;
}

.guide-course-card p {
  line-height: 1.6;
}

.guide-progress-bar {
  position: relative;
  overflow: hidden;
  height: 9px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.guide-progress-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  transition: width 220ms ease;
}

.guide-module-list {
  display: grid;
  gap: 8px;
}

.guide-module-list div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.guide-module-list strong,
.guide-module-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-course-player-section {
  padding-top: 72px;
  width: min(1680px, 100%);
}

.guide-player-shell {
  position: relative;
  display: block;
}

.guide-lesson-rail,
.guide-editor-panel,
.guide-onboarding-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022)),
    var(--panel);
}

.guide-lesson-rail {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  background: rgba(255, 255, 255, 0.026);
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.34) transparent;
}

.guide-lesson-rail h3 {
  margin: 0;
  overflow: hidden;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-lesson-list {
  display: grid;
  gap: 8px;
}

.guide-lesson-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-areas:
    "num title"
    "num meta";
  gap: 3px 10px;
  align-items: center;
  min-width: 0;
  min-height: 52px;
  padding: 8px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.guide-lesson-button span {
  grid-area: num;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  font-weight: 900;
}

.guide-lesson-button strong {
  grid-area: title;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-lesson-button em {
  grid-area: meta;
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
}

.guide-lesson-button.is-active,
.guide-lesson-button:hover,
.guide-lesson-button:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.1);
  outline: none;
}

.guide-lesson-button:disabled {
  cursor: default;
  opacity: 0.62;
}

.guide-lesson-button:disabled:hover {
  border-color: rgba(var(--muted-rgb), 0.14);
  background: rgba(255, 255, 255, 0.035);
}

.guide-lesson-button.is-complete span {
  background: rgba(var(--muted-rgb), 0.16);
  color: var(--accent-warm);
}

.guide-editor-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  height: 840px;
  min-height: 740px;
  padding: 16px;
}

.guide-editor-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.guide-editor-toolbar h3 {
  margin: 0;
  font-size: 1.2rem;
}

.guide-toolbar-actions,
.guide-player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-weight: 800;
}

.guide-practice-workbench {
  display: grid;
  grid-template-columns: minmax(280px, 300px) minmax(0, 1fr) minmax(300px, 320px);
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.guide-block-palette,
.guide-canvas-wrap {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.guide-block-palette {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: start;
  gap: 12px;
  padding: 12px;
  overflow: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.4) transparent;
}

.guide-palette-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.4) transparent;
}

.guide-palette-button {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label status"
    "meta status";
  gap: 4px;
  min-height: 58px;
  align-items: center;
  text-align: left;
}

.guide-palette-button strong {
  grid-area: label;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-palette-button > span {
  grid-area: meta;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.guide-palette-status {
  grid-area: status;
  justify-self: end;
  align-self: center;
  padding: 4px 7px;
  border: 1px solid rgba(var(--muted-rgb), 0.18);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.guide-palette-button.is-active,
.guide-palette-button:hover,
.guide-palette-button:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.1);
  outline: none;
}

.guide-palette-button.is-guide-target {
  border-color: rgba(var(--accent-rgb), 0.66);
  background:
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.16), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.045);
  box-shadow: inset 3px 0 0 rgba(var(--accent-rgb), 0.82), 0 0 0 1px rgba(var(--accent-rgb), 0.08);
}

.guide-palette-button.is-guide-target .guide-palette-status {
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.13);
  color: var(--accent);
}

.guide-palette-button.is-added:not(.is-active) {
  border-color: rgba(var(--muted-rgb), 0.24);
}

.guide-palette-button.is-added .guide-palette-status {
  border-color: rgba(var(--muted-rgb), 0.28);
  color: var(--accent-warm);
}

.guide-palette-button.is-locked {
  opacity: 0.68;
}

.guide-palette-empty {
  padding: 10px 2px;
  color: var(--muted);
  font-size: 0.9rem;
}

.guide-canvas-wrap {
  overflow: hidden;
}

.guide-node-inspector {
  min-width: 0;
}

.guide-node-inspector .inspector-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-node-inspector input:disabled,
.guide-node-inspector textarea:disabled,
.guide-node-inspector select:disabled {
  color: var(--muted);
  opacity: 0.86;
  cursor: default;
}

.guide-inspector-coach {
  display: grid;
  gap: 0;
}

.guide-inspector-coach.is-complete {
  opacity: 0.92;
}

.guide-inspector-coach-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.guide-inspector-coach-head .button {
  min-height: 34px;
  padding-inline: 12px;
}

.guide-challenge-card {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.08), rgba(255, 255, 255, 0.025)),
    rgba(var(--bg-rgb), 0.22);
}

.guide-challenge-card.is-passed {
  border-color: rgba(var(--accent-warm-rgb), 0.34);
  background:
    linear-gradient(145deg, rgba(var(--accent-warm-rgb), 0.1), rgba(255, 255, 255, 0.025)),
    rgba(var(--bg-rgb), 0.22);
}

.guide-challenge-card > strong {
  color: var(--text);
  line-height: 1.25;
}

.guide-challenge-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.guide-challenge-actions .button {
  width: 100%;
  min-height: 38px;
}

.guide-challenge-hints {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.4;
}

.guide-challenge-note {
  padding: 8px 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.22);
  font-size: 0.84rem;
}

.guide-check-list {
  display: grid;
  gap: 7px;
}

.guide-check-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.24);
}

.guide-check-item span {
  min-width: 38px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(var(--muted-rgb), 0.14);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.guide-check-item strong {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.35;
}

.guide-check-item.is-passed span {
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--accent);
}

.guide-check-item.is-failed span {
  background: rgba(var(--accent-warm-rgb), 0.13);
  color: var(--accent-warm);
}

.guide-lesson-complete-card {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.09), rgba(255, 255, 255, 0.025)),
    rgba(var(--bg-rgb), 0.22);
}

.guide-lesson-complete-card strong {
  color: var(--text);
}

.guide-lesson-complete-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.guide-lesson-complete-card .button {
  width: 100%;
  min-height: 38px;
}

.guide-inspector-step {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.36);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
}

.guide-live-preview p {
  margin: 0;
  color: var(--muted);
  line-height: 1.43;
}

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

.guide-experiment-actions .button {
  width: 100%;
  min-height: 38px;
  padding-inline: 10px;
}

.guide-live-preview,
.guide-field {
  display: grid;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.22);
}

.guide-live-preview-body {
  display: grid;
  gap: 8px;
}

.guide-preview-card {
  display: grid;
  gap: 7px;
  padding: 10px 11px;
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-left: 3px solid rgba(var(--accent-rgb), 0.75);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.44);
}

.guide-preview-label {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.guide-preview-card > strong {
  color: var(--text);
  line-height: 1.25;
}

.guide-preview-row {
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding-top: 7px;
  border-top: 1px solid rgba(var(--muted-rgb), 0.12);
}

.guide-preview-row span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.guide-preview-row strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.82rem;
}

.guide-field {
  padding: 10px;
  transition: border-color 160ms ease, background 160ms ease;
}

.guide-field.is-edited {
  border-color: rgba(var(--accent-rgb), 0.32);
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.07), rgba(255, 255, 255, 0.025)),
    rgba(var(--bg-rgb), 0.22);
}

.guide-field.is-guide-focus {
  border-color: rgba(var(--accent-rgb), 0.48);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.08);
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.09), rgba(255, 255, 255, 0.026)),
    rgba(var(--bg-rgb), 0.22);
}

.guide-field-label {
  color: var(--text);
  font-weight: 850;
}

.guide-field-help {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.guide-field-pair {
  display: grid;
  gap: 8px;
}

.guide-json-mini-editor {
  min-width: 0;
  overflow: hidden;
  padding: 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

.guide-json-mini-editor select,
.guide-json-mini-editor input[type="text"] {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
}

.guide-record-values-editor {
  gap: 7px;
  padding: 8px;
}

.guide-record-value-row {
  display: grid;
  grid-template-columns: minmax(62px, 0.42fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.guide-record-value-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.guide-record-value-row input::placeholder {
  color: rgba(var(--muted-rgb), 0.68);
}

.guide-button-mini-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.guide-mini-control {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.guide-mini-control span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-inline-toggle {
  margin-top: 0;
}

.guide-field-help a {
  color: var(--accent);
  text-decoration: none;
}

.guide-field-help a:hover,
.guide-field-help a:focus-visible {
  color: var(--accent-strong);
  text-decoration: underline;
}

.guide-field-tutorial-actions {
  grid-template-columns: auto minmax(0, 1fr);
}

.guide-field-tutorial-actions .button {
  width: 100%;
}

.guide-field-tutorial-card.editor-tutorial-card {
  position: absolute;
  inset: 18px auto auto 18px;
  z-index: 92;
  width: min(360px, calc(100% - 36px));
  max-height: min(320px, calc(100% - 36px));
  overflow: auto;
  transition:
    opacity 180ms ease,
    transform 220ms ease,
    visibility 180ms ease;
}

.guide-editor-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    rgba(255, 255, 255, 0.025);
  background-size: 36px 36px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.guide-editor-canvas.is-panning {
  cursor: grabbing;
}

.guide-editor-world {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.guide-editor-links,
.guide-editor-nodes {
  position: absolute;
  inset: 0;
}

.guide-editor-link {
  stroke-dasharray: none;
  pointer-events: none;
}

.guide-editor-node.flow-node {
  min-height: 104px;
  padding-right: 50px;
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text);
  text-align: left;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.guide-editor-node.flow-node:hover,
.guide-editor-node.flow-node:focus-visible,
.guide-editor-node.flow-node.is-selected {
  border-color: rgba(var(--accent-rgb), 0.78);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.16), 0 18px 44px rgba(0, 0, 0, 0.28);
  outline: none;
}

.guide-editor-node.flow-node.is-guide-target {
  z-index: 4;
  border-color: rgba(var(--accent-rgb), 0.86);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.18), 0 0 0 6px rgba(var(--accent-rgb), 0.08), 0 18px 44px rgba(0, 0, 0, 0.3);
}

.guide-editor-node.flow-node.is-dragging {
  z-index: 6;
  cursor: grabbing;
  transform: scale(1.015);
}

.guide-editor-node .node-port {
  pointer-events: none;
}

.guide-empty-canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(340px, calc(100% - 48px));
  padding: 22px;
  border: 1px dashed rgba(var(--accent-rgb), 0.34);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.7);
  color: var(--muted);
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.guide-course-start {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(var(--bg-rgb), 0.5);
}

.guide-course-start[hidden] {
  display: none;
}

.guide-course-start-card {
  display: grid;
  gap: 12px;
  width: min(520px, calc(100% - 32px));
  padding: 20px;
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.12), rgba(var(--muted-rgb), 0.07)),
    rgba(var(--bg-rgb), 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.guide-course-start-card h3,
.guide-course-start-card p {
  margin: 0;
}

.guide-course-start-card p {
  color: var(--muted);
  line-height: 1.5;
}

.guide-challenge-start-note {
  padding: 10px 11px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.32);
}

.guide-course-start-card ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  font-weight: 800;
}

.guide-course-start-card .button {
  width: 100%;
  border-color: rgba(var(--accent-rgb), 0.55);
  background: var(--accent);
  color: var(--theme-button-text);
}

.guide-course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-course-meta span {
  padding: 5px 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
}

.guide-discord-preview {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 5;
  width: min(390px, calc(100% - 36px));
  max-height: min(420px, calc(100% - 36px));
  pointer-events: auto;
  touch-action: none;
}

.guide-discord-preview[hidden] {
  display: none;
}

.guide-discord-window {
  overflow: auto;
  max-height: min(420px, calc(100vh - 220px));
  border: 1px solid rgba(88, 101, 242, 0.26);
  border-radius: 8px;
  background: #313338;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  scrollbar-width: thin;
  scrollbar-color: rgba(88, 101, 242, 0.55) transparent;
}

.guide-discord-header {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  background: #2b2d31;
  color: #f2f3f5;
  font-weight: 900;
  cursor: grab;
  user-select: none;
}

.guide-discord-preview.is-dragging .guide-discord-header {
  cursor: grabbing;
}

.guide-discord-preview.is-updated .guide-discord-window {
  animation: guidePreviewPulse 360ms ease both;
}

.guide-discord-message {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 12px;
  color: #dbdee1;
}

.guide-discord-message + .guide-discord-message {
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}

.guide-discord-message.is-muted {
  opacity: 0.82;
}

.guide-discord-message.is-system {
  grid-template-columns: minmax(0, 1fr);
  padding: 7px 12px 7px 56px;
  color: #949ba4;
  font-size: 0.76rem;
  font-style: italic;
}

.guide-discord-message.is-system .guide-discord-avatar,
.guide-discord-message.is-system strong {
  display: none;
}

.guide-discord-message.is-system .guide-discord-content {
  margin-top: 0;
  color: #949ba4;
  line-height: 1.35;
}

.guide-discord-message.is-system .guide-discord-content div {
  margin-top: 1px;
}

.guide-discord-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #5865f2;
  color: white;
  font-weight: 900;
}

.guide-discord-message:nth-child(2) .guide-discord-avatar {
  background: #3ba55d;
}

.guide-discord-message strong {
  color: #f2f3f5;
}

.guide-discord-message p {
  margin: 3px 0 0;
  color: #dbdee1;
  line-height: 1.4;
}

.guide-discord-content {
  margin-top: 3px;
  color: #dbdee1;
  line-height: 1.4;
}

.guide-discord-content div {
  margin-top: 2px;
}

.guide-discord-message p strong {
  font-weight: 900;
}

.guide-thinking-dots {
  color: #b5bac1;
  letter-spacing: 0.08em;
}

.guide-discord-message .discord-embed-preview {
  margin-top: 8px;
  width: 100%;
  padding: 10px 12px;
}

.guide-discord-message .discord-form-preview {
  margin-top: 8px;
  width: 100%;
  padding: 10px 12px;
  background: #2b2d31;
}

.guide-discord-panel .discord-embed-preview {
  margin-top: 8px;
}

.guide-discord-panel .discord-button-row {
  padding-left: 2px;
}

.guide-discord-window.is-launch {
  background: #24262d;
}

.guide-launch-board {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.guide-launch-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.18);
  border-left: 4px solid rgba(88, 101, 242, 0.8);
  border-radius: 8px;
  background: #2b2d31;
  color: #dbdee1;
}

.guide-launch-card.is-online {
  border-left-color: #3ba55d;
}

.guide-launch-card.is-warning {
  border-left-color: #b0aea5;
}

.guide-launch-card.is-test {
  border-left-color: #b0aea5;
}

.guide-launch-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.guide-launch-card-head strong {
  min-width: 0;
  overflow: hidden;
  color: #f2f3f5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-launch-card-head span {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid rgba(var(--muted-rgb), 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #dbdee1;
  font-size: 0.72rem;
  font-weight: 850;
}

.guide-launch-row {
  display: grid;
  grid-template-columns: minmax(84px, auto) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-width: 0;
}

.guide-launch-row span {
  color: #949ba4;
  font-size: 0.75rem;
  font-weight: 850;
}

.guide-launch-row strong {
  overflow-wrap: anywhere;
  color: #dbdee1;
  font-size: 0.8rem;
  line-height: 1.35;
}

.guide-launch-card .guide-discord-message {
  grid-template-columns: 28px minmax(0, 1fr);
  padding: 7px 0 0;
}

.guide-launch-card .guide-discord-avatar {
  width: 28px;
  height: 28px;
  font-size: 0.78rem;
}

.guide-dashboard-tour-shell {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.55fr) minmax(280px, 0.72fr);
  gap: 16px;
  align-items: start;
}

.guide-dashboard-tour-rail,
.guide-dashboard-mock,
.guide-dashboard-live {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.022)),
    var(--panel);
  box-shadow: var(--shadow);
}

.guide-dashboard-tour-rail,
.guide-dashboard-live {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.guide-dashboard-tour-list {
  display: grid;
  gap: 8px;
}

.guide-dashboard-tour-rail.guide-lesson-rail {
  min-height: min(720px, calc(100vh - 132px));
  max-height: min(calc(100vh - 132px), 860px);
  overflow: auto;
}

.guide-dashboard-mock {
  min-height: min(720px, calc(100vh - 132px));
}

.guide-dashboard-tour-list .guide-lesson-button {
  min-height: 58px;
}

.guide-dashboard-tour-list .guide-lesson-button strong {
  white-space: normal;
  line-height: 1.25;
}

.guide-dashboard-tour-list .guide-lesson-button.is-complete {
  border-color: rgba(var(--muted-rgb), 0.32);
}

.guide-dashboard-mock {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.guide-dashboard-mock.is-focused [data-guide-tour-chrome] {
  display: none;
}

.guide-dashboard-panel[hidden] {
  display: none;
}

.guide-dashboard-panel.is-active-panel {
  animation: guideSurfaceIn 220ms ease;
}

.guide-dashboard-tour-card.editor-tutorial-card {
  width: min(360px, calc(100vw - 32px));
  max-height: min(420px, calc(100vh - 32px));
  overflow: auto;
}

.guide-dashboard-top,
.guide-dashboard-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.guide-dashboard-top h3,
.guide-dashboard-live h3 {
  margin: 0;
}

.guide-dashboard-top p,
.guide-dashboard-live p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.guide-dashboard-summary {
  margin: 0;
}

.guide-dashboard-panel {
  box-shadow: none;
}

.guide-bot-manage-mock {
  display: grid;
  align-content: start;
  gap: 14px;
}

.guide-bot-manage-card.command-manage-card {
  padding: 16px;
}

.guide-bot-manage-card .bot-data-grid,
.guide-bot-manage-card .status-grid {
  gap: 10px;
}

.guide-bot-manage-card .status-grid div {
  padding: 12px;
}

.guide-bot-manage-card .runtime-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.guide-dashboard-panel .section-heading {
  margin-bottom: 0;
}

.guide-dashboard-ai-body {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(260px, 1.05fr);
  gap: 14px;
  align-items: stretch;
}

.guide-dashboard-ai-body > .button {
  grid-column: 1 / -1;
  justify-self: start;
}

.guide-dashboard-build {
  min-height: 230px;
}

.guide-dashboard-bot-card {
  transition: border-color 180ms ease, background 180ms ease;
}

.guide-dashboard-runtime-grid {
  margin-top: 10px;
}

.guide-dashboard-live {
  align-content: start;
}

.guide-dashboard-event-log {
  display: grid;
  gap: 7px;
  margin-top: 4px;
}

.guide-dashboard-event-log span {
  display: block;
  padding: 9px 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.24);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.guide-dashboard-tour-actions {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.guide-dashboard-tour-actions .button {
  min-height: 38px;
}

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

@keyframes guidePreviewPulse {
  from {
    border-color: rgba(var(--accent-rgb), 0.68);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15), 0 18px 60px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
  }
  to {
    border-color: rgba(88, 101, 242, 0.26);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
    transform: translateY(0);
  }
}

.guide-empty-canvas[hidden] {
  display: none;
}

.guide-empty-canvas strong {
  color: var(--text);
}

.guide-onboarding-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
}

.guide-onboarding-progress {
  justify-self: start;
  padding: 7px 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.09);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
}

.guide-onboarding-card h3 {
  margin: 0;
}

.guide-onboarding-card > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.legal-clause {
  display: grid;
  gap: 18px;
}

.legal-clause h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.legal-clause-lead {
  color: var(--text) !important;
  font-size: 1.03rem;
}

.legal-clause-items {
  display: grid;
  gap: 12px;
}

.legal-clause-item {
  padding: 16px;
  border: 1px solid rgba(var(--text-rgb), 0.085);
  border-radius: 8px;
  background: rgba(var(--text-rgb), 0.035);
}

.legal-clause-item h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.04rem;
}

.legal-clause-item h3 span {
  flex: 0 0 auto;
  min-width: 54px;
  font-weight: 900;
}

.legal-clause-item p {
  color: var(--muted);
}

.legal-clause-item.is-emphasized {
  border-color: rgba(var(--accent-rgb), 0.42);
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.14), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
}

.legal-clause-item.is-emphasized h3,
.legal-clause-item.is-emphasized p {
  color: var(--text);
  font-weight: 760;
}

.auth-card,
.dashboard-create,
.bot-card,
.empty-state,
.checkout-panel,
.order-card {
  padding: 24px;
}

.premium-create-form {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 10px;
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.12), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.create-form-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(var(--muted-rgb), 0.14);
}

.create-form-head div {
  display: grid;
  gap: 8px;
}

.create-form-head strong {
  color: var(--text);
  font-size: 1.05rem;
}

.create-form-head p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

.dashboard-title-row,
.bot-card-head {
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.dashboard-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.dashboard-summary div {
  padding: 18px;
}

.trial-feedback-callout {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(var(--muted-rgb), 0.16);
}

.trial-feedback-copy {
  display: grid;
  align-content: start;
  gap: 8px;
}

.trial-feedback-copy h3 {
  margin: 0;
}

.trial-feedback-copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.trial-feedback-form {
  display: grid;
  gap: 12px;
}

.trial-feedback-form textarea {
  min-height: 112px;
  resize: vertical;
}

.trial-feedback-actions {
  display: flex;
  justify-content: flex-end;
}

.trial-feedback-page {
  display: grid;
  justify-items: center;
  align-content: center;
  width: min(760px, 100%);
  min-height: calc(100dvh - 250px);
  gap: 20px;
  padding-top: clamp(28px, 6vh, 72px);
}

.trial-feedback-heading {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 100%;
  text-align: center;
}

.trial-feedback-heading h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1;
}

.trial-feedback-heading p:last-child {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.trial-feedback-panel {
  width: min(620px, 100%);
  margin-inline: auto;
  padding: 22px;
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
    var(--panel);
}

.trial-feedback-page-form {
  width: 100%;
  max-width: none;
}

.trial-feedback-page-form .trial-feedback-actions {
  justify-content: center;
}

.trial-feedback-page-form .trial-feedback-actions .button {
  width: 100%;
}

.trial-feedback-success {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(620px, 100%);
  max-width: 620px;
  margin-inline: auto;
  padding: 28px 24px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.16), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)),
    var(--panel);
  text-align: center;
}

.trial-feedback-success h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1;
}

.trial-feedback-success p {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.trial-feedback-return-note {
  font-size: 0.92rem;
}

.trial-feedback-burst {
  position: relative;
  width: 92px;
  height: 92px;
  margin-bottom: 2px;
}

.trial-feedback-burst::before,
.trial-feedback-burst::after {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  box-shadow: 0 0 34px rgba(var(--accent-rgb), 0.28);
  animation: trialBurstPulse 1.7s ease-in-out infinite;
}

.trial-feedback-burst::after {
  inset: 35px;
  background: var(--panel);
  box-shadow: none;
  animation-delay: 0.12s;
}

.trial-feedback-burst span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent-warm);
  transform: rotate(var(--angle)) translateY(-42px);
  transform-origin: center;
  opacity: 0;
  animation: trialBurstRay 1.7s ease-out infinite;
  animation-delay: var(--delay);
}

.trial-feedback-burst span:nth-child(1) {
  --angle: 0deg;
  --delay: 0s;
}

.trial-feedback-burst span:nth-child(2) {
  --angle: 45deg;
  --delay: 0.04s;
}

.trial-feedback-burst span:nth-child(3) {
  --angle: 90deg;
  --delay: 0.08s;
}

.trial-feedback-burst span:nth-child(4) {
  --angle: 135deg;
  --delay: 0.12s;
}

.trial-feedback-burst span:nth-child(5) {
  --angle: 180deg;
  --delay: 0.16s;
}

.trial-feedback-burst span:nth-child(6) {
  --angle: 225deg;
  --delay: 0.2s;
}

.trial-feedback-burst span:nth-child(7) {
  --angle: 270deg;
  --delay: 0.24s;
}

.trial-feedback-burst span:nth-child(8) {
  --angle: 315deg;
  --delay: 0.28s;
}

@keyframes trialBurstPulse {
  0%,
  100% {
    transform: scale(0.92);
  }
  45% {
    transform: scale(1.08);
  }
}

@keyframes trialBurstRay {
  0% {
    opacity: 0;
    transform: rotate(var(--angle)) translateY(-24px) scaleY(0.35);
  }
  28% {
    opacity: 1;
  }
  70%,
  100% {
    opacity: 0;
    transform: rotate(var(--angle)) translateY(-44px) scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .trial-feedback-burst::before,
  .trial-feedback-burst::after,
  .trial-feedback-burst span {
    animation: none;
  }

  .trial-feedback-burst span {
    opacity: 0.7;
  }
}

.dashboard-create {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.dashboard-bot-launcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 14px;
}

.dashboard-bot-avatar-card,
.dashboard-add-bot-card {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 9px;
  min-height: 168px;
  padding: 16px 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.028);
  color: var(--text);
  text-align: center;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.dashboard-bot-avatar-card:hover,
.dashboard-bot-avatar-card:focus-visible,
.dashboard-add-bot-card:hover,
.dashboard-add-bot-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.38);
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.11), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.04);
}

.dashboard-bot-avatar-wrap {
  position: relative;
  display: block;
  width: 74px;
  height: 74px;
}

.dashboard-bot-avatar-wrap img,
.dashboard-bot-avatar-fallback,
.dashboard-add-bot-card > span {
  width: 74px;
  height: 74px;
  border-radius: 16px;
}

.dashboard-bot-avatar-wrap img {
  display: block;
  object-fit: cover;
  border: 1px solid rgba(var(--muted-rgb), 0.18);
  background: var(--bg-soft);
}

.dashboard-bot-avatar-fallback,
.dashboard-add-bot-card > span {
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.18), rgba(var(--muted-rgb), 0.08)),
    var(--bg-soft);
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 950;
}

.dashboard-add-bot-card {
  cursor: pointer;
}

.dashboard-add-bot-card > span {
  color: var(--accent-strong);
  font-size: 2rem;
  line-height: 1;
}

.dashboard-bot-avatar-card strong,
.dashboard-add-bot-card strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 0.96rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-bot-avatar-card > span:last-child {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 18px;
  height: 18px;
  border: 3px solid var(--panel);
  border-radius: 50%;
  background: var(--muted);
}

.status-dot.status-running {
  background: #35d0a5;
}

.status-dot.status-idle {
  background: var(--accent-warm);
}

.status-dot.status-error {
  background: var(--danger);
}

.dashboard-add-bot-backdrop {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: none;
  background: rgba(3, 7, 12, 0.54);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.dashboard-add-bot-backdrop.is-open {
  display: block;
}

.dashboard-add-bot-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 84;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(860px, calc(100vw - 36px));
  max-height: min(840px, calc(100vh - 36px));
  padding: 18px;
  border: 1px solid rgba(var(--muted-rgb), 0.22);
  border-radius: 10px;
  background: var(--bg-soft);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
  transform: translate(-50%, -48%) scale(0.98);
  visibility: hidden;
  pointer-events: none;
  transition: transform 180ms ease, visibility 180ms ease;
}

.dashboard-add-bot-modal.is-open {
  transform: translate(-50%, -50%) scale(1);
  visibility: visible;
  pointer-events: auto;
}

.dashboard-add-bot-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  gap: 14px;
  padding: 16px;
}

.dashboard-add-bot-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-add-bot-progress span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.dashboard-add-bot-progress span.is-active {
  border-color: rgba(var(--accent-rgb), 0.42);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent-strong);
}

.dashboard-add-bot-progress span.is-complete {
  border-color: rgba(53, 208, 165, 0.36);
  background: rgba(53, 208, 165, 0.11);
  color: #70e0c3;
}

.dashboard-add-bot-body {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.dashboard-add-bot-step {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 0;
}

.dashboard-add-bot-step[hidden] {
  display: none;
}

.dashboard-add-bot-step-copy,
.dashboard-add-bot-finish {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.09), rgba(var(--muted-rgb), 0.05)),
    rgba(255, 255, 255, 0.028);
}

.dashboard-add-bot-step-copy h4,
.dashboard-add-bot-finish h4 {
  margin: 0;
  font-size: 1rem;
}

.dashboard-add-bot-step-copy p,
.dashboard-add-bot-finish p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.dashboard-inline-guide {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(var(--text-rgb), 0.09);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

.dashboard-inline-guide-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-inline-guide-head h5 {
  margin: 4px 0 0;
  font-size: 0.98rem;
}

.dashboard-inline-guide-head > span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 850;
}

.dashboard-inline-guide-frame {
  max-height: 340px;
}

.dashboard-inline-guide p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.dashboard-inline-guide-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.dashboard-inline-guide-actions .button,
.dashboard-inline-guide-links .button {
  min-height: 38px;
}

.dashboard-add-bot-finish ul {
  display: grid;
  gap: 8px;
  margin: 4px 0;
  padding: 0;
  list-style: none;
}

.dashboard-add-bot-finish li {
  color: var(--muted);
  line-height: 1.45;
}

.dashboard-add-bot-finish strong {
  color: var(--text);
}

.dashboard-add-bot-field > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-add-bot-field b {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-add-bot-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

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

.bot-data-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.1);
}

.bot-data-row {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bot-data-row strong,
.bot-data-row span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-data-row strong {
  color: var(--text);
  white-space: nowrap;
}

.bot-data-row span {
  color: var(--muted);
  font-size: 0.9rem;
}

.orders-grid,
.checkout-grid,
.payment-grid,
.service-grid,
.marketplace-grid,
.recipe-grid,
.custom-flow-grid {
  display: grid;
  gap: 18px;
}

.marketplace-grid,
.service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.service-card,
.service-panel,
.marketplace-card,
.recipe-card,
.command-manage-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)),
    var(--panel);
}

.service-card,
.service-panel,
.marketplace-card,
.recipe-card,
.command-manage-card {
  padding: 20px;
}

.marketplace-card,
.service-card {
  display: grid;
  align-content: space-between;
  gap: 16px;
  min-height: 280px;
}

.marketplace-card p,
.service-card p,
.recipe-card p,
.command-manage-card p {
  color: var(--muted);
  line-height: 1.55;
}

.service-card-meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.service-card-meta span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--accent);
}

.service-section h1 {
  max-width: 13ch;
}

.marketplace-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  margin-bottom: 22px;
  padding: 22px;
  border: 1px solid rgba(var(--muted-rgb), 0.18);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.12), rgba(255, 255, 255, 0.035) 42%, rgba(245, 158, 11, 0.08)),
    rgba(255, 255, 255, 0.035);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.marketplace-hero-copy {
  display: grid;
  gap: 18px;
}

.marketplace-hero .section-heading h1 {
  max-width: 18ch;
}

.marketplace-credit-chip {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 999px;
  background: rgba(var(--bg-rgb), 0.52);
  color: var(--text);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.marketplace-credit-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--bg-rgb), 0.72);
}

.marketplace-credit-chip span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.marketplace-credit-chip strong {
  font-size: 1.05rem;
}

.marketplace-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 10px;
}

.marketplace-add-button {
  box-shadow: 0 14px 34px rgba(var(--accent-rgb), 0.16);
}

.marketplace-add-button span {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 900;
}

.marketplace-browse {
  display: grid;
  gap: 18px;
}

.marketplace-browse-head {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(340px, 0.9fr);
  gap: 18px;
  align-items: end;
}

.marketplace-filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(135px, 0.38fr) minmax(150px, 0.44fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.marketplace-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
}

.marketplace-pagination[hidden] {
  display: none;
}

#marketplace-empty-filter[hidden] {
  display: none !important;
}

.marketplace-pagination .button {
  min-width: 108px;
}

.marketplace-pagination .button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.js-marketplace-card[hidden],
.js-command-card[hidden],
.js-bot-card[hidden],
.js-owner-marketplace-card[hidden],
.js-owner-command-card[hidden],
.js-owner-user-card[hidden],
.js-owner-bot-card[hidden],
#command-filter-empty[hidden],
#bot-filter-empty[hidden],
.owner-filter-empty[hidden],
.marketplace-command-source[hidden],
.marketplace-bot-source[hidden],
.flow-list-item[hidden],
.toolbox-category[hidden],
.command-add-form[hidden],
.js-command-add-toggle[hidden],
.bot-command-add-category-toggle[hidden],
.bot-command-category-create[hidden],
.button[hidden] {
  display: none !important;
}

.marketplace-title-source-row {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.86fr);
}

.marketplace-source-control {
  min-width: 0;
}

.marketplace-product-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  gap: 0;
  min-height: 390px;
  --marketplace-accent: var(--accent);
  --marketplace-accent-strong: var(--accent-strong);
  animation: marketplaceProductIn 360ms ease both;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.marketplace-product-card::after {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

.marketplace-product-card.is-official {
  border-color: rgba(255, 204, 97, 0.72);
  background:
    radial-gradient(circle at 82% 0%, rgba(255, 241, 177, 0.26), transparent 34%),
    linear-gradient(160deg, rgba(255, 204, 97, 0.23), rgba(var(--accent-rgb), 0.12) 52%, rgba(255, 238, 188, 0.1)),
    var(--panel);
  box-shadow: 0 24px 72px rgba(255, 194, 76, 0.2), 0 22px 58px rgba(0, 0, 0, 0.24);
}

.marketplace-product-card.is-official::after {
  content: "Official";
  border: 1px solid rgba(255, 241, 177, 0.86);
  background:
    linear-gradient(135deg, rgba(255, 242, 183, 0.16), rgba(255, 204, 97, 0.1) 42%, rgba(232, 121, 80, 0.12)),
    rgba(var(--bg-rgb), 0.64);
  color: #fff0ad;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 0 32px rgba(255, 204, 97, 0.34);
}

.marketplace-product-card.is-verified::after {
  content: "Verified";
  border: 1px solid rgba(142, 166, 255, 0.68);
  background:
    linear-gradient(135deg, rgba(142, 166, 255, 0.24), rgba(var(--bg-rgb), 0.64)),
    rgba(var(--bg-rgb), 0.7);
  color: #dfe6ff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 22px rgba(142, 166, 255, 0.22);
}

.marketplace-product-card.is-unverified::after {
  content: "Unverified";
  border: 1px solid rgba(143, 138, 126, 0.34);
  background:
    linear-gradient(135deg, rgba(143, 138, 126, 0.14), rgba(var(--bg-rgb), 0.72)),
    rgba(var(--bg-rgb), 0.68);
  color: #d8d0c2;
}

.marketplace-product-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--marketplace-accent) 44%, rgba(255, 255, 255, 0.1));
  box-shadow: 0 22px 58px color-mix(in srgb, var(--marketplace-accent) 15%, rgba(0, 0, 0, 0.24));
}

.marketplace-product-card[hidden] {
  display: none;
}

.marketplace-theme-free {
  --marketplace-accent: #8f8a7e;
  --marketplace-accent-strong: #d8d0c2;
  --marketplace-accent-soft: rgba(143, 138, 126, 0.2);
}

.marketplace-theme-standard {
  --marketplace-accent: #b08d6f;
  --marketplace-accent-strong: #f1d8bf;
  --marketplace-accent-soft: rgba(176, 141, 111, 0.2);
}

.marketplace-theme-pro {
  --marketplace-accent: #d97757;
  --marketplace-accent-strong: #f1b39c;
  --marketplace-accent-soft: rgba(var(--accent-rgb), 0.2);
}

.marketplace-theme-builder {
  --marketplace-accent: #8f7bb8;
  --marketplace-accent-strong: #ddcff4;
  --marketplace-accent-soft: rgba(143, 123, 184, 0.2);
}

.marketplace-theme-agency {
  --marketplace-accent: #bf6f7d;
  --marketplace-accent-strong: #f0bcc5;
  --marketplace-accent-soft: rgba(191, 111, 125, 0.2);
}

.marketplace-theme-enterprise {
  --marketplace-accent: #ffcc61;
  --marketplace-accent-strong: #fff2b7;
  --marketplace-accent-soft: rgba(255, 204, 97, 0.24);
}

.marketplace-theme-owner {
  --marketplace-accent: #ffcc61;
  --marketplace-accent-strong: #fff2b7;
  --marketplace-accent-soft: rgba(255, 204, 97, 0.24);
}

.marketplace-theme-free,
.marketplace-theme-standard,
.marketplace-theme-pro,
.marketplace-theme-builder,
.marketplace-theme-agency,
.marketplace-theme-enterprise,
.marketplace-theme-owner {
  border-color: color-mix(in srgb, var(--marketplace-accent) 34%, rgba(255, 255, 255, 0.12));
  background:
    linear-gradient(160deg, var(--marketplace-accent-soft), rgba(255, 255, 255, 0.035) 48%, color-mix(in srgb, var(--marketplace-accent-strong) 10%, transparent)),
    var(--panel);
}

.marketplace-product-card.is-verified {
  border-color: rgba(142, 166, 255, 0.46);
  background:
    radial-gradient(circle at 84% 10%, rgba(211, 222, 255, 0.2), transparent 28%),
    linear-gradient(160deg, rgba(142, 166, 255, 0.18), rgba(255, 255, 255, 0.04) 46%, rgba(223, 230, 255, 0.11)),
    var(--panel);
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.2),
    0 0 34px rgba(142, 166, 255, 0.12);
}

.marketplace-product-card.is-unverified {
  border-color: rgba(143, 138, 126, 0.2);
  background:
    linear-gradient(160deg, rgba(143, 138, 126, 0.08), rgba(255, 255, 255, 0.03) 50%, color-mix(in srgb, var(--marketplace-accent) 5%, transparent)),
    var(--panel);
}

.marketplace-product-card.is-unverified:hover {
  border-color: rgba(143, 138, 126, 0.34);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.22);
}

.marketplace-product-card.is-verified:hover {
  border-color: rgba(142, 166, 255, 0.62);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.24),
    0 0 44px rgba(142, 166, 255, 0.2);
}

.marketplace-plan-pill {
  border-color: color-mix(in srgb, var(--marketplace-accent, var(--accent)) 50%, rgba(255, 255, 255, 0.12));
  background: color-mix(in srgb, var(--marketplace-accent, var(--accent)) 13%, rgba(255, 255, 255, 0.04));
  color: var(--marketplace-accent-strong, var(--accent-strong));
}

.marketplace-verified-pill {
  border-color: rgba(142, 166, 255, 0.56);
  background: rgba(142, 166, 255, 0.14);
  color: #dfe6ff;
}

.marketplace-unverified-pill {
  border-color: rgba(143, 138, 126, 0.28);
  background: rgba(143, 138, 126, 0.08);
  color: #d8d0c2;
}

.marketplace-product-art,
.marketplace-workflow-art {
  position: relative;
  display: grid;
  min-height: 156px;
  padding: 18px;
  overflow: hidden;
  align-content: space-between;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.14), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, var(--marketplace-accent, var(--accent)) 36%, transparent), rgba(71, 85, 105, 0.24));
}

.marketplace-workflow-art {
  gap: 16px;
  align-content: start;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: start;
}

.is-official .marketplace-workflow-art,
.marketplace-workflow-art.is-official-art,
.marketplace-preview-media.is-official .marketplace-workflow-art {
  background:
    radial-gradient(circle at 78% 2%, rgba(255, 241, 177, 0.34), transparent 28%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(255, 204, 97, 0.42), rgba(var(--accent-rgb), 0.24));
}

.is-verified .marketplace-workflow-art,
.marketplace-workflow-art.is-verified-art,
.marketplace-preview-media.is-verified .marketplace-workflow-art {
  border-bottom: 1px solid rgba(142, 166, 255, 0.28);
  background:
    radial-gradient(circle at 86% 12%, rgba(223, 230, 255, 0.22), transparent 30%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.17), transparent 34%),
    linear-gradient(145deg, rgba(142, 166, 255, 0.42), rgba(64, 74, 118, 0.3));
}

.is-unverified .marketplace-workflow-art,
.marketplace-workflow-art.is-unverified-art,
.marketplace-preview-media.is-unverified .marketplace-workflow-art {
  filter: saturate(0.55);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.1), transparent 34%),
    linear-gradient(145deg, rgba(143, 138, 126, 0.24), color-mix(in srgb, #8f8a7e 12%, rgba(64, 88, 118, 0.2)));
}

.marketplace-product-image {
  width: 100%;
  height: 156px;
  object-fit: cover;
  background: var(--bg-soft);
}

.marketplace-product-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.85), transparent 78%);
}

.marketplace-product-art::after,
.marketplace-workflow-art::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -58px;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.marketplace-workflow-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.88), transparent 82%);
}

.marketplace-art-bot {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.14), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, #8f7bb8 38%, transparent), rgba(var(--accent-rgb), 0.16));
}

.marketplace-art-command {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.14), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, #d97757 40%, transparent), rgba(191, 143, 104, 0.18));
}

.marketplace-art-workflow,
.marketplace-art-tool,
.marketplace-art-pack {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.14), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, #bf8f68 40%, transparent), rgba(127, 148, 104, 0.18));
}

.marketplace-product-art span,
.marketplace-product-art strong,
.workflow-art-label,
.workflow-art-summary {
  position: relative;
  z-index: 1;
}

.marketplace-product-art span,
.workflow-art-label {
  width: max-content;
  max-width: 140px;
  justify-self: start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(4, 9, 14, 0.34);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.workflow-art-summary {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 86px;
  width: 100%;
}

.workflow-art-summary span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 30px;
  padding: 6px 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent),
    rgba(var(--bg-rgb), 0.42);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14);
}

.workflow-art-summary b {
  color: var(--marketplace-accent-strong, var(--accent-warm));
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.workflow-art-summary em {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-product-art strong {
  color: rgba(255, 255, 255, 0.92);
  font-size: 3.25rem;
  line-height: 1;
}

.marketplace-product-body {
  display: grid;
  gap: 10px;
  padding: 18px 18px 8px;
}

.marketplace-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.marketplace-product-body h2 {
  margin: 0;
  font-size: 1.18rem;
}

.marketplace-product-body p {
  display: -webkit-box;
  min-height: 4.6em;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.marketplace-product-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 18px;
}

.marketplace-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.marketplace-product-actions strong {
  white-space: nowrap;
}

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

.marketplace-history-column {
  display: grid;
  align-content: start;
  gap: 12px;
}

.marketplace-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.marketplace-history-head h3 {
  margin: 0;
}

.marketplace-history-empty {
  min-height: 150px;
  box-shadow: none;
}

.marketplace-submit-backdrop,
.marketplace-preview-backdrop,
.marketplace-flow-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: none;
  background: transparent;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.marketplace-submit-backdrop.is-open,
.marketplace-preview-backdrop.is-open,
.marketplace-flow-preview-backdrop.is-open {
  display: block;
}

.marketplace-submit-modal,
.marketplace-preview-modal,
.marketplace-flow-preview-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 241;
  display: grid;
  grid-template-rows: auto 1fr;
  width: min(760px, calc(100vw - 48px));
  max-height: min(720px, calc(100vh - 48px));
  padding: 18px;
  border: 1px solid rgba(var(--muted-rgb), 0.22);
  border-radius: 10px;
  background: var(--bg-soft);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
  transform: translate(-50%, -48%) scale(0.98);
  visibility: hidden;
  pointer-events: none;
  transition: transform 180ms ease, visibility 180ms ease;
}

.marketplace-submit-modal.is-open,
.marketplace-preview-modal.is-open,
.marketplace-flow-preview-modal.is-open {
  transform: translate(-50%, -50%) scale(1);
  visibility: visible;
  pointer-events: auto;
}

.marketplace-preview-modal {
  width: min(860px, calc(100vw - 48px));
  max-height: min(720px, calc(100vh - 48px));
}

.marketplace-flow-preview-backdrop {
  z-index: 250;
}

.marketplace-flow-preview-modal {
  z-index: 251;
  width: min(1180px, calc(100vw - 48px));
  height: min(780px, calc(100vh - 48px));
}

.marketplace-flow-preview-body {
  min-height: 0;
  padding-top: 14px;
}

.marketplace-flowchart-wrap {
  height: 100%;
  min-height: 0;
}

.marketplace-flowchart-canvas {
  min-height: 0;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.marketplace-flow-node {
  width: 230px;
  min-height: 82px;
  grid-template-columns: 1fr;
  padding: 14px 16px;
  cursor: default;
}

.marketplace-flow-node .node-body {
  min-width: 0;
}

.marketplace-flow-node strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-flow-empty {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(360px, calc(100vw - 96px));
  transform: translate(-50%, -50%);
}

.marketplace-submit-body {
  display: grid;
  gap: 16px;
  min-height: 0;
  overflow: auto;
  padding-top: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.4) transparent;
}

.marketplace-submit-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.marketplace-submit-body::-webkit-scrollbar-track {
  background: transparent;
}

.marketplace-submit-body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.36);
  background-clip: padding-box;
}

.marketplace-submit-body > p {
  margin: 0;
  color: var(--muted);
}

.marketplace-preview-body {
  display: grid;
  grid-template-columns: minmax(220px, 0.64fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: stretch;
  min-height: 0;
  overflow: auto;
  padding-top: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.4) transparent;
}

.marketplace-preview-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.marketplace-preview-body::-webkit-scrollbar-track {
  background: transparent;
}

.marketplace-preview-body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.36);
  background-clip: padding-box;
}

.marketplace-preview-side {
  display: grid;
  align-self: start;
  gap: 12px;
  min-width: 0;
}

.marketplace-preview-media {
  align-self: start;
  overflow: hidden;
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.marketplace-preview-side-info {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.marketplace-preview-media img,
.marketplace-preview-media .marketplace-product-art {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.marketplace-preview-media .marketplace-workflow-art {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  align-items: start;
  width: 100%;
  min-height: 0;
  padding: 18px;
  height: auto;
}

.marketplace-preview-media .workflow-art-summary {
  min-height: 0;
  align-content: start;
  gap: 12px;
}

.marketplace-preview-media .workflow-art-label {
  justify-self: start;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.marketplace-preview-media .workflow-art-summary span {
  min-height: 40px;
  padding: 8px 10px;
}

.marketplace-preview-media .workflow-art-summary em {
  font-size: 0.92rem;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.marketplace-preview-content {
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: stretch;
  align-self: stretch;
  gap: 16px;
  min-height: 0;
}

.marketplace-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.marketplace-preview-content p {
  color: var(--muted);
  line-height: 1.65;
}

.marketplace-preview-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  min-width: 0;
}

.marketplace-preview-meta div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.marketplace-preview-meta dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.marketplace-preview-meta dd {
  margin: 6px 0 0;
  color: var(--text);
  font-weight: 850;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.marketplace-function-preview {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: start;
  gap: 12px;
  align-self: stretch;
  padding: 14px;
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(var(--bg-rgb), 0.42);
  -webkit-user-select: none;
  user-select: none;
}

.marketplace-function-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.marketplace-function-summary {
  display: grid;
  gap: 7px;
}

.marketplace-function-summary span {
  position: relative;
  padding-left: 16px;
  color: var(--muted);
  line-height: 1.45;
}

.marketplace-function-summary span::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}

.marketplace-function-flows {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.4) transparent;
}

.marketplace-function-flows::-webkit-scrollbar {
  width: 8px;
}

.marketplace-function-flows::-webkit-scrollbar-track {
  background: transparent;
}

.marketplace-function-flows::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.36);
  background-clip: padding-box;
}

.marketplace-function-flows article {
  display: grid;
  gap: 7px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.marketplace-function-flow-card {
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.marketplace-function-flow-card:hover,
.marketplace-function-flow-card:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.42);
  background: rgba(var(--accent-rgb), 0.075);
  outline: none;
  transform: translateY(-1px);
}

.marketplace-function-flows article > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-function-flows article > span {
  color: var(--accent-warm);
  font-size: 0.82rem;
  font-weight: 850;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-acquire-button {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.marketplace-acquire-button::after {
  content: "";
  position: absolute;
  inset: -60% auto -60% -35%;
  width: 32%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  opacity: 0;
}

.marketplace-acquire-button.is-acquiring::after {
  opacity: 1;
  animation: acquireSweep 720ms ease-in-out infinite;
}

.marketplace-acquire-button.is-acquiring {
  pointer-events: none;
  filter: saturate(1.15);
}

@keyframes acquireSweep {
  from {
    left: -35%;
  }

  to {
    left: 120%;
  }
}

@keyframes marketplaceProductIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.service-panel {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

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

.recipe-card {
  display: grid;
  align-content: start;
  gap: 14px;
}

.logic-list {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  margin: 0;
  color: var(--muted);
}

.logic-list li::marker {
  color: var(--accent-warm);
  font-weight: 900;
}

.custom-flow-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.command-manage-card {
  display: grid;
  align-content: start;
  gap: 14px;
}

.command-manage-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.command-manage-head h3 {
  margin: 12px 0 6px;
}

.command-functionality li {
  display: grid;
  gap: 3px;
}

.command-functionality strong {
  color: var(--text);
}

.command-functionality span {
  color: var(--muted);
}

.default-edit-form {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 0.25fr) minmax(150px, 0.25fr) auto;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.command-filter-bot {
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.28fr) minmax(130px, 0.24fr) minmax(130px, 0.24fr) auto;
}

.command-scope-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.command-scope-tabs a {
  text-decoration: none;
}

.command-scope-tabs span {
  color: var(--muted);
  font-size: 0.76rem;
}

.command-category-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.08), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.035);
}

.command-category-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 16px;
  align-items: end;
}

.command-category-head h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
}

.command-category-head span {
  color: var(--muted);
  font-size: 0.92rem;
}

.command-category-create {
  display: grid;
  grid-template-columns: 54px minmax(120px, 1fr) minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.command-category-create input[name="emoji"] {
  text-align: center;
}

.command-category-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.4) transparent;
}

.command-category-chip {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 168px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.045);
}

.command-category-chip.is-active {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.11);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.12);
}

.command-category-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-category-chip em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.command-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.command-category-badge {
  border-color: rgba(var(--accent-warm-rgb), 0.28);
  color: var(--accent-warm);
}

.command-category-form {
  min-width: min(100%, 360px);
}

.bot-command-dashboard {
  display: grid;
  grid-template-columns: minmax(190px, 0.25fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.bot-command-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 12px;
}

.bot-command-category-create {
  position: relative;
  grid-template-columns: 44px minmax(0, 1fr) 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.emoji-picker-button {
  min-height: 42px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
}

.emoji-picker-popover {
  position: absolute;
  z-index: 20;
  left: 10px;
  right: 10px;
  top: calc(100% + 8px);
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.emoji-picker-popover[hidden] {
  display: none;
}

.emoji-picker-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  max-height: 164px;
  overflow: auto;
}

.emoji-picker-grid button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.bot-command-category-links {
  display: grid;
  gap: 8px;
}

.bot-command-category-links a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
}

.bot-command-category-links a:hover,
.bot-command-category-links a.is-drop-target {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.12);
}

.bot-command-category-links strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-command-category-links em {
  color: var(--muted);
  font-style: normal;
  font-weight: 850;
}

.bot-command-main,
.bot-command-panels {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.bot-command-filter {
  grid-template-columns: minmax(220px, 1fr) minmax(130px, 0.22fr) minmax(130px, 0.22fr) auto;
  margin-bottom: 0;
}

.bot-command-category-section {
  display: grid;
  gap: 12px;
  scroll-margin-top: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    var(--panel);
}

.bot-command-category-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.bot-command-category-title > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bot-command-category-title h2 {
  margin: 0;
  font-size: 1.1rem;
}

.bot-command-list {
  display: grid;
  gap: 8px;
}

.bot-command-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.bot-command-row.is-dragging {
  opacity: 0.55;
}

.bot-command-row-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bot-command-row-body strong,
.bot-command-row-body span,
.bot-command-row-body p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-command-row-body span,
.bot-command-row-body p,
.bot-command-empty-row {
  color: var(--muted);
  font-size: 0.9rem;
}

.bot-command-row-body p {
  margin: 0;
}

.command-row-toggle {
  margin: 0;
}

.switch-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 26px;
  cursor: pointer;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-control span {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(var(--muted-rgb), 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  transition: 0.16s ease;
}

.switch-control span::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted);
  transition: 0.16s ease;
}

.switch-control input:checked + span {
  border-color: rgba(var(--accent-rgb), 0.52);
  background: rgba(var(--accent-rgb), 0.2);
}

.switch-control input:checked + span::after {
  transform: translateX(18px);
  background: var(--accent);
}

.command-row-menu {
  position: relative;
}

.command-row-menu summary {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.command-row-menu summary::-webkit-details-marker {
  display: none;
}

.command-row-menu[open] summary {
  border-color: rgba(var(--accent-rgb), 0.44);
  color: var(--text);
}

.command-row-menu > div {
  position: absolute;
  z-index: 15;
  right: 0;
  top: calc(100% + 8px);
  display: grid;
  gap: 6px;
  min-width: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.command-row-menu a,
.command-row-menu button {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.command-row-menu a:hover,
.command-row-menu button:hover {
  border-color: rgba(var(--accent-rgb), 0.22);
  background: rgba(var(--accent-rgb), 0.08);
}

.command-row-menu form {
  display: grid;
  gap: 6px;
  margin: 0;
}

.command-row-menu select {
  min-height: 36px;
}

.bot-command-empty-row {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.command-dashboard-section {
  width: min(1480px, 100%);
}

.command-dashboard-section > .dashboard-title-row {
  width: min(1180px, calc(100% - 262px));
  margin-left: 262px;
  margin-right: 0;
}

.command-dashboard-section .bot-command-dashboard {
  grid-template-columns: 240px minmax(0, 1180px);
  gap: 22px;
  justify-content: center;
}

.command-dashboard-section .bot-command-sidebar {
  top: 92px;
  align-content: start;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.055), rgba(255, 255, 255, 0.025)),
    var(--panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  overflow: visible;
  z-index: 20;
}

.bot-command-back {
  width: 100%;
}

.bot-command-sidebar-section {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.bot-command-side-profile {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.bot-command-side-profile img,
.bot-command-side-profile .bot-dashboard-avatar {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
}

.bot-command-side-profile h2 {
  overflow: hidden;
  margin: 4px 0 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.2rem;
}

.bot-command-side-profile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.command-dashboard-section .bot-command-sidebar .bot-command-filter {
  grid-template-columns: 1fr;
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid rgba(var(--muted-rgb), 0.12);
  border-bottom: 1px solid rgba(var(--muted-rgb), 0.12);
}

.command-dashboard-section .bot-command-sidebar .bot-command-filter .button {
  width: 100%;
}

.command-dashboard-section .bot-command-sidebar.has-categories {
  min-height: calc(100vh - 122px);
}

.command-dashboard-section .bot-command-sidebar.is-empty {
  align-self: start;
  gap: 14px;
}

.command-dashboard-section .bot-command-sidebar.is-empty .bot-command-category-links {
  display: none;
}

.bot-command-add-category-toggle {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--text);
  cursor: pointer;
}

.bot-command-add-category-toggle span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  color: var(--theme-button-text);
  font-size: 1.25rem;
  font-weight: 950;
}

.bot-command-add-category-toggle strong {
  text-align: left;
  font-size: 0.86rem;
}

.command-dashboard-section .bot-command-category-create {
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  overflow: visible;
  z-index: 45;
}

.command-dashboard-section .bot-command-category-create .button {
  width: 100%;
}

.category-create-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.command-dashboard-section .emoji-picker-button {
  width: 48px;
  min-height: 46px;
  font-size: 1.35rem;
  overflow: hidden;
}

.command-dashboard-section .emoji-picker-popover {
  left: 0;
  right: auto;
  width: 100%;
  box-sizing: border-box;
  z-index: 90;
}

.command-dashboard-section .emoji-picker-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.command-dashboard-section .emoji-picker-grid button {
  min-height: 42px;
  font-size: 1.2rem;
}

.command-dashboard-section .bot-command-category-links a {
  min-height: 52px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  padding: 8px 10px;
  border-radius: 8px;
}

.bot-command-category-widget {
  position: relative;
  display: block;
  border: 1px solid transparent;
  border-radius: 8px;
}

.bot-command-category-widget.is-drop-target {
  border-color: rgba(var(--accent-rgb), 0.58);
  background: rgba(var(--accent-rgb), 0.1);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.12);
}

.bot-command-category-widget > a {
  min-width: 0;
  width: 100%;
}

.bot-command-category-widget.is-context-active > a {
  border-color: rgba(var(--accent-rgb), 0.52);
  background: rgba(var(--accent-rgb), 0.12);
}

.command-dashboard-section .bot-command-category-links a span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.09);
  font-size: 1.08rem;
}

.command-dashboard-section .bot-command-category-links strong {
  font-size: 0.96rem;
}

.command-dashboard-section .bot-command-category-section {
  padding: 18px;
}

.command-dashboard-section .bot-command-category-title > div > span {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.08);
  font-size: 1.35rem;
}

.command-dashboard-section .bot-command-category-title h2 {
  font-size: 1.28rem;
}

.command-dashboard-section .bot-command-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
}

.bot-command-card {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 16px;
  min-height: 156px;
  padding: 16px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.035);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.12);
  cursor: grab;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
}

.bot-command-card:hover,
.bot-command-card.is-context-active {
  border-color: rgba(var(--accent-rgb), 0.42);
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.09), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.bot-command-card.is-dragging {
  opacity: 0.38;
  cursor: grabbing;
  pointer-events: none;
  transform: scale(0.985);
}

.bot-command-card.is-widget-dragging {
  position: fixed;
  z-index: 120;
  margin: 0;
  opacity: 0.96;
  pointer-events: none;
  cursor: grabbing;
  will-change: transform;
  transition: none;
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(var(--accent-rgb), 0.34);
}

.bot-command-placeholder {
  min-height: 156px;
  border: 1px dashed rgba(var(--accent-rgb), 0.54);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.12), rgba(255, 255, 255, 0.035)),
    rgba(var(--accent-rgb), 0.045);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.12);
}

body.is-command-widget-dragging {
  cursor: grabbing;
  user-select: none;
}

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

.bot-command-card .bot-command-row-body strong {
  font-size: 1.02rem;
}

.bot-command-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bot-command-title-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-command-card .bot-command-row-body {
  gap: 8px;
}

.bot-command-card .bot-command-row-body > span {
  color: var(--accent-warm);
  font-weight: 850;
}

.bot-command-card .bot-command-row-body p {
  display: -webkit-box;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.bot-command-card.is-save-error {
  border-color: rgba(255, 98, 98, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 98, 98, 0.2);
}

.bot-command-card.is-drop-before::before,
.bot-command-card.is-drop-after::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.16);
}

.bot-command-card.is-drop-before::before {
  top: -7px;
}

.bot-command-card.is-drop-after::after {
  bottom: -7px;
}

.bot-command-category-section.is-drop-target {
  border-color: rgba(var(--accent-rgb), 0.58);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.16);
}

.command-context-menu {
  position: fixed;
  z-index: 80;
  display: grid;
  gap: 8px;
  width: min(280px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.command-context-menu[hidden] {
  display: none;
}

.command-context-menu > a,
.command-context-menu > button,
.command-context-menu form > button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.command-context-menu > a:hover,
.command-context-menu > button:hover,
.command-context-menu form > button:hover,
.command-context-move button:hover {
  border-color: rgba(var(--accent-rgb), 0.3);
  background: rgba(var(--accent-rgb), 0.1);
}

.category-context-menu {
  width: min(220px, calc(100vw - 24px));
}

.command-context-move {
  display: grid;
  gap: 8px;
}

.command-context-move > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.command-context-move > div {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.command-context-move button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.command-context-move button span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(var(--accent-rgb), 0.09);
}

.command-context-move button strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1060px) {
  .command-dashboard-section > .dashboard-title-row {
    width: 100%;
    margin-inline: auto;
  }

  .command-dashboard-section .bot-command-dashboard {
    grid-template-columns: 1fr;
  }

  .command-dashboard-section .bot-command-sidebar {
    position: static;
    min-height: 0;
  }

  .command-dashboard-section .bot-command-list,
  .command-dashboard-section .bot-command-filter {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .command-dashboard-section > .dashboard-title-row {
    width: 100%;
    margin-inline: auto;
  }

  #command-filter-form,
  .command-filter-bot,
  .command-category-head,
  .command-category-create {
    grid-template-columns: 1fr;
  }

  .bot-command-dashboard {
    grid-template-columns: 1fr;
  }

  .command-dashboard-section .bot-command-dashboard,
  .command-dashboard-section .bot-command-list,
  .command-dashboard-section .bot-command-filter {
    grid-template-columns: 1fr;
  }

  .bot-command-sidebar {
    position: static;
  }

  .command-dashboard-section .bot-command-sidebar {
    transform: none;
  }

  .command-dashboard-section .bot-command-category-title {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .command-dashboard-section .bot-command-category-title .button {
    width: 100%;
  }

  .bot-command-filter,
  .bot-command-category-create {
    grid-template-columns: 1fr;
  }

  .bot-command-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .emoji-picker-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .command-category-create input[name="emoji"] {
    width: 64px;
  }

  .command-category-chip {
    min-width: 150px;
  }
}

.credit-add-form {
  grid-template-columns: minmax(160px, 1fr) minmax(120px, auto);
  align-items: end;
  margin-bottom: 0;
  padding: 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.credit-add-form input {
  min-height: 46px;
  font-weight: 850;
}

.credit-add-form .button {
  min-height: 46px;
}

.credit-price-note {
  margin: 10px 0 0;
  text-align: center;
}

.bot-filter-bar {
  grid-template-columns: minmax(240px, 1fr) minmax(160px, 0.28fr) auto;
}

.owner-filter-bar {
  grid-template-columns: minmax(220px, 1fr) minmax(145px, 0.28fr) minmax(145px, 0.28fr);
  margin-top: 14px;
}

.owner-user-filter,
.owner-bot-filter {
  grid-template-columns: minmax(220px, 1fr) minmax(145px, 0.28fr);
}

.owner-pagination {
  margin-top: 14px;
}

.owner-live-results {
  min-height: 0;
}

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

.activity-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.owner-activity-item {
  grid-template-columns: auto 1fr auto;
}

.owner-click-card {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.owner-click-card:hover,
.owner-click-card:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.34);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
  transform: translateY(-1px);
}

.owner-health-drilldown {
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.owner-health-drilldown:hover,
.owner-health-drilldown:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.34);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
  transform: translateY(-1px);
}

.owner-inline-form {
  display: grid;
  grid-template-columns: 110px auto;
  gap: 8px;
  align-items: center;
}

.owner-bulk-credit-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.6fr) minmax(120px, 0.6fr) auto;
  gap: 10px;
  align-items: end;
  max-width: 560px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.owner-bulk-credit-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.owner-credit-form {
  grid-template-columns: minmax(82px, 0.55fr) minmax(86px, 1fr) auto;
}

.owner-inline-form input {
  min-height: 42px;
}

.owner-user-actions {
  display: grid;
  gap: 8px;
  min-width: min(420px, 100%);
}

.owner-plan-form {
  grid-template-columns: minmax(150px, 1fr) auto;
}

.owner-ai-form {
  grid-template-columns: repeat(3, minmax(84px, 1fr)) auto;
  align-items: end;
}

.owner-ai-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.owner-ai-form input {
  width: 100%;
}

.owner-detail-modal {
  width: min(980px, calc(100vw - 48px));
}

.owner-detail-body {
  grid-template-columns: minmax(240px, 0.72fr) minmax(360px, 1fr);
}

.owner-modal-identity {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.owner-modal-identity strong,
.owner-modal-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-modal-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.owner-modal-actions {
  align-content: start;
  gap: 12px;
}

.owner-modal-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.owner-modal-form h4 {
  margin: 0;
}

.owner-modal-form label,
.owner-modal-check,
.owner-ai-modal-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.owner-modal-check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  text-transform: none;
  letter-spacing: 0;
}

.owner-ai-modal-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.owner-runtime-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.owner-modal-status {
  min-height: 22px;
  margin: 0;
  color: var(--accent-strong);
  font-weight: 800;
}

.owner-modal-status.is-error {
  color: var(--danger);
}

.owner-bot-preview-media {
  display: grid;
  place-items: center;
  min-height: 260px;
}

.owner-bot-preview-media .bot-avatar-placeholder {
  width: 104px;
  height: 104px;
  font-size: 2rem;
}

.activity-item div {
  display: grid;
  gap: 4px;
}

.activity-item span:last-child {
  color: var(--muted);
}

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

.order-card {
  display: grid;
  gap: 10px;
}

.checkout-grid {
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
}

.checkout-summary ul {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.checkout-summary li {
  color: var(--muted);
}

.checkout-summary li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 2px;
  background: var(--accent);
}

.checkout-meta {
  margin-top: 18px;
}

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

.payment-tile {
  grid-template-columns: auto 1fr;
  align-items: start;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.payment-tile input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.payment-copy {
  display: grid;
  gap: 4px;
}

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

.payment-copy small,
.checkout-note {
  color: var(--muted);
  line-height: 1.5;
}

.checkout-switch {
  display: inline-grid;
  grid-template-columns: 46px auto;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.checkout-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkout-switch-track {
  position: relative;
  width: 46px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 160ms ease, border-color 160ms ease;
}

.checkout-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  transition: transform 160ms ease, background 160ms ease;
}

.checkout-switch input:checked + .checkout-switch-track {
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  background: color-mix(in srgb, var(--accent) 35%, rgba(255, 255, 255, 0.08));
}

.checkout-switch input:checked + .checkout-switch-track::after {
  transform: translateX(20px);
  background: var(--accent);
}

.checkout-switch input:focus-visible + .checkout-switch-track {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.checkout-actions {
  display: grid;
  gap: 10px;
 }

.create-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  align-items: end;
}

.bot-manage-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bot-card {
  display: grid;
  gap: 18px;
}

.bot-identity {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.bot-identity img,
.bot-avatar-placeholder {
  width: 58px;
  height: 58px;
  border-radius: 8px;
}

.bot-identity img {
  object-fit: cover;
}

.bot-avatar-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent), var(--accent-warm));
  color: var(--theme-button-text);
  font-weight: 900;
}

.bot-identity div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.bot-identity span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.runtime-notice {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(var(--muted-rgb), 0.38);
  border-radius: 8px;
  background: rgba(var(--muted-rgb), 0.08);
}

.runtime-notice strong {
  color: var(--text);
}

.runtime-notice span {
  color: var(--muted);
  line-height: 1.55;
}

.runtime-notice.compact span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.runtime-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.bot-runtime-card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.028);
}

.bot-runtime-card-actions .button {
  min-width: 0;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
}

.bot-runtime-card-actions [data-runtime-action-status] {
  grid-column: 1 / -1;
  min-height: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.bot-runtime-card-actions.is-pending {
  border-color: rgba(var(--accent-rgb), 0.34);
}

.bot-runtime-card-actions.is-pending .button {
  opacity: 0.72;
}

.bot-runtime-card-actions.is-save-error {
  border-color: rgba(255, 112, 112, 0.55);
}

.profile-page {
  gap: 18px;
}

.profile-plan-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-plan-strip > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.profile-plan-strip span {
  color: var(--muted);
  font-size: 0.86rem;
}

.profile-plan-strip strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.profile-plan-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-settings {
  display: grid;
  gap: 20px;
}

.profile-settings-section {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding-top: 4px;
}

.profile-form {
  display: grid;
  gap: 12px;
  max-width: 620px;
}

.profile-form .button {
  justify-self: start;
}

.profile-theme-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  max-width: 720px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    var(--panel);
}

.profile-theme-summary span,
.profile-theme-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.profile-theme-summary strong,
.profile-theme-card strong {
  display: block;
  color: var(--text);
  font-size: 1.06rem;
}

.profile-theme-summary p,
.profile-theme-card p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.theme-swatch-row {
  display: flex;
  align-items: center;
}

.theme-swatch-row i {
  display: block;
  width: 24px;
  height: 24px;
  margin-left: -5px;
  border: 2px solid var(--panel);
  border-radius: 999px;
  background: var(--theme-color);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.theme-swatch-row i:first-child {
  margin-left: 0;
}

.theme-swatch-sefrum-1 { --theme-color: #141413; }
.theme-swatch-sefrum-2 { --theme-color: #20201d; }
.theme-swatch-sefrum-3 { --theme-color: #d97757; }
.theme-swatch-sefrum-4 { --theme-color: #ffcc61; }
.theme-swatch-sefrum-5 { --theme-color: #faf9f5; }
.theme-swatch-ember-light-1 { --theme-color: #efe7dc; }
.theme-swatch-ember-light-2 { --theme-color: #fff8f0; }
.theme-swatch-ember-light-3 { --theme-color: #d97757; }
.theme-swatch-ember-light-4 { --theme-color: #ffb84d; }
.theme-swatch-ember-light-5 { --theme-color: #1f1c18; }
.theme-swatch-live-1 { --theme-color: #0b0f14; }
.theme-swatch-live-2 { --theme-color: #161f2a; }
.theme-swatch-live-3 { --theme-color: #35d0a5; }
.theme-swatch-live-4 { --theme-color: #f2b25d; }
.theme-swatch-live-5 { --theme-color: #f5f8fc; }
.theme-swatch-teal-light-1 { --theme-color: #eaf2f4; }
.theme-swatch-teal-light-2 { --theme-color: #fbfefe; }
.theme-swatch-teal-light-3 { --theme-color: #35d0a5; }
.theme-swatch-teal-light-4 { --theme-color: #67d9c1; }
.theme-swatch-teal-light-5 { --theme-color: #10202a; }
.theme-swatch-moonrise-1 { --theme-color: #101017; }
.theme-swatch-moonrise-2 { --theme-color: #1c1a28; }
.theme-swatch-moonrise-3 { --theme-color: #9f8cff; }
.theme-swatch-moonrise-4 { --theme-color: #ff8fab; }
.theme-swatch-moonrise-5 { --theme-color: #f7f3ff; }
.theme-swatch-pine-1 { --theme-color: #101512; }
.theme-swatch-pine-2 { --theme-color: #1c251d; }
.theme-swatch-pine-3 { --theme-color: #63c18a; }
.theme-swatch-pine-4 { --theme-color: #d9a85b; }
.theme-swatch-pine-5 { --theme-color: #f3f5ea; }
.theme-swatch-polar-1 { --theme-color: #0d1117; }
.theme-swatch-polar-2 { --theme-color: #17202b; }
.theme-swatch-polar-3 { --theme-color: #6ab7ff; }
.theme-swatch-polar-4 { --theme-color: #9ee6ff; }
.theme-swatch-polar-5 { --theme-color: #f4f8ff; }
.theme-swatch-ruby-1 { --theme-color: #160d12; }
.theme-swatch-ruby-2 { --theme-color: #25141d; }
.theme-swatch-ruby-3 { --theme-color: #f06d83; }
.theme-swatch-ruby-4 { --theme-color: #f2b66d; }
.theme-swatch-ruby-5 { --theme-color: #fff7f4; }

.profile-theme-backdrop {
  position: fixed;
  inset: 0;
  z-index: 240;
  background: rgba(0, 0, 0, 0.48);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.profile-theme-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.profile-theme-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 241;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  width: min(860px, calc(100vw - 48px));
  max-height: min(720px, calc(100vh - 48px));
  padding: 18px;
  border: 1px solid rgba(var(--muted-rgb), 0.22);
  border-radius: 10px;
  background: var(--bg-soft);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
  transform: translate(-50%, -48%) scale(0.98);
  visibility: hidden;
  pointer-events: none;
  transition: transform 180ms ease, visibility 180ms ease;
}

html[data-theme="live"] .profile-theme-modal {
  border-color: rgba(148, 163, 184, 0.22);
  background: #0b1017;
}

.profile-theme-modal.is-open {
  transform: translate(-50%, -50%) scale(1);
  visibility: visible;
  pointer-events: auto;
}

.profile-theme-modal .modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.profile-theme-modal .modal-head h2 {
  margin-bottom: 0;
}

.profile-theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.profile-theme-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018)),
    var(--panel);
  color: var(--text);
}

.profile-theme-card.is-selected {
  border-color: rgba(var(--accent-rgb), 0.44);
  box-shadow: 0 18px 46px rgba(var(--accent-rgb), 0.12);
}

html[data-theme="live"] .profile-theme-card.is-selected {
  border-color: rgba(53, 208, 165, 0.44);
  box-shadow: 0 18px 46px rgba(53, 208, 165, 0.12);
}

.profile-theme-card .button {
  justify-self: start;
}

.profile-theme-preview {
  overflow: hidden;
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--preview-bg);
}

.theme-preview-top {
  min-height: 30px;
  border-bottom: 1px solid var(--preview-line);
  background: var(--preview-panel);
}

.theme-preview-body {
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 96px;
  padding: 16px;
  background:
    radial-gradient(circle at 18% 4%, var(--preview-glow), transparent 34%),
    linear-gradient(180deg, var(--preview-bg-soft), var(--preview-bg));
}

.theme-preview-body span,
.theme-preview-body strong,
.theme-preview-body i {
  display: block;
  border-radius: 999px;
}

.theme-preview-body span {
  width: 72px;
  height: 8px;
  background: var(--preview-accent);
}

.theme-preview-body strong {
  width: 72%;
  height: 16px;
  background: var(--preview-text);
}

.theme-preview-body i {
  width: 46%;
  height: 9px;
  background: var(--preview-muted);
}

[data-theme-preview="sefrum"] {
  --preview-bg: #141413;
  --preview-bg-soft: #1b1b19;
  --preview-panel: #20201d;
  --preview-line: rgba(var(--text-rgb), 0.1);
  --preview-text: #faf9f5;
  --preview-muted: #b8aa9a;
  --preview-accent: #d97757;
  --preview-glow: rgba(var(--accent-rgb), 0.16);
}

[data-theme-preview="ember-light"] {
  --preview-bg: #efe7dc;
  --preview-bg-soft: #f8efe5;
  --preview-panel: #fff8f0;
  --preview-line: rgba(31, 28, 24, 0.12);
  --preview-text: #1f1c18;
  --preview-muted: #74675a;
  --preview-accent: #d97757;
  --preview-glow: rgba(217, 119, 87, 0.16);
}

[data-theme-preview="live"] {
  --preview-bg: #0b0f14;
  --preview-bg-soft: #111821;
  --preview-panel: #161f2a;
  --preview-line: rgba(255, 255, 255, 0.11);
  --preview-text: #f5f8fc;
  --preview-muted: #a8b3c1;
  --preview-accent: #35d0a5;
  --preview-glow: rgba(53, 208, 165, 0.18);
}

[data-theme-preview="teal-light"] {
  --preview-bg: #eaf2f4;
  --preview-bg-soft: #f5fbfc;
  --preview-panel: #fbfefe;
  --preview-line: rgba(16, 32, 42, 0.12);
  --preview-text: #10202a;
  --preview-muted: #5f7180;
  --preview-accent: #35d0a5;
  --preview-glow: rgba(53, 208, 165, 0.16);
}

[data-theme-preview="moonrise"] {
  --preview-bg: #101017;
  --preview-bg-soft: #161522;
  --preview-panel: #1c1a28;
  --preview-line: rgba(247, 243, 255, 0.12);
  --preview-text: #f7f3ff;
  --preview-muted: #c6bbd8;
  --preview-accent: #9f8cff;
  --preview-glow: rgba(159, 140, 255, 0.2);
}

[data-theme-preview="pine"] {
  --preview-bg: #101512;
  --preview-bg-soft: #151d18;
  --preview-panel: #1c251d;
  --preview-line: rgba(243, 245, 234, 0.11);
  --preview-text: #f3f5ea;
  --preview-muted: #afbaa8;
  --preview-accent: #63c18a;
  --preview-glow: rgba(99, 193, 138, 0.18);
}

[data-theme-preview="polar"] {
  --preview-bg: #0d1117;
  --preview-bg-soft: #111923;
  --preview-panel: #17202b;
  --preview-line: rgba(244, 248, 255, 0.12);
  --preview-text: #f4f8ff;
  --preview-muted: #a9b7c8;
  --preview-accent: #6ab7ff;
  --preview-glow: rgba(106, 183, 255, 0.2);
}

[data-theme-preview="ruby"] {
  --preview-bg: #160d12;
  --preview-bg-soft: #1d1018;
  --preview-panel: #25141d;
  --preview-line: rgba(255, 247, 244, 0.12);
  --preview-text: #fff7f4;
  --preview-muted: #d7b8b5;
  --preview-accent: #f06d83;
  --preview-glow: rgba(240, 109, 131, 0.2);
}

@media (max-width: 760px) {
  .profile-theme-summary {
    grid-template-columns: 1fr;
  }

  .profile-theme-summary .button {
    justify-self: start;
  }

  .profile-theme-modal {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    padding: 14px;
  }

  .profile-theme-grid {
    grid-template-columns: 1fr;
  }
}

.discord-setup-callout,
.discord-setup-hints {
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.09), rgba(var(--muted-rgb), 0.055)),
    rgba(255, 255, 255, 0.028);
}

.discord-setup-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  margin-bottom: 18px;
}

.discord-setup-callout div,
.discord-setup-hints {
  display: grid;
  gap: 5px;
}

.discord-setup-callout strong,
.discord-setup-hints strong {
  color: var(--text);
}

.discord-setup-callout span,
.discord-setup-hints span {
  color: var(--muted);
  line-height: 1.45;
}

.discord-setup-hints {
  padding: 13px 14px;
}

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

.upload-control {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    var(--bg-soft);
  cursor: pointer;
  overflow: hidden;
}

.upload-control:focus-within {
  outline: 2px solid rgba(var(--accent-rgb), 0.32);
  outline-offset: 1px;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  color: var(--theme-button-text);
  font-weight: 900;
  white-space: nowrap;
}

.upload-filename {
  min-width: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-control input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.status-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-weight: 850;
}

.status-running {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent-strong);
}

.status-verified {
  border-color: rgba(142, 166, 255, 0.58);
  background: rgba(142, 166, 255, 0.13);
  color: #dfe6ff;
  box-shadow: 0 0 24px rgba(142, 166, 255, 0.1);
}

.status-official {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 241, 177, 0.86);
  background:
    linear-gradient(135deg, rgba(255, 242, 183, 0.16), rgba(255, 204, 97, 0.1) 42%, rgba(232, 121, 80, 0.12)),
    rgba(var(--bg-rgb), 0.64);
  color: #fff0ad;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 0 32px rgba(255, 204, 97, 0.34);
}

.status-official::after {
  content: "";
  position: absolute;
  inset: -80% auto -80% -60%;
  width: 42%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  animation: officialSheen 2.35s ease-in-out infinite;
}

.status-maintenance {
  border-color: rgba(var(--muted-rgb), 0.44);
  color: var(--muted);
}

@keyframes officialSheen {
  0%,
  45% {
    left: -60%;
  }

  70%,
  100% {
    left: 120%;
  }
}


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

.check-tile {
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.check-tile input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

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

.dashboard-title-row > .bot-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.inline-select-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: min(100%, 320px);
}

.inline-select-form select {
  min-height: 46px;
  min-width: 140px;
}

.button.is-disabled,
.button:disabled {
  opacity: 0.52;
  pointer-events: none;
}

.editor-shell {
  width: min(1760px, 100%);
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0 0;
}

.editor-sidebar,
.editor-main,
.editor-palette,
.editor-canvas,
.flow-block,
.flow-start,
.flow-settings,
.flow-list-item,
.palette-button,
.flow-json-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.editor-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  align-content: start;
  gap: 16px;
  max-height: calc(100vh - 112px);
  padding: 16px;
  overflow: hidden;
}

.editor-sidebar h1 {
  max-width: 100%;
  font-size: 2.2rem;
  line-height: 1;
}

.flow-list {
  display: grid;
  align-content: start;
  gap: 10px;
  height: 100%;
  max-height: none;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.4) transparent;
}

.sidebar-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.1);
}

.sidebar-tab {
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
  cursor: pointer;
}

.sidebar-tab.is-active {
  background: rgba(var(--accent-rgb), 0.13);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.22);
}

.sidebar-panel[hidden] {
  display: none;
}

.sidebar-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.sidebar-toolbox {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

.toolbox-categories {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.34) transparent;
}

.toolbox-category {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.toolbox-category summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  color: var(--accent-warm);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.toolbox-category summary::-webkit-details-marker {
  display: none;
}

.toolbox-category summary::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 6px;
  color: var(--jewel-strong);
  letter-spacing: 0;
}

.toolbox-category[open] summary::before {
  content: "-";
}

.toolbox-category summary span {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0;
}

.toolbox-blocks {
  display: grid;
  gap: 8px;
  padding: 0 8px 8px;
}

.flow-list-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  color: var(--muted);
}

.flow-list-item strong {
  color: var(--text);
}

.flow-list-item.is-active {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.09);
}

.command-search {
  padding-inline: 0;
}

.flow-load-more {
  width: 100%;
  min-height: 38px;
}

.flow-list-empty {
  padding: 10px 4px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.editor-main {
  min-width: 0;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    var(--panel);
  box-shadow: var(--shadow);
}

.editor-toolbar,
.editor-actions,
.flow-block-head,
.block-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.editor-toolbar,
.flow-block-head {
  justify-content: space-between;
}

.editor-toolbar {
  margin-bottom: 16px;
}

.editor-mobile-dock,
.editor-fullscreen-dock {
  display: none;
}

.editor-toolbar h2 {
  margin-bottom: 0;
}

.editor-title-stack {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.ai-generate-button {
  min-height: 38px;
  padding: 0 14px;
  border-color: rgba(var(--accent-rgb), 0.58);
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.24), rgba(var(--muted-rgb), 0.2)),
    rgba(255, 255, 255, 0.055);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.12), 0 10px 28px rgba(var(--accent-rgb), 0.18);
}

.ai-generate-button span {
  color: var(--accent);
  font-size: 1.05em;
}

.ai-generate-button:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.86);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.22), 0 14px 34px rgba(var(--accent-rgb), 0.24);
}

.editor-actions,
.block-tools {
  flex-wrap: wrap;
}

.editor-history-button {
  min-height: 38px;
  padding: 0 12px;
}

.toggle-label {
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

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

.toggle-label-compact {
  min-width: fit-content;
}

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

.top-palette {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.palette-search {
  min-width: 0;
  padding-inline: 2px;
}

.palette-search input,
.palette-search select {
  min-height: 36px;
  padding-inline: 11px;
  border-color: rgba(var(--accent-rgb), 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    #141413;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.palette-search input:focus,
.palette-search select:focus {
  outline-width: 1px;
  outline-offset: 0;
}

.palette-search input::placeholder {
  color: rgba(var(--muted-rgb), 0.72);
}

.top-palette .palette-group {
  display: flex;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.4) transparent;
}

.flow-list::-webkit-scrollbar,
.toolbox-categories::-webkit-scrollbar,
.top-palette .palette-group::-webkit-scrollbar,
.flow-json-preview pre::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.flow-list::-webkit-scrollbar-track,
.toolbox-categories::-webkit-scrollbar-track,
.top-palette .palette-group::-webkit-scrollbar-track,
.flow-json-preview pre::-webkit-scrollbar-track {
  background: transparent;
}

.flow-list::-webkit-scrollbar-thumb,
.toolbox-categories::-webkit-scrollbar-thumb,
.top-palette .palette-group::-webkit-scrollbar-thumb,
.flow-json-preview pre::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.36);
  background-clip: padding-box;
}

.top-palette .palette-button {
  flex: 0 0 auto;
  width: auto;
  min-height: 42px;
  padding: 0 14px;
  align-content: center;
  white-space: nowrap;
}

.sidebar-toolbox .palette-button {
  position: relative;
  min-height: 42px;
  padding: 10px 12px;
  border-color: rgba(var(--muted-rgb), 0.15);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(var(--bg-rgb), 0.28);
}

.sidebar-toolbox .palette-button:hover {
  border-color: rgba(var(--accent-rgb), 0.42);
  transform: translateY(-1px);
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.12), rgba(255, 255, 255, 0.035)),
    rgba(var(--bg-rgb), 0.34);
}

.sidebar-toolbox .palette-button strong {
  font-size: 0.9rem;
}

.top-palette .palette-button.is-filtered-out,
.sidebar-toolbox .palette-button.is-filtered-out {
  display: none;
}

.flowchart-workbench {
  display: grid;
  grid-template-columns: minmax(760px, 1fr) 320px;
  gap: 18px;
  align-items: stretch;
  height: clamp(760px, calc(100vh - 150px), 980px);
  min-height: 0;
  transition:
    grid-template-columns 420ms cubic-bezier(.2, .9, .2, 1),
    gap 420ms cubic-bezier(.2, .9, .2, 1);
}

.flowchart-workbench.is-ai-preview {
  grid-template-columns: minmax(520px, 1fr) 0;
  gap: 0;
}

.flowchart-workbench.is-ai-preview .node-inspector {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(12px);
  overflow: hidden;
}

.editor-tutorial-backdrop {
  position: fixed;
  inset: 0;
  z-index: 86;
  background: rgba(3, 7, 12, 0.58);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.editor-tutorial-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.editor-tutorial-card {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 90;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.14), rgba(var(--muted-rgb), 0.09)),
    rgba(var(--bg-rgb), 0.98);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);
  transition:
    opacity 180ms ease,
    transform 220ms ease,
    visibility 180ms ease,
    left 320ms cubic-bezier(.2, .8, .2, 1),
    top 320ms cubic-bezier(.2, .8, .2, 1);
}

.editor-tutorial-card.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.editor-tutorial-card h3 {
  margin: 0;
  font-size: 1.12rem;
}

.editor-tutorial-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.editor-tutorial-progress {
  justify-self: end;
  padding: 5px 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 850;
}

.editor-tutorial-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.editor-tutorial-actions .button {
  min-height: 38px;
}

.editor-tutorial-active .tutorial-highlight {
  position: relative;
  z-index: 88;
  outline: 2px solid rgba(var(--accent-rgb), 0.82);
  outline-offset: 5px;
  box-shadow: 0 0 0 9999px rgba(3, 7, 12, 0.18), 0 0 34px rgba(var(--accent-rgb), 0.22);
}

.setup-guide-backdrop {
  position: fixed;
  inset: 0;
  z-index: 86;
  background: rgba(3, 7, 12, 0.58);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.setup-guide-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.setup-guide-card {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 90;
  display: grid;
  gap: 12px;
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.14), rgba(var(--muted-rgb), 0.09)),
    rgba(var(--bg-rgb), 0.98);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 8px)) scale(0.98);
  transition:
    opacity 180ms ease,
    transform 220ms ease,
    visibility 180ms ease;
}

.setup-guide-card.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.setup-guide-card h3 {
  margin: 0;
  font-size: 1.18rem;
}

.setup-guide-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.setup-guide-image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: calc(var(--setup-image-width, 16) / var(--setup-image-height, 9));
  overflow: hidden;
  border: 1px solid rgba(var(--text-rgb), 0.09);
  border-radius: 8px;
  background: var(--bg-soft);
}

.setup-guide-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.setup-guide-highlight-box {
  position: absolute;
  border: 3px solid var(--accent-warm);
  border-radius: 10px;
  box-shadow:
    0 0 0 9999px rgba(var(--bg-rgb), 0.22),
    0 0 0 4px rgba(var(--muted-rgb), 0.2),
    0 0 26px rgba(var(--muted-rgb), 0.48);
  pointer-events: none;
}

.setup-guide-highlight-box::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(var(--text-rgb), 0.58);
  border-radius: 13px;
}

.setup-guide-progress {
  justify-self: end;
  padding: 5px 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 850;
}

.setup-guide-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.setup-guide-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.setup-guide-actions .button,
.setup-guide-link-row .button {
  min-height: 38px;
}

.setup-guide-active .setup-guide-highlight {
  position: relative;
  z-index: 88;
  outline: 2px solid rgba(var(--accent-rgb), 0.82);
  outline-offset: 5px;
  box-shadow: 0 0 0 9999px rgba(3, 7, 12, 0.18), 0 0 34px rgba(var(--accent-rgb), 0.22);
}

.flowchart-canvas-wrap {
  position: relative;
  min-width: 0;
  height: 100%;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    rgba(255, 255, 255, 0.025);
  background-size: 36px 36px;
  overflow: hidden;
  cursor: grab;
}

.flowchart-canvas-wrap::before,
.flowchart-canvas-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
}

.editor-node-search {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 5;
  display: grid;
  gap: 4px;
  width: min(320px, calc(100% - 28px));
  padding: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.36);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.92);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.ai-editor-draft-card {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 8;
  display: grid;
  gap: 8px;
  width: min(340px, calc(100% - 28px));
  padding: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.18), rgba(var(--muted-rgb), 0.1)),
    rgba(var(--bg-rgb), 0.94);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.flowchart-workbench.is-draft-discarding .ai-editor-draft-card {
  animation: aiDraftCardDisintegrate 660ms cubic-bezier(.45, 0, .2, 1) both;
}

.flowchart-workbench.is-draft-keeping .ai-editor-draft-card {
  animation: aiDraftCardKeep 500ms cubic-bezier(.2, .9, .2, 1) both;
}

.ai-editor-draft-card[hidden] {
  display: none;
}

.ai-editor-draft-card strong {
  font-size: 1rem;
}

.ai-editor-draft-card > span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.ai-editor-draft-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-draft-shard-layer {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.ai-draft-shard {
  position: absolute;
  overflow: hidden;
  border-radius: 2px;
  opacity: 1;
  animation-delay: var(--delay, 0ms);
  will-change: transform, opacity, filter;
}

.ai-draft-shard-layer.is-scattering .ai-draft-shard {
  animation: aiDraftShardScatter 1200ms cubic-bezier(.16, .76, .2, 1) both;
}

.ai-draft-shard-layer.is-retargeting .ai-draft-shard {
  animation: aiDraftShardRetarget 300ms cubic-bezier(.2, .78, .18, 1) both;
  animation-delay: 0ms;
}

.ai-draft-shard-layer.is-reassembling .ai-draft-shard {
  animation: aiDraftShardReassemble 2450ms cubic-bezier(.2, .72, .18, 1) both;
  animation-delay: 0ms;
}

.ai-draft-shard .flow-node {
  margin: 0;
  cursor: default;
  user-select: none;
}

.ai-draft-particle {
  position: absolute;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.88);
  box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.32);
  animation: aiDraftParticleDrift 1350ms cubic-bezier(.16, .76, .2, 1) both;
  animation-delay: var(--delay, 0ms);
  will-change: transform, opacity;
}

.flowchart-workbench.is-draft-discarding .flow-node.is-ai-preview-node {
  opacity: 0;
  transition: opacity 90ms ease;
}

.flowchart-workbench.is-draft-discarding .flow-link {
  stroke-dasharray: 10 8 2 12;
  animation: aiDraftLinkDisintegrate 1200ms ease both;
}

.flowchart-workbench.is-draft-keeping .flow-node.is-ai-preview-node,
.flowchart-workbench.is-draft-keeping .flow-link {
  animation: aiDraftKeep 470ms cubic-bezier(.2, .9, .2, 1) both;
}

.flowchart-workbench.is-editor-returning .flowchart-canvas-wrap {
  animation: editorReturnIn 2200ms cubic-bezier(.2, .72, .18, 1) both;
}

.flowchart-workbench.is-editor-returning .node-inspector {
  animation: inspectorReturnIn 2200ms cubic-bezier(.2, .72, .18, 1) both;
}

.flowchart-workbench.is-editor-returning .flowchart-nodes > .flow-node:not(.is-ai-preview-node) {
  animation: editorNodeMaterialize 3800ms cubic-bezier(.2, .72, .18, 1) both;
}

.flowchart-workbench.is-editor-returning .flow-link {
  stroke-dasharray: 18 12;
  animation: editorLinkMaterialize 3800ms cubic-bezier(.2, .72, .18, 1) both;
}

.flowchart-workbench.is-real-flow-hidden .flowchart-nodes > .flow-node:not(.is-ai-preview-node),
.flowchart-workbench.is-real-flow-hidden .flow-link {
  opacity: 0 !important;
  animation: none !important;
}

.flowchart-workbench.is-real-flow-revealing .flowchart-nodes > .flow-node:not(.is-ai-preview-node) {
  animation: realFlowReveal 420ms cubic-bezier(.2, .78, .22, 1) both;
}

.flowchart-workbench.is-real-flow-revealing .flow-link {
  animation: realLineReveal 420ms cubic-bezier(.2, .78, .22, 1) both;
}

.flowchart-workbench.is-keep-constructing .flowchart-canvas-wrap {
  animation: keepCanvasPulse 1.35s ease-in-out infinite;
}

.flowchart-workbench.is-keep-constructing .flowchart-canvas-wrap::before {
  opacity: 1;
  border: 1px solid rgba(var(--accent-rgb), 0.72);
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.14) inset,
    0 0 32px rgba(var(--accent-rgb), 0.24);
  animation: keepCanvasGlowPulse 1.35s ease-in-out infinite;
}

.flowchart-workbench.is-keep-constructing .flowchart-canvas-wrap::after {
  opacity: 1;
  background:
    linear-gradient(90deg, transparent 0%, rgba(var(--accent-rgb), 0.05) 28%, rgba(var(--accent-rgb), 0.5) 50%, rgba(var(--accent-rgb), 0.05) 72%, transparent 100%) top left / 34% 2px no-repeat,
    linear-gradient(90deg, transparent 0%, rgba(var(--accent-rgb), 0.04) 28%, rgba(var(--accent-rgb), 0.34) 50%, rgba(var(--accent-rgb), 0.04) 72%, transparent 100%) bottom left / 34% 2px no-repeat;
  animation: keepCanvasTrace 2.2s cubic-bezier(.2, .8, .2, 1) infinite;
}

.flowchart-workbench.is-keep-constructing .flowchart-nodes > .flow-node,
.flowchart-workbench.is-keep-constructing #flowchart-links > .flow-link {
  opacity: 0 !important;
}

.flowchart-workbench.is-keep-revealing .flowchart-nodes > .flow-node,
.flowchart-workbench.is-keep-revealing #flowchart-links > .flow-link {
  animation: keepRealFlowReveal 420ms cubic-bezier(.2, .78, .22, 1) both;
}

.ai-keep-overlay,
.ai-keep-lines,
.ai-keep-nodes {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.ai-keep-overlay {
  z-index: 8;
  opacity: 1;
}

.ai-keep-lines {
  width: 100%;
  height: 100%;
}

.ai-keep-node {
  opacity: 0;
  cursor: default;
  pointer-events: none;
  transition:
    opacity 320ms ease,
    border-color 180ms ease,
    box-shadow 220ms ease,
    filter 220ms ease;
}

.ai-keep-node .node-body {
  position: relative;
  z-index: 1;
}

.ai-keep-node .node-body small {
  opacity: 0;
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  color: rgba(var(--accent-rgb), 0);
  transform: translateY(-2px);
  vertical-align: bottom;
  transition:
    color 260ms ease,
    opacity 260ms ease,
    transform 260ms ease,
    max-width 260ms ease;
}

.ai-keep-overlay.is-visible .ai-keep-node {
  opacity: 0.86;
}

.ai-keep-node.is-active {
  opacity: 1;
  border-color: rgba(var(--accent-rgb), 0.86);
  box-shadow:
    0 0 0 2px rgba(var(--accent-rgb), 0.18),
    0 0 30px rgba(var(--accent-rgb), 0.22),
    0 18px 44px rgba(0, 0, 0, 0.28);
  filter: brightness(1.08);
}

.ai-keep-node.is-sweeping .node-body small,
.ai-keep-node.is-input-lit .node-body small,
.ai-keep-node.is-subtitle-revealed .node-body small {
  opacity: 1;
  color: rgba(var(--accent-rgb), 0.98);
  text-shadow: 0 0 9px rgba(var(--accent-rgb), 0.24);
  transform: translateY(0);
  max-width: var(--subtitle-width, 100%);
}

.ai-keep-node.is-sweeping .node-body small {
  animation: keepSubtitleWipe var(--keep-sweep-duration, 300ms) steps(var(--char-count, 1), end) both;
}

.ai-keep-node.is-subtitle-revealed .node-body small {
  animation: none;
  max-width: var(--subtitle-width, 100%);
}

.ai-keep-node.is-settled .node-body small {
  opacity: 0.78;
  max-width: var(--subtitle-width, 100%);
  color: rgba(139, 154, 173, 0.82);
  text-shadow: none;
  transform: translateY(0);
  animation: none;
}

.ai-keep-node.is-sweeping::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.62), transparent) top left / 42% 2px no-repeat,
    linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.38), transparent) bottom left / 42% 2px no-repeat,
    linear-gradient(180deg, transparent, rgba(var(--accent-rgb), 0.24), transparent) center left / 2px 100% no-repeat;
  box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.18);
  animation: keepBlockSweep var(--keep-sweep-duration, 300ms) ease-out both;
  pointer-events: none;
}

.ai-keep-node.is-port-lit .node-port-out {
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.14), 0 0 18px rgba(var(--accent-rgb), 0.64);
  background: var(--accent-strong);
}

.ai-keep-node.is-split-source.is-port-lit .node-port-out {
  animation: keepSplitPortPulse 520ms ease-in-out infinite;
}

.ai-keep-node.is-input-lit .node-port-in {
  background: rgba(var(--accent-strong-rgb), 0.96);
  box-shadow:
    0 0 0 5px rgba(var(--accent-rgb), 0.16),
    0 0 20px rgba(var(--accent-rgb), 0.7),
    0 0 34px rgba(var(--accent-rgb), 0.24);
}

.ai-keep-line {
  opacity: 0 !important;
  fill: none;
  stroke: var(--accent-strong);
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.34));
}

.ai-keep-line.is-drawing,
.ai-keep-line.is-drawn {
  opacity: 1 !important;
}

.ai-keep-line.is-drawing {
  stroke-width: 3.2;
  filter:
    drop-shadow(0 0 7px rgba(var(--accent-rgb), 0.46))
    drop-shadow(0 0 16px rgba(var(--accent-rgb), 0.22));
}

.ai-keep-line-tracer {
  opacity: 0.74;
  fill: none;
  stroke: rgba(var(--accent-strong-rgb), 0.88);
  stroke-width: 3.5;
  stroke-linecap: round;
  filter:
    drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.76))
    drop-shadow(0 0 18px rgba(var(--accent-rgb), 0.28));
  pointer-events: none;
}

.ai-keep-orb {
  fill: rgba(var(--accent-strong-rgb), 0.96);
  transform-box: fill-box;
  transform-origin: center;
  filter:
    drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.9))
    drop-shadow(0 0 18px rgba(var(--accent-rgb), 0.34));
  pointer-events: none;
}

.ai-keep-orb-2 {
  fill: rgba(var(--accent-rgb), 0.9);
}

.ai-keep-orb-3 {
  fill: rgba(242, 255, 250, 0.78);
}

.ai-keep-particle {
  position: absolute;
  z-index: 9;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.9);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
  animation: keepParticle 620ms ease-out both;
}

.ai-keep-overlay.is-finishing {
  animation: keepOverlayFinish 420ms ease-out both;
}

@keyframes keepCanvasPulse {
  0%,
  100% {
    border-color: rgba(var(--accent-rgb), 0.32);
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0), 0 0 22px rgba(var(--accent-rgb), 0.12);
  }

  50% {
    border-color: rgba(var(--accent-rgb), 0.86);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.12), 0 0 38px rgba(var(--accent-rgb), 0.26);
  }
}

@keyframes keepCanvasGlowPulse {
  0%,
  100% {
    opacity: 0.62;
    filter: brightness(1);
  }

  50% {
    opacity: 1;
    filter: brightness(1.18);
  }
}

@keyframes keepCanvasTrace {
  0% {
    background-position: -36% top, -36% bottom;
  }

  100% {
    background-position: 136% top, 136% bottom;
  }
}

@keyframes keepBlockSweep {
  from {
    background-position: -46% top, -46% bottom, -8px center;
    opacity: 0.2;
  }

  18% {
    opacity: 1;
  }

  82% {
    opacity: 1;
  }

  to {
    background-position: 146% top, 146% bottom, calc(100% + 8px) center;
    opacity: 0.3;
  }
}

@keyframes keepSubtitleWipe {
  0% {
    max-width: 0;
  }

  100% {
    max-width: var(--subtitle-width, 100%);
  }
}

@keyframes keepSparkPulse {
  0%,
  100% {
    transform: scale(0.72);
    opacity: 0.74;
  }

  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes keepSplitPortPulse {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.18);
    filter: brightness(1.3);
  }
}

@keyframes keepParticle {
  0% {
    opacity: 0.9;
    transform: translate(0, 0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(0.25);
  }
}

@keyframes keepOverlayFinish {
  to {
    opacity: 0;
    filter: blur(1px);
  }
}

@keyframes keepRealFlowReveal {
  0% {
    opacity: 0;
    filter: blur(1.5px) brightness(1.12);
  }

  55% {
    opacity: 0.72;
    filter: blur(0.4px) brightness(1.06);
  }

  100% {
    opacity: 1;
    filter: blur(0) brightness(1);
  }
}

@keyframes aiDraftShardScatter {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
    filter: blur(0);
  }

  42% {
    opacity: 0.88;
    transform: translate(calc(var(--tx) * 0.34), calc(var(--ty) * 0.34)) rotate(calc(var(--rot) * 0.38)) scale(0.97);
    filter: blur(0) saturate(1.22);
  }

  100% {
    opacity: 0.76;
    transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.76);
    filter: blur(0) saturate(0.82);
  }
}

@keyframes aiDraftShardRetarget {
  0% {
    opacity: 0.78;
    transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.78);
    filter: blur(0) saturate(0.92);
  }

  48% {
    opacity: 0.24;
    transform: translate(calc(var(--tx) * 1.04), calc(var(--ty) * 1.04)) rotate(calc(var(--rot) * 1.12)) scale(0.64);
    filter: blur(0) saturate(0.65);
  }

  100% {
    opacity: 0.72;
    transform: translate(var(--sx), var(--sy)) rotate(var(--rot)) scale(0.86);
    filter: blur(0) saturate(0.96);
  }
}

@keyframes aiDraftShardReassemble {
  0% {
    opacity: 0.96;
    transform: translate(var(--sx), var(--sy)) rotate(var(--rot)) scale(0.88);
    filter: blur(0) saturate(1.12);
  }

  34% {
    opacity: 0.94;
    transform: translate(calc(var(--sx) * 0.66 + var(--ax) * 0.28), calc(var(--sy) * 0.66 + var(--ay) * 0.28)) rotate(calc(var(--rot) * 0.52)) scale(0.92);
    filter: blur(0) saturate(1.08);
  }

  76% {
    opacity: 0.96;
    transform: translate(calc(var(--ax) * 0.96), calc(var(--ay) * 0.96)) rotate(calc(var(--rot) * -0.05)) scale(0.985);
    filter: blur(0) saturate(1.04);
  }

  92% {
    opacity: 0.92;
    transform: translate(var(--ax), var(--ay)) rotate(0deg) scale(1);
    filter: blur(0);
  }

  100% {
    opacity: 0.34;
    transform: translate(var(--ax), var(--ay)) rotate(0deg) scale(1);
    filter: blur(0);
  }
}

@keyframes realFlowReveal {
  0% {
    opacity: 0;
    filter: blur(0) brightness(1.04);
  }

  100% {
    opacity: 1;
    filter: blur(0) brightness(1);
  }
}

@keyframes realLineReveal {
  0% {
    opacity: 0;
    stroke-dashoffset: 40;
    filter: blur(0);
  }

  100% {
    opacity: 1;
    stroke-dashoffset: 0;
    filter: blur(0);
  }
}

@keyframes editorNodeMaterialize {
  0% {
    opacity: 0;
    filter: blur(0.8px) brightness(1.05);
    transform: scale(1);
  }

  66% {
    opacity: 0;
    filter: blur(0.8px) brightness(1.05);
    transform: scale(1);
  }

  88% {
    opacity: 0.92;
    filter: blur(0.15px) brightness(1.02);
    transform: scale(1);
  }

  100% {
    opacity: 1;
    filter: blur(0) brightness(1);
    transform: scale(1);
  }
}

@keyframes editorLinkMaterialize {
  0% {
    opacity: 0;
    stroke-dashoffset: 70;
    filter: blur(1.2px);
  }

  66% {
    opacity: 0;
    stroke-dashoffset: 70;
    filter: blur(1.2px);
  }

  100% {
    opacity: 1;
    stroke-dashoffset: 0;
    filter: blur(0);
  }
}

@keyframes aiDraftParticleDrift {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.6);
  }

  14% {
    opacity: 0.78;
  }

  72% {
    opacity: 0.32;
  }

  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(0.24);
  }
}

@keyframes aiDraftLinkDisintegrate {
  0% {
    opacity: 1;
    stroke-dashoffset: 0;
    filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.22));
  }

  46% {
    opacity: 0.72;
    stroke-dashoffset: 28;
    filter: drop-shadow(0 0 14px rgba(var(--accent-rgb), 0.28));
  }

  100% {
    opacity: 0;
    stroke-dashoffset: 92;
    filter: drop-shadow(0 0 18px rgba(var(--muted-rgb), 0.28));
  }
}

@keyframes aiDraftCardDisintegrate {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-12px) translateX(26px) scale(0.96);
    filter: blur(8px);
  }
}

@keyframes aiDraftKeep {
  0% {
    opacity: 1;
    filter: brightness(1);
    transform: scale(1);
  }

  55% {
    opacity: 1;
    filter: brightness(1.18);
    transform: scale(1.012);
  }

  100% {
    opacity: 0;
    filter: brightness(1.1) blur(3px);
    transform: scale(1.025);
  }
}

@keyframes aiDraftCardKeep {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  55% {
    opacity: 1;
    transform: translateY(-2px) scale(1.015);
  }

  100% {
    opacity: 0;
    transform: translateY(-8px) scale(1.035);
  }
}

@keyframes editorReturnIn {
  0% {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(6px) scaleX(1.018);
  }

  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scaleX(1);
  }
}

@keyframes inspectorReturnIn {
  0% {
    opacity: 0;
    transform: translateX(14px);
    filter: blur(4px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

.editor-node-search[hidden] {
  display: none;
}

.editor-node-search input {
  min-height: 42px;
  border-color: rgba(var(--accent-rgb), 0.28);
}

.flowchart-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
}

.flowchart-world {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.flowchart-canvas.is-panning {
  cursor: grabbing;
}

.flowchart-canvas.is-previewing-ai {
  cursor: grab;
}

.canvas-node-preview {
  position: absolute;
  top: 18px;
  left: 18px;
  right: auto;
  z-index: 8;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(380px, calc(100% - 36px));
  max-height: min(520px, calc(100% - 36px));
  overflow: hidden;
  border: 1px solid rgba(var(--muted-rgb), 0.22);
  border-radius: 8px;
  background: var(--bg-soft);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  touch-action: none;
}

.canvas-node-preview[hidden] {
  display: none;
}

.canvas-node-preview-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid rgba(var(--muted-rgb), 0.14);
  background: var(--panel);
  cursor: grab;
  user-select: none;
}

.canvas-node-preview.is-dragging .canvas-node-preview-head {
  cursor: grabbing;
}

.canvas-node-preview-head strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
}

.canvas-node-preview-head .button {
  min-height: 34px;
  padding: 0 10px;
}

.canvas-node-preview-body {
  min-height: 0;
  overflow: auto;
  padding: 12px;
  background: rgba(49, 51, 56, 0.92);
}

.flowchart-links,
.flowchart-nodes {
  position: absolute;
  inset: 0;
}

.flowchart-links {
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.flow-link {
  fill: none;
  stroke: var(--jewel-strong);
  stroke-width: 3;
  stroke-linecap: round;
  filter: none;
  pointer-events: stroke;
  cursor: pointer;
}

.flow-link:hover {
  stroke: var(--jewel-blue);
}

.flow-link-loop {
  stroke: rgba(var(--accent-warm-rgb), 0.9);
  stroke-dasharray: 7 7;
}

.flow-link-draft {
  stroke: rgba(var(--muted-rgb), 0.88);
  stroke-dasharray: 8 8;
}

.flow-node {
  position: absolute;
  width: 250px;
  min-height: 88px;
  display: grid;
  grid-template-columns: 16px 1fr 16px;
  align-items: center;
  gap: 10px;
  padding: 12px 80px 12px 12px;
  border: 1px solid rgba(var(--text-rgb), 0.14);
  border-radius: 8px;
  background: var(--bg-soft);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  cursor: grab;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.flow-node:active {
  cursor: grabbing;
}

.flow-node.is-selected {
  border-color: rgba(var(--accent-rgb), 0.75);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.16), 0 18px 44px rgba(0, 0, 0, 0.28);
}

.flow-node.is-linking {
  border-color: rgba(var(--accent-rgb), 0.75);
}

.flow-node.is-search-match {
  border-color: rgba(var(--muted-rgb), 0.88);
  box-shadow: 0 0 0 3px rgba(var(--muted-rgb), 0.16), 0 18px 44px rgba(0, 0, 0, 0.28);
}

.flow-node.is-locked {
  cursor: default;
}

.flow-node.is-ai-preview-node {
  pointer-events: none;
  cursor: default;
}

.flow-node-condition {
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.09), rgba(var(--text-rgb), 0.045)), var(--bg-soft);
}

.flow-node-action {
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.12), rgba(var(--text-rgb), 0.045)), var(--bg-soft);
}

.flow-node-form {
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.15), rgba(var(--text-rgb), 0.045)), var(--bg-soft);
}

.flow-node-logic {
  background: linear-gradient(145deg, rgba(var(--accent-warm-rgb), 0.13), rgba(var(--text-rgb), 0.045)), var(--bg-soft);
}

.flow-node-trigger {
  background: linear-gradient(145deg, rgba(var(--muted-rgb), 0.16), rgba(var(--text-rgb), 0.045)), var(--bg-soft);
}

.node-body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.node-body span {
  color: var(--accent-warm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  font-weight: 850;
}

.node-body strong,
.node-body small {
  text-overflow: ellipsis;
}

.node-body strong {
  overflow: visible;
  white-space: normal;
  line-height: 1.2;
}

.node-body small {
  overflow: hidden;
  white-space: nowrap;
}

.node-body small {
  color: var(--muted);
}

.node-port {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  border: 2px solid var(--accent-strong);
  border-radius: 50%;
  background: var(--bg);
  cursor: crosshair;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.node-port-in {
  border-color: var(--accent-warm);
}

.node-ports-out {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 104px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  transform: translateY(-50%);
}

.node-port-row {
  display: grid;
  grid-template-columns: 78px 16px;
  align-items: center;
  gap: 8px;
  justify-content: end;
  width: 104px;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.node-port-label {
  grid-column: 1;
  color: var(--accent-warm);
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: right;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(var(--bg-rgb), 0.88);
  opacity: 0.95;
  min-width: 54px;
  max-width: 74px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-port-row .node-port {
  grid-column: 2;
  justify-self: end;
  order: 1;
}

.node-port-label.is-empty {
  display: none;
}

.flow-node-logic {
  background: linear-gradient(145deg, rgba(var(--accent-warm-rgb), 0.14), rgba(var(--text-rgb), 0.045)), var(--bg-soft);
}

.hide-branch-labels .node-port-label {
  display: none;
}

.node-inspector {
  display: block;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.4) transparent;
  transition:
    opacity 360ms cubic-bezier(.2, .9, .2, 1),
    transform 420ms cubic-bezier(.2, .9, .2, 1),
    visibility 360ms ease;
}

.node-inspector > * + * {
  margin-top: 14px;
}

.inspector-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.1);
}

.inspector-tab {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
  cursor: pointer;
}

.inspector-tab.is-active {
  color: var(--text);
  background: rgba(var(--accent-rgb), 0.13);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.2);
}

.inspector-panel {
  display: grid;
  gap: 14px;
}

.inspector-panel[hidden] {
  display: none;
}

.node-inspector .flow-settings {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.node-inspector .flow-settings .form-row {
  grid-template-columns: 1fr;
  gap: 12px;
}

.mobile-command-save-row {
  display: none;
}

.node-inspector::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.node-inspector::-webkit-scrollbar-track {
  background: transparent;
}

.node-inspector::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.36);
  background-clip: padding-box;
}

.variable-editor,
.variable-item,
.form-fields-editor,
.form-fields-list,
.form-field-item {
  display: grid;
  gap: 10px;
}

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

.variable-list,
.form-fields-list {
  display: grid;
  gap: 10px;
}

.variable-item,
.form-field-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.08);
}

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

.inspector-fields {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow: visible;
}

.inspector-fields input[type="search"],
.inspector-fields input[type="text"],
.inspector-fields textarea,
.inspector-fields select {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02)),
    var(--bg-soft);
}

.inspector-title {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.08);
}

.inspector-preview-button {
  margin-top: 8px;
  justify-self: start;
}

.inspector-title span {
  color: var(--muted);
  text-transform: capitalize;
}

.inspector-cost-note {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 8px;
  background: rgba(20, 184, 166, 0.08);
}

.inspector-cost-note span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.inspector-cost-note strong {
  color: #bffaf2;
  font-size: 0.92rem;
}

.inspector-cost-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.inspector-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  position: static;
}

.editor-canvas,
.editor-palette {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.editor-main.is-fullscreen {
  position: fixed;
  inset: 12px;
  z-index: 80;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  padding-left: 332px;
}

.editor-main.is-fullscreen .editor-sidebar {
  position: fixed;
  top: 28px;
  bottom: 28px;
  left: 28px;
  z-index: 123;
  width: 292px;
  height: calc(100vh - 56px);
  max-height: none;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    var(--bg-soft);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.editor-main:fullscreen,
body.editor-fullscreen .editor-main {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  padding: 16px 16px 16px 332px;
  border-radius: 0;
  z-index: 120;
  overflow: hidden;
}

.editor-main:fullscreen .editor-sidebar,
body.editor-fullscreen .editor-main .editor-sidebar {
  position: fixed;
  top: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 123;
  width: 292px;
  height: calc(100vh - 32px);
  max-height: none;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    var(--bg-soft);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.editor-main.is-fullscreen .flowchart-canvas-wrap {
  height: 100%;
  min-height: 0;
}

.editor-main:fullscreen .flowchart-canvas-wrap,
body.editor-fullscreen .editor-main .flowchart-canvas-wrap {
  height: 100%;
  min-height: 0;
}

.editor-main.is-fullscreen .flowchart-workbench,
.editor-main:fullscreen .flowchart-workbench,
body.editor-fullscreen .editor-main .flowchart-workbench {
  grid-row: 2;
  grid-template-columns: minmax(760px, 1fr) 320px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.editor-main.is-fullscreen .flowchart-workbench.is-ai-preview,
.editor-main:fullscreen .flowchart-workbench.is-ai-preview,
body.editor-fullscreen .editor-main .flowchart-workbench.is-ai-preview {
  grid-template-columns: minmax(760px, 1fr) 0;
  gap: 0;
}

.editor-main.is-fullscreen .node-inspector,
.editor-main:fullscreen .node-inspector,
body.editor-fullscreen .editor-main .node-inspector {
  height: 100%;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
}

.editor-context-menu {
  position: fixed;
  z-index: 220;
  display: none;
  min-width: 190px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.editor-context-menu.is-open {
  display: grid;
  gap: 4px;
}

.editor-context-menu button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.editor-context-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 89;
  display: none;
  background: transparent;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.preview-backdrop.is-open {
  display: block;
}

.ai-generate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 91;
  display: none;
  background: transparent;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.ai-generate-backdrop.is-open {
  display: block;
}

.preview-drawer {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 90;
  display: grid;
  grid-template-rows: auto 1fr;
  width: min(1180px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 48px));
  padding: 18px;
  border: 1px solid rgba(var(--muted-rgb), 0.22);
  border-radius: 10px;
  background: var(--bg-soft);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
  transform: translate(-50%, -48%) scale(0.98);
  visibility: hidden;
  pointer-events: none;
  transition: transform 180ms ease, visibility 180ms ease;
}

.preview-drawer.is-open {
  transform: translate(-50%, -50%) scale(1);
  visibility: visible;
  pointer-events: auto;
}

.ai-generate-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 92;
  display: grid;
  grid-template-rows: auto 1fr;
  width: min(900px, calc(100vw - 48px));
  height: min(560px, calc(100vh - 48px));
  padding: 18px;
  border: 1px solid rgba(var(--muted-rgb), 0.22);
  border-radius: 10px;
  background: var(--bg-soft);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
  transform: translate(-50%, -48%) scale(0.98);
  visibility: hidden;
  pointer-events: none;
  transition: transform 180ms ease, visibility 180ms ease;
}

.ai-generate-modal.is-open {
  transform: translate(-50%, -50%) scale(1);
  visibility: visible;
  pointer-events: auto;
}

.preview-drawer-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.preview-drawer-head h3 {
  margin: 2px 0 0;
  font-size: 1.05rem;
}

.preview-drawer-body {
  min-height: 0;
  overflow: hidden;
  padding-top: 14px;
}

.ai-generate-body {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 0.78fr);
  gap: 14px;
  min-height: 0;
  padding-top: 14px;
}

.ai-generate-form textarea {
  resize: vertical;
  min-height: 180px;
}

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

.ai-quota-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ai-quota-grid div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.ai-quota-grid span {
  color: var(--muted);
  font-size: 0.78rem;
}

.ai-quota-grid strong {
  color: var(--text);
  font-size: 1.1rem;
}

.ai-generate-stream {
  min-height: 0;
}

.ai-stream-list {
  display: grid;
  gap: 10px;
}

.ai-stream-list[hidden] {
  display: none;
}

.ai-stream-item {
  position: relative;
  padding: 10px 12px 10px 28px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
}

.ai-stream-item::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 12px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.42);
}

.ai-stream-item.is-active {
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.3);
}

.ai-stream-item.is-active::before {
  background: var(--jewel);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.48);
}

.ai-draft-panel {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.ai-draft-panel.is-complete {
  animation: botDraftPop 520ms cubic-bezier(.2, 1.3, .35, 1) both;
}

.ai-draft-panel.is-complete::before {
  content: "";
  position: absolute;
  inset: -10px -8px auto auto;
  width: 110px;
  height: 80px;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(var(--accent-rgb), 0.95) 0 3px, transparent 4px) 10% 60% / 24px 24px,
    radial-gradient(circle, rgba(var(--accent-warm-rgb), 0.95) 0 3px, transparent 4px) 45% 20% / 28px 28px,
    radial-gradient(circle, rgba(var(--accent-warm-rgb), 0.95) 0 3px, transparent 4px) 78% 52% / 24px 24px;
  filter: drop-shadow(0 0 12px rgba(var(--accent-rgb), 0.35));
  animation: botDraftSpark 900ms ease-out both;
}

.ai-draft-panel[hidden] {
  display: none;
}

.ai-draft-panel h4 {
  margin: 2px 0 4px;
}

.ai-draft-panel span {
  color: var(--muted);
}

.bot-ai-modal {
  width: min(1040px, calc(100vw - 48px));
  height: min(720px, calc(100vh - 48px));
}

.bot-ai-modal.has-log-panel {
  width: min(1280px, calc(100vw - 48px));
}

.bot-ai-body {
  grid-template-columns: minmax(340px, 0.86fr) minmax(380px, 1.14fr);
}

.bot-ai-body.has-log-panel {
  grid-template-columns: minmax(310px, 0.72fr) minmax(380px, 1fr) minmax(240px, 0.54fr);
}

.bot-ai-output {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  border-color: rgba(var(--muted-rgb), 0.16);
  background: rgba(var(--bg-rgb), 0.54);
}

.preview-output-panel.bot-ai-output,
.preview-output-panel.bot-build-log-panel {
  border-color: rgba(var(--muted-rgb), 0.16);
  background: rgba(var(--bg-rgb), 0.54);
}

.bot-ai-output > .eyebrow,
.bot-ai-output > .bot-build-visual,
.bot-ai-output > .bot-draft-panel {
  grid-column: 1;
}

.bot-build-log-toggle {
  position: absolute;
  z-index: 8;
  top: 12px;
  right: 12px;
  min-height: 32px;
  padding: 7px 11px;
  font-size: 0.74rem;
}

.bot-build-log-toggle.is-open {
  border-color: rgba(var(--accent-rgb), 0.34);
  color: var(--text);
}

.bot-build-log-panel {
  position: relative;
  z-index: 7;
  top: auto;
  right: auto;
  align-content: start;
  width: 100%;
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.54);
  box-shadow: none;
}

.bot-build-visual {
  position: relative;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 236px;
  max-height: 286px;
  padding: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 96px 50%, rgba(var(--accent-rgb), 0.18), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(var(--accent-warm-rgb), 0.13), transparent 28%),
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    rgba(var(--bg-rgb), 0.42);
  background-size: 28px 28px;
  overflow: hidden;
  opacity: 0.72;
  isolation: isolate;
}

.bot-build-metrics {
  position: static;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(96px, 0.86fr) repeat(2, minmax(68px, 0.5fr));
  width: 100%;
  gap: 8px;
  pointer-events: none;
}

.bot-build-metrics div {
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 7px;
  background: rgba(var(--bg-rgb), 0.58);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.bot-build-metrics span,
.bot-build-metrics strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-build-metrics span {
  color: rgba(var(--muted-rgb), 0.88);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
}

.bot-build-metrics strong {
  margin-top: 3px;
  color: rgba(var(--text-rgb), 0.94);
  font-size: 0.78rem;
}

.bot-build-live-metrics {
  margin-top: 10px;
}

.bot-build-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.16), transparent),
    radial-gradient(circle at 18% 50%, rgba(var(--accent-rgb), 0.18), transparent 18%);
  transform: translateX(-100%);
}

.bot-build-visual::after {
  content: "";
  position: absolute;
  left: 96px;
  top: 50%;
  width: 126px;
  height: 126px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 999px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 18px rgba(var(--accent-rgb), 0.035),
    0 0 44px rgba(var(--accent-rgb), 0.14);
}

.bot-build-visual.is-building,
.bot-build-visual.is-ready,
.bot-build-visual.is-installing,
.bot-build-visual.is-installed {
  opacity: 1;
  border-color: rgba(var(--accent-rgb), 0.24);
}

.bot-build-visual.is-building::before,
.bot-build-visual.is-installing::before {
  animation: botBuildScan 3200ms cubic-bezier(.2, .76, .22, 1) infinite;
}

.bot-build-visual.is-building::after,
.bot-build-visual.is-ready::after,
.bot-build-visual.is-installing::after {
  animation: botBuildRing 7600ms linear infinite;
}

.bot-build-core {
  position: relative;
  z-index: 2;
  display: block;
  align-self: stretch;
  justify-self: center;
  min-height: 126px;
  min-width: 0;
  width: 150px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  transform: translate(0, 0);
}

.bot-build-core span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  border: 1px solid rgba(var(--accent-rgb), 0.72);
  border-radius: 999px;
  background:
    radial-gradient(circle, transparent 0 22px, rgba(var(--accent-rgb), 0.12) 23px 31px, transparent 32px),
    rgba(var(--muted-rgb), 0.06);
  box-shadow:
    0 0 0 5px rgba(var(--accent-rgb), 0.025),
    0 0 24px rgba(var(--accent-rgb), 0.12);
  transition:
    background 520ms ease,
    box-shadow 520ms ease,
    border-color 520ms ease;
}

.bot-build-core span i {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 999px;
  background: rgba(var(--text-rgb), 0.78);
  box-shadow:
    0 0 12px rgba(var(--accent-rgb), 0.16),
    0 0 0 5px rgba(var(--accent-rgb), 0.035);
  transition:
    background 520ms ease,
    box-shadow 520ms ease,
    transform 520ms ease;
}

.bot-build-core span::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(var(--accent-rgb), 0.36);
  border-radius: inherit;
  opacity: 0.18;
  animation: botBuildOrbit 12800ms linear infinite;
  transition:
    inset 680ms cubic-bezier(.2, .78, .18, 1),
    opacity 520ms ease;
}

.bot-build-core span::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  background:
    radial-gradient(circle, rgba(var(--accent-rgb), 0.95) 0 4px, transparent 5px) 50% 0 / 100% 100% no-repeat,
    radial-gradient(circle, rgba(var(--accent-warm-rgb), 0.9) 0 3px, transparent 4px) 100% 58% / 100% 100% no-repeat,
    radial-gradient(circle, rgba(var(--accent-warm-rgb), 0.9) 0 3px, transparent 4px) 8% 72% / 100% 100% no-repeat;
  opacity: 0;
  animation: botBuildOrbit 9200ms linear infinite reverse;
  transition:
    inset 760ms cubic-bezier(.2, .78, .18, 1),
    opacity 560ms ease;
}

.bot-build-visual.is-building .bot-build-core span,
.bot-build-visual.is-ready .bot-build-core span,
.bot-build-visual.is-installing .bot-build-core span,
.bot-build-visual.is-installed .bot-build-core span {
  border-color: rgba(var(--accent-rgb), 0.72);
  background:
    radial-gradient(circle, transparent 0 21px, rgba(var(--accent-rgb), 0.26) 22px 32px, transparent 33px),
    rgba(var(--accent-rgb), 0.1);
  box-shadow:
    0 0 0 12px rgba(var(--accent-rgb), 0.045),
    0 0 42px rgba(var(--accent-rgb), 0.24);
}

.bot-build-visual.is-building .bot-build-core span i,
.bot-build-visual.is-ready .bot-build-core span i,
.bot-build-visual.is-installing .bot-build-core span i,
.bot-build-visual.is-installed .bot-build-core span i {
  background: rgba(var(--accent-strong-rgb), 0.96);
  box-shadow:
    0 0 18px rgba(var(--accent-rgb), 0.42),
    0 0 0 7px rgba(var(--accent-rgb), 0.08);
}

.bot-build-visual.is-building .bot-build-core span::before,
.bot-build-visual.is-ready .bot-build-core span::before,
.bot-build-visual.is-installing .bot-build-core span::before,
.bot-build-visual.is-installed .bot-build-core span::before {
  inset: -16px;
  opacity: 1;
}

.bot-build-visual.is-building .bot-build-core span::after,
.bot-build-visual.is-ready .bot-build-core span::after,
.bot-build-visual.is-installing .bot-build-core span::after,
.bot-build-visual.is-installed .bot-build-core span::after {
  inset: -27px;
  opacity: 1;
}

.bot-build-visual.is-building .bot-build-core span i,
.bot-build-visual.is-installing .bot-build-core span i {
  animation:
    botBuildCoreSearch 8600ms cubic-bezier(.42, 0, .2, 1) infinite;
}

.bot-build-visual.is-building .bot-build-core span,
.bot-build-visual.is-installing .bot-build-core span {
  animation: botBuildCorePulse 2600ms ease-in-out infinite;
}

.bot-build-core strong {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  width: 100%;
  overflow: hidden;
  margin-top: 0;
  color: rgba(var(--text-rgb), 0.95);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-build-core::before {
  content: none;
  position: absolute;
  left: 50%;
  bottom: -58px;
  width: 2px;
  height: 70px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.82), rgba(var(--accent-warm-rgb), 0.38), transparent);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.24);
  opacity: 0;
  transform: translateX(-50%) scaleY(0.34);
  transform-origin: top center;
}

.bot-build-core::after {
  content: attr(data-phase);
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  display: block;
  width: 100%;
  overflow: hidden;
  color: rgba(var(--muted-rgb), 0.82);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 700;
}

.bot-build-visual.is-building .bot-build-core::before,
.bot-build-visual.is-installing .bot-build-core::before {
  animation: none;
}

.bot-build-visual.is-forging .bot-build-core span i {
  animation: botBuildCoreForge 1480ms cubic-bezier(.18, .78, .18, 1) both;
}

.bot-build-grid {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: 9px;
  width: 100%;
  min-height: 0;
  max-height: 214px;
  overflow: hidden;
  padding: 28px 4px 4px 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 17%, #000 92%, rgba(0, 0, 0, 0.58));
  mask-image: linear-gradient(to bottom, transparent, #000 17%, #000 92%, rgba(0, 0, 0, 0.58));
}

.bot-build-grid::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  height: 52px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(var(--bg-rgb), 0.88), transparent);
}

.bot-build-grid span {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  min-width: 0;
  width: min(100%, 360px);
  padding: 10px 12px 10px 34px;
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.035);
  color: rgba(var(--text-rgb), 0.88);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.74rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  animation: botBuildCellIn 900ms cubic-bezier(.2, .82, .22, 1) both;
  animation-delay: calc(var(--build-index, 0) * 70ms);
}

.bot-build-grid span::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(var(--accent-warm-rgb), 0.64);
  box-shadow: 0 0 12px rgba(var(--accent-warm-rgb), 0.32);
  transform: translateY(-50%);
}

.bot-build-grid span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.12), rgba(var(--text-rgb), 0.34), rgba(var(--accent-rgb), 0.12), transparent);
  transform: translateX(-120%);
}

.bot-build-visual.is-building .bot-build-grid span::after,
.bot-build-visual.is-installing .bot-build-grid span::after {
  animation: botBuildCellSweep 2600ms ease-in-out infinite;
  animation-delay: calc(var(--build-index, 0) * 120ms);
}

.bot-build-visual.is-forging .bot-build-grid span.is-fresh::after {
  animation: botBuildCommandMaterialize 1480ms cubic-bezier(.18, .78, .18, 1) both;
  animation-delay: 0ms;
}

.bot-build-grid span.is-workflow {
  border-color: rgba(var(--accent-rgb), 0.34);
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.13), rgba(var(--accent-warm-rgb), 0.055)),
    rgba(var(--accent-rgb), 0.055);
  color: rgba(var(--text-rgb), 0.94);
}

.bot-build-grid span.is-workflow::before {
  background: rgba(var(--accent-rgb), 0.88);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.46);
}

.bot-build-grid span.is-fresh {
  border-color: rgba(var(--accent-warm-rgb), 0.42);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.2),
    0 0 24px rgba(var(--accent-rgb), 0.16);
  transform-origin: left center;
  animation: botBuildCommandForge 1480ms cubic-bezier(.18, .78, .18, 1) both;
}

.bot-build-grid span.is-fresh::before {
  animation: botBuildCommandNodeIgnite 900ms cubic-bezier(.16, .82, .2, 1) both;
}

.bot-build-grid span.is-foundation {
  color: rgba(var(--text-rgb), 0.72);
}

.bot-build-visual.is-ready .bot-build-grid span,
.bot-build-visual.is-installed .bot-build-grid span {
  border-color: rgba(var(--accent-rgb), 0.24);
}

.bot-build-visual.is-installed {
  animation: botBuildInstalled 720ms cubic-bezier(.2, .9, .22, 1) both;
}

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

.bot-draft-core {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 22px 50%, rgba(var(--accent-rgb), 0.2), transparent 34px),
    rgba(var(--accent-rgb), 0.06);
  overflow: hidden;
}

.bot-draft-core::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.12), transparent);
  transform: translateX(-100%);
}

.bot-draft-core span {
  position: relative;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(var(--accent-rgb), 0.7);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.12);
  box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.18);
}

.bot-draft-core span::before,
.bot-draft-core span::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(var(--accent-rgb), 0.56);
  border-radius: inherit;
}

.bot-draft-core span::after {
  inset: 12px;
  background: rgba(var(--accent-rgb), 0.9);
}

.bot-draft-core strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-draft-panel.is-complete .bot-draft-core {
  animation: botCoreMaterialize 720ms cubic-bezier(.2, .9, .18, 1) both;
}

.ai-draft-panel.is-complete .bot-draft-core::after {
  animation: botCoreSweep 950ms 120ms cubic-bezier(.2, .78, .22, 1) both;
}

.ai-draft-panel.is-complete .bot-draft-core span {
  animation: botCorePulse 1300ms ease-in-out 2;
}

.bot-draft-stats div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.07);
}

.bot-draft-stats strong {
  color: var(--text);
  font-size: 1.15rem;
}

.bot-draft-stats span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.74rem;
}

.bot-draft-workflows {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.4) transparent;
}

.bot-draft-workflows article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.ai-draft-panel.is-complete .bot-draft-stats div {
  animation: botStatRise 520ms cubic-bezier(.2, .9, .22, 1) both;
  animation-delay: calc(120ms + var(--stat-index, 0) * 50ms);
}

.bot-draft-stats div:nth-child(1) {
  --stat-index: 0;
}

.bot-draft-stats div:nth-child(2) {
  --stat-index: 1;
}

.bot-draft-stats div:nth-child(3) {
  --stat-index: 2;
}

.bot-draft-stats div:nth-child(4) {
  --stat-index: 3;
}

.ai-draft-panel.is-complete .bot-draft-workflows article {
  animation: botWorkflowInstall 580ms cubic-bezier(.2, .82, .22, 1) both;
  animation-delay: calc(220ms + var(--workflow-index, 0) * 55ms);
}

.bot-draft-workflows strong,
.bot-draft-workflows span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-draft-workflows span {
  color: var(--muted);
}

.bot-draft-workflows::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.bot-draft-workflows::-webkit-scrollbar-track {
  background: transparent;
}

.bot-draft-workflows::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.36);
  background-clip: padding-box;
}

@keyframes botDraftPop {
  0% {
    opacity: 0.5;
    transform: translateY(12px) scale(0.985);
  }
  62% {
    opacity: 1;
    transform: translateY(-2px) scale(1.012);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes botDraftSpark {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.65) rotate(-8deg);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-26px) scale(1.08) rotate(8deg);
  }
}

@keyframes botBuildScan {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes botBuildRing {
  0% {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    opacity: 0.76;
  }

  50% {
    transform: translate(-50%, -50%) rotate(180deg) scale(1.035);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg) scale(1);
    opacity: 0.76;
  }
}

@keyframes botBuildRingMobile {
  0% {
    transform: translateX(-50%) rotate(0deg) scale(1);
    opacity: 0.76;
  }

  50% {
    transform: translateX(-50%) rotate(180deg) scale(1.035);
    opacity: 1;
  }

  100% {
    transform: translateX(-50%) rotate(360deg) scale(1);
    opacity: 0.76;
  }
}

@keyframes botBuildOrbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes botBuildCorePulse {
  0%,
  100% {
    box-shadow:
      0 0 0 12px rgba(var(--accent-rgb), 0.045),
      0 0 42px rgba(var(--accent-rgb), 0.24);
  }

  50% {
    box-shadow:
      0 0 0 18px rgba(var(--accent-rgb), 0.065),
      0 0 58px rgba(var(--accent-rgb), 0.34),
      0 0 22px rgba(var(--accent-warm-rgb), 0.18);
  }
}

@keyframes botBuildCoreSearch {
  0%,
  100% {
    transform: translate(0, 0);
  }

  18% {
    transform: translate(-7px, 2px);
  }

  36% {
    transform: translate(8px, -3px);
  }

  58% {
    transform: translate(-4px, -1px);
  }

  78% {
    transform: translate(6px, 3px);
  }
}

@keyframes botBuildCoreForge {
  0% {
    transform: translate(0, 0) scale(1);
  }

  18% {
    transform: translate(92px, 76px) scale(1.04);
  }

  32% {
    transform: translate(128px, 76px) scale(1.08);
  }

  76% {
    transform: translate(306px, 76px) scale(1.02);
  }

  84% {
    transform: translate(320px, 76px) scale(0.96);
  }

  100% {
    transform: translate(0, 0) scale(1);
  }
}

@keyframes botBuildBeam {
  0%,
  100% {
    opacity: 0;
    transform: translateX(-50%) scaleY(0.34);
  }

  38%,
  68% {
    opacity: 1;
    transform: translateX(-50%) scaleY(1);
  }
}

@keyframes botBuildBeamMobile {
  0%,
  100% {
    opacity: 0;
    transform: translateX(-50%) scaleY(0.42);
  }

  38%,
  68% {
    opacity: 1;
    transform: translateX(-50%) scaleY(1);
  }
}

@keyframes botBuildCellIn {
  0% {
    opacity: 0;
    transform: translateY(16px) translateX(-8px) scale(0.92);
  }

  70% {
    opacity: 1;
    transform: translateY(-2px) translateX(1px) scale(1.015);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes botBuildCommandForge {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transform: translateY(8px) scale(0.985);
    filter: blur(7px);
  }

  30% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transform: translateY(8px) scale(0.985);
    filter: blur(3px);
  }

  52% {
    opacity: 0.76;
    clip-path: inset(0 48% 0 0);
    transform: translateY(2px) scale(1);
    filter: blur(1px);
  }

  78% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateY(0) scale(1.012);
    filter: blur(0);
  }

  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes botBuildCommandMaterialize {
  0%,
  28% {
    opacity: 0;
    transform: translateX(-112%);
  }

  36% {
    opacity: 1;
    transform: translateX(-8%);
  }

  74% {
    opacity: 0.9;
    transform: translateX(82%);
  }

  100% {
    opacity: 0;
    transform: translateX(118%);
  }
}

@keyframes botBuildCommandNodeIgnite {
  0% {
    opacity: 0;
    transform: translateY(-50%) scale(0.35);
    box-shadow: 0 0 0 rgba(var(--accent-warm-rgb), 0);
  }

  36% {
    opacity: 0;
    transform: translateY(-50%) scale(0.35);
  }

  62% {
    opacity: 1;
    transform: translateY(-50%) scale(1.45);
    box-shadow:
      0 0 0 5px rgba(var(--accent-warm-rgb), 0.14),
      0 0 20px rgba(var(--accent-rgb), 0.52);
  }

  100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

@keyframes botBuildCellSweep {
  0% {
    transform: translateX(-120%);
    opacity: 0;
  }

  35% {
    opacity: 1;
  }

  100% {
    transform: translateX(120%);
    opacity: 0;
  }
}

@keyframes botBuildInstalled {
  0% {
    box-shadow: 0 0 0 rgba(var(--accent-rgb), 0);
  }

  45% {
    box-shadow:
      0 0 0 2px rgba(var(--accent-rgb), 0.18),
      0 0 52px rgba(var(--accent-rgb), 0.28),
      0 0 18px rgba(var(--accent-warm-rgb), 0.18);
  }

  100% {
    box-shadow: 0 0 0 rgba(var(--accent-rgb), 0);
  }
}

@keyframes botCoreMaterialize {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes botCoreSweep {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes botCorePulse {
  0%,
  100% {
    box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.18);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 34px rgba(var(--accent-rgb), 0.34);
    transform: scale(1.06);
  }
}

@keyframes botStatRise {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes botWorkflowInstall {
  0% {
    opacity: 0;
    transform: translateX(-12px);
    border-color: rgba(var(--accent-rgb), 0.36);
  }

  68% {
    opacity: 1;
    transform: translateX(2px);
    border-color: rgba(var(--accent-rgb), 0.42);
    background: rgba(var(--accent-rgb), 0.075);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.preview-editor,
.embed-fields-editor,
.embed-fields-list,
.embed-field-item {
  display: grid;
  gap: 12px;
}

.preview-editor {
  grid-template-columns: minmax(320px, 0.88fr) minmax(420px, 1.12fr);
  align-items: start;
  min-height: 100%;
}

.preview-control-panel,
.preview-output-panel,
.preview-control-grid {
  display: grid;
  gap: 12px;
}

.preview-control-panel {
  align-content: start;
  min-height: 0;
  max-height: calc(min(760px, calc(100vh - 48px)) - 104px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.54);
}

.preview-output-panel {
  align-content: start;
  min-height: 420px;
  max-height: calc(min(760px, calc(100vh - 48px)) - 104px);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(49, 51, 56, 0.92);
}

.preview-drawer-body,
.preview-control-panel,
.preview-output-panel,
.ai-generate-modal {
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.4) transparent;
}

.preview-drawer-body::-webkit-scrollbar,
.preview-control-panel::-webkit-scrollbar,
.preview-output-panel::-webkit-scrollbar,
.ai-generate-modal::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.preview-drawer-body::-webkit-scrollbar-track,
.preview-control-panel::-webkit-scrollbar-track,
.preview-output-panel::-webkit-scrollbar-track,
.ai-generate-modal::-webkit-scrollbar-track {
  background: transparent;
}

.preview-drawer-body::-webkit-scrollbar-thumb,
.preview-control-panel::-webkit-scrollbar-thumb,
.preview-output-panel::-webkit-scrollbar-thumb,
.ai-generate-modal::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.36);
  background-clip: padding-box;
}

.preview-control-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.preview-control-grid label:last-child {
  grid-column: 1 / -1;
}

.preview-editor input,
.preview-editor textarea {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02)),
    var(--bg-soft);
}

.color-field {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02)),
    var(--bg-soft);
}

.color-field span {
  justify-self: start;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.color-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.color-field input[type="color"] {
  width: 44px;
  min-height: 42px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  cursor: pointer;
}

.discord-message-preview,
.discord-form-preview,
.discord-embed-preview {
  position: relative;
  padding: 14px;
  border: 1px solid rgba(var(--muted-rgb), 0.18);
  border-radius: 8px;
  background: #313338;
  color: #f2f3f5;
  width: min(100%, 560px);
}

.discord-message-preview {
  min-height: 52px;
  white-space: pre-wrap;
}

.discord-message-preview::before {
  content: attr(data-context);
  display: block;
  margin-bottom: 8px;
  color: #949ba4;
  font-size: 0.78rem;
  font-weight: 700;
}

.discord-embed-preview {
  display: grid;
  gap: 8px;
  border-left: 4px solid #2563eb;
  background: #2b2d31;
}

.discord-embed-author,
.discord-embed-footer {
  color: #dbdee1;
  font-size: 0.78rem;
}

.discord-embed-title {
  color: #f2f3f5;
  font-weight: 700;
}

.discord-embed-title a {
  color: #00a8fc;
}

.discord-message-preview a,
.discord-embed-description a,
.discord-embed-field a,
.discord-form-preview a {
  color: #00a8fc;
  text-decoration: none;
}

.discord-heading {
  margin: 2px 0;
  color: #f2f3f5;
  font-weight: 800;
  line-height: 1.2;
}

.discord-heading-1 {
  font-size: 1.38rem;
}

.discord-heading-2 {
  font-size: 1.16rem;
}

.discord-heading-3 {
  font-size: 1rem;
}

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

.discord-list {
  margin: 4px 0 4px 18px;
  padding: 0;
}

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

.discord-code-block,
.discord-inline-code {
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 4px;
  background: #1e1f22;
  color: #dbdee1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.discord-code-block {
  display: block;
  margin: 6px 0;
  padding: 10px;
  overflow-x: auto;
  white-space: pre;
}

.discord-inline-code {
  padding: 1px 4px;
  font-size: 0.92em;
}

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

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

.discord-preview-stack {
  display: grid;
  gap: 10px;
}

.discord-preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.discord-preview-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(var(--muted-rgb), 0.18);
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.14);
  color: #dbdee1;
  font-size: 0.75rem;
  font-weight: 800;
}

.discord-embed-description,
.discord-embed-field span,
.discord-form-preview p {
  color: #dbdee1;
  white-space: pre-wrap;
}

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

.discord-embed-field {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.discord-embed-field.is-inline {
  grid-column: span 1;
}

.discord-embed-field strong {
  color: #f2f3f5;
  font-size: 0.85rem;
}

.discord-embed-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 6px;
}

.discord-embed-thumb {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 6px;
}

.discord-embed-footer {
  display: flex;
  align-items: center;
  gap: 6px;
}

.discord-embed-footer img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.embed-field-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

.discord-form-field,
.discord-select-option,
.discord-select-preview {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.2);
  border-radius: 6px;
  background: #1e1f22;
}

.discord-form-field em {
  color: #949ba4;
  font-style: normal;
}

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

.discord-button-preview {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 4px;
  background: #4e5058;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

.discord-button-preview.is-primary {
  background: #5865f2;
}

.discord-button-preview.is-success {
  background: #248046;
}

.discord-button-preview.is-danger {
  background: #da373c;
}

@media (max-width: 860px) {
  .preview-drawer {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    height: min(52dvh, 440px);
    max-height: calc(100dvh - 16px);
    padding: 10px;
    transform: translateY(12px) scale(0.98);
  }

  .preview-drawer.is-open {
    transform: translateY(0) scale(1);
  }

  .ai-generate-modal {
    width: calc(100vw - 24px);
    height: min(88dvh, 640px);
    padding: 14px;
  }

  .preview-editor,
  .ai-generate-body {
    grid-template-columns: 1fr;
  }

  .preview-drawer-head {
    gap: 10px;
    padding-bottom: 10px;
  }

  .preview-drawer-head h3 {
    font-size: 0.95rem;
  }

  .preview-drawer-body {
    overflow: auto;
    padding-top: 10px;
  }

  .preview-output-panel,
  .ai-generate-stream {
    min-height: 190px;
    padding: 14px;
  }

  .preview-control-grid {
    grid-template-columns: 1fr;
  }
}

@media (orientation: landscape) and (max-height: 560px) and (max-width: 1000px) {
  .preview-drawer {
    height: min(58dvh, 260px);
  }
}

.flow-settings {
  padding: 14px;
  background: rgba(0, 0, 0, 0.08);
}

.flow-start {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 14px;
  border-color: rgba(var(--muted-rgb), 0.42);
}

.flow-start span,
.flow-kind {
  color: var(--accent-warm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 850;
}

.flow-block-stack {
  display: grid;
  gap: 14px;
}

.flow-block {
  display: grid;
  gap: 14px;
  padding: 14px;
  position: relative;
}

.flow-block::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 50%;
  width: 2px;
  height: 14px;
  background: var(--line);
}

.flow-block h3 {
  margin: 4px 0 0;
}

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

.editor-check {
  margin-top: 0;
}

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

.palette-button {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.palette-button span {
  color: var(--muted);
  text-transform: capitalize;
}

.sidebar-toolbox .palette-button span {
  color: var(--muted);
  text-transform: none;
}

.flow-json-preview {
  min-width: 0;
  padding: 12px;
}

.structure-preview {
  max-height: 300px;
  overflow: auto;
  margin: 10px 0 0;
  user-select: none;
  -webkit-user-select: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.4) transparent;
}

.structure-preview-draft {
  max-height: 220px;
  margin-top: 0;
  padding-right: 4px;
}

.structure-node-list {
  display: grid;
  gap: 8px;
}

.structure-node {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.structure-node-index {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  font-weight: 850;
}

.structure-node div {
  display: grid;
  min-width: 0;
}

.structure-node strong,
.structure-node small,
.structure-node em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.structure-node small,
.structure-node em,
.structure-empty {
  color: var(--muted);
  font-style: normal;
}

.structure-node em {
  max-width: 92px;
  font-size: 0.76rem;
}

.structure-empty {
  padding: 10px 0;
}

.structure-preview::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.structure-preview::-webkit-scrollbar-track {
  background: transparent;
}

.structure-preview::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.36);
  background-clip: padding-box;
}

.flow-json-preview pre {
  max-height: 180px;
  overflow: auto;
  margin: 10px 0 0;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
  outline: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.4) transparent;
}

.flow-json-preview pre:focus {
  color: var(--text);
}

.flow-json-preview pre.is-invalid {
  color: #ffb4b4;
}

.empty-state {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.flash-stack {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.flash {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.flash-success {
  border-color: rgba(var(--accent-rgb), 0.45);
}

.flash-error {
  border-color: rgba(255, 126, 126, 0.5);
}

.footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "copy contact"
    "links contact";
  gap: 7px 18px;
  align-items: start;
  padding: 42px 24px 54px;
  color: var(--muted);
}

.footer-copy,
.footer-secondary {
  display: grid;
  gap: 7px;
}

.footer-copy {
  grid-area: copy;
  justify-items: start;
}

.footer-policy-links {
  grid-area: links;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 4px;
}

.footer strong,
.footer a {
  color: var(--text);
}

.footer-secondary {
  grid-area: contact;
  justify-items: end;
  text-align: right;
  align-self: end;
}

.footer-contact-link {
  color: var(--accent) !important;
}

.footer-contact-link:hover,
.footer-contact-link:focus-visible {
  color: var(--accent-strong) !important;
}

@media (max-width: 980px) {
  .capability-grid,
  .pricing-grid,
  .bot-manage-grid,
  .create-grid,
  .orders-grid,
  .checkout-grid,
  .payment-grid,
  .service-grid,
  .marketplace-grid,
  .recipe-grid,
  .landing-strip,
  .landing-feature-grid,
  .landing-marketplace-band,
  .landing-faq-grid,
  .custom-flow-grid,
  .filter-bar,
  .marketplace-hero,
  .marketplace-browse-head,
  .marketplace-filter-bar,
  .marketplace-history-grid,
  .marketplace-preview-body,
  .guide-course-hero,
  .guide-course-grid,
  .guide-player-shell,
  .guide-dashboard-tour-shell,
  .guide-flow-layout,
  .bot-ops-grid,
  .profile-plan-strip,
  .profile-settings-section,
  .editor-shell,
  .editor-grid,
  .flowchart-workbench {
    grid-template-columns: 1fr;
  }

  .credit-add-form {
    grid-template-columns: 1fr;
  }

  .bot-ai-body {
    grid-template-columns: 1fr;
  }

  .bot-ai-modal {
    height: min(820px, calc(100vh - 32px));
  }

  .bot-ai-modal.has-log-panel {
    width: min(1040px, calc(100vw - 32px));
  }

  .bot-ai-body.has-log-panel {
    grid-template-columns: 1fr;
  }

  .bot-build-log-panel {
    height: auto;
    max-height: 220px;
  }

  .marketplace-hero-actions {
    justify-content: start;
  }

  .editor-sidebar {
    position: static;
    height: auto;
    max-height: none;
  }

  .guide-course-progress-card {
    min-height: 220px;
  }

  .guide-player-shell {
    align-items: start;
  }

  .guide-dashboard-tour-rail,
  .guide-dashboard-live {
    position: static;
  }

  .guide-dashboard-tour-shell {
    align-items: stretch;
  }

  .guide-lesson-rail {
    position: static;
  }

  .guide-editor-panel {
    height: auto;
    min-height: 0;
  }

  .guide-practice-workbench {
    grid-template-columns: 1fr;
    height: auto;
  }

  .guide-block-palette,
  .guide-node-inspector {
    max-height: none;
  }

  .guide-block-palette {
    grid-template-rows: auto auto auto;
    overflow: visible;
  }

  .guide-palette-list {
    max-height: 320px;
  }

  .guide-lesson-rail {
    max-height: none;
  }

  .guide-canvas-wrap {
    height: 560px;
  }
}

@media (max-width: 560px) {
  .dashboard-bot-launcher-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-add-bot-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 12px;
  }

  .dashboard-add-bot-form {
    padding: 12px;
  }

  .dashboard-add-bot-progress {
    gap: 6px;
  }

  .dashboard-add-bot-progress span {
    min-height: 30px;
    padding: 0 6px;
    font-size: 0.72rem;
  }

  .dashboard-inline-guide-head {
    display: grid;
  }

  .dashboard-add-bot-actions {
    flex-direction: column-reverse;
  }
}

@media (max-width: 860px) {
  main {
    padding-inline: 12px;
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 58px;
    padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  }

  .brand {
    gap: 8px;
    font-size: 0.95rem;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .nav-toggle {
    display: block;
    width: 38px;
    height: 38px;
  }

  .site-nav {
    position: absolute;
    top: 60px;
    left: 12px;
    right: 12px;
    display: none;
    align-items: stretch;
    max-height: calc(100dvh - 76px - env(safe-area-inset-top));
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(var(--bg-rgb), 0.96);
  }

  .topbar.is-open .site-nav {
    display: grid;
  }

  .site-nav form,
  .nav-button {
    width: 100%;
  }

  body.is-native-shell {
    overscroll-behavior-y: none;
  }

  body.is-native-shell .footer {
    display: none;
  }

  h1 {
    max-width: none;
    margin-bottom: 12px;
    font-size: clamp(1.8rem, 8vw, 2.6rem);
    line-height: 1;
  }

  h2 {
    margin-bottom: 10px;
    font-size: 1.35rem;
  }

  h3 {
    font-size: 1.05rem;
  }

  p {
    line-height: 1.5;
  }

  .section,
  .auth-shell {
    padding-top: 26px;
  }

  .section-heading {
    margin-bottom: 16px;
  }

  .trial-feedback-callout {
    grid-template-columns: 1fr;
  }

  .trial-feedback-actions {
    justify-content: stretch;
  }

  .trial-feedback-actions .button {
    width: 100%;
  }

  .button {
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.88rem;
  }

  input,
  select,
  textarea,
  .toggle-label {
    min-height: 40px;
  }

  input,
  select,
  textarea {
    padding-inline: 11px;
  }

  label {
    gap: 6px;
    font-size: 0.9rem;
  }

  .eyebrow,
  .panel-header span,
  .status-grid span,
  .command-card span,
  .plan-label {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }

  .ops-panel,
  .auth-card,
  .dashboard-create,
  .bot-card,
  .empty-state,
  .checkout-panel,
  .order-card,
  .service-panel,
  .recipe-card,
  .command-manage-card,
  .plan-card,
  .capability-card {
    padding: 14px;
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.24);
  }

  .marketplace-card:not(.marketplace-product-card) {
    padding: 14px;
  }

  .service-panel,
  .dashboard-create,
  .bot-card,
  .command-manage-card,
  .profile-settings,
  .marketplace-browse,
  .activity-list {
    gap: 12px;
  }

  .dashboard-title-row,
  .bot-card-head,
  .create-form-head,
  .marketplace-history-head,
  .marketplace-function-head {
    gap: 10px;
  }

  .dashboard-summary {
    gap: 10px;
    margin-bottom: 12px;
  }

  .dashboard-summary div,
  .status-grid div,
  .marketplace-preview-meta div,
  .bot-data-panel,
  .runtime-notice,
  .activity-item {
    padding: 11px;
  }

  .dashboard-summary strong,
  .metric-strip strong {
    margin-bottom: 4px;
    font-size: 1.32rem;
  }

  .filter-bar,
  .marketplace-filter-bar,
  .owner-bulk-credit-form {
    gap: 10px;
    padding: 10px;
  }

  .activity-item,
  .owner-activity-item {
    grid-template-columns: 1fr;
  }

  .status-pill {
    min-height: 28px;
    padding-inline: 9px;
    font-size: 0.78rem;
  }

  .marketplace-hero {
    gap: 14px;
    margin-bottom: 14px;
    padding: 14px;
  }

  .marketplace-hero-copy {
    gap: 12px;
  }

  .marketplace-credit-chip {
    gap: 8px;
    padding: 7px 10px;
  }

  .marketplace-product-card {
    min-height: 0;
  }

  .marketplace-product-art,
  .marketplace-product-image {
    min-height: 124px;
    height: 124px;
  }

  .marketplace-workflow-art {
    gap: 10px;
    padding: 12px;
  }

  .workflow-art-summary {
    min-height: 0;
    gap: 6px;
  }

  .workflow-art-summary span {
    min-height: 28px;
    padding: 5px 7px;
  }

  .marketplace-product-body {
    gap: 8px;
    padding: 12px 12px 6px;
  }

  .marketplace-product-body p {
    min-height: 0;
    -webkit-line-clamp: 2;
  }

  .marketplace-product-actions {
    display: grid;
    gap: 10px;
    padding: 10px 12px 12px;
  }

  .marketplace-card-actions {
    justify-content: stretch;
  }

  .marketplace-submit-modal,
  .marketplace-preview-modal,
  .marketplace-flow-preview-modal,
  .owner-detail-modal {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    max-height: min(84dvh, 640px);
    padding: 12px;
    transform: translateY(12px) scale(0.98);
  }

  .marketplace-flow-preview-modal {
    height: min(76dvh, 580px);
  }

  .marketplace-submit-modal.is-open,
  .marketplace-preview-modal.is-open,
  .marketplace-flow-preview-modal.is-open {
    transform: translateY(0) scale(1);
  }

  .marketplace-preview-body,
  .marketplace-submit-body,
  .owner-detail-body {
    gap: 12px;
    padding-top: 10px;
  }

  .marketplace-preview-media img,
  .marketplace-preview-media .marketplace-product-art {
    min-height: 180px;
    max-height: 220px;
  }

  .bot-ai-modal {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    height: min(84dvh, 640px);
    transform: translateY(12px) scale(0.98);
  }

  .ai-generate-modal {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    height: min(84dvh, 640px);
    transform: translateY(12px) scale(0.98);
  }

  .ai-generate-modal.is-open {
    transform: translateY(0) scale(1);
  }

  .ai-quota-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 48px;
  }

  .landing-hero {
    min-height: 530px;
    padding-top: 0;
  }

  .landing-hero-scene {
    padding: 24px 10px;
    place-items: start center;
  }

  .landing-product-shell {
    width: 900px;
    min-height: 500px;
    transform: scale(0.72) translateY(-56px);
    transform-origin: top center;
  }

  .landing-ambient-window {
    width: 900px;
    min-height: 500px;
    transform: scale(0.7) translateY(-52px);
    transform-origin: top center;
  }

  .landing-ambient-layout {
    grid-template-columns: 70px minmax(0, 1fr) 240px;
  }

  .landing-proof-grid {
    grid-template-columns: 245px minmax(0, 1fr) 230px;
  }

  .landing-hero-content {
    width: min(280px, calc(100% - 34px));
    padding: 30px 0;
  }

  .landing-hero-content h1 {
    max-width: 100%;
    margin-bottom: 12px;
    font-size: clamp(2.08rem, 9vw, 2.58rem);
    line-height: 1;
  }

  .landing-hero-content h2 {
    max-width: 100%;
    margin-bottom: 14px;
    font-size: clamp(0.98rem, 4.6vw, 1.22rem);
    line-height: 1.14;
  }

  .landing-hero-content .hero-lede {
    max-width: 100%;
    font-size: 0.9rem;
    line-height: 1.42;
  }

  .landing-hero-content .hero-actions {
    margin-top: 20px;
  }

  .landing-trust-row {
    display: none;
  }

  .landing-strip {
    gap: 10px;
  }

  .landing-strip div {
    padding: 14px;
  }

  .landing-strip span {
    display: none;
  }

  .landing-template-stack article {
    transform: none;
  }

  .metric-strip,
  .dashboard-summary,
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-flow-layout,
  .verify-flow-layout {
    grid-template-columns: 1fr;
  }

  .auth-flow-intro {
    margin-bottom: 14px;
  }

  .auth-side-panel,
  .auth-flow-card {
    padding: 14px;
  }

  .auth-step-list {
    gap: 8px;
  }

  .auth-step-list li {
    min-height: 0;
    padding: 9px;
  }

  .otp-input {
    min-height: 54px;
    letter-spacing: 0.18em;
  }

  .dashboard-title-row,
  .bot-card-head {
    display: grid;
  }

  .guide-editor-toolbar,
  .guide-progress-row,
  .guide-course-card-head,
  .guide-course-meta {
    display: grid;
    justify-content: stretch;
  }

  .guide-toolbar-actions,
  .guide-player-actions,
  .guide-course-actions {
    align-items: stretch;
  }

  .guide-toolbar-actions .button,
  .guide-player-actions .button,
  .guide-course-actions .button {
    width: 100%;
  }

  .guide-dashboard-top,
  .guide-dashboard-progress,
  .guide-dashboard-ai-body {
    grid-template-columns: 1fr;
  }

  .guide-dashboard-mock,
  .guide-dashboard-tour-rail,
  .guide-dashboard-live {
    padding: 12px;
  }

  .guide-editor-panel {
    height: auto;
    min-height: 0;
    padding: 12px;
  }

  .guide-canvas-wrap {
    height: 520px;
  }
}

@media (max-width: 760px), (orientation: landscape) and (max-height: 560px) and (max-width: 1000px) {
  main {
    padding-inline: 10px;
  }

  .editor-shell {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding-top: 4px;
  }

  .editor-main {
    order: 1;
    padding: 12px;
    box-shadow: none;
  }

  .editor-sidebar {
    order: 2;
    position: static;
    grid-template-rows: auto auto auto auto auto;
    gap: 12px;
    max-height: none;
    padding: 12px;
    overflow: visible;
  }

  .editor-sidebar h1 {
    font-size: 1.55rem;
  }

  .editor-sidebar > p,
  .editor-sidebar h1 + p {
    font-size: 0.9rem;
  }

  .editor-toolbar {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
  }

  .editor-title-stack {
    gap: 6px;
  }

  .editor-toolbar h2 {
    font-size: 1.25rem;
  }

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

  .editor-actions .button,
  .editor-actions .toggle-label {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .editor-actions [data-save-graph-button] {
    display: none;
  }

  .mobile-command-save-row {
    display: grid;
  }

  .mobile-command-save-row .button {
    width: 100%;
  }

  .editor-mobile-dock {
    position: sticky;
    top: 76px;
    z-index: 42;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 0 0 12px;
    padding: 4px;
    border: 1px solid rgba(var(--muted-rgb), 0.18);
    border-radius: 8px;
    background: rgba(var(--bg-rgb), 0.94);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
  }

  .editor-mobile-dock button {
    min-width: 0;
    min-height: 38px;
    padding: 0 6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
  }

  .editor-mobile-dock button.is-active {
    background: rgba(var(--accent-rgb), 0.13);
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.22);
  }

  .flow-settings {
    padding: 12px;
  }

  .flow-settings .form-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .flowchart-workbench,
  .flowchart-workbench.is-ai-preview {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px;
    height: auto;
    min-height: 0;
  }

  .flowchart-canvas-wrap,
  .editor-main.is-fullscreen .flowchart-canvas-wrap,
  .editor-main:fullscreen .flowchart-canvas-wrap,
  body.editor-fullscreen .editor-main .flowchart-canvas-wrap {
    height: min(68dvh, 620px);
    min-height: 430px;
  }

  .flowchart-canvas-wrap {
    cursor: default;
  }

  .editor-node-search {
    top: 58px;
    left: 10px;
    width: calc(100% - 20px);
  }

  .canvas-node-preview {
    width: min(330px, calc(100% - 20px));
    max-height: min(42dvh, 320px);
  }

  .canvas-node-preview-head {
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
  }

  .canvas-node-preview-head .eyebrow {
    display: none;
  }

  .canvas-node-preview-head strong {
    margin: 0;
    font-size: 0.86rem;
  }

  .canvas-node-preview-head .button {
    min-height: 30px;
    padding: 0 8px;
    font-size: 0.76rem;
  }

  .canvas-node-preview-body {
    padding: 8px;
  }

  .node-inspector,
  .editor-main.is-fullscreen .node-inspector,
  .editor-main:fullscreen .node-inspector,
  body.editor-fullscreen .editor-main .node-inspector {
    height: auto;
    max-height: 70dvh;
    padding: 12px;
  }

  .flow-json-preview {
    display: none;
  }

  .sidebar-panel {
    max-height: 66dvh;
  }

  .flow-list,
  .toolbox-categories {
    max-height: 54dvh;
  }

  .toolbox-blocks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-toolbox .palette-button {
    min-height: 46px;
    padding: 10px;
    text-align: left;
  }

  .editor-main.is-fullscreen,
  .editor-main:fullscreen,
  body.editor-fullscreen .editor-main {
    inset: 0;
    padding: 10px;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    overflow: auto;
  }

  .editor-main.is-fullscreen .editor-sidebar,
  .editor-main:fullscreen .editor-sidebar,
  body.editor-fullscreen .editor-main .editor-sidebar {
    position: static;
    width: auto;
    height: auto;
    max-height: none;
  }

  .editor-main.is-fullscreen,
  .editor-main:fullscreen,
  body.editor-fullscreen .editor-main {
    --editor-fullscreen-dock-top: calc(8px + env(safe-area-inset-top));
    --editor-fullscreen-dock-height: 48px;
    --editor-fullscreen-panel-top: calc(var(--editor-fullscreen-dock-top) + var(--editor-fullscreen-dock-height) + 8px);
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    width: 100vw;
    height: var(--editor-viewport-height, 100dvh);
    max-width: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    grid-template-rows: none;
    gap: 0;
    overflow: hidden;
  }

  body.editor-fullscreen {
    overflow: hidden;
  }

  body.editor-fullscreen > .topbar,
  body.editor-fullscreen > .footer {
    display: none;
  }

  body.editor-fullscreen main {
    padding: 0;
  }

  .editor-main.is-fullscreen .editor-toolbar,
  .editor-main:fullscreen .editor-toolbar,
  body.editor-fullscreen .editor-main .editor-toolbar {
    display: none;
  }

  .editor-main.is-fullscreen .editor-mobile-dock,
  .editor-main:fullscreen .editor-mobile-dock,
  body.editor-fullscreen .editor-main .editor-mobile-dock {
    display: none;
  }

  .editor-main.is-fullscreen .editor-fullscreen-dock,
  .editor-main:fullscreen .editor-fullscreen-dock,
  body.editor-fullscreen .editor-main .editor-fullscreen-dock {
    display: grid;
    position: absolute;
    top: var(--editor-fullscreen-dock-top);
    right: 8px;
    left: 8px;
    z-index: 45;
    grid-template-columns: repeat(4, minmax(0, 1fr)) 38px;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(var(--muted-rgb), 0.18);
    border-radius: 8px;
    background: rgba(var(--bg-rgb), 0.94);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
  }

  .editor-main.is-fullscreen.is-dock-collapsed .editor-fullscreen-dock,
  .editor-main:fullscreen.is-dock-collapsed .editor-fullscreen-dock,
  body.editor-fullscreen .editor-main.is-dock-collapsed .editor-fullscreen-dock {
    right: 8px;
    left: auto;
    width: 46px;
    grid-template-columns: 38px;
    padding: 4px;
    border-radius: 999px;
  }

  .editor-main.is-fullscreen.is-dock-collapsed .editor-fullscreen-dock button:not(.editor-fullscreen-dock-toggle),
  .editor-main:fullscreen.is-dock-collapsed .editor-fullscreen-dock button:not(.editor-fullscreen-dock-toggle),
  body.editor-fullscreen .editor-main.is-dock-collapsed .editor-fullscreen-dock button:not(.editor-fullscreen-dock-toggle) {
    display: none;
  }

  .editor-fullscreen-dock button {
    min-width: 0;
    min-height: 38px;
    padding: 0 6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }

  .editor-fullscreen-dock .editor-fullscreen-dock-toggle {
    font-size: 1rem;
    line-height: 1;
  }

  .editor-main.is-fullscreen.is-dock-collapsed .editor-fullscreen-dock-toggle,
  .editor-main:fullscreen.is-dock-collapsed .editor-fullscreen-dock-toggle,
  body.editor-fullscreen .editor-main.is-dock-collapsed .editor-fullscreen-dock-toggle {
    justify-self: center;
    min-height: 38px;
    width: 38px;
    padding: 0;
  }

  .editor-fullscreen-dock button.is-active {
    background: rgba(var(--accent-rgb), 0.13);
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.22);
  }

  .editor-main.is-fullscreen .flowchart-workbench,
  .editor-main:fullscreen .flowchart-workbench,
  body.editor-fullscreen .editor-main .flowchart-workbench,
  .editor-main.is-fullscreen .flowchart-workbench.is-ai-preview,
  .editor-main:fullscreen .flowchart-workbench.is-ai-preview,
  body.editor-fullscreen .editor-main .flowchart-workbench.is-ai-preview {
    position: absolute;
    inset: 0;
    display: block;
    width: auto;
    height: auto;
    min-height: 0;
    overflow: hidden;
  }

  .editor-main.is-fullscreen .flowchart-canvas-wrap,
  .editor-main:fullscreen .flowchart-canvas-wrap,
  body.editor-fullscreen .editor-main .flowchart-canvas-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .editor-main.is-fullscreen .editor-sidebar,
  .editor-main:fullscreen .editor-sidebar,
  body.editor-fullscreen .editor-main .editor-sidebar,
  .editor-main.is-fullscreen .node-inspector,
  .editor-main:fullscreen .node-inspector,
  body.editor-fullscreen .editor-main .node-inspector {
    position: absolute;
    top: var(--editor-fullscreen-panel-top);
    bottom: 8px;
    left: 8px;
    z-index: 34;
    display: none;
    width: min(82vw, 360px);
    height: auto;
    max-height: none;
    overflow: hidden;
    padding: 10px;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
      var(--bg-soft);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
  }

  .editor-main.is-fullscreen .editor-sidebar,
  .editor-main:fullscreen .editor-sidebar,
  body.editor-fullscreen .editor-main .editor-sidebar {
    width: min(70vw, 300px);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    padding: 8px;
  }

  .editor-main.is-fullscreen.is-dock-collapsed .editor-sidebar,
  .editor-main:fullscreen.is-dock-collapsed .editor-sidebar,
  body.editor-fullscreen .editor-main.is-dock-collapsed .editor-sidebar,
  .editor-main.is-fullscreen.is-dock-collapsed .node-inspector,
  .editor-main:fullscreen.is-dock-collapsed .node-inspector,
  body.editor-fullscreen .editor-main.is-dock-collapsed .node-inspector {
    top: var(--editor-fullscreen-dock-top);
  }

  .editor-main.is-fullscreen .editor-sidebar > .button,
  .editor-main:fullscreen .editor-sidebar > .button,
  body.editor-fullscreen .editor-main .editor-sidebar > .button,
  .editor-main.is-fullscreen .editor-sidebar > div:first-of-type,
  .editor-main:fullscreen .editor-sidebar > div:first-of-type,
  body.editor-fullscreen .editor-main .editor-sidebar > div:first-of-type,
  .editor-main.is-fullscreen .sidebar-tabs,
  .editor-main:fullscreen .sidebar-tabs,
  body.editor-fullscreen .editor-main .sidebar-tabs,
  .editor-main.is-fullscreen .editor-sidebar .palette-search,
  .editor-main:fullscreen .editor-sidebar .palette-search,
  body.editor-fullscreen .editor-main .editor-sidebar .palette-search {
    display: none;
  }

  .editor-main.is-fullscreen .sidebar-panel,
  .editor-main:fullscreen .sidebar-panel,
  body.editor-fullscreen .editor-main .sidebar-panel,
  .editor-main.is-fullscreen .sidebar-toolbox,
  .editor-main:fullscreen .sidebar-toolbox,
  body.editor-fullscreen .editor-main .sidebar-toolbox {
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
  }

  .editor-main.is-fullscreen .toolbox-categories,
  .editor-main:fullscreen .toolbox-categories,
  body.editor-fullscreen .editor-main .toolbox-categories {
    gap: 6px;
  }

  .editor-main.is-fullscreen .toolbox-category,
  .editor-main:fullscreen .toolbox-category,
  body.editor-fullscreen .editor-main .toolbox-category {
    gap: 6px;
  }

  .editor-main.is-fullscreen .toolbox-category summary,
  .editor-main:fullscreen .toolbox-category summary,
  body.editor-fullscreen .editor-main .toolbox-category summary {
    min-height: 30px;
    padding: 0 8px;
    font-size: 0.66rem;
    letter-spacing: 0.04em;
  }

  .editor-main.is-fullscreen .toolbox-category summary::before,
  .editor-main:fullscreen .toolbox-category summary::before,
  body.editor-fullscreen .editor-main .toolbox-category summary::before {
    width: 16px;
    height: 16px;
    border-radius: 5px;
  }

  .editor-main.is-fullscreen .toolbox-category summary span,
  .editor-main:fullscreen .toolbox-category summary span,
  body.editor-fullscreen .editor-main .toolbox-category summary span {
    font-size: 0.66rem;
  }

  .editor-main.is-fullscreen .toolbox-blocks,
  .editor-main:fullscreen .toolbox-blocks,
  body.editor-fullscreen .editor-main .toolbox-blocks {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 0 6px 6px;
  }

  .editor-main.is-fullscreen .sidebar-toolbox .palette-button,
  .editor-main:fullscreen .sidebar-toolbox .palette-button,
  body.editor-fullscreen .editor-main .sidebar-toolbox .palette-button {
    min-height: 32px;
    padding: 6px 8px;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }

  .editor-main.is-fullscreen .sidebar-toolbox .palette-button strong,
  .editor-main:fullscreen .sidebar-toolbox .palette-button strong,
  body.editor-fullscreen .editor-main .sidebar-toolbox .palette-button strong {
    font-size: 0.72rem;
    line-height: 1.15;
  }

  .editor-main.is-fullscreen .flow-list,
  .editor-main:fullscreen .flow-list,
  body.editor-fullscreen .editor-main .flow-list {
    gap: 6px;
  }

  .editor-main.is-fullscreen .flow-list-item,
  .editor-main:fullscreen .flow-list-item,
  body.editor-fullscreen .editor-main .flow-list-item {
    gap: 3px;
    padding: 8px;
  }

  .editor-main.is-fullscreen .flow-list-item strong,
  .editor-main:fullscreen .flow-list-item strong,
  body.editor-fullscreen .editor-main .flow-list-item strong {
    font-size: 0.78rem;
  }

  .editor-main.is-fullscreen .flow-list-item span,
  .editor-main:fullscreen .flow-list-item span,
  body.editor-fullscreen .editor-main .flow-list-item span {
    font-size: 0.68rem;
  }

  .editor-main.is-fullscreen[data-fullscreen-panel="blocks"] .editor-sidebar,
  .editor-main.is-fullscreen[data-fullscreen-panel="commands"] .editor-sidebar,
  .editor-main:fullscreen[data-fullscreen-panel="blocks"] .editor-sidebar,
  .editor-main:fullscreen[data-fullscreen-panel="commands"] .editor-sidebar,
  body.editor-fullscreen .editor-main[data-fullscreen-panel="blocks"] .editor-sidebar,
  body.editor-fullscreen .editor-main[data-fullscreen-panel="commands"] .editor-sidebar {
    display: grid;
  }

  .editor-main.is-fullscreen[data-fullscreen-panel="inspector"] .node-inspector,
  .editor-main:fullscreen[data-fullscreen-panel="inspector"] .node-inspector,
  body.editor-fullscreen .editor-main[data-fullscreen-panel="inspector"] .node-inspector {
    display: block;
    overflow-y: auto;
  }

  .editor-main.is-fullscreen .sidebar-panel,
  .editor-main:fullscreen .sidebar-panel,
  body.editor-fullscreen .editor-main .sidebar-panel,
  .editor-main.is-fullscreen .flow-list,
  .editor-main:fullscreen .flow-list,
  body.editor-fullscreen .editor-main .flow-list,
  .editor-main.is-fullscreen .toolbox-categories,
  .editor-main:fullscreen .toolbox-categories,
  body.editor-fullscreen .editor-main .toolbox-categories {
    max-height: none;
  }

  .editor-main.is-fullscreen .canvas-node-preview,
  .editor-main:fullscreen .canvas-node-preview,
  body.editor-fullscreen .editor-main .canvas-node-preview {
    z-index: 38;
  }
}

@media (max-width: 460px) {
  .editor-main {
    padding: 10px;
  }

  .editor-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editor-mobile-dock {
    top: 70px;
  }

  .editor-mobile-dock button {
    font-size: 0.72rem;
  }

  .flowchart-canvas-wrap,
  .editor-main.is-fullscreen .flowchart-canvas-wrap,
  .editor-main:fullscreen .flowchart-canvas-wrap,
  body.editor-fullscreen .editor-main .flowchart-canvas-wrap {
    height: 64dvh;
    min-height: 380px;
  }

  .editor-main.is-fullscreen .flowchart-canvas-wrap,
  .editor-main:fullscreen .flowchart-canvas-wrap,
  body.editor-fullscreen .editor-main .flowchart-canvas-wrap {
    height: 100%;
    min-height: 0;
  }

  .toolbox-blocks {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) and (orientation: portrait) {
  .editor-main.is-fullscreen,
  .editor-main:fullscreen,
  body.editor-fullscreen .editor-main {
    --editor-fullscreen-dock-bottom: calc(8px + env(safe-area-inset-bottom));
    --editor-fullscreen-panel-bottom: calc(var(--editor-fullscreen-dock-bottom) + var(--editor-fullscreen-dock-height) + 8px);
  }

  .editor-main.is-fullscreen .editor-fullscreen-dock,
  .editor-main:fullscreen .editor-fullscreen-dock,
  body.editor-fullscreen .editor-main .editor-fullscreen-dock,
  .editor-main.is-fullscreen.is-dock-collapsed .editor-fullscreen-dock,
  .editor-main:fullscreen.is-dock-collapsed .editor-fullscreen-dock,
  body.editor-fullscreen .editor-main.is-dock-collapsed .editor-fullscreen-dock {
    top: auto;
    right: 8px;
    bottom: var(--editor-fullscreen-dock-bottom);
    left: 8px;
    width: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: 8px;
  }

  .editor-main.is-fullscreen .editor-fullscreen-dock [data-editor-fullscreen-exit],
  .editor-main:fullscreen .editor-fullscreen-dock [data-editor-fullscreen-exit],
  body.editor-fullscreen .editor-main .editor-fullscreen-dock [data-editor-fullscreen-exit] {
    position: fixed;
    top: calc(8px + env(safe-area-inset-top));
    left: 8px;
    z-index: 48;
    min-width: 68px;
    padding: 0 12px;
    border: 1px solid rgba(var(--muted-rgb), 0.2);
    background: rgba(var(--bg-rgb), 0.94);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
  }

  .editor-main.is-fullscreen .editor-fullscreen-dock-toggle,
  .editor-main:fullscreen .editor-fullscreen-dock-toggle,
  body.editor-fullscreen .editor-main .editor-fullscreen-dock-toggle {
    display: none;
  }

  .editor-main.is-fullscreen.is-dock-collapsed .editor-fullscreen-dock button:not(.editor-fullscreen-dock-toggle),
  .editor-main:fullscreen.is-dock-collapsed .editor-fullscreen-dock button:not(.editor-fullscreen-dock-toggle),
  body.editor-fullscreen .editor-main.is-dock-collapsed .editor-fullscreen-dock button:not(.editor-fullscreen-dock-toggle) {
    display: block;
  }

  .editor-main.is-fullscreen .flowchart-canvas-wrap,
  .editor-main:fullscreen .flowchart-canvas-wrap,
  body.editor-fullscreen .editor-main .flowchart-canvas-wrap {
    top: 0;
    right: 0;
    bottom: var(--editor-fullscreen-panel-bottom);
    left: 0;
    height: auto;
    min-height: 0;
  }

  .editor-main.is-fullscreen .editor-sidebar,
  .editor-main:fullscreen .editor-sidebar,
  body.editor-fullscreen .editor-main .editor-sidebar,
  .editor-main.is-fullscreen .node-inspector,
  .editor-main:fullscreen .node-inspector,
  body.editor-fullscreen .editor-main .node-inspector,
  .editor-main.is-fullscreen.is-dock-collapsed .editor-sidebar,
  .editor-main:fullscreen.is-dock-collapsed .editor-sidebar,
  body.editor-fullscreen .editor-main.is-dock-collapsed .editor-sidebar,
  .editor-main.is-fullscreen.is-dock-collapsed .node-inspector,
  .editor-main:fullscreen.is-dock-collapsed .node-inspector,
  body.editor-fullscreen .editor-main.is-dock-collapsed .node-inspector {
    top: auto;
    right: 8px;
    bottom: var(--editor-fullscreen-panel-bottom);
    left: 8px;
    width: auto;
    max-height: min(54dvh, 430px);
    border-radius: 10px;
  }

  .editor-main.is-fullscreen .editor-sidebar,
  .editor-main:fullscreen .editor-sidebar,
  body.editor-fullscreen .editor-main .editor-sidebar {
    max-height: min(48dvh, 380px);
  }

  .editor-main.is-fullscreen .node-inspector,
  .editor-main:fullscreen .node-inspector,
  body.editor-fullscreen .editor-main .node-inspector {
    max-height: min(58dvh, 460px);
  }
}

@media (orientation: landscape) and (max-height: 560px) and (max-width: 1000px) {
  .editor-main.is-fullscreen .canvas-node-preview,
  .editor-main:fullscreen .canvas-node-preview,
  body.editor-fullscreen .editor-main .canvas-node-preview {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: auto;
    max-height: min(54dvh, 260px);
  }
}

@media (max-width: 560px) {
  .hero-actions,
  .footer,
  .bot-actions {
    align-items: stretch;
  }

  .hero-actions,
  .bot-actions {
    flex-direction: column;
  }

  .footer {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "links"
      "contact";
  }

  .button {
    width: 100%;
  }

  .discord-setup-callout {
    align-items: stretch;
    flex-direction: column;
  }

  .footer-secondary {
    justify-items: start;
    text-align: left;
    transform: none;
  }

  .status-grid,
  .form-row,
  .module-checks,
  .runtime-actions,
  .bot-data-grid,
  .flow-block-fields {
    grid-template-columns: 1fr;
  }

  .bot-build-visual {
    grid-template-columns: 1fr;
    min-height: 330px;
  }

  .guide-editor-panel {
    height: auto;
    min-height: 0;
  }

  .guide-canvas-wrap {
    height: 480px;
  }

  .bot-build-visual::after {
    left: 50%;
    top: 54px;
    transform: translateX(-50%);
  }

  .bot-build-visual.is-building::after,
  .bot-build-visual.is-ready::after,
  .bot-build-visual.is-installing::after {
    animation-name: botBuildRingMobile;
  }

  .bot-build-core {
    min-height: 140px;
  }

  .bot-build-core::before {
    left: 50%;
    right: auto;
    top: auto;
    bottom: -26px;
    width: 2px;
    height: 74px;
    background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.8), rgba(var(--accent-warm-rgb), 0.34), transparent);
    transform: translateX(-50%) scaleY(0.46);
    transform-origin: top center;
  }

  .bot-build-visual.is-building .bot-build-core::before,
  .bot-build-visual.is-installing .bot-build-core::before {
    animation-name: botBuildBeamMobile;
  }

  .bot-build-grid {
    max-height: 166px;
  }

  .bot-build-metrics {
    left: 14px;
    right: 14px;
    width: auto;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .landing-editorial-hero {
    min-height: 680px;
  }

  .landing-editorial-copy {
    width: min(620px, 100%);
    padding: 54px 28px;
  }

  .landing-editorial-copy h1 {
    max-width: 10ch;
    font-size: clamp(3.05rem, 10vw, 5rem);
  }

  .landing-flow-artifact {
    top: 130px;
    right: -360px;
    width: 760px;
    opacity: 0.22;
    transform: perspective(1200px) rotateX(2deg) rotateY(-7deg) scale(0.94);
  }

  .landing-outcome-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .landing-editorial-hero {
    min-height: 610px;
    border-radius: 10px;
  }

  .landing-editorial-copy {
    width: min(300px, 100%);
    min-height: 610px;
    margin-inline: auto;
    justify-items: center;
    padding: 48px 0 42px;
    text-align: center;
  }

  .landing-editorial-copy h1 {
    max-width: min(100%, 10ch);
    margin-bottom: 12px;
    font-size: clamp(2.04rem, 9vw, 2.48rem);
    line-height: 1;
  }

  .landing-editorial-copy h2 {
    max-width: 310px;
    font-size: clamp(1.02rem, 5vw, 1.28rem);
    line-height: 1.14;
  }

  .landing-editorial-copy .hero-lede {
    max-width: 270px;
    font-size: 0.88rem;
    line-height: 1.42;
  }

  .landing-editorial-proof {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: center;
    justify-items: center;
    max-width: 240px;
  }

  .landing-editorial-proof span {
    padding: 7px 8px;
    font-size: 0.76rem;
  }

  .landing-flow-artifact {
    top: 64px;
    right: -520px;
    width: 760px;
    opacity: 0.16;
    transform: scale(0.86);
    transform-origin: top right;
  }

  .landing-outcome-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .landing-outcome-row article {
    min-height: 0;
    padding: 15px;
  }
}

@keyframes landingStudioDrift {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes landingNodePulse {
  0%,
  100% {
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.25), 0 0 0 rgba(var(--accent-rgb), 0);
  }

  50% {
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28), 0 0 32px rgba(var(--accent-rgb), 0.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-studio-panel,
  .studio-node-ai {
    animation: none;
  }
}

@media (max-width: 1080px) {
  .landing-product-hero {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: 0;
  }

  .landing-product-copy {
    max-width: 720px;
  }

  .landing-product-copy h1 {
    max-width: 12ch;
  }

  .landing-studio-panel {
    width: min(760px, 100%);
    margin: 0;
  }
}

@media (max-width: 760px) {
  .landing-product-hero {
    padding: 38px 18px 22px;
    border-radius: 12px;
  }

  .landing-product-copy h1 {
    font-size: clamp(2.7rem, 13vw, 4.8rem);
  }

  .landing-launch-path,
  .landing-outcome-row {
    grid-template-columns: 1fr;
  }

  .landing-launch-path article {
    min-height: 86px;
  }

  .landing-studio-body {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    min-height: 420px;
    padding: 10px;
  }

  .landing-studio-sidebar {
    padding: 12px 8px;
  }

  .landing-studio-sidebar i {
    min-height: 30px;
    padding: 0 8px;
    font-size: 0.68rem;
  }

  .landing-studio-canvas {
    min-height: 250px;
  }

  .studio-node {
    width: 132px;
    min-height: 58px;
    padding: 10px;
  }

  .studio-node strong {
    font-size: 0.78rem;
  }

  .studio-node-command {
    top: 26px;
    left: 18px;
  }

  .studio-node-panel {
    top: 94px;
    right: 16px;
  }

  .studio-node-ai {
    left: 26px;
    bottom: 36px;
  }

  .studio-node-reply {
    right: 20px;
    bottom: 22px;
  }

  .studio-wire-one {
    left: 140px;
    width: 92px;
  }

  .studio-wire-two {
    right: 116px;
    width: 82px;
  }

  .studio-wire-three {
    left: 154px;
    width: 72px;
  }
}

@media (max-width: 560px) {
  main {
    overflow-x: hidden;
    padding-inline: 10px;
  }

  .landing-product-hero {
    width: 100%;
    max-width: 100%;
    padding-inline: 14px;
  }

  .landing-product-copy {
    justify-items: center;
    width: 100%;
    max-width: 100%;
    text-align: center;
  }

  .landing-product-copy h1 {
    max-width: 9.4ch;
    font-size: clamp(2.28rem, 9.6vw, 3rem);
    line-height: 0.98;
  }

  .landing-product-copy h2 {
    max-width: 300px;
    font-size: clamp(1.18rem, 5.8vw, 1.48rem);
  }

  .landing-product-copy .hero-lede {
    max-width: 290px;
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .landing-product-copy .hero-actions {
    justify-content: center;
  }

  .landing-launch-path,
  .landing-studio-panel {
    width: min(330px, calc(100vw - 48px));
    max-width: none;
    margin-inline: 0;
  }

  .landing-launch-path {
    justify-self: start;
  }

  .landing-product-stage {
    width: 100%;
    justify-self: stretch;
  }

  .landing-product-stage::before {
    opacity: 0.42;
  }

  .landing-studio-topbar strong {
    font-size: 0.76rem;
  }

  .landing-studio-body {
    grid-template-columns: 1fr;
    min-height: 0;
    overflow: hidden;
  }

  .landing-studio-sidebar {
    display: none;
  }

  .landing-studio-preview {
    grid-column: auto;
  }

  .landing-studio-canvas {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 0;
    padding: 12px;
  }

  .studio-node {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 56px;
  }

  .studio-wire {
    display: none;
  }

  .landing-section-intro h2 {
    font-size: clamp(1.6rem, 8vw, 2.3rem);
  }

  .landing-outcomes {
    padding-top: 44px;
  }
}

@media (max-width: 1080px) {
  .landing-editor-shot {
    width: min(760px, 100%);
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  .landing-editor-shot {
    width: min(520px, 100%);
  }

  .landing-editor-shot-toolbar {
    flex-wrap: wrap;
  }

  .landing-editor-shot-body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .landing-editor-shot-sidebar {
    display: none;
  }

  .landing-editor-shot-canvas {
    min-height: 300px;
  }

  .landing-editor-shot-inspector {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .landing-editor-shot-inspector .eyebrow,
  .landing-editor-shot-inspector > strong {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .landing-product-stage {
    width: min(330px, calc(100vw - 48px));
    justify-self: center;
  }

  .landing-editor-shot {
    width: 100%;
    margin-inline: auto;
    transform: translateX(clamp(-48px, -12vw, -32px));
  }

  .landing-editor-shot-toolbar {
    gap: 8px;
    min-height: 0;
    padding: 11px;
  }

  .landing-editor-shot-toolbar div {
    flex: 1 0 100%;
  }

  .landing-editor-shot-toolbar > span {
    min-height: 30px;
    font-size: 0.7rem;
  }

  .landing-editor-shot-body {
    gap: 10px;
    padding: 10px;
  }

  .landing-editor-shot-canvas {
    min-height: 292px;
  }

  .landing-editor-node {
    width: 128px;
    min-height: 56px;
    padding: 10px;
  }

  .landing-editor-node strong {
    font-size: 0.78rem;
  }

  .editor-node-command {
    top: 24px;
    left: 16px;
  }

  .editor-node-panel {
    top: 92px;
    right: 16px;
  }

  .editor-node-ai {
    left: 18px;
    bottom: 42px;
  }

  .editor-node-reply {
    right: 16px;
    bottom: 20px;
  }

  .editor-wire-one {
    top: 88px;
    left: 142px;
    width: 82px;
    transform: rotate(20deg);
  }

  .editor-wire-two {
    top: 170px;
    left: 158px;
    width: 82px;
    transform: rotate(140deg);
  }

  .editor-wire-three {
    right: 112px;
    bottom: 72px;
    width: 64px;
  }

  .landing-editor-shot-inspector {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 11px;
  }

  .landing-editor-shot-preview {
    margin: 0 10px 10px;
    padding: 10px;
  }
}

.landing-clean-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  width: min(1040px, 100%);
  min-height: min(560px, calc(100vh - 120px));
  margin: 0 auto;
  padding: clamp(72px, 10vw, 126px) 24px clamp(48px, 7vw, 84px);
  text-align: center;
}

.landing-clean-hero::before {
  content: "";
  position: absolute;
  inset: 12% 8% auto;
  z-index: -1;
  height: 72%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 34% 30%, rgba(var(--accent-rgb), 0.18), transparent 32%),
    radial-gradient(circle at 64% 44%, rgba(var(--accent-warm-rgb), 0.1), transparent 34%);
  filter: blur(48px);
  opacity: 0.72;
  pointer-events: none;
}

.landing-clean-hero h1 {
  max-width: 980px;
  margin: 12px 0 22px;
  color: var(--text);
  font-size: clamp(3.6rem, 8.4vw, 8.4rem);
  line-height: 0.88;
}

.landing-clean-hero h1 span {
  display: block;
}

.landing-clean-hero .hero-lede {
  max-width: 720px;
  color: rgba(var(--text-rgb), 0.72);
  font-size: clamp(1.06rem, 1.55vw, 1.28rem);
  line-height: 1.55;
}

.landing-clean-hero .hero-actions {
  justify-content: center;
  margin-top: 32px;
}

.landing-editor-showcase,
.landing-outcomes {
  width: min(1220px, 100%);
  margin-inline: auto;
}

.landing-editor-showcase {
  display: grid;
  gap: 22px;
  margin-top: clamp(52px, 7vw, 96px);
  padding-top: 6px;
}

.landing-showcase-head {
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.landing-showcase-head h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(1.75rem, 3.4vw, 3.35rem);
}

.landing-editor-showcase .landing-editor-shot {
  width: 100%;
  margin: 0;
  transform: none;
}

.landing-editor-showcase .landing-editor-shot-body {
  grid-template-columns: 160px minmax(0, 1fr) 250px;
  min-height: 470px;
}

.landing-editor-showcase .landing-editor-shot-canvas {
  min-height: 446px;
}

.landing-editor-showcase .landing-editor-node {
  width: 168px;
  min-height: 66px;
  padding: 13px;
}

.landing-editor-showcase .landing-editor-node strong {
  font-size: 0.95rem;
}

.landing-editor-showcase .editor-node-command {
  top: 54px;
  left: 54px;
}

.landing-editor-showcase .editor-node-panel {
  top: 154px;
  right: 72px;
}

.landing-editor-showcase .editor-node-ai {
  left: 96px;
  bottom: 86px;
}

.landing-editor-showcase .editor-node-reply {
  right: 92px;
  bottom: 56px;
}

.landing-editor-showcase .editor-wire-one {
  top: 87px;
  left: 220px;
  width: 330px;
  transform: rotate(18deg);
}

.landing-editor-showcase .editor-wire-two {
  top: 120px;
  left: 138px;
  width: 180px;
  transform: rotate(76deg);
}

.landing-editor-showcase .editor-wire-three {
  top: 327px;
  left: 264px;
  right: auto;
  bottom: auto;
  width: 255px;
  transform: rotate(7deg);
}

.landing-editor-showcase .landing-editor-shot-preview {
  margin: 0 12px 12px;
}

@media (max-width: 980px) {
  .landing-clean-hero {
    min-height: 0;
  }

  .landing-editor-showcase .landing-editor-shot-body {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .landing-editor-showcase .landing-editor-shot-inspector {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .landing-editor-showcase .landing-editor-shot-inspector .eyebrow,
  .landing-editor-showcase .landing-editor-shot-inspector > strong {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  html,
  body {
    overflow-x: hidden;
  }

  .landing-clean-hero {
    padding: 56px 12px 42px;
  }

  .landing-clean-hero h1 {
    max-width: min(100%, 300px);
    font-size: clamp(2.1rem, 9.4vw, 2.72rem);
    line-height: 1;
  }

  .landing-clean-hero .hero-lede {
    max-width: 315px;
    font-size: 0.96rem;
  }

  .landing-editor-showcase {
    gap: 16px;
  }

  .landing-showcase-head h2 {
    max-width: 320px;
    font-size: clamp(1.35rem, 6.5vw, 2rem);
    line-height: 1.05;
  }

  .landing-editor-showcase .landing-editor-shot {
    width: min(340px, calc(100vw - 36px));
    margin-inline: auto;
    transform: translateX(clamp(-48px, -12vw, -32px));
  }

  .landing-editor-showcase .landing-editor-shot-body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .landing-editor-showcase .landing-editor-shot-sidebar {
    display: none;
  }

  .landing-editor-showcase .landing-editor-shot-canvas {
    min-height: 292px;
  }

  .landing-editor-showcase .landing-editor-shot-inspector {
    grid-template-columns: 1fr;
  }

  .landing-editor-showcase .landing-editor-node {
    width: 128px;
    min-height: 56px;
    padding: 10px;
  }

  .landing-editor-showcase .landing-editor-node strong {
    font-size: 0.78rem;
  }

  .landing-editor-showcase .editor-node-command {
    top: 24px;
    left: 16px;
  }

  .landing-editor-showcase .editor-node-panel {
    top: 92px;
    right: 16px;
  }

  .landing-editor-showcase .editor-node-ai {
    left: 18px;
    bottom: 42px;
  }

  .landing-editor-showcase .editor-node-reply {
    right: 16px;
    bottom: 20px;
  }

  .landing-editor-showcase .editor-wire-one {
    top: 52px;
    left: 142px;
    width: 76px;
    transform: rotate(64deg);
  }

  .landing-editor-showcase .editor-wire-two {
    top: 80px;
    left: 80px;
    width: 114px;
    transform: rotate(90deg);
  }

  .landing-editor-showcase .editor-wire-three {
    top: 222px;
    left: 146px;
    right: auto;
    bottom: auto;
    width: 36px;
    transform: rotate(38deg);
  }
}

@media (max-width: 760px) {
  .landing-outcomes,
  .landing-workflow,
  .landing-marketplace-band {
    display: none;
  }

  .site-nav .nav-platform-link {
    display: none;
  }

  .landing-editor-showcase {
    margin-top: 28px;
  }

  .landing-editor-showcase .landing-editor-shot {
    margin-inline: auto;
  }
}

@media (max-width: 640px) {
  .landing-editor-showcase {
    width: 100%;
    gap: 12px;
  }

  .landing-showcase-head {
    max-width: 300px;
  }

  .landing-showcase-head .eyebrow {
    font-size: 0.62rem;
  }

  .landing-showcase-head h2 {
    max-width: 300px;
    font-size: clamp(1.08rem, 5.2vw, 1.34rem);
    line-height: 1.08;
  }

  .landing-editor-showcase .landing-editor-shot-frame {
    display: grid;
    justify-items: center;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 195px;
    position: relative;
    overflow: visible;
  }

  .landing-editor-showcase .landing-editor-shot {
    position: absolute;
    top: 0;
    left: 50%;
    width: 1100px;
    max-width: none;
    margin: 0;
    transform: translateX(-50%) scale(0.31);
    transform-origin: top center;
    border-radius: 14px;
  }

  .landing-editor-showcase .landing-editor-shot-toolbar {
    flex-wrap: nowrap;
    gap: 10px;
    min-height: 70px;
    padding: 12px 14px;
  }

  .landing-editor-showcase .landing-editor-shot-toolbar div {
    flex: 1 1 0;
    min-width: 0;
    margin-right: 0;
  }

  .landing-editor-showcase .landing-editor-shot-toolbar .eyebrow {
    display: block;
    font-size: 0.66rem;
  }

  .landing-editor-showcase .landing-editor-shot-toolbar strong {
    font-size: 1.05rem;
  }

  .landing-editor-showcase .landing-editor-shot-toolbar > span {
    min-height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 0.75rem;
  }

  .landing-editor-showcase .landing-editor-shot-body {
    grid-template-columns: 160px minmax(0, 1fr) 250px;
    gap: 10px;
    min-height: 470px;
    padding: 12px;
  }

  .landing-editor-showcase .landing-editor-shot-sidebar {
    display: grid;
  }

  .landing-editor-showcase .landing-editor-shot-canvas {
    min-height: 446px;
    border-radius: 9px;
    background-size: 34px 34px;
  }

  .landing-editor-showcase .landing-editor-shot-inspector {
    display: grid;
    grid-column: auto;
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 12px;
  }

  .landing-editor-showcase .landing-editor-shot-inspector .eyebrow,
  .landing-editor-showcase .landing-editor-shot-inspector > strong {
    grid-column: auto;
  }

  .landing-editor-showcase .landing-editor-node {
    width: 168px;
    min-height: 66px;
    gap: 4px;
    padding: 13px;
    border-radius: 8px;
  }

  .landing-editor-showcase .landing-editor-node span {
    font-size: 0.66rem;
    letter-spacing: 0.08em;
  }

  .landing-editor-showcase .landing-editor-node strong {
    font-size: 0.95rem;
    line-height: 1.2;
  }

  .landing-editor-showcase .editor-node-command {
    top: 54px;
    left: 54px;
  }

  .landing-editor-showcase .editor-node-panel {
    top: 154px;
    right: 72px;
  }

  .landing-editor-showcase .editor-node-ai {
    left: 96px;
    bottom: 86px;
  }

  .landing-editor-showcase .editor-node-reply {
    right: 92px;
    bottom: 56px;
  }

  .landing-editor-showcase .editor-wire-one {
    top: 87px;
    left: 222px;
    width: 212px;
    transform: rotate(28deg);
  }

  .landing-editor-showcase .editor-wire-two {
    top: 121px;
    left: 138px;
    width: 156px;
    transform: rotate(75deg);
  }

  .landing-editor-showcase .editor-wire-three {
    top: 320px;
    left: 264px;
    right: auto;
    bottom: auto;
    width: 128px;
    transform: rotate(17deg);
  }
}

@media (max-width: 480px) {
  .landing-editor-showcase .landing-editor-shot-frame {
    height: 184px;
  }

  .landing-editor-showcase .landing-editor-shot {
    transform: translateX(-50%) scale(0.3);
  }
}

@media (max-width: 360px) {
  .landing-editor-showcase .landing-editor-shot-frame {
    height: 162px;
  }

  .landing-editor-showcase .landing-editor-shot {
    transform: translateX(-50%) scale(0.27);
  }
}

.block-doc-hero {
  display: grid;
  gap: 14px;
  padding-bottom: 18px;
}

.block-doc-hero .section-heading {
  max-width: 840px;
  margin-bottom: 0;
}

.block-doc-hero .section-heading h1 {
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: 0.92;
}

.block-doc-hero .section-heading p {
  max-width: 760px;
}

.block-doc-search-shell,
.block-doc-search,
.block-doc-category,
.block-doc-card {
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
    rgba(var(--bg-rgb), 0.24);
}

.block-doc-search-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.block-doc-search {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 0;
  background: transparent;
}

.block-doc-search input {
  min-height: 46px;
  border-color: rgba(var(--accent-rgb), 0.24);
  background: rgba(var(--bg-rgb), 0.38);
}

.block-doc-search-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(var(--bg-rgb), 0.72);
  backdrop-filter: blur(2px);
}

body.is-block-doc-searching .block-doc-hero {
  position: relative;
  z-index: 80;
}

body.is-block-doc-searching .block-doc-hero .section-heading,
body.is-block-doc-searching .block-doc-summary {
  opacity: 0.28;
  filter: blur(1px);
  pointer-events: none;
}

body.is-block-doc-searching .block-doc-search-shell {
  z-index: 90;
  border-color: rgba(var(--accent-rgb), 0.54);
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.12), rgba(255, 255, 255, 0.035)),
    var(--panel);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.16), 0 22px 80px rgba(0, 0, 0, 0.42);
}

body.is-block-doc-searching .block-doc-search input {
  border-color: rgba(var(--accent-rgb), 0.72);
  background: rgba(var(--bg-rgb), 0.74);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.block-doc-search-results {
  display: grid;
  gap: 8px;
  max-height: min(520px, calc(100vh - 280px));
  overflow: auto;
  padding: 0 14px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.42) transparent;
}

.block-doc-search-results[hidden] {
  display: none;
}

.block-doc-search-results::-webkit-scrollbar {
  width: 8px;
}

.block-doc-search-results::-webkit-scrollbar-track {
  background: transparent;
}

.block-doc-search-results::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.36);
  background-clip: padding-box;
}

.block-doc-search-results-head {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.block-doc-search-result {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 7px;
  background: rgba(var(--bg-rgb), 0.36);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.block-doc-search-result:hover,
.block-doc-search-result:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.11);
  transform: translateY(-1px);
  outline: none;
}

.block-doc-search-result strong {
  font-size: 0.98rem;
}

.block-doc-search-result span,
.block-doc-search-result em {
  color: var(--muted);
  font-size: 0.84rem;
}

.block-doc-search-result em {
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.block-doc-search-result small {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 850;
}

.block-doc-search-empty {
  margin: 0;
  padding: 12px;
  color: var(--muted);
}

.block-doc-summary,
.block-doc-summary-main em,
.block-doc-card-preview,
.block-doc-overview,
.block-field-row p,
.block-port-list p,
.block-doc-empty,
.block-doc-example-head p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.block-doc-summary {
  margin: 0;
}

.block-doc-summary strong {
  color: var(--accent);
}

.block-doc-layout {
  display: grid;
  gap: 16px;
  align-items: start;
}

.block-doc-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.block-doc-category {
  scroll-margin-top: 96px;
  overflow: hidden;
}

.block-doc-category[hidden],
.block-doc-card[hidden] {
  display: none;
}

.block-doc-category-summary,
.block-doc-card-summary {
  display: grid;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.block-doc-category-summary::-webkit-details-marker,
.block-doc-card-summary::-webkit-details-marker {
  display: none;
}

.block-doc-category-summary {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 16px;
}

.block-doc-summary-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.block-doc-summary-main strong {
  font-size: 1.2rem;
}

.block-doc-summary-main em {
  font-style: normal;
}

.block-doc-chevron {
  width: 11px;
  height: 11px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.block-doc-category[open] > .block-doc-category-summary .block-doc-chevron {
  transform: rotate(225deg);
}

.block-doc-category-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.block-doc-card {
  overflow: hidden;
}

.block-doc-card-summary {
  padding: 14px;
}

.block-doc-card-kinds,
.block-doc-title-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.block-doc-title-line strong {
  font-size: 1.04rem;
}

.block-doc-card code,
.block-field-main code,
.block-port-list code {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 3px 7px;
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-radius: 6px;
  background: rgba(var(--bg-rgb), 0.46);
  color: var(--accent);
  font-size: 0.78rem;
}

.block-doc-card-preview {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.block-doc-card[open] .block-doc-card-preview {
  display: none;
}

.block-doc-match {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 850;
}

.block-doc-card-body {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.block-doc-subsection {
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.2);
}

.block-doc-subsection {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.block-doc-subsection h4 {
  margin: 0;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.block-doc-overview {
  margin: 0;
}

.block-doc-example-list {
  display: grid;
  gap: 10px;
}

.block-doc-example-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
}

.block-doc-example-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  align-items: baseline;
}

.block-doc-example-head strong {
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.block-doc-example-head span {
  color: var(--text);
  font-weight: 850;
}

.block-doc-example-head p {
  grid-column: 1 / -1;
  margin: 0;
}

.block-doc-editor-canvas {
  overflow: auto hidden;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 7px;
  background-image:
    linear-gradient(rgba(var(--muted-rgb), 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--muted-rgb), 0.055) 1px, transparent 1px);
  background-size: 24px 24px;
  background-color: rgba(var(--bg-rgb), 0.22);
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.4) transparent;
}

.block-doc-editor-canvas::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.block-doc-editor-canvas::-webkit-scrollbar-track {
  background: transparent;
}

.block-doc-editor-canvas::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.36);
  background-clip: padding-box;
}

.block-doc-editor-world {
  position: relative;
  min-width: 0;
  min-height: 0;
  transform-origin: top left;
}

.block-doc-editor-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.block-doc-editor-lines .flow-link {
  pointer-events: none;
}

.block-doc-editor-node.flow-node {
  cursor: default;
  pointer-events: none;
  transform: none;
  width: 250px;
  height: 88px;
  min-height: 88px;
  overflow: hidden;
}

.block-doc-editor-node .node-body {
  overflow: hidden;
}

.block-doc-editor-node .node-body strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.block-doc-editor-node .node-port {
  cursor: default;
}

.block-field-list,
.block-port-list {
  display: grid;
  gap: 8px;
}

.block-field-row {
  overflow: hidden;
}

.block-field-row,
.block-port-list div {
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 7px;
  background: rgba(var(--bg-rgb), 0.22);
}

.block-field-row[open] {
  border-color: rgba(var(--accent-rgb), 0.18);
}

.block-field-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  list-style: none;
}

.block-field-summary::-webkit-details-marker {
  display: none;
}

.block-field-details {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.block-field-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.block-field-main strong {
  color: var(--text);
}

.block-field-chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.block-field-row[open] .block-field-chevron {
  transform: rotate(225deg);
}

.block-field-type {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.block-field-details p,
.block-field-options-title {
  margin: 0;
}

.block-field-options {
  display: grid;
  gap: 6px;
}

.block-field-options-title {
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.block-option-list {
  display: grid;
  gap: 6px;
}

.block-option-list span {
  display: grid;
  gap: 3px;
  padding: 3px 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 7px;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.block-option-list strong {
  color: var(--text);
  font-size: 0.78rem;
}

.block-option-list em {
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
  line-height: 1.45;
}

.block-port-list strong {
  color: var(--text);
}

.block-port-list div {
  display: grid;
  gap: 7px;
  padding: 10px;
}

.block-doc-reference-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.block-doc-reference-links a {
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 850;
  text-decoration: none;
}

@media (max-width: 920px) {
  .block-doc-editor-canvas {
    scrollbar-width: thin;
  }
}

@media (max-width: 560px) {
  .block-doc-hero .section-heading h1 {
    font-size: clamp(2.4rem, 13vw, 3.4rem);
  }

  .block-doc-category-summary,
  .block-doc-card-summary,
  .block-doc-subsection {
    padding: 12px;
  }

}

.owner-health-panel .dashboard-title-row {
  align-items: flex-start;
}

.owner-health-summary {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.owner-health-summary div {
  align-content: start;
  min-height: 116px;
}

.owner-health-summary small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.owner-trial-extension-summary {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 14px;
}

.owner-trial-extension-summary small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.owner-feedback-response {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
  white-space: pre-wrap;
}

.bot-panel-section {
  width: min(1480px, 100%);
}

.bot-panel-section > .dashboard-title-row {
  width: min(1180px, calc(100% - 262px));
  margin-left: 262px;
  margin-right: 0;
}

.bot-panel-shell {
  display: grid;
  gap: 18px;
  width: min(1180px, 100%);
  margin-inline: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    var(--panel);
  box-shadow: var(--shadow);
}

.bot-panel-hero,
.bot-panel-identity,
.bot-panel-quick-actions,
.bot-panel-widget-head,
.bot-panel-widget-actions,
.dashboard-suggestion,
.dashboard-suggestion-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bot-panel-hero,
.bot-panel-widget-head,
.dashboard-suggestion {
  justify-content: space-between;
}

.bot-panel-hero {
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.bot-panel-identity {
  min-width: 0;
  align-items: flex-start;
}

.bot-panel-identity h2,
.bot-panel-widget h3,
.bot-panel-category strong,
.bot-panel-row strong,
.bot-panel-collaborator-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-panel-identity h2,
.bot-panel-widget h3 {
  margin: 4px 0;
}

.bot-panel-identity p,
.bot-panel-row span,
.bot-panel-row small,
.bot-panel-collaborator-row span,
.bot-panel-category small,
.bot-panel-empty-line,
.dashboard-suggestion span,
.bot-panel-record-head span {
  color: var(--muted);
}

.bot-panel-avatar {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
}

.bot-panel-avatar-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent), var(--accent-warm));
  color: var(--theme-button-text);
  font-weight: 950;
  font-size: 1.2rem;
}

.bot-panel-notice {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(var(--muted-rgb), 0.32);
  border-radius: 8px;
  background: rgba(var(--muted-rgb), 0.08);
}

.bot-panel-notice span {
  color: var(--muted);
  line-height: 1.5;
}

.bot-panel-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.bot-panel-rail {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.bot-panel-rail-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.bot-panel-rail-block label,
.bot-panel-settings-form label,
.bot-panel-json-form label,
.bot-panel-inline-create {
  display: grid;
  gap: 7px;
}

.bot-panel-rail-summary strong {
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
}

.bot-panel-rail-summary small,
.bot-panel-rail-summary span {
  color: var(--muted);
  font-weight: 750;
}

.bot-panel-widgets {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.bot-panel-widget {
  display: grid;
  gap: 14px;
  min-width: 0;
  scroll-margin-top: 96px;
  padding: 16px;
  border: 1px solid rgba(var(--muted-rgb), 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.bot-panel-widget-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bot-panel-widget-actions form,
.bot-panel-quick-actions form,
.dashboard-suggestion-actions form {
  margin: 0;
}

.bot-panel-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.bot-panel-metric {
  display: grid;
  gap: 6px;
  min-width: 0;
  min-height: 104px;
  padding: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.065);
}

.bot-panel-metric span,
.bot-panel-metric small {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.bot-panel-metric strong {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1.05;
  white-space: nowrap;
}

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

.bot-panel-list,
.bot-panel-record-widget,
.bot-panel-collaborators {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.bot-panel-row,
.bot-panel-collaborator-row,
.bot-panel-record-head {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.bot-panel-collaborator-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

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

.bot-panel-category {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.bot-panel-category-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.bot-panel-category-head > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.08);
  font-size: 1.25rem;
}

.bot-panel-command-list {
  display: grid;
  gap: 7px;
}

.bot-panel-command-list a,
.bot-panel-command-item {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
}

.bot-panel-command-list a:hover {
  border-color: rgba(var(--accent-rgb), 0.36);
  background: rgba(var(--accent-rgb), 0.08);
}

.bot-panel-command-list strong,
.bot-panel-command-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-panel-command-list span {
  color: var(--muted);
  font-size: 0.86rem;
}

.bot-panel-settings-form,
.bot-panel-json-form,
.bot-panel-inline-create,
.bot-panel-collaborator-form {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-top: 4px;
}

.bot-panel-json-form {
  padding: 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.bot-panel-json-form textarea,
.bot-panel-inline-create textarea {
  min-height: 92px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.45;
}

.bot-panel-inline-create {
  grid-template-columns: minmax(120px, 0.32fr) minmax(180px, 1fr) auto;
  align-items: end;
}

.bot-panel-widget-pinned_state .bot-panel-inline-create,
.bot-panel-record-widget .bot-panel-inline-create {
  grid-template-columns: minmax(130px, 0.35fr) minmax(220px, 1fr) auto;
}

.bot-panel-collaborator-form {
  grid-template-columns: minmax(170px, 1fr) minmax(120px, 0.35fr) auto;
}

.bot-panel-record-head {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.bot-panel-record-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-suggestion-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.dashboard-suggestion {
  align-items: flex-start;
  padding: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.08);
}

.dashboard-suggestion > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.dashboard-suggestion strong {
  color: var(--text);
}

.dashboard-suggestion-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.shared-bot-card {
  border-color: rgba(var(--accent-rgb), 0.24);
}

.bot-dashboard-shell {
  display: grid;
  gap: 22px;
  width: min(1480px, calc(100vw - 48px));
  margin-inline: auto;
}

.bot-dashboard-app {
  grid-template-columns: 240px minmax(0, 1180px);
  align-items: start;
  justify-content: center;
}

.bot-dashboard-main {
  display: grid;
  gap: 22px;
  min-width: 0;
  width: 100%;
}

.bot-dashboard-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
  min-width: 0;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.02)),
    var(--panel);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.16);
}

.bot-dashboard-side-profile {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.bot-dashboard-side-profile .bot-dashboard-avatar {
  width: 58px;
  height: 58px;
}

.bot-dashboard-side-profile h2 {
  overflow: hidden;
  margin: 4px 0 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.2rem;
}

.bot-dashboard-side-profile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.bot-dashboard-side-nav,
.bot-dashboard-side-section,
.bot-dashboard-danger {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(var(--muted-rgb), 0.12);
}

.bot-dashboard-side-nav a {
  display: block;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 850;
  text-decoration: none;
}

.bot-dashboard-side-nav a:hover,
.bot-dashboard-side-nav a:focus-visible,
.bot-dashboard-side-nav a.is-active {
  border-color: rgba(var(--accent-rgb), 0.26);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--text);
}

.bot-dashboard-side .bot-dashboard-server {
  min-width: 0;
  width: 100%;
}

.bot-dashboard-side .bot-dashboard-runtime,
.bot-dashboard-side-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.bot-dashboard-side .button,
.bot-dashboard-danger .button {
  width: 100%;
}

.bot-dashboard-side .bot-dashboard-customize {
  position: static;
}

.bot-dashboard-side .bot-dashboard-customize-menu {
  position: static;
  grid-template-columns: 1fr;
  width: 100%;
  margin-top: 10px;
  box-shadow: none;
}

.bot-dashboard-side .bot-dashboard-add-preview {
  position: static;
}

.bot-dashboard-danger summary {
  color: var(--muted);
  font-weight: 850;
  cursor: pointer;
}

.bot-dashboard-danger form {
  margin: 8px 0 0;
}

.bot-dashboard-shell.is-editing .bot-dashboard-card {
  border-color: rgba(var(--accent-rgb), 0.24);
}

.bot-dashboard-head,
.bot-dashboard-kpis,
.bot-dashboard-card {
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.072), rgba(255, 255, 255, 0.024)),
    var(--panel);
  box-shadow:
    0 18px 70px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.bot-dashboard-card {
  --widget-accent-rgb: var(--accent-rgb);
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
}

.bot-dashboard-card-bot_basics {
  --widget-accent-rgb: var(--accent-rgb);
}

.bot-dashboard-card-command_category,
.bot-dashboard-card-command_activity,
.bot-dashboard-card-bot_stats,
.bot-dashboard-card-trigger_breakdown,
.bot-dashboard-card-activity_breakdown,
.bot-dashboard-card-moderation_hq {
  --widget-accent-rgb: var(--accent-rgb);
}

.bot-dashboard-card-pinned_state,
.bot-dashboard-card-storage_overview,
.bot-dashboard-card-custom_records,
.bot-dashboard-card-ticketing_hq {
  --widget-accent-rgb: var(--accent-warm-rgb);
}

.bot-dashboard-card-collaborators {
  --widget-accent-rgb: var(--accent-rgb);
}

.bot-dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 4px;
  background: linear-gradient(90deg, rgba(var(--widget-accent-rgb), 0.88), rgba(var(--widget-accent-rgb), 0.12) 64%, transparent);
  pointer-events: none;
}

.bot-dashboard-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(145deg, rgba(var(--widget-accent-rgb), 0.085), transparent 38%),
    transparent;
}

.bot-dashboard-card > * {
  position: relative;
  z-index: 1;
}

.bot-dashboard-icon {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bot-dashboard-head {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, auto);
  gap: 18px;
  align-items: center;
  padding: 18px;
}

.bot-dashboard-identity,
.bot-dashboard-controls,
.bot-dashboard-card-head,
.bot-dashboard-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.bot-dashboard-controls {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.bot-dashboard-controls form {
  margin: 0;
}

.bot-dashboard-avatar {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
}

.bot-dashboard-avatar-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent), var(--accent-warm));
  color: var(--theme-button-text);
  font-size: 1.18rem;
  font-weight: 950;
}

.bot-dashboard-identity h2,
.bot-dashboard-card h3 {
  margin: 4px 0;
}

.bot-dashboard-identity h2,
.bot-dashboard-card h3,
.bot-dashboard-row strong,
.bot-dashboard-category strong,
.bot-dashboard-command-list strong,
.bot-dashboard-command-item strong,
.bot-dashboard-collaborator-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-identity p,
.bot-dashboard-row span,
.bot-dashboard-category small,
.bot-dashboard-command-list span,
.bot-dashboard-command-item span,
.bot-dashboard-empty-line,
.bot-dashboard-collaborator-row span,
.bot-dashboard-record-head span,
.bot-dashboard-customize-menu span {
  color: var(--muted);
}

.bot-dashboard-server {
  min-width: 210px;
}

.bot-dashboard-server label,
.bot-dashboard-json-form label,
.bot-dashboard-settings-form label {
  display: grid;
  gap: 7px;
}

.bot-dashboard-runtime {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.bot-dashboard-runtime.is-pending {
  opacity: 0.86;
}

.bot-dashboard-runtime .button {
  min-width: 82px;
}

.bot-dashboard-runtime-status {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
}

.bot-dashboard-customize {
  position: relative;
}

.bot-dashboard-customize summary {
  list-style: none;
  cursor: pointer;
}

.bot-dashboard-customize summary::-webkit-details-marker {
  display: none;
}

.bot-dashboard-customize-menu {
  position: absolute;
  z-index: 40;
  right: 0;
  top: calc(100% + 10px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.72fr);
  gap: 8px;
  align-items: start;
  width: min(680px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.18);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.bot-dashboard-customize-menu > .eyebrow {
  grid-column: 1 / -1;
}

.bot-dashboard-premium-widget-banner {
  display: grid;
  grid-column: 1 / -1;
  gap: 4px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(var(--accent-warm-rgb), 0.28);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--accent-warm-rgb), 0.13), rgba(255, 255, 255, 0.028)),
    rgba(255, 255, 255, 0.032);
}

.bot-dashboard-premium-widget-banner strong,
.bot-dashboard-premium-widget-banner span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-dashboard-premium-widget-banner strong {
  color: var(--text);
  font-size: 0.86rem;
}

.bot-dashboard-premium-widget-banner span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 740;
  line-height: 1.35;
}

.bot-dashboard-add-options {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-height: min(520px, calc(100vh - 190px));
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.38) transparent;
}

.bot-dashboard-add-preview {
  position: sticky;
  top: 0;
  min-width: 0;
}

.bot-dashboard-add-preview[hidden] {
  display: none;
}

.bot-dashboard-add-preview-card.bot-dashboard-card {
  display: grid;
  grid-column: auto;
  grid-row: auto;
  gap: 12px;
  min-height: 280px;
  max-height: min(500px, calc(100vh - 210px));
  padding: 14px;
  overflow: hidden;
  box-shadow: none;
}

.bot-dashboard-add-preview-card > :not(.bot-dashboard-card-head) {
  min-height: 0;
  overflow: auto;
}

.bot-dashboard-add-preview-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 720;
  line-height: 1.4;
}

.bot-dashboard-customize-menu form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.bot-dashboard-customize-menu form.is-locked {
  border-color: rgba(var(--accent-warm-rgb), 0.22);
  background:
    linear-gradient(145deg, rgba(var(--accent-warm-rgb), 0.095), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.032);
}

.bot-dashboard-customize-menu form.is-locked button[disabled] {
  opacity: 0.78;
  cursor: not-allowed;
}

.bot-dashboard-customize-menu form > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bot-dashboard-customize-menu strong,
.bot-dashboard-customize-menu span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-notice {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(var(--muted-rgb), 0.32);
  border-radius: 8px;
  background: rgba(var(--muted-rgb), 0.08);
}

.bot-dashboard-notice span {
  color: var(--muted);
  line-height: 1.5;
}

.bot-dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}

.bot-dashboard-kpis div {
  display: grid;
  gap: 6px;
  min-height: 110px;
  padding: 16px;
  border-right: 1px solid rgba(var(--muted-rgb), 0.12);
}

.bot-dashboard-kpis div:last-child {
  border-right: 0;
}

.bot-dashboard-kpis span,
.bot-dashboard-kpis small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.bot-dashboard-kpis strong {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-size: 1.55rem;
  line-height: 1.06;
  white-space: nowrap;
}

.bot-dashboard-grid {
  position: relative;
  display: grid;
  --widget-row-height: 132px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: var(--widget-row-height);
  grid-auto-flow: row;
  align-items: stretch;
  gap: 18px;
  min-width: 0;
  border-radius: 8px;
}

.bot-dashboard-shell.is-editing .bot-dashboard-grid {
  padding: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  background: rgba(255, 255, 255, 0.018);
}

.bot-dashboard-grid.is-drop-ready {
  outline: 1px solid rgba(var(--accent-rgb), 0.32);
  outline-offset: 12px;
}

.bot-dashboard-snap-layer {
  position: absolute;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}

.bot-dashboard-snap-layer[hidden] {
  display: none;
}

.bot-dashboard-snap-cells {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  overflow: hidden;
  border-radius: 8px;
  opacity: 0.9;
}

.bot-dashboard-snap-cells::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent var(--widget-row-height),
    rgba(var(--accent-rgb), 0.12) calc(var(--widget-row-height) + 1px),
    transparent calc(var(--widget-row-height) + 2px),
    transparent calc(var(--widget-row-height) + 18px)
  );
}

.bot-dashboard-snap-cells span {
  min-width: 0;
  min-height: 100%;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.045), rgba(255, 255, 255, 0.016));
}

.bot-dashboard-snap-preview {
  position: absolute;
  z-index: 90;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  border: 2px solid rgba(var(--accent-rgb), 0.84);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.18), rgba(255, 255, 255, 0.055)),
    rgba(var(--accent-rgb), 0.1);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 20px 60px rgba(var(--accent-rgb), 0.18);
  transition: none;
}

.bot-dashboard-snap-preview[hidden] {
  display: none;
}

.bot-dashboard-snap-preview::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    rgba(0, 0, 0, 0.08);
}

.bot-dashboard-snap-preview.is-invalid {
  border-color: rgba(255, 98, 98, 0.92);
  background:
    linear-gradient(145deg, rgba(255, 98, 98, 0.2), rgba(255, 255, 255, 0.045)),
    rgba(255, 98, 98, 0.11);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 18px 48px rgba(255, 98, 98, 0.18);
}

.bot-dashboard-displace-preview {
  position: absolute;
  z-index: 86;
  border: 1px dashed rgba(var(--accent-rgb), 0.42);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.095), rgba(255, 255, 255, 0.024)),
    rgba(var(--bg-rgb), 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.055);
  pointer-events: none;
}

.bot-dashboard-card {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: start;
  grid-column: var(--widget-col, auto) / span var(--widget-span, 6);
  gap: 16px;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  scroll-margin-top: 92px;
  transition: opacity 0.16s ease, transform 0.16s ease, border-color 0.16s ease, grid-column 0.16s ease, grid-row 0.16s ease;
}

.bot-dashboard-grid > .bot-dashboard-card {
  grid-row: var(--widget-row, auto) / span var(--widget-rows, 2);
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  height: 100%;
  overflow: hidden;
}

.bot-dashboard-grid > .bot-dashboard-card > :not(.bot-dashboard-card-head) {
  min-height: 0;
  overflow: hidden;
}

.bot-dashboard-card.is-compact {
  --widget-span: 3;
  --widget-rows: 2;
}

.bot-dashboard-card.is-side {
  --widget-span: 4;
  --widget-rows: 3;
}

.bot-dashboard-card.is-half {
  --widget-span: 6;
  --widget-rows: 3;
}

.bot-dashboard-card.is-wide {
  --widget-span: 8;
  --widget-rows: 4;
}

.bot-dashboard-card.is-full {
  --widget-col: 1;
  --widget-span: 12;
  --widget-rows: 5;
}

.bot-dashboard-card.is-dragging {
  opacity: 0.72;
  transform: scale(0.995);
  border-color: rgba(var(--accent-rgb), 0.48);
}

.bot-dashboard-card.is-save-error,
.js-panel-command.is-save-error {
  border-color: rgba(255, 98, 98, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 98, 98, 0.2);
}

.bot-dashboard-card.is-widget-dragging {
  position: fixed;
  z-index: 120;
  margin: 0;
  opacity: 0.96;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  pointer-events: none;
  cursor: grabbing;
  will-change: transform;
  transition: none;
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(var(--accent-rgb), 0.36);
}

.bot-dashboard-card.is-widget-dragging > :not(.bot-dashboard-card-head) {
  min-height: 0;
  overflow: hidden;
}

.bot-dashboard-card.is-widget-origin {
  opacity: 0.28;
  pointer-events: none;
}

.bot-dashboard-card.is-layout-preview {
  border-color: rgba(var(--widget-accent-rgb), 0.34);
}

.bot-dashboard-placeholder {
  position: relative;
  z-index: 25;
  display: block;
  grid-column: var(--widget-col, auto) / span var(--widget-span, 6);
  grid-row: span var(--widget-rows, 2);
  min-height: 150px;
  border: 1px dashed rgba(var(--accent-rgb), 0.62);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.13), rgba(255, 255, 255, 0.035)),
    rgba(var(--accent-rgb), 0.055);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.14);
}

.bot-dashboard-placeholder.is-compact {
  --widget-span: 3;
  --widget-rows: 2;
}

.bot-dashboard-placeholder.is-side {
  --widget-span: 4;
  --widget-rows: 3;
}

.bot-dashboard-placeholder.is-half {
  --widget-span: 6;
  --widget-rows: 3;
}

.bot-dashboard-placeholder.is-wide {
  --widget-span: 8;
  --widget-rows: 4;
}

.bot-dashboard-placeholder.is-full {
  --widget-col: 1;
  --widget-span: 12;
  --widget-rows: 5;
}

body.is-dashboard-widget-dragging {
  cursor: grabbing;
  user-select: none;
}

.bot-dashboard-card-head {
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(var(--muted-rgb), 0.105);
}

.bot-dashboard-card-title > div {
  min-width: 0;
}

.bot-dashboard-card-head form {
  margin: 0;
}

.bot-dashboard-card-edit {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.bot-dashboard-card.is-compact .bot-dashboard-card-head,
.bot-dashboard-card.is-side .bot-dashboard-card-head {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
}

.bot-dashboard-card.is-compact .bot-dashboard-card-edit,
.bot-dashboard-card.is-side .bot-dashboard-card-edit,
.bot-dashboard-card.is-compact .bot-dashboard-card-edit form,
.bot-dashboard-card.is-side .bot-dashboard-card-edit form,
.bot-dashboard-card.is-compact .bot-dashboard-card-edit .button,
.bot-dashboard-card.is-side .bot-dashboard-card-edit .button {
  width: 100%;
}

.bot-dashboard-card.is-side .bot-dashboard-card-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.bot-dashboard-card.is-side .bot-dashboard-card-edit,
.bot-dashboard-card.is-side .bot-dashboard-card-edit form,
.bot-dashboard-card.is-side .bot-dashboard-card-edit .button {
  justify-self: end;
  width: auto;
}

.bot-dashboard-layout-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.032);
}

.bot-dashboard-layout-controls button {
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
  cursor: pointer;
}

.bot-dashboard-layout-controls button:hover,
.bot-dashboard-layout-controls button.is-active {
  border-color: rgba(var(--accent-rgb), 0.34);
  background: rgba(var(--accent-rgb), 0.11);
  color: var(--text);
}

.bot-dashboard-drag {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(var(--muted-rgb), 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 0;
  font-weight: 950;
  cursor: grab;
  touch-action: none;
}

.bot-dashboard-drag::before {
  content: "";
  width: 14px;
  height: 18px;
  opacity: 0.84;
  background-image: radial-gradient(circle, currentColor 1.6px, transparent 1.8px);
  background-position: 0 0;
  background-size: 7px 6px;
}

.bot-dashboard-drag:hover,
.bot-dashboard-drag:focus-visible {
  border-color: rgba(var(--widget-accent-rgb), 0.5);
  background: rgba(var(--widget-accent-rgb), 0.105);
  color: var(--text);
}

.bot-dashboard-drag:active {
  cursor: grabbing;
}

.bot-dashboard-widget-icon,
.bot-dashboard-row-icon,
.bot-dashboard-command-icon,
.bot-dashboard-metric-icon,
.bot-dashboard-record-icon,
.bot-dashboard-section-title > span,
.bot-dashboard-button-with-icon > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(var(--widget-accent-rgb), 0.22);
  border-radius: 8px;
  background: rgba(var(--widget-accent-rgb), 0.095);
  color: var(--accent);
}

.bot-dashboard-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 880;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bot-dashboard-section-title > span,
.bot-dashboard-row-icon,
.bot-dashboard-command-icon,
.bot-dashboard-metric-icon,
.bot-dashboard-record-icon,
.bot-dashboard-button-with-icon > span {
  width: 30px;
  height: 30px;
}

.bot-dashboard-button-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
}

.bot-dashboard-button-with-icon > span {
  border: 0;
  background: transparent;
}

.bot-dashboard-resize {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 8;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(var(--muted-rgb), 0.22);
  border-radius: 7px;
  background:
    linear-gradient(135deg, transparent 48%, rgba(var(--accent-rgb), 0.6) 50%, transparent 52%) center / 16px 16px no-repeat,
    rgba(var(--bg-rgb), 0.72);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  cursor: nwse-resize;
  touch-action: none;
}

.bot-dashboard-resize:hover,
.bot-dashboard-resize:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.56);
  background:
    linear-gradient(135deg, transparent 48%, rgba(var(--accent-rgb), 0.82) 50%, transparent 52%) center / 16px 16px no-repeat,
    rgba(var(--bg-rgb), 0.88);
}

.bot-dashboard-card.is-widget-dragging .bot-dashboard-resize {
  display: none;
}

.bot-dashboard-card.is-widget-resizing {
  border-color: rgba(var(--accent-rgb), 0.52);
}

body.is-dashboard-widget-resizing {
  cursor: nwse-resize;
  user-select: none;
}

.bot-dashboard-two-col,
.bot-dashboard-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 12px;
  align-content: start;
}

.bot-dashboard-metric-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  gap: 10px;
  align-content: start;
  min-width: 0;
}

.bot-dashboard-list,
.bot-dashboard-collaborators,
.bot-dashboard-record-widget,
.bot-dashboard-ops-widget {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}

.bot-dashboard-grid > .bot-dashboard-card > .bot-dashboard-command-list,
.bot-dashboard-grid > .bot-dashboard-card > .bot-dashboard-record-widget,
.bot-dashboard-grid > .bot-dashboard-card > .bot-dashboard-collaborators,
.bot-dashboard-grid > .bot-dashboard-card > .bot-dashboard-metric-list,
.bot-dashboard-grid > .bot-dashboard-card > .bot-dashboard-resource-widget,
.bot-dashboard-grid > .bot-dashboard-card > .bot-dashboard-list,
.bot-dashboard-grid > .bot-dashboard-card > .bot-dashboard-visual-widget,
.bot-dashboard-grid > .bot-dashboard-card > .bot-dashboard-compact-widget,
.bot-dashboard-grid > .bot-dashboard-card > .bot-dashboard-quota-widget,
.bot-dashboard-grid > .bot-dashboard-card > .bot-dashboard-ops-widget,
.bot-dashboard-card .bot-dashboard-command-list,
.bot-dashboard-card .bot-dashboard-record-widget,
.bot-dashboard-card .bot-dashboard-collaborators,
.bot-dashboard-card .bot-dashboard-metric-list,
.bot-dashboard-card .bot-dashboard-resource-widget,
.bot-dashboard-card .bot-dashboard-list,
.bot-dashboard-card .bot-dashboard-visual-widget,
.bot-dashboard-card .bot-dashboard-compact-widget,
.bot-dashboard-card .bot-dashboard-quota-widget,
.bot-dashboard-card .bot-dashboard-ops-widget {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.46) rgba(var(--muted-rgb), 0.06);
}

.bot-dashboard-card .bot-dashboard-command-list::-webkit-scrollbar,
.bot-dashboard-card .bot-dashboard-record-widget::-webkit-scrollbar,
.bot-dashboard-card .bot-dashboard-collaborators::-webkit-scrollbar,
.bot-dashboard-card .bot-dashboard-metric-list::-webkit-scrollbar,
.bot-dashboard-card .bot-dashboard-resource-widget::-webkit-scrollbar,
.bot-dashboard-card .bot-dashboard-list::-webkit-scrollbar,
.bot-dashboard-card .bot-dashboard-visual-widget::-webkit-scrollbar,
.bot-dashboard-card .bot-dashboard-compact-widget::-webkit-scrollbar,
.bot-dashboard-card .bot-dashboard-quota-widget::-webkit-scrollbar,
.bot-dashboard-card .bot-dashboard-ops-widget::-webkit-scrollbar,
.bot-dashboard-two-col > .bot-dashboard-list::-webkit-scrollbar,
.bot-dashboard-command-modal-grid::-webkit-scrollbar,
.bot-dashboard-command-modal-panel::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.bot-dashboard-card .bot-dashboard-command-list::-webkit-scrollbar-track,
.bot-dashboard-card .bot-dashboard-record-widget::-webkit-scrollbar-track,
.bot-dashboard-card .bot-dashboard-collaborators::-webkit-scrollbar-track,
.bot-dashboard-card .bot-dashboard-metric-list::-webkit-scrollbar-track,
.bot-dashboard-card .bot-dashboard-resource-widget::-webkit-scrollbar-track,
.bot-dashboard-card .bot-dashboard-list::-webkit-scrollbar-track,
.bot-dashboard-card .bot-dashboard-visual-widget::-webkit-scrollbar-track,
.bot-dashboard-card .bot-dashboard-compact-widget::-webkit-scrollbar-track,
.bot-dashboard-card .bot-dashboard-quota-widget::-webkit-scrollbar-track,
.bot-dashboard-card .bot-dashboard-ops-widget::-webkit-scrollbar-track,
.bot-dashboard-two-col > .bot-dashboard-list::-webkit-scrollbar-track,
.bot-dashboard-command-modal-grid::-webkit-scrollbar-track,
.bot-dashboard-command-modal-panel::-webkit-scrollbar-track {
  background: rgba(var(--muted-rgb), 0.05);
  border-radius: 999px;
}

.bot-dashboard-card .bot-dashboard-command-list::-webkit-scrollbar-thumb,
.bot-dashboard-card .bot-dashboard-record-widget::-webkit-scrollbar-thumb,
.bot-dashboard-card .bot-dashboard-collaborators::-webkit-scrollbar-thumb,
.bot-dashboard-card .bot-dashboard-metric-list::-webkit-scrollbar-thumb,
.bot-dashboard-card .bot-dashboard-resource-widget::-webkit-scrollbar-thumb,
.bot-dashboard-card .bot-dashboard-list::-webkit-scrollbar-thumb,
.bot-dashboard-card .bot-dashboard-visual-widget::-webkit-scrollbar-thumb,
.bot-dashboard-card .bot-dashboard-compact-widget::-webkit-scrollbar-thumb,
.bot-dashboard-card .bot-dashboard-quota-widget::-webkit-scrollbar-thumb,
.bot-dashboard-card .bot-dashboard-ops-widget::-webkit-scrollbar-thumb,
.bot-dashboard-two-col > .bot-dashboard-list::-webkit-scrollbar-thumb,
.bot-dashboard-command-modal-grid::-webkit-scrollbar-thumb,
.bot-dashboard-command-modal-panel::-webkit-scrollbar-thumb {
  border: 2px solid rgba(var(--muted-rgb), 0.05);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.44);
  background-clip: padding-box;
}

.bot-dashboard-grid > .bot-dashboard-card > .bot-dashboard-category-single,
.bot-dashboard-grid > .bot-dashboard-card > .bot-dashboard-two-col {
  overflow: hidden;
}

.bot-dashboard-two-col > .bot-dashboard-list {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.46) rgba(var(--muted-rgb), 0.06);
}

.bot-dashboard-card.is-compact .bot-dashboard-two-col,
.bot-dashboard-card.is-side .bot-dashboard-two-col,
.bot-dashboard-card.is-compact .bot-dashboard-category-grid,
.bot-dashboard-card.is-side .bot-dashboard-category-grid,
.bot-dashboard-card.is-compact .bot-dashboard-metric-list,
.bot-dashboard-card.is-side .bot-dashboard-metric-list,
.bot-dashboard-card.is-compact .bot-dashboard-resource-widget,
.bot-dashboard-card.is-side .bot-dashboard-resource-widget,
.bot-dashboard-card.is-compact .bot-dashboard-visual-widget,
.bot-dashboard-card.is-side .bot-dashboard-visual-widget,
.bot-dashboard-card.is-compact .bot-dashboard-quota-widget,
.bot-dashboard-card.is-side .bot-dashboard-quota-widget,
.bot-dashboard-card.is-compact .bot-dashboard-ops-hero,
.bot-dashboard-card.is-side .bot-dashboard-ops-hero,
.bot-dashboard-card.is-compact .bot-dashboard-ops-suite,
.bot-dashboard-card.is-side .bot-dashboard-ops-suite,
.bot-dashboard-card.is-compact .bot-dashboard-ops-widget-top,
.bot-dashboard-card.is-side .bot-dashboard-ops-widget-top,
.bot-dashboard-card.is-compact .bot-dashboard-ops-widget-grid,
.bot-dashboard-card.is-side .bot-dashboard-ops-widget-grid,
.bot-dashboard-card.is-compact .bot-dashboard-ops-case-grid,
.bot-dashboard-card.is-side .bot-dashboard-ops-case-grid,
.bot-dashboard-card.is-compact .bot-dashboard-ops-body,
.bot-dashboard-card.is-side .bot-dashboard-ops-body {
  grid-template-columns: 1fr;
}

.bot-dashboard-row,
.bot-dashboard-category,
.bot-dashboard-collaborator-row,
.bot-dashboard-record-head,
.bot-dashboard-metric-tile {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.026);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.bot-dashboard-metric-tile {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.bot-dashboard-metric-tile > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bot-dashboard-metric-tile span,
.bot-dashboard-metric-tile small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-metric-tile strong {
  overflow: hidden;
  color: var(--text);
  font-size: 1.42rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-ops-widget {
  gap: 12px;
  min-height: 0;
}

.bot-dashboard-ops-hero {
  display: grid;
  grid-template-columns: minmax(104px, 0.32fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.bot-dashboard-ops-score {
  --usage: 0%;
  display: grid;
  place-items: center;
  align-content: center;
  width: min(118px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, var(--panel) 0 57%, transparent 58%),
    conic-gradient(rgba(var(--widget-accent-rgb), 0.96) var(--usage), rgba(var(--muted-rgb), 0.17) 0);
}

.bot-dashboard-ops-score strong {
  color: var(--text);
  font-size: 1.48rem;
  line-height: 1;
}

.bot-dashboard-ops-score span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.bot-dashboard-ops-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.bot-dashboard-ops-copy strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.2;
}

.bot-dashboard-ops-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 720;
  line-height: 1.45;
}

.bot-dashboard-ops-status,
.bot-dashboard-ops-tags span,
.bot-dashboard-ops-event > span {
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid rgba(var(--widget-accent-rgb), 0.24);
  border-radius: 999px;
  background: rgba(var(--widget-accent-rgb), 0.105);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.bot-dashboard-ops-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(118px, 100%), 1fr));
  gap: 8px;
  min-width: 0;
}

.bot-dashboard-ops-metric,
.bot-dashboard-ops-panel,
.bot-dashboard-ops-lane,
.bot-dashboard-ops-event,
.bot-dashboard-ops-command,
.bot-dashboard-ops-panel-row,
.bot-dashboard-ops-case {
  min-width: 0;
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.046), rgba(255, 255, 255, 0.014)),
    rgba(0, 0, 0, 0.055);
}

.bot-dashboard-ops-metric {
  display: grid;
  gap: 3px;
  padding: 10px;
}

.bot-dashboard-ops-metric span,
.bot-dashboard-ops-metric small,
.bot-dashboard-ops-lane span,
.bot-dashboard-ops-event small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-ops-metric strong {
  overflow: hidden;
  color: var(--text);
  font-size: 1.22rem;
  line-height: 1.04;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-ops-suite,
.bot-dashboard-ops-case-grid,
.bot-dashboard-ops-command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.bot-dashboard-ops-command-grid {
  gap: 10px;
  padding: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  align-items: start;
  max-height: min(560px, 70vh);
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.46) rgba(var(--muted-rgb), 0.06);
}

.bot-dashboard-ops-command-section,
.bot-dashboard-ops-command-list {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.bot-dashboard-ops-command-list {
  grid-template-columns: repeat(auto-fit, minmax(min(148px, 100%), 1fr));
}

.bot-dashboard-ops-command-section {
  padding: 9px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.024);
}

.bot-dashboard-ops-command-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

.bot-dashboard-ops-command-section-head strong,
.bot-dashboard-ops-command-section-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-ops-command-section-head strong {
  color: var(--text);
  font-size: 0.9rem;
}

.bot-dashboard-ops-command-section-head span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
}

.bot-dashboard-ops-command-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 6px 7px;
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.014)),
    rgba(0, 0, 0, 0.055);
  color: inherit;
  font: inherit;
  text-align: left;
}

button.bot-dashboard-ops-command-card {
  appearance: none;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

button.bot-dashboard-ops-command-card:hover,
button.bot-dashboard-ops-command-card:focus-visible {
  border-color: rgba(var(--widget-accent-rgb), 0.32);
  background:
    linear-gradient(145deg, rgba(var(--widget-accent-rgb), 0.09), rgba(255, 255, 255, 0.018)),
    rgba(0, 0, 0, 0.05);
}

button.bot-dashboard-ops-command-card:focus-visible {
  outline: 2px solid rgba(var(--widget-accent-rgb), 0.34);
  outline-offset: 2px;
}

.bot-dashboard-ops-command-card.is-disabled {
  opacity: 0.7;
}

.bot-dashboard-ops-command-trigger,
.bot-dashboard-ops-command-state {
  width: fit-content;
  max-width: 100%;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(var(--widget-accent-rgb), 0.11);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.bot-dashboard-ops-command-trigger {
  display: none;
}

.bot-dashboard-ops-command-state.is-disabled {
  background: rgba(var(--muted-rgb), 0.1);
  color: var(--muted);
}

.bot-dashboard-ops-command-main {
  display: grid;
  min-width: 0;
}

.bot-dashboard-ops-command-main strong,
.bot-dashboard-ops-command-main small,
.bot-dashboard-ops-command-main em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-ops-command-main strong {
  color: var(--text);
  font-size: 0.78rem;
}

.bot-dashboard-ops-command-main small,
.bot-dashboard-ops-command-main em {
  display: none;
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 760;
}

.bot-dashboard-ops-page-stack,
.bot-dashboard-ops-workspace {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.bot-dashboard-suite-page.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.bot-dashboard-ops-status-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.bot-dashboard-ops-state-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.bot-dashboard-ops-state-strip div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.bot-dashboard-ops-state-strip span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.bot-dashboard-ops-state-strip strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.bot-dashboard-ops-state-strip .is-state-open,
.bot-dashboard-ops-state-strip .is-state-assigned {
  border-color: rgba(var(--widget-accent-rgb), 0.2);
}

.bot-dashboard-ops-state-strip .is-state-escalated,
.bot-dashboard-ops-state-strip .is-state-attention {
  border-color: rgba(255, 191, 87, 0.34);
  background: rgba(255, 191, 87, 0.06);
}

.bot-dashboard-ops-state-strip .is-state-resolved {
  border-color: rgba(95, 211, 162, 0.26);
  background: rgba(95, 211, 162, 0.055);
}

.bot-dashboard-ops-workspace {
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.55fr) minmax(280px, 0.8fr);
  align-items: start;
}

.bot-dashboard-ops-queue-panel,
.bot-dashboard-ops-ticket-page,
.bot-dashboard-ops-ticket-side {
  grid-column: auto;
  grid-row: auto;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
}

.bot-dashboard-ops-page-stack > .bot-dashboard-card {
  grid-column: auto;
  grid-row: auto;
}

.bot-dashboard-ops-queue-panel {
  position: static;
}

.bot-dashboard-ops-case-board {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.bot-dashboard-ops-command,
.bot-dashboard-ops-panel-row {
  display: grid;
  grid-template-columns: minmax(82px, auto) minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 9px;
}

.bot-dashboard-ops-command-form,
.bot-dashboard-ops-panel-form {
  grid-template-columns: auto minmax(76px, 0.42fr) minmax(120px, 0.76fr) minmax(160px, 1fr) auto;
  align-items: center;
}

.bot-dashboard-ops-command-form .switch-control,
.bot-dashboard-ops-panel-form .switch-control {
  width: 38px;
  height: 22px;
}

.bot-dashboard-ops-command-form .switch-control span::after,
.bot-dashboard-ops-panel-form .switch-control span::after {
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
}

.bot-dashboard-ops-command-form .switch-control input:checked + span::after,
.bot-dashboard-ops-panel-form .switch-control input:checked + span::after {
  transform: translateX(16px);
}

.bot-dashboard-ops-command-form input[type="text"],
.bot-dashboard-ops-panel-form input[type="text"] {
  min-width: 0;
  height: 34px;
  padding: 7px 9px;
  font-size: 0.76rem;
}

.bot-dashboard-ops-command-form .button,
.bot-dashboard-ops-panel-form .button {
  min-height: 32px;
  padding: 0 8px;
  font-size: 0.72rem;
}

.bot-dashboard-ops-command > span,
.bot-dashboard-ops-panel-row > span {
  align-self: start;
  max-width: 120px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(var(--widget-accent-rgb), 0.11);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.bot-dashboard-ops-command > div,
.bot-dashboard-ops-panel-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bot-dashboard-ops-command strong,
.bot-dashboard-ops-panel-row strong,
.bot-dashboard-ops-command small,
.bot-dashboard-ops-panel-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-ops-command strong,
.bot-dashboard-ops-panel-row strong {
  color: var(--text);
  font-size: 0.84rem;
}

.bot-dashboard-ops-command small,
.bot-dashboard-ops-panel-row small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 760;
}

.bot-dashboard-ops-case {
  position: relative;
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 116px;
  padding: 10px;
  text-decoration: none;
}

.bot-dashboard-ops-case-link {
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.bot-dashboard-ops-case-link:hover,
.bot-dashboard-ops-case-link:focus-visible,
.bot-dashboard-ops-case-link.is-selected {
  border-color: rgba(var(--widget-accent-rgb), 0.34);
  background:
    linear-gradient(145deg, rgba(var(--widget-accent-rgb), 0.08), rgba(255, 255, 255, 0.018)),
    rgba(0, 0, 0, 0.045);
}

.bot-dashboard-ops-case-link:focus-visible {
  outline: 2px solid rgba(var(--widget-accent-rgb), 0.34);
  outline-offset: 2px;
}

.bot-dashboard-ops-case.is-state-escalated,
.bot-dashboard-ops-case.is-state-attention {
  border-color: rgba(255, 191, 87, 0.28);
}

.bot-dashboard-ops-case.is-state-resolved {
  border-color: rgba(95, 211, 162, 0.24);
}

.bot-dashboard-ops-case span,
.bot-dashboard-ops-case small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-ops-case strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-ops-case em {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(var(--widget-accent-rgb), 0.12);
  color: var(--accent);
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.bot-dashboard-ops-case.is-state-escalated em,
.bot-dashboard-ops-case.is-state-attention em,
.bot-dashboard-ops-state-pill.is-state-escalated,
.bot-dashboard-ops-state-pill.is-state-attention {
  background: rgba(255, 191, 87, 0.14);
  color: #ffd391;
}

.bot-dashboard-ops-case.is-state-resolved em,
.bot-dashboard-ops-state-pill.is-state-resolved {
  background: rgba(95, 211, 162, 0.13);
  color: #9ff0cb;
}

.bot-dashboard-ops-case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.bot-dashboard-ops-case-meta small {
  width: fit-content;
  max-width: 100%;
  padding: 3px 6px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  line-height: 1;
}

.bot-dashboard-ops-case-modal {
  width: min(980px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 48px));
  max-height: min(760px, calc(100vh - 48px));
}

.bot-dashboard-ops-case-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 12px;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding-top: 14px;
}

.bot-dashboard-ops-case-modal-panel,
.bot-dashboard-ops-transcript,
.bot-dashboard-ops-evidence,
.bot-dashboard-ops-history,
.bot-dashboard-ops-case-modal-actions {
  display: grid;
  gap: 10px;
  min-width: 0;
  align-content: start;
}

.bot-dashboard-ops-case-modal-panel {
  padding: 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.52);
}

.bot-dashboard-ops-case-modal-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bot-dashboard-ops-case-modal-title strong {
  color: var(--text);
  font-size: 0.95rem;
}

.bot-dashboard-ops-transcript-message {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.032);
}

.bot-dashboard-ops-transcript-message.is-staff {
  border-color: rgba(var(--widget-accent-rgb), 0.22);
  background: rgba(var(--widget-accent-rgb), 0.07);
}

.bot-dashboard-ops-transcript-message span,
.bot-dashboard-ops-case-facts span,
.bot-dashboard-ops-history span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.bot-dashboard-ops-transcript-message p {
  margin: 0;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.45;
}

.bot-dashboard-ops-case-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.bot-dashboard-ops-case-facts div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.bot-dashboard-ops-case-facts strong,
.bot-dashboard-ops-history strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-ops-evidence span {
  padding: 7px 9px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
}

.bot-dashboard-ops-history div {
  display: grid;
  gap: 3px;
  padding-left: 10px;
  border-left: 2px solid rgba(var(--widget-accent-rgb), 0.38);
}

.bot-dashboard-ops-case-modal-actions {
  padding-top: 10px;
  border-top: 1px solid rgba(var(--muted-rgb), 0.12);
}

.bot-dashboard-ops-case-modal-actions label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 840;
}

.bot-dashboard-ops-discord-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(var(--muted-rgb), 0.12);
}

.bot-dashboard-ops-discord-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(var(--widget-accent-rgb), 0.82), rgba(var(--accent-warm-rgb), 0.72));
  color: var(--theme-button-text);
  font-weight: 950;
}

.bot-dashboard-ops-discord-head h3 {
  margin: 0 0 5px;
  color: var(--text);
  font-size: 1.25rem;
}

.bot-dashboard-ops-discord-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.45;
}

.bot-dashboard-ops-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin-top: 9px;
}

.bot-dashboard-ops-role-list span,
.bot-dashboard-ops-state-pill {
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.bot-dashboard-ops-state-pill {
  justify-self: end;
  border-color: rgba(var(--widget-accent-rgb), 0.24);
  background: rgba(var(--widget-accent-rgb), 0.1);
  color: var(--accent);
}

.bot-dashboard-ops-discord-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.bot-dashboard-ops-discord-meta div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.bot-dashboard-ops-discord-meta span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.bot-dashboard-ops-discord-meta strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-ops-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.bot-dashboard-ops-widget-top,
.bot-dashboard-ops-widget-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.bot-dashboard-ops-widget-main,
.bot-dashboard-ops-widget-side,
.bot-dashboard-ops-case-stack,
.bot-dashboard-ops-mini-transcript,
.bot-dashboard-ops-command-summary {
  display: grid;
  gap: 9px;
  min-width: 0;
  align-content: start;
}

.bot-dashboard-ops-command-summary {
  height: 100%;
  padding: 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--widget-accent-rgb), 0.075), rgba(255, 255, 255, 0.014)),
    rgba(0, 0, 0, 0.055);
}

.bot-dashboard-ops-command-summary strong {
  color: var(--text);
  font-size: 1.55rem;
  line-height: 1;
}

.bot-dashboard-ops-command-summary span,
.bot-dashboard-ops-command-summary small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-ops-control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.bot-dashboard-ops-control-group {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.024);
}

.bot-dashboard-ops-control-group > div:first-child {
  display: grid;
  gap: 4px;
}

.bot-dashboard-ops-control-group strong {
  color: var(--text);
}

.bot-dashboard-ops-control-group span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 760;
  line-height: 1.35;
}

.bot-dashboard-ops-control-list {
  display: grid;
  gap: 7px;
}

.bot-dashboard-ops-control {
  display: grid;
  grid-template-columns: minmax(64px, 0.38fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.18);
  color: inherit;
  text-align: left;
}

.bot-dashboard-ops-control strong,
.bot-dashboard-ops-control span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-ops-control em {
  padding: 4px 6px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.bot-dashboard-ops-control.is-disabled {
  opacity: 0.58;
}

.bot-dashboard-ops-control:hover,
.bot-dashboard-ops-control:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.32);
  background: rgba(var(--accent-rgb), 0.06);
}

.bot-dashboard-ops-case-grid.is-capped {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bot-dashboard-ops-queue-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.bot-dashboard-ops-queue-footer span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
}

.bot-dashboard-ops-command-grid.is-collapsed {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bot-dashboard-ops-command-section[open] {
  align-content: start;
}

.bot-dashboard-ops-command-section summary {
  list-style: none;
  cursor: pointer;
}

.bot-dashboard-ops-command-section summary::-webkit-details-marker {
  display: none;
}

.bot-dashboard-ops-panel {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px;
}

.bot-dashboard-ops-lane {
  display: grid;
  gap: 7px;
  padding: 9px;
}

.bot-dashboard-ops-lane > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

.bot-dashboard-ops-lane strong {
  color: var(--text);
  font-size: 0.82rem;
  white-space: nowrap;
}

.bot-dashboard-ops-event {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 9px;
}

.bot-dashboard-ops-event > span {
  border-color: rgba(var(--muted-rgb), 0.16);
  background: rgba(var(--muted-rgb), 0.08);
  color: var(--muted);
}

.bot-dashboard-ops-event > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bot-dashboard-ops-event strong,
.bot-dashboard-ops-event small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-ops-event strong {
  color: var(--text);
  font-size: 0.86rem;
}

.bot-dashboard-ops-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.bot-dashboard-ops-tags span {
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.bot-panel-section.is-ops-view,
.bot-panel-section.is-ops-view .bot-dashboard-page,
.bot-panel-section.is-ops-view .bot-dashboard-ops-page-stack {
  background: transparent;
}

.bot-panel-section.is-ops-view {
  padding-top: 38px;
}

.bot-panel-section.is-ops-view > .dashboard-title-row {
  margin-bottom: 18px;
}

.bot-panel-section.is-ops-view .section-heading {
  margin-bottom: 0;
}

.bot-panel-section.is-ops-view .section-heading h1 {
  font-size: clamp(2.4rem, 3.7vw, 3.5rem);
}

.bot-panel-section.is-ops-view .section-heading p {
  max-width: 760px;
}

.bot-panel-section.is-ops-view .bot-dashboard-side,
.bot-panel-section.is-ops-view .bot-dashboard-card,
.bot-panel-section.is-ops-view .bot-dashboard-ops-state-strip div,
.bot-panel-section.is-ops-view .bot-dashboard-ops-metric,
.bot-panel-section.is-ops-view .bot-dashboard-ops-panel,
.bot-panel-section.is-ops-view .bot-dashboard-ops-lane,
.bot-panel-section.is-ops-view .bot-dashboard-ops-event,
.bot-panel-section.is-ops-view .bot-dashboard-ops-command,
.bot-panel-section.is-ops-view .bot-dashboard-ops-panel-row,
.bot-panel-section.is-ops-view .bot-dashboard-ops-case,
.bot-panel-section.is-ops-view .bot-dashboard-ops-command-section,
.bot-panel-section.is-ops-view .bot-dashboard-ops-command-card,
.bot-panel-section.is-ops-view .bot-dashboard-ops-command-summary,
.bot-panel-section.is-ops-view .bot-dashboard-row,
.bot-panel-section.is-ops-view .bot-dashboard-metric-tile {
  box-shadow: none;
}

.bot-panel-section.is-ops-view .bot-dashboard-side,
.bot-panel-section.is-ops-view .bot-dashboard-card {
  border-color: rgba(var(--muted-rgb), 0.13);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(var(--panel-rgb), 0.86);
}

.bot-panel-section.is-ops-view .bot-dashboard-card-head {
  border-bottom-color: rgba(var(--muted-rgb), 0.1);
}

.bot-panel-section.is-ops-view .bot-dashboard-ops-status-card {
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.54fr);
  gap: 18px;
}

.bot-panel-section.is-ops-view .bot-dashboard-ops-state-strip div,
.bot-panel-section.is-ops-view .bot-dashboard-ops-metric,
.bot-panel-section.is-ops-view .bot-dashboard-ops-panel,
.bot-panel-section.is-ops-view .bot-dashboard-ops-lane,
.bot-panel-section.is-ops-view .bot-dashboard-ops-event,
.bot-panel-section.is-ops-view .bot-dashboard-ops-command,
.bot-panel-section.is-ops-view .bot-dashboard-ops-panel-row,
.bot-panel-section.is-ops-view .bot-dashboard-ops-command-section,
.bot-panel-section.is-ops-view .bot-dashboard-ops-command-card,
.bot-panel-section.is-ops-view .bot-dashboard-ops-command-summary,
.bot-panel-section.is-ops-view .bot-dashboard-row,
.bot-panel-section.is-ops-view .bot-dashboard-metric-tile {
  border-color: rgba(var(--muted-rgb), 0.12);
  background: rgba(var(--bg-rgb), 0.24);
}

.bot-panel-section.is-ops-view .bot-dashboard-ops-case {
  min-height: 96px;
  border-color: rgba(var(--muted-rgb), 0.12);
  background: rgba(var(--bg-rgb), 0.22);
}

.bot-panel-section.is-ops-view .bot-dashboard-ops-case-link:hover,
.bot-panel-section.is-ops-view .bot-dashboard-ops-case-link:focus-visible,
.bot-panel-section.is-ops-view .bot-dashboard-ops-case-link.is-selected,
.bot-panel-section.is-ops-view button.bot-dashboard-ops-command-card:hover,
.bot-panel-section.is-ops-view button.bot-dashboard-ops-command-card:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.3);
  background: rgba(var(--text-rgb), 0.035);
}

.bot-panel-section.is-ops-view .bot-dashboard-ops-state-strip .is-state-escalated,
.bot-panel-section.is-ops-view .bot-dashboard-ops-state-strip .is-state-attention,
.bot-panel-section.is-ops-view .bot-dashboard-ops-case.is-state-escalated,
.bot-panel-section.is-ops-view .bot-dashboard-ops-case.is-state-attention {
  border-color: rgba(255, 191, 87, 0.26);
  background: rgba(255, 191, 87, 0.045);
}

.bot-panel-section.is-ops-view .bot-dashboard-ops-state-strip .is-state-resolved,
.bot-panel-section.is-ops-view .bot-dashboard-ops-case.is-state-resolved {
  border-color: rgba(95, 211, 162, 0.22);
  background: rgba(95, 211, 162, 0.04);
}

.bot-panel-section.is-ops-view .bot-dashboard-ops-case em,
.bot-panel-section.is-ops-view .bot-dashboard-ops-command-state,
.bot-panel-section.is-ops-view .bot-dashboard-ops-command-trigger,
.bot-panel-section.is-ops-view .bot-dashboard-ops-status,
.bot-panel-section.is-ops-view .bot-dashboard-ops-tags span,
.bot-panel-section.is-ops-view .bot-dashboard-ops-event > span {
  background: rgba(var(--text-rgb), 0.045);
  border-color: rgba(var(--muted-rgb), 0.14);
  color: var(--muted);
}

.bot-panel-section.is-ops-view .bot-dashboard-ops-score {
  background:
    radial-gradient(circle at center, var(--bg) 0 57%, transparent 58%),
    conic-gradient(rgba(var(--accent-rgb), 0.86) var(--usage), rgba(var(--muted-rgb), 0.16) 0);
}

@media (max-width: 1060px) {
  .bot-panel-section.is-ops-view .bot-dashboard-side {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .bot-panel-section.is-ops-view .bot-dashboard-side-nav,
  .bot-panel-section.is-ops-view .bot-dashboard-server {
    padding: 8px;
    border: 1px solid rgba(var(--muted-rgb), 0.13);
    border-radius: 8px;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
      rgba(var(--panel-rgb), 0.84);
  }

  .bot-panel-section.is-ops-view .bot-dashboard-side-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    overflow: visible;
  }

  .bot-panel-section.is-ops-view .bot-dashboard-side-nav a {
    width: 100%;
    text-align: center;
  }

  .bot-panel-section.is-ops-view .bot-dashboard-ops-status-card {
    grid-template-columns: 1fr;
  }

  .bot-panel-section.is-ops-view .bot-dashboard-ops-hero {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .bot-panel-section.is-ops-view .bot-dashboard-ops-score {
    width: 86px;
  }

  .bot-panel-section.is-ops-view .bot-dashboard-ops-state-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bot-dashboard-ops-control-grid,
  .bot-dashboard-ops-case-grid.is-capped,
  .bot-dashboard-ops-command-grid.is-collapsed {
    grid-template-columns: 1fr;
  }
}

.ops-discord-section {
  width: min(1500px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 18px 0 30px;
}

.ops-discord-shell {
  display: grid;
  grid-template-columns: 72px 280px minmax(420px, 1fr) 320px;
  min-height: 680px;
  height: min(840px, calc(100vh - 118px));
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.32);
  border-radius: 8px;
  background: #313338;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

.ops-discord-shell * {
  min-width: 0;
}

.ops-discord-server-rail,
.ops-discord-channel-rail,
.ops-discord-chat,
.ops-discord-member-rail {
  min-height: 0;
}

.ops-discord-server-rail {
  display: grid;
  grid-auto-rows: min-content;
  gap: 10px;
  justify-items: center;
  padding: 12px 10px;
  background: #1e1f22;
}

.ops-discord-server-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 18px;
  background: #313338;
  color: #dbdee1;
  font-size: 0.98rem;
  font-weight: 950;
  text-decoration: none;
  transition: border-radius 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.ops-discord-server-icon:hover,
.ops-discord-server-icon:focus-visible,
.ops-discord-server-icon.is-active {
  border-radius: 14px;
  background: #5865f2;
  color: #fff;
}

.ops-discord-logo-link img {
  width: 31px;
  height: 31px;
}

.ops-discord-logo-link:hover,
.ops-discord-logo-link:focus-visible {
  background: #2b2d31;
}

.ops-discord-server-divider {
  width: 32px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.ops-discord-channel-rail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #2b2d31;
  color: #949ba4;
}

.ops-discord-guild-head {
  display: grid;
  gap: 3px;
  padding: 15px 16px 13px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.28);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025);
}

.ops-discord-guild-head strong {
  overflow: hidden;
  color: #f2f3f5;
  font-size: 0.94rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-discord-guild-head span {
  overflow: hidden;
  color: #949ba4;
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-discord-channel-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: auto;
  padding: 10px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 155, 164, 0.35) transparent;
}

.ops-discord-active-case-list,
.ops-discord-archive-list {
  display: grid;
  gap: 4px;
  align-content: start;
}

.ops-discord-channel-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px 4px;
  color: #949ba4;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.ops-discord-channel-group em {
  flex: 0 0 auto;
  font-style: normal;
  text-transform: none;
}

.ops-discord-channel {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 7px 8px;
  border-radius: 6px;
  color: #949ba4;
  text-decoration: none;
}

.ops-discord-channel:hover,
.ops-discord-channel:focus-visible,
.ops-discord-channel.is-active {
  background: #404249;
  color: #f2f3f5;
}

.ops-discord-channel:focus-visible {
  outline: 2px solid rgba(88, 101, 242, 0.75);
  outline-offset: 2px;
}

.ops-discord-channel-hash {
  color: #80848e;
  font-size: 1.18rem;
  font-weight: 760;
  line-height: 1;
}

.ops-discord-channel strong,
.ops-discord-channel small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-discord-channel strong {
  color: inherit;
  font-size: 0.88rem;
  font-weight: 850;
}

.ops-discord-channel small {
  margin-top: 2px;
  color: #949ba4;
  font-size: 0.74rem;
  font-weight: 760;
}

.ops-discord-channel em {
  min-width: 22px;
  padding: 3px 6px;
  border-radius: 999px;
  background: #da373c;
  color: #fff;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.ops-discord-channel:not(.has-unanswered) em {
  display: none;
}

.ops-discord-channel.is-archived {
  opacity: 0.74;
}

.ops-discord-channel-archive {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding-top: 10px;
}

.ops-discord-archive-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b5bac1;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.ops-discord-archive-toggle:hover,
.ops-discord-archive-toggle:focus-visible,
.ops-discord-channel-archive.is-open .ops-discord-archive-toggle {
  background: #404249;
  color: #f2f3f5;
}

.ops-discord-archive-toggle:focus-visible {
  outline: 2px solid rgba(88, 101, 242, 0.75);
  outline-offset: 2px;
}

.ops-discord-archive-toggle:disabled {
  color: #6d737d;
  cursor: default;
}

.ops-discord-archive-toggle:disabled:hover {
  background: transparent;
}

.ops-discord-archive-toggle em {
  min-width: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-style: normal;
  font-size: 0.68rem;
  text-align: center;
}

.ops-discord-archive-list[hidden] {
  display: none;
}

.ops-discord-archive-list .ops-discord-empty {
  margin: 4px 8px 0;
  color: #80848e;
  font-size: 0.78rem;
}

.ops-discord-channel-footer {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 11px 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.28);
  background: #232428;
}

.ops-discord-channel-footer .ops-discord-message-avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 0.72rem;
}

.ops-discord-channel-footer strong,
.ops-discord-channel-footer span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-discord-channel-footer strong {
  color: #f2f3f5;
  font-size: 0.84rem;
}

.ops-discord-channel-footer span {
  color: #b5bac1;
  font-size: 0.74rem;
  font-weight: 760;
}

.ops-discord-channel-role {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 3px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.18);
  color: #c9cdfb;
  line-height: 1;
}

.ops-discord-chat {
  display: flex;
  flex-direction: column;
  height: calc(min(840px, calc(100vh - 118px)) - 2px);
  padding: 0;
  background: #313338;
  color: #dbdee1;
}

.ops-discord-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.26);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025);
}

.ops-discord-chat-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.ops-discord-chat-title > span {
  color: #80848e;
  font-size: 1.45rem;
  font-weight: 800;
}

.ops-discord-chat-title strong,
.ops-discord-chat-title small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-discord-chat-title strong {
  color: #f2f3f5;
  font-size: 0.96rem;
  font-weight: 950;
}

.ops-discord-chat-title small {
  margin-top: 2px;
  color: #949ba4;
  font-size: 0.76rem;
  font-weight: 760;
}

.ops-discord-state-pill {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(148, 155, 164, 0.13);
  color: #dbdee1;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
}

.ops-discord-state-pill.is-state-escalated,
.ops-discord-state-pill.is-state-attention {
  background: rgba(218, 55, 60, 0.18);
  color: #ffb4b8;
}

.ops-discord-state-pill.is-state-assigned {
  background: rgba(250, 166, 26, 0.18);
  color: #ffd38a;
}

.ops-discord-state-pill.is-state-resolved {
  background: rgba(35, 165, 89, 0.2);
  color: #a8efc2;
}

.ops-discord-topic {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  background: rgba(43, 45, 49, 0.55);
}

.ops-discord-topic-avatar,
.ops-discord-message-avatar,
.ops-discord-profile-avatar {
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 950;
}

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

.ops-discord-topic-avatar {
  width: 46px;
  height: 46px;
  background: #5865f2;
}

.ops-discord-topic strong {
  color: #f2f3f5;
  font-size: 0.94rem;
  font-weight: 950;
}

.ops-discord-topic p {
  margin: 4px 0 0;
  color: #dbdee1;
  font-size: 0.84rem;
  line-height: 1.45;
}

.ops-discord-role-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.ops-discord-role-row span {
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
}

.ops-discord-role-row span,
.ops-discord-role-chip {
  background: rgba(88, 101, 242, 0.18);
  color: #c9cdfb;
}

.ops-discord-role-row .is-role-0,
.ops-discord-role-chip.is-role-0 {
  background: rgba(88, 101, 242, 0.18);
  color: #c9cdfb;
}

.ops-discord-role-row .is-role-1,
.ops-discord-role-chip.is-role-1 {
  background: rgba(35, 165, 89, 0.18);
  color: #a8efc2;
}

.ops-discord-role-row .is-role-2,
.ops-discord-role-chip.is-role-2 {
  background: rgba(250, 166, 26, 0.18);
  color: #ffd38a;
}

.ops-discord-role-row .is-role-3,
.ops-discord-role-chip.is-role-3 {
  background: rgba(235, 69, 158, 0.18);
  color: #ffb5df;
}

.ops-discord-role-row .is-role-4,
.ops-discord-role-chip.is-role-4 {
  background: rgba(0, 168, 252, 0.18);
  color: #afe4ff;
}

.ops-discord-role-row .is-role-5,
.ops-discord-role-chip.is-role-5 {
  background: rgba(237, 66, 69, 0.18);
  color: #ffb9bb;
}

.ops-discord-message-list {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  overflow: auto;
  padding: 10px 0 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 155, 164, 0.38) transparent;
}

.ops-discord-message-list > .ops-discord-message:first-child {
  margin-top: auto;
}

.ops-discord-message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 22px;
  color: #dbdee1;
}

.ops-discord-message:hover {
  background: rgba(43, 45, 49, 0.55);
}

.ops-discord-message.is-live {
  animation: opsChatMessageIn 260ms ease both;
}

.ops-discord-message-avatar {
  width: 42px;
  height: 42px;
  background: #5865f2;
  font-size: 0.82rem;
}

.ops-discord-message.is-staff .ops-discord-message-avatar {
  background: #23a559;
}

.ops-discord-message.is-dashboard .ops-discord-message-avatar,
.ops-discord-message-avatar.is-current-user {
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  color: var(--theme-button-text);
}

.ops-discord-message.is-bot .ops-discord-message-avatar,
.ops-discord-message.is-system .ops-discord-message-avatar {
  background: #4e5058;
  color: #b5bac1;
  text-transform: uppercase;
}

.ops-discord-message-body {
  padding-top: 2px;
}

.ops-discord-message-head {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: baseline;
}

.ops-discord-message-head strong {
  color: #f2f3f5;
  font-size: 0.92rem;
  font-weight: 950;
}

.ops-discord-message-head span,
.ops-discord-message-head em {
  color: #949ba4;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 760;
}

.ops-discord-message-head em {
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: 900;
  line-height: 1;
}

.ops-discord-message p {
  margin: 3px 0 0;
  color: #dbdee1;
  font-size: 0.92rem;
  line-height: 1.45;
}

.ops-discord-message p code {
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #f2f3f5;
  font-size: 0.92em;
}

.ops-discord-inline-mention {
  display: inline-block;
  padding: 0 4px;
  border-radius: 3px;
  background: rgba(88, 101, 242, 0.28);
  color: #dee0fc;
  font-weight: 800;
}

.ops-discord-message .discord-embed-preview {
  width: min(560px, 100%);
  margin-top: 8px;
  padding: 11px 12px;
  border-color: rgba(88, 101, 242, 0.72);
  border-left-color: #5865f2;
  background: #2b2d31;
}

.ops-discord-message .discord-embed-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ops-discord-case-embed {
  gap: 9px;
}

.ops-discord-embed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.ops-discord-embed-button {
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 4px;
  background: #4e5058;
  color: #f2f3f5;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.ops-discord-embed-button:hover,
.ops-discord-embed-button:focus-visible {
  background: #5c5f66;
}

.ops-discord-embed-button.is-primary {
  background: #248046;
  color: #fff;
}

.ops-discord-embed-button.is-primary:hover,
.ops-discord-embed-button.is-primary:focus-visible {
  background: #1a6334;
}

.ops-discord-embed-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.ops-discord-evidence-lines {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}

.ops-discord-evidence-lines span {
  padding: 7px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #dbdee1;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.ops-discord-composer {
  flex: 0 0 auto;
  padding: 14px 18px 18px;
  background: #313338;
}

.ops-discord-action-form {
  display: grid;
  gap: 6px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.ops-discord-compose-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.ops-discord-send-button {
  min-height: 42px;
  align-self: end;
}

.ops-discord-compose-input {
  display: grid;
  gap: 0;
}

.ops-discord-compose-input span {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ops-discord-compose-controls {
  display: grid;
  grid-template-columns: minmax(160px, 300px);
  gap: 9px;
  align-items: end;
  padding-left: 52px;
}

.ops-discord-action-form label {
  display: grid;
  gap: 6px;
  color: #b5bac1;
  font-size: 0.74rem;
  font-weight: 850;
}

.ops-discord-action-form input[type="text"] {
  width: 100%;
  min-width: 0;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #383a40;
  color: #f2f3f5;
}

.ops-discord-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.ops-discord-action-buttons .button {
  min-height: 38px;
}

.ops-discord-form-status {
  margin: 0;
  padding-left: 0;
  color: #b5bac1;
  font-size: 0.76rem;
  font-weight: 800;
}

.ops-discord-form-status.is-error {
  color: #ffb9bb;
}

.ops-discord-action-form.is-saving {
  opacity: 0.82;
}

@keyframes opsChatMessageIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ops-discord-readonly {
  display: grid;
  gap: 3px;
  padding: 13px;
  border-radius: 8px;
  background: #383a40;
}

.ops-discord-readonly strong {
  color: #f2f3f5;
}

.ops-discord-readonly span {
  color: #b5bac1;
  font-size: 0.82rem;
  font-weight: 780;
}

.ops-discord-member-rail {
  display: grid;
  gap: 10px;
  align-content: start;
  overflow: auto;
  padding: 12px;
  background: #232428;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 155, 164, 0.35) transparent;
}

.ops-discord-profile-card,
.ops-discord-detail-card {
  overflow: hidden;
  border-radius: 8px;
  background: #2b2d31;
  color: #dbdee1;
}

.ops-discord-profile-card {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 110px 12px 32px;
}

.ops-discord-profile-banner {
  position: absolute;
  inset: 0 0 auto;
  height: 78px;
  background: linear-gradient(135deg, #5865f2, #23a559);
}

.ops-discord-profile-avatar {
  position: absolute;
  left: 12px;
  top: 42px;
  width: 58px;
  height: 58px;
  border: 6px solid #2b2d31;
  background: #5865f2;
}

.ops-discord-profile-card strong {
  color: #f2f3f5;
  font-size: 0.96rem;
  font-weight: 950;
}

.ops-discord-profile-card span {
  color: #b5bac1;
  font-size: 0.78rem;
  font-weight: 820;
}

.ops-discord-profile-card .ops-discord-role-row {
  margin-top: 6px;
}

.ops-discord-profile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.ops-discord-moderation-actions {
  display: contents;
}

.ops-discord-moderation-actions:empty {
  display: none;
}

.ops-discord-profile-actions .button {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 0.78rem;
  line-height: 1.15;
  white-space: normal;
}

.ops-discord-profile-actions .button:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.ops-discord-detail-card {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.ops-discord-detail-card h3 {
  margin: 0 0 2px;
  color: #f2f3f5;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.ops-discord-detail-card div {
  display: grid;
  gap: 3px;
}

.ops-discord-detail-card .ops-discord-subject-details {
  gap: 8px;
}

.ops-discord-detail-card span {
  color: #949ba4;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ops-discord-detail-card strong {
  color: #dbdee1;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.28;
  overflow-wrap: anywhere;
  white-space: normal;
}

.ops-discord-detail-card p {
  margin: 0;
  padding: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  color: #dbdee1;
  font-size: 0.8rem;
  font-weight: 760;
  line-height: 1.38;
}

.ops-discord-attachments-card {
  align-content: start;
}

.ops-discord-attachment-list {
  display: grid;
  gap: 8px;
}

.ops-discord-attachment {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  font: inherit;
  text-align: left;
}

.ops-discord-attachment.is-image {
  cursor: zoom-in;
}

.ops-discord-attachment img,
.ops-discord-attachment > span {
  grid-row: span 2;
  width: 48px;
  height: 42px;
  border-radius: 5px;
  background: #1e1f22;
}

.ops-discord-attachment img {
  object-fit: cover;
}

.ops-discord-attachment > span {
  display: grid;
  place-items: center;
  color: #dbdee1;
  font-size: 0.76rem;
  font-weight: 950;
}

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

.ops-discord-attachment small {
  color: #949ba4;
  font-size: 0.72rem;
  font-weight: 800;
}

.ops-discord-empty {
  margin: 0;
  color: #949ba4;
}

.ops-discord-modal,
.ops-discord-lightbox {
  position: fixed;
  z-index: 1000;
  inset: 0;
}

body.has-ops-modal {
  overflow: hidden;
}

.ops-discord-modal-backdrop,
.ops-discord-lightbox {
  background: rgba(0, 0, 0, 0.72);
}

.ops-discord-modal-backdrop {
  position: absolute;
  inset: 0;
}

.ops-discord-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  gap: 14px;
  width: min(420px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #313338;
  color: #dbdee1;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
  transform: translate(-50%, -50%);
}

.ops-discord-dialog-head,
.ops-discord-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ops-discord-dialog-head h2 {
  margin: 0;
  color: #f2f3f5;
  font-size: 1rem;
}

.ops-discord-dialog-head button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: #4e5058;
  color: #f2f3f5;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
}

.ops-discord-assign-select {
  display: grid;
  gap: 7px;
  color: #b5bac1;
  font-size: 0.76rem;
  font-weight: 850;
}

.ops-discord-assign-select select {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: #1e1f22;
  color: #f2f3f5;
  font: inherit;
}

.ops-discord-dialog-actions {
  justify-content: flex-end;
}

.ops-discord-lightbox {
  display: grid;
  place-items: center;
  padding: 28px;
}

.ops-discord-lightbox[hidden],
.ops-discord-modal[hidden] {
  display: none;
}

.ops-discord-lightbox img {
  max-width: min(1080px, 92vw);
  max-height: 78vh;
  border-radius: 8px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.58);
}

.ops-discord-lightbox strong {
  margin-top: 12px;
  color: #f2f3f5;
}

.ops-discord-lightbox-close {
  position: fixed;
  right: 22px;
  top: 20px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  background: #4e5058;
  color: #f2f3f5;
  font: inherit;
  font-weight: 850;
}

@media (max-width: 1180px) {
  .ops-discord-shell {
    grid-template-columns: 68px 250px minmax(0, 1fr);
  }

  .ops-discord-member-rail {
    display: none;
  }
}

@media (max-width: 820px) {
  .ops-discord-section {
    width: calc(100vw - 16px);
    padding-top: 10px;
  }

  .ops-discord-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .ops-discord-server-rail {
    display: none;
  }

  .ops-discord-channel-rail {
    max-height: 300px;
  }

  .ops-discord-channel-footer {
    display: none;
  }

  .ops-discord-chat {
    height: auto;
    min-height: 620px;
  }

  .ops-discord-member-rail {
    display: grid;
    max-height: none;
  }

  .ops-discord-action-form {
    grid-template-columns: 1fr;
  }

  .ops-discord-compose-controls {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .ops-discord-action-buttons {
    justify-content: stretch;
  }

  .ops-discord-action-buttons .button {
    flex: 1 1 120px;
  }
}

@media (max-width: 520px) {
  .ops-discord-chat-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ops-discord-topic,
  .ops-discord-message {
    grid-template-columns: 38px minmax(0, 1fr);
    padding-inline: 14px;
  }

  .ops-discord-topic-avatar,
  .ops-discord-message-avatar {
    width: 38px;
    height: 38px;
  }

  .ops-discord-compose-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .ops-discord-send-button {
    width: 100%;
  }

  .ops-discord-form-status {
    padding-left: 0;
  }

  .ops-discord-message .discord-embed-fields {
    grid-template-columns: 1fr;
  }
}

.bot-dashboard-stat-band {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(var(--widget-accent-rgb), 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--widget-accent-rgb), 0.12), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.026);
}

.bot-dashboard-stat-band > div,
.bot-dashboard-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

.bot-dashboard-stat-band span,
.bot-dashboard-bar-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-stat-band strong,
.bot-dashboard-bar-row strong {
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1;
  white-space: nowrap;
}

.bot-dashboard-progress {
  display: block;
  grid-column: 1 / -1;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(var(--muted-rgb), 0.13);
}

.bot-dashboard-progress > i {
  display: block;
  width: min(100%, max(0%, var(--value, 0%)));
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(var(--widget-accent-rgb), 0.92), rgba(var(--accent-warm-rgb), 0.82));
}

.bot-dashboard-visual-widget,
.bot-dashboard-compact-widget,
.bot-dashboard-quota-widget {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
  min-height: 0;
}

.bot-dashboard-bar-list {
  display: grid;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.024);
}

.bot-dashboard-visual-widget .bot-dashboard-bar-list,
.bot-dashboard-compact-widget .bot-dashboard-bar-list,
.bot-dashboard-quota-list {
  min-height: 0;
  overflow: auto;
}

.bot-dashboard-visual-widget {
  grid-template-columns: minmax(112px, 0.38fr) minmax(0, 1fr);
  align-items: center;
}

.bot-dashboard-compact-widget {
  align-content: stretch;
}

.bot-dashboard-quota-widget {
  grid-template-columns: minmax(112px, 0.38fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.bot-dashboard-grid > .bot-dashboard-card > .bot-dashboard-visual-widget,
.bot-dashboard-grid > .bot-dashboard-card > .bot-dashboard-resource-widget,
.bot-dashboard-grid > .bot-dashboard-card > .bot-dashboard-quota-widget {
  align-content: start;
  align-items: start;
  overflow: auto;
}

.bot-dashboard-card .bot-dashboard-visual-widget > .bot-dashboard-bar-list,
.bot-dashboard-card .bot-dashboard-resource-widget > .bot-dashboard-list,
.bot-dashboard-card .bot-dashboard-quota-widget > .bot-dashboard-quota-list {
  overflow: visible;
}

.bot-dashboard-quota-ring,
.bot-dashboard-mini-ring {
  --usage: 0%;
  display: grid;
  place-items: center;
  align-content: center;
  width: min(124px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, var(--panel) 0 57%, transparent 58%),
    conic-gradient(rgba(var(--widget-accent-rgb), 0.95) var(--usage), rgba(var(--muted-rgb), 0.18) 0);
}

.bot-dashboard-quota-ring strong,
.bot-dashboard-mini-ring strong {
  color: var(--text);
  font-size: 1.42rem;
  line-height: 1;
}

.bot-dashboard-quota-ring span,
.bot-dashboard-mini-ring span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.bot-dashboard-quota-list {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.bot-dashboard-quota-row {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  gap: 6px 10px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.024);
}

.bot-dashboard-quota-row span,
.bot-dashboard-quota-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-quota-row > span:first-child {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
}

.bot-dashboard-quota-row strong {
  justify-self: end;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 880;
}

.bot-dashboard-resource-widget {
  display: grid;
  grid-template-columns: minmax(112px, 0.4fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.bot-dashboard-resource-ring {
  --usage: 0%;
  display: grid;
  place-items: center;
  align-content: center;
  width: min(124px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, var(--panel) 0 57%, transparent 58%),
    conic-gradient(var(--accent) var(--usage), rgba(var(--muted-rgb), 0.18) 0);
}

.bot-dashboard-resource-ring strong {
  color: var(--text);
  font-size: 1.42rem;
  line-height: 1;
}

.bot-dashboard-resource-ring span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.bot-dashboard-item-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.bot-dashboard-item-row > div,
.bot-dashboard-record-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.bot-dashboard-collaborator-row {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
}

.bot-dashboard-collaborator-row > div,
.bot-dashboard-category-head > div,
.bot-dashboard-command-toggle-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bot-dashboard-person-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(var(--widget-accent-rgb), 0.2);
  border-radius: 8px;
  background: rgba(var(--widget-accent-rgb), 0.1);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
}

.bot-dashboard-role-pill {
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.bot-dashboard-role-manager,
.bot-dashboard-role-card,
.bot-dashboard-role-form,
.bot-dashboard-permission-grid {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.bot-dashboard-role-card,
.bot-dashboard-role-form {
  padding: 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.024);
}

.bot-dashboard-role-card > div:first-child {
  display: grid;
  gap: 3px;
}

.bot-dashboard-role-card strong {
  color: var(--text);
}

.bot-dashboard-role-card span,
.bot-dashboard-role-form small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.bot-dashboard-role-permissions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bot-dashboard-role-permissions span {
  padding: 5px 8px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 999px;
  color: var(--muted);
}

.bot-dashboard-role-permissions span.is-enabled {
  border-color: rgba(var(--accent-rgb), 0.34);
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--text);
}

.bot-dashboard-role-editor {
  display: grid;
  gap: 10px;
}

.bot-dashboard-role-editor summary {
  justify-self: start;
  list-style: none;
}

.bot-dashboard-role-editor summary::-webkit-details-marker {
  display: none;
}

.bot-dashboard-role-editor[open] {
  padding-top: 4px;
}

.bot-dashboard-permission-grid label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 8px;
  border: 1px solid rgba(var(--muted-rgb), 0.1);
  border-radius: 8px;
}

.bot-dashboard-permission-grid label span {
  display: grid;
  gap: 2px;
}

.bot-dashboard-category-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.bot-dashboard-category-single {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  align-content: start;
  min-height: 0;
}

.bot-dashboard-category-head > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(var(--widget-accent-rgb), 0.18);
  background: rgba(var(--widget-accent-rgb), 0.1);
  font-size: 1.18rem;
}

.bot-dashboard-card.is-compact .bot-dashboard-category-head,
.bot-dashboard-card.is-side .bot-dashboard-category-head {
  grid-template-columns: 42px minmax(0, 1fr);
}

.bot-dashboard-card.is-compact .bot-dashboard-category-head .button,
.bot-dashboard-card.is-side .bot-dashboard-category-head .button {
  grid-column: 1 / -1;
  width: 100%;
}

.bot-dashboard-command-list {
  display: grid;
  gap: 6px;
  grid-auto-rows: max-content;
  align-content: start;
  align-items: start;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.46) rgba(var(--muted-rgb), 0.06);
}

.bot-dashboard-command-list > a,
.bot-dashboard-command-list > .bot-dashboard-command-item {
  display: grid;
  align-self: start;
  gap: 2px;
  min-width: 0;
  min-height: 0;
  padding: 7px 8px;
  border: 1px solid rgba(var(--muted-rgb), 0.11);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: rgba(0, 0, 0, 0.08);
}

.bot-dashboard-command-list > a:hover,
.bot-dashboard-command-list > .bot-dashboard-command-item:hover {
  border-color: rgba(var(--widget-accent-rgb), 0.34);
  background: rgba(var(--widget-accent-rgb), 0.08);
}

.bot-dashboard-command-toggle-row {
  display: grid;
  grid-template-columns: 44px 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.bot-dashboard-command-status {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 0;
}

.bot-dashboard-command-status form {
  margin: 0;
}

.bot-dashboard-command-status .switch-control {
  width: 38px;
  height: 22px;
}

.bot-dashboard-command-status .switch-control span::after {
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
}

.bot-dashboard-command-status .switch-control input:checked + span::after {
  transform: translateX(16px);
}

.bot-dashboard-command-state-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(var(--muted-rgb), 0.5);
  box-shadow: 0 0 0 4px rgba(var(--muted-rgb), 0.08);
}

.bot-dashboard-command-state-dot.is-enabled {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12);
}

.bot-dashboard-command-state-dot.is-disabled {
  background: rgba(255, 98, 98, 0.8);
  box-shadow: 0 0 0 4px rgba(255, 98, 98, 0.1);
}

.bot-dashboard-command-open,
.bot-dashboard-command-item a {
  display: grid;
  align-content: center;
  gap: 1px;
  min-width: 0;
  min-height: 0;
  width: 100%;
  padding: 0;
  border: 0;
  color: var(--text);
  font: inherit;
  line-height: 1.18;
  text-align: left;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
}

.bot-dashboard-command-open strong {
  font-size: 0.88rem;
}

.bot-dashboard-command-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.bot-dashboard-command-name strong {
  min-width: 0;
}

.bot-dashboard-command-name em {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.bot-dashboard-command-name em.is-enabled {
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--accent);
}

.bot-dashboard-command-name em.is-disabled {
  background: rgba(255, 98, 98, 0.12);
  color: #ffb3b3;
}

.bot-dashboard-command-open span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-command-open .bot-dashboard-command-name {
  color: var(--text);
  font-size: inherit;
  font-weight: inherit;
}

.bot-dashboard-command-open .bot-dashboard-command-name strong {
  color: var(--text);
}

.bot-dashboard-command-list .bot-dashboard-command-icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.bot-dashboard-command-modal-backdrop {
  z-index: 240;
}

.bot-dashboard-command-modal-backdrop[hidden],
.bot-dashboard-command-modal[hidden] {
  display: none;
}

.bot-dashboard-command-modal {
  z-index: 241;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1080px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 48px));
  max-height: min(760px, calc(100vh - 48px));
}

.bot-dashboard-command-modal-head {
  min-width: 0;
}

.bot-dashboard-command-modal-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.bot-dashboard-command-modal-head h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-command-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.bot-dashboard-command-modal-meta span {
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-command-control-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding-top: 14px;
}

.bot-dashboard-ops-command-modal {
  width: min(760px, calc(100vw - 48px));
  height: auto;
  max-height: min(720px, calc(100vh - 48px));
}

.bot-dashboard-ops-command-modal-form {
  display: grid;
  gap: 14px;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding-top: 14px;
}

.bot-dashboard-ops-modal-core,
.bot-dashboard-ops-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.bot-dashboard-ops-modal-core label,
.bot-dashboard-ops-setting {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 840;
}

.bot-dashboard-ops-modal-core label:last-child {
  grid-column: 1 / -1;
}

.bot-dashboard-ops-modal-core input[type="text"],
.bot-dashboard-ops-setting input[type="text"],
.bot-dashboard-ops-setting input[type="number"],
.bot-dashboard-ops-setting select {
  width: 100%;
  min-width: 0;
}

.bot-dashboard-ops-setting-check {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 9px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.026);
  color: var(--text);
}

.bot-dashboard-ops-setting-check input {
  flex: 0 0 auto;
}

.bot-dashboard-command-modal-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.bot-dashboard-command-modal-summary > span {
  max-width: 100%;
  padding: 6px 9px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
}

.bot-dashboard-command-modal-badge.is-enabled {
  border-color: rgba(var(--accent-rgb), 0.3);
  background: rgba(var(--accent-rgb), 0.13);
  color: var(--accent);
}

.bot-dashboard-command-modal-badge.is-disabled {
  border-color: rgba(255, 98, 98, 0.28);
  background: rgba(255, 98, 98, 0.12);
  color: #ffb3b3;
}

.bot-dashboard-command-modal-grid {
  display: grid;
  grid-template-columns: minmax(230px, 0.82fr) minmax(340px, 1.28fr) minmax(230px, 0.9fr);
  gap: 12px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.bot-dashboard-command-modal-panel {
  align-content: start;
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: auto;
  background: rgba(var(--bg-rgb), 0.54);
}

.bot-dashboard-command-modal-section,
.bot-dashboard-command-input-list,
.bot-dashboard-command-control-list,
.bot-dashboard-command-global-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.bot-dashboard-command-input-row {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.08);
}

.bot-dashboard-command-input-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bot-dashboard-command-input-row strong,
.bot-dashboard-command-input-row span,
.bot-dashboard-command-control-row span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-dashboard-command-input-row span,
.bot-dashboard-command-control-row small,
.bot-dashboard-command-control-row em,
.bot-dashboard-command-global-row span,
.bot-dashboard-command-global-row small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 760;
}

.bot-dashboard-command-input-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  min-width: 0;
}

.bot-dashboard-command-switch-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(var(--muted-rgb), 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.026);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
  white-space: nowrap;
}

.bot-dashboard-command-switch-line > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-dashboard-command-switch-line .switch-control {
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
}

.bot-dashboard-command-switch-line .switch-control span::after {
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
}

.bot-dashboard-command-switch-line .switch-control input:checked + span::after {
  transform: translateX(16px);
}

.bot-dashboard-command-control-row {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.08);
  color: var(--text);
  font-weight: 850;
}

.bot-dashboard-command-control-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bot-dashboard-command-control-title small {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.bot-dashboard-command-control-title em {
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-command-control-row textarea,
.bot-dashboard-command-control-row input[type="text"] {
  width: 100%;
  min-width: 0;
}

.bot-dashboard-command-control-row textarea {
  min-height: 104px;
  resize: vertical;
}

.bot-dashboard-command-global-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.08);
}

.bot-dashboard-command-global-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bot-dashboard-command-global-row strong,
.bot-dashboard-command-global-row span,
.bot-dashboard-command-global-row small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-dashboard-command-global-row strong {
  white-space: nowrap;
}

.bot-dashboard-command-global-row .bot-dashboard-command-global-pill {
  align-self: start;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.13);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.bot-dashboard-command-global-row.is-delete .bot-dashboard-command-global-pill {
  background: rgba(255, 98, 98, 0.12);
  color: #ffb3b3;
}

.bot-dashboard-command-global-row.is-read .bot-dashboard-command-global-pill {
  background: rgba(var(--muted-rgb), 0.1);
  color: var(--muted);
}

.bot-dashboard-command-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 2px;
}

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

.bot-dashboard-record-head {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.bot-dashboard-card.is-side .bot-dashboard-json-form textarea,
.bot-dashboard-card.is-compact .bot-dashboard-json-form textarea,
.bot-dashboard-card.is-side .bot-dashboard-inline-create textarea,
.bot-dashboard-card.is-compact .bot-dashboard-inline-create textarea {
  min-height: 72px;
}

@container (max-width: 560px) {
  .bot-dashboard-two-col,
  .bot-dashboard-category-grid,
  .bot-dashboard-metric-list,
  .bot-dashboard-resource-widget,
  .bot-dashboard-visual-widget,
  .bot-dashboard-quota-widget,
  .bot-dashboard-ops-hero,
  .bot-dashboard-ops-suite,
  .bot-dashboard-ops-status-card,
  .bot-dashboard-ops-workspace,
  .bot-dashboard-ops-discord-head,
  .bot-dashboard-ops-discord-meta,
  .bot-dashboard-ops-state-strip,
  .bot-dashboard-ops-widget-top,
  .bot-dashboard-ops-widget-grid,
  .bot-dashboard-ops-case-grid,
  .bot-dashboard-ops-command-grid,
  .bot-dashboard-ops-body {
    grid-template-columns: 1fr;
  }

  .bot-dashboard-ops-command-form,
  .bot-dashboard-ops-panel-form,
  .bot-dashboard-ops-case-modal-body,
  .bot-dashboard-ops-case-facts {
    grid-template-columns: 1fr;
  }

  .bot-dashboard-ops-command-card,
  .bot-dashboard-ops-modal-core,
  .bot-dashboard-ops-settings-grid {
    grid-template-columns: 1fr;
  }

  .bot-dashboard-category-head {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .bot-dashboard-category-head > span {
    width: 38px;
    height: 38px;
  }

  .bot-dashboard-category-head .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .bot-dashboard-collaborator-row {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .bot-dashboard-role-pill {
    grid-column: 2;
    justify-self: start;
  }

  .bot-dashboard-command-toggle-row {
    grid-template-columns: 40px 28px minmax(0, 1fr);
    gap: 8px;
  }

  .bot-dashboard-command-status {
    align-self: center;
    width: 40px;
  }

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

.bot-dashboard-card-command_category .bot-dashboard-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.bot-dashboard-card-command_category .bot-dashboard-card-edit,
.bot-dashboard-card-command_category .bot-dashboard-card-edit form,
.bot-dashboard-card-command_category .bot-dashboard-card-edit .button {
  justify-self: end;
  width: auto;
}

.js-panel-command.is-saving {
  opacity: 0.76;
}

.bot-dashboard-page,
.bot-dashboard-settings-grid,
.bot-dashboard-setting-list {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.bot-dashboard-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.bot-dashboard-page-head h2 {
  margin: 4px 0 0;
  font-size: 1.45rem;
}

.bot-dashboard-settings-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.bot-dashboard-settings-grid .bot-dashboard-card {
  height: fit-content;
}

.bot-dashboard-danger-card {
  border-color: rgba(255, 98, 98, 0.28);
}

.bot-dashboard-settings {
  border-top: 1px solid rgba(var(--muted-rgb), 0.12);
  padding-top: 12px;
}

.bot-dashboard-settings summary {
  width: fit-content;
  color: var(--text);
  font-weight: 850;
  cursor: pointer;
}

.bot-dashboard-settings-form,
.bot-dashboard-json-form,
.bot-dashboard-inline-create,
.bot-dashboard-collaborator-form {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin-top: 10px;
}

.bot-dashboard-json-form {
  padding: 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.bot-dashboard-json-form textarea,
.bot-dashboard-inline-create textarea {
  min-height: 90px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.45;
}

.bot-dashboard-inline-create {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.bot-dashboard-inline-create .button {
  width: fit-content;
  min-width: 140px;
  max-width: 100%;
}

.bot-dashboard-collaborator-form {
  grid-template-columns: minmax(170px, 1fr) minmax(120px, 0.35fr) auto;
}

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

.bot-dashboard-control-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.032);
}

.bot-dashboard-control-card .button {
  width: 100%;
}

.bot-dashboard-insert-layer {
  position: absolute;
  inset: 0;
  z-index: 35;
  pointer-events: none;
}

.bot-dashboard-insert-layer[hidden] {
  display: none;
}

.bot-dashboard-insert-row {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transform: translateY(-50%);
}

.bot-dashboard-insert-row::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  border-top: 1px dashed rgba(var(--accent-rgb), 0.36);
}

.bot-dashboard-insert {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.bot-dashboard-insert summary {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  color: var(--theme-button-text);
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1;
  list-style: none;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

.bot-dashboard-insert summary::-webkit-details-marker {
  display: none;
}

.bot-dashboard-insert-menu {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.72fr);
  gap: 7px;
  align-items: start;
  width: min(660px, calc(100vw - 48px));
  max-height: 340px;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.bot-dashboard-insert-menu .bot-dashboard-add-options {
  max-height: 310px;
}

.bot-dashboard-insert-menu .bot-dashboard-add-preview-card.bot-dashboard-card {
  min-height: 250px;
  max-height: 310px;
}

.bot-dashboard-insert-menu form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.bot-dashboard-insert-menu span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1060px) {
  .bot-panel-section > .dashboard-title-row {
    width: 100%;
    margin-inline: auto;
  }

  .bot-dashboard-app {
    grid-template-columns: 1fr;
  }

  .bot-dashboard-side {
    position: static;
  }

  .bot-panel-section .bot-dashboard-side {
    gap: 10px;
    padding: 10px;
  }

  .bot-panel-section .bot-dashboard-side-profile,
  .bot-panel-section .bot-dashboard-side-section {
    display: none;
  }

  .bot-panel-section .bot-dashboard-side-nav {
    display: flex;
    gap: 8px;
    padding-top: 0;
    overflow-x: auto;
    border-top: 0;
  }

  .bot-panel-section .bot-dashboard-side-nav a {
    flex: 0 0 auto;
    padding: 8px 10px;
  }

  .bot-panel-section .bot-dashboard-server {
    min-width: 0;
  }

  .bot-dashboard-head,
  .bot-dashboard-kpis,
  .bot-dashboard-two-col,
  .bot-dashboard-category-grid,
  .bot-dashboard-settings-grid,
  .bot-dashboard-control-grid {
    grid-template-columns: 1fr;
  }

  .bot-dashboard-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    grid-auto-flow: row;
  }

  .bot-dashboard-snap-layer {
    display: none;
  }

  .bot-dashboard-resize {
    display: none;
  }

  .bot-dashboard-card,
  .bot-dashboard-card.is-compact,
  .bot-dashboard-card.is-side,
  .bot-dashboard-card.is-half,
  .bot-dashboard-card.is-wide,
  .bot-dashboard-card.is-full,
  .bot-dashboard-placeholder,
  .bot-dashboard-placeholder.is-compact,
  .bot-dashboard-placeholder.is-side,
  .bot-dashboard-placeholder.is-half,
  .bot-dashboard-placeholder.is-wide,
  .bot-dashboard-placeholder.is-full,
  .bot-dashboard-settings-grid .bot-dashboard-card {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .bot-dashboard-grid > .bot-dashboard-card {
    grid-row: auto;
    height: auto;
    overflow: visible;
  }

  .bot-dashboard-grid > .bot-dashboard-card > :not(.bot-dashboard-card-head) {
    overflow: visible;
  }

  .bot-dashboard-kpis div {
    border-right: 0;
    border-bottom: 1px solid rgba(var(--muted-rgb), 0.12);
  }

  .bot-dashboard-kpis div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 980px) {
  .bot-dashboard-command-modal-grid {
    grid-template-columns: 1fr;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-rgb), 0.46) rgba(var(--muted-rgb), 0.06);
  }

  .bot-dashboard-command-modal-panel {
    height: auto;
    overflow: visible;
  }

  .bot-dashboard-ops-status-card,
  .bot-dashboard-ops-workspace,
  .bot-dashboard-ops-discord-meta,
  .bot-dashboard-ops-case-modal-body,
  .bot-dashboard-ops-case-facts {
    grid-template-columns: 1fr;
  }

  .bot-dashboard-ops-queue-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .bot-panel-section .bot-dashboard-side-nav a {
    padding: 7px 9px;
    font-size: 0.86rem;
  }

  .bot-dashboard-head,
  .bot-dashboard-card {
    padding: 14px;
  }

  .bot-dashboard-collaborator-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .bot-dashboard-collaborator-row form,
  .bot-dashboard-role-pill {
    grid-column: 2;
    justify-self: start;
  }

  .bot-dashboard-identity,
  .bot-dashboard-controls,
  .bot-dashboard-card-title {
    align-items: flex-start;
  }

  .bot-dashboard-card-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: stretch;
  }

  .bot-dashboard-card-title {
    width: 100%;
  }

  .bot-dashboard-head,
  .bot-dashboard-controls,
  .bot-dashboard-page-head,
  .bot-dashboard-collaborator-row,
  .bot-dashboard-inline-create,
  .bot-dashboard-collaborator-form,
  .bot-dashboard-customize-menu form {
    grid-template-columns: 1fr;
  }

  .bot-dashboard-page-head {
    display: grid;
    align-items: stretch;
  }

  .bot-dashboard-controls,
  .bot-dashboard-runtime,
  .bot-dashboard-server,
  .bot-dashboard-control-card,
  .bot-dashboard-controls .button,
  .bot-dashboard-controls form,
  .bot-dashboard-card-head > form,
  .bot-dashboard-card-head > form .button,
  .bot-dashboard-card-edit,
  .bot-dashboard-card-edit form,
  .bot-dashboard-inline-create .button,
  .bot-dashboard-collaborator-form .button {
    width: 100%;
  }

  .bot-dashboard-layout-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bot-dashboard-runtime {
    display: grid;
    grid-template-columns: 1fr;
  }

  .bot-dashboard-customize {
    width: 100%;
  }

  .bot-dashboard-customize-menu {
    position: static;
    width: 100%;
    margin-top: 10px;
    grid-template-columns: 1fr;
  }

  .bot-dashboard-resource-widget,
  .bot-dashboard-quota-widget {
    grid-template-columns: 1fr;
  }

  .bot-dashboard-insert-menu {
    grid-template-columns: 1fr;
  }

  .bot-dashboard-add-preview {
    position: static;
  }

  .bot-dashboard-command-modal {
    width: calc(100vw - 18px);
    height: calc(100vh - 18px);
    max-height: calc(100vh - 18px);
    padding: 14px;
  }

  .bot-dashboard-command-modal-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .bot-dashboard-command-input-row {
    grid-template-columns: 1fr;
  }

  .bot-dashboard-command-input-controls {
    grid-template-columns: 1fr;
  }

  .bot-dashboard-command-control-form {
    overflow: hidden;
  }

  .bot-dashboard-command-modal-actions .button {
    width: 100%;
  }

  .bot-dashboard-insert-layer {
    display: none;
  }
}

.bot-panel-docks {
  display: grid;
  gap: 18px;
}

.bot-panel-dock {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.bot-panel-server-dock {
  grid-template-columns: minmax(220px, 0.7fr) minmax(260px, 1fr) minmax(260px, 0.8fr);
  align-items: end;
}

.bot-panel-server-form label,
.bot-panel-settings-form label,
.bot-panel-json-form label {
  display: grid;
  gap: 7px;
}

.bot-panel-runtime-dock {
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  margin: 0;
}

.bot-panel-dock-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.bot-panel-dock-stats div {
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.055);
}

.bot-panel-dock-stats span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.bot-panel-dock-stats strong {
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
}

.bot-panel-widget-dock {
  grid-template-columns: minmax(140px, 0.18fr) minmax(0, 1fr);
  align-items: start;
}

.bot-panel-dock-title {
  display: grid;
  gap: 4px;
}

.bot-panel-dock-title h3 {
  margin: 0;
}

.bot-panel-dock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.bot-panel-dock-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 56px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  cursor: grab;
}

.bot-panel-dock-item:active {
  cursor: grabbing;
}

.bot-panel-dock-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-panel-workspace {
  display: grid;
  gap: 22px;
  min-width: 0;
  padding-top: 2px;
  border-radius: 8px;
}

.bot-panel-workspace.is-drop-ready {
  outline: 2px dashed rgba(var(--accent-rgb), 0.36);
  outline-offset: 8px;
}

.bot-panel-widget {
  gap: 18px;
  padding: 22px;
  transition: opacity 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.bot-panel-widget.is-dragging {
  opacity: 0.48;
  transform: scale(0.995);
  border-color: rgba(var(--accent-rgb), 0.5);
}

.bot-panel-widget-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bot-panel-drag-handle {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(var(--muted-rgb), 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-weight: 950;
  cursor: grab;
}

.bot-panel-drag-handle:active {
  cursor: grabbing;
}

.bot-panel-widget-head > form {
  margin: 0;
}

.bot-panel-widget-head .button {
  min-height: 38px;
}

.bot-panel-metric-grid {
  gap: 12px;
}

.bot-panel-metric {
  min-height: 118px;
  padding: 14px;
}

.bot-panel-split {
  gap: 16px;
}

.bot-panel-row,
.bot-panel-collaborator-row,
.bot-panel-record-head,
.bot-panel-category {
  padding: 13px;
}

.bot-panel-inline-create {
  grid-template-columns: minmax(150px, 0.34fr) minmax(260px, 1fr) minmax(130px, auto);
  align-items: stretch;
}

.bot-panel-inline-create .button {
  min-width: 130px;
}

.bot-panel-collaborator-form {
  gap: 12px;
}

.bot-panel-collaborator-form .button {
  min-width: 120px;
}

@media (max-width: 980px) {
  .bot-panel-layout,
  .bot-panel-split,
  .bot-panel-category-grid,
  .bot-panel-server-dock,
  .bot-panel-widget-dock {
    grid-template-columns: 1fr;
  }

  .bot-panel-rail {
    position: static;
  }

  .bot-panel-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bot-panel-dock-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .bot-panel-shell,
  .bot-panel-widget {
    padding: 12px;
  }

  .bot-panel-hero,
  .bot-panel-widget-head,
  .dashboard-suggestion {
    display: grid;
  }

  .bot-panel-quick-actions,
  .dashboard-suggestion-actions {
    justify-content: stretch;
  }

  .bot-panel-quick-actions .button,
  .dashboard-suggestion-actions .button,
  .dashboard-suggestion-actions form {
    width: 100%;
  }

  .bot-panel-metric-grid,
  .bot-panel-dock-grid,
  .bot-panel-runtime-dock,
  .bot-panel-dock-stats,
  .bot-panel-inline-create,
  .bot-panel-widget-pinned_state .bot-panel-inline-create,
  .bot-panel-record-widget .bot-panel-inline-create,
  .bot-panel-collaborator-form,
  .bot-panel-collaborator-row {
    grid-template-columns: 1fr;
  }

  .bot-panel-widget-head {
    align-items: start;
  }

  .bot-panel-widget-head > form,
  .bot-panel-widget-head > form .button {
    width: 100%;
  }
}

.bot-access-layout,
.bot-ops-console,
.bot-ops-config-panel,
.bot-ops-control-stack,
.bot-ops-command-sections,
.bot-ops-case-list {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.bot-panel-section {
  padding-top: 20px;
}

.bot-panel-section > .dashboard-title-row {
  align-items: center;
  margin-bottom: 10px;
}

.bot-panel-section .section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  max-width: 100%;
  margin-bottom: 0;
}

.bot-panel-section .section-heading .eyebrow {
  display: none;
}

.bot-panel-section .section-heading h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  line-height: 1.15;
  white-space: normal;
}

.bot-panel-section .section-heading p {
  flex: 1 1 420px;
  max-width: none;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
}

.bot-dashboard-shell,
.bot-dashboard-main {
  gap: 14px;
}

.bot-dashboard-head {
  gap: 14px;
  padding: 14px;
}

.bot-dashboard-kpis div {
  min-height: 82px;
  padding: 12px 14px;
}

.bot-dashboard-card {
  gap: 12px;
  padding: 14px;
}

.bot-dashboard-card-head {
  padding-bottom: 10px;
}

.bot-dashboard-grid {
  gap: 14px;
}

.bot-control-dashboard {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.bot-control-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--bot-dashboard-border, rgba(var(--muted-rgb), 0.16));
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(var(--text-rgb), 0.052), rgba(var(--text-rgb), 0.018)),
    rgba(var(--panel-rgb), 0.9);
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(var(--text-rgb), 0.026);
}

.bot-control-panel-runtime {
  grid-column: span 5;
}

.bot-control-panel-work {
  grid-column: span 7;
}

.bot-control-panel-traffic {
  grid-column: span 8;
}

.bot-control-panel-data {
  grid-column: span 4;
}

.bot-control-panel-head {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.bot-control-panel-head span,
.bot-control-meter > span,
.bot-control-queue span,
.bot-control-split span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
  line-height: 1.35;
  text-transform: uppercase;
}

.bot-control-panel-head h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1;
}

.bot-control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.bot-control-actions .button,
.bot-control-panel-data .button {
  min-height: 36px;
  padding-inline: 13px;
}

.bot-control-meter {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.bot-control-meter strong {
  color: var(--text);
  font-size: 1.05rem;
}

.bot-control-queue-grid {
  display: grid;
  gap: 0;
  min-width: 0;
  border-top: 1px solid rgba(var(--muted-rgb), 0.12);
}

.bot-control-queue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(var(--muted-rgb), 0.1);
}

.bot-control-queue:last-child {
  border-bottom: 0;
}

.bot-control-queue:hover,
.bot-control-queue:focus-visible {
  color: var(--text);
}

.bot-control-queue strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.bot-control-queue em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 780;
}

.bot-control-split {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  padding-top: 2px;
}

.bot-control-split span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.bot-control-split strong {
  color: var(--text);
  font-size: 1.18rem;
}

@media (max-width: 1060px) {
  .bot-control-panel-runtime,
  .bot-control-panel-work,
  .bot-control-panel-traffic,
  .bot-control-panel-data {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .bot-control-split,
  .bot-control-queue {
    grid-template-columns: 1fr;
  }

  .bot-control-actions .button,
  .bot-control-panel-data .button {
    width: 100%;
  }
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid {
  grid-auto-rows: auto;
  grid-auto-flow: row dense;
  align-items: start;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid.is-masonry-ready {
  --masonry-row-height: 8px;
  grid-auto-rows: var(--masonry-row-height);
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid > .bot-dashboard-card {
  grid-column: span var(--widget-span, 6);
  grid-row: auto;
  grid-template-rows: auto;
  height: auto;
  overflow: visible;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid.is-masonry-ready > .bot-dashboard-card {
  grid-row: span var(--masonry-rows, 1);
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid.is-measuring > .bot-dashboard-card {
  grid-row: auto;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid > .bot-dashboard-card.is-full {
  grid-column: 1 / -1;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid > .bot-dashboard-card > :not(.bot-dashboard-card-head) {
  overflow: visible;
}

@media (max-width: 1060px) {
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid > .bot-dashboard-card,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid > .bot-dashboard-card.is-compact,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid > .bot-dashboard-card.is-side,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid > .bot-dashboard-card.is-half,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid > .bot-dashboard-card.is-wide,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid > .bot-dashboard-card.is-full {
    grid-column: 1 / -1;
  }
}

.bot-access-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.072), rgba(255, 255, 255, 0.024)),
    var(--panel);
  box-shadow:
    0 18px 70px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.bot-ops-console-head,
.bot-ops-queue-panel,
.bot-ops-config-panel,
.bot-ops-section {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.bot-access-panel-head,
.bot-ops-console-head,
.bot-ops-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.bot-access-kicker {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bot-access-panel-head h3,
.bot-ops-console-head h2,
.bot-ops-panel-head h3 {
  margin: 3px 0;
  color: var(--text);
}

.bot-access-panel-head p,
.bot-ops-console-head p,
.bot-ops-helper-text {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 740;
  line-height: 1.45;
}

.bot-ops-console-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(74px, 1fr));
  gap: 8px;
  min-width: 0;
}

.bot-ops-console-stats div,
.bot-ops-queue-tabs span,
.bot-access-permission-line span,
.bot-role-check {
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.bot-ops-console-stats div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
}

.bot-ops-console-stats span,
.bot-ops-queue-tabs span,
.bot-ops-case-row span,
.bot-ops-case-row small,
.bot-ops-case-row em,
.bot-ops-control-row span,
.bot-ops-control-row em,
.bot-ops-command-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-ops-console-stats strong {
  color: var(--text);
  font-size: 1.16rem;
}

.bot-ops-console-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.bot-ops-console .bot-dashboard-card {
  grid-column: auto;
  grid-row: auto;
}

.bot-ops-console .bot-dashboard-card-head {
  min-width: 0;
}

.bot-ops-console .bot-dashboard-card-title {
  align-items: flex-start;
}

.bot-ops-queue-panel .bot-dashboard-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.bot-ops-queue-panel .bot-dashboard-card-title {
  width: auto;
}

.bot-ops-console .bot-dashboard-card h2,
.bot-ops-console .bot-dashboard-card h3 {
  white-space: normal;
}

.bot-ops-queue-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bot-ops-queue-tabs span {
  padding: 6px 8px;
  border-radius: 999px;
}

.bot-ops-archive-link {
  display: inline-flex;
  align-self: center;
  justify-self: end;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.18);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration: none;
}

.bot-ops-archive-link:hover,
.bot-ops-archive-link:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.34);
  background: rgba(var(--accent-rgb), 0.08);
}

.bot-ops-case-row,
.bot-ops-control-row,
.bot-ops-command-row,
.bot-ops-panel-card {
  display: grid;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.032);
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
}

.bot-ops-case-row {
  grid-template-columns: 58px minmax(0, 1fr) auto;
}

.bot-ops-control-row {
  grid-template-columns: minmax(84px, 0.32fr) minmax(0, 1fr) auto;
}

.bot-ops-command-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

button.bot-ops-control-row,
button.bot-ops-command-row {
  appearance: none;
  cursor: pointer;
}

.bot-ops-case-row:hover,
.bot-ops-case-row:focus-visible,
button.bot-ops-control-row:hover,
button.bot-ops-control-row:focus-visible,
button.bot-ops-command-row:hover,
button.bot-ops-command-row:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.34);
  background: rgba(var(--accent-rgb), 0.08);
}

.bot-ops-case-row.is-state-escalated,
.bot-ops-case-row.is-state-attention {
  border-color: rgba(var(--accent-warm-rgb), 0.34);
}

.bot-ops-case-row div,
.bot-ops-control-group header,
.bot-ops-panel-card {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.bot-ops-case-row strong,
.bot-ops-control-row strong,
.bot-ops-command-row strong,
.bot-ops-panel-card strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-ops-panel-grid,
.bot-ops-control-list,
.bot-ops-command-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 8px;
  min-width: 0;
}

.bot-ops-control-group {
  display: grid;
  gap: 9px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(var(--muted-rgb), 0.1);
}

.bot-ops-control-group:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.bot-ops-control-group header span,
.bot-ops-panel-card small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 740;
  line-height: 1.35;
}

.bot-ops-command-section {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.024);
}

.bot-ops-command-section summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  list-style: none;
  cursor: pointer;
}

.bot-ops-command-section summary::-webkit-details-marker {
  display: none;
}

.bot-ops-command-section summary strong,
.bot-ops-command-section summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-ops-command-section summary span,
.bot-ops-muted-count {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.bot-suite-widget {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.46) rgba(var(--muted-rgb), 0.06);
}

.bot-suite-widget::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.bot-suite-widget::-webkit-scrollbar-track {
  background: rgba(var(--muted-rgb), 0.05);
  border-radius: 999px;
}

.bot-suite-widget::-webkit-scrollbar-thumb {
  border: 2px solid rgba(var(--muted-rgb), 0.05);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.44);
  background-clip: padding-box;
}

.bot-suite-widget-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.bot-suite-widget-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.bot-suite-widget-label {
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bot-suite-widget-head strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.25;
}

.bot-suite-widget-head small {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 760;
}

.bot-suite-widget-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.bot-suite-widget-stats div,
.bot-suite-widget-row,
.bot-suite-widget-empty,
.bot-suite-widget-groups span {
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.032);
}

.bot-suite-widget-stats div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
}

.bot-suite-widget-stats span,
.bot-suite-widget-row span,
.bot-suite-widget-row em,
.bot-suite-widget-groups span,
.bot-suite-widget-empty span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-suite-widget-stats strong {
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1;
}

.bot-suite-widget-queue {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.bot-suite-widget-row {
  display: grid;
  grid-template-columns: minmax(54px, 0.24fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
  color: inherit;
  text-decoration: none;
}

.bot-suite-widget-row:hover,
.bot-suite-widget-row:focus-visible {
  border-color: rgba(var(--widget-accent-rgb), 0.36);
  background: rgba(var(--widget-accent-rgb), 0.08);
}

.bot-suite-widget-row strong,
.bot-suite-widget-empty strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-suite-widget-row.is-state-escalated,
.bot-suite-widget-row.is-state-attention {
  border-color: rgba(var(--accent-warm-rgb), 0.34);
}

.bot-suite-widget-empty {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.bot-suite-widget-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.bot-suite-widget-groups span {
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 999px;
}

.bot-panel-section .status-pill {
  min-width: max-content;
  overflow: visible;
  white-space: nowrap;
}

.bot-panel-section .bot-dashboard-side,
.bot-panel-section .bot-dashboard-head,
.bot-panel-section .bot-dashboard-kpis,
.bot-panel-section .bot-dashboard-card,
.bot-panel-section .bot-access-panel {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.bot-panel-section .bot-dashboard-card::before,
.bot-panel-section .bot-dashboard-card::after {
  content: none;
  display: none;
}

.bot-panel-section .bot-dashboard-card {
  isolation: auto;
}

.bot-panel-section .bot-dashboard-card-head {
  padding-bottom: 10px;
  border-bottom-color: rgba(var(--muted-rgb), 0.11);
}

.bot-panel-section .bot-dashboard-widget-icon,
.bot-panel-section .bot-dashboard-row-icon,
.bot-panel-section .bot-dashboard-command-icon,
.bot-panel-section .bot-dashboard-metric-icon,
.bot-panel-section .bot-dashboard-record-icon,
.bot-panel-section .bot-dashboard-section-title > span {
  border-color: rgba(var(--muted-rgb), 0.16);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.bot-dashboard-metric-tile span,
.bot-dashboard-metric-tile small,
.bot-dashboard-row span,
.bot-dashboard-category small,
.bot-dashboard-command-item span,
.bot-dashboard-quota-row span,
.bot-dashboard-quota-row strong {
  white-space: normal;
}

.bot-dashboard-card-resource_usage .bot-dashboard-resource-widget {
  grid-template-columns: 1fr;
}

.bot-dashboard-card-resource_usage .bot-dashboard-resource-ring {
  display: none;
}

.bot-dashboard-card-resource_usage .bot-dashboard-list {
  gap: 8px;
}

.bot-dashboard-card-resource_usage .bot-dashboard-row {
  padding: 10px;
}

.bot-ops-console-head.bot-dashboard-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 0 0 2px;
  border: 0;
  background: transparent;
}

.bot-ops-console-head.bot-dashboard-card .bot-dashboard-card-head {
  padding-bottom: 0;
  border-bottom: 0;
}

.bot-ops-console-head .bot-ops-console-stats div {
  min-height: 0;
  padding: 8px 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    var(--panel);
}

.bot-ops-console-shell {
  gap: 12px;
}

.bot-ops-queue-panel,
.bot-ops-section {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    var(--panel);
}

.bot-ops-panel-card,
.bot-ops-case-row,
.bot-ops-command-section,
.bot-ops-command-row,
.bot-suite-widget-stats div,
.bot-suite-widget-row,
.bot-suite-widget-groups span {
  background: rgba(255, 255, 255, 0.042);
}

.bot-ops-case-row small,
.bot-ops-command-row small,
.bot-ops-panel-card small {
  white-space: normal;
}

.bot-ops-panel-card span {
  width: fit-content;
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 920;
  line-height: 1;
  text-transform: uppercase;
}

.bot-panel-section.is-ops-view {
  padding-top: 20px;
}

.bot-panel-section.is-ops-view > .dashboard-title-row {
  margin-bottom: 10px;
}

.bot-panel-section.is-ops-view .section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
}

.bot-panel-section.is-ops-view .section-heading h1 {
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  line-height: 1.15;
}

.bot-panel-section.is-ops-view .section-heading p {
  flex: 1 1 420px;
  max-width: none;
  font-size: 0.92rem;
  line-height: 1.4;
}

.bot-panel-section.is-ops-view .bot-dashboard-side,
.bot-panel-section.is-ops-view .bot-dashboard-card,
.bot-panel-section.is-ops-view .bot-dashboard-ops-state-strip div,
.bot-panel-section.is-ops-view .bot-dashboard-ops-metric,
.bot-panel-section.is-ops-view .bot-dashboard-ops-panel,
.bot-panel-section.is-ops-view .bot-dashboard-ops-lane,
.bot-panel-section.is-ops-view .bot-dashboard-ops-event,
.bot-panel-section.is-ops-view .bot-dashboard-ops-command,
.bot-panel-section.is-ops-view .bot-dashboard-ops-panel-row,
.bot-panel-section.is-ops-view .bot-dashboard-ops-case,
.bot-panel-section.is-ops-view .bot-dashboard-ops-command-section,
.bot-panel-section.is-ops-view .bot-dashboard-ops-command-card,
.bot-panel-section.is-ops-view .bot-dashboard-ops-command-summary,
.bot-panel-section.is-ops-view .bot-dashboard-row,
.bot-panel-section.is-ops-view .bot-dashboard-metric-tile {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.bot-panel-section.is-ops-view .bot-dashboard-side,
.bot-panel-section.is-ops-view .bot-dashboard-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    var(--panel);
}

.bot-panel-section.is-ops-view .bot-dashboard-ops-state-strip div,
.bot-panel-section.is-ops-view .bot-dashboard-ops-metric,
.bot-panel-section.is-ops-view .bot-dashboard-ops-panel,
.bot-panel-section.is-ops-view .bot-dashboard-ops-lane,
.bot-panel-section.is-ops-view .bot-dashboard-ops-event,
.bot-panel-section.is-ops-view .bot-dashboard-ops-command,
.bot-panel-section.is-ops-view .bot-dashboard-ops-panel-row,
.bot-panel-section.is-ops-view .bot-dashboard-ops-command-section,
.bot-panel-section.is-ops-view .bot-dashboard-ops-command-card,
.bot-panel-section.is-ops-view .bot-dashboard-ops-command-summary,
.bot-panel-section.is-ops-view .bot-dashboard-row,
.bot-panel-section.is-ops-view .bot-dashboard-metric-tile {
  background: rgba(255, 255, 255, 0.042);
}

.bot-panel-section.is-ops-view .bot-dashboard-ops-case {
  background: rgba(255, 255, 255, 0.038);
}

@media (max-width: 1060px) {
  .bot-panel-section.is-ops-view .bot-dashboard-side-nav,
  .bot-panel-section.is-ops-view .bot-dashboard-server {
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
      var(--panel);
  }
}

.bot-panel-section > .dashboard-title-row {
  margin-bottom: 16px;
}

.bot-panel-section .section-heading {
  display: grid;
  gap: 6px;
  align-items: start;
}

.bot-panel-section.is-ops-view .section-heading {
  display: grid;
  gap: 6px;
  align-items: start;
}

.bot-panel-section .section-heading h1,
.bot-panel-section.is-ops-view .section-heading h1 {
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  line-height: 1.02;
}

.bot-panel-section .section-heading p,
.bot-panel-section.is-ops-view .section-heading p {
  max-width: 880px;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 760;
  line-height: 1.5;
}

.bot-dashboard-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.bot-dashboard-identity {
  align-items: flex-start;
}

.bot-dashboard-identity h2 {
  font-size: clamp(1.75rem, 2.6vw, 2.45rem);
  line-height: 1;
}

.bot-dashboard-main-text {
  max-width: 720px;
  margin-top: 2px;
  color: var(--text) !important;
  font-weight: 820;
}

.bot-dashboard-controls {
  align-self: center;
}

.bot-dashboard-card-head {
  gap: 12px;
}

.bot-dashboard-card-title {
  align-items: flex-start;
}

.bot-dashboard-card-title .eyebrow {
  margin-bottom: 3px;
}

.bot-dashboard-card h3 {
  font-size: 1.18rem;
  line-height: 1.12;
}

.bot-dashboard-activity-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.bot-dashboard-activity-overview div,
.bot-dashboard-data-summary,
.bot-dashboard-runtime-summary,
.bot-dashboard-traffic-total {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.bot-dashboard-activity-overview strong,
.bot-dashboard-data-summary strong,
.bot-dashboard-runtime-summary strong,
.bot-dashboard-traffic-total strong {
  overflow: hidden;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-activity-overview span,
.bot-dashboard-data-summary span,
.bot-dashboard-runtime-summary span,
.bot-dashboard-traffic-total span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.bot-dashboard-feed-grid {
  margin-top: 10px;
}

.bot-dashboard-traffic-widget,
.bot-dashboard-data-widget,
.bot-dashboard-runtime-widget {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.bot-dashboard-traffic-widget .bot-dashboard-metric-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bot-dashboard-card-command_activity.is-wide .bot-dashboard-traffic-widget {
  grid-template-columns: minmax(150px, 0.34fr) minmax(0, 1fr);
  align-items: stretch;
}

.bot-dashboard-card-command_activity.is-wide .bot-dashboard-traffic-total {
  align-content: center;
  min-height: 0;
}

.bot-dashboard-card-command_activity.is-wide .bot-dashboard-traffic-total strong {
  font-size: 2rem;
}

.bot-dashboard-card-command_activity.is-wide .bot-dashboard-metric-list {
  align-content: stretch;
}

.bot-dashboard-traffic-widget .bot-dashboard-metric-tile {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.bot-dashboard-traffic-widget .bot-dashboard-metric-tile small,
.bot-dashboard-traffic-widget .bot-dashboard-metric-tile span {
  white-space: normal;
}

.bot-dashboard-card-storage_overview .bot-dashboard-quota-widget,
.bot-dashboard-card-resource_usage .bot-dashboard-resource-widget {
  grid-template-columns: 1fr;
}

.bot-dashboard-card-storage_overview .bot-dashboard-quota-ring,
.bot-dashboard-card-resource_usage .bot-dashboard-resource-ring {
  display: none;
}

.bot-dashboard-card-storage_overview .bot-dashboard-quota-list,
.bot-dashboard-card-resource_usage .bot-dashboard-list {
  display: grid;
  gap: 8px;
}

.bot-dashboard-card-command_category .bot-dashboard-category-head {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.bot-dashboard-card-command_category .bot-dashboard-category-head .button {
  grid-column: auto;
  width: auto;
  min-height: 38px;
  padding-inline: 12px;
}

@container (max-width: 560px) {
  .bot-dashboard-traffic-widget .bot-dashboard-metric-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bot-dashboard-card-command_category .bot-dashboard-category-head {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .bot-dashboard-card-command_category .bot-dashboard-category-head .button {
    grid-column: auto;
    width: auto;
  }
}

@media (max-width: 760px) {
  .bot-dashboard-head {
    grid-template-columns: 1fr;
  }

  .bot-dashboard-controls {
    justify-content: flex-start;
  }

  .bot-dashboard-activity-overview {
    grid-template-columns: 1fr;
  }

  .bot-dashboard-traffic-widget .bot-dashboard-metric-list {
    grid-template-columns: 1fr;
  }
}

.bot-ops-panel-card.is-disabled,
.bot-ops-control-row.is-disabled,
.bot-ops-command-row.is-disabled {
  opacity: 0.68;
}

.bot-access-table,
.bot-role-matrix {
  display: grid;
  min-width: 0;
  overflow: auto;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
}

.bot-access-row,
.bot-role-matrix-row {
  display: grid;
  gap: 10px;
  align-items: center;
  min-width: 760px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(var(--muted-rgb), 0.1);
}

.bot-access-row {
  grid-template-columns: minmax(220px, 1fr) minmax(120px, 0.36fr) minmax(260px, 1fr) auto;
}

.bot-role-matrix-row {
  grid-template-columns: minmax(190px, 1fr) repeat(5, minmax(112px, 0.56fr)) minmax(92px, auto);
  min-width: 930px;
}

.bot-access-row:last-child,
.bot-role-matrix-row:last-child {
  border-bottom: 0;
}

.bot-access-row-head,
.bot-role-matrix-head {
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bot-access-person {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.bot-access-person div,
.bot-role-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bot-access-person strong,
.bot-role-title strong,
.bot-access-person small,
.bot-role-title small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-access-person small,
.bot-role-title small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.bot-access-permission-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.bot-access-permission-line span,
.bot-role-check {
  width: fit-content;
  max-width: 100%;
  padding: 5px 7px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
}

.bot-role-check.is-enabled {
  border-color: rgba(95, 211, 162, 0.28);
  background: rgba(95, 211, 162, 0.08);
  color: #9ff0cb;
}

.bot-access-empty {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px dashed rgba(var(--muted-rgb), 0.16);
  border-radius: 8px;
  color: var(--muted);
}

.bot-access-empty strong {
  color: var(--text);
}

.bot-access-add .bot-dashboard-collaborator-form {
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.34fr) auto;
  margin: 0;
}

.bot-role-create details,
.bot-dashboard-role-editor {
  display: grid;
  gap: 10px;
}

.bot-role-create summary,
.bot-dashboard-role-editor summary {
  width: fit-content;
  list-style: none;
  cursor: pointer;
}

.bot-role-create summary::-webkit-details-marker,
.bot-dashboard-role-editor summary::-webkit-details-marker {
  display: none;
}

.bot-role-create .bot-dashboard-role-form,
.bot-dashboard-role-editor .bot-dashboard-role-form {
  margin-top: 10px;
}

@media (max-width: 1160px) {
  .bot-ops-console-head,
  .bot-ops-console-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .bot-ops-console-stats,
  .bot-access-add .bot-dashboard-collaborator-form {
    grid-template-columns: 1fr;
  }

  .bot-access-row,
  .bot-role-matrix-row {
    min-width: 0;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .bot-access-row-head,
  .bot-role-matrix-head {
    display: none;
  }
}

/* Bot dashboard polish: same Sefrum theme, cleaner hierarchy. */
.bot-panel-section {
  --bot-dashboard-border: rgba(var(--muted-rgb), 0.16);
  --bot-dashboard-border-strong: rgba(var(--muted-rgb), 0.24);
  --bot-dashboard-panel: rgba(var(--panel-rgb), 0.92);
  --bot-dashboard-soft: rgba(var(--text-rgb), 0.035);
  --bot-dashboard-shadow: 0 18px 52px rgba(0, 0, 0, 0.18);
}

.bot-panel-section .bot-dashboard-app {
  grid-template-columns: minmax(224px, 244px) minmax(0, 1180px);
  gap: 18px;
}

.bot-panel-section .bot-dashboard-main {
  gap: 16px;
}

.bot-panel-section .bot-dashboard-side,
.bot-panel-section .bot-dashboard-head,
.bot-panel-section .bot-dashboard-kpis,
.bot-panel-section .bot-dashboard-card:not(.bot-ops-console-head) {
  border-color: var(--bot-dashboard-border);
  background:
    linear-gradient(180deg, rgba(var(--text-rgb), 0.07), rgba(var(--text-rgb), 0.022)),
    var(--bot-dashboard-panel);
  box-shadow: var(--bot-dashboard-shadow), inset 0 1px 0 rgba(var(--text-rgb), 0.035);
}

.bot-panel-section .bot-dashboard-side {
  gap: 12px;
  padding: 12px;
}

.bot-panel-section .bot-dashboard-side-profile {
  padding: 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.2);
}

.bot-panel-section .bot-dashboard-side-profile h2 {
  margin-block: 3px 1px;
  font-size: 1.04rem;
  line-height: 1.14;
}

.bot-panel-section .bot-dashboard-side-profile p {
  font-size: 0.78rem;
}

.bot-panel-section .bot-dashboard-side-nav {
  gap: 6px;
}

.bot-panel-section .bot-dashboard-side-nav a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border-color: rgba(var(--muted-rgb), 0.08);
  background: rgba(var(--bg-rgb), 0.12);
  font-size: 0.86rem;
}

.bot-panel-section .bot-dashboard-side-nav a:hover,
.bot-panel-section .bot-dashboard-side-nav a:focus-visible,
.bot-panel-section .bot-dashboard-side-nav a.is-active {
  border-color: rgba(var(--accent-rgb), 0.28);
  background: rgba(var(--text-rgb), 0.055);
  color: var(--text);
}

.bot-panel-section .bot-dashboard-head {
  padding: 16px;
}

.bot-panel-section .bot-dashboard-main-text {
  color: var(--text) !important;
  font-size: 0.92rem;
  line-height: 1.45;
}

.bot-panel-section .bot-dashboard-kpis {
  gap: 1px;
  padding: 1px;
  background: rgba(var(--muted-rgb), 0.1);
}

.bot-panel-section .bot-dashboard-kpis div {
  min-height: 92px;
  border-right: 0;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(var(--text-rgb), 0.058), rgba(var(--text-rgb), 0.016)),
    rgba(var(--panel-rgb), 0.88);
}

.bot-panel-section .bot-dashboard-kpis span,
.bot-panel-section .bot-dashboard-kpis small {
  font-size: 0.76rem;
  line-height: 1.3;
}

.bot-panel-section .bot-dashboard-kpis strong {
  font-size: 1.34rem;
}

.bot-panel-section .bot-dashboard-card[data-widget-card] {
  border-left: 3px solid rgba(var(--widget-accent-rgb), 0.42);
}

.bot-panel-section .bot-dashboard-card[data-widget-card]:hover {
  border-color: rgba(var(--widget-accent-rgb), 0.28);
  background:
    linear-gradient(180deg, rgba(var(--widget-accent-rgb), 0.055), rgba(var(--text-rgb), 0.018)),
    var(--bot-dashboard-panel);
}

.bot-panel-section .bot-dashboard-card-head {
  gap: 10px;
  padding-bottom: 9px;
  border-bottom-color: rgba(var(--muted-rgb), 0.1);
}

.bot-panel-section .bot-dashboard-card-title {
  align-items: flex-start;
  min-width: 0;
}

.bot-panel-section .bot-dashboard-card-title h3 {
  margin: 1px 0 0;
  font-size: 1.02rem;
  line-height: 1.18;
}

.bot-panel-section .bot-dashboard-card-title .eyebrow {
  margin-bottom: 0;
}

.bot-panel-section .bot-dashboard-widget-icon,
.bot-panel-section .bot-dashboard-row-icon,
.bot-panel-section .bot-dashboard-command-icon,
.bot-panel-section .bot-dashboard-metric-icon,
.bot-panel-section .bot-dashboard-record-icon,
.bot-panel-section .bot-dashboard-section-title > span {
  border-color: rgba(var(--widget-accent-rgb), 0.18);
  background: rgba(var(--widget-accent-rgb), 0.075);
}

.bot-panel-section .bot-dashboard-row,
.bot-panel-section .bot-dashboard-category,
.bot-panel-section .bot-dashboard-record-head,
.bot-panel-section .bot-dashboard-metric-tile,
.bot-panel-section .bot-dashboard-activity-overview div,
.bot-panel-section .bot-dashboard-data-summary,
.bot-panel-section .bot-dashboard-runtime-summary,
.bot-panel-section .bot-dashboard-traffic-total,
.bot-panel-section .bot-dashboard-bar-list,
.bot-panel-section .bot-dashboard-quota-row {
  border-color: rgba(var(--muted-rgb), 0.12);
  background:
    linear-gradient(180deg, rgba(var(--text-rgb), 0.045), rgba(var(--text-rgb), 0.014)),
    rgba(var(--bg-rgb), 0.16);
  box-shadow: inset 0 1px 0 rgba(var(--text-rgb), 0.022);
}

.bot-panel-section .bot-dashboard-activity-overview div,
.bot-panel-section .bot-dashboard-data-summary,
.bot-panel-section .bot-dashboard-runtime-summary,
.bot-panel-section .bot-dashboard-traffic-total {
  min-height: 72px;
}

.bot-panel-section .bot-dashboard-metric-tile {
  min-height: 82px;
}

.bot-panel-section .bot-dashboard-metric-tile strong,
.bot-panel-section .bot-dashboard-activity-overview strong,
.bot-panel-section .bot-dashboard-data-summary strong,
.bot-panel-section .bot-dashboard-runtime-summary strong,
.bot-panel-section .bot-dashboard-traffic-total strong {
  font-size: 1.24rem;
}

.bot-panel-section .bot-dashboard-progress {
  height: 9px;
  background: rgba(var(--muted-rgb), 0.12);
}

.bot-panel-section .bot-dashboard-command-item {
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.14);
}

.bot-panel-section .bot-dashboard-command-toggle-row {
  padding: 9px;
}

.bot-panel-section .bot-dashboard-command-name strong,
.bot-panel-section .bot-dashboard-command-open span:last-child,
.bot-suite-widget-row strong,
.bot-suite-widget-row em {
  white-space: normal;
}

.bot-suite-widget {
  gap: 10px;
  overflow: visible;
}

.bot-suite-widget-head {
  padding: 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(var(--text-rgb), 0.052), rgba(var(--text-rgb), 0.014)),
    rgba(var(--bg-rgb), 0.16);
}

.bot-suite-widget-head .button {
  min-height: 34px;
  padding-inline: 12px;
}

.bot-suite-widget-stats div {
  min-height: 70px;
}

.bot-suite-widget-stats strong {
  font-size: 1.28rem;
}

.bot-suite-widget-row {
  min-height: 46px;
}

.bot-ops-console-head.bot-dashboard-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.5fr);
  gap: 16px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid var(--bot-dashboard-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(var(--text-rgb), 0.072), rgba(var(--text-rgb), 0.02)),
    var(--bot-dashboard-panel);
  box-shadow: var(--bot-dashboard-shadow);
}

.bot-ops-console-head.bot-dashboard-card .bot-dashboard-card-head {
  display: flex;
  min-width: 0;
}

.bot-ops-console-head .bot-dashboard-card-title {
  align-items: center;
}

.bot-ops-console-head .bot-dashboard-card-title h3 {
  font-size: 1.28rem;
}

.bot-ops-console-stats {
  align-content: stretch;
  gap: 8px;
}

.bot-ops-console-stats div {
  min-height: 74px;
  border-color: rgba(var(--muted-rgb), 0.13);
  background:
    linear-gradient(180deg, rgba(var(--text-rgb), 0.052), rgba(var(--text-rgb), 0.014)),
    rgba(var(--bg-rgb), 0.18);
}

.bot-ops-console-stats strong {
  font-size: 1.26rem;
}

.bot-ops-console-shell {
  grid-template-columns: minmax(300px, 0.4fr) minmax(0, 1fr);
  gap: 16px;
}

.bot-ops-queue-panel,
.bot-ops-section {
  border-color: var(--bot-dashboard-border);
  background:
    linear-gradient(180deg, rgba(var(--text-rgb), 0.07), rgba(var(--text-rgb), 0.02)),
    var(--bot-dashboard-panel);
  box-shadow: var(--bot-dashboard-shadow);
}

.bot-ops-queue-panel {
  position: sticky;
  top: 92px;
}

.bot-ops-panel-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
}

.bot-ops-panel-card {
  align-content: start;
  min-height: 74px;
  padding: 10px;
}

.bot-ops-case-row,
.bot-ops-command-row,
.bot-ops-panel-card,
.bot-ops-command-section {
  border-color: rgba(var(--muted-rgb), 0.13);
  background:
    linear-gradient(180deg, rgba(var(--text-rgb), 0.045), rgba(var(--text-rgb), 0.014)),
    rgba(var(--bg-rgb), 0.16);
}

.bot-ops-case-row {
  min-height: 56px;
}

.bot-ops-command-row {
  min-height: 48px;
}

.bot-ops-case-row strong,
.bot-ops-case-row small,
.bot-ops-case-row em,
.bot-ops-command-row strong,
.bot-ops-command-row small,
.bot-ops-panel-card strong,
.bot-ops-panel-card small {
  white-space: normal;
}

.bot-ops-command-sections {
  gap: 10px;
}

.bot-ops-command-section {
  padding: 10px;
}

.bot-ops-command-section[open] {
  border-color: var(--bot-dashboard-border-strong);
}

.bot-ops-command-section summary {
  min-height: 34px;
}

.bot-ops-command-section summary span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(var(--muted-rgb), 0.08);
}

@media (max-width: 1160px) {
  .bot-ops-console-head.bot-dashboard-card,
  .bot-ops-console-shell {
    grid-template-columns: 1fr;
  }

  .bot-ops-queue-panel {
    position: static;
  }
}

@media (max-width: 1060px) {
  .bot-panel-section .bot-dashboard-app {
    grid-template-columns: 1fr;
  }

  .bot-panel-section .bot-dashboard-side {
    position: static;
  }

  .bot-panel-section .bot-dashboard-side-nav {
    grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  }
}

@media (max-width: 760px) {
  .bot-panel-section .bot-dashboard-head,
  .bot-panel-section .bot-dashboard-kpis,
  .bot-ops-console-head.bot-dashboard-card {
    padding: 12px;
  }

  .bot-panel-section .bot-dashboard-kpis,
  .bot-suite-widget-stats,
  .bot-ops-console-stats {
    grid-template-columns: 1fr;
  }

  .bot-ops-case-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .bot-ops-case-row em {
    justify-self: start;
  }
}

/* Dashboard layout pass: make the default view scan in stable work zones. */
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid {
  align-items: stretch;
  grid-auto-flow: row;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid.is-masonry-ready {
  grid-auto-rows: auto;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid.is-masonry-ready > .bot-dashboard-card {
  grid-row: auto;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-command_activity {
  order: 1;
  grid-column: span 4;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-resource_usage {
  order: 2;
  grid-column: span 4;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-storage_overview {
  order: 3;
  grid-column: span 4;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-command_category {
  order: 4;
  grid-column: span 6;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-bot_basics {
  order: 5;
  grid-column: span 6;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-ticketing_hq {
  order: 7;
  grid-column: span 6;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-moderation_hq {
  order: 8;
  grid-column: span 6;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-bot_stats,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-audience_stats,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-trigger_breakdown,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-activity_breakdown {
  order: 9;
  grid-column: span 3;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-pinned_state,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-custom_records,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-collaborators {
  order: 9;
  grid-column: span 6;
}

.bot-dashboard-card[data-widget-card],
.bot-dashboard-card-bot_basics,
.bot-dashboard-card-command_category,
.bot-dashboard-card-command_activity,
.bot-dashboard-card-bot_stats,
.bot-dashboard-card-trigger_breakdown,
.bot-dashboard-card-activity_breakdown,
.bot-dashboard-card-moderation_hq,
.bot-dashboard-card-pinned_state,
.bot-dashboard-card-storage_overview,
.bot-dashboard-card-custom_records,
.bot-dashboard-card-ticketing_hq,
.bot-dashboard-card-collaborators {
  --widget-accent-rgb: var(--accent-rgb);
}

.bot-panel-section .bot-dashboard-card[data-widget-card] {
  border-left: 1px solid var(--bot-dashboard-border);
}

.bot-panel-section .bot-dashboard-card[data-widget-card]:hover {
  border-color: var(--bot-dashboard-border-strong);
  background:
    linear-gradient(180deg, rgba(var(--text-rgb), 0.058), rgba(var(--text-rgb), 0.02)),
    var(--bot-dashboard-panel);
}

.bot-dashboard-card[data-widget-card]::before {
  display: none;
}

.bot-dashboard-card[data-widget-card]::after {
  background: transparent;
}

.bot-dashboard-card[data-widget-card] .bot-dashboard-card-title .eyebrow,
.bot-dashboard-card[data-widget-card] small,
.bot-suite-widget-label {
  display: none;
}

.bot-dashboard-widget-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.bot-dashboard-widget-actions .button,
.bot-dashboard-data-primary .button {
  min-height: 34px;
  padding-inline: 12px;
}

.bot-dashboard-panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.18);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
}

.bot-dashboard-panel-link:hover,
.bot-dashboard-panel-link:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.3);
  background: rgba(var(--accent-rgb), 0.08);
}

.bot-dashboard-card-storage_overview .bot-dashboard-quota-widget {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.bot-dashboard-data-primary {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(var(--text-rgb), 0.045), rgba(var(--text-rgb), 0.014)),
    rgba(var(--bg-rgb), 0.15);
}

.bot-dashboard-data-primary > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bot-dashboard-data-primary span,
.bot-dashboard-data-primary small,
.bot-dashboard-quota-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.bot-dashboard-data-primary strong {
  color: var(--text);
  font-size: 2.05rem;
  line-height: 1;
}

.bot-dashboard-card-storage_overview .bot-dashboard-quota-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.bot-dashboard-card-storage_overview .bot-dashboard-quota-row {
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
}

.bot-dashboard-card-storage_overview .bot-dashboard-quota-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bot-dashboard-card-storage_overview .bot-dashboard-quota-row strong {
  justify-self: start;
  font-size: 1rem;
}

.bot-dashboard-suite-widget {
  display: grid;
  gap: 12px;
}

.bot-dashboard-suite-hero {
  padding: 12px;
  border: 1px solid rgba(var(--muted-rgb), 0.13);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(var(--text-rgb), 0.045), rgba(var(--text-rgb), 0.014)),
    rgba(var(--bg-rgb), 0.15);
}

.bot-dashboard-suite-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bot-dashboard-suite-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(180px, 0.75fr);
  gap: 10px;
  min-width: 0;
  align-items: start;
}

.bot-dashboard-suite-section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.bot-dashboard-suite-section .bot-dashboard-section-title {
  min-height: 30px;
}

.bot-dashboard-suite-section .bot-suite-widget-queue,
.bot-dashboard-suite-section .bot-suite-widget-groups {
  min-width: 0;
}

.bot-dashboard-suite-section .bot-suite-widget-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.bot-dashboard-suite-section .bot-suite-widget-groups span,
.bot-suite-widget-row,
.bot-suite-widget-empty {
  background:
    linear-gradient(180deg, rgba(var(--text-rgb), 0.04), rgba(var(--text-rgb), 0.012)),
    rgba(var(--bg-rgb), 0.14);
}

.bot-suite-widget-row {
  grid-template-columns: minmax(46px, auto) minmax(0, 1fr) auto;
}

.bot-suite-widget-row em {
  justify-self: end;
}

.bot-ops-console-shell {
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  align-items: start;
}

.bot-ops-config-panel {
  order: 2;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.bot-ops-queue-panel {
  order: 1;
  max-height: calc(100vh - 118px);
  overflow: auto;
}

.bot-ops-panel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bot-ops-command-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 10px;
  align-items: start;
}

.bot-ops-command-list {
  grid-template-columns: 1fr;
}

.bot-ops-command-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.bot-ops-case-list {
  display: grid;
  gap: 8px;
}

.bot-ops-case-row {
  grid-template-columns: minmax(54px, auto) minmax(0, 1fr) auto;
}

@container (max-width: 680px) {
  .bot-dashboard-suite-body,
  .bot-dashboard-card-storage_overview .bot-dashboard-quota-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1160px) {
  .bot-ops-console-shell {
    grid-template-columns: 1fr;
  }

  .bot-ops-queue-panel {
    max-height: none;
  }
}

@media (max-width: 1060px) {
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-command_activity,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-resource_usage,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-storage_overview,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-ticketing_hq,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-moderation_hq,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-command_category,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-bot_stats,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-audience_stats,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-trigger_breakdown,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-activity_breakdown,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-pinned_state,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-custom_records,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-collaborators {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .bot-ops-panel-grid,
  .bot-ops-command-sections,
  .bot-dashboard-card-command_activity.is-wide .bot-dashboard-traffic-widget,
  .bot-dashboard-suite-body,
  .bot-dashboard-card-storage_overview .bot-dashboard-quota-list {
    grid-template-columns: 1fr;
  }

  .bot-suite-widget-row,
  .bot-ops-case-row {
    grid-template-columns: 1fr;
  }

  .bot-suite-widget-row em,
  .bot-ops-case-row em {
    justify-self: start;
  }
}

/* Dashboard correction: compact operational overview, detailed work in panels. */
.bot-panel-section {
  padding-top: 12px;
}

.bot-panel-section > .dashboard-title-row {
  margin-bottom: 10px;
}

.bot-panel-section:not(.is-ops-view) > .dashboard-title-row {
  display: none;
}

.bot-panel-section .section-heading,
.bot-panel-section.is-ops-view .section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}

.bot-panel-section .section-heading h1,
.bot-panel-section.is-ops-view .section-heading h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  line-height: 1.15;
}

.bot-panel-section .section-heading p,
.bot-panel-section.is-ops-view .section-heading p {
  max-width: none;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 760;
  line-height: 1.35;
}

.bot-panel-section:not(.is-ops-view) .bot-dashboard-head {
  display: none;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid {
  --widget-row-height: 112px;
  gap: 14px;
}

.bot-panel-section .bot-dashboard-card[data-widget-card] {
  padding: 14px;
}

.bot-panel-section .bot-dashboard-card[data-widget-card] .bot-dashboard-card-head {
  padding-bottom: 8px;
}

.bot-dashboard-card[data-widget-card] .bot-dashboard-widget-icon,
.bot-dashboard-card[data-widget-card] .bot-dashboard-row-icon,
.bot-dashboard-card[data-widget-card] .bot-dashboard-metric-icon {
  width: 30px;
  height: 30px;
}

.bot-dashboard-card[data-widget-card] .bot-dashboard-card-title h3 {
  font-size: 1rem;
}

.bot-dashboard-card-storage_overview.is-side .bot-dashboard-quota-list {
  display: none;
}

.bot-dashboard-card-storage_overview.is-side .bot-dashboard-data-primary,
.bot-dashboard-card-resource_usage.is-side .bot-dashboard-runtime-summary,
.bot-dashboard-card-command_activity.is-side .bot-dashboard-traffic-total {
  min-height: 0;
}

.bot-dashboard-card-command_activity.is-side .bot-dashboard-metric-list {
  grid-template-columns: 1fr;
}

.bot-dashboard-kpi-widget {
  display: grid;
  gap: 10px;
  min-width: 0;
  align-content: start;
}

.bot-dashboard-inline-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.bot-dashboard-inline-stats span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.16);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1.2;
}

.bot-dashboard-inline-stats strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
}

.bot-dashboard-card-command_activity.is-side .bot-dashboard-metric-tile,
.bot-dashboard-card-storage_overview.is-side .bot-dashboard-data-primary,
.bot-dashboard-card-resource_usage.is-side .bot-dashboard-runtime-summary {
  padding: 10px;
}

.bot-ops-console-head.bot-dashboard-card {
  grid-template-columns: minmax(0, 0.8fr) minmax(340px, 1fr);
  gap: 12px;
  padding: 12px;
}

.bot-ops-console-stats {
  gap: 6px;
}

.bot-ops-console-stats div {
  min-height: 54px;
  padding: 8px 9px;
}

.bot-ops-console-stats strong {
  font-size: 1.12rem;
}

.bot-ops-case-list,
.bot-ops-command-list,
.bot-ops-panel-grid {
  gap: 6px;
}

.bot-ops-case-row,
.bot-ops-command-row,
.bot-ops-panel-card {
  padding: 8px 9px;
}

.bot-ops-case-row:hover,
.bot-ops-case-row:focus-visible,
button.bot-ops-command-row:hover,
button.bot-ops-command-row:focus-visible {
  background: rgba(var(--text-rgb), 0.05);
}

/* Bot dashboard default repair: focused overview, visible top frame, quota rings. */
.bot-panel-section:not(.is-ops-view) > .dashboard-title-row {
  display: flex;
}

.bot-panel-section:not(.is-ops-view) .bot-dashboard-head {
  display: grid;
}

.bot-panel-section .bot-dashboard-card[data-widget-card] {
  border: 1px solid var(--bot-dashboard-border);
  background:
    linear-gradient(180deg, rgba(var(--text-rgb), 0.052), rgba(var(--text-rgb), 0.018)),
    var(--bot-dashboard-panel);
}

.bot-panel-section .bot-dashboard-card[data-widget-card]:hover {
  border-color: var(--bot-dashboard-border-strong);
  background:
    linear-gradient(180deg, rgba(var(--text-rgb), 0.06), rgba(var(--text-rgb), 0.02)),
    var(--bot-dashboard-panel);
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-bot_basics {
  order: 4;
  grid-column: 1 / -1;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-command_category {
  order: 10;
  grid-column: span 6;
}

.bot-dashboard-card-resource_usage .bot-dashboard-resource-widget,
.bot-dashboard-card-storage_overview .bot-dashboard-quota-widget {
  display: grid;
  grid-template-columns: minmax(92px, 0.34fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.bot-dashboard-card-storage_overview .bot-dashboard-quota-ring,
.bot-dashboard-card-resource_usage .bot-dashboard-resource-ring {
  display: grid;
  width: min(108px, 100%);
}

.bot-dashboard-card-storage_overview.is-side .bot-dashboard-quota-list,
.bot-dashboard-card-storage_overview .bot-dashboard-quota-list,
.bot-dashboard-card-resource_usage .bot-dashboard-list {
  display: grid;
  gap: 8px;
}

.bot-dashboard-card-resource_usage .bot-dashboard-row,
.bot-dashboard-card-storage_overview .bot-dashboard-quota-row {
  min-height: 0;
  padding: 9px 10px;
}

.bot-dashboard-card-resource_usage .bot-dashboard-row {
  grid-template-columns: minmax(0, 1fr);
}

.bot-dashboard-card-resource_usage .bot-dashboard-row > div,
.bot-dashboard-card-storage_overview .bot-dashboard-quota-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bot-dashboard-card-resource_usage .bot-dashboard-row strong,
.bot-dashboard-card-storage_overview .bot-dashboard-quota-row strong {
  overflow: hidden;
  justify-self: start;
  max-width: 100%;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-widget-button {
  width: fit-content;
  min-height: 34px;
  padding-inline: 12px;
}

.bot-dashboard-card-command_activity .bot-dashboard-traffic-total strong {
  font-size: 1.64rem;
}

.bot-dashboard-card-command_activity .bot-dashboard-traffic-total span,
.bot-dashboard-card-resource_usage .bot-dashboard-row span,
.bot-dashboard-card-storage_overview .bot-dashboard-quota-row span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
}

@container (max-width: 420px) {
  .bot-dashboard-card-resource_usage .bot-dashboard-resource-widget,
  .bot-dashboard-card-storage_overview .bot-dashboard-quota-widget {
    grid-template-columns: 1fr;
  }

  .bot-dashboard-card-storage_overview .bot-dashboard-quota-ring,
  .bot-dashboard-card-resource_usage .bot-dashboard-resource-ring {
    justify-self: start;
  }
}

.bot-ops-console-shell {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.bot-ops-queue-panel {
  position: static;
  max-height: none;
}

.bot-ops-config-panel {
  align-content: start;
}

.bot-ops-command-sections,
.bot-ops-panel-grid {
  grid-template-columns: 1fr;
}

.bot-dashboard-settings-grid {
  gap: 14px;
}

.bot-dashboard-page-head {
  min-height: 0;
  padding-bottom: 2px;
}

.bot-dashboard-variable-summary {
  display: grid;
  grid-template-columns: minmax(98px, 0.16fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--bot-dashboard-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(var(--text-rgb), 0.052), rgba(var(--text-rgb), 0.018)),
    var(--bot-dashboard-panel);
}

.bot-dashboard-variable-summary .bot-dashboard-quota-ring {
  width: min(112px, 100%);
}

.bot-dashboard-variable-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bot-dashboard-variable-summary-grid div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.16);
}

.bot-dashboard-variable-summary-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
}

.bot-dashboard-variable-summary-grid strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1160px) {
  .bot-ops-console-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .bot-dashboard-variable-summary,
  .bot-dashboard-variable-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* Bot dashboard density pass: content-sized cards and queue-first ops pages. */
.bot-panel-section {
  padding-top: 8px;
}

.bot-panel-section > .dashboard-title-row {
  display: flex;
  width: min(1180px, calc(100vw - 48px));
  margin: 0 auto 12px;
}

.bot-panel-section .section-heading,
.bot-panel-section.is-ops-view .section-heading {
  gap: 4px 10px;
}

.bot-panel-section .section-heading .eyebrow {
  flex-basis: 100%;
}

.bot-panel-section .section-heading h1,
.bot-panel-section.is-ops-view .section-heading h1 {
  font-size: clamp(1.26rem, 1.8vw, 1.52rem);
}

.bot-panel-section .section-heading p,
.bot-panel-section.is-ops-view .section-heading p {
  padding: 3px 8px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 999px;
  background: rgba(var(--bg-rgb), 0.16);
  font-size: 0.75rem;
  line-height: 1;
}

.bot-panel-section .bot-dashboard-app {
  gap: 14px;
}

.bot-panel-section .bot-dashboard-main {
  gap: 12px;
}

.bot-panel-section .bot-dashboard-head {
  min-height: 0;
  padding: 12px;
}

.bot-panel-section .bot-dashboard-avatar {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}

.bot-dashboard-identity h2 {
  font-size: clamp(1.18rem, 1.6vw, 1.38rem);
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid {
  gap: 10px;
  grid-auto-rows: auto;
  align-items: start;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid.is-masonry-ready {
  grid-auto-rows: auto;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid > .bot-dashboard-card,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid.is-masonry-ready > .bot-dashboard-card {
  grid-row: auto;
  grid-template-rows: auto;
  align-content: start;
  height: auto;
  overflow: visible;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid > .bot-dashboard-card > :not(.bot-dashboard-card-head) {
  overflow: visible;
}

.bot-panel-section .bot-dashboard-card[data-widget-card] {
  gap: 10px;
  padding: 12px;
}

.bot-panel-section .bot-dashboard-card[data-widget-card] .bot-dashboard-card-head {
  padding-bottom: 6px;
}

.bot-panel-section .bot-dashboard-activity-overview div,
.bot-panel-section .bot-dashboard-traffic-total,
.bot-panel-section .bot-dashboard-row,
.bot-panel-section .bot-dashboard-quota-row {
  min-height: 0;
}

.bot-dashboard-card-command_activity.is-side .bot-dashboard-traffic-total {
  padding: 9px 10px;
}

.bot-dashboard-inline-stats span {
  padding: 7px;
}

.bot-dashboard-card-resource_usage .bot-dashboard-resource-widget,
.bot-dashboard-card-storage_overview .bot-dashboard-quota-widget {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 9px;
}

.bot-dashboard-card-storage_overview .bot-dashboard-quota-ring,
.bot-dashboard-card-resource_usage .bot-dashboard-resource-ring,
.bot-dashboard-variable-summary .bot-dashboard-quota-ring {
  justify-self: center;
  align-self: center;
  text-align: center;
}

.bot-dashboard-card-resource_usage .bot-dashboard-list,
.bot-dashboard-card-storage_overview .bot-dashboard-quota-list {
  width: 100%;
}

.bot-dashboard-card-storage_overview.is-side .bot-dashboard-quota-row:not(:first-child) {
  display: none;
}

.bot-dashboard-card-storage_overview.is-side .bot-dashboard-widget-button,
.bot-dashboard-card-resource_usage.is-side .bot-dashboard-widget-actions {
  justify-self: center;
  justify-content: center;
}

.bot-dashboard-card-resource_usage.is-side .bot-dashboard-widget-actions .button,
.bot-dashboard-card-storage_overview.is-side .bot-dashboard-widget-button {
  min-height: 32px;
  padding-inline: 10px;
}

@container (max-width: 420px) {
  .bot-dashboard-card-storage_overview .bot-dashboard-quota-ring,
  .bot-dashboard-card-resource_usage .bot-dashboard-resource-ring {
    justify-self: center;
  }
}

.bot-dashboard-card-bot_basics .bot-dashboard-activity-overview {
  display: none;
}

.bot-dashboard-card-bot_basics .bot-dashboard-feed-grid {
  gap: 10px;
  margin-top: 0;
}

.bot-dashboard-card-bot_basics .bot-dashboard-item-row {
  padding: 9px;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-command_activity,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-resource_usage,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-storage_overview {
  min-height: 260px;
}

.bot-dashboard-card-command_activity .bot-dashboard-kpi-widget {
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
}

.bot-dashboard-card-command_activity .bot-dashboard-traffic-total {
  align-content: center;
}

.bot-dashboard-card-storage_overview .bot-dashboard-quota-ring,
.bot-dashboard-card-resource_usage .bot-dashboard-resource-ring {
  width: 92px;
}

.bot-dashboard-quota-ring,
.bot-dashboard-resource-ring,
.bot-dashboard-variable-summary .bot-dashboard-quota-ring {
  --ring-angle: 0deg;
  --ring-fill: rgba(var(--accent-rgb), 0.95);
  background:
    radial-gradient(circle at center, var(--panel) 0 56%, transparent 57%),
    conic-gradient(from -90deg, var(--ring-fill) 0deg var(--ring-angle), rgba(var(--muted-rgb), 0.18) var(--ring-angle) 360deg);
}

.bot-dashboard-card-command_activity .bot-dashboard-kpi-widget {
  grid-template-rows: auto auto auto;
  align-content: start;
}

.bot-dashboard-card-command_activity .bot-dashboard-traffic-total {
  align-content: start;
}

.bot-dashboard-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.bot-dashboard-quick-actions .button {
  min-height: 32px;
  padding-inline: 10px;
}

.bot-dashboard-card-resource_usage .bot-dashboard-progress,
.bot-dashboard-card-storage_overview .bot-dashboard-progress {
  display: none;
}

.bot-ops-console-head.bot-dashboard-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
}

.bot-ops-console-head.bot-dashboard-card .bot-dashboard-card-head {
  padding-bottom: 0;
  border-bottom: 0;
}

.bot-ops-console-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bot-ops-console-stats div {
  min-height: 0;
  padding: 8px 10px;
}

.bot-ops-console-shell {
  grid-template-columns: 1fr;
  gap: 10px;
}

.bot-ops-queue-panel {
  order: 1;
  padding: 12px;
  overflow: visible;
}

.bot-ops-config-panel {
  order: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bot-ops-section.bot-dashboard-card {
  padding: 0;
  overflow: hidden;
}

.bot-ops-section-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 12px;
  list-style: none;
  cursor: pointer;
}

.bot-ops-section-summary::-webkit-details-marker {
  display: none;
}

.bot-ops-section-summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(var(--muted-rgb), 0.14);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 900;
}

.bot-ops-section[open] .bot-ops-section-summary {
  border-bottom: 1px solid rgba(var(--muted-rgb), 0.1);
}

.bot-ops-section[open] .bot-ops-section-summary::after {
  content: "-";
}

.bot-ops-section > .bot-ops-panel-grid,
.bot-ops-section > .bot-ops-command-sections {
  padding: 10px;
}

.bot-ops-panel-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
}

.bot-ops-command-sections {
  grid-template-columns: 1fr;
}

.bot-ops-case-list {
  gap: 7px;
}

.bot-ops-case-row {
  min-height: 0;
  padding: 10px;
}

.bot-ops-archive-link {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.16);
}

.bot-ops-case-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.12);
}

.bot-ops-case-row {
  grid-template-columns: 72px minmax(0, 1fr) 112px;
  gap: 12px;
  min-height: 50px;
  border: 0;
  border-bottom: 1px solid rgba(var(--muted-rgb), 0.1);
  border-left: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.bot-ops-case-row:last-child {
  border-bottom: 0;
}

.bot-ops-case-row.is-state-escalated,
.bot-ops-case-row.is-state-attention,
.bot-ops-case-row.needs-reply {
  border-left-color: rgba(var(--accent-warm-rgb), 0.76);
}

.bot-ops-case-row:hover,
.bot-ops-case-row:focus-visible {
  background: rgba(var(--text-rgb), 0.04);
}

.bot-ops-case-row > span:first-child {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.bot-ops-case-row em {
  justify-self: end;
  align-self: center;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 999px;
  background: rgba(var(--bg-rgb), 0.16);
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

@media (max-width: 900px) {
  .bot-ops-config-panel,
  .bot-ops-console-stats,
  .bot-dashboard-card-bot_basics .bot-dashboard-activity-overview {
    grid-template-columns: 1fr;
  }
}

.bot-dashboard-card-command_activity .bot-dashboard-kpi-widget {
  grid-template-columns: minmax(112px, 0.9fr) minmax(0, 1.1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas:
    "total stats"
    "actions actions";
  gap: 10px;
  align-content: stretch;
  height: 100%;
}

.bot-dashboard-card-command_activity .bot-dashboard-traffic-total {
  grid-area: total;
  align-content: center;
  min-height: 88px;
}

.bot-dashboard-card-command_activity .bot-dashboard-inline-stats {
  grid-area: stats;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.bot-dashboard-card-command_activity .bot-dashboard-inline-stats span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 0;
  padding: 10px;
}

.bot-dashboard-card-command_activity .bot-dashboard-inline-stats strong {
  margin-left: 8px;
}

.bot-dashboard-card-command_activity .bot-dashboard-quick-actions {
  grid-area: actions;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bot-dashboard-card-command_activity .bot-dashboard-quick-actions .button,
.bot-dashboard-widget-actions .button,
.bot-dashboard-widget-button {
  border-color: rgba(var(--accent-rgb), 0.2);
  background: rgba(var(--accent-rgb), 0.075);
}

.bot-dashboard-card-command_activity .bot-dashboard-quick-actions .button:hover,
.bot-dashboard-card-command_activity .bot-dashboard-quick-actions .button:focus-visible,
.bot-dashboard-widget-actions .button:hover,
.bot-dashboard-widget-actions .button:focus-visible,
.bot-dashboard-widget-button:hover,
.bot-dashboard-widget-button:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.36);
  background: rgba(var(--accent-rgb), 0.13);
}

.bot-dashboard-app .bot-dashboard-progress {
  display: none;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-command_activity,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-resource_usage,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-storage_overview {
  min-height: 0;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid > .bot-dashboard-card-command_activity,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid.is-masonry-ready > .bot-dashboard-card-command_activity {
  align-content: stretch;
  grid-template-rows: auto 1fr;
  min-height: 270px;
}

.bot-ops-archive-link {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
}

.bot-ops-archive-link:hover,
.bot-ops-archive-link:focus-visible {
  background: transparent;
  color: var(--text);
}

.bot-ops-case-row em {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
}

.bot-ops-case-row em::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(var(--muted-rgb), 0.45);
}

.bot-ops-case-row.is-state-escalated em,
.bot-ops-case-row.is-state-attention em,
.bot-ops-case-row.needs-reply em {
  color: var(--text);
}

.bot-ops-case-row.is-state-escalated em::before,
.bot-ops-case-row.is-state-attention em::before,
.bot-ops-case-row.needs-reply em::before {
  background: rgba(var(--accent-warm-rgb), 0.95);
}

@container (max-width: 320px) {
  .bot-dashboard-card-command_activity .bot-dashboard-kpi-widget {
    grid-template-columns: 1fr;
    grid-template-areas:
      "total"
      "stats"
      "actions";
  }

  .bot-dashboard-card-command_activity .bot-dashboard-quick-actions {
    grid-template-columns: 1fr;
  }
}

/* Final dashboard cleanup: one identity source, one page title, no duplicate nav buttons. */
.bot-panel-section,
.bot-panel-section.is-ops-view {
  padding-top: 8px;
}

.bot-panel-section > .dashboard-title-row,
.bot-panel-section.is-ops-view > .dashboard-title-row {
  display: flex;
  width: min(1480px, calc(100vw - 48px));
  margin: 0 auto 12px;
}

.bot-panel-section > .dashboard-title-row .section-heading,
.bot-panel-section.is-ops-view > .dashboard-title-row .section-heading {
  margin-left: 262px;
}

.bot-panel-section .section-heading,
.bot-panel-section.is-ops-view .section-heading {
  gap: 4px;
}

.bot-panel-section .section-heading h1,
.bot-panel-section.is-ops-view .section-heading h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(1.28rem, 1.7vw, 1.55rem);
  line-height: 1.14;
}

.bot-panel-section .section-heading .eyebrow,
.bot-panel-section.is-ops-view .section-heading .eyebrow {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.68rem;
}

.bot-dashboard-page-head,
.bot-dashboard-head,
.bot-dashboard-controls {
  display: none !important;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid.is-masonry-ready {
  gap: 10px;
  grid-auto-rows: auto;
  align-items: stretch;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid > .bot-dashboard-card,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid.is-masonry-ready > .bot-dashboard-card {
  grid-row: auto;
  grid-template-rows: auto 1fr;
  align-content: stretch;
  height: auto;
  overflow: visible;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-command_activity,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-resource_usage,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-storage_overview,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid > .bot-dashboard-card-command_activity,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid.is-masonry-ready > .bot-dashboard-card-command_activity {
  min-height: 230px;
}

.bot-dashboard-activity-widget {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 10px;
  align-content: start;
  height: auto;
  min-width: 0;
}

.bot-dashboard-activity-widget .bot-dashboard-traffic-total {
  grid-area: auto;
  display: grid;
  align-content: center;
  min-height: 84px;
}

.bot-dashboard-activity-widget .bot-dashboard-inline-stats {
  grid-area: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.bot-dashboard-activity-widget .bot-dashboard-inline-stats span {
  display: grid;
  gap: 4px;
  align-content: center;
  min-height: 0;
  padding: 9px 10px;
}

.bot-dashboard-quick-actions {
  display: none !important;
}

.bot-dashboard-card-storage_overview .bot-dashboard-quota-widget,
.bot-dashboard-card-resource_usage .bot-dashboard-resource-widget {
  height: 100%;
}

.bot-dashboard-card-storage_overview .bot-dashboard-quota-list {
  align-content: center;
}

.bot-ops-console-head.bot-dashboard-card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.bot-ops-console-head.bot-dashboard-card .bot-dashboard-card-head {
  display: none;
}

.bot-ops-console-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bot-ops-console-shell {
  margin-top: 0;
}

@container (max-width: 340px) {
  .bot-dashboard-activity-widget .bot-dashboard-inline-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .bot-panel-section > .dashboard-title-row .section-heading,
  .bot-panel-section.is-ops-view > .dashboard-title-row .section-heading {
    margin-left: 0;
  }
}

/* Bot dashboard functional widgets and command page parity. */
.bot-dashboard-card-command_activity .bot-dashboard-command-widget {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 9px;
  align-content: start;
  height: 100%;
  min-width: 0;
}

.bot-dashboard-card-command_activity .bot-dashboard-traffic-total {
  grid-area: auto;
  display: grid;
  align-content: center;
  min-height: 70px;
  padding: 10px;
}

.bot-dashboard-card-command_activity .bot-dashboard-inline-stats,
.bot-dashboard-card-command_activity .bot-dashboard-command-actions {
  grid-area: auto;
}

.bot-dashboard-card-command_activity .bot-dashboard-command-widget .bot-dashboard-inline-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto;
  gap: 7px;
}

.bot-dashboard-card-command_activity .bot-dashboard-command-widget .bot-dashboard-inline-stats span {
  display: grid;
  gap: 4px;
  align-content: center;
  justify-content: stretch;
  min-height: 0;
  padding: 9px 10px;
}

.bot-dashboard-command-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  min-width: 0;
}

.bot-dashboard-command-actions .button {
  min-height: 34px;
  line-height: 1.1;
  white-space: normal;
}

.bot-dashboard-widget-action {
  justify-content: center;
  min-height: 34px;
  padding-inline: 10px;
  text-align: center;
}

.bot-dashboard-widget-action.button.secondary,
.bot-dashboard-widget-actions .button {
  border-color: rgba(var(--accent-rgb), 0.22);
  background: rgba(var(--accent-rgb), 0.08);
}

.bot-dashboard-widget-action.button.secondary:hover,
.bot-dashboard-widget-action.button.secondary:focus-visible,
.bot-dashboard-widget-actions .button:hover,
.bot-dashboard-widget-actions .button:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.38);
  background: rgba(var(--accent-rgb), 0.13);
}

.bot-dashboard-mini-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.bot-dashboard-mini-link,
.bot-dashboard-row-link {
  color: var(--text);
  text-decoration: none;
}

.bot-dashboard-mini-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.16);
}

.bot-dashboard-mini-link:hover,
.bot-dashboard-mini-link:focus-visible,
.bot-dashboard-row-link:hover,
.bot-dashboard-row-link:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.28);
  background: rgba(var(--accent-rgb), 0.08);
}

.bot-dashboard-mini-link span,
.bot-dashboard-mini-link strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dashboard-mini-link span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
}

.bot-dashboard-mini-link strong {
  color: var(--accent-warm);
  font-size: 0.78rem;
}

.bot-dashboard-variable-widget-form {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(118px, 0.8fr);
  gap: 7px;
  width: 100%;
  min-width: 0;
}

.bot-dashboard-variable-widget-form input {
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.84rem;
}

.bot-dashboard-variable-widget-form .button {
  white-space: nowrap;
}

.bot-dashboard-card-storage_overview .bot-dashboard-quota-widget,
.bot-dashboard-card-resource_usage .bot-dashboard-resource-widget {
  align-content: start;
  height: auto !important;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid.is-masonry-ready {
  align-items: start;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid > .bot-dashboard-card,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid.is-masonry-ready > .bot-dashboard-card {
  align-self: start;
  grid-template-rows: auto auto;
  align-content: start;
}

.bot-dashboard-card-storage_overview .bot-dashboard-quota-widget,
.bot-dashboard-card-resource_usage .bot-dashboard-resource-widget {
  grid-template-columns: 92px minmax(0, 1fr) !important;
  justify-items: stretch;
  align-items: center;
  gap: 9px 12px;
}

.bot-dashboard-card-storage_overview .bot-dashboard-quota-ring,
.bot-dashboard-card-resource_usage .bot-dashboard-resource-ring {
  width: 84px;
  justify-self: center;
}

.bot-dashboard-card-resource_usage .bot-dashboard-widget-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
}

.command-dashboard-section.bot-panel-section {
  width: 100%;
}

.command-dashboard-section .bot-command-dashboard.bot-dashboard-app {
  grid-template-columns: 240px minmax(0, 1180px);
  gap: 14px;
  justify-content: center;
  width: min(1480px, calc(100vw - 48px));
  margin-inline: auto;
}

.command-dashboard-section .bot-command-main {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.command-dashboard-section .bot-command-main > .bot-dashboard-card,
.command-dashboard-section .bot-command-main > .bot-command-panels,
.command-dashboard-section .bot-command-main > .empty-state {
  grid-column: 1 / -1;
  width: 100%;
}

.command-dashboard-section .bot-command-sidebar {
  min-height: 0;
  padding: 14px;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.16);
}

.command-dashboard-section .bot-command-sidebar.has-categories {
  min-height: 0;
}

.command-dashboard-section .bot-command-sidebar-section {
  padding-top: 12px;
  border-top: 1px solid rgba(var(--muted-rgb), 0.12);
}

.command-dashboard-section .bot-command-category-links {
  gap: 6px;
}

.command-dashboard-section .bot-command-category-links a {
  min-height: 40px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  padding: 6px 8px;
}

.command-dashboard-section .bot-command-category-links a span {
  width: 28px;
  height: 28px;
  font-size: 0.98rem;
}

.command-dashboard-section .bot-command-sidebar .bot-command-filter {
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 12px 0 0;
  border-top: 1px solid rgba(var(--muted-rgb), 0.12);
  border-bottom: 0;
}

.bot-command-toolbar.bot-dashboard-card {
  padding: 12px;
}

.bot-command-toolbar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.bot-command-toolbar-head h3 {
  margin: 2px 0 0;
  font-size: 1.02rem;
}

.command-dashboard-section .bot-command-panels {
  gap: 10px;
  width: 100%;
  justify-items: stretch;
}

.command-dashboard-section .bot-command-category-section {
  gap: 10px;
  width: 100%;
  max-width: none;
  justify-self: stretch;
  padding: 12px;
}

.command-dashboard-section .bot-command-category-title h2 {
  font-size: 1.04rem;
}

.command-dashboard-section .bot-command-category-title > div > span {
  flex-basis: 34px;
  width: 34px;
  height: 34px;
  font-size: 1rem;
}

.command-dashboard-section .bot-command-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(var(--muted-rgb), 0.12);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.16);
}

.command-dashboard-section .bot-command-card {
  align-content: center;
  min-height: 0;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid rgba(var(--muted-rgb), 0.1);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.command-dashboard-section .bot-command-card:last-of-type {
  border-bottom: 0;
}

.command-dashboard-section .bot-command-card:hover,
.command-dashboard-section .bot-command-card.is-context-active {
  border-color: rgba(var(--muted-rgb), 0.1);
  background: rgba(var(--accent-rgb), 0.08);
  transform: none;
}

.command-dashboard-section .bot-command-card .bot-command-row-body {
  gap: 4px;
}

.command-dashboard-section .bot-command-card .bot-command-row-body > span {
  color: var(--muted);
  font-size: 0.82rem;
}

.command-dashboard-section .bot-command-card .bot-command-row-body p {
  font-size: 0.82rem;
  -webkit-line-clamp: 1;
}

@media (max-width: 1060px) {
  .command-dashboard-section .bot-command-dashboard.bot-dashboard-app {
    grid-template-columns: 1fr;
    width: min(100%, calc(100vw - 32px));
  }

  .command-dashboard-section .bot-command-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .bot-dashboard-command-actions,
  .bot-dashboard-card-resource_usage .bot-dashboard-widget-actions,
  .bot-dashboard-variable-widget-form {
    grid-template-columns: 1fr;
  }
}

/* Bot dashboard layout repair: keep identity, nav, and controls readable. */
.bot-panel-section > .dashboard-title-row,
.bot-panel-section.is-ops-view > .dashboard-title-row,
.bot-dashboard-shell {
  width: min(1400px, calc(100vw - 48px));
}

.bot-panel-section .bot-dashboard-app {
  grid-template-columns: minmax(232px, 260px) minmax(0, 1fr);
  justify-content: stretch;
  gap: 16px;
}

.bot-panel-section > .dashboard-title-row .section-heading,
.bot-panel-section.is-ops-view > .dashboard-title-row .section-heading {
  margin-left: 276px;
}

.bot-panel-section .bot-dashboard-side {
  top: 84px;
  max-height: calc(100dvh - 108px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.36) transparent;
}

.bot-panel-section .bot-dashboard-side-profile {
  display: grid;
}

.bot-panel-section .bot-dashboard-side-nav a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid.is-masonry-ready {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid > .bot-dashboard-card-command_activity,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid.is-masonry-ready > .bot-dashboard-card-command_activity,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-resource_usage,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-storage_overview {
  grid-column: span 4;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-bot_basics {
  grid-column: 1 / -1;
}

.bot-dashboard-card-command_activity .bot-dashboard-command-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bot-dashboard-card-resource_usage .bot-dashboard-widget-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bot-dashboard-card-resource_usage .bot-dashboard-widget-actions .button,
.bot-dashboard-card-command_activity .bot-dashboard-command-actions .button,
.bot-dashboard-widget-action {
  min-width: 0;
  white-space: normal;
}

@media (max-width: 1060px) {
  .bot-panel-section > .dashboard-title-row,
  .bot-panel-section.is-ops-view > .dashboard-title-row,
  .bot-dashboard-shell {
    width: min(100%, calc(100vw - 32px));
  }

  .bot-panel-section > .dashboard-title-row .section-heading,
  .bot-panel-section.is-ops-view > .dashboard-title-row .section-heading {
    margin-left: 0;
  }

  .bot-panel-section .bot-dashboard-app {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .bot-panel-section .bot-dashboard-side {
    position: static;
    max-height: none;
    overflow: visible;
    gap: 10px;
    padding: 12px;
  }

  .bot-panel-section .bot-dashboard-side-profile {
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr);
    padding: 8px;
  }

  .bot-panel-section .bot-dashboard-side-profile .bot-dashboard-avatar {
    width: 46px;
    height: 46px;
  }

  .bot-panel-section .bot-dashboard-side-nav,
  .bot-panel-section.is-ops-view .bot-dashboard-side-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
    gap: 8px;
    overflow: visible;
    padding-top: 0;
    border-top: 0;
  }

  .bot-panel-section .bot-dashboard-side-nav a,
  .bot-panel-section.is-ops-view .bot-dashboard-side-nav a {
    justify-content: center;
    width: 100%;
    min-height: 38px;
    text-align: center;
    white-space: nowrap;
  }

  .bot-panel-section .bot-dashboard-server {
    padding-top: 10px;
    border-top: 1px solid rgba(var(--muted-rgb), 0.12);
  }

  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid.is-masonry-ready {
    grid-template-columns: 1fr;
  }

  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid > .bot-dashboard-card-command_activity,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-grid.is-masonry-ready > .bot-dashboard-card-command_activity,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-resource_usage,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-storage_overview,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-bot_basics {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .bot-panel-section .bot-dashboard-card[data-widget-card] {
    padding: 12px;
  }

  .bot-dashboard-card-resource_usage .bot-dashboard-resource-widget,
  .bot-dashboard-card-storage_overview .bot-dashboard-quota-widget {
    grid-template-columns: 82px minmax(0, 1fr) !important;
    align-items: center;
  }

  .bot-dashboard-card-storage_overview .bot-dashboard-quota-ring,
  .bot-dashboard-card-resource_usage .bot-dashboard-resource-ring {
    width: 76px;
  }

  .bot-dashboard-card-resource_usage .bot-dashboard-widget-actions,
  .bot-dashboard-variable-widget-form {
    grid-column: 1 / -1;
  }

  .bot-dashboard-card-resource_usage .bot-dashboard-widget-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .bot-dashboard-card-command_activity .bot-dashboard-command-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .bot-panel-section > .dashboard-title-row,
  .bot-panel-section.is-ops-view > .dashboard-title-row,
  .bot-dashboard-shell {
    width: min(100%, calc(100vw - 24px));
  }

  .bot-panel-section .bot-dashboard-side-nav,
  .bot-panel-section.is-ops-view .bot-dashboard-side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bot-panel-section .bot-dashboard-side-nav a,
  .bot-panel-section.is-ops-view .bot-dashboard-side-nav a {
    padding-inline: 8px;
  }

  .dashboard-bot-avatar-card strong,
  .dashboard-add-bot-card strong {
    display: -webkit-box;
    min-height: 2.2em;
    overflow: hidden;
    line-height: 1.1;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .bot-ops-console-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .bot-ops-console-stats span {
    overflow: visible;
    white-space: normal;
  }
}

@media (max-width: 360px) {
  .bot-dashboard-card-command_activity .bot-dashboard-command-actions,
  .bot-dashboard-card-resource_usage .bot-dashboard-widget-actions,
  .bot-dashboard-card-resource_usage .bot-dashboard-resource-widget,
  .bot-dashboard-card-storage_overview .bot-dashboard-quota-widget,
  .bot-ops-console-stats {
    grid-template-columns: 1fr !important;
  }
}

/* Bot dashboard widget visual pass: flatter, clearer, less cramped. */
.bot-panel-section .bot-dashboard-card[data-widget-card] {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(var(--muted-rgb), 0.17);
  border-left: 1px solid rgba(var(--muted-rgb), 0.17);
  background:
    linear-gradient(180deg, rgba(var(--text-rgb), 0.07), rgba(var(--text-rgb), 0.018)),
    rgba(var(--panel-rgb), 0.94);
  box-shadow:
    0 22px 52px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(var(--text-rgb), 0.035);
}

.bot-panel-section .bot-dashboard-card[data-widget-card]:hover {
  border-color: rgba(var(--accent-rgb), 0.28);
  background:
    linear-gradient(180deg, rgba(var(--text-rgb), 0.082), rgba(var(--text-rgb), 0.022)),
    rgba(var(--panel-rgb), 0.96);
}

.bot-panel-section .bot-dashboard-card[data-widget-card] .bot-dashboard-card-head {
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(var(--muted-rgb), 0.1);
}

.bot-panel-section .bot-dashboard-card[data-widget-card] .bot-dashboard-card-title h3 {
  font-size: 1.08rem;
  letter-spacing: 0;
}

.bot-panel-section .bot-dashboard-card[data-widget-card] > :not(.bot-dashboard-card-head) {
  padding: 12px 14px 14px;
}

.bot-dashboard-card-command_activity .bot-dashboard-command-widget {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "total"
    "actions"
    "stats";
  gap: 10px;
  align-content: start;
}

.bot-dashboard-card-command_activity .bot-dashboard-traffic-total {
  grid-area: total;
  display: grid;
  align-content: end;
  justify-content: start;
  gap: 7px;
  min-height: 92px;
  padding: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-warm-rgb), 0.09)),
    rgba(var(--bg-rgb), 0.18);
}

.bot-dashboard-card-command_activity .bot-dashboard-traffic-total strong {
  font-size: clamp(2.35rem, 4.5vw, 3.25rem);
  line-height: 0.9;
}

.bot-dashboard-card-command_activity .bot-dashboard-traffic-total span {
  max-width: none;
  text-align: left;
}

.bot-dashboard-card-command_activity .bot-dashboard-command-actions {
  grid-area: actions;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.bot-dashboard-card-command_activity .bot-dashboard-inline-stats {
  grid-area: stats;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bot-dashboard-card-command_activity .bot-dashboard-inline-stats span,
.bot-dashboard-card-resource_usage .bot-dashboard-row,
.bot-dashboard-card-storage_overview .bot-dashboard-quota-row,
.bot-dashboard-card-bot_basics .bot-dashboard-item-row {
  border: 1px solid rgba(var(--muted-rgb), 0.1);
  background: rgba(var(--bg-rgb), 0.18);
  box-shadow: none;
}

.bot-dashboard-card-command_activity .bot-dashboard-inline-stats span {
  min-height: 56px;
  padding: 9px 10px;
}

.bot-dashboard-card-command_activity .bot-dashboard-inline-stats strong {
  display: block;
  margin-top: 2px;
  font-size: 1.08rem;
}

.bot-dashboard-card-resource_usage .bot-dashboard-resource-widget,
.bot-dashboard-card-storage_overview .bot-dashboard-quota-widget {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 10px;
  align-content: start;
  justify-items: stretch;
}

.bot-dashboard-card-resource_usage .bot-dashboard-resource-ring {
  display: none !important;
}

.bot-dashboard-card-storage_overview .bot-dashboard-quota-ring {
  display: none !important;
}

.bot-dashboard-card-resource_usage .bot-dashboard-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
}

.bot-dashboard-card-storage_overview .bot-dashboard-quota-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
}

.bot-dashboard-card-resource_usage .bot-dashboard-row,
.bot-dashboard-card-storage_overview .bot-dashboard-quota-row {
  min-height: 62px;
  padding: 12px;
}

.bot-dashboard-card-resource_usage .bot-dashboard-row strong,
.bot-dashboard-card-storage_overview .bot-dashboard-quota-row strong {
  font-size: 1rem;
  line-height: 1.15;
}

.bot-dashboard-card-resource_usage .bot-dashboard-widget-actions {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.bot-dashboard-card-storage_overview .bot-dashboard-variable-widget-form {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(70px, 0.52fr) minmax(106px, auto);
  gap: 8px;
}

.bot-dashboard-card-storage_overview .bot-dashboard-variable-widget-form .button {
  grid-column: auto;
  width: auto;
}

.bot-dashboard-card-storage_overview .bot-dashboard-variable-widget-form input {
  min-height: 36px;
}

.bot-dashboard-card-bot_basics .bot-dashboard-two-col {
  gap: 12px;
}

.bot-dashboard-card-bot_basics .bot-dashboard-section-title {
  min-height: 32px;
  margin-bottom: 2px;
}

.bot-dashboard-card-bot_basics .bot-dashboard-list {
  gap: 8px;
}

.bot-dashboard-card-bot_basics .bot-dashboard-item-row {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  min-height: 56px;
  padding: 10px;
}

.bot-dashboard-card-bot_basics .bot-dashboard-item-row strong {
  font-size: 0.96rem;
}

.bot-dashboard-card-bot_basics .bot-dashboard-item-row span:last-child {
  font-size: 0.84rem;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-command_activity,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-resource_usage,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-storage_overview {
  min-height: 274px;
}

@media (max-width: 1060px) {
  .bot-dashboard-card-resource_usage .bot-dashboard-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .bot-panel-section .bot-dashboard-card[data-widget-card] .bot-dashboard-card-head {
    padding: 12px;
  }

  .bot-panel-section .bot-dashboard-card[data-widget-card] > :not(.bot-dashboard-card-head) {
    padding: 10px 12px 12px;
  }

  .bot-dashboard-card-command_activity .bot-dashboard-traffic-total {
    min-height: 82px;
    padding: 14px;
  }

  .bot-dashboard-card-resource_usage .bot-dashboard-list {
    grid-template-columns: 1fr;
  }

  .bot-dashboard-card-resource_usage .bot-dashboard-row,
  .bot-dashboard-card-storage_overview .bot-dashboard-quota-row {
    min-height: 58px;
  }

  .bot-dashboard-card-storage_overview .bot-dashboard-variable-widget-form {
    grid-template-columns: minmax(0, 1fr) minmax(70px, 0.52fr);
  }

  .bot-dashboard-card-storage_overview .bot-dashboard-variable-widget-form .button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 360px) {
  .bot-dashboard-card-command_activity .bot-dashboard-command-actions,
  .bot-dashboard-card-command_activity .bot-dashboard-inline-stats,
  .bot-dashboard-card-resource_usage .bot-dashboard-widget-actions,
  .bot-dashboard-card-storage_overview .bot-dashboard-variable-widget-form {
    grid-template-columns: 1fr !important;
  }
}

.bot-dashboard-shell.is-editing .bot-dashboard-card-command_activity .bot-dashboard-traffic-total {
  min-height: 62px;
  padding: 10px 12px;
}

.bot-dashboard-shell.is-editing .bot-dashboard-card-command_activity .bot-dashboard-traffic-total strong {
  font-size: 2.35rem;
}

.bot-dashboard-shell.is-editing .bot-dashboard-card-command_activity .bot-dashboard-command-actions .button {
  min-height: 36px;
}

.bot-dashboard-shell.is-editing .bot-dashboard-card-command_activity .bot-dashboard-inline-stats span {
  min-height: 50px;
  padding: 8px;
}

/* Sefrum theme reset for bot widgets. */
.bot-panel-section .bot-dashboard-card[data-widget-card] {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)),
    var(--panel);
  box-shadow: none;
}

.bot-panel-section .bot-dashboard-card[data-widget-card]:hover {
  border-color: rgba(var(--muted-rgb), 0.26);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028)),
    var(--panel);
}

.bot-panel-section .bot-dashboard-card[data-widget-card] .bot-dashboard-card-head {
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
}

.bot-panel-section .bot-dashboard-card[data-widget-card] > :not(.bot-dashboard-card-head) {
  padding: 0;
}

.bot-panel-section .bot-dashboard-card[data-widget-card] .bot-dashboard-card-title h3 {
  margin: 2px 0 0;
  font-size: 1.1rem;
}

.bot-panel-section .bot-dashboard-widget-icon,
.bot-panel-section .bot-dashboard-row-icon,
.bot-panel-section .bot-dashboard-command-icon,
.bot-panel-section .bot-dashboard-metric-icon,
.bot-panel-section .bot-dashboard-record-icon,
.bot-panel-section .bot-dashboard-section-title > span {
  border-color: rgba(var(--accent-rgb), 0.22);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--muted);
}

.bot-dashboard-card-command_activity .bot-dashboard-command-widget {
  display: grid;
  gap: 12px;
}

.bot-dashboard-card-command_activity .bot-dashboard-traffic-total {
  display: grid;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.bot-dashboard-card-command_activity .bot-dashboard-traffic-total strong {
  color: var(--accent-warm);
  font-size: 2.25rem;
  line-height: 1.08;
}

.bot-dashboard-card-command_activity .bot-dashboard-traffic-total span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
}

.bot-dashboard-card-command_activity .bot-dashboard-command-actions,
.bot-dashboard-card-command_activity .bot-dashboard-inline-stats,
.bot-dashboard-card-resource_usage .bot-dashboard-widget-actions,
.bot-dashboard-card-storage_overview .bot-dashboard-variable-widget-form {
  gap: 8px;
}

.bot-dashboard-card-command_activity .bot-dashboard-command-actions {
  grid-template-columns: minmax(0, 0.9fr) minmax(168px, 1.1fr);
}

.bot-dashboard-card-command_activity .bot-dashboard-command-actions .button,
.bot-dashboard-card-resource_usage .bot-dashboard-widget-actions .button {
  min-width: 0;
  padding-inline: 12px;
  font-size: 0.94rem;
  white-space: nowrap;
}

.bot-dashboard-card-command_activity .bot-dashboard-inline-stats span,
.bot-dashboard-card-resource_usage .bot-dashboard-row,
.bot-dashboard-card-storage_overview .bot-dashboard-quota-row,
.bot-dashboard-card-bot_basics .bot-dashboard-item-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

.bot-dashboard-card-command_activity .bot-dashboard-inline-stats span {
  min-height: 58px;
}

.bot-dashboard-card-command_activity .bot-dashboard-inline-stats strong,
.bot-dashboard-card-resource_usage .bot-dashboard-row strong,
.bot-dashboard-card-storage_overview .bot-dashboard-quota-row strong {
  color: var(--text);
  font-size: 1.05rem;
}

.bot-dashboard-card-resource_usage .bot-dashboard-row,
.bot-dashboard-card-storage_overview .bot-dashboard-quota-row {
  min-height: 64px;
}

.bot-dashboard-card-resource_usage .bot-dashboard-row span,
.bot-dashboard-card-storage_overview .bot-dashboard-quota-row span,
.bot-dashboard-card-bot_basics .bot-dashboard-item-row span {
  color: var(--muted);
}

.bot-dashboard-card-resource_usage .bot-dashboard-resource-widget,
.bot-dashboard-card-storage_overview .bot-dashboard-quota-widget {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 12px;
}

.bot-dashboard-card-resource_usage .bot-dashboard-resource-ring,
.bot-dashboard-card-storage_overview .bot-dashboard-quota-ring {
  display: none !important;
}

.bot-dashboard-card-resource_usage .bot-dashboard-list,
.bot-dashboard-card-storage_overview .bot-dashboard-quota-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.bot-dashboard-card-storage_overview .bot-dashboard-variable-widget-form {
  grid-template-columns: minmax(0, 1fr) minmax(70px, 0.5fr) minmax(108px, auto);
}

.bot-dashboard-card-storage_overview .bot-dashboard-variable-widget-form .button {
  grid-column: auto;
}

.bot-dashboard-card-bot_basics .bot-dashboard-two-col {
  gap: 14px;
}

.bot-dashboard-card-bot_basics .bot-dashboard-list {
  gap: 8px;
}

.bot-dashboard-card-bot_basics .bot-dashboard-section-title {
  margin: 0 0 2px;
}

.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-command_activity,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-resource_usage,
.bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-storage_overview {
  min-height: 248px;
}

@media (min-width: 1061px) {
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-command_activity,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-resource_usage,
  .bot-dashboard-shell:not(.is-editing) .bot-dashboard-card-storage_overview {
    min-height: 292px;
  }
}

.bot-dashboard-shell.is-editing .bot-dashboard-card-command_activity .bot-dashboard-traffic-total strong {
  font-size: 2rem;
}

@media (max-width: 640px) {
  .bot-panel-section .bot-dashboard-card[data-widget-card] {
    padding: 14px;
  }

  .bot-dashboard-card-storage_overview .bot-dashboard-variable-widget-form {
    grid-template-columns: minmax(0, 1fr) minmax(70px, 0.5fr);
  }

  .bot-dashboard-card-storage_overview .bot-dashboard-variable-widget-form .button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 360px) {
  .bot-dashboard-card-command_activity .bot-dashboard-command-actions {
    grid-template-columns: 1fr;
  }
}

/* Theme overlays load after this base stylesheet. Live parity is kept in
   static/generated/theme-live.css so theme changes stay isolated. */
