.aaide {
  --aaide-bg: #f5f7f8;
  --aaide-panel: #ffffff;
  --aaide-panel-2: #eef3f4;
  --aaide-text: #152124;
  --aaide-muted: #637176;
  --aaide-border: #d7e0e3;
  --aaide-editor: #171b22;
  --aaide-console: #11161c;
  --aaide-accent: #008c95;
  --aaide-accent-2: #f2a900;
  --aaide-danger: #c74343;
  --aaide-success: #23875c;
  --aaide-shadow: 0 18px 45px rgba(15, 38, 44, 0.12);
  color: var(--aaide-text);
  background: var(--aaide-bg);
  border: 1px solid var(--aaide-border);
  border-left: 0;
  border-radius: 0;
  border-right: 0;
  box-shadow: none;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  left: 50%;
  margin: 16px 0;
  max-width: 1680px;
  min-height: calc(100vh - 120px);
  overflow: hidden;
  position: relative;
  transform: translateX(-50%);
  width: calc(100vw - 32px);
}

body.aaide-modal-open {
  overflow: hidden;
}

.aaide[hidden],
.aaide [hidden] {
  display: none !important;
}

.aaide-modal {
  align-items: center;
  background: rgba(11, 18, 23, 0.56);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 24px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 999999;
}

.aaide-modal-panel {
  background: #ffffff;
  border: 1px solid var(--aaide-border);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(8, 22, 28, 0.28);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: min(840px, calc(100vh - 48px));
  overflow: hidden;
  width: min(1280px, calc(100vw - 48px));
}

.aaide-modal-head {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--aaide-border);
  display: flex;
  justify-content: space-between;
  min-height: 62px;
  padding: 12px 14px 12px 18px;
}

.aaide-modal-head span {
  color: var(--aaide-muted);
  display: block;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.aaide-modal-body {
  min-height: 0;
  overflow: hidden;
}

.aaide-firmware-panel {
  height: min(720px, calc(100vh - 48px));
  width: min(980px, calc(100vw - 48px));
}

.aaide-firmware-body {
  background: #f8fafc;
  display: grid;
  gap: 14px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  padding: 16px;
}

.aaide-firmware-note {
  align-items: flex-start;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  border-radius: 8px;
  color: #164e63;
  display: flex;
  gap: 8px;
  line-height: 1.45;
  padding: 12px 14px;
}

.aaide-firmware-note strong {
  color: #0e7490;
  flex: 0 0 auto;
}

.aaide-firmware-body textarea {
  background: #020617;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #a7f3d0;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  min-height: 0;
  outline: none;
  overflow: auto;
  padding: 14px;
  resize: none;
  white-space: pre;
  width: 100%;
}

.aaide-firmware-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.aaide-docs-embedded {
  height: 100%;
  margin: 0;
  min-height: 0;
  transform: none;
  width: 100%;
}

.aaide *,
.aaide *::before,
.aaide *::after {
  box-sizing: border-box;
}

.aaide .CodeMirror-scroll,
.aaide-console pre,
.aaide-serial pre,
.aaide-animation-stage,
.aaide-ram-list,
.aaide-port-mode-list,
.aaide-loop-list,
.aaide-project-list,
.aaide-library-list,
.aaide-editor-tabs,
.aaide-board-tools,
.aaide-firmware-body textarea {
  scrollbar-color: #475569 #111827;
  scrollbar-width: thin;
}

.aaide-project-list,
.aaide-library-list,
.aaide-board-tools {
  scrollbar-color: #64748b #e2e8f0;
}

.aaide .CodeMirror-scroll::-webkit-scrollbar,
.aaide-console pre::-webkit-scrollbar,
.aaide-serial pre::-webkit-scrollbar,
.aaide-animation-stage::-webkit-scrollbar,
.aaide-ram-list::-webkit-scrollbar,
.aaide-port-mode-list::-webkit-scrollbar,
.aaide-loop-list::-webkit-scrollbar,
.aaide-project-list::-webkit-scrollbar,
.aaide-library-list::-webkit-scrollbar,
.aaide-editor-tabs::-webkit-scrollbar,
.aaide-board-tools::-webkit-scrollbar,
.aaide-firmware-body textarea::-webkit-scrollbar {
  height: 12px;
  width: 12px;
}

.aaide .CodeMirror-scroll::-webkit-scrollbar-track,
.aaide-console pre::-webkit-scrollbar-track,
.aaide-serial pre::-webkit-scrollbar-track,
.aaide-animation-stage::-webkit-scrollbar-track,
.aaide-ram-list::-webkit-scrollbar-track,
.aaide-port-mode-list::-webkit-scrollbar-track,
.aaide-loop-list::-webkit-scrollbar-track,
.aaide-editor-tabs::-webkit-scrollbar-track,
.aaide-firmware-body textarea::-webkit-scrollbar-track {
  background: #111827;
}

.aaide-project-list::-webkit-scrollbar-track,
.aaide-library-list::-webkit-scrollbar-track,
.aaide-board-tools::-webkit-scrollbar-track {
  background: #e2e8f0;
}

.aaide .CodeMirror-scroll::-webkit-scrollbar-thumb,
.aaide-console pre::-webkit-scrollbar-thumb,
.aaide-serial pre::-webkit-scrollbar-thumb,
.aaide-animation-stage::-webkit-scrollbar-thumb,
.aaide-ram-list::-webkit-scrollbar-thumb,
.aaide-port-mode-list::-webkit-scrollbar-thumb,
.aaide-loop-list::-webkit-scrollbar-thumb,
.aaide-project-list::-webkit-scrollbar-thumb,
.aaide-library-list::-webkit-scrollbar-thumb,
.aaide-editor-tabs::-webkit-scrollbar-thumb,
.aaide-board-tools::-webkit-scrollbar-thumb,
.aaide-firmware-body textarea::-webkit-scrollbar-thumb {
  background: #475569;
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.aaide .CodeMirror-scroll::-webkit-scrollbar-thumb:hover,
.aaide-console pre::-webkit-scrollbar-thumb:hover,
.aaide-serial pre::-webkit-scrollbar-thumb:hover,
.aaide-animation-stage::-webkit-scrollbar-thumb:hover,
.aaide-ram-list::-webkit-scrollbar-thumb:hover,
.aaide-port-mode-list::-webkit-scrollbar-thumb:hover,
.aaide-loop-list::-webkit-scrollbar-thumb:hover,
.aaide-project-list::-webkit-scrollbar-thumb:hover,
.aaide-library-list::-webkit-scrollbar-thumb:hover,
.aaide-editor-tabs::-webkit-scrollbar-thumb:hover,
.aaide-board-tools::-webkit-scrollbar-thumb:hover,
.aaide-firmware-body textarea::-webkit-scrollbar-thumb:hover {
  background: #334155;
  background-clip: padding-box;
}

.aaide button,
.aaide input,
.aaide select {
  font: inherit;
}

.aaide-topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--aaide-border);
  display: flex;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px 18px;
}

.aaide-brand {
  align-items: center;
  display: flex;
  gap: 12px;
}

.aaide-brand-mark {
  align-items: center;
  background: var(--aaide-accent);
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  font-size: 20px;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  line-height: 1;
  width: 42px;
}

.aaide h2,
.aaide h3,
.aaide p {
  margin: 0;
}

.aaide h2 {
  color: var(--aaide-text);
  font-size: 20px;
  font-weight: 750;
  line-height: 1.15;
}

.aaide h3 {
  color: var(--aaide-text);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.25;
}

.aaide-brand p {
  color: var(--aaide-muted);
  font-size: 12px;
  line-height: 1.3;
  margin-top: 3px;
}

.aaide-connection {
  align-items: center;
  background: var(--aaide-panel-2);
  border: 1px solid var(--aaide-border);
  border-radius: 8px;
  color: var(--aaide-muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  white-space: nowrap;
}

.aaide-dot {
  border-radius: 999px;
  display: inline-block;
  height: 9px;
  width: 9px;
}

.aaide-dot-warn {
  background: var(--aaide-accent-2);
}

.aaide-dot-ok {
  background: var(--aaide-success);
}

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

.aaide-toolbar {
  align-items: end;
  background: #f9fbfb;
  border-bottom: 1px solid var(--aaide-border);
  display: flex;
  gap: 10px;
  min-height: 78px;
  overflow-x: auto;
  padding: 12px 18px;
}

.aaide-field {
  display: grid;
  gap: 5px;
  min-width: 172px;
}

.aaide-field-baud {
  min-width: 108px;
}

.aaide-field span,
.aaide-side-input span {
  color: var(--aaide-muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
}

.aaide select,
.aaide input[type="text"] {
  background: #ffffff;
  border: 1px solid var(--aaide-border);
  border-radius: 8px;
  color: var(--aaide-text);
  height: 38px;
  min-width: 0;
  outline: none;
  padding: 0 10px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.aaide select:focus,
.aaide input[type="text"]:focus,
.aaide button:focus-visible {
  border-color: var(--aaide-accent);
  box-shadow: 0 0 0 3px rgba(0, 140, 149, 0.16);
  outline: none;
}

.aaide button {
  border: 0;
  cursor: pointer;
}

.aaide button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.aaide-icon-btn,
.aaide-action,
.aaide-text-btn {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 750;
  gap: 8px;
  justify-content: center;
  line-height: 1;
  min-height: 38px;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
  white-space: nowrap;
}

.aaide-icon-btn {
  background: #ffffff;
  border: 1px solid var(--aaide-border);
  color: var(--aaide-text);
  flex: 0 0 auto;
  height: 38px;
  padding: 0;
  width: 38px;
}

.aaide-icon-btn:hover,
.aaide-text-btn:hover {
  background: #edf6f7;
  color: var(--aaide-accent);
}

.aaide-action {
  background: #1e2b30;
  color: #ffffff;
  min-width: 108px;
  padding: 0 14px;
}

.aaide-action:hover {
  background: #263a40;
  transform: translateY(-1px);
}

.aaide-action-primary {
  background: var(--aaide-accent);
}

.aaide-action-primary:hover {
  background: #007982;
}

.aaide-action-stop {
  background: #783a3a;
}

.aaide-action-stop:hover {
  background: #8f4545;
}

.aaide.is-running .aaide-action-primary {
  background: #526068;
}

.aaide-text-btn {
  background: #ffffff;
  border: 1px solid var(--aaide-border);
  color: var(--aaide-text);
  padding: 0 11px;
}

.aaide-danger {
  color: var(--aaide-danger);
}

.aaide-svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 17px;
}

.aaide-workbench {
  display: grid;
  grid-template-columns: minmax(250px, 315px) minmax(560px, 1fr) minmax(300px, 380px);
  height: clamp(620px, calc(100vh - 190px), 760px);
  min-height: 0;
  overflow: hidden;
}

.aaide-sidebar,
.aaide-serial {
  background: #fbfcfc;
}

.aaide-sidebar {
  border-right: 1px solid var(--aaide-border);
  display: flex;
  flex-direction: column;
}

.aaide-serial {
  border-left: 1px solid var(--aaide-border);
  display: grid;
  grid-template-rows: auto minmax(280px, 1fr) auto;
  min-height: 0;
  overflow: hidden;
}

.aaide-side-section {
  border-bottom: 1px solid var(--aaide-border);
  display: grid;
  gap: 12px;
  padding: 14px;
}

.aaide-doc-link-section {
  padding: 12px 14px;
}

.aaide-doc-link {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--aaide-border);
  border-radius: 8px;
  color: var(--aaide-text);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 750;
  gap: 8px;
  min-height: 40px;
  padding: 0 11px;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

.aaide-doc-link:hover {
  background: #edf6f7;
  color: var(--aaide-accent);
}

.aaide-side-head,
.aaide-editor-head,
.aaide-console-head,
.aaide-serial-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.aaide-side-input {
  display: grid;
  gap: 6px;
}

.aaide-project-list,
.aaide-library-list {
  display: grid;
  gap: 6px;
  max-height: 230px;
  overflow: hidden;
}

.aaide-project-item,
.aaide-library-item {
  background: #ffffff;
  border: 1px solid var(--aaide-border);
  border-radius: 8px;
  color: var(--aaide-text);
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.aaide-project-item strong,
.aaide-library-item strong {
  font-size: 13px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.aaide-project-item span,
.aaide-library-item span,
.aaide-muted {
  color: var(--aaide-muted);
  font-size: 12px;
  line-height: 1.35;
}

.aaide-project-item.is-active {
  border-color: var(--aaide-accent);
  box-shadow: inset 3px 0 0 var(--aaide-accent);
}

.aaide-library-tools {
  display: grid;
  gap: 8px;
}

.aaide-main {
  display: grid;
  grid-template-rows: auto minmax(410px, 1fr) 210px;
  min-width: 0;
}

.aaide-editor-head {
  background: #ffffff;
  border-bottom: 1px solid var(--aaide-border);
  min-height: 48px;
  padding: 8px 12px;
}

.aaide-editor-head span {
  color: var(--aaide-muted);
  font-size: 13px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aaide .CodeMirror {
  background: var(--aaide-editor);
  color: #eef3f4;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 14px;
  height: 100%;
  line-height: 1.55;
}

.aaide .CodeMirror-gutters {
  background: #121820;
  border-right: 1px solid #28323b;
}

.aaide .CodeMirror-linenumber {
  color: #6f7c85;
}

.aaide-console {
  background: var(--aaide-console);
  border-top: 1px solid #27313a;
  color: #dfe8ea;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 210px;
}

.aaide-console-head {
  background: #171e25;
  border-bottom: 1px solid #27313a;
  min-height: 42px;
  padding: 6px 10px;
}

.aaide-console-head strong {
  color: #ffffff;
  font-size: 12px;
}

.aaide-console pre,
.aaide-serial pre {
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  min-height: 0;
  overflow: hidden;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.aaide-output-ok {
  color: #79d49b;
}

.aaide-output-error {
  color: #ff9b9b;
}

.aaide-output-warn {
  color: #ffd36b;
}

.aaide-serial-head {
  background: #ffffff;
  border-bottom: 1px solid var(--aaide-border);
  min-height: 48px;
  padding: 9px 12px;
}

.aaide-serial-head span {
  border: 1px solid var(--aaide-border);
  border-radius: 999px;
  color: var(--aaide-muted);
  font-size: 11px;
  font-weight: 750;
  padding: 5px 8px;
}

.aaide-serial-actions {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.aaide-serial-head .aaide-icon-btn {
  height: 32px;
  min-height: 32px;
  width: 32px;
}

.aaide-serial pre {
  background: #10151b;
  color: #dfe8ea;
  max-height: 100%;
}

.aaide-serial-send {
  align-items: center;
  background: #ffffff;
  border-top: 1px solid var(--aaide-border);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 38px;
  padding: 10px;
}

@media (max-width: 1180px) {
  .aaide-workbench {
    grid-template-columns: minmax(220px, 260px) minmax(440px, 1fr);
    height: auto;
    overflow: visible;
  }

  .aaide-serial {
    border-left: 0;
    border-top: 1px solid var(--aaide-border);
    grid-column: 1 / -1;
    min-height: 300px;
    max-height: 360px;
  }
}

@media (max-width: 820px) {
  .aaide {
    border-radius: 0;
    left: auto;
    margin: 0;
    min-height: 100vh;
    transform: none;
    width: 100%;
  }

  .aaide-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .aaide-toolbar {
    align-items: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .aaide-field,
  .aaide-field-baud,
  .aaide-action,
  .aaide-icon-btn {
    min-width: 0;
    width: 100%;
  }

  .aaide-workbench {
    grid-template-columns: 1fr;
  }

  .aaide-sidebar,
  .aaide-serial {
    border-left: 0;
    border-right: 0;
  }

  .aaide-main {
    grid-template-rows: auto 460px 220px;
  }
}

.aaide-docs {
  --aaide-doc-bg: #f5f7f8;
  --aaide-doc-panel: #ffffff;
  --aaide-doc-text: #152124;
  --aaide-doc-muted: #637176;
  --aaide-doc-border: #d7e0e3;
  --aaide-doc-accent: #008c95;
  background: var(--aaide-doc-bg);
  color: var(--aaide-doc-text);
  display: grid;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
  margin: 0 calc(50% - 50vw);
  min-height: calc(100vh - 120px);
  width: 100vw;
}

.aaide-modal .aaide-docs-embedded {
  height: 100%;
  margin: 0;
  min-height: 0;
  width: 100%;
}

body.aaide-docs-page .widget-area,
body.aaide-docs-page aside#secondary,
body.aaide-docs-page .ast-right-sidebar #secondary,
body.aaide-docs-page .ast-left-sidebar #secondary {
  display: none !important;
}

body.aaide-docs-page .ast-container,
body.aaide-docs-page .site-content .ast-container,
body.aaide-docs-page .content-area,
body.aaide-docs-page .site-main,
body.aaide-docs-page article,
body.aaide-docs-page .entry-content {
  max-width: none !important;
  width: 100% !important;
}

body.aaide-docs-page .content-area {
  float: none !important;
  margin: 0 !important;
}

body.aaide-docs-page .entry-header {
  display: none !important;
}

.aaide-docs *,
.aaide-docs *::before,
.aaide-docs *::after {
  box-sizing: border-box;
}

.aaide-doc-sidebar {
  background: var(--aaide-doc-panel);
  border-right: 1px solid var(--aaide-doc-border);
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
}

.aaide-doc-search {
  background: #f9fbfb;
  border-bottom: 1px solid var(--aaide-doc-border);
  display: grid;
  gap: 8px;
  padding: 16px;
}

.aaide-doc-search label {
  color: var(--aaide-doc-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.aaide-doc-search input {
  border: 1px solid var(--aaide-doc-border);
  border-radius: 8px;
  color: var(--aaide-doc-text);
  font: inherit;
  height: 40px;
  outline: none;
  padding: 0 11px;
}

.aaide-doc-search input:focus {
  border-color: var(--aaide-doc-accent);
  box-shadow: 0 0 0 3px rgba(0, 140, 149, 0.16);
}

.aaide-doc-menu {
  overflow: auto;
  padding: 10px 0 18px;
}

.aaide-doc-category {
  color: var(--aaide-doc-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 14px 18px 7px;
  text-transform: uppercase;
}

.aaide-doc-menu-item {
  background: transparent;
  border: 0;
  color: var(--aaide-doc-muted);
  cursor: pointer;
  display: block;
  font: inherit;
  font-size: 13px;
  line-height: 1.25;
  padding: 9px 18px;
  text-align: left;
  width: 100%;
}

.aaide-doc-menu-item:hover,
.aaide-doc-menu-item.is-active {
  background: #edf6f7;
  color: var(--aaide-doc-text);
}

.aaide-doc-menu-item.is-active {
  box-shadow: inset 3px 0 0 var(--aaide-doc-accent);
  font-weight: 750;
}

.aaide-doc-main {
  overflow: auto;
  padding: 34px;
}

.aaide-doc-content-inner {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 980px;
}

.aaide-doc-header {
  border-bottom: 1px solid var(--aaide-doc-border);
  padding-bottom: 20px;
}

.aaide-doc-header span {
  color: var(--aaide-doc-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.aaide-doc-header h1 {
  color: var(--aaide-doc-text);
  font-size: 30px;
  line-height: 1.15;
  margin: 5px 0 0;
}

.aaide-doc-card {
  background: var(--aaide-doc-panel);
  border: 1px solid var(--aaide-doc-border);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 22px;
}

.aaide-doc-card h2 {
  color: var(--aaide-doc-text);
  font-size: 18px;
  line-height: 1.25;
  margin: 0;
}

.aaide-doc-card h2 span {
  color: var(--aaide-doc-accent);
}

.aaide-doc-card p {
  color: var(--aaide-doc-muted);
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
  white-space: pre-line;
}

.aaide-doc-figure {
  background: #f8fafc;
  border: 1px solid var(--aaide-doc-border);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin: 0;
  overflow: hidden;
  padding: 10px;
}

.aaide-doc-figure img {
  aspect-ratio: 16 / 9;
  background: #ffffff;
  border-radius: 6px;
  display: block;
  max-height: 280px;
  object-fit: contain;
  width: 100%;
}

.aaide-doc-figure figcaption {
  color: var(--aaide-doc-muted);
  font-size: 12px;
  line-height: 1.4;
}

.aaide-doc-figure a {
  color: var(--aaide-doc-accent);
  font-weight: 750;
  text-decoration: none;
}

.aaide-doc-code-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.aaide-doc-code-head button {
  background: #ffffff;
  border: 1px solid var(--aaide-doc-border);
  border-radius: 8px;
  color: var(--aaide-doc-text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  min-height: 34px;
  padding: 0 12px;
}

.aaide-doc-code {
  background: #11161c;
  border-radius: 8px;
  color: #e6eef0;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  overflow: auto;
  padding: 16px;
  white-space: pre;
}

@media (max-width: 900px) {
  .aaide-docs {
    grid-template-columns: 1fr;
  }

  .aaide-doc-sidebar {
    border-right: 0;
  }

  .aaide-doc-main {
    padding: 18px;
  }
}

@media (max-width: 520px) {
  .aaide-toolbar {
    grid-template-columns: 1fr;
  }
}

/* Reference IDE skin based on the provided Arduino.html model. */
.aaide {
  --aaide-ref-brand: #0d9488;
  --aaide-ref-brand-dark: #0f766e;
  --aaide-ref-slate-50: #f8fafc;
  --aaide-ref-slate-100: #f1f5f9;
  --aaide-ref-slate-200: #e2e8f0;
  --aaide-ref-slate-300: #cbd5e1;
  --aaide-ref-slate-400: #94a3b8;
  --aaide-ref-slate-500: #64748b;
  --aaide-ref-slate-600: #475569;
  --aaide-ref-slate-700: #334155;
  --aaide-ref-slate-800: #1e293b;
  --aaide-ref-slate-900: #0f172a;
  background: var(--aaide-ref-slate-50);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--aaide-ref-slate-800);
  display: flex;
  flex-direction: column;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  height: auto;
  left: auto;
  margin: 0 calc(50% - 50vw);
  max-width: none;
  min-height: calc(100vh - 96px);
  overflow: visible;
  position: relative;
  transform: none;
  width: 100vw;
}

.aaide-topbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--aaide-ref-slate-200);
  display: flex;
  flex: 0 0 56px;
  height: 56px;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 24px;
  z-index: 20;
}

.aaide-brand-mark {
  background: var(--aaide-ref-brand);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
  font-size: 18px;
  height: 32px;
  width: 32px;
}

.aaide h1,
.aaide h2 {
  color: #0f172a;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
}

.aaide-brand p {
  color: var(--aaide-ref-slate-500);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  margin-top: 2px;
  text-transform: uppercase;
}

.aaide-connection {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  color: #047857;
  font-size: 12px;
  font-weight: 800;
  min-height: 32px;
  padding: 6px 12px;
}

.aaide-connection-ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.aaide-connection-warn {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.aaide-connection-error {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.aaide-connection .aaide-dot-ok {
  background: #10b981;
}

.aaide-connection .aaide-dot-warn {
  background: #f59e0b;
}

.aaide-connection .aaide-dot-error {
  background: #ef4444;
}

.aaide-toolbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--aaide-ref-slate-200);
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-height: 56px;
  overflow: visible;
  padding: 8px 16px;
  position: relative;
  z-index: 20;
}

.aaide-toolbar .aaide-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.aaide-toolbar .aaide-field span,
.aaide-side-input span {
  color: var(--aaide-ref-slate-500);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.aaide-toolbar select,
.aaide-toolbar input,
.aaide-side-input input,
.aaide-search-field input,
.aaide-serial-send input {
  background: var(--aaide-ref-slate-50);
  border: 1px solid var(--aaide-ref-slate-300);
  border-radius: 6px;
  color: #0f172a;
  font-size: 14px;
  height: 30px;
  outline: 0;
  padding: 0 10px;
}

.aaide-field:nth-of-type(1) select {
  width: 144px;
}

.aaide-field:nth-of-type(2) select {
  width: 176px;
}

.aaide-field-baud select {
  width: 96px;
}

.aaide-icon-btn {
  background: transparent;
  border: 0;
  color: var(--aaide-ref-slate-400);
  height: 30px;
  min-height: 30px;
  width: 30px;
}

.aaide-icon-btn:hover {
  background: #f0fdfa;
  color: var(--aaide-ref-brand);
}

.aaide-action {
  background: var(--aaide-ref-slate-800);
  border: 1px solid transparent;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  height: 34px;
  min-height: 34px;
  min-width: 0;
  padding: 0 14px;
}

.aaide-action-primary {
  background: var(--aaide-ref-brand);
}

.aaide-action-connect {
  background: #ecfeff;
  border-color: #a5f3fc;
  color: #0e7490;
  min-width: 126px;
}

.aaide-action-connect:hover {
  background: #cffafe;
  border-color: #67e8f9;
  color: #155e75;
}

.aaide-action-stop {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #e11d48;
}

.aaide-action-reset {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

.aaide-action-reset:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0f172a;
}

.aaide-action-read {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}

.aaide-action-read:hover {
  background: #e0f2fe;
  border-color: #38bdf8;
  color: #075985;
}

.aaide-action-board {
  background: #fffbeb;
  border-color: #fde68a;
  color: #d97706;
}

.aaide-action-animation {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}

.aaide-action-animation:hover,
.aaide-action-animation.is-active {
  background: #e0e7ff;
  border-color: #818cf8;
  color: #312e81;
}

.aaide-action[data-aaide-serial-toggle] {
  background: #fff;
  border-color: var(--aaide-ref-slate-300);
  color: var(--aaide-ref-slate-700);
  margin-left: auto;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.aaide-workbench {
  background: var(--aaide-ref-slate-200);
  display: flex;
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.aaide-sidebar {
  background: var(--aaide-ref-slate-50);
  border-right: 1px solid var(--aaide-ref-slate-200);
  display: flex;
  flex: 0 0 320px;
  flex-direction: column;
  min-height: 0;
  width: 320px;
  z-index: 10;
}

.aaide-doc-link {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--aaide-ref-slate-200);
  border-radius: 0;
  color: var(--aaide-ref-slate-700);
  display: flex;
  font-size: 14px;
  gap: 12px;
  height: 52px;
  justify-content: flex-start;
  padding: 0 20px;
  width: 100%;
}

.aaide-side-section {
  border-bottom: 1px solid var(--aaide-ref-slate-200);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
}

.aaide-side-section:last-child {
  border-bottom: 0;
  flex: 1 1 auto;
  min-height: 0;
}

.aaide-side-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.aaide-side-head h3 {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
}

.aaide-project-list {
  display: grid;
  gap: 8px;
  max-height: 170px;
  overflow: auto;
}

.aaide-project-item,
.aaide-library-item {
  background: #fff;
  border: 1px solid var(--aaide-ref-slate-200);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
  color: #0f172a;
  padding: 10px;
}

.aaide-project-item.is-active,
.aaide-library-item.is-installed {
  border-left: 4px solid #34d399;
}

.aaide-search-field {
  position: relative;
}

.aaide-search-field .aaide-svg {
  color: var(--aaide-ref-slate-400);
  height: 16px;
  left: 12px;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
}

.aaide-search-field input {
  padding-left: 40px !important;
  width: 100%;
}

.aaide-upload-zip {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed var(--aaide-ref-slate-300);
  border-radius: 6px;
  color: var(--aaide-ref-slate-600);
  cursor: pointer;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  gap: 8px;
  height: 30px;
  justify-content: center;
}

.aaide-upload-zip input {
  display: none;
}

.aaide-library-status {
  background: #f8fafc;
  border: 1px solid var(--aaide-ref-slate-200);
  border-radius: 6px;
  color: var(--aaide-ref-slate-600);
  display: none;
  font-size: 11px;
  line-height: 1.35;
  padding: 8px 10px;
}

.aaide-library-status.is-visible {
  display: block;
}

.aaide-library-status.is-ok {
  background: #ecfdf5;
  border-color: #86efac;
  color: #047857;
}

.aaide-library-status.is-warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.aaide-library-status.is-error {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.aaide-library-list {
  border-top: 1px solid var(--aaide-ref-slate-200);
  display: grid;
  gap: 10px;
  margin-top: 8px;
  overflow: auto;
  padding-top: 16px;
}

.aaide-library-card-head,
.aaide-library-actions {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.aaide-library-card-head strong {
  color: #0f172a;
  font-size: 12px;
}

.aaide-library-card-head span {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  color: #047857;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
}

.aaide-library-item p {
  color: var(--aaide-ref-slate-500);
  font-size: 10px;
  line-height: 1.35;
}

.aaide-library-actions button {
  background: #fff;
  border: 1px solid var(--aaide-ref-slate-200);
  border-radius: 5px;
  color: var(--aaide-ref-slate-700);
  flex: 1 1 auto;
  font-size: 11px;
  font-weight: 800;
  min-height: 28px;
}

.aaide-main {
  background: rgba(226, 232, 240, .55);
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  overflow: visible;
  padding: 8px;
}

.aaide-editor-stage {
  align-items: stretch;
  display: flex;
  flex: 0 0 clamp(520px, calc(100vh - 342px), 680px);
  gap: 8px;
  height: clamp(520px, calc(100vh - 342px), 680px);
  min-height: 0;
  min-width: 0;
  overflow: visible;
}

.aaide-code-pane {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 0;
}

.aaide-editor-head {
  align-items: flex-end;
  background: #21222c;
  border-bottom: 1px solid rgba(0, 0, 0, .45);
  display: flex;
  flex: 0 0 46px;
  min-height: 46px;
  padding: 8px 14px;
}

.aaide-editor-head::before {
  content: none;
  display: none;
}

.aaide-editor-tabs {
  align-items: flex-end;
  display: flex;
  flex: 1 1 auto;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.aaide-editor-tab {
  align-items: center;
  background: #282a36;
  border-top: 1px solid var(--aaide-ref-brand);
  border-radius: 6px 6px 0 0;
  color: #cbd5e1;
  display: inline-flex;
  flex: 0 0 auto;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  gap: 8px;
  height: 30px;
  max-width: 220px;
  padding: 0 10px;
}

.aaide-editor-tab span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aaide-editor-tab.is-active {
  background: #303241;
  border-top-color: #14b8a6;
  color: #ffffff;
}

.aaide-editor-tab.is-primary::before {
  background: #34d399;
  border-radius: 999px;
  content: "";
  flex: 0 0 auto;
  height: 5px;
  width: 5px;
}

.aaide-editor-tab-close {
  align-items: center;
  border-radius: 999px;
  color: #94a3b8;
  display: inline-flex;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 14px;
  height: 16px;
  justify-content: center;
  line-height: 1;
  width: 16px;
}

.aaide-editor-tab-close:hover {
  background: rgba(255, 255, 255, .1);
  color: #ffffff;
}

.aaide-editor-tab-add {
  align-items: center;
  align-self: flex-end;
  background: #f8fafc;
  border: 1px solid rgba(20, 184, 166, .72);
  border-radius: 6px;
  color: #0f172a;
  display: inline-flex;
  flex: 0 0 auto;
  height: 30px;
  justify-content: center;
  margin-left: 4px;
  position: relative;
  width: 30px;
}

.aaide-editor-tab-add span {
  display: none;
}

.aaide-editor-tab-add::before,
.aaide-editor-tab-add::after {
  background: currentColor;
  border-radius: 999px;
  content: "";
  display: block;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.aaide-editor-tab-add::before {
  height: 2px;
  width: 14px;
}

.aaide-editor-tab-add::after {
  height: 14px;
  width: 2px;
}

.aaide-editor-tab-add:hover {
  background: #ccfbf1;
  border-color: #0f766e;
  color: #0f766e;
}

.aaide-current-file-fallback {
  display: none !important;
}

.aaide-editor-head [data-aaide-download] {
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-size: 12px;
  flex: 0 0 auto;
  margin-left: auto;
}

.aaide .CodeMirror {
  background: #282a36 !important;
  color: #f8fafc;
  flex: 1 1 auto;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 14px;
  height: 100%;
  line-height: 1.55;
}

.aaide-main > .CodeMirror,
.aaide-code-pane > .CodeMirror {
  border: 1px solid var(--aaide-ref-slate-300);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, .18);
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  overflow: hidden;
}

.aaide-code-pane textarea[data-aaide-code] {
  background: #282a36;
  border: 1px solid var(--aaide-ref-slate-300);
  border-top: 0;
  color: #f8fafc;
  flex: 1 1 auto;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  min-height: 0;
  padding: 12px;
  resize: none;
}

.aaide .CodeMirror-gutters {
  background: #282a36;
  border-right: 0;
}

.aaide .CodeMirror-linenumber {
  color: #7dd3fc;
}

.aaide .CodeMirror .aaide-code-line-executing {
  background: rgba(52, 211, 153, .14);
  box-shadow: inset 3px 0 0 #34d399;
}

.aaide-console {
  background: #000;
  border: 1px solid var(--aaide-ref-slate-300);
  border-radius: 12px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, .18);
  color: #34d399;
  display: flex;
  flex: 0 0 clamp(190px, 24vh, 280px);
  flex-direction: column;
  margin-bottom: 18px;
  max-height: none;
  min-height: 190px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.aaide-console-head {
  background: #1e1e1e;
  border-bottom: 1px solid rgba(0, 0, 0, .45);
  min-height: 38px;
  padding: 8px 14px;
}

.aaide-console-head strong {
  color: #cbd5e1;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.aaide-console pre {
  background: #000;
  color: #34d399;
  flex: 1 1 auto;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  min-height: 0;
  max-height: none;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px;
}

.aaide-animation-pane {
  background: #0f172a;
  border: 1px solid var(--aaide-ref-slate-300);
  border-radius: 12px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, .18);
  color: #e2e8f0;
  display: flex;
  flex: 0 0 min(50%, 720px);
  flex-direction: column;
  height: 100%;
  max-height: none;
  min-height: 0;
  min-width: 430px;
  overflow: hidden;
}

.aaide-animation-head {
  align-items: center;
  background: #111827;
  border-bottom: 1px solid rgba(148, 163, 184, .25);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex: 0 0 auto;
  min-height: 46px;
  padding: 9px 14px;
}

.aaide-animation-head div {
  align-items: center;
  display: flex;
  gap: 9px;
  min-width: 0;
}

.aaide-animation-head strong {
  color: #ffffff;
  font-size: 13px;
  line-height: 1.2;
}

.aaide-animation-head > span {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aaide-animation-dot {
  animation: aaidePulseDot 1.4s ease-in-out infinite;
  background: #34d399;
  border-radius: 999px;
  box-shadow: 0 0 0 5px rgba(52, 211, 153, .16);
  height: 8px;
  width: 8px;
}

.aaide-animation-stage {
  align-items: flex-start;
  background: #0b1220;
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px 12px 248px;
  position: relative;
  scrollbar-gutter: stable;
}

.aaide-animation-grid {
  background-image:
    linear-gradient(rgba(148, 163, 184, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .08) 1px, transparent 1px);
  background-size: 28px 28px;
  inset: 0 0 auto 0;
  min-height: 760px;
  position: absolute;
}

.aaide-board-visual {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  height: 520px;
  justify-content: center;
  min-height: 520px;
  position: relative;
  width: 100%;
  z-index: 2;
}

.aaide-real-board-svg {
  display: block;
  height: auto;
  max-height: 100%;
  max-width: min(100%, 430px);
  overflow: visible;
  width: min(100%, 430px);
}

.aaide-uno-photo-board {
  aspect-ratio: 285.2 / 209;
  filter: drop-shadow(0 24px 26px rgba(0, 0, 0, .35));
  max-height: min(100%, 315px);
  max-width: min(100%, 430px);
  position: relative;
  width: min(100%, 430px);
}

.aaide-uno-photo-board img,
.aaide-uno-pin-layer {
  height: 100%;
  inset: 0;
  object-fit: contain;
  position: absolute;
  width: 100%;
}

.aaide-pin-label rect {
  fill: rgba(15, 23, 42, .88);
  stroke: rgba(226, 232, 240, .45);
  stroke-width: .8;
}

.aaide-pin-label text {
  fill: #f8fafc;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(15, 23, 42, .82);
  stroke-width: 1px;
}

.aaide-uno-pin-label rect {
  stroke-width: .28;
}

.aaide-uno-pin-label text,
.aaide-uno-pin-layer .aaide-board-section-title {
  font-size: 3.8px;
  stroke-width: .22px;
}

.aaide-board-section-title,
.aaide-chip-title,
.aaide-small-board-label {
  fill: #e0f2fe;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(15, 23, 42, .8);
  stroke-width: 2px;
  text-transform: uppercase;
}

.aaide-chip-title {
  font-size: 14px;
}

.aaide-small-board-label {
  font-size: 9px;
}

.aaide-uno-pin-layer .aaide-small-board-label {
  font-size: 4px;
  stroke-width: .24px;
}

.aaide-board-hole {
  fill: rgba(2, 6, 23, .22);
  stroke: rgba(248, 250, 252, .75);
  stroke-width: 1.4px;
  transition: fill .18s ease, filter .18s ease, stroke .18s ease, transform .18s ease;
}

.aaide-uno-board-hole {
  fill: rgba(255, 255, 255, .02);
  opacity: .45;
  stroke: rgba(255, 255, 255, .08);
  stroke-width: .62px;
}

.aaide-led-pin.is-output {
  fill: rgba(59, 130, 246, .45);
  opacity: 1;
  stroke: #93c5fd;
}

.aaide-led-pin.is-input,
.aaide-led-pin.is-input-pullup {
  fill: rgba(250, 204, 21, .32);
  opacity: 1;
  stroke: #facc15;
}

.aaide-led-pin.is-high {
  fill: #ef4444;
  filter: none;
  stroke: #fecaca;
}

.aaide-led-pin.is-low {
  fill: rgba(15, 23, 42, .74);
  stroke: #64748b;
}

.aaide-led-pin.is-analog {
  fill: #f59e0b;
  filter: none;
  stroke: #fde68a;
}

.aaide-led-pin.is-connecting {
  fill: #22d3ee;
  filter: none;
  opacity: 1;
  stroke: #e0f2fe;
}

.aaide-led-pin.is-loop-action {
  filter: none;
  opacity: 1;
}

.aaide-led-pin.is-servo-action {
  fill: #a78bfa;
  stroke: #ede9fe;
}

.aaide-led-pin.is-configured {
  fill: var(--aaide-pin-color, #22d3ee);
  filter: drop-shadow(0 0 7px var(--aaide-pin-color, #22d3ee));
  opacity: 1;
  stroke: #f8fafc;
  stroke-width: 2px;
}

.aaide-status-led {
  fill: #22c55e;
  filter: drop-shadow(0 0 6px rgba(34, 197, 94, .8));
}

.aaide-board-trace {
  fill: none;
  stroke: rgba(125, 211, 252, .5);
  stroke-dasharray: 9 8;
  stroke-linecap: round;
  stroke-width: 3;
}

.aaide-ram-panel {
  background: rgba(15, 23, 42, .68);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(125, 211, 252, .24);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .26);
  color: #e0f2fe;
  display: grid;
  gap: 5px;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: none;
  overflow: hidden;
  padding: 7px;
  position: absolute;
  left: 10px;
  top: 10px;
  width: 226px;
  z-index: 7;
}

.aaide-ram-panel h4 {
  align-items: center;
  color: #ffffff;
  display: flex;
  font-size: 11px;
  font-weight: 900;
  justify-content: space-between;
  line-height: 1.2;
  margin: 0;
}

.aaide-ram-panel h4 span {
  color: #34d399;
  font-size: 9px;
}

.aaide-port-mode-panel {
  background: rgba(15, 23, 42, .68);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(125, 211, 252, .24);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .24);
  color: #e0f2fe;
  display: grid;
  gap: 5px;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: none;
  overflow: hidden;
  padding: 7px;
  position: absolute;
  left: 10px;
  top: 228px;
  width: 226px;
  z-index: 7;
}

.aaide-port-mode-panel h4 {
  align-items: center;
  color: #ffffff;
  display: flex;
  font-size: 11px;
  font-weight: 900;
  justify-content: space-between;
  line-height: 1.2;
  margin: 0;
}

.aaide-port-mode-panel h4 span {
  color: #93c5fd;
  font-size: 9px;
}

.aaide-port-mode-list {
  display: grid;
  gap: 5px;
  max-height: calc((38px * 5) + (5px * 4));
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.aaide-port-mode-item {
  align-items: center;
  background: rgba(30, 41, 59, .58);
  border: 1px solid rgba(148, 163, 184, .22);
  border-left: 4px solid var(--aaide-variable-color, #38bdf8);
  border-radius: 6px;
  display: grid;
  gap: 2px;
  grid-template-columns: 1fr auto;
  min-height: 38px;
  min-width: 0;
  padding: 5px 7px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.aaide-port-mode-item.is-input {
  border-left-color: #facc15;
}

.aaide-port-mode-item.is-active {
  border-color: rgba(103, 232, 249, .58);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, .14);
  transform: translateX(2px);
}

.aaide-port-mode-item.is-input.is-active {
  border-color: rgba(250, 204, 21, .62);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, .14);
}

.aaide-port-mode-item.is-receiving {
  border-color: rgba(103, 232, 249, .72);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, .16);
  transform: translateX(2px);
}

.aaide-port-mode-item.is-input.is-receiving {
  border-color: rgba(250, 204, 21, .72);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, .16);
}

.aaide-port-mode-item strong {
  color: #f8fafc;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aaide-port-mode-item span {
  color: rgba(226, 232, 240, .76);
  font-size: 8px;
  font-weight: 900;
  grid-column: 1 / -1;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.aaide-port-mode-item em {
  color: var(--aaide-variable-color, #67e8f9);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  justify-self: end;
}

.aaide-port-mode-item.is-input em {
  color: #fde68a;
}

.aaide-loop-panel {
  background: rgba(15, 23, 42, .68);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(125, 211, 252, .24);
  border-radius: 8px;
  bottom: auto;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .24);
  color: #e0f2fe;
  display: grid;
  gap: 5px;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  padding: 7px;
  position: absolute;
  left: 10px;
  top: 416px;
  width: 226px;
  z-index: 7;
}

.aaide-loop-panel h4 {
  align-items: center;
  color: #ffffff;
  display: flex;
  font-size: 11px;
  font-weight: 900;
  justify-content: space-between;
  line-height: 1.2;
  margin: 0;
}

.aaide-loop-panel h4 span {
  color: #34d399;
  font-size: 9px;
}

.aaide-loop-list {
  display: grid;
  gap: 5px;
  align-content: start;
  max-height: calc((44px * 5) + (5px * 4));
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.aaide-loop-item {
  background: rgba(30, 41, 59, .58);
  border: 1px solid rgba(148, 163, 184, .22);
  border-left: 4px solid #34d399;
  border-radius: 6px;
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 5px 7px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.aaide-loop-item.is-servo {
  border-left-color: #a78bfa;
}

.aaide-loop-item.is-wait {
  border-left-color: #94a3b8;
}

.aaide-loop-item.is-read {
  border-left-color: #facc15;
}

.aaide-loop-item.is-method,
.aaide-loop-item.is-call {
  border-left-color: #2dd4bf;
}

.aaide-loop-item.is-tone {
  border-left-color: #f97316;
}

.aaide-loop-item.is-memory {
  border-left-color: #38bdf8;
}

.aaide-loop-item.is-condition {
  border-left-color: #f59e0b;
}

.aaide-loop-item.is-logic {
  border-left-color: #94a3b8;
}

.aaide-loop-item.is-active {
  border-color: rgba(52, 211, 153, .66);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, .14);
  transform: translateX(2px);
}

.aaide-loop-item.is-loop-action {
  border-color: rgba(125, 211, 252, .7);
  box-shadow: 0 0 0 3px rgba(125, 211, 252, .14);
}

.aaide-loop-item strong {
  color: #ffffff;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 9px;
  line-height: 1.15;
}

.aaide-loop-item span {
  color: #bbf7d0;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.15;
}

.aaide-loop-item em {
  color: #cbd5e1;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 8px;
  font-style: normal;
  line-height: 1.2;
  max-height: 20px;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.aaide-ram-list {
  display: grid;
  align-content: start;
  gap: 5px;
  max-height: calc((34px * 5) + (5px * 4));
  min-height: 0;
  overflow: auto;
}

.aaide-ram-item {
  align-items: center;
  background: rgba(30, 41, 59, .56);
  border: 1px solid rgba(148, 163, 184, .22);
  border-left: 4px solid var(--aaide-variable-color, rgba(148, 163, 184, .38));
  border-radius: 6px;
  display: grid;
  gap: 5px;
  grid-template-columns: minmax(0, 1fr);
  min-height: 34px;
  overflow: hidden;
  padding: 5px 7px;
  position: relative;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.aaide-ram-item.is-receiving {
  border-color: var(--aaide-variable-color, #67e8f9);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--aaide-variable-color, #67e8f9) 24%, transparent), 0 12px 22px rgba(8, 145, 178, .22);
  transform: translateY(-2px);
}

.aaide-ram-item.is-pin-variable {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--aaide-variable-color, #22d3ee) 18%, transparent), transparent 58%),
    rgba(30, 41, 59, .56);
}

.aaide-variable-box-icon {
  align-self: center;
  background:
    linear-gradient(135deg, transparent 0 16%, rgba(251, 191, 36, .94) 17% 50%, transparent 51%),
    linear-gradient(225deg, transparent 0 16%, rgba(245, 158, 11, .94) 17% 50%, transparent 51%),
    linear-gradient(180deg, #fde68a, #d97706);
  border: 2px solid rgba(120, 53, 15, .82);
  border-radius: 4px 4px 7px 7px;
  box-shadow: inset 0 -7px 0 rgba(120, 53, 15, .2), 0 7px 14px rgba(0, 0, 0, .22);
  display: none;
  height: 31px;
  justify-items: center;
  line-height: 1;
  position: relative;
  width: 31px;
}

.aaide-variable-box-icon::before,
.aaide-variable-box-icon::after {
  background: #fbbf24;
  border: 2px solid rgba(120, 53, 15, .82);
  content: "";
  position: absolute;
  top: -8px;
  width: 16px;
  height: 11px;
}

.aaide-variable-box-icon::before {
  border-radius: 4px 0 3px 2px;
  left: -3px;
  transform: rotate(-18deg);
  transform-origin: bottom right;
}

.aaide-variable-box-icon::after {
  border-radius: 0 4px 2px 3px;
  right: -3px;
  transform: rotate(18deg);
  transform-origin: bottom left;
}

.aaide-variable-box-icon span {
  color: #78350f;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0;
  margin-top: 7px;
  max-width: 24px;
  overflow: hidden;
  position: relative;
  text-overflow: ellipsis;
  white-space: nowrap;
  z-index: 1;
}

.aaide-variable-box-icon b {
  align-items: center;
  background: rgba(255, 251, 235, .84);
  border: 1px solid rgba(120, 53, 15, .45);
  border-radius: 4px;
  color: #0f172a;
  display: flex;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 8px;
  font-weight: 900;
  height: 13px;
  justify-content: center;
  max-width: 23px;
  min-width: 16px;
  overflow: hidden;
  padding: 0 4px;
  position: relative;
  text-overflow: ellipsis;
  white-space: nowrap;
  z-index: 1;
}

.aaide-variable-box-body {
  display: grid;
  align-items: center;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
}

.aaide-variable-box-head {
  align-items: center;
  display: flex;
  gap: 5px;
  justify-content: flex-start;
  min-width: 0;
}

.aaide-ram-item strong {
  color: #f8fafc;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aaide-variable-value,
.aaide-ram-item em {
  color: #bfdbfe;
  font-size: 10px;
  font-style: normal;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.aaide-variable-value {
  align-items: center;
  background: rgba(15, 23, 42, .72);
  border: 1px solid color-mix(in srgb, var(--aaide-variable-color, #7dd3fc) 48%, rgba(125, 211, 252, .28));
  border-radius: 999px;
  color: rgba(191, 219, 254, .9);
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  justify-self: end;
  max-width: 96px;
  min-height: 22px;
  min-width: 42px;
  overflow: hidden;
  padding: 3px 7px;
}

.aaide-variable-value small {
  color: rgba(226, 232, 240, .62);
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
}

.aaide-variable-value b {
  color: #e0f2fe;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aaide-ram-item.is-receiving .aaide-variable-value {
  animation: aaideValueReceive .88s ease both;
  background: color-mix(in srgb, var(--aaide-variable-color, #14b8a6) 24%, rgba(15, 23, 42, .72));
  border-color: var(--aaide-variable-color, rgba(103, 232, 249, .48));
  color: #e0f2fe;
}

.aaide-ram-item.is-receiving .aaide-variable-box-icon {
  animation: aaideBoxReceive .88s ease both;
}

.aaide-ram-item em {
  color: var(--aaide-variable-color, #34d399);
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 800;
}

.aaide-animation-overlay {
  display: block;
  inset: 0;
  min-height: 760px;
  pointer-events: none;
  position: absolute;
  z-index: 9;
}

.aaide-animation-flight {
  animation: aaideEducationCard 3.4s ease both;
  inset: 0;
  position: absolute;
}

.aaide-robot-runner {
  align-items: center;
  display: grid;
  justify-items: center;
  left: 0;
  position: absolute;
  top: 0;
  width: 34px;
  z-index: 3;
}

.aaide-animation-robot svg {
  animation: aaideRobotCarry .58s ease-in-out infinite;
  display: block;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .28));
  height: 14px;
  width: 14px;
}

.aaide-a5-wheel-core {
  animation: aaideA5WheelSpin .82s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.aaide-a5-arm {
  animation: aaideA5ArmBounce 1.1s ease-in-out infinite;
  transform-box: fill-box;
}

.aaide-a5-arm-right {
  animation-delay: -.55s;
}

.aaide-a5-eye {
  animation: aaideA5EyePulse 1.3s ease-in-out infinite;
}

.aaide-robot-payload {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .18);
  color: #78350f;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 7px;
  font-weight: 900;
  line-height: 1.15;
  margin-top: -2px;
  max-width: 48px;
  overflow: hidden;
  padding: 2px 4px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aaide-animation-copy {
  background: rgba(248, 250, 252, .96);
  border: 1px solid rgba(148, 163, 184, .45);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .28);
  color: #0f172a;
  display: grid;
  gap: 4px;
  left: 246px;
  max-width: min(292px, calc(100% - 260px));
  min-width: 0;
  padding: 10px 12px;
  position: absolute;
  top: 12px;
  transform: none;
}

.aaide-animation-copy strong {
  color: #0f172a;
  font-size: 13px;
  line-height: 1.2;
}

.aaide-animation-copy span {
  color: #0f766e;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.aaide-animation-copy p,
.aaide-animation-copy em {
  color: #475569;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
  margin: 0;
}

.aaide-port-connector {
  animation: aaideConnectorPop .9s ease both;
  background: rgba(15, 23, 42, .94);
  border: 1px solid rgba(224, 242, 254, .46);
  border-left: 5px solid #38bdf8;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .32);
  color: #ffffff;
  display: grid;
  gap: 3px;
  line-height: 1.2;
  max-width: 218px;
  min-width: 178px;
  padding: 8px 10px;
  position: absolute;
  z-index: 4;
}

.aaide-port-connector.is-input {
  border-left-color: #facc15;
}

.aaide-port-connector strong {
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.aaide-port-connector span {
  color: #dbeafe;
  font-size: 10px;
  font-weight: 800;
}

.aaide-port-connector em {
  color: #67e8f9;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.aaide-port-connector.is-input em {
  color: #fde68a;
}

.aaide-port-flow {
  inset: 0;
  overflow: visible;
  pointer-events: none;
  position: absolute;
  z-index: 4;
}

.aaide-port-flow [data-aaide-port-flow-path] {
  animation: aaidePortFlow 1.05s ease-in-out infinite;
  fill: none;
  stroke: #38bdf8;
  stroke-dasharray: 9 7;
  stroke-linecap: round;
  stroke-width: 5;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, .65));
}

.aaide-port-flow.is-input [data-aaide-port-flow-path] {
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, .65));
  stroke: #facc15;
}

.aaide-port-flow.is-servo [data-aaide-port-flow-path] {
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, .72));
  stroke: #a78bfa;
}

.aaide-port-flow.is-method [data-aaide-port-flow-path] {
  filter: drop-shadow(0 0 6px rgba(45, 212, 191, .72));
  stroke: #2dd4bf;
}

.aaide-port-flow marker path {
  fill: #38bdf8;
}

.aaide-port-flow.is-input marker path {
  fill: #facc15;
}

.aaide-port-flow.is-servo marker path {
  fill: #a78bfa;
}

.aaide-port-flow.is-method marker path {
  fill: #2dd4bf;
}

.aaide-port-flow text {
  fill: #e0f2fe;
  font-size: 11px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(15, 23, 42, .92);
  stroke-width: 3px;
}

.aaide-port-flow.is-input text {
  fill: #fef3c7;
}

.aaide-port-device {
  align-items: center;
  animation: aaideDevicePop .9s ease both;
  background: rgba(15, 23, 42, .9);
  border: 1px solid rgba(224, 242, 254, .42);
  border-radius: 8px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, .26);
  color: #e0f2fe;
  display: grid;
  gap: 2px;
  height: 52px;
  justify-items: center;
  padding: 6px;
  position: absolute;
  width: 68px;
  z-index: 5;
}

.aaide-port-device::before {
  border-radius: 999px;
  content: "";
  display: block;
  height: 17px;
  width: 17px;
}

.aaide-port-device.is-output::before {
  background: #22c55e;
  box-shadow: 0 0 14px rgba(34, 197, 94, .9);
}

.aaide-port-device.is-input::before {
  background: #facc15;
  border: 3px solid #78350f;
  box-shadow: inset 0 0 0 3px rgba(255, 251, 235, .85), 0 0 12px rgba(250, 204, 21, .62);
}

.aaide-port-device.is-loop-high::before {
  background: #22c55e;
  box-shadow: 0 0 14px rgba(34, 197, 94, .92);
}

.aaide-port-device.is-loop-low::before {
  background: #334155;
  border: 2px solid rgba(148, 163, 184, .72);
  box-shadow: none;
}

.aaide-port-device.is-servo::before {
  background:
    linear-gradient(90deg, transparent 43%, #1e293b 44% 56%, transparent 57%),
    #a78bfa;
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(167, 139, 250, .72);
}

.aaide-port-device.is-wait::before {
  background: #94a3b8;
  clip-path: polygon(28% 0, 72% 0, 72% 28%, 58% 50%, 72% 72%, 72% 100%, 28% 100%, 28% 72%, 42% 50%, 28% 28%);
}

.aaide-port-device.is-method::before {
  background: #2dd4bf;
  border-radius: 5px;
  box-shadow: inset 0 0 0 3px rgba(240, 253, 250, .72), 0 0 12px rgba(45, 212, 191, .72);
}

.aaide-port-device.is-tone::before {
  background: #f97316;
  clip-path: polygon(0 32%, 32% 32%, 62% 8%, 62% 92%, 32% 68%, 0 68%);
  filter: drop-shadow(8px 0 0 rgba(251, 146, 60, .42));
}

.aaide-port-device span {
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.aaide-port-device b {
  color: #bfdbfe;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.aaide-port-device.is-input b {
  color: #fef3c7;
}

.aaide-port-plug {
  animation: aaidePlugSnap .9s ease both;
  background: #38bdf8;
  border: 2px solid #e0f2fe;
  border-radius: 4px;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, .15), 0 7px 16px rgba(0, 0, 0, .3);
  height: 24px;
  position: absolute;
  width: 24px;
  z-index: 5;
}

.aaide-port-plug::before {
  background: rgba(226, 232, 240, .92);
  border-radius: 999px;
  content: "";
  height: 5px;
  left: 4px;
  position: absolute;
  right: 4px;
  top: 5px;
}

.aaide-port-plug::after {
  background: #1e293b;
  border-radius: 0 0 999px 999px;
  bottom: -16px;
  content: "";
  height: 18px;
  left: 8px;
  position: absolute;
  width: 8px;
}

.aaide-port-plug.is-input {
  background: #facc15;
  box-shadow: 0 0 0 4px rgba(250, 204, 21, .15), 0 7px 16px rgba(0, 0, 0, .3);
}

.aaide-robot-runner.is-listening .aaide-robot-payload {
  background: #e0f2fe;
  border-color: #38bdf8;
  color: #075985;
}

.aaide-serial {
  background: #fff;
  border-left: 1px solid var(--aaide-ref-slate-300);
  box-shadow: -18px 0 45px rgba(15, 23, 42, .18);
  display: flex;
  flex-direction: column;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  transform: translateX(100%);
  transition: transform .28s ease;
  width: 320px;
  z-index: 30;
}

.aaide.is-serial-open .aaide-serial {
  transform: translateX(0);
}

.aaide-serial-head {
  background: rgba(248, 250, 252, .92);
  border-bottom: 1px solid var(--aaide-ref-slate-200);
  min-height: 54px;
  padding: 12px 14px;
}

.aaide-serial pre {
  background: #0a0a0a;
  color: #cbd5e1;
  flex: 1 1 auto;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.aaide-board-modal {
  align-items: center;
  background: rgba(15, 23, 42, .7);
  backdrop-filter: blur(4px);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 24px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 999999;
}

.aaide-board-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .35);
  display: flex;
  flex-direction: column;
  height: min(880px, calc(100vh - 48px));
  max-width: 1400px;
  overflow: hidden;
  width: min(1400px, calc(100vw - 48px));
}

.aaide-board-head {
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid var(--aaide-ref-slate-200);
  display: flex;
  justify-content: space-between;
  min-height: 60px;
  padding: 12px 18px;
}

.aaide-board-title,
.aaide-board-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.aaide-board-mark {
  align-items: center;
  background: #fef3c7;
  border-radius: 8px;
  color: #d97706;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.aaide-board-body {
  background: var(--aaide-ref-slate-100);
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.aaide-board-tools {
  background: #fff;
  border-right: 1px solid var(--aaide-ref-slate-200);
  display: flex;
  flex: 0 0 64px;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding: 14px 8px;
}

.aaide-board-tools button {
  align-items: center;
  aspect-ratio: 1;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--aaide-ref-slate-500);
  display: flex;
  flex-direction: column;
  font-size: 9px;
  font-weight: 800;
  justify-content: center;
}

.aaide-board-tools button.is-active {
  background: #ccfbf1;
  border-color: #99f6e4;
  color: var(--aaide-ref-brand);
}

.aaide-color-btn {
  background: var(--board-color) !important;
  border-radius: 999px !important;
  height: 24px;
  margin: 0 auto;
  width: 24px;
}

.aaide-color-btn.is-active {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--aaide-ref-brand);
  transform: scale(1.08);
}

.aaide-board-canvas-wrap {
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 20px 20px;
  cursor: crosshair;
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
}

.aaide-board-canvas-wrap.is-board-zoom {
  cursor: zoom-in;
}

.aaide-board-canvas-wrap.is-board-focus {
  cursor: crosshair;
}

.aaide-board-canvas-wrap canvas {
  display: block;
}

.aaide-board-focus-spotlight {
  --aaide-focus-x: 50%;
  --aaide-focus-y: 50%;
  --aaide-focus-radius: 170px;
  background:
    radial-gradient(
      circle at var(--aaide-focus-x) var(--aaide-focus-y),
      rgba(255, 255, 255, 0) 0,
      rgba(255, 255, 255, 0) var(--aaide-focus-radius),
      rgba(8, 13, 25, .55) calc(var(--aaide-focus-radius) + 22px),
      rgba(8, 13, 25, .86) 100%
    );
  inset: 0;
  pointer-events: none;
  position: absolute;
  transition: background .16s ease;
  z-index: 5;
}

.aaide-board-focus-spotlight::after {
  border: 2px solid rgba(255, 255, 255, .88);
  border-radius: 999px;
  box-shadow: 0 0 0 8px rgba(56, 189, 248, .12), 0 0 34px rgba(255, 255, 255, .32);
  content: "";
  height: calc(var(--aaide-focus-radius) * 2);
  left: var(--aaide-focus-x);
  pointer-events: none;
  position: absolute;
  top: var(--aaide-focus-y);
  transform: translate(-50%, -50%);
  width: calc(var(--aaide-focus-radius) * 2);
}

.aaide-board-separator {
  background: var(--aaide-ref-slate-200);
  flex: 0 0 1px;
  width: 100%;
}

.aaide-board-tool-label {
  color: var(--aaide-ref-slate-500);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.aaide-board-tools input[type="range"] {
  width: 100%;
}

.aaide-board-clear {
  aspect-ratio: 1;
}

@keyframes aaidePulseDot {
  0%, 100% {
    opacity: .65;
    transform: scale(.88);
  }

  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

@keyframes aaidePinBlink {
  0%, 100% {
    opacity: .82;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.32);
  }
}

@keyframes aaidePinConnect {
  0%, 100% {
    opacity: .72;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.55);
  }
}

@keyframes aaideValueReceive {
  0% {
    opacity: .45;
    transform: scale(.96);
  }

  55% {
    opacity: 1;
    transform: scale(1.06);
  }

  100% {
    opacity: .88;
    transform: scale(1);
  }
}

@keyframes aaideBoxReceive {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  45% {
    transform: translateY(-3px) rotate(-2deg);
  }

  100% {
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes aaideConnectorPop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(.82);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes aaidePortFlow {
  0% {
    stroke-dashoffset: 26;
  }

  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes aaideDevicePop {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(.82);
  }

  70% {
    opacity: 1;
    transform: translateY(-2px) scale(1.05);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes aaidePlugSnap {
  0% {
    opacity: 0;
    transform: translateY(-18px) scale(.8);
  }

  65% {
    opacity: 1;
    transform: translateY(2px) scale(1.08);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes aaideEducationCard {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(.96);
  }

  15%, 82% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-10px) scale(.98);
  }
}

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

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

@keyframes aaideA5WheelSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes aaideA5ArmBounce {
  0%, 100% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(8deg);
  }
}

@keyframes aaideA5EyePulse {
  0%, 100% {
    opacity: .78;
  }

  50% {
    opacity: 1;
  }
}

@media (max-width: 1280px) {
  .aaide.is-animation-open .aaide-editor-stage {
    flex: 0 0 auto;
    flex-direction: column;
    height: auto;
    min-height: 0;
  }

  .aaide.is-animation-open .aaide-code-pane {
    flex: 0 0 520px;
    height: 520px;
  }

  .aaide-animation-pane {
    flex: 0 0 auto;
    height: 520px;
    min-width: 0;
    width: 100%;
  }

  .aaide-ram-panel {
    max-height: none;
  }

  .aaide-port-mode-panel {
    max-height: none;
    top: 228px;
  }

  .aaide-loop-panel {
    top: 416px;
  }
}

@media (max-width: 820px) {
  .aaide-animation-pane {
    flex-basis: auto;
    height: 520px;
    min-width: 0;
  }

  .aaide.is-animation-open .aaide-code-pane {
    flex-basis: 520px;
    height: 520px;
  }

  .aaide-animation-stage {
    padding: 12px 12px 12px 184px;
  }

  .aaide-ram-panel {
    left: 10px;
    max-height: none;
    top: 10px;
    width: 162px;
  }

  .aaide-port-mode-panel {
    left: 10px;
    top: 206px;
    width: 162px;
  }

  .aaide-loop-panel {
    left: 10px;
    top: 384px;
    width: 162px;
  }

  .aaide-board-panel {
    height: calc(100vh - 24px);
    width: calc(100vw - 24px);
  }

  .aaide-board-body {
    flex-direction: column;
  }

  .aaide-board-tools {
    border-bottom: 1px solid var(--aaide-ref-slate-200);
    border-right: 0;
    flex: 0 0 auto;
    flex-direction: row;
    min-height: 68px;
  }

  .aaide-board-separator,
  .aaide-board-tool-label {
    display: none;
  }
}
