.cb-root {
  --cb-ink: #252326;
  --cb-muted: #716e74;
  --cb-line: #e5e1e6;
  --cb-brand: #5750ce;
  --cb-bg: #faf9fa;
  color: var(--cb-ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  isolation: isolate;
}
.cb-root * {
  box-sizing: border-box;
}
.cb-root [hidden] {
  display: none !important;
}
.cb-root button,
.cb-root input,
.cb-root textarea,
.cb-root select {
  font: inherit;
}
.cb-root button {
  cursor: pointer;
  color: inherit;
  background: #fff;
  border: 1px solid var(--cb-line);
  border-radius: 8px;
  padding: 7px 12px;
  line-height: 1.4;
  white-space: nowrap;
  min-height: 32px;
}
.cb-root button:hover {
  border-color: #aba7b1;
  background: #f7f6f8;
}
.cb-root button:focus-visible,
.cb-root input:focus-visible,
.cb-root textarea:focus-visible,
.cb-root select:focus-visible {
  outline: 2px solid var(--cb-brand);
  outline-offset: 2px;
}
.cb-root button:disabled {
  opacity: 0.45;
  cursor: default;
}
.cb-root button.primary {
  background: var(--cb-ink);
  color: white;
  border-color: var(--cb-ink);
}
.cb-root button.primary:hover {
  background: #444046;
}
.cb-root .cb-action-danger {
  color: #ae2a38;
}
.cb-head,
.cb-toolbar,
.cb-inline,
.cb-actions,
.cb-foot,
.cb-cardhead,
.cb-cardfoot {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cb-head {
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 16px 0;
}
.cb-root h2,
.cb-root h3 {
  font: inherit;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--cb-ink);
  margin: 0;
}
.cb-root h2 {
  font-size: 24px;
}
.cb-root h3 {
  font-size: 16px;
}
.cb-root .cb-muted {
  color: var(--cb-muted);
  font-size: 13px;
}
.cb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 235px), 1fr));
  gap: 16px;
}
.cb-tile {
  min-width: 0;
  border-radius: 14px;
  border: 1px solid var(--cb-line);
  overflow: hidden;
  background: white;
}
.cb-root .cb-cover {
  position: relative;
  display: block;
  width: 100%;
  height: 138px;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background-color: #f5f4f4;
  background-image: radial-gradient(#d1cfd2 1px, transparent 1px);
  background-size: 12px 12px;
}
.cb-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cb-cover .cb-covertext {
  display: block;
  position: relative;
  width: 58%;
  max-height: 80px;
  overflow: hidden;
  margin: auto;
  background: #fff;
  padding: 13px 10px;
  box-shadow: 0 4px 12px #2221;
  transform: rotate(-3deg);
  font-size: 13px;
  white-space: normal;
  text-align: left;
}
.cb-tilebody {
  padding: 13px;
  display: grid;
  gap: 10px;
}
.cb-title-button {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}
.cb-tilebody .cb-title-button {
  background: none;
  border: 0;
  font-size: 16px;
  font-weight: 650;
  padding: 0;
  width: 100%;
}
.cb-tilebody .cb-actions {
  flex-wrap: wrap;
}
.cb-tilebody .cb-actions button {
  font-size: 13px;
  padding: 4px 8px;
  min-height: 28px;
}
.cb-welcome {
  padding: 56px 20px;
  background: var(--cb-bg);
  border: 1px solid var(--cb-line);
  border-radius: 14px;
  text-align: center;
  display: grid;
  place-items: center;
  gap: 14px;
}
.cb-welcome p,
.cb-empty p {
  margin: 0;
  color: var(--cb-muted);
  line-height: 1.65;
}
.cb-editor {
  border: 1px solid var(--cb-line);
  border-radius: 14px;
  overflow: hidden;
  background: white;
}
.cb-toolbar {
  padding: 9px 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--cb-line);
  background: white;
}
.cb-toolbar .cb-badge {
  margin-left: auto;
  color: var(--cb-muted);
  font-size: 13px;
}
.cb-root button[aria-pressed="true"] {
  color: #4a3dc2;
  background: #f0eefe;
  border-color: #aaa3ea;
}
.cb-stage {
  position: relative;
  overflow: hidden;
  height: clamp(410px, 66vh, 880px);
  background: #f9f8f8;
  background-image: radial-gradient(#ccc8cd 1px, transparent 1px);
  background-size: 18px 18px;
  touch-action: none;
  cursor: grab;
  outline: none;
}
.cb-stage:active {
  cursor: grabbing;
}
.cb-world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  width: 1px;
  height: 1px;
  overflow: visible;
}
.cb-edges {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.cb-edges path {
  fill: none;
  stroke: #9489bc;
  stroke-width: 2.3;
  stroke-linecap: round;
}
.cb-card {
  position: absolute;
  width: 228px;
  border-radius: 12px;
  background: white;
  border: 1px solid #dedade;
  box-shadow: 0 4px 14px #24202910;
  overflow: hidden;
  cursor: default;
}
.cb-card.selected,
.cb-card.source {
  outline: 2px solid #7567cd;
  outline-offset: 1px;
}
.cb-cardhead {
  padding: 8px 11px;
  background: #fff;
  border-bottom: 1px solid #efedf0;
  cursor: grab;
  min-height: 38px;
  touch-action: none;
}
.cb-cardhead span {
  margin-left: auto;
  font-weight: 400;
  font-size: 12px;
  color: var(--cb-muted);
}
.cb-cardhead strong {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cb-card-media {
  display: block;
  width: 100%;
  height: 143px;
  object-fit: cover;
  background: #e9e7e8;
}
.cb-card-text {
  margin: 0;
  white-space: pre-wrap;
  overflow: auto;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.6;
  padding: 12px;
  min-height: 72px;
  max-height: 160px;
}
.cb-cardfoot {
  justify-content: flex-end;
  padding: 5px 7px;
  border-top: 1px solid #efedf0;
}
.cb-cardfoot button {
  border: 0;
  font-size: 12px;
  min-height: 24px;
  padding: 2px 6px;
}
.cb-empty {
  position: absolute;
  pointer-events: none;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 20px;
  gap: 9px;
  text-align: center;
}
.cb-empty .cb-inline {
  pointer-events: auto;
}
.cb-foot {
  padding: 8px 12px;
  justify-content: space-between;
  border-top: 1px solid var(--cb-line);
  background: white;
  flex-wrap: wrap;
}
.cb-foot .cb-inline button {
  font-size: 13px;
  min-height: 28px;
  padding: 3px 9px;
}
.cb-root .cb-link-list {
  display: grid;
  gap: 6px;
}
.cb-root dialog {
  border: 1px solid var(--cb-line);
  color: var(--cb-ink);
  border-radius: 15px;
  max-width: min(440px, calc(100vw - 24px));
  padding: 0;
  box-shadow: 0 12px 70px #211a2e33;
}
.cb-root dialog::backdrop {
  background: #201b285c;
}
.cb-dialogbody {
  display: grid;
  gap: 15px;
  padding: 22px;
  min-width: min(360px, calc(100vw - 40px));
  background: #fff;
}
.cb-dialogbody .cb-actions {
  justify-content: flex-end;
}
.cb-dialogbody label {
  display: grid;
  gap: 6px;
}
.cb-dialogbody input:not([type="file"]),
.cb-dialogbody textarea,
.cb-dialogbody select {
  width: 100%;
  padding: 8px;
  border: 1px solid #d8d5d9;
  border-radius: 7px;
  background: #fff;
  color: var(--cb-ink);
}
.cb-dialogbody textarea {
  min-height: 118px;
  resize: vertical;
}
.cb-dialogbody .cb-filelabel {
  cursor: pointer;
  display: block;
  padding: 10px;
  border: 1px dashed #bbb6c0;
  border-radius: 8px;
}
.cb-dialogbody .cb-assets {
  max-height: 40vh;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.cb-assets button {
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 4px;
  white-space: normal;
}
.cb-assets img,
.cb-assets video {
  display: block;
  width: 100%;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
}
.cb-assets span {
  display: block;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 640px) {
  .cb-head {
    gap: 8px;
  }
  .cb-head h2 {
    font-size: 20px;
  }
  .cb-toolbar {
    gap: 5px;
    padding: 8px;
  }
  .cb-root button {
    padding: 6px 9px;
  }
  .cb-toolbar .cb-badge {
    margin-left: 0;
  }
  .cb-stage {
    height: 60dvh;
    min-height: 350px;
  }
  .cb-foot {
    gap: 5px;
  }
  .cb-foot .cb-muted {
    font-size: 12px;
  }
}

body.dark .cb-root {
  --cb-ink: #eceaee;
  --cb-muted: #b4afb9;
  --cb-line: #4a454e;
  --cb-bg: #262329;
  color: var(--cb-ink);
}
body.dark .cb-root button,
body.dark .cb-root .cb-editor,
body.dark .cb-root .cb-toolbar,
body.dark .cb-root .cb-foot,
body.dark .cb-root .cb-card,
body.dark .cb-root .cb-cardhead,
body.dark .cb-root .cb-tile,
body.dark .cb-root .cb-dialogbody,
body.dark .cb-root .cb-dialogbody input,
body.dark .cb-root .cb-dialogbody textarea {
  color: var(--cb-ink);
  background: #2d2a30;
  border-color: var(--cb-line);
}
body.dark .cb-root button:hover {
  background: #423d45;
}
body.dark .cb-root button.primary {
  color: #242027;
  background: #eee9f0;
}
body.dark .cb-root .cb-stage,
body.dark .cb-root .cb-cover {
  background-color: #232025;
  background-image: radial-gradient(#48424b 1px, transparent 1px);
}
body.dark .cb-root .cb-cardfoot {
  border-color: var(--cb-line);
}
body.dark .cb-root .cb-covertext {
  background: #37323a;
}
body.dark .cb-root .cb-action-danger {
  color: #ff9ea7;
}
body.dark .cb-root button[aria-pressed="true"] {
  color: #d1c8ff;
  border-color: #9386c9;
}
.cb-workarea {
  display: flex;
  min-width: 0;
  align-items: stretch;
}
.cb-workarea .cb-stage {
  flex: 1;
  min-width: 0;
}
.cb-root .cb-map {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: #fffffff0;
  border: 1px solid #c7c2d3;
  border-radius: 7px;
  padding: 3px;
  min-height: 0;
  line-height: 0;
  box-shadow: 0 2px 6px #16101d12;
}
.cb-map svg {
  display: block;
  width: 126px;
  height: 69px;
}
.cb-card-audio {
  display: block;
  width: 100%;
  height: 49px;
  margin: 10px 0;
}
.cb-chat {
  width: clamp(250px, 28%, 350px);
  height: clamp(410px, 66vh, 880px);
  overflow: auto;
  padding: 15px;
  border-left: 1px solid var(--cb-line);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  background: var(--cb-bg);
}
.cb-chathead {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cb-chat label {
  display: grid;
  gap: 5px;
}
.cb-chat select,
.cb-chat textarea {
  color: var(--cb-ink);
  background: var(--cb-bg);
  font: inherit;
  width: 100%;
  border: 1px solid var(--cb-line);
  border-radius: 7px;
  padding: 7px;
}
.cb-chat textarea {
  resize: vertical;
  min-height: 65px;
}
.cb-chat details summary {
  cursor: pointer;
}
.cb-chat [data-refs] {
  max-height: 118px;
  overflow: auto;
  margin-top: 8px;
  display: grid;
  gap: 4px;
}
.cb-chat [data-refs] label {
  display: block;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.cb-chat [data-chatlog] {
  display: grid;
  gap: 10px;
}
.cb-chat [data-chatlog] article {
  border-top: 1px solid var(--cb-line);
  padding-top: 10px;
}
.cb-chat [data-chatlog] article > .cb-muted {
  margin-left: 6px;
}
.cb-chat [data-chatlog] p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
  margin: 7px 0;
}
.cb-chat [data-chatlog] small {
  color: var(--cb-muted);
}
@media (max-width: 720px) {
  .cb-workarea {
    flex-direction: column;
  }
  .cb-workarea .cb-stage {
    flex: none;
  }
  .cb-chat {
    border-left: 0;
    border-top: 1px solid var(--cb-line);
    width: 100%;
    height: auto;
    max-height: 58vh;
  }
  .cb-map svg {
    width: 91px;
    height: 50px;
  }
}
.cb-start {
  border: 1px dashed var(--cb-line);
  border-radius: 12px;
  min-height: 205px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  background: var(--cb-bg);
}
.cb-root .cb-start button {
  border: 0;
  background: none;
}
.cb-start button:first-child {
  display: grid;
  place-items: center;
  gap: 6px;
  font-size: 15px;
}
.cb-start button:first-child span {
  display: grid;
  place-items: center;
  background: #f0edf4;
  border-radius: 13px;
  width: 49px;
  height: 49px;
  font-size: 26px;
  color: #67606e;
}
.cb-start button:last-child {
  font-size: 12px;
  color: var(--cb-muted);
}
.cb-tilebody {
  gap: 5px;
}
.cb-tilebody .cb-actions {
  margin-top: 8px;
  gap: 3px;
}
.cb-tilebody .cb-actions button {
  padding: 3px 6px;
  min-height: 26px;
  font-size: 12px;
  border: 0;
}
.cb-toolbar {
  gap: 5px;
  position: relative;
  z-index: 2;
}
.cb-toolbar > button,
.cb-quick button {
  border-color: transparent;
  min-height: 32px;
}
.cb-quick {
  display: flex;
  gap: 1px;
  padding-right: 6px;
  border-right: 1px solid var(--cb-line);
}
.cb-root .cb-quick button {
  display: grid;
  place-items: center;
  padding: 6px;
}
.cb-node-menu {
  position: relative;
}
.cb-node-menu summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--cb-ink);
  color: var(--cb-bg);
  padding: 7px 10px;
  border-radius: 8px;
  min-height: 32px;
}
.cb-node-menu summary::-webkit-details-marker {
  display: none;
}
.cb-node-menu > div {
  position: absolute;
  left: 0;
  top: calc(100% + 5px);
  padding: 5px;
  min-width: 125px;
  border-radius: 9px;
  border: 1px solid var(--cb-line);
  background: var(--cb-bg);
  box-shadow: 0 6px 18px #221e2b16;
  z-index: 4;
}
.cb-root .cb-node-menu > div button {
  width: 100%;
  border: 0;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 9px;
}
.cb-root.cb-in-editor .cb-head h2 {
  font-size: 18px;
}
.cb-root.cb-in-editor .cb-head {
  padding: 10px 0;
}
.cb-in-editor .cb-foot {
  gap: 8px;
}
@media (min-width: 761px) {
  .mainwrap:has(.cb-root.cb-in-editor) {
    max-width: none;
    padding: 0 12px;
  }
  .mainwrap:has(.cb-root.cb-in-editor) > .topbar {
    display: none;
  }
  .cb-in-editor .cb-stage,
  .cb-in-editor .cb-chat {
    height: calc(100dvh - 155px);
    min-height: 420px;
  }
  .cb-root.cb-in-editor .cb-editor {
    border-radius: 10px;
  }
}
.cb-lessons {
  margin: 15px 0 24px;
}
.cb-root .cb-lessons-heading {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 650;
  padding: 4px 0;
  background: none;
  border: 0;
}
.cb-lessons-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.cb-root .cb-lessons-grid button {
  position: relative;
  display: block;
  height: 100px;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--cb-line);
  background: #454447;
  text-align: left;
}
.cb-lessons-grid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.18s ease;
}
.cb-lessons-grid button:hover img,
.cb-lessons-grid button:focus-visible img {
  transform: scale(1.035);
}
.cb-lessons-grid span {
  position: absolute;
  inset: auto 0 0;
  padding: 17px 11px 8px;
  color: white;
  background: linear-gradient(transparent, #101014a3);
  font-weight: 600;
  text-shadow: 0 1px 3px #0006;
}
.cb-practice {
  position: relative;
  width: min(350px, calc(100vw - 90px));
  height: 156px;
  overflow: hidden;
  background: #f4f3f6 radial-gradient(#ccc8cd 1px, transparent 1px);
  background-size: 12px 12px;
  border: 1px solid var(--cb-line);
  border-radius: 9px;
  touch-action: none;
}
.cb-practice img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}
.cb-demo-pic,
.cb-demo-note,
.cb-demo-source,
.cb-demo-target,
.cb-demo-drag,
.cb-demo-output {
  position: absolute;
  overflow: hidden;
  border: 1px solid #d0ccd2;
  border-radius: 6px;
  background: white;
  box-shadow: 0 2px 8px #221e2915;
}
.cb-demo-pic,
.cb-demo-source {
  left: 7%;
  top: 24%;
  width: 36%;
  height: 58%;
}
.cb-demo-note,
.cb-demo-target {
  left: 55%;
  top: 34%;
  max-width: 40%;
  padding: 8px;
  font-size: 13px;
  white-space: normal;
  color: #39343e;
}
.cb-root .cb-practice .cb-demo-source,
.cb-root .cb-practice .cb-demo-drag {
  padding: 0;
}
.cb-demo-drag {
  width: 92px;
  height: 61px;
  cursor: grab;
  touch-action: none;
}
.cb-demo-output {
  left: 25%;
  top: 28%;
  width: 50%;
  height: 54%;
  transition: all 0.18s;
}
.cb-demo-output.expanded {
  left: 12%;
  top: 8%;
  width: 76%;
  height: 84%;
}
.cb-demo-edge {
  position: absolute;
  left: 42%;
  top: 50%;
  width: 16%;
  height: 2px;
  background: #8873bd;
}
.cb-practice .picked {
  outline: 2px solid #8873bd;
}
.cb-practice-copy {
  min-height: 40px;
  margin: 0;
}
.cb-practice-actions {
  display: flex;
  gap: 7px;
}
@media (max-width: 650px) {
  .cb-lessons-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cb-root .cb-lessons-grid button {
    height: 79px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cb-lessons-grid img,
  .cb-demo-output {
    transition: none;
  }
}
@media (hover: hover) and (pointer: fine) {
  .cb-tilebody .cb-actions {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.13s ease;
  }
  .cb-tile:hover .cb-tilebody .cb-actions,
  .cb-tile:focus-within .cb-tilebody .cb-actions {
    opacity: 1;
    pointer-events: auto;
  }
  .cb-tile:hover,
  .cb-tile:focus-within {
    border-color: #c7c3cc;
  }
  .cb-card:not(.selected):not(.source):hover {
    border-color: #aca5ba;
  }
  .cb-card:not(.selected):not(.source) .cb-cardfoot {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
  }
  .cb-card:not(.selected):not(.source):hover .cb-cardfoot,
  .cb-card:not(.selected):not(.source):focus-within .cb-cardfoot,
  .cb-card.selected .cb-cardfoot,
  .cb-card.source .cb-cardfoot {
    opacity: 1;
    pointer-events: auto;
  }
}
.cb-toolbar .cb-quick button:hover,
.cb-toolbar .cb-quick button:focus-visible,
.cb-root .cb-toolbar > button:hover:not(:disabled) {
  background: #efedf1;
}
body.dark .cb-toolbar .cb-quick button:hover,
body.dark .cb-root .cb-toolbar > button:hover:not(:disabled) {
  background: #454049;
}
@media (prefers-reduced-motion: reduce) {
  .cb-tilebody .cb-actions,
  .cb-cardfoot {
    transition: none !important;
  }
}
.cb-lessons-grid i {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid #fffc;
  border-radius: 50%;
  background: #24252bb0;
  color: #fff;
  font: 19px/1 system-ui;
  opacity: 0;
  transition: opacity 0.13s;
}
.cb-lessons-grid button:hover i,
.cb-lessons-grid button:focus-visible i {
  opacity: 1;
}
.cb-root dialog:has(.cb-lesson-video) {
  width: min(610px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
}
.cb-lesson-video {
  display: block;
  width: 100%;
  max-height: 60vh;
  background: #f7f6f7;
  border-radius: 8px;
}
@media (hover: none) {
  .cb-lessons-grid i {
    opacity: 1;
  }
}

/* The project list uses the site shell. An open board owns the entire work surface. */
body:has(.cb-in-editor) :is(#rail,.announce) {display:none}
.cb-root.cb-in-editor {
  position:fixed; inset:0; z-index:20;
  --cb-surface:#f9fafb; --cb-rule:#dce2e7; --cb-control:#42536a;
  --cb-board:#f4f4f4; --cb-dot:#d5d5d5;
}
body.dark .cb-root.cb-in-editor {
  --cb-surface:#292d33; --cb-rule:#414850; --cb-control:#d4dbe4;
  --cb-board:#202328; --cb-dot:#454952;
}
.cb-root.cb-in-editor .cb-editor,
.cb-in-editor .cb-workarea,
.cb-in-editor .cb-workarea .cb-stage {
  position:absolute; inset:0; width:100%; height:100%; min-height:0; border:0; border-radius:0;
}
.cb-in-editor .cb-workarea .cb-stage {
  background-color:var(--cb-board);
  background-image:radial-gradient(circle,var(--cb-dot) .53px,transparent .7px);
  cursor:default;
}
.cb-in-editor[data-tool=pan] .cb-stage {cursor:grab}
.cb-in-editor[data-tool=pan] .cb-stage:active {cursor:grabbing}
.cb-in-editor .cb-float,.cb-in-editor .cb-accessory {
  position:absolute; z-index:4; display:flex; align-items:center; gap:3px;
  padding:4px 7px; border:1px solid var(--cb-rule); border-radius:12px;
  color:var(--cb-control); background:var(--cb-surface);
  box-shadow:0 7px 20px #2531400c;
}
.cb-in-editor .cb-float button,.cb-in-editor .cb-node-menu summary,.cb-project-menu summary {
  background:transparent; border:0; color:var(--cb-control); border-radius:8px;
  display:inline-flex; align-items:center; justify-content:center; gap:5px; height:32px;
  min-height:0; padding:4px 8px; font-size:12px; cursor:pointer;
}
.cb-in-editor .cb-float button:is(:hover,:focus-visible):not(:disabled),
.cb-project-menu summary:hover,.cb-in-editor .cb-node-menu summary:hover,
.cb-in-editor .cb-float button[aria-pressed=true] {background:color-mix(in srgb,var(--cb-control) 9%,transparent)}
.cb-in-editor .cb-project {top:12px;left:16px;height:38px}
.cb-project-menu summary {list-style:none;gap:5px}
.cb-project-menu summary::-webkit-details-marker {display:none}
.cb-project-menu summary .brand-logo {width:22px;height:22px}
.cb-shared-heading {display:inline-flex;align-items:center;gap:6px;min-width:0}
.cb-shared-heading .brand-logo {width:24px;height:24px}
.cb-project input {font:600 12px system-ui;color:inherit;width:105px;border:0;border-left:1px solid var(--cb-rule);padding-left:9px;background:transparent;border-radius:0}
.cb-project-menu > div,.cb-in-editor .cb-node-menu > div {
  position:absolute;top:calc(100% + 6px);left:0;min-width:170px;
  display:grid;padding:6px;border-radius:10px;background:var(--cb-surface);
  border:1px solid var(--cb-rule);box-shadow:0 5px 18px #1625351c;
}
.cb-project-menu > div :is(button,a),.cb-in-editor .cb-node-menu > div button {justify-content:flex-start;padding:6px 10px;text-align:left}
.cb-project-menu > div a {color:inherit;font-size:12px;text-decoration:none}
.cb-in-editor .cb-sharing {top:12px;right:16px;height:42px}
.cb-sharing a {color:inherit;text-decoration:none;font-size:12px;border-right:1px solid var(--cb-rule);padding:0 12px 0 7px}
.cb-in-editor .cb-toolbar.cb-float {left:16px;top:0;bottom:0;height:max-content;margin:auto 0;width:56px;flex-flow:column nowrap;padding:4px 7px;gap:2px}
.cb-toolbar hr,.cb-project-menu hr {border:0;margin:3px auto;border-top:1px solid var(--cb-rule);width:24px}
.cb-in-editor .cb-toolbar > button,.cb-in-editor .cb-node-menu summary {
  width:36px;height:36px;flex-direction:column;gap:2px;padding:4px;color:var(--cb-control);
}
.cb-in-editor .cb-toolbar > button:has(span) {height:44px}
.cb-in-editor .cb-toolbar > button span {font-size:10px}
.cb-in-editor .cb-node-menu > div {position:fixed;z-index:8;width:176px}
.cb-node-menu small {font-size:11px;color:var(--cb-muted);padding:6px 8px 2px}
.cb-in-editor .cb-foot {left:12px;bottom:12px;height:42px;gap:2px}
.cb-in-editor .cb-foot button {padding:4px;width:32px}
.cb-foot > i {height:16px;border-left:1px solid var(--cb-rule);margin:0 4px}
.cb-foot [data-zoom] {width:40px;text-align:center;font-size:12px;font-variant-numeric:tabular-nums}
.cb-in-editor .cb-empty button {pointer-events:auto;display:flex;align-items:center;gap:10px;background:var(--cb-surface);color:#79899b;border:0;border-radius:30px;box-shadow:0 2px 18px #16253511;padding:10px 18px;font-size:13px;font-weight:550}
.cb-in-editor .cb-empty {z-index:1}
.cb-in-editor .cb-workarea .cb-chat {position:absolute;z-index:7;right:12px;top:64px;bottom:12px;height:auto;width:320px;max-height:none;border:1px solid var(--cb-rule);border-radius:12px;background:var(--cb-surface)}
.cb-in-editor .cb-accessory {z-index:7;top:66px;left:84px;display:grid;align-content:start;min-width:250px;max-height:75%;overflow:auto;padding:14px}
.cb-accessory header {display:flex;align-items:center;justify-content:space-between;gap:15px}
.cb-in-editor .cb-accessory[data-kind^="share-"] {left:auto;right:16px;width:min(290px,calc(100% - 32px));min-width:0;gap:7px}
.cb-accessory[data-kind="share-menu"] [role="menu"] {display:grid;gap:3px}
.cb-accessory[data-kind="share-menu"] [role="menuitem"] {display:grid;gap:4px;text-align:left;padding:10px;border:0;background:transparent;border-radius:7px;color:inherit}
.cb-accessory[data-kind="share-menu"] [role="menuitem"]:is(:hover,:focus-visible) {background:color-mix(in srgb,var(--cb-control) 9%,transparent)}
.cb-accessory[data-kind="share-menu"] small {font-size:12px;color:var(--cb-muted)}
@media(max-width:520px) {.cb-in-editor .cb-accessory[data-kind^="share-"] {top:108px}}
.cb-accessory[data-kind=cut] {top:auto;bottom:58px;left:80px;right:12px}
.cb-template-list {display:grid;gap:4px}
.cb-template-list button,.cb-accessory [role=tab] {font-size:12px}
.cb-accessory [aria-selected=true] {font-weight:bold}
.cb-mode-hint {position:absolute;bottom:18px;left:300px}

.cb-in-editor .cb-card {width:320px;min-height:220px;border-radius:13px;}
.cb-card textarea.cb-card-text {display:block;resize:vertical;width:100%;height:145px;padding:12px;border:0;background:transparent;color:inherit;line-height:1.6;}
.cb-card .cb-placeholder {height:150px;display:flex;align-items:center;justify-content:center;gap:8px;}
.cb-in-editor .cb-cardfoot {min-height:31px;}

.cb-shared {position:fixed;inset:0;z-index:32;background:var(--panel);display:grid;grid-template-rows:auto 1fr;}
.cb-shared header {display:flex;align-items:center;justify-content:space-between;padding:10px 16px;border-bottom:1px solid var(--line);}
.cb-shared iframe {width:100%;height:100%;border:0;}
.cb-accessory input[readonly] {width:100%;padding:6px;border:1px solid var(--cb-rule);border-radius:6px;}

.cb-gallery-cover {display:grid;place-items:center;color:#8290a2;background-color:#f6f7f8;background-image:radial-gradient(#cbd0d7 1px, transparent 1px);background-size:15px 15px;}

.cb-in-editor .cb-foot {min-width:268px;justify-content:space-between}
.cb-in-editor .cb-sharing {min-width:265px;justify-content:space-between}
@media(max-width:520px) {
  .cb-in-editor .cb-sharing {top:58px; min-width:0;max-width:calc(100% - 24px)}
  .cb-in-editor .cb-toolbar.cb-float {left:8px}
  .cb-in-editor .cb-accessory {left:68px;right:8px;min-width:0;max-width:calc(100% - 76px)}
  .cb-in-editor .cb-workarea .cb-chat {top:108px;max-width:calc(100% - 24px)}
}
@media(max-height:600px) {
  .cb-in-editor .cb-toolbar.cb-float {top:57px;bottom:58px;height:auto;max-height:max-content;overflow-y:auto;justify-content:flex-start}
  .cb-in-editor .cb-toolbar.cb-float > * {flex-shrink:0}
}

.cb-text-tools, .cb-expanded-text header, .cb-expanded-text footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.cb-text-tools { padding: 4px 12px; font-size: 12px; color: var(--muted); }
.cb-text-tools button, .cb-expanded-text button {
  color: inherit; background: transparent; border: 0; border-radius: 7px; padding: 6px 10px;
}
.cb-text-tools button:hover, .cb-expanded-text button:hover { background: var(--line); }
.cb-root dialog.cb-expanded-text {
  box-sizing: border-box; width: min(680px, calc(100% - 24px)); max-width: none; max-height: calc(100dvh - 24px);
  padding: 16px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--panel);
}
.cb-expanded-text textarea {
  box-sizing: border-box; width: 100%; height: min(42dvh, 340px); margin: 12px 0;
  resize: none; padding: 12px; color: inherit; background: transparent; font: inherit;
}
.cb-expanded-text footer { justify-content: flex-end; }

.cb-in-editor .cb-card {overflow:visible}
.cb-in-editor .cb-card[data-photo=true] {min-height:0; box-shadow:none; background:transparent}
.cb-card[data-photo=true] .cb-card-media {height:auto; border-radius:inherit; cursor:grab}
.cb-in-editor .cb-card[data-photo=true] .cb-cardhead {position:absolute;bottom:100%;left:0;right:0;min-height:0;padding:0 2px 3px;background:transparent;border:0;color:var(--cb-control);font-size:12px}
.cb-card[data-photo=true] .cb-cardhead span {display:none}
.cb-in-editor .cb-card[data-photo=true] .cb-cardfoot {position:absolute;right:0;top:100%;min-height:0;padding:0;border:0;z-index:1}
.cb-port {position:absolute;top:50%;transform:translateY(-50%);z-index:2;display:grid;place-content:center;padding:0!important;width:23px;height:23px;min-height:0!important;border-radius:50%!important;opacity:0;background:var(--cb-surface);color:var(--cb-control)}
.cb-in {left:-25px}.cb-out {right:-25px}
.cb-card:hover .cb-port,.cb-card.selected .cb-port,.cb-card:focus-within .cb-port {opacity:1}
.cb-recipe,.cb-node-actions,.cb-context {position:absolute;z-index:3;color:var(--cb-control);background:var(--cb-surface);border:1px solid var(--cb-rule);border-radius:13px;box-shadow:0 6px 24px #1c243318}
.cb-recipe {
  z-index:5;width:min(660px,calc(100% - 16px));max-height:calc(100% - 24px);overflow:auto;
  box-sizing:border-box;padding:13px 14px 10px;border-radius:12px;
  background:var(--panel,#fff);border-color:var(--cb-rule);box-shadow:0 3px 15px #27364c10;
}
.cb-recipe:not([hidden]) {display:grid;grid-template-columns:minmax(0,1fr) 24px;column-gap:8px;align-content:start}
.cb-recipe textarea {display:block;width:100%;box-sizing:border-box;background:transparent;font:inherit}
.cb-recipe footer,.cb-node-actions,.cb-thumbs {display:flex;align-items:center;gap:6px}
.cb-recipe footer {grid-column:1/-1;flex-wrap:nowrap;border-top:1px solid var(--cb-rule);padding-top:9px;margin-top:5px;min-width:0}
.cb-recipe button,.cb-node-actions button,.cb-context button {padding:5px 8px;border:0;border-radius:7px;background:transparent;color:inherit}
.cb-node-actions button:hover,.cb-context button:hover,.cb-recipe button:hover:not(:disabled) {background:var(--cb-rule);color:var(--cb-control)}
.cb-recipe .cb-domestic {flex:0 1 auto;min-width:30px;max-width:33%}
.cb-recipe .mp-trigger {gap:5px;height:29px;padding:2px 3px;text-align:left}
.cb-recipe .mp-trigger small {display:none}
.cb-recipe .mp-trigger strong,.cb-recipe [data-output-trigger] strong {font-size:11px;font-weight:550;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cb-recipe .mp-symbol {flex:0 0 13px;width:13px;height:18px}
.cb-recipe [data-output-trigger] {display:flex;align-items:center;gap:5px;min-width:32px;min-height:29px;padding:2px 3px}
.cb-recipe [data-output-trigger] i {display:block;flex:none;max-width:16px;height:15px;background:#e5e9ef;border:1px solid #bdc7d4;border-radius:2px}
.cb-recipe [data-output-trigger] b {width:5px;height:5px;flex:none;border:solid currentColor;border-width:0 1px 1px 0;transform:rotate(45deg)}
.cb-recipe [data-output-trigger][aria-expanded=true] b {transform:rotate(225deg)}
.cb-extra-tools {display:flex;align-items:center;flex:none}
.cb-recipe .cb-extra-tools button,.cb-recipe [data-mic],.cb-recipe .cb-prompt-actions button {padding:3px;display:grid;place-items:center;width:24px;height:24px;min-height:0;color:var(--cb-control)}
.cb-recipe footer [data-node-price] {flex:0 0 auto;white-space:nowrap;margin-left:auto;font-size:10.5px;font-weight:550;font-variant-numeric:tabular-nums}
.cb-priced::before {content:"✦";color:#11a8df;margin-right:4px}
.cb-recipe footer [data-generate] {display:grid;place-items:center;flex:0 0 32px;height:32px;min-height:0;border-radius:50%;padding:0;background:var(--cb-control);color:var(--cb-surface)}
.cb-recipe footer [data-generate]:disabled {background:#d9dee5;color:#919ba7;opacity:1}
.cb-recipe .cb-recipe-error,.cb-recipe .cb-quote-note {grid-column:1/-1;font-size:11px;color:var(--cb-control)}
.cb-quote-note:empty,.cb-recipe-error:empty {display:none}
.cb-thumbs {overflow:auto}.cb-thumbs span {position:relative;flex:none;font-size:11px}.cb-thumbs img {width:48px;height:45px;object-fit:cover;border-radius:7px}.cb-thumbs b {position:absolute;bottom:2px;left:2px;padding:0 3px;color:white;background:#29313bd6;border-radius:4px}
.cb-node-actions {padding:4px;white-space:nowrap}
.cb-context {z-index:9;display:grid;min-width:130px;padding:4px}.cb-context button {text-align:left}
.cb-photo-preview {display:block;max-width:75vw;max-height:70vh;object-fit:contain}
.cb-brush canvas {display:block;width:auto;height:auto;max-width:100%;max-height:52vh;touch-action:none;cursor:crosshair;margin:auto}
.cb-brush-controls {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.cb-in-editor .cb-brush-dialog {width:min(820px,92%);max-width:92%;max-height:94%;overflow:auto}
.cb-in-editor .cb-node-actions {max-width:calc(100% - 16px);overflow:auto}
.cb-history-dialog {width:min(780px,90vw)}
.cb-history-tools {display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.cb-history-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--cb-thumb,105px),1fr));gap:8px;max-height:52vh;overflow:auto}
.cb-history-grid button {min-width:0;display:grid;padding:4px;border-radius:7px}
.cb-history-grid img,.cb-history-grid video {width:100%;aspect-ratio:1;object-fit:cover;border-radius:5px}
.cb-history-grid span {overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.cb-history-grid [aria-pressed=true],.cb-history-tools [aria-pressed=true] {outline:2px solid #837bcc}
.cb-in-editor .cb-far {visibility:hidden;pointer-events:none}
.cb-recipe .cb-options {
  position:fixed;inset:auto;margin:0;width:min(336px,calc(100vw - 12px));height:fit-content;
  box-sizing:border-box;padding:11px 12px;border:1px solid var(--cb-rule);
  background:var(--panel,#fff);color:var(--cb-control);border-radius:9px;overscroll-behavior:contain;
}
.cb-recipe .cb-options:popover-open {display:block}
.cb-options .is-choices {grid-auto-flow:row;grid-template-columns:repeat(auto-fit,minmax(40px,1fr))}
.cb-options .is-choices button {background:color-mix(in srgb,currentColor 4%,transparent);min-height:30px;padding:4px 2px;font-size:11px}
.cb-options .is-choices [data-key=ratio] {min-height:65px;font-size:10px}
.cb-options .is-choices [aria-pressed=true] {background:color-mix(in srgb,currentColor 10%,transparent);outline:none;color:var(--ink);font-weight:650}
.cb-options .is-choices [aria-pressed=true] .is-ratio-icon {border-color:currentColor}
.cb-options .is-choices [data-key=ratio]:focus-visible {outline:2px solid var(--cb-brand)}
.cb-options .is-ratio-icon {border-width:1.5px;border-radius:6px}
.cb-options fieldset,.cb-options legend {width:100%;box-sizing:border-box}
.cb-options select {width:100%;height:30px;font-size:12px;border:1px solid var(--cb-rule);border-radius:6px;padding-inline:6px;background:var(--cb-surface);color:inherit}
.cb-options .vs-scale button {min-height:24px}
@media(min-width:521px) {
  .cb-in-editor .cb-sharing {min-width:calc(265px + max(0px,(var(--cb-balance-chars,2) - 2)*4.375px))}
}
.cb-marquee,.cb-selection-frame {position:absolute;pointer-events:none;border:1px solid #8c9aad;background:#8193ae19}
.cb-selection-frame {border-style:dashed;border-radius:10px;background:#8585850a}
.cb-wire-preview {position:absolute;top:0;left:0;width:1px;height:1px;overflow:visible;pointer-events:none}
.cb-wire-preview {fill:none;stroke-linecap:round}
.cb-in-editor .cb-card.cb-drop-target {outline:2px solid #708bb0}
.cb-multi-tools {position:absolute;display:flex;align-items:center;gap:6px;z-index:4;max-width:calc(100% - 16px);overflow:auto;white-space:nowrap;background:var(--cb-surface);color:var(--cb-control);padding:5px 8px;border:1px solid var(--cb-rule);border-radius:10px;box-shadow:0 6px 24px #25314011}
.cb-multi-tools :is(span,button){font-size:12px}
.cb-in-editor .cb-card[data-photo=true]{border:1px solid #18181810;border-radius:10px}
.cb-card[data-photo=true] img.cb-card-media {object-fit:contain;display:block;max-height:none;background:var(--cb-surface)}
.cb-in-editor .cb-card[data-photo=true] .cb-cardhead strong {display:flex;align-items:center;gap:4px;color:var(--cb-control);font-weight:450;font-size:13px}
.cb-card[data-photo=true] .cb-cardhead {user-select:none}
.cb-wire-preview,.cb-port {touch-action:none}
.cb-wire-preview {stroke:#555e69;stroke-width:4}
.cb-wire-preview use {stroke:#e2f3ff;fill:none;stroke-width:3;stroke-dasharray:3 97;animation:cb-flow 1.8s linear infinite}
@keyframes cb-flow {to {stroke-dashoffset:-100}}
@media (prefers-reduced-motion:reduce){.cb-wire-preview use{display:none}}
.cb-wiring :is(.cb-recipe,.cb-node-actions,.cb-cardfoot,.cb-multi-tools){visibility:hidden}
.cb-in-editor .cb-node-menu > div{width:188px}
.cb-in-editor .cb-node-menu > div button{min-height:32px;gap:10px}
.cb-in-editor .cb-card[data-photo=true]:not(.selected):not(:focus-within) .cb-cardfoot{opacity:0;pointer-events:none}

.cb-recipe .cb-prompt-actions {grid-area:1 / 2 / 3 / 3;display:grid;gap:4px;align-content:start}
.cb-recipe .cb-thumbs {grid-area:1/1;min-width:0}
.cb-recipe .cb-thumbs:empty {display:none}
.cb-thumbs button {position:relative;min-width:42px;flex:none;max-width:100px;overflow:hidden}
.cb-recipe .cb-thumbs button:has(img) {padding:0}
.cb-thumbs button b {top:2px;bottom:auto}
.cb-tool-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
.cb-tool-grid button {white-space:normal}
.cb-mentions button {font-size:12px}
.cb-accessory[data-kind=creative-tools] h4{margin:6px 0;font-size:12px;color:var(--cb-control)}
.cb-accessory[data-kind=creative-tools] section+section{margin-top:8px}
.cb-recipe .cb-mentions {grid-area:3 / 1 / 4 / -1}
.cb-recipe footer {grid-row:4}
.cb-recipe .cb-prompt-wrap {position:relative;min-width:0}
.cb-recipe .cb-prompt-actions~.cb-prompt-wrap {grid-area:2 / 1}
.cb-recipe .cb-prompt-wrap textarea,.cb-recipe .cb-prompt-mirror {box-sizing:border-box;width:100%;border:0;margin:0;padding:7px;font:inherit;line-height:1.6;letter-spacing:inherit;white-space:pre-wrap;overflow-wrap:break-word;tab-size:4;text-align:start}
.cb-recipe .cb-prompt-actions~.cb-prompt-wrap :is(textarea,.cb-prompt-mirror) {padding:8px 0;font-size:13px;line-height:1.7}
.cb-recipe .cb-prompt-mirror {position:absolute;inset:0;overflow:hidden;pointer-events:none;color:var(--cb-control)}
.cb-recipe .cb-prompt-wrap textarea {position:relative;background:transparent;color:transparent;-webkit-text-fill-color:transparent;caret-color:var(--cb-control);resize:none}
.cb-recipe .cb-prompt-wrap textarea::placeholder {color:var(--muted,#777);-webkit-text-fill-color:var(--muted,#777)}
.cb-recipe .composing textarea {color:var(--cb-control);-webkit-text-fill-color:var(--cb-control)}
.cb-recipe .composing .cb-prompt-mirror {visibility:hidden}
.cb-prompt-mirror mark {font:inherit;border-radius:3px;padding:0;background:hsl(var(--mention-hue) 82% 91%);color:hsl(var(--mention-hue) 68% 31%)}
.cb-recipe .cb-write-ai {font-size:12px;color:var(--cb-control);white-space:nowrap}
.cb-recipe .cb-write-status {grid-column:1 / -1;font-size:11px;color:var(--cb-control)}
.cb-write-status:empty {display:none}
.cb-ref-text {white-space:pre-wrap;overflow-wrap:anywhere;max-height:60vh;overflow:auto}
.cb-ref-player {width:min(640px,72vw);max-height:65vh}
.cb-recipe .cb-thumbs button {cursor:zoom-in}
.cb-thumbs button:not(:has(img)){padding:6px 8px 6px 22px;background:var(--cb-board);color:var(--cb-control);border-radius:7px}
.cb-thumbs button b{min-width:12px;line-height:16px}
.cb-recipe .cb-thumbs button b,.cb-recipe .cb-mentions button {background:hsl(var(--mention-hue) 82% 91%);color:hsl(var(--mention-hue) 68% 31%)}

.cb-recipe .cb-write-ai[aria-busy=true] {opacity:.5}
@container (max-width:480px) {
  .cb-recipe footer {gap:3px}
  .cb-recipe .mp-trigger {gap:3px}
}
.cb-recipe {container-type:inline-size}

.cb-node-inputs {
  position:absolute;z-index:4;display:flex;align-items:center;gap:3px;padding:5px 7px;
  white-space:nowrap;background:var(--cb-surface);color:var(--cb-control);
  border:1px solid var(--cb-rule);border-radius:8px;box-shadow:0 6px 24px #1c243315;
}
.cb-node-inputs button {display:flex;align-items:center;gap:5px;border:0;background:transparent;color:inherit;padding:5px 7px;font-size:11px}
.cb-in-editor .cb-card[data-photo=false] .cb-cardhead {
  position:absolute;bottom:100%;left:0;right:0;min-height:0;padding:3px 4px 5px;
  color:var(--cb-control);background:transparent;border:0;
}
.cb-card[data-photo=false] .cb-cardhead span {display:none}
.cb-card[data-photo=false] .cb-cardhead strong {display:flex;align-items:center;gap:4px;font-size:13px;font-weight:500}
.cb-in-editor .cb-card[data-photo=false] {border-radius:10px;border-color:var(--cb-rule);box-shadow:none}
.cb-in-editor .cb-card[data-photo=false]:is(.selected,.source) {outline:1px solid var(--cb-control);outline-offset:0}
.cb-in-editor .cb-card[data-photo=false] .cb-cardfoot {position:absolute;bottom:3px;right:5px;min-height:0;border:0;padding:0;background:transparent}
.cb-card[data-photo=false]:not(:hover):not(:focus-within) .cb-cardfoot {opacity:0;pointer-events:none}
.cb-in-editor .cb-card .cb-placeholder {height:218px}
.cb-placeholder [data-op=record-node] {display:grid;justify-items:center;gap:10px;background:transparent;border:0}
.cb-placeholder [data-op=record-node] svg {width:54px;height:54px;padding:13px;border-radius:50%;background:var(--panel,#fff);box-shadow:0 1px 4px #28364716}
.cb-placeholder [data-op=record-node] span {padding:7px 12px;border-radius:6px;background:var(--cb-ink);color:#fff}

.cb-recipe .cb-write-ai span {display:none}
@container (min-width:540px) {
  .cb-recipe .cb-extra-tools .cb-write-ai {display:flex;gap:3px;width:auto;padding-inline:5px}
  .cb-recipe .cb-write-ai span {display:inline;font-size:10.5px}
}

.cb-root .cb-tools-menu {
  position:fixed;inset:auto;margin:0;padding:7px;box-sizing:border-box;width:min(324px,calc(100vw - 14px));
  background:var(--panel,#fff);color:var(--ink,#252a32);border:1px solid var(--cb-rule);
  border-radius:11px;box-shadow:0 7px 28px #17263a25;overflow:hidden;
}
.cb-tools-menu:popover-open {display:flex;gap:7px}
.cb-tools-menu nav,.cb-tools-list {min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.cb-tools-menu nav {flex:none;width:76px;padding-right:5px;border-right:1px solid var(--cb-rule)}
.cb-tools-menu nav button,.cb-tools-menu .cb-tool-grid button {
  width:100%;display:grid;text-align:left;box-sizing:border-box;gap:2px;color:inherit;
  padding:7px 8px;border:0;border-radius:7px;background:transparent;font-size:12px;
}
.cb-tools-menu nav button {font-size:11px}
.cb-tools-menu nav button[aria-current=true],.cb-tools-menu button:is(:hover,:focus-visible) {
  background:color-mix(in srgb,currentColor 7%,transparent);
}
.cb-tools-list {flex:1;min-width:0}
.cb-tools-list h4 {margin:4px 8px;font-size:10px;color:var(--muted)}
.cb-tools-list section+section {margin-top:7px}
.cb-tools-menu .cb-tool-grid {display:block}
.cb-tools-menu small {font-size:10.5px;color:var(--muted);line-height:1.4}
.cb-root dialog.cb-writer-dialog {width:min(480px,calc(100% - 24px));max-height:calc(100dvh - 24px);overflow:auto}
.cb-writer-dialog .cb-dialogbody {gap:12px}
.cb-writer-dialog .cb-dialogbody label {display:grid;gap:6px;font-size:13px;font-weight:550}
.cb-writer-dialog .cb-dialogbody textarea {width:100%;height:auto;min-height:74px;resize:vertical;line-height:1.6;font-size:14px;font-weight:400}
.cb-writer-generate {display:flex;align-items:center;gap:10px}
.cb-writer-generate small,.cb-writer-dialog [data-feedback] {color:var(--muted);font-size:12px}
.cb-writer-dialog [data-feedback]:empty {display:none}
.cb-job-progress {position:absolute;left:8%;right:8%;top:50%;transform:translateY(-50%);z-index:1;pointer-events:none;padding:12px 14px;border:1px solid var(--cb-rule);border-radius:10px;background:var(--cb-surface);box-shadow:0 3px 16px #23344a18;color:var(--cb-control);font-size:13px}
.cb-job-progress>div {display:flex;justify-content:space-between;align-items:center;gap:8px}
.cb-job-progress b {font-variant-numeric:tabular-nums}
.cb-job-progress progress {display:block;appearance:none;width:100%;height:5px;margin-top:8px;overflow:hidden;border:none;border-radius:3px;background:var(--cb-rule);color:#647bb7}
.cb-job-progress progress::-webkit-progress-bar {background:var(--cb-rule)}
.cb-job-progress progress::-webkit-progress-value {border-radius:3px;background:#647bb7;transition:width .35s ease}
.cb-job-progress progress::-moz-progress-bar {border-radius:3px;background:#647bb7}
.cb-job-progress progress[hidden] {display:none}
@media(prefers-reduced-motion:reduce){.cb-job-progress progress::-webkit-progress-value{transition:none}}
.cb-in-editor .cb-stage {overscroll-behavior:none}
.cb-root.cb-in-editor[data-skin=night]{--cb-board:#111213;--cb-surface:#242526;--cb-rule:#3c3d40;--cb-control:#e2e2e6;--cb-ink:#e5e5e7;--cb-line:#414246;--cb-muted:#abaeb4;--cb-bg:#202122}
.cb-root.cb-in-editor[data-skin=night] .cb-stage{background-image:none}
.cb-root.cb-in-editor[data-skin=night] :is(.cb-card:not([data-photo=true]),.cb-recipe,.cb-project-menu>div,.cb-node-menu>div,.cb-context,.cb-node-actions,.cb-node-inputs){background-color:var(--cb-surface);color:var(--cb-control)}
.cb-root.cb-in-editor[data-skin=night] :is(.cb-stage textarea,.cb-accessory input,.cb-accessory select,.cb-accessory button,.cb-context button){background-color:#292a2d;color:var(--cb-control);border-color:var(--cb-rule)}
.cb-root.cb-in-editor[data-skin=night] .cb-recipe textarea{background:transparent}
.cb-root.cb-in-editor[data-hide-edges=true] .cb-edges{visibility:hidden}
.cb-board-state{display:flex;gap:7px;color:var(--cb-muted);font-size:10px;padding-inline:4px;white-space:nowrap}
.cb-found,.cb-zoom-options{display:grid;gap:4px;max-height:40vh;overflow-y:auto}
.cb-found button{text-align:left}
.cb-in-editor .cb-foot [data-zoom]{width:55px;white-space:nowrap}
.cb-in-editor .cb-toolbar.cb-float{max-height:calc(100% - 120px)}
.cb-in-editor .cb-toolbar.cb-float>button{height:32px;min-height:24px;flex-shrink:1}
.cb-in-editor .cb-toolbar.cb-float>button:has(span){height:36px}
@media(max-height:590px){.cb-in-editor .cb-toolbar.cb-float{overflow-y:auto;justify-content:flex-start}.cb-in-editor .cb-toolbar.cb-float>button{flex-shrink:0}}
.cb-recipe .cb-prompt-wrap:has(.cb-empty-hint) textarea::placeholder {color:transparent;-webkit-text-fill-color:transparent}
.cb-empty-hint {position:absolute;inset:6px 2px auto;pointer-events:none;font-size:13px;color:var(--cb-control);line-height:1.55}
.cb-prompt-wrap textarea:not(:placeholder-shown) ~ .cb-empty-hint,.cb-prompt-wrap.composing .cb-empty-hint {display:none}
.cb-recipe .cb-empty-hint button {display:block;margin-top:3px;padding:3px 11px;border-radius:8px;border:1px solid #967447;background:#392c20;color:#ffdc9e;font-weight:700;pointer-events:auto;cursor:pointer}
.cb-empty-hint button::before {content:"✦";margin-right:.4em}
@media(prefers-reduced-motion:no-preference){
  .cb-empty-hint button {animation:cb-writer-glow 3.8s ease-in-out infinite alternate}
  @keyframes cb-writer-glow {to {border-color:#dfb574;box-shadow:0 0 10px #d7a05738}}
}
.cb-card .cb-job-progress {box-sizing:border-box;min-width:0;max-height:82%;overflow:auto;overscroll-behavior:contain}
.cb-card .cb-job-progress[data-state=ended] {pointer-events:auto}
.cb-card .cb-job-progress>div {min-width:0;align-items:baseline}
.cb-card .cb-job-progress>div>span,.cb-recipe .cb-recipe-error {min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:normal}
.cb-card .cb-job-progress>div>span {flex:1 1 0}
.cb-card .cb-job-progress b {flex:none}

/* The node surface itself is the progress track whenever a percentage is available. */
.cb-card .cb-job-progress:has(progress:not([hidden])) {
  inset: 0;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: inherit;
  transform: none;
  overflow: hidden;
  background: #211e1a;
  box-shadow: none;
  color: #fff4de;
  pointer-events: none;
}
.cb-card .cb-job-progress progress:not([hidden]) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  background: #211e1a;
}
.cb-card .cb-job-progress progress::-webkit-progress-bar { background: #211e1a; }
.cb-card .cb-job-progress progress::-webkit-progress-value {
  border-radius: 0;
  background: linear-gradient(100deg, #524332, #826743);
}
.cb-card .cb-job-progress progress::-moz-progress-bar {
  border-radius: 0;
  background: linear-gradient(100deg, #524332, #826743);
}
.cb-card .cb-job-progress:has(progress:not([hidden])) > div {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  text-align: center;
}
.cb-card .cb-job-progress:has(progress:not([hidden])) b {
  font-size: 30px;
  line-height: 1;
  color: #fff4de;
  text-shadow: 0 1px 4px #241a12;
}
.cb-card .cb-job-progress:has(progress:not([hidden])) span {
  position: absolute;
  top: calc(50% + 22px);
  inset-inline: 12px;
  color: #f0e0c9;
}
.cb-card:has(.cb-job-progress progress:not([hidden])) {
  min-height: 220px;
}
.cb-card .cb-job-progress:has(progress:not([hidden])) b {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}